From fbc7e3ad84fc7269233a2f0b5d416cb1c6f8a6ea Mon Sep 17 00:00:00 2001 From: sandeepindia Date: Wed, 28 Jun 2023 18:03:26 +0530 Subject: [PATCH] ISSUE ID:- RICAPP-216 This bouncer is written using C++ xApp framework functionality and have E2AP 2.0 , E2SM KPM 2.0 , E2SM RC 1.0.3 support. Change-Id: Ie5ec50165dc71cabf1b451858a06a2b500f6a4a3 Signed-off-by: sandeepindia --- Bouncer/Dockerfile | 245 +- Bouncer/README | 43 - Bouncer/asn1c_defs/B-ControlCommand.c | 55 - Bouncer/asn1c_defs/B-ControlCommand.h | 52 - Bouncer/asn1c_defs/B-Header.c | 31 - Bouncer/asn1c_defs/B-Header.h | 43 - Bouncer/asn1c_defs/B-Message.c | 31 - Bouncer/asn1c_defs/B-Message.h | 43 - Bouncer/asn1c_defs/B-TriggerNature.c | 55 - Bouncer/asn1c_defs/B-TriggerNature.h | 54 - Bouncer/asn1c_defs/Cause.c | 92 - Bouncer/asn1c_defs/Cause.h | 68 - Bouncer/asn1c_defs/CauseMisc.c | 59 - Bouncer/asn1c_defs/CauseMisc.h | 56 - Bouncer/asn1c_defs/CauseProtocol.c | 65 - Bouncer/asn1c_defs/CauseProtocol.h | 59 - Bouncer/asn1c_defs/CauseRIC.c | 73 - Bouncer/asn1c_defs/CauseRIC.h | 63 - Bouncer/asn1c_defs/CauseRICservice.c | 57 - Bouncer/asn1c_defs/CauseRICservice.h | 55 - Bouncer/asn1c_defs/CauseTransport.c | 55 - Bouncer/asn1c_defs/CauseTransport.h | 54 - Bouncer/asn1c_defs/Criticality.c | 55 - Bouncer/asn1c_defs/Criticality.h | 52 - .../asn1c_defs/CriticalityDiagnostics-IE-Item.c | 70 - .../asn1c_defs/CriticalityDiagnostics-IE-Item.h | 48 - .../asn1c_defs/CriticalityDiagnostics-IE-List.c | 50 - .../asn1c_defs/CriticalityDiagnostics-IE-List.h | 44 - Bouncer/asn1c_defs/CriticalityDiagnostics.c | 94 - Bouncer/asn1c_defs/CriticalityDiagnostics.h | 52 - Bouncer/asn1c_defs/E2AP-PDU.c | 75 - Bouncer/asn1c_defs/E2AP-PDU.h | 61 - .../E2SM-Bouncer-ActionDefinition-Format1.c | 126 - .../E2SM-Bouncer-ActionDefinition-Format1.h | 53 - Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.c | 53 - Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.h | 55 - .../E2SM-Bouncer-ControlHeader-Format1.c | 50 - .../E2SM-Bouncer-ControlHeader-Format1.h | 44 - Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.c | 53 - Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.h | 55 - .../E2SM-Bouncer-ControlMessage-Format1.c | 50 - .../E2SM-Bouncer-ControlMessage-Format1.h | 44 - Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.c | 53 - Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.h | 55 - .../E2SM-Bouncer-EventTriggerDefinition-Format1.c | 50 - .../E2SM-Bouncer-EventTriggerDefinition-Format1.h | 44 - .../E2SM-Bouncer-EventTriggerDefinition.c | 53 - .../E2SM-Bouncer-EventTriggerDefinition.h | 55 - .../E2SM-Bouncer-IndicationHeader-Format1.c | 50 - .../E2SM-Bouncer-IndicationHeader-Format1.h | 44 - Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.c | 53 - Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.h | 55 - .../E2SM-Bouncer-IndicationMessage-Format1.c | 50 - .../E2SM-Bouncer-IndicationMessage-Format1.h | 44 - .../asn1c_defs/E2SM-Bouncer-IndicationMessage.c | 53 - .../asn1c_defs/E2SM-Bouncer-IndicationMessage.h | 55 - Bouncer/asn1c_defs/E2setupFailure.c | 50 - Bouncer/asn1c_defs/E2setupFailure.h | 44 - Bouncer/asn1c_defs/E2setupRequest.c | 50 - Bouncer/asn1c_defs/E2setupRequest.h | 44 - Bouncer/asn1c_defs/E2setupResponse.c | 50 - Bouncer/asn1c_defs/E2setupResponse.h | 44 - Bouncer/asn1c_defs/ENB-ID-Choice.c | 180 - Bouncer/asn1c_defs/ENB-ID-Choice.h | 60 - Bouncer/asn1c_defs/ENB-ID.c | 226 - Bouncer/asn1c_defs/ENB-ID.h | 61 - Bouncer/asn1c_defs/ENGNB-ID.c | 88 - Bouncer/asn1c_defs/ENGNB-ID.h | 56 - Bouncer/asn1c_defs/ErrorIndication.c | 50 - Bouncer/asn1c_defs/ErrorIndication.h | 44 - Bouncer/asn1c_defs/GNB-CU-UP-ID.c | 67 - Bouncer/asn1c_defs/GNB-CU-UP-ID.h | 44 - Bouncer/asn1c_defs/GNB-DU-ID.c | 67 - Bouncer/asn1c_defs/GNB-DU-ID.h | 44 - Bouncer/asn1c_defs/GNB-ID-Choice.c | 88 - Bouncer/asn1c_defs/GNB-ID-Choice.h | 56 - Bouncer/asn1c_defs/GlobalE2node-ID.c | 86 - Bouncer/asn1c_defs/GlobalE2node-ID.h | 64 - Bouncer/asn1c_defs/GlobalE2node-eNB-ID.c | 50 - Bouncer/asn1c_defs/GlobalE2node-eNB-ID.h | 44 - Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.c | 50 - Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.h | 44 - Bouncer/asn1c_defs/GlobalE2node-gNB-ID.c | 72 - Bouncer/asn1c_defs/GlobalE2node-gNB-ID.h | 48 - Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.c | 50 - Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.h | 44 - Bouncer/asn1c_defs/GlobalENB-ID.c | 60 - Bouncer/asn1c_defs/GlobalENB-ID.h | 46 - Bouncer/asn1c_defs/GlobalRIC-ID.c | 96 - Bouncer/asn1c_defs/GlobalRIC-ID.h | 44 - Bouncer/asn1c_defs/GlobalenGNB-ID.c | 60 - Bouncer/asn1c_defs/GlobalenGNB-ID.h | 46 - Bouncer/asn1c_defs/GlobalgNB-ID.c | 60 - Bouncer/asn1c_defs/GlobalgNB-ID.h | 46 - Bouncer/asn1c_defs/GlobalngeNB-ID.c | 60 - Bouncer/asn1c_defs/GlobalngeNB-ID.h | 46 - Bouncer/asn1c_defs/InitiatingMessage.c | 389 - Bouncer/asn1c_defs/InitiatingMessage.h | 97 - Bouncer/asn1c_defs/NativeEnumerated.c | 367 - Bouncer/asn1c_defs/OCTET_STRING.c | 2409 - Bouncer/asn1c_defs/PLMN-Identity.c | 62 - Bouncer/asn1c_defs/PLMN-Identity.h | 44 - Bouncer/asn1c_defs/Presence.c | 55 - Bouncer/asn1c_defs/Presence.h | 52 - Bouncer/asn1c_defs/ProcedureCode.c | 61 - Bouncer/asn1c_defs/ProcedureCode.h | 53 - Bouncer/asn1c_defs/ProtocolIE-Container.c | 810 - Bouncer/asn1c_defs/ProtocolIE-Container.h | 253 - Bouncer/asn1c_defs/ProtocolIE-ContainerList.c | 9 - Bouncer/asn1c_defs/ProtocolIE-ContainerList.h | 23 - Bouncer/asn1c_defs/ProtocolIE-ContainerPair.c | 9 - Bouncer/asn1c_defs/ProtocolIE-ContainerPair.h | 23 - Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.c | 9 - Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.h | 23 - Bouncer/asn1c_defs/ProtocolIE-Field.c | 7190 -- Bouncer/asn1c_defs/ProtocolIE-Field.h | 757 - Bouncer/asn1c_defs/ProtocolIE-FieldPair.c | 9 - Bouncer/asn1c_defs/ProtocolIE-FieldPair.h | 23 - Bouncer/asn1c_defs/ProtocolIE-ID.c | 61 - Bouncer/asn1c_defs/ProtocolIE-ID.h | 76 - Bouncer/asn1c_defs/ProtocolIE-SingleContainer.c | 147 - Bouncer/asn1c_defs/ProtocolIE-SingleContainer.h | 108 - Bouncer/asn1c_defs/RANfunction-Item.c | 70 - Bouncer/asn1c_defs/RANfunction-Item.h | 46 - Bouncer/asn1c_defs/RANfunctionDefinition.c | 31 - Bouncer/asn1c_defs/RANfunctionDefinition.h | 43 - Bouncer/asn1c_defs/RANfunctionID-Item.c | 60 - Bouncer/asn1c_defs/RANfunctionID-Item.h | 44 - Bouncer/asn1c_defs/RANfunctionID.c | 61 - Bouncer/asn1c_defs/RANfunctionID.h | 44 - Bouncer/asn1c_defs/RANfunctionIDcause-Item.c | 60 - Bouncer/asn1c_defs/RANfunctionIDcause-Item.h | 44 - Bouncer/asn1c_defs/RANfunctionRevision.c | 61 - Bouncer/asn1c_defs/RANfunctionRevision.h | 44 - Bouncer/asn1c_defs/RANfunctions-List.c | 50 - Bouncer/asn1c_defs/RANfunctions-List.h | 41 - Bouncer/asn1c_defs/RANfunctionsID-List.c | 50 - Bouncer/asn1c_defs/RANfunctionsID-List.h | 41 - Bouncer/asn1c_defs/RANfunctionsIDcause-List.c | 50 - Bouncer/asn1c_defs/RANfunctionsIDcause-List.h | 41 - Bouncer/asn1c_defs/RANparameter-ID.c | 61 - Bouncer/asn1c_defs/RANparameter-ID.h | 44 - Bouncer/asn1c_defs/RANparameter-Item.c | 80 - Bouncer/asn1c_defs/RANparameter-Item.h | 50 - Bouncer/asn1c_defs/RANparameter-Name.c | 31 - Bouncer/asn1c_defs/RANparameter-Name.h | 43 - Bouncer/asn1c_defs/RANparameter-Test.c | 61 - Bouncer/asn1c_defs/RANparameter-Test.h | 57 - Bouncer/asn1c_defs/RANparameter-Value.c | 31 - Bouncer/asn1c_defs/RANparameter-Value.h | 43 - Bouncer/asn1c_defs/RICaction-Admitted-Item.c | 50 - Bouncer/asn1c_defs/RICaction-Admitted-Item.h | 42 - Bouncer/asn1c_defs/RICaction-Admitted-List.c | 50 - Bouncer/asn1c_defs/RICaction-Admitted-List.h | 41 - Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.c | 60 - Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.h | 44 - Bouncer/asn1c_defs/RICaction-NotAdmitted-List.c | 50 - Bouncer/asn1c_defs/RICaction-NotAdmitted-List.h | 41 - Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.c | 83 - Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.h | 50 - Bouncer/asn1c_defs/RICactionDefinition.c | 31 - Bouncer/asn1c_defs/RICactionDefinition.h | 43 - Bouncer/asn1c_defs/RICactionID.c | 61 - Bouncer/asn1c_defs/RICactionID.h | 44 - Bouncer/asn1c_defs/RICactionType.c | 57 - Bouncer/asn1c_defs/RICactionType.h | 55 - Bouncer/asn1c_defs/RICactions-ToBeSetup-List.c | 50 - Bouncer/asn1c_defs/RICactions-ToBeSetup-List.h | 44 - Bouncer/asn1c_defs/RICcallProcessID.c | 31 - Bouncer/asn1c_defs/RICcallProcessID.h | 43 - Bouncer/asn1c_defs/RICcontrolAckRequest.c | 57 - Bouncer/asn1c_defs/RICcontrolAckRequest.h | 53 - Bouncer/asn1c_defs/RICcontrolAcknowledge.c | 50 - Bouncer/asn1c_defs/RICcontrolAcknowledge.h | 44 - Bouncer/asn1c_defs/RICcontrolFailure.c | 50 - Bouncer/asn1c_defs/RICcontrolFailure.h | 44 - Bouncer/asn1c_defs/RICcontrolHeader.c | 31 - Bouncer/asn1c_defs/RICcontrolHeader.h | 43 - Bouncer/asn1c_defs/RICcontrolMessage.c | 31 - Bouncer/asn1c_defs/RICcontrolMessage.h | 43 - Bouncer/asn1c_defs/RICcontrolOutcome.c | 31 - Bouncer/asn1c_defs/RICcontrolOutcome.h | 43 - Bouncer/asn1c_defs/RICcontrolRequest.c | 50 - Bouncer/asn1c_defs/RICcontrolRequest.h | 44 - Bouncer/asn1c_defs/RICcontrolStatus.c | 57 - Bouncer/asn1c_defs/RICcontrolStatus.h | 53 - Bouncer/asn1c_defs/RICeventTriggerDefinition.c | 31 - Bouncer/asn1c_defs/RICeventTriggerDefinition.h | 43 - Bouncer/asn1c_defs/RICindication.c | 50 - Bouncer/asn1c_defs/RICindication.h | 44 - Bouncer/asn1c_defs/RICindicationHeader.c | 31 - Bouncer/asn1c_defs/RICindicationHeader.h | 43 - Bouncer/asn1c_defs/RICindicationMessage.c | 31 - Bouncer/asn1c_defs/RICindicationMessage.h | 43 - Bouncer/asn1c_defs/RICindicationSN.c | 61 - Bouncer/asn1c_defs/RICindicationSN.h | 43 - Bouncer/asn1c_defs/RICindicationType.c | 55 - Bouncer/asn1c_defs/RICindicationType.h | 52 - Bouncer/asn1c_defs/RICrequestID.c | 120 - Bouncer/asn1c_defs/RICrequestID.h | 45 - Bouncer/asn1c_defs/RICserviceQuery.c | 50 - Bouncer/asn1c_defs/RICserviceQuery.h | 44 - Bouncer/asn1c_defs/RICserviceUpdate.c | 50 - Bouncer/asn1c_defs/RICserviceUpdate.h | 44 - Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.c | 50 - Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.h | 44 - Bouncer/asn1c_defs/RICserviceUpdateFailure.c | 50 - Bouncer/asn1c_defs/RICserviceUpdateFailure.h | 44 - Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.c | 50 - Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.h | 44 - Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.c | 50 - Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.h | 44 - Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.c | 50 - Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.h | 44 - Bouncer/asn1c_defs/RICsubscriptionDetails.c | 60 - Bouncer/asn1c_defs/RICsubscriptionDetails.h | 44 - Bouncer/asn1c_defs/RICsubscriptionFailure.c | 50 - Bouncer/asn1c_defs/RICsubscriptionFailure.h | 44 - Bouncer/asn1c_defs/RICsubscriptionRequest.c | 50 - Bouncer/asn1c_defs/RICsubscriptionRequest.h | 44 - Bouncer/asn1c_defs/RICsubscriptionResponse.c | 50 - Bouncer/asn1c_defs/RICsubscriptionResponse.h | 44 - Bouncer/asn1c_defs/RICsubsequentAction.c | 60 - Bouncer/asn1c_defs/RICsubsequentAction.h | 46 - Bouncer/asn1c_defs/RICsubsequentActionType.c | 55 - Bouncer/asn1c_defs/RICsubsequentActionType.h | 54 - Bouncer/asn1c_defs/RICtimeToWait.c | 87 - Bouncer/asn1c_defs/RICtimeToWait.h | 70 - Bouncer/asn1c_defs/ResetRequest.c | 50 - Bouncer/asn1c_defs/ResetRequest.h | 44 - Bouncer/asn1c_defs/ResetResponse.c | 50 - Bouncer/asn1c_defs/ResetResponse.h | 44 - Bouncer/asn1c_defs/SuccessfulOutcome.c | 359 - Bouncer/asn1c_defs/SuccessfulOutcome.h | 91 - Bouncer/asn1c_defs/TimeToWait.c | 63 - Bouncer/asn1c_defs/TimeToWait.h | 56 - Bouncer/asn1c_defs/TriggeringMessage.c | 55 - Bouncer/asn1c_defs/TriggeringMessage.h | 52 - Bouncer/asn1c_defs/TypeOfError.c | 55 - Bouncer/asn1c_defs/TypeOfError.h | 54 - Bouncer/asn1c_defs/UnsuccessfulOutcome.c | 349 - Bouncer/asn1c_defs/UnsuccessfulOutcome.h | 89 - Bouncer/asn1c_defs/asn_constant.h | 23 - Bouncer/asn1c_defs/constr_CHOICE.c | 1511 - Bouncer/asn1c_defs/pdu_collection.c | 30 - Bouncer/baseimage/Dockerfile | 149 + Bouncer/docs/_static/logo.png | Bin 43935 -> 0 bytes Bouncer/docs/conf.py | 9 - Bouncer/docs/conf.yaml | 3 - Bouncer/docs/e2sm-Bouncer-v001.asn | 215 - Bouncer/docs/favicon.ico | Bin 15086 -> 0 bytes Bouncer/docs/index.rst | 32 - Bouncer/docs/installation-guide.rst | 77 - Bouncer/docs/overview.rst | 38 - Bouncer/docs/release-notes.rst | 88 - Bouncer/docs/requirements-docs.txt | 5 - Bouncer/docs/user-guide.rst | 202 - Bouncer/{asn1c_defs => e2ap/headers}/ANY.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/BIT_STRING.h | 0 Bouncer/e2ap/headers/Cause.h | 68 + Bouncer/e2ap/headers/CauseMisc.h | 58 + Bouncer/e2ap/headers/CauseProtocol.h | 61 + Bouncer/e2ap/headers/CauseRIC.h | 65 + Bouncer/e2ap/headers/CauseRICservice.h | 57 + Bouncer/e2ap/headers/CauseTransport.h | 56 + Bouncer/e2ap/headers/Criticality.h | 54 + .../e2ap/headers/CriticalityDiagnostics-IE-Item.h | 48 + .../e2ap/headers/CriticalityDiagnostics-IE-List.h | 44 + Bouncer/e2ap/headers/CriticalityDiagnostics.h | 54 + Bouncer/e2ap/headers/E2AP-PDU.h | 61 + Bouncer/e2ap/headers/E2setupFailure.h | 42 + Bouncer/e2ap/headers/E2setupRequest.h | 42 + Bouncer/e2ap/headers/E2setupResponse.h | 42 + Bouncer/e2ap/headers/ENB-ID-Choice.h | 60 + Bouncer/e2ap/headers/ENB-ID.h | 61 + Bouncer/e2ap/headers/ENGNB-ID.h | 56 + Bouncer/e2ap/headers/ErrorIndication.h | 42 + Bouncer/e2ap/headers/GNB-CU-UP-ID.h | 46 + Bouncer/e2ap/headers/GNB-DU-ID.h | 46 + Bouncer/e2ap/headers/GNB-ID-Choice.h | 56 + Bouncer/e2ap/headers/GlobalE2node-ID.h | 67 + Bouncer/e2ap/headers/GlobalE2node-eNB-ID.h | 44 + Bouncer/e2ap/headers/GlobalE2node-en-gNB-ID.h | 44 + Bouncer/e2ap/headers/GlobalE2node-gNB-ID.h | 48 + Bouncer/e2ap/headers/GlobalE2node-ng-eNB-ID.h | 44 + Bouncer/e2ap/headers/GlobalENB-ID.h | 46 + Bouncer/e2ap/headers/GlobalRIC-ID.h | 46 + Bouncer/e2ap/headers/GlobalenGNB-ID.h | 46 + Bouncer/e2ap/headers/GlobalgNB-ID.h | 46 + Bouncer/e2ap/headers/GlobalngeNB-ID.h | 46 + Bouncer/{asn1c_defs => e2ap/headers}/INTEGER.h | 0 Bouncer/e2ap/headers/InitiatingMessage.h | 97 + .../headers}/NativeEnumerated.h | 0 .../{asn1c_defs => e2ap/headers}/NativeInteger.h | 0 .../{asn1c_defs => e2ap/headers}/OCTET_STRING.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/OPEN_TYPE.h | 0 Bouncer/e2ap/headers/PLMN-Identity.h | 46 + Bouncer/e2ap/headers/Presence.h | 54 + Bouncer/e2ap/headers/ProcedureCode.h | 55 + Bouncer/e2ap/headers/ProtocolIE-Container.h | 253 + Bouncer/e2ap/headers/ProtocolIE-ContainerList.h | 23 + Bouncer/e2ap/headers/ProtocolIE-ContainerPair.h | 23 + .../e2ap/headers/ProtocolIE-ContainerPairList.h | 23 + Bouncer/e2ap/headers/ProtocolIE-Field.h | 757 + Bouncer/e2ap/headers/ProtocolIE-FieldPair.h | 23 + Bouncer/e2ap/headers/ProtocolIE-ID.h | 78 + Bouncer/e2ap/headers/ProtocolIE-SingleContainer.h | 120 + Bouncer/e2ap/headers/RANfunction-Item.h | 48 + Bouncer/e2ap/headers/RANfunctionDefinition.h | 45 + Bouncer/e2ap/headers/RANfunctionID-Item.h | 46 + Bouncer/e2ap/headers/RANfunctionID.h | 46 + Bouncer/e2ap/headers/RANfunctionIDcause-Item.h | 46 + Bouncer/e2ap/headers/RANfunctionRevision.h | 46 + Bouncer/e2ap/headers/RANfunctions-List.h | 44 + Bouncer/e2ap/headers/RANfunctionsID-List.h | 44 + Bouncer/e2ap/headers/RANfunctionsIDcause-List.h | 44 + Bouncer/e2ap/headers/RICaction-Admitted-Item.h | 44 + Bouncer/e2ap/headers/RICaction-Admitted-List.h | 44 + Bouncer/e2ap/headers/RICaction-NotAdmitted-Item.h | 46 + Bouncer/e2ap/headers/RICaction-NotAdmitted-List.h | 44 + Bouncer/e2ap/headers/RICaction-ToBeSetup-Item.h | 52 + Bouncer/e2ap/headers/RICactionDefinition.h | 45 + Bouncer/e2ap/headers/RICactionID.h | 46 + Bouncer/e2ap/headers/RICactionType.h | 57 + Bouncer/e2ap/headers/RICactions-ToBeSetup-List.h | 44 + Bouncer/e2ap/headers/RICcallProcessID.h | 45 + Bouncer/e2ap/headers/RICcontrolAckRequest.h | 57 + Bouncer/e2ap/headers/RICcontrolAcknowledge.h | 42 + Bouncer/e2ap/headers/RICcontrolFailure.h | 42 + Bouncer/e2ap/headers/RICcontrolHeader.h | 45 + Bouncer/e2ap/headers/RICcontrolMessage.h | 45 + Bouncer/e2ap/headers/RICcontrolOutcome.h | 45 + Bouncer/e2ap/headers/RICcontrolRequest.h | 42 + Bouncer/e2ap/headers/RICcontrolStatus.h | 57 + Bouncer/e2ap/headers/RICeventTriggerDefinition.h | 45 + Bouncer/e2ap/headers/RICindication.h | 42 + Bouncer/e2ap/headers/RICindicationHeader.h | 45 + Bouncer/e2ap/headers/RICindicationMessage.h | 45 + Bouncer/e2ap/headers/RICindicationSN.h | 46 + Bouncer/e2ap/headers/RICindicationType.h | 56 + Bouncer/e2ap/headers/RICrequestID.h | 45 + Bouncer/e2ap/headers/RICserviceQuery.h | 42 + Bouncer/e2ap/headers/RICserviceUpdate.h | 42 + Bouncer/e2ap/headers/RICserviceUpdateAcknowledge.h | 42 + Bouncer/e2ap/headers/RICserviceUpdateFailure.h | 42 + .../e2ap/headers/RICsubscriptionDeleteFailure.h | 42 + .../e2ap/headers/RICsubscriptionDeleteRequest.h | 42 + .../e2ap/headers/RICsubscriptionDeleteResponse.h | 42 + Bouncer/e2ap/headers/RICsubscriptionDetails.h | 46 + Bouncer/e2ap/headers/RICsubscriptionFailure.h | 42 + Bouncer/e2ap/headers/RICsubscriptionRequest.h | 42 + Bouncer/e2ap/headers/RICsubscriptionResponse.h | 42 + Bouncer/e2ap/headers/RICsubsequentAction.h | 46 + Bouncer/e2ap/headers/RICsubsequentActionType.h | 56 + Bouncer/e2ap/headers/RICtimeToWait.h | 72 + Bouncer/e2ap/headers/ResetRequest.h | 42 + Bouncer/e2ap/headers/ResetResponse.h | 42 + Bouncer/e2ap/headers/SuccessfulOutcome.h | 91 + Bouncer/e2ap/headers/TimeToWait.h | 60 + Bouncer/e2ap/headers/TriggeringMessage.h | 54 + Bouncer/e2ap/headers/TypeOfError.h | 56 + Bouncer/e2ap/headers/UnsuccessfulOutcome.h | 89 + .../{asn1c_defs => e2ap/headers}/asn_SEQUENCE_OF.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/asn_SET_OF.h | 0 .../{asn1c_defs => e2ap/headers}/asn_application.h | 0 .../{asn1c_defs => e2ap/headers}/asn_bit_data.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/asn_codecs.h | 0 .../{asn1c_defs => e2ap/headers}/asn_codecs_prim.h | 0 Bouncer/e2ap/headers/asn_constant.h | 22 + .../{asn1c_defs => e2ap/headers}/asn_internal.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/asn_ioc.h | 0 .../{asn1c_defs => e2ap/headers}/asn_random_fill.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/asn_system.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/ber_decoder.h | 0 .../{asn1c_defs => e2ap/headers}/ber_tlv_length.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/ber_tlv_tag.h | 0 .../{asn1c_defs => e2ap/headers}/constr_CHOICE.h | 0 .../{asn1c_defs => e2ap/headers}/constr_SEQUENCE.h | 0 .../headers}/constr_SEQUENCE_OF.h | 0 .../{asn1c_defs => e2ap/headers}/constr_SET_OF.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/constr_TYPE.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/constraints.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/der_encoder.h | 0 Bouncer/e2ap/headers/oer_decoder.h | 72 + Bouncer/e2ap/headers/oer_encoder.h | 70 + Bouncer/e2ap/headers/oer_support.h | 47 + Bouncer/{asn1c_defs => e2ap/headers}/per_decoder.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/per_encoder.h | 0 .../{asn1c_defs => e2ap/headers}/per_opentype.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/per_support.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/xer_decoder.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/xer_encoder.h | 0 Bouncer/{asn1c_defs => e2ap/headers}/xer_support.h | 0 Bouncer/{asn1c_defs => e2ap/lib}/ANY.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/BIT_STRING.c | 0 Bouncer/e2ap/lib/BIT_STRING_oer.c | 174 + Bouncer/e2ap/lib/Cause.c | 95 + Bouncer/e2ap/lib/CauseMisc.c | 62 + Bouncer/e2ap/lib/CauseProtocol.c | 68 + Bouncer/e2ap/lib/CauseRIC.c | 76 + Bouncer/e2ap/lib/CauseRICservice.c | 60 + Bouncer/e2ap/lib/CauseTransport.c | 58 + Bouncer/e2ap/lib/Criticality.c | 58 + Bouncer/e2ap/lib/CriticalityDiagnostics-IE-Item.c | 70 + Bouncer/e2ap/lib/CriticalityDiagnostics-IE-List.c | 53 + Bouncer/e2ap/lib/CriticalityDiagnostics.c | 94 + Bouncer/e2ap/lib/E2AP-PDU.c | 78 + Bouncer/e2ap/lib/E2setupFailure.c | 50 + Bouncer/e2ap/lib/E2setupRequest.c | 50 + Bouncer/e2ap/lib/E2setupResponse.c | 50 + Bouncer/e2ap/lib/ENB-ID-Choice.c | 192 + Bouncer/e2ap/lib/ENB-ID.c | 241 + Bouncer/e2ap/lib/ENGNB-ID.c | 94 + Bouncer/e2ap/lib/ErrorIndication.c | 50 + Bouncer/e2ap/lib/GNB-CU-UP-ID.c | 70 + Bouncer/e2ap/lib/GNB-DU-ID.c | 70 + Bouncer/e2ap/lib/GNB-ID-Choice.c | 94 + Bouncer/e2ap/lib/GlobalE2node-ID.c | 89 + Bouncer/e2ap/lib/GlobalE2node-eNB-ID.c | 50 + Bouncer/e2ap/lib/GlobalE2node-en-gNB-ID.c | 50 + Bouncer/e2ap/lib/GlobalE2node-gNB-ID.c | 72 + Bouncer/e2ap/lib/GlobalE2node-ng-eNB-ID.c | 50 + Bouncer/e2ap/lib/GlobalENB-ID.c | 60 + Bouncer/e2ap/lib/GlobalRIC-ID.c | 99 + Bouncer/e2ap/lib/GlobalenGNB-ID.c | 60 + Bouncer/e2ap/lib/GlobalgNB-ID.c | 60 + Bouncer/e2ap/lib/GlobalngeNB-ID.c | 60 + Bouncer/{asn1c_defs => e2ap/lib}/INTEGER.c | 0 Bouncer/e2ap/lib/INTEGER_oer.c | 179 + Bouncer/e2ap/lib/InitiatingMessage.c | 398 + Bouncer/e2ap/lib/NativeEnumerated.c | 367 + Bouncer/e2ap/lib/NativeEnumerated_oer.c | 149 + Bouncer/{asn1c_defs => e2ap/lib}/NativeInteger.c | 0 Bouncer/e2ap/lib/NativeInteger_oer.c | 99 + Bouncer/e2ap/lib/OCTET_STRING.c | 2411 + Bouncer/e2ap/lib/OCTET_STRING_oer.c | 171 + Bouncer/{asn1c_defs => e2ap/lib}/OPEN_TYPE.c | 0 Bouncer/e2ap/lib/OPEN_TYPE_oer.c | 92 + Bouncer/e2ap/lib/PLMN-Identity.c | 65 + Bouncer/e2ap/lib/Presence.c | 58 + Bouncer/e2ap/lib/ProcedureCode.c | 64 + Bouncer/e2ap/lib/ProtocolIE-Container.c | 870 + Bouncer/e2ap/lib/ProtocolIE-ContainerList.c | 9 + Bouncer/e2ap/lib/ProtocolIE-ContainerPair.c | 9 + Bouncer/e2ap/lib/ProtocolIE-ContainerPairList.c | 9 + Bouncer/e2ap/lib/ProtocolIE-Field.c | 7398 ++ Bouncer/e2ap/lib/ProtocolIE-FieldPair.c | 9 + Bouncer/e2ap/lib/ProtocolIE-ID.c | 64 + Bouncer/e2ap/lib/ProtocolIE-SingleContainer.c | 147 + Bouncer/e2ap/lib/RANfunction-Item.c | 70 + Bouncer/e2ap/lib/RANfunctionDefinition.c | 31 + Bouncer/e2ap/lib/RANfunctionID-Item.c | 60 + Bouncer/e2ap/lib/RANfunctionID.c | 64 + Bouncer/e2ap/lib/RANfunctionIDcause-Item.c | 60 + Bouncer/e2ap/lib/RANfunctionRevision.c | 64 + Bouncer/e2ap/lib/RANfunctions-List.c | 53 + Bouncer/e2ap/lib/RANfunctionsID-List.c | 53 + Bouncer/e2ap/lib/RANfunctionsIDcause-List.c | 53 + Bouncer/e2ap/lib/RICaction-Admitted-Item.c | 50 + Bouncer/e2ap/lib/RICaction-Admitted-List.c | 53 + Bouncer/e2ap/lib/RICaction-NotAdmitted-Item.c | 60 + Bouncer/e2ap/lib/RICaction-NotAdmitted-List.c | 53 + Bouncer/e2ap/lib/RICaction-ToBeSetup-Item.c | 83 + Bouncer/e2ap/lib/RICactionDefinition.c | 31 + Bouncer/e2ap/lib/RICactionID.c | 64 + Bouncer/e2ap/lib/RICactionType.c | 60 + Bouncer/e2ap/lib/RICactions-ToBeSetup-List.c | 53 + Bouncer/e2ap/lib/RICcallProcessID.c | 31 + Bouncer/e2ap/lib/RICcontrolAckRequest.c | 60 + Bouncer/e2ap/lib/RICcontrolAcknowledge.c | 50 + Bouncer/e2ap/lib/RICcontrolFailure.c | 50 + Bouncer/e2ap/lib/RICcontrolHeader.c | 31 + Bouncer/e2ap/lib/RICcontrolMessage.c | 31 + Bouncer/e2ap/lib/RICcontrolOutcome.c | 31 + Bouncer/e2ap/lib/RICcontrolRequest.c | 50 + Bouncer/e2ap/lib/RICcontrolStatus.c | 60 + Bouncer/e2ap/lib/RICeventTriggerDefinition.c | 31 + Bouncer/e2ap/lib/RICindication.c | 50 + Bouncer/e2ap/lib/RICindicationHeader.c | 31 + Bouncer/e2ap/lib/RICindicationMessage.c | 31 + Bouncer/e2ap/lib/RICindicationSN.c | 64 + Bouncer/e2ap/lib/RICindicationType.c | 58 + Bouncer/e2ap/lib/RICrequestID.c | 126 + Bouncer/e2ap/lib/RICserviceQuery.c | 50 + Bouncer/e2ap/lib/RICserviceUpdate.c | 50 + Bouncer/e2ap/lib/RICserviceUpdateAcknowledge.c | 50 + Bouncer/e2ap/lib/RICserviceUpdateFailure.c | 50 + Bouncer/e2ap/lib/RICsubscriptionDeleteFailure.c | 50 + Bouncer/e2ap/lib/RICsubscriptionDeleteRequest.c | 50 + Bouncer/e2ap/lib/RICsubscriptionDeleteResponse.c | 50 + Bouncer/e2ap/lib/RICsubscriptionDetails.c | 60 + Bouncer/e2ap/lib/RICsubscriptionFailure.c | 50 + Bouncer/e2ap/lib/RICsubscriptionRequest.c | 50 + Bouncer/e2ap/lib/RICsubscriptionResponse.c | 50 + Bouncer/e2ap/lib/RICsubsequentAction.c | 60 + Bouncer/e2ap/lib/RICsubsequentActionType.c | 58 + Bouncer/e2ap/lib/RICtimeToWait.c | 90 + Bouncer/e2ap/lib/ResetRequest.c | 50 + Bouncer/e2ap/lib/ResetResponse.c | 50 + Bouncer/e2ap/lib/SuccessfulOutcome.c | 368 + Bouncer/e2ap/lib/TimeToWait.c | 66 + Bouncer/e2ap/lib/TriggeringMessage.c | 58 + Bouncer/e2ap/lib/TypeOfError.c | 58 + Bouncer/e2ap/lib/UnsuccessfulOutcome.c | 358 + Bouncer/{asn1c_defs => e2ap/lib}/asn_SEQUENCE_OF.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/asn_SET_OF.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/asn_application.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/asn_bit_data.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/asn_codecs_prim.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/asn_internal.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/asn_random_fill.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/ber_decoder.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/ber_tlv_length.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/ber_tlv_tag.c | 0 Bouncer/e2ap/lib/constr_CHOICE.c | 1533 + Bouncer/e2ap/lib/constr_CHOICE_oer.c | 380 + Bouncer/{asn1c_defs => e2ap/lib}/constr_SEQUENCE.c | 0 .../{asn1c_defs => e2ap/lib}/constr_SEQUENCE_OF.c | 0 Bouncer/e2ap/lib/constr_SEQUENCE_oer.c | 561 + Bouncer/{asn1c_defs => e2ap/lib}/constr_SET_OF.c | 0 Bouncer/e2ap/lib/constr_SET_OF_oer.c | 285 + Bouncer/{asn1c_defs => e2ap/lib}/constr_TYPE.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/constraints.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/der_encoder.c | 0 Bouncer/e2ap/lib/oer_decoder.c | 152 + Bouncer/e2ap/lib/oer_encoder.c | 141 + Bouncer/e2ap/lib/oer_support.c | 122 + Bouncer/{asn1c_defs => e2ap/lib}/per_decoder.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/per_encoder.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/per_opentype.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/per_support.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/xer_decoder.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/xer_encoder.c | 0 Bouncer/{asn1c_defs => e2ap/lib}/xer_support.c | 0 Bouncer/e2ap/wrapper.c | 1069 + Bouncer/e2ap/wrapper.h | 136 + Bouncer/e2sm_kpm/headers/AMF-UE-NGAP-ID.h | 44 + Bouncer/e2sm_kpm/headers/AMFPointer.h | 44 + Bouncer/e2sm_kpm/headers/AMFRegionID.h | 44 + Bouncer/e2sm_kpm/headers/AMFSetID.h | 44 + Bouncer/e2sm_kpm/headers/ANY.h | 65 + Bouncer/e2sm_kpm/headers/BIT_STRING.h | 48 + Bouncer/e2sm_kpm/headers/BMPString.h | 39 + Bouncer/{asn1c_defs => e2sm_kpm/headers}/BOOLEAN.h | 0 Bouncer/e2sm_kpm/headers/C-RNTI.h | 46 + Bouncer/e2sm_kpm/headers/CGI.h | 61 + .../CU-CP-Usage-Report-CellResourceReportItem.h | 55 + .../e2sm_kpm/headers/CU-CP-Usage-Report-Per-UE.h | 53 + .../CU-CP-Usage-Report-UeResourceReportItem.h | 47 + .../CU-UP-Usage-Report-CellResourceReportItem.h | 55 + .../e2sm_kpm/headers/CU-UP-Usage-Report-Per-UE.h | 53 + .../CU-UP-Usage-Report-UeResourceReportItem.h | 47 + .../e2sm_kpm/headers/CUUPMeasurement-Container.h | 53 + .../e2sm_kpm/headers/CellResourceReportListItem.h | 58 + Bouncer/e2sm_kpm/headers/CoreCPID.h | 58 + .../DU-Usage-Report-CellResourceReportItem.h | 55 + Bouncer/e2sm_kpm/headers/DU-Usage-Report-Per-UE.h | 53 + .../headers/DU-Usage-Report-UeResourceReportItem.h | 47 + Bouncer/e2sm_kpm/headers/E-UTRA-ARFCN.h | 44 + Bouncer/e2sm_kpm/headers/E-UTRA-PCI.h | 44 + Bouncer/e2sm_kpm/headers/E-UTRA-TAC.h | 43 + .../headers/E2SM-KPM-ActionDefinition-Format1.h | 50 + .../headers/E2SM-KPM-ActionDefinition-Format2.h | 46 + .../headers/E2SM-KPM-ActionDefinition-Format3.h | 50 + .../e2sm_kpm/headers/E2SM-KPM-ActionDefinition.h | 73 + .../E2SM-KPM-EventTriggerDefinition-Format1.h | 45 + .../headers/E2SM-KPM-EventTriggerDefinition.h | 65 + .../headers/E2SM-KPM-IndicationHeader-Format1.h | 49 + .../e2sm_kpm/headers/E2SM-KPM-IndicationHeader.h | 65 + .../headers/E2SM-KPM-IndicationMessage-Format1.h | 50 + .../headers/E2SM-KPM-IndicationMessage-Format2.h | 48 + .../e2sm_kpm/headers/E2SM-KPM-IndicationMessage.h | 68 + .../headers/E2SM-KPM-RANfunction-Description.h | 60 + Bouncer/e2sm_kpm/headers/EN-GNB-ID.h | 56 + Bouncer/e2sm_kpm/headers/ENB-ID-Choice.h | 60 + Bouncer/e2sm_kpm/headers/ENB-ID.h | 61 + .../e2sm_kpm/headers/ENB-UE-X2AP-ID-Extension.h | 44 + Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID.h | 44 + Bouncer/e2sm_kpm/headers/ENGNB-ID.h | 56 + Bouncer/e2sm_kpm/headers/ENUMERATED.h | 40 + Bouncer/e2sm_kpm/headers/EPC-CUUP-PM-Format.h | 53 + Bouncer/e2sm_kpm/headers/EPC-DU-PM-Container.h | 53 + Bouncer/e2sm_kpm/headers/EUTRA-CGI.h | 46 + Bouncer/e2sm_kpm/headers/EUTRACellIdentity.h | 44 + Bouncer/e2sm_kpm/headers/FGC-CUUP-PM-Format.h | 53 + Bouncer/e2sm_kpm/headers/FGC-DU-PM-Container.h | 53 + .../e2sm_kpm/headers/FQIPERSlicesPerPlmnListItem.h | 47 + .../headers/FQIPERSlicesPerPlmnPerCellListItem.h | 46 + Bouncer/e2sm_kpm/headers/FiveGS-TAC.h | 43 + Bouncer/e2sm_kpm/headers/FiveQI.h | 44 + Bouncer/e2sm_kpm/headers/FreqBandNrItem.h | 42 + Bouncer/e2sm_kpm/headers/GNB-CU-CP-Name.h | 46 + Bouncer/e2sm_kpm/headers/GNB-CU-CP-UE-E1AP-ID.h | 45 + Bouncer/e2sm_kpm/headers/GNB-CU-UE-F1AP-ID.h | 45 + Bouncer/e2sm_kpm/headers/GNB-CU-UP-ID.h | 44 + Bouncer/e2sm_kpm/headers/GNB-CU-UP-Name.h | 46 + Bouncer/e2sm_kpm/headers/GNB-DU-ID.h | 44 + Bouncer/e2sm_kpm/headers/GNB-DU-Name.h | 46 + Bouncer/e2sm_kpm/headers/GNB-ID-Choice.h | 56 + Bouncer/e2sm_kpm/headers/GNB-ID.h | 56 + Bouncer/e2sm_kpm/headers/GNB-Name.h | 62 + Bouncer/e2sm_kpm/headers/GUAMI.h | 50 + Bouncer/e2sm_kpm/headers/GUMMEI.h | 48 + Bouncer/e2sm_kpm/headers/GeneralString.h | 36 + Bouncer/e2sm_kpm/headers/GeneralizedTime.h | 80 + Bouncer/e2sm_kpm/headers/GlobalENB-ID.h | 46 + Bouncer/e2sm_kpm/headers/GlobalGNB-ID.h | 46 + Bouncer/e2sm_kpm/headers/GlobalKPMnode-ID.h | 67 + Bouncer/e2sm_kpm/headers/GlobalKPMnode-eNB-ID.h | 44 + Bouncer/e2sm_kpm/headers/GlobalKPMnode-en-gNB-ID.h | 44 + Bouncer/e2sm_kpm/headers/GlobalKPMnode-gNB-ID.h | 48 + Bouncer/e2sm_kpm/headers/GlobalKPMnode-ng-eNB-ID.h | 44 + Bouncer/e2sm_kpm/headers/GlobalNGRANNodeID.h | 61 + Bouncer/e2sm_kpm/headers/GlobalNgENB-ID.h | 46 + Bouncer/e2sm_kpm/headers/GlobalenGNB-ID.h | 46 + Bouncer/e2sm_kpm/headers/GlobalgNB-ID.h | 46 + Bouncer/e2sm_kpm/headers/GlobalngeNB-ID.h | 46 + Bouncer/e2sm_kpm/headers/GranularityPeriod.h | 45 + Bouncer/e2sm_kpm/headers/GraphicString.h | 36 + Bouncer/e2sm_kpm/headers/GroupID.h | 56 + Bouncer/e2sm_kpm/headers/IA5String.h | 40 + Bouncer/e2sm_kpm/headers/INTEGER.h | 108 + Bouncer/e2sm_kpm/headers/ISO646String.h | 37 + Bouncer/e2sm_kpm/headers/IndexToRFSP.h | 43 + Bouncer/e2sm_kpm/headers/Interface-MessageID.h | 55 + Bouncer/e2sm_kpm/headers/InterfaceID-E1.h | 46 + Bouncer/e2sm_kpm/headers/InterfaceID-F1.h | 46 + Bouncer/e2sm_kpm/headers/InterfaceID-NG.h | 44 + Bouncer/e2sm_kpm/headers/InterfaceID-S1.h | 44 + Bouncer/e2sm_kpm/headers/InterfaceID-W1.h | 46 + Bouncer/e2sm_kpm/headers/InterfaceID-X2.h | 70 + Bouncer/e2sm_kpm/headers/InterfaceID-Xn.h | 44 + Bouncer/e2sm_kpm/headers/InterfaceIdentifier.h | 73 + Bouncer/e2sm_kpm/headers/InterfaceType.h | 57 + Bouncer/e2sm_kpm/headers/LabelInfoItem.h | 44 + Bouncer/e2sm_kpm/headers/LabelInfoList.h | 44 + Bouncer/e2sm_kpm/headers/MME-Code.h | 44 + Bouncer/e2sm_kpm/headers/MME-Group-ID.h | 44 + Bouncer/e2sm_kpm/headers/MME-UE-S1AP-ID.h | 45 + Bouncer/e2sm_kpm/headers/MatchingCondItem.h | 61 + Bouncer/e2sm_kpm/headers/MatchingCondList.h | 44 + Bouncer/e2sm_kpm/headers/MatchingUEidItem.h | 44 + Bouncer/e2sm_kpm/headers/MatchingUEidList.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementCondItem.h | 46 + Bouncer/e2sm_kpm/headers/MeasurementCondList.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementCondUEidItem.h | 50 + Bouncer/e2sm_kpm/headers/MeasurementCondUEidList.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementData.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementDataItem.h | 55 + .../e2sm_kpm/headers/MeasurementInfo-Action-Item.h | 46 + .../e2sm_kpm/headers/MeasurementInfo-Action-List.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementInfoItem.h | 46 + Bouncer/e2sm_kpm/headers/MeasurementInfoList.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementLabel.h | 124 + Bouncer/e2sm_kpm/headers/MeasurementRecord.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementRecordItem.h | 63 + Bouncer/e2sm_kpm/headers/MeasurementType.h | 59 + Bouncer/e2sm_kpm/headers/MeasurementTypeID.h | 44 + Bouncer/e2sm_kpm/headers/MeasurementTypeName.h | 44 + Bouncer/e2sm_kpm/headers/NG-RANnodeUEXnAPID.h | 45 + Bouncer/e2sm_kpm/headers/NGENB-CU-UE-W1AP-ID.h | 45 + Bouncer/e2sm_kpm/headers/NGENB-DU-ID.h | 44 + Bouncer/e2sm_kpm/headers/NI-Type.h | 57 + Bouncer/e2sm_kpm/headers/NR-ARFCN.h | 44 + Bouncer/e2sm_kpm/headers/NR-CGI.h | 46 + Bouncer/e2sm_kpm/headers/NR-PCI.h | 44 + Bouncer/e2sm_kpm/headers/NRCGI.h | 42 + Bouncer/e2sm_kpm/headers/NRCellIdentity.h | 44 + Bouncer/e2sm_kpm/headers/NRFrequencyBand-List.h | 44 + Bouncer/e2sm_kpm/headers/NRFrequencyBandItem.h | 46 + Bouncer/e2sm_kpm/headers/NRFrequencyInfo.h | 46 + Bouncer/e2sm_kpm/headers/NRFrequencyShift7p5khz.h | 54 + Bouncer/{asn1c_defs => e2sm_kpm/headers}/NULL.h | 0 Bouncer/e2sm_kpm/headers/NativeEnumerated.h | 45 + Bouncer/e2sm_kpm/headers/NativeInteger.h | 46 + Bouncer/e2sm_kpm/headers/NativeReal.h | 48 + Bouncer/e2sm_kpm/headers/NgENB-ID.h | 60 + Bouncer/e2sm_kpm/headers/NumericString.h | 37 + .../headers}/OBJECT_IDENTIFIER.h | 0 Bouncer/e2sm_kpm/headers/OCTET_STRING.h | 102 + Bouncer/e2sm_kpm/headers/OCUCP-PF-Container.h | 47 + Bouncer/e2sm_kpm/headers/OCUUP-PF-Container.h | 55 + Bouncer/e2sm_kpm/headers/ODU-PF-Container.h | 53 + Bouncer/e2sm_kpm/headers/OPEN_TYPE.h | 77 + Bouncer/e2sm_kpm/headers/ObjectDescriptor.h | 35 + Bouncer/e2sm_kpm/headers/PF-Container.h | 64 + Bouncer/e2sm_kpm/headers/PF-ContainerListItem.h | 46 + Bouncer/e2sm_kpm/headers/PLMN-Identity.h | 46 + Bouncer/e2sm_kpm/headers/PLMNIdentity.h | 44 + Bouncer/e2sm_kpm/headers/PM-Containers-List.h | 48 + Bouncer/e2sm_kpm/headers/PerQCIReportListItem.h | 46 + .../e2sm_kpm/headers/PerQCIReportListItemFormat.h | 47 + Bouncer/e2sm_kpm/headers/PlmnID-List.h | 50 + .../headers}/PrintableString.h | 0 Bouncer/e2sm_kpm/headers/QCI.h | 44 + Bouncer/e2sm_kpm/headers/QoSID.h | 56 + Bouncer/e2sm_kpm/headers/QosFlowIdentifier.h | 44 + Bouncer/e2sm_kpm/headers/RAN-Container.h | 75 + Bouncer/e2sm_kpm/headers/RANUEID.h | 44 + .../e2sm_kpm/headers/RANcallProcess-ID-string.h | 45 + Bouncer/e2sm_kpm/headers/RANfunction-Name.h | 48 + Bouncer/e2sm_kpm/headers/REAL.h | 67 + Bouncer/e2sm_kpm/headers/RELATIVE-OID.h | 53 + .../e2sm_kpm/headers/RIC-EventTriggerStyle-Item.h | 48 + .../e2sm_kpm/headers/RIC-EventTriggerStyle-List.h | 48 + Bouncer/e2sm_kpm/headers/RIC-Format-Type.h | 43 + Bouncer/e2sm_kpm/headers/RIC-ReportStyle-Item.h | 52 + Bouncer/e2sm_kpm/headers/RIC-ReportStyle-List.h | 49 + Bouncer/e2sm_kpm/headers/RIC-Style-Name.h | 44 + Bouncer/e2sm_kpm/headers/RIC-Style-Type.h | 43 + Bouncer/e2sm_kpm/headers/RRC-MessageID.h | 68 + Bouncer/e2sm_kpm/headers/RRCclass-LTE.h | 64 + Bouncer/e2sm_kpm/headers/RRCclass-NR.h | 60 + Bouncer/e2sm_kpm/headers/RT-Period-IE.h | 74 + Bouncer/e2sm_kpm/headers/S-NSSAI.h | 46 + Bouncer/e2sm_kpm/headers/SD.h | 44 + Bouncer/e2sm_kpm/headers/SNSSAI.h | 41 + Bouncer/e2sm_kpm/headers/SST.h | 44 + .../e2sm_kpm/headers/ServedPlmnPerCellListItem.h | 50 + Bouncer/e2sm_kpm/headers/ServingCell-ARFCN.h | 58 + Bouncer/e2sm_kpm/headers/ServingCell-PCI.h | 56 + .../e2sm_kpm/headers/SlicePerPlmnPerCellListItem.h | 55 + Bouncer/e2sm_kpm/headers/SliceToReportListItem.h | 55 + .../e2sm_kpm/headers/SubscriberProfileIDforRFP.h | 43 + Bouncer/e2sm_kpm/headers/SupportedSULBandList.h | 44 + .../e2sm_kpm/headers/SupportedSULFreqBandItem.h | 44 + Bouncer/e2sm_kpm/headers/T61String.h | 36 + Bouncer/e2sm_kpm/headers/TeletexString.h | 36 + Bouncer/e2sm_kpm/headers/TestCond-Expression.h | 57 + Bouncer/e2sm_kpm/headers/TestCond-Type.h | 108 + Bouncer/e2sm_kpm/headers/TestCond-Value.h | 70 + Bouncer/e2sm_kpm/headers/TestCondInfo.h | 48 + Bouncer/e2sm_kpm/headers/TimeStamp.h | 44 + Bouncer/e2sm_kpm/headers/Timestamp.h | 45 + .../e2sm_kpm/headers/Trigger-ConditionIE-Item.h | 44 + Bouncer/e2sm_kpm/headers/UE-Report-Type.h | 57 + Bouncer/e2sm_kpm/headers/UEID-EN-GNB.h | 56 + Bouncer/e2sm_kpm/headers/UEID-ENB.h | 54 + .../e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h | 44 + .../e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h | 44 + .../e2sm_kpm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h | 44 + .../e2sm_kpm/headers/UEID-GNB-CU-F1AP-ID-List.h | 44 + Bouncer/e2sm_kpm/headers/UEID-GNB-CU-UP.h | 46 + Bouncer/e2sm_kpm/headers/UEID-GNB-DU.h | 46 + Bouncer/e2sm_kpm/headers/UEID-GNB.h | 60 + Bouncer/e2sm_kpm/headers/UEID-NG-ENB-DU.h | 44 + Bouncer/e2sm_kpm/headers/UEID-NG-ENB.h | 56 + Bouncer/e2sm_kpm/headers/UEID.h | 76 + Bouncer/e2sm_kpm/headers/UTCTime.h | 50 + Bouncer/e2sm_kpm/headers/UTF8String.h | 63 + Bouncer/e2sm_kpm/headers/UniversalString.h | 38 + Bouncer/e2sm_kpm/headers/VideotexString.h | 36 + Bouncer/e2sm_kpm/headers/VisibleString.h | 38 + Bouncer/e2sm_kpm/headers/asn_SEQUENCE_OF.h | 52 + Bouncer/e2sm_kpm/headers/asn_SET_OF.h | 72 + Bouncer/e2sm_kpm/headers/asn_application.h | 171 + Bouncer/e2sm_kpm/headers/asn_bit_data.h | 83 + Bouncer/e2sm_kpm/headers/asn_codecs.h | 108 + Bouncer/e2sm_kpm/headers/asn_codecs_prim.h | 51 + Bouncer/e2sm_kpm/headers/asn_constant.h | 31 + Bouncer/e2sm_kpm/headers/asn_internal.h | 159 + Bouncer/e2sm_kpm/headers/asn_ioc.h | 51 + Bouncer/e2sm_kpm/headers/asn_random_fill.h | 51 + Bouncer/e2sm_kpm/headers/asn_system.h | 150 + Bouncer/e2sm_kpm/headers/ber_decoder.h | 66 + Bouncer/e2sm_kpm/headers/ber_tlv_length.h | 50 + Bouncer/e2sm_kpm/headers/ber_tlv_tag.h | 60 + Bouncer/e2sm_kpm/headers/constr_CHOICE.h | 80 + Bouncer/e2sm_kpm/headers/constr_SEQUENCE.h | 68 + Bouncer/e2sm_kpm/headers/constr_SEQUENCE_OF.h | 41 + Bouncer/e2sm_kpm/headers/constr_SET.h | 87 + Bouncer/e2sm_kpm/headers/constr_SET_OF.h | 49 + Bouncer/e2sm_kpm/headers/constr_TYPE.h | 262 + Bouncer/e2sm_kpm/headers/constraints.h | 62 + Bouncer/e2sm_kpm/headers/der_encoder.h | 68 + Bouncer/e2sm_kpm/headers/oer_decoder.h | 72 + Bouncer/e2sm_kpm/headers/oer_encoder.h | 70 + Bouncer/e2sm_kpm/headers/oer_support.h | 47 + Bouncer/e2sm_kpm/headers/per_decoder.h | 82 + Bouncer/e2sm_kpm/headers/per_encoder.h | 93 + Bouncer/e2sm_kpm/headers/per_opentype.h | 44 + Bouncer/e2sm_kpm/headers/per_support.h | 127 + Bouncer/e2sm_kpm/headers/xer_decoder.h | 106 + Bouncer/e2sm_kpm/headers/xer_encoder.h | 83 + Bouncer/e2sm_kpm/headers/xer_support.h | 55 + Bouncer/e2sm_kpm/lib/AMF-UE-NGAP-ID.c | 67 + Bouncer/e2sm_kpm/lib/AMFPointer.c | 67 + Bouncer/e2sm_kpm/lib/AMFRegionID.c | 67 + Bouncer/e2sm_kpm/lib/AMFSetID.c | 67 + Bouncer/e2sm_kpm/lib/ANY.c | 450 + Bouncer/e2sm_kpm/lib/BIT_STRING.c | 656 + Bouncer/e2sm_kpm/lib/BIT_STRING_oer.c | 174 + Bouncer/e2sm_kpm/lib/BMPString.c | 233 + Bouncer/{asn1c_defs => e2sm_kpm/lib}/BOOLEAN.c | 0 Bouncer/e2sm_kpm/lib/C-RNTI.c | 65 + Bouncer/e2sm_kpm/lib/CGI.c | 64 + .../CU-CP-Usage-Report-CellResourceReportItem.c | 140 + Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-Per-UE.c | 130 + .../lib/CU-CP-Usage-Report-UeResourceReportItem.c | 72 + .../CU-UP-Usage-Report-CellResourceReportItem.c | 140 + Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-Per-UE.c | 130 + .../lib/CU-UP-Usage-Report-UeResourceReportItem.c | 150 + Bouncer/e2sm_kpm/lib/CUUPMeasurement-Container.c | 130 + Bouncer/e2sm_kpm/lib/CellResourceReportListItem.c | 228 + Bouncer/e2sm_kpm/lib/CoreCPID.c | 64 + .../lib/DU-Usage-Report-CellResourceReportItem.c | 140 + Bouncer/e2sm_kpm/lib/DU-Usage-Report-Per-UE.c | 130 + .../lib/DU-Usage-Report-UeResourceReportItem.c | 138 + Bouncer/e2sm_kpm/lib/E-UTRA-ARFCN.c | 61 + Bouncer/e2sm_kpm/lib/E-UTRA-PCI.c | 61 + Bouncer/e2sm_kpm/lib/E-UTRA-TAC.c | 62 + .../lib/E2SM-KPM-ActionDefinition-Format1.c | 73 + .../lib/E2SM-KPM-ActionDefinition-Format2.c | 60 + .../lib/E2SM-KPM-ActionDefinition-Format3.c | 73 + Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition.c | 127 + .../lib/E2SM-KPM-EventTriggerDefinition-Format1.c | 139 + .../e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition.c | 95 + .../lib/E2SM-KPM-IndicationHeader-Format1.c | 392 + Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader.c | 95 + .../lib/E2SM-KPM-IndicationMessage-Format1.c | 73 + .../lib/E2SM-KPM-IndicationMessage-Format2.c | 72 + Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage.c | 106 + .../lib/E2SM-KPM-RANfunction-Description.c | 220 + Bouncer/e2sm_kpm/lib/EN-GNB-ID.c | 88 + Bouncer/e2sm_kpm/lib/ENB-ID-Choice.c | 192 + Bouncer/e2sm_kpm/lib/ENB-ID.c | 226 + Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID-Extension.c | 61 + Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID.c | 61 + Bouncer/e2sm_kpm/lib/ENGNB-ID.c | 94 + Bouncer/e2sm_kpm/lib/ENUMERATED.c | 180 + Bouncer/e2sm_kpm/lib/EPC-CUUP-PM-Format.c | 130 + Bouncer/e2sm_kpm/lib/EPC-DU-PM-Container.c | 130 + Bouncer/e2sm_kpm/lib/EUTRA-CGI.c | 60 + Bouncer/e2sm_kpm/lib/EUTRACellIdentity.c | 67 + Bouncer/e2sm_kpm/lib/FGC-CUUP-PM-Format.c | 130 + Bouncer/e2sm_kpm/lib/FGC-DU-PM-Container.c | 130 + Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnListItem.c | 183 + .../lib/FQIPERSlicesPerPlmnPerCellListItem.c | 171 + Bouncer/e2sm_kpm/lib/FiveGS-TAC.c | 62 + Bouncer/e2sm_kpm/lib/FiveQI.c | 61 + Bouncer/e2sm_kpm/lib/FreqBandNrItem.c | 80 + Bouncer/e2sm_kpm/lib/GNB-CU-CP-Name.c | 109 + Bouncer/e2sm_kpm/lib/GNB-CU-CP-UE-E1AP-ID.c | 57 + Bouncer/e2sm_kpm/lib/GNB-CU-UE-F1AP-ID.c | 57 + Bouncer/e2sm_kpm/lib/GNB-CU-UP-ID.c | 67 + Bouncer/e2sm_kpm/lib/GNB-CU-UP-Name.c | 109 + Bouncer/e2sm_kpm/lib/GNB-DU-ID.c | 67 + Bouncer/e2sm_kpm/lib/GNB-DU-Name.c | 109 + Bouncer/e2sm_kpm/lib/GNB-ID-Choice.c | 94 + Bouncer/e2sm_kpm/lib/GNB-ID.c | 88 + Bouncer/e2sm_kpm/lib/GNB-Name.c | 75 + Bouncer/e2sm_kpm/lib/GUAMI.c | 80 + Bouncer/e2sm_kpm/lib/GUMMEI.c | 70 + Bouncer/e2sm_kpm/lib/GeneralString.c | 58 + Bouncer/e2sm_kpm/lib/GeneralizedTime.c | 833 + Bouncer/e2sm_kpm/lib/GlobalENB-ID.c | 60 + Bouncer/e2sm_kpm/lib/GlobalGNB-ID.c | 60 + Bouncer/e2sm_kpm/lib/GlobalKPMnode-ID.c | 89 + Bouncer/e2sm_kpm/lib/GlobalKPMnode-eNB-ID.c | 50 + Bouncer/e2sm_kpm/lib/GlobalKPMnode-en-gNB-ID.c | 50 + Bouncer/e2sm_kpm/lib/GlobalKPMnode-gNB-ID.c | 72 + Bouncer/e2sm_kpm/lib/GlobalKPMnode-ng-eNB-ID.c | 50 + Bouncer/e2sm_kpm/lib/GlobalNGRANNodeID.c | 64 + Bouncer/e2sm_kpm/lib/GlobalNgENB-ID.c | 60 + Bouncer/e2sm_kpm/lib/GlobalenGNB-ID.c | 60 + Bouncer/e2sm_kpm/lib/GlobalgNB-ID.c | 60 + Bouncer/e2sm_kpm/lib/GlobalngeNB-ID.c | 60 + Bouncer/e2sm_kpm/lib/GranularityPeriod.c | 66 + Bouncer/e2sm_kpm/lib/GraphicString.c | 58 + Bouncer/e2sm_kpm/lib/GroupID.c | 62 + Bouncer/e2sm_kpm/lib/IA5String.c | 97 + Bouncer/e2sm_kpm/lib/INTEGER.c | 1735 + Bouncer/e2sm_kpm/lib/INTEGER_oer.c | 179 + Bouncer/e2sm_kpm/lib/ISO646String.c | 62 + Bouncer/e2sm_kpm/lib/IndexToRFSP.c | 61 + Bouncer/e2sm_kpm/lib/Interface-MessageID.c | 110 + Bouncer/e2sm_kpm/lib/InterfaceID-E1.c | 60 + Bouncer/e2sm_kpm/lib/InterfaceID-F1.c | 60 + Bouncer/e2sm_kpm/lib/InterfaceID-NG.c | 50 + Bouncer/e2sm_kpm/lib/InterfaceID-S1.c | 50 + Bouncer/e2sm_kpm/lib/InterfaceID-W1.c | 60 + Bouncer/e2sm_kpm/lib/InterfaceID-X2.c | 106 + Bouncer/e2sm_kpm/lib/InterfaceID-Xn.c | 50 + Bouncer/e2sm_kpm/lib/InterfaceIdentifier.c | 119 + Bouncer/e2sm_kpm/lib/InterfaceType.c | 65 + Bouncer/e2sm_kpm/lib/LabelInfoItem.c | 50 + Bouncer/e2sm_kpm/lib/LabelInfoList.c | 50 + Bouncer/e2sm_kpm/lib/MME-Code.c | 62 + Bouncer/e2sm_kpm/lib/MME-Group-ID.c | 62 + Bouncer/e2sm_kpm/lib/MME-UE-S1AP-ID.c | 57 + Bouncer/e2sm_kpm/lib/MatchingCondItem.c | 64 + Bouncer/e2sm_kpm/lib/MatchingCondList.c | 50 + Bouncer/e2sm_kpm/lib/MatchingUEidItem.c | 50 + Bouncer/e2sm_kpm/lib/MatchingUEidList.c | 50 + Bouncer/e2sm_kpm/lib/MeasurementCondItem.c | 60 + Bouncer/e2sm_kpm/lib/MeasurementCondList.c | 50 + Bouncer/e2sm_kpm/lib/MeasurementCondUEidItem.c | 73 + Bouncer/e2sm_kpm/lib/MeasurementCondUEidList.c | 50 + Bouncer/e2sm_kpm/lib/MeasurementData.c | 50 + Bouncer/e2sm_kpm/lib/MeasurementDataItem.c | 108 + Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-Item.c | 62 + Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-List.c | 50 + Bouncer/e2sm_kpm/lib/MeasurementInfoItem.c | 60 + Bouncer/e2sm_kpm/lib/MeasurementInfoList.c | 50 + Bouncer/e2sm_kpm/lib/MeasurementLabel.c | 787 + Bouncer/e2sm_kpm/lib/MeasurementRecord.c | 50 + Bouncer/e2sm_kpm/lib/MeasurementRecordItem.c | 143 + Bouncer/e2sm_kpm/lib/MeasurementType.c | 62 + Bouncer/e2sm_kpm/lib/MeasurementTypeID.c | 61 + Bouncer/e2sm_kpm/lib/MeasurementTypeName.c | 106 + Bouncer/e2sm_kpm/lib/NG-RANnodeUEXnAPID.c | 57 + Bouncer/e2sm_kpm/lib/NGENB-CU-UE-W1AP-ID.c | 57 + Bouncer/e2sm_kpm/lib/NGENB-DU-ID.c | 67 + Bouncer/e2sm_kpm/lib/NI-Type.c | 60 + Bouncer/e2sm_kpm/lib/NR-ARFCN.c | 80 + Bouncer/e2sm_kpm/lib/NR-CGI.c | 60 + Bouncer/e2sm_kpm/lib/NR-PCI.c | 61 + Bouncer/e2sm_kpm/lib/NRCGI.c | 60 + Bouncer/e2sm_kpm/lib/NRCellIdentity.c | 67 + Bouncer/e2sm_kpm/lib/NRFrequencyBand-List.c | 50 + Bouncer/e2sm_kpm/lib/NRFrequencyBandItem.c | 90 + Bouncer/e2sm_kpm/lib/NRFrequencyInfo.c | 72 + Bouncer/e2sm_kpm/lib/NRFrequencyShift7p5khz.c | 55 + Bouncer/{asn1c_defs => e2sm_kpm/lib}/NULL.c | 0 Bouncer/e2sm_kpm/lib/NativeEnumerated.c | 367 + Bouncer/e2sm_kpm/lib/NativeEnumerated_oer.c | 149 + Bouncer/e2sm_kpm/lib/NativeInteger.c | 550 + Bouncer/e2sm_kpm/lib/NativeInteger_oer.c | 99 + Bouncer/e2sm_kpm/lib/NativeReal.c | 781 + Bouncer/e2sm_kpm/lib/NgENB-ID.c | 180 + Bouncer/e2sm_kpm/lib/NumericString.c | 121 + .../lib}/OBJECT_IDENTIFIER.c | 0 Bouncer/e2sm_kpm/lib/OCTET_STRING.c | 2411 + Bouncer/e2sm_kpm/lib/OCTET_STRING_oer.c | 171 + Bouncer/e2sm_kpm/lib/OCUCP-PF-Container.c | 140 + Bouncer/e2sm_kpm/lib/OCUUP-PF-Container.c | 142 + Bouncer/e2sm_kpm/lib/ODU-PF-Container.c | 130 + Bouncer/e2sm_kpm/lib/OPEN_TYPE.c | 509 + Bouncer/e2sm_kpm/lib/OPEN_TYPE_oer.c | 92 + Bouncer/e2sm_kpm/lib/ObjectDescriptor.c | 58 + Bouncer/e2sm_kpm/lib/PF-Container.c | 78 + Bouncer/e2sm_kpm/lib/PF-ContainerListItem.c | 60 + Bouncer/e2sm_kpm/lib/PLMN-Identity.c | 65 + Bouncer/e2sm_kpm/lib/PLMNIdentity.c | 62 + Bouncer/e2sm_kpm/lib/PM-Containers-List.c | 64 + Bouncer/e2sm_kpm/lib/PerQCIReportListItem.c | 171 + Bouncer/e2sm_kpm/lib/PerQCIReportListItemFormat.c | 183 + Bouncer/e2sm_kpm/lib/PlmnID-List.c | 74 + .../{asn1c_defs => e2sm_kpm/lib}/PrintableString.c | 0 Bouncer/e2sm_kpm/lib/QCI.c | 61 + Bouncer/e2sm_kpm/lib/QoSID.c | 62 + Bouncer/e2sm_kpm/lib/QosFlowIdentifier.c | 61 + Bouncer/e2sm_kpm/lib/RAN-Container.c | 130 + Bouncer/e2sm_kpm/lib/RANUEID.c | 62 + Bouncer/e2sm_kpm/lib/RANcallProcess-ID-string.c | 109 + Bouncer/e2sm_kpm/lib/RANfunction-Name.c | 307 + Bouncer/e2sm_kpm/lib/REAL.c | 1028 + Bouncer/e2sm_kpm/lib/RELATIVE-OID.c | 336 + Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-Item.c | 70 + Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-List.c | 70 + Bouncer/e2sm_kpm/lib/RIC-Format-Type.c | 31 + Bouncer/e2sm_kpm/lib/RIC-ReportStyle-Item.c | 100 + Bouncer/e2sm_kpm/lib/RIC-ReportStyle-List.c | 80 + Bouncer/e2sm_kpm/lib/RIC-Style-Name.c | 106 + Bouncer/e2sm_kpm/lib/RIC-Style-Type.c | 31 + Bouncer/e2sm_kpm/lib/RRC-MessageID.c | 114 + Bouncer/e2sm_kpm/lib/RRCclass-LTE.c | 75 + Bouncer/e2sm_kpm/lib/RRCclass-NR.c | 67 + Bouncer/e2sm_kpm/lib/RT-Period-IE.c | 94 + Bouncer/e2sm_kpm/lib/S-NSSAI.c | 62 + Bouncer/e2sm_kpm/lib/SD.c | 62 + Bouncer/e2sm_kpm/lib/SNSSAI.c | 130 + Bouncer/e2sm_kpm/lib/SST.c | 62 + Bouncer/e2sm_kpm/lib/ServedPlmnPerCellListItem.c | 74 + Bouncer/e2sm_kpm/lib/ServingCell-ARFCN.c | 63 + Bouncer/e2sm_kpm/lib/ServingCell-PCI.c | 62 + Bouncer/e2sm_kpm/lib/SlicePerPlmnPerCellListItem.c | 140 + Bouncer/e2sm_kpm/lib/SliceToReportListItem.c | 140 + Bouncer/e2sm_kpm/lib/SubscriberProfileIDforRFP.c | 61 + Bouncer/e2sm_kpm/lib/SupportedSULBandList.c | 50 + Bouncer/e2sm_kpm/lib/SupportedSULFreqBandItem.c | 80 + Bouncer/e2sm_kpm/lib/T61String.c | 58 + Bouncer/e2sm_kpm/lib/TeletexString.c | 194 + Bouncer/e2sm_kpm/lib/TestCond-Expression.c | 61 + Bouncer/e2sm_kpm/lib/TestCond-Type.c | 378 + Bouncer/e2sm_kpm/lib/TestCond-Value.c | 102 + Bouncer/e2sm_kpm/lib/TestCondInfo.c | 70 + Bouncer/e2sm_kpm/lib/TimeStamp.c | 62 + Bouncer/e2sm_kpm/lib/Timestamp.c | 31 + Bouncer/e2sm_kpm/lib/Trigger-ConditionIE-Item.c | 50 + Bouncer/e2sm_kpm/lib/UE-Report-Type.c | 60 + Bouncer/e2sm_kpm/lib/UEID-EN-GNB.c | 103 + Bouncer/e2sm_kpm/lib/UEID-ENB.c | 93 + Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c | 50 + Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c | 50 + Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c | 50 + Bouncer/e2sm_kpm/lib/UEID-GNB-CU-F1AP-ID-List.c | 50 + Bouncer/e2sm_kpm/lib/UEID-GNB-CU-UP.c | 62 + Bouncer/e2sm_kpm/lib/UEID-GNB-DU.c | 62 + Bouncer/e2sm_kpm/lib/UEID-GNB.c | 126 + Bouncer/e2sm_kpm/lib/UEID-NG-ENB-DU.c | 50 + Bouncer/e2sm_kpm/lib/UEID-NG-ENB.c | 104 + Bouncer/e2sm_kpm/lib/UEID.c | 119 + Bouncer/e2sm_kpm/lib/UTCTime.c | 277 + Bouncer/e2sm_kpm/lib/UTF8String.c | 294 + Bouncer/e2sm_kpm/lib/UniversalString.c | 243 + Bouncer/e2sm_kpm/lib/VideotexString.c | 58 + Bouncer/e2sm_kpm/lib/VisibleString.c | 99 + Bouncer/e2sm_kpm/lib/asn_SEQUENCE_OF.c | 41 + Bouncer/e2sm_kpm/lib/asn_SET_OF.c | 88 + Bouncer/e2sm_kpm/lib/asn_application.c | 481 + Bouncer/e2sm_kpm/lib/asn_bit_data.c | 333 + Bouncer/e2sm_kpm/lib/asn_codecs_prim.c | 317 + Bouncer/e2sm_kpm/lib/asn_internal.c | 49 + Bouncer/e2sm_kpm/lib/asn_random_fill.c | 56 + Bouncer/e2sm_kpm/lib/ber_decoder.c | 283 + Bouncer/e2sm_kpm/lib/ber_tlv_length.c | 168 + Bouncer/e2sm_kpm/lib/ber_tlv_tag.c | 144 + Bouncer/e2sm_kpm/lib/constr_CHOICE.c | 1533 + Bouncer/e2sm_kpm/lib/constr_CHOICE_oer.c | 380 + Bouncer/e2sm_kpm/lib/constr_SEQUENCE.c | 2059 + Bouncer/e2sm_kpm/lib/constr_SEQUENCE_OF.c | 358 + Bouncer/e2sm_kpm/lib/constr_SEQUENCE_oer.c | 561 + Bouncer/e2sm_kpm/lib/constr_SET.c | 1149 + Bouncer/e2sm_kpm/lib/constr_SET_OF.c | 1441 + Bouncer/e2sm_kpm/lib/constr_SET_OF_oer.c | 285 + Bouncer/e2sm_kpm/lib/constr_TYPE.c | 80 + Bouncer/e2sm_kpm/lib/constraints.c | 93 + Bouncer/e2sm_kpm/lib/cscope.out | 116022 ++++++++++++++++++ Bouncer/e2sm_kpm/lib/der_encoder.c | 194 + Bouncer/e2sm_kpm/lib/oer_decoder.c | 152 + Bouncer/e2sm_kpm/lib/oer_encoder.c | 141 + Bouncer/e2sm_kpm/lib/oer_support.c | 122 + Bouncer/e2sm_kpm/lib/per_decoder.c | 185 + Bouncer/e2sm_kpm/lib/per_encoder.c | 265 + Bouncer/e2sm_kpm/lib/per_opentype.c | 533 + Bouncer/e2sm_kpm/lib/per_support.c | 492 + Bouncer/e2sm_kpm/lib/xer_decoder.c | 369 + Bouncer/e2sm_kpm/lib/xer_encoder.c | 237 + Bouncer/e2sm_kpm/lib/xer_support.c | 227 + Bouncer/e2sm_kpm/wrapper.c | 252 + Bouncer/e2sm_kpm/wrapper.h | 104 + .../headers/.RANParameter-Testing-Item.h.swp | Bin 0 -> 12288 bytes Bouncer/e2sm_rc/headers/AMF-UE-NGAP-ID.h | 46 + Bouncer/e2sm_rc/headers/AMFPointer.h | 46 + Bouncer/e2sm_rc/headers/AMFRegionID.h | 46 + Bouncer/e2sm_rc/headers/AMFSetID.h | 46 + Bouncer/e2sm_rc/headers/BIT_STRING.h | 48 + Bouncer/e2sm_rc/headers/BOOLEAN.h | 45 + Bouncer/e2sm_rc/headers/CGI.h | 61 + .../CallProcessBreakpoint-RANParameter-Item.h | 50 + .../headers/CellIdentification-RANParameter-Item.h | 50 + .../headers/ControlAction-RANParameter-Item.h | 50 + .../headers/ControlOutcome-RANParameter-Item.h | 50 + Bouncer/e2sm_rc/headers/CoreCPID.h | 58 + Bouncer/e2sm_rc/headers/E-UTRA-ARFCN.h | 46 + Bouncer/e2sm_rc/headers/E-UTRA-PCI.h | 46 + Bouncer/e2sm_rc/headers/E-UTRA-TAC.h | 46 + .../E2SM-RC-ActionDefinition-Format1-Item.h | 48 + .../headers/E2SM-RC-ActionDefinition-Format1.h | 53 + .../E2SM-RC-ActionDefinition-Format2-Item.h | 48 + .../headers/E2SM-RC-ActionDefinition-Format2.h | 53 + .../E2SM-RC-ActionDefinition-Format3-Item.h | 48 + .../headers/E2SM-RC-ActionDefinition-Format3.h | 57 + ...M-RC-ActionDefinition-Format4-Indication-Item.h | 55 + .../E2SM-RC-ActionDefinition-Format4-RANP-Item.h | 48 + .../E2SM-RC-ActionDefinition-Format4-Style-Item.h | 55 + .../headers/E2SM-RC-ActionDefinition-Format4.h | 55 + Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition.h | 75 + .../headers/E2SM-RC-CallProcessID-Format1.h | 44 + Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID.h | 65 + .../headers/E2SM-RC-ControlHeader-Format1.h | 60 + .../headers/E2SM-RC-ControlHeader-Format2.h | 58 + Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader.h | 67 + .../headers/E2SM-RC-ControlMessage-Format1-Item.h | 46 + .../headers/E2SM-RC-ControlMessage-Format1.h | 53 + ...-RC-ControlMessage-Format2-ControlAction-Item.h | 46 + .../E2SM-RC-ControlMessage-Format2-Style-Item.h | 55 + .../headers/E2SM-RC-ControlMessage-Format2.h | 53 + Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage.h | 67 + .../headers/E2SM-RC-ControlOutcome-Format1-Item.h | 46 + .../headers/E2SM-RC-ControlOutcome-Format1.h | 53 + ...RC-ControlOutcome-Format2-ControlOutcome-Item.h | 55 + .../E2SM-RC-ControlOutcome-Format2-RANP-Item.h | 46 + .../E2SM-RC-ControlOutcome-Format2-Style-Item.h | 55 + .../headers/E2SM-RC-ControlOutcome-Format2.h | 53 + .../headers/E2SM-RC-ControlOutcome-Format3-Item.h | 46 + .../headers/E2SM-RC-ControlOutcome-Format3.h | 53 + Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome.h | 70 + .../headers/E2SM-RC-EventTrigger-Format1-Item.h | 66 + .../e2sm_rc/headers/E2SM-RC-EventTrigger-Format1.h | 55 + .../e2sm_rc/headers/E2SM-RC-EventTrigger-Format2.h | 52 + .../headers/E2SM-RC-EventTrigger-Format3-Item.h | 52 + .../e2sm_rc/headers/E2SM-RC-EventTrigger-Format3.h | 53 + .../headers/E2SM-RC-EventTrigger-Format4-Item.h | 52 + .../e2sm_rc/headers/E2SM-RC-EventTrigger-Format4.h | 53 + .../e2sm_rc/headers/E2SM-RC-EventTrigger-Format5.h | 59 + Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger.h | 77 + .../headers/E2SM-RC-IndicationHeader-Format1.h | 44 + .../headers/E2SM-RC-IndicationHeader-Format2.h | 48 + .../headers/E2SM-RC-IndicationHeader-Format3.h | 48 + Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader.h | 70 + .../E2SM-RC-IndicationMessage-Format1-Item.h | 46 + .../headers/E2SM-RC-IndicationMessage-Format1.h | 53 + .../E2SM-RC-IndicationMessage-Format2-Item.h | 55 + ...C-IndicationMessage-Format2-RANParameter-Item.h | 46 + .../headers/E2SM-RC-IndicationMessage-Format2.h | 53 + .../E2SM-RC-IndicationMessage-Format3-Item.h | 52 + .../headers/E2SM-RC-IndicationMessage-Format3.h | 53 + .../E2SM-RC-IndicationMessage-Format4-ItemCell.h | 50 + .../E2SM-RC-IndicationMessage-Format4-ItemUE.h | 48 + .../headers/E2SM-RC-IndicationMessage-Format4.h | 60 + .../E2SM-RC-IndicationMessage-Format5-Item.h | 46 + .../headers/E2SM-RC-IndicationMessage-Format5.h | 53 + ...-RC-IndicationMessage-Format6-Indication-Item.h | 55 + .../E2SM-RC-IndicationMessage-Format6-RANP-Item.h | 46 + .../E2SM-RC-IndicationMessage-Format6-Style-Item.h | 55 + .../headers/E2SM-RC-IndicationMessage-Format6.h | 53 + .../e2sm_rc/headers/E2SM-RC-IndicationMessage.h | 79 + .../headers/E2SM-RC-RANFunctionDefinition.h | 54 + Bouncer/e2sm_rc/headers/EN-GNB-ID.h | 56 + Bouncer/e2sm_rc/headers/ENB-ID.h | 61 + Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID-Extension.h | 46 + Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID.h | 46 + Bouncer/e2sm_rc/headers/EUTRA-CGI.h | 46 + Bouncer/e2sm_rc/headers/EUTRACellIdentity.h | 46 + .../EventTrigger-Cell-Info-Item-Choice-Group.h | 44 + ...EventTrigger-Cell-Info-Item-Choice-Individual.h | 44 + .../e2sm_rc/headers/EventTrigger-Cell-Info-Item.h | 74 + Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info.h | 53 + .../EventTrigger-UE-Info-Item-Choice-Group.h | 44 + .../EventTrigger-UE-Info-Item-Choice-Individual.h | 48 + .../e2sm_rc/headers/EventTrigger-UE-Info-Item.h | 74 + Bouncer/e2sm_rc/headers/EventTrigger-UE-Info.h | 53 + .../headers/EventTrigger-UEevent-Info-Item.h | 46 + .../e2sm_rc/headers/EventTrigger-UEevent-Info.h | 53 + Bouncer/e2sm_rc/headers/FiveGS-TAC.h | 46 + Bouncer/e2sm_rc/headers/FiveQI.h | 46 + Bouncer/e2sm_rc/headers/FreqBandNrItem.h | 42 + Bouncer/e2sm_rc/headers/GNB-CU-CP-UE-E1AP-ID.h | 47 + Bouncer/e2sm_rc/headers/GNB-CU-UE-F1AP-ID.h | 47 + Bouncer/e2sm_rc/headers/GNB-CU-UP-ID.h | 46 + Bouncer/e2sm_rc/headers/GNB-DU-ID.h | 46 + Bouncer/e2sm_rc/headers/GNB-ID.h | 56 + Bouncer/e2sm_rc/headers/GUAMI.h | 50 + Bouncer/e2sm_rc/headers/GUMMEI.h | 48 + Bouncer/e2sm_rc/headers/GlobalENB-ID.h | 46 + Bouncer/e2sm_rc/headers/GlobalGNB-ID.h | 46 + Bouncer/e2sm_rc/headers/GlobalNGRANNodeID.h | 61 + Bouncer/e2sm_rc/headers/GlobalNgENB-ID.h | 46 + Bouncer/e2sm_rc/headers/GlobalenGNB-ID.h | 46 + Bouncer/e2sm_rc/headers/GroupID.h | 56 + Bouncer/e2sm_rc/headers/INTEGER.h | 108 + Bouncer/e2sm_rc/headers/IndexToRFSP.h | 45 + .../headers/InsertIndication-RANParameter-Item.h | 50 + Bouncer/e2sm_rc/headers/Interface-MessageID.h | 57 + Bouncer/e2sm_rc/headers/InterfaceID-E1.h | 46 + Bouncer/e2sm_rc/headers/InterfaceID-F1.h | 46 + Bouncer/e2sm_rc/headers/InterfaceID-NG.h | 44 + Bouncer/e2sm_rc/headers/InterfaceID-S1.h | 44 + Bouncer/e2sm_rc/headers/InterfaceID-W1.h | 46 + Bouncer/e2sm_rc/headers/InterfaceID-X2.h | 70 + Bouncer/e2sm_rc/headers/InterfaceID-Xn.h | 44 + Bouncer/e2sm_rc/headers/InterfaceIdentifier.h | 76 + Bouncer/e2sm_rc/headers/InterfaceType.h | 61 + .../headers/L2Parameters-RANParameter-Item.h | 50 + Bouncer/e2sm_rc/headers/LogicalOR.h | 56 + Bouncer/e2sm_rc/headers/MME-Code.h | 46 + Bouncer/e2sm_rc/headers/MME-Group-ID.h | 46 + Bouncer/e2sm_rc/headers/MME-UE-S1AP-ID.h | 47 + Bouncer/e2sm_rc/headers/MessageType-Choice-NI.h | 50 + Bouncer/e2sm_rc/headers/MessageType-Choice-RRC.h | 44 + Bouncer/e2sm_rc/headers/MessageType-Choice.h | 61 + Bouncer/e2sm_rc/headers/NG-RANnodeUEXnAPID.h | 47 + Bouncer/e2sm_rc/headers/NGENB-CU-UE-W1AP-ID.h | 47 + Bouncer/e2sm_rc/headers/NGENB-DU-ID.h | 46 + Bouncer/e2sm_rc/headers/NR-ARFCN.h | 44 + Bouncer/e2sm_rc/headers/NR-CGI.h | 46 + Bouncer/e2sm_rc/headers/NR-PCI.h | 46 + Bouncer/e2sm_rc/headers/NRCellIdentity.h | 46 + Bouncer/e2sm_rc/headers/NRFrequencyBand-List.h | 44 + Bouncer/e2sm_rc/headers/NRFrequencyBandItem.h | 46 + Bouncer/e2sm_rc/headers/NRFrequencyInfo.h | 48 + Bouncer/e2sm_rc/headers/NRFrequencyShift7p5khz.h | 56 + Bouncer/e2sm_rc/headers/NativeEnumerated.h | 45 + Bouncer/e2sm_rc/headers/NativeInteger.h | 46 + Bouncer/e2sm_rc/headers/NativeReal.h | 48 + .../headers/NeighborCell-Item-Choice-E-UTRA.h | 73 + .../e2sm_rc/headers/NeighborCell-Item-Choice-NR.h | 82 + Bouncer/e2sm_rc/headers/NeighborCell-Item.h | 61 + Bouncer/e2sm_rc/headers/NeighborCell-List.h | 44 + Bouncer/e2sm_rc/headers/NeighborRelation-Info.h | 48 + Bouncer/e2sm_rc/headers/NgENB-ID.h | 60 + Bouncer/e2sm_rc/headers/OCTET_STRING.h | 102 + Bouncer/e2sm_rc/headers/OPEN_TYPE.h | 77 + Bouncer/e2sm_rc/headers/PLMNIdentity.h | 46 + .../headers/PolicyAction-RANParameter-Item.h | 50 + .../headers/PolicyCondition-RANParameter-Item.h | 50 + Bouncer/e2sm_rc/headers/PrintableString.h | 37 + Bouncer/e2sm_rc/headers/QCI.h | 46 + Bouncer/e2sm_rc/headers/QoSID.h | 56 + Bouncer/e2sm_rc/headers/QosFlowIdentifier.h | 45 + Bouncer/e2sm_rc/headers/RAN-CallProcess-ID.h | 47 + .../RANFunctionDefinition-Control-Action-Item.h | 57 + .../headers/RANFunctionDefinition-Control-Item.h | 69 + .../headers/RANFunctionDefinition-Control.h | 53 + ...nctionDefinition-EventTrigger-Breakpoint-Item.h | 57 + ...ctionDefinition-EventTrigger-CallProcess-Item.h | 57 + ...RANFunctionDefinition-EventTrigger-Style-Item.h | 48 + .../headers/RANFunctionDefinition-EventTrigger.h | 81 + .../RANFunctionDefinition-Insert-Indication-Item.h | 57 + .../headers/RANFunctionDefinition-Insert-Item.h | 63 + .../e2sm_rc/headers/RANFunctionDefinition-Insert.h | 53 + .../RANFunctionDefinition-Policy-Action-Item.h | 66 + .../headers/RANFunctionDefinition-Policy-Item.h | 58 + .../e2sm_rc/headers/RANFunctionDefinition-Policy.h | 53 + .../headers/RANFunctionDefinition-Report-Item.h | 62 + .../e2sm_rc/headers/RANFunctionDefinition-Report.h | 53 + .../RANParameter-Definition-Choice-LIST-Item.h | 50 + .../headers/RANParameter-Definition-Choice-LIST.h | 53 + ...RANParameter-Definition-Choice-STRUCTURE-Item.h | 50 + .../RANParameter-Definition-Choice-STRUCTURE.h | 53 + .../headers/RANParameter-Definition-Choice.h | 61 + Bouncer/e2sm_rc/headers/RANParameter-Definition.h | 46 + Bouncer/e2sm_rc/headers/RANParameter-ID.h | 47 + Bouncer/e2sm_rc/headers/RANParameter-LIST.h | 53 + Bouncer/e2sm_rc/headers/RANParameter-Name.h | 46 + .../e2sm_rc/headers/RANParameter-STRUCTURE-Item.h | 48 + Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE.h | 53 + ...RANParameter-Testing-Item-Choice-ElementFalse.h | 50 + .../RANParameter-Testing-Item-Choice-ElementTrue.h | 44 + .../RANParameter-Testing-Item-Choice-List.h | 46 + .../RANParameter-Testing-Item-Choice-Structure.h | 46 + .../e2sm_rc/headers/RANParameter-Testing-Item.h | 78 + .../e2sm_rc/headers/RANParameter-Testing-LIST.h | 44 + .../headers/RANParameter-Testing-STRUCTURE.h | 44 + Bouncer/e2sm_rc/headers/RANParameter-Testing.h | 44 + .../headers/RANParameter-TestingCondition.h | 80 + Bouncer/e2sm_rc/headers/RANParameter-Value.h | 71 + .../RANParameter-ValueType-Choice-ElementFalse.h | 46 + .../RANParameter-ValueType-Choice-ElementTrue.h | 44 + .../headers/RANParameter-ValueType-Choice-List.h | 46 + .../RANParameter-ValueType-Choice-Structure.h | 46 + Bouncer/e2sm_rc/headers/RANParameter-ValueType.h | 67 + Bouncer/e2sm_rc/headers/RANUEID.h | 46 + Bouncer/e2sm_rc/headers/RANfunction-Name.h | 48 + Bouncer/e2sm_rc/headers/REAL.h | 67 + .../e2sm_rc/headers/RIC-CallProcessBreakpoint-ID.h | 46 + .../headers/RIC-CallProcessBreakpoint-Name.h | 46 + Bouncer/e2sm_rc/headers/RIC-CallProcessType-ID.h | 46 + Bouncer/e2sm_rc/headers/RIC-CallProcessType-Name.h | 46 + Bouncer/e2sm_rc/headers/RIC-ControlAction-ID.h | 46 + Bouncer/e2sm_rc/headers/RIC-ControlAction-Name.h | 46 + Bouncer/e2sm_rc/headers/RIC-EventTrigger-Cell-ID.h | 46 + Bouncer/e2sm_rc/headers/RIC-EventTrigger-UE-ID.h | 46 + .../e2sm_rc/headers/RIC-EventTrigger-UEevent-ID.h | 46 + .../e2sm_rc/headers/RIC-EventTriggerCondition-ID.h | 46 + Bouncer/e2sm_rc/headers/RIC-Format-Type.h | 45 + Bouncer/e2sm_rc/headers/RIC-InsertIndication-ID.h | 46 + .../e2sm_rc/headers/RIC-InsertIndication-Name.h | 46 + .../headers/RIC-PolicyAction-RANParameter-Item.h | 46 + Bouncer/e2sm_rc/headers/RIC-PolicyAction.h | 67 + Bouncer/e2sm_rc/headers/RIC-Style-Name.h | 46 + Bouncer/e2sm_rc/headers/RIC-Style-Type.h | 45 + Bouncer/e2sm_rc/headers/RRC-MessageID.h | 70 + Bouncer/e2sm_rc/headers/RRC-State.h | 58 + Bouncer/e2sm_rc/headers/RRCclass-LTE.h | 66 + Bouncer/e2sm_rc/headers/RRCclass-NR.h | 62 + Bouncer/e2sm_rc/headers/Report-RANParameter-Item.h | 50 + Bouncer/e2sm_rc/headers/S-NSSAI.h | 44 + Bouncer/e2sm_rc/headers/SD.h | 46 + Bouncer/e2sm_rc/headers/SST.h | 46 + Bouncer/e2sm_rc/headers/ServingCell-ARFCN.h | 61 + Bouncer/e2sm_rc/headers/ServingCell-PCI.h | 59 + .../e2sm_rc/headers/SubscriberProfileIDforRFP.h | 45 + Bouncer/e2sm_rc/headers/SupportedSULBandList.h | 44 + Bouncer/e2sm_rc/headers/SupportedSULFreqBandItem.h | 44 + .../e2sm_rc/headers/TriggerType-Choice-L2state.h | 44 + .../headers/TriggerType-Choice-RRCstate-Item.h | 46 + .../e2sm_rc/headers/TriggerType-Choice-RRCstate.h | 53 + Bouncer/e2sm_rc/headers/TriggerType-Choice-UEID.h | 44 + Bouncer/e2sm_rc/headers/TriggerType-Choice.h | 64 + Bouncer/e2sm_rc/headers/UEID-EN-GNB.h | 56 + Bouncer/e2sm_rc/headers/UEID-ENB.h | 54 + .../e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h | 44 + .../e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-List.h | 44 + .../e2sm_rc/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h | 44 + Bouncer/e2sm_rc/headers/UEID-GNB-CU-F1AP-ID-List.h | 44 + Bouncer/e2sm_rc/headers/UEID-GNB-CU-UP.h | 46 + Bouncer/e2sm_rc/headers/UEID-GNB-DU.h | 46 + Bouncer/e2sm_rc/headers/UEID-GNB.h | 60 + Bouncer/e2sm_rc/headers/UEID-NG-ENB-DU.h | 44 + Bouncer/e2sm_rc/headers/UEID-NG-ENB.h | 56 + Bouncer/e2sm_rc/headers/UEID.h | 76 + .../headers/UEIdentification-RANParameter-Item.h | 50 + Bouncer/e2sm_rc/headers/asn_SEQUENCE_OF.h | 52 + Bouncer/e2sm_rc/headers/asn_SET_OF.h | 72 + Bouncer/e2sm_rc/headers/asn_application.h | 171 + Bouncer/e2sm_rc/headers/asn_bit_data.h | 83 + Bouncer/e2sm_rc/headers/asn_codecs.h | 108 + Bouncer/e2sm_rc/headers/asn_codecs_prim.h | 51 + Bouncer/e2sm_rc/headers/asn_constant.h | 48 + Bouncer/e2sm_rc/headers/asn_internal.h | 159 + Bouncer/e2sm_rc/headers/asn_ioc.h | 51 + Bouncer/e2sm_rc/headers/asn_random_fill.h | 51 + Bouncer/e2sm_rc/headers/asn_system.h | 150 + Bouncer/e2sm_rc/headers/ber_decoder.h | 66 + Bouncer/e2sm_rc/headers/ber_tlv_length.h | 50 + Bouncer/e2sm_rc/headers/ber_tlv_tag.h | 60 + Bouncer/e2sm_rc/headers/constr_CHOICE.h | 80 + Bouncer/e2sm_rc/headers/constr_SEQUENCE.h | 68 + Bouncer/e2sm_rc/headers/constr_SEQUENCE_OF.h | 41 + Bouncer/e2sm_rc/headers/constr_SET_OF.h | 49 + Bouncer/e2sm_rc/headers/constr_TYPE.h | 262 + Bouncer/e2sm_rc/headers/constraints.h | 62 + Bouncer/e2sm_rc/headers/der_encoder.h | 68 + Bouncer/e2sm_rc/headers/oer_decoder.h | 72 + Bouncer/e2sm_rc/headers/oer_encoder.h | 70 + Bouncer/e2sm_rc/headers/oer_support.h | 47 + Bouncer/e2sm_rc/headers/per_decoder.h | 82 + Bouncer/e2sm_rc/headers/per_encoder.h | 93 + Bouncer/e2sm_rc/headers/per_opentype.h | 44 + Bouncer/e2sm_rc/headers/per_support.h | 127 + Bouncer/e2sm_rc/headers/xer_decoder.h | 106 + Bouncer/e2sm_rc/headers/xer_encoder.h | 83 + Bouncer/e2sm_rc/headers/xer_support.h | 55 + Bouncer/e2sm_rc/lib/AMF-UE-NGAP-ID.c | 70 + Bouncer/e2sm_rc/lib/AMFPointer.c | 70 + Bouncer/e2sm_rc/lib/AMFRegionID.c | 70 + Bouncer/e2sm_rc/lib/AMFSetID.c | 70 + Bouncer/e2sm_rc/lib/BIT_STRING.c | 656 + Bouncer/e2sm_rc/lib/BIT_STRING_oer.c | 174 + Bouncer/e2sm_rc/lib/BOOLEAN.c | 492 + Bouncer/e2sm_rc/lib/CGI.c | 67 + .../lib/CallProcessBreakpoint-RANParameter-Item.c | 73 + .../lib/CellIdentification-RANParameter-Item.c | 73 + .../e2sm_rc/lib/ControlAction-RANParameter-Item.c | 73 + .../e2sm_rc/lib/ControlOutcome-RANParameter-Item.c | 73 + Bouncer/e2sm_rc/lib/CoreCPID.c | 67 + Bouncer/e2sm_rc/lib/E-UTRA-ARFCN.c | 64 + Bouncer/e2sm_rc/lib/E-UTRA-PCI.c | 64 + Bouncer/e2sm_rc/lib/E-UTRA-TAC.c | 65 + .../lib/E2SM-RC-ActionDefinition-Format1-Item.c | 63 + .../e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1.c | 130 + .../lib/E2SM-RC-ActionDefinition-Format2-Item.c | 63 + .../e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2.c | 130 + .../lib/E2SM-RC-ActionDefinition-Format3-Item.c | 63 + .../e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3.c | 153 + ...M-RC-ActionDefinition-Format4-Indication-Item.c | 140 + .../E2SM-RC-ActionDefinition-Format4-RANP-Item.c | 63 + .../E2SM-RC-ActionDefinition-Format4-Style-Item.c | 140 + .../e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4.c | 143 + Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition.c | 141 + .../e2sm_rc/lib/E2SM-RC-CallProcessID-Format1.c | 50 + Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID.c | 98 + .../e2sm_rc/lib/E2SM-RC-ControlHeader-Format1.c | 133 + .../e2sm_rc/lib/E2SM-RC-ControlHeader-Format2.c | 114 + Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader.c | 109 + .../lib/E2SM-RC-ControlMessage-Format1-Item.c | 60 + .../e2sm_rc/lib/E2SM-RC-ControlMessage-Format1.c | 130 + ...-RC-ControlMessage-Format2-ControlAction-Item.c | 60 + .../E2SM-RC-ControlMessage-Format2-Style-Item.c | 140 + .../e2sm_rc/lib/E2SM-RC-ControlMessage-Format2.c | 130 + Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage.c | 109 + .../lib/E2SM-RC-ControlOutcome-Format1-Item.c | 60 + .../e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1.c | 130 + ...RC-ControlOutcome-Format2-ControlOutcome-Item.c | 140 + .../lib/E2SM-RC-ControlOutcome-Format2-RANP-Item.c | 60 + .../E2SM-RC-ControlOutcome-Format2-Style-Item.c | 140 + .../e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2.c | 130 + .../lib/E2SM-RC-ControlOutcome-Format3-Item.c | 60 + .../e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3.c | 130 + Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome.c | 120 + .../lib/E2SM-RC-EventTrigger-Format1-Item.c | 155 + Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1.c | 143 + Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format2.c | 84 + .../lib/E2SM-RC-EventTrigger-Format3-Item.c | 116 + Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3.c | 130 + .../lib/E2SM-RC-EventTrigger-Format4-Item.c | 83 + Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4.c | 130 + Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format5.c | 123 + Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger.c | 142 + .../e2sm_rc/lib/E2SM-RC-IndicationHeader-Format1.c | 52 + .../e2sm_rc/lib/E2SM-RC-IndicationHeader-Format2.c | 70 + .../e2sm_rc/lib/E2SM-RC-IndicationHeader-Format3.c | 63 + Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader.c | 120 + .../lib/E2SM-RC-IndicationMessage-Format1-Item.c | 60 + .../lib/E2SM-RC-IndicationMessage-Format1.c | 130 + .../lib/E2SM-RC-IndicationMessage-Format2-Item.c | 140 + ...C-IndicationMessage-Format2-RANParameter-Item.c | 60 + .../lib/E2SM-RC-IndicationMessage-Format2.c | 130 + .../lib/E2SM-RC-IndicationMessage-Format3-Item.c | 83 + .../lib/E2SM-RC-IndicationMessage-Format3.c | 130 + .../E2SM-RC-IndicationMessage-Format4-ItemCell.c | 73 + .../lib/E2SM-RC-IndicationMessage-Format4-ItemUE.c | 72 + .../lib/E2SM-RC-IndicationMessage-Format4.c | 220 + .../lib/E2SM-RC-IndicationMessage-Format5-Item.c | 60 + .../lib/E2SM-RC-IndicationMessage-Format5.c | 130 + ...-RC-IndicationMessage-Format6-Indication-Item.c | 140 + .../E2SM-RC-IndicationMessage-Format6-RANP-Item.c | 60 + .../E2SM-RC-IndicationMessage-Format6-Style-Item.c | 140 + .../lib/E2SM-RC-IndicationMessage-Format6.c | 130 + Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage.c | 153 + .../e2sm_rc/lib/E2SM-RC-RANFunctionDefinition.c | 107 + Bouncer/e2sm_rc/lib/EN-GNB-ID.c | 94 + Bouncer/e2sm_rc/lib/ENB-ID.c | 241 + Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID-Extension.c | 64 + Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID.c | 64 + Bouncer/e2sm_rc/lib/EUTRA-CGI.c | 60 + Bouncer/e2sm_rc/lib/EUTRACellIdentity.c | 70 + .../lib/EventTrigger-Cell-Info-Item-Choice-Group.c | 50 + ...EventTrigger-Cell-Info-Item-Choice-Individual.c | 50 + Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item.c | 131 + Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info.c | 130 + .../lib/EventTrigger-UE-Info-Item-Choice-Group.c | 50 + .../EventTrigger-UE-Info-Item-Choice-Individual.c | 63 + Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item.c | 131 + Bouncer/e2sm_rc/lib/EventTrigger-UE-Info.c | 130 + .../e2sm_rc/lib/EventTrigger-UEevent-Info-Item.c | 62 + Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info.c | 130 + Bouncer/e2sm_rc/lib/FiveGS-TAC.c | 65 + Bouncer/e2sm_rc/lib/FiveQI.c | 64 + Bouncer/e2sm_rc/lib/FreqBandNrItem.c | 83 + Bouncer/e2sm_rc/lib/GNB-CU-CP-UE-E1AP-ID.c | 60 + Bouncer/e2sm_rc/lib/GNB-CU-UE-F1AP-ID.c | 60 + Bouncer/e2sm_rc/lib/GNB-CU-UP-ID.c | 70 + Bouncer/e2sm_rc/lib/GNB-DU-ID.c | 70 + Bouncer/e2sm_rc/lib/GNB-ID.c | 94 + Bouncer/e2sm_rc/lib/GUAMI.c | 80 + Bouncer/e2sm_rc/lib/GUMMEI.c | 70 + Bouncer/e2sm_rc/lib/GlobalENB-ID.c | 60 + Bouncer/e2sm_rc/lib/GlobalGNB-ID.c | 60 + Bouncer/e2sm_rc/lib/GlobalNGRANNodeID.c | 67 + Bouncer/e2sm_rc/lib/GlobalNgENB-ID.c | 60 + Bouncer/e2sm_rc/lib/GlobalenGNB-ID.c | 60 + Bouncer/e2sm_rc/lib/GroupID.c | 65 + Bouncer/e2sm_rc/lib/INTEGER.c | 1735 + Bouncer/e2sm_rc/lib/INTEGER_oer.c | 179 + Bouncer/e2sm_rc/lib/IndexToRFSP.c | 64 + .../lib/InsertIndication-RANParameter-Item.c | 73 + Bouncer/e2sm_rc/lib/Interface-MessageID.c | 113 + Bouncer/e2sm_rc/lib/InterfaceID-E1.c | 60 + Bouncer/e2sm_rc/lib/InterfaceID-F1.c | 60 + Bouncer/e2sm_rc/lib/InterfaceID-NG.c | 50 + Bouncer/e2sm_rc/lib/InterfaceID-S1.c | 50 + Bouncer/e2sm_rc/lib/InterfaceID-W1.c | 60 + Bouncer/e2sm_rc/lib/InterfaceID-X2.c | 109 + Bouncer/e2sm_rc/lib/InterfaceID-Xn.c | 50 + Bouncer/e2sm_rc/lib/InterfaceIdentifier.c | 122 + Bouncer/e2sm_rc/lib/InterfaceType.c | 68 + .../e2sm_rc/lib/L2Parameters-RANParameter-Item.c | 73 + Bouncer/e2sm_rc/lib/LogicalOR.c | 58 + Bouncer/e2sm_rc/lib/MME-Code.c | 65 + Bouncer/e2sm_rc/lib/MME-Group-ID.c | 65 + Bouncer/e2sm_rc/lib/MME-UE-S1AP-ID.c | 60 + Bouncer/e2sm_rc/lib/MessageType-Choice-NI.c | 74 + Bouncer/e2sm_rc/lib/MessageType-Choice-RRC.c | 50 + Bouncer/e2sm_rc/lib/MessageType-Choice.c | 67 + Bouncer/e2sm_rc/lib/NG-RANnodeUEXnAPID.c | 60 + Bouncer/e2sm_rc/lib/NGENB-CU-UE-W1AP-ID.c | 60 + Bouncer/e2sm_rc/lib/NGENB-DU-ID.c | 70 + Bouncer/e2sm_rc/lib/NR-ARFCN.c | 83 + Bouncer/e2sm_rc/lib/NR-CGI.c | 60 + Bouncer/e2sm_rc/lib/NR-PCI.c | 64 + Bouncer/e2sm_rc/lib/NRCellIdentity.c | 70 + Bouncer/e2sm_rc/lib/NRFrequencyBand-List.c | 53 + Bouncer/e2sm_rc/lib/NRFrequencyBandItem.c | 93 + Bouncer/e2sm_rc/lib/NRFrequencyInfo.c | 72 + Bouncer/e2sm_rc/lib/NRFrequencyShift7p5khz.c | 58 + Bouncer/e2sm_rc/lib/NativeEnumerated.c | 367 + Bouncer/e2sm_rc/lib/NativeEnumerated_oer.c | 149 + Bouncer/e2sm_rc/lib/NativeInteger.c | 550 + Bouncer/e2sm_rc/lib/NativeInteger_oer.c | 99 + Bouncer/e2sm_rc/lib/NativeReal.c | 781 + .../e2sm_rc/lib/NeighborCell-Item-Choice-E-UTRA.c | 245 + Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-NR.c | 306 + Bouncer/e2sm_rc/lib/NeighborCell-Item.c | 67 + Bouncer/e2sm_rc/lib/NeighborCell-List.c | 53 + Bouncer/e2sm_rc/lib/NeighborRelation-Info.c | 70 + Bouncer/e2sm_rc/lib/NgENB-ID.c | 192 + Bouncer/e2sm_rc/lib/OCTET_STRING.c | 2411 + Bouncer/e2sm_rc/lib/OCTET_STRING_oer.c | 171 + Bouncer/e2sm_rc/lib/OPEN_TYPE.c | 509 + Bouncer/e2sm_rc/lib/OPEN_TYPE_oer.c | 92 + Bouncer/e2sm_rc/lib/PLMNIdentity.c | 65 + .../e2sm_rc/lib/PolicyAction-RANParameter-Item.c | 73 + .../lib/PolicyCondition-RANParameter-Item.c | 73 + Bouncer/e2sm_rc/lib/PrintableString.c | 130 + Bouncer/e2sm_rc/lib/QCI.c | 64 + Bouncer/e2sm_rc/lib/QoSID.c | 65 + Bouncer/e2sm_rc/lib/QosFlowIdentifier.c | 64 + Bouncer/e2sm_rc/lib/RAN-CallProcess-ID.c | 69 + .../RANFunctionDefinition-Control-Action-Item.c | 152 + .../lib/RANFunctionDefinition-Control-Item.c | 282 + .../e2sm_rc/lib/RANFunctionDefinition-Control.c | 130 + ...nctionDefinition-EventTrigger-Breakpoint-Item.c | 152 + ...ctionDefinition-EventTrigger-CallProcess-Item.c | 150 + ...RANFunctionDefinition-EventTrigger-Style-Item.c | 70 + .../lib/RANFunctionDefinition-EventTrigger.c | 492 + .../RANFunctionDefinition-Insert-Indication-Item.c | 152 + .../lib/RANFunctionDefinition-Insert-Item.c | 202 + Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert.c | 130 + .../lib/RANFunctionDefinition-Policy-Action-Item.c | 252 + .../lib/RANFunctionDefinition-Policy-Item.c | 162 + Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy.c | 130 + .../lib/RANFunctionDefinition-Report-Item.c | 192 + Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report.c | 130 + .../lib/RANParameter-Definition-Choice-LIST-Item.c | 73 + .../lib/RANParameter-Definition-Choice-LIST.c | 130 + ...RANParameter-Definition-Choice-STRUCTURE-Item.c | 73 + .../lib/RANParameter-Definition-Choice-STRUCTURE.c | 130 + .../e2sm_rc/lib/RANParameter-Definition-Choice.c | 67 + Bouncer/e2sm_rc/lib/RANParameter-Definition.c | 51 + Bouncer/e2sm_rc/lib/RANParameter-ID.c | 69 + Bouncer/e2sm_rc/lib/RANParameter-LIST.c | 130 + Bouncer/e2sm_rc/lib/RANParameter-Name.c | 109 + Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE-Item.c | 61 + Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE.c | 132 + ...RANParameter-Testing-Item-Choice-ElementFalse.c | 73 + .../RANParameter-Testing-Item-Choice-ElementTrue.c | 50 + .../lib/RANParameter-Testing-Item-Choice-List.c | 51 + .../RANParameter-Testing-Item-Choice-Structure.c | 51 + Bouncer/e2sm_rc/lib/RANParameter-Testing-Item.c | 141 + Bouncer/e2sm_rc/lib/RANParameter-Testing-LIST.c | 53 + .../e2sm_rc/lib/RANParameter-Testing-STRUCTURE.c | 53 + Bouncer/e2sm_rc/lib/RANParameter-Testing.c | 53 + .../e2sm_rc/lib/RANParameter-TestingCondition.c | 179 + Bouncer/e2sm_rc/lib/RANParameter-Value.c | 105 + .../RANParameter-ValueType-Choice-ElementFalse.c | 53 + .../RANParameter-ValueType-Choice-ElementTrue.c | 50 + .../lib/RANParameter-ValueType-Choice-List.c | 51 + .../lib/RANParameter-ValueType-Choice-Structure.c | 51 + Bouncer/e2sm_rc/lib/RANParameter-ValueType.c | 89 + Bouncer/e2sm_rc/lib/RANUEID.c | 65 + Bouncer/e2sm_rc/lib/RANfunction-Name.c | 316 + Bouncer/e2sm_rc/lib/REAL.c | 1028 + Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-ID.c | 64 + .../e2sm_rc/lib/RIC-CallProcessBreakpoint-Name.c | 109 + Bouncer/e2sm_rc/lib/RIC-CallProcessType-ID.c | 64 + Bouncer/e2sm_rc/lib/RIC-CallProcessType-Name.c | 109 + Bouncer/e2sm_rc/lib/RIC-ControlAction-ID.c | 64 + Bouncer/e2sm_rc/lib/RIC-ControlAction-Name.c | 109 + Bouncer/e2sm_rc/lib/RIC-EventTrigger-Cell-ID.c | 64 + Bouncer/e2sm_rc/lib/RIC-EventTrigger-UE-ID.c | 64 + Bouncer/e2sm_rc/lib/RIC-EventTrigger-UEevent-ID.c | 64 + Bouncer/e2sm_rc/lib/RIC-EventTriggerCondition-ID.c | 64 + Bouncer/e2sm_rc/lib/RIC-Format-Type.c | 31 + Bouncer/e2sm_rc/lib/RIC-InsertIndication-ID.c | 64 + Bouncer/e2sm_rc/lib/RIC-InsertIndication-Name.c | 109 + .../lib/RIC-PolicyAction-RANParameter-Item.c | 60 + Bouncer/e2sm_rc/lib/RIC-PolicyAction.c | 203 + Bouncer/e2sm_rc/lib/RIC-Style-Name.c | 109 + Bouncer/e2sm_rc/lib/RIC-Style-Type.c | 31 + Bouncer/e2sm_rc/lib/RRC-MessageID.c | 117 + Bouncer/e2sm_rc/lib/RRC-State.c | 62 + Bouncer/e2sm_rc/lib/RRCclass-LTE.c | 78 + Bouncer/e2sm_rc/lib/RRCclass-NR.c | 70 + Bouncer/e2sm_rc/lib/Report-RANParameter-Item.c | 73 + Bouncer/e2sm_rc/lib/S-NSSAI.c | 62 + Bouncer/e2sm_rc/lib/SD.c | 65 + Bouncer/e2sm_rc/lib/SST.c | 65 + Bouncer/e2sm_rc/lib/ServingCell-ARFCN.c | 66 + Bouncer/e2sm_rc/lib/ServingCell-PCI.c | 65 + Bouncer/e2sm_rc/lib/SubscriberProfileIDforRFP.c | 64 + Bouncer/e2sm_rc/lib/SupportedSULBandList.c | 53 + Bouncer/e2sm_rc/lib/SupportedSULFreqBandItem.c | 83 + Bouncer/e2sm_rc/lib/TriggerType-Choice-L2state.c | 50 + .../e2sm_rc/lib/TriggerType-Choice-RRCstate-Item.c | 62 + Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate.c | 130 + Bouncer/e2sm_rc/lib/TriggerType-Choice-UEID.c | 83 + Bouncer/e2sm_rc/lib/TriggerType-Choice.c | 78 + Bouncer/e2sm_rc/lib/UEID-EN-GNB.c | 103 + Bouncer/e2sm_rc/lib/UEID-ENB.c | 93 + Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c | 50 + Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-List.c | 53 + Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c | 50 + Bouncer/e2sm_rc/lib/UEID-GNB-CU-F1AP-ID-List.c | 53 + Bouncer/e2sm_rc/lib/UEID-GNB-CU-UP.c | 62 + Bouncer/e2sm_rc/lib/UEID-GNB-DU.c | 62 + Bouncer/e2sm_rc/lib/UEID-GNB.c | 126 + Bouncer/e2sm_rc/lib/UEID-NG-ENB-DU.c | 50 + Bouncer/e2sm_rc/lib/UEID-NG-ENB.c | 104 + Bouncer/e2sm_rc/lib/UEID.c | 122 + .../lib/UEIdentification-RANParameter-Item.c | 73 + Bouncer/e2sm_rc/lib/asn_SEQUENCE_OF.c | 41 + Bouncer/e2sm_rc/lib/asn_SET_OF.c | 88 + Bouncer/e2sm_rc/lib/asn_application.c | 481 + Bouncer/e2sm_rc/lib/asn_bit_data.c | 333 + Bouncer/e2sm_rc/lib/asn_codecs_prim.c | 317 + Bouncer/e2sm_rc/lib/asn_internal.c | 49 + Bouncer/e2sm_rc/lib/asn_random_fill.c | 56 + Bouncer/e2sm_rc/lib/ber_decoder.c | 283 + Bouncer/e2sm_rc/lib/ber_tlv_length.c | 168 + Bouncer/e2sm_rc/lib/ber_tlv_tag.c | 144 + Bouncer/e2sm_rc/lib/constr_CHOICE.c | 1533 + Bouncer/e2sm_rc/lib/constr_CHOICE_oer.c | 380 + Bouncer/e2sm_rc/lib/constr_SEQUENCE.c | 2059 + Bouncer/e2sm_rc/lib/constr_SEQUENCE_OF.c | 358 + Bouncer/e2sm_rc/lib/constr_SEQUENCE_oer.c | 561 + Bouncer/e2sm_rc/lib/constr_SET_OF.c | 1441 + Bouncer/e2sm_rc/lib/constr_SET_OF_oer.c | 285 + Bouncer/e2sm_rc/lib/constr_TYPE.c | 80 + Bouncer/e2sm_rc/lib/constraints.c | 93 + Bouncer/e2sm_rc/lib/der_encoder.c | 194 + Bouncer/e2sm_rc/lib/oer_decoder.c | 152 + Bouncer/e2sm_rc/lib/oer_encoder.c | 141 + Bouncer/e2sm_rc/lib/oer_support.c | 122 + Bouncer/e2sm_rc/lib/per_decoder.c | 185 + Bouncer/e2sm_rc/lib/per_encoder.c | 265 + Bouncer/e2sm_rc/lib/per_opentype.c | 533 + Bouncer/e2sm_rc/lib/per_support.c | 492 + Bouncer/e2sm_rc/lib/xer_decoder.c | 369 + Bouncer/e2sm_rc/lib/xer_encoder.c | 237 + Bouncer/e2sm_rc/lib/xer_support.c | 227 + Bouncer/e2sm_rc/wrapper.c | 617 + Bouncer/e2sm_rc/wrapper.h | 70 + Bouncer/init/config-file.json | 52 - Bouncer/init/init_script.py | 132 - Bouncer/init/routes.txt | 5 - Bouncer/releases/container-release-app_bxApp.yaml | 11 - Bouncer/rmr-version.yaml | 3 - Bouncer/routes.txt | 7 + Bouncer/schemas/b_xapp-policy.json | 22 - Bouncer/schemas/b_xapp-ves.json | 30 - Bouncer/src/Makefile | 79 - Bouncer/src/README | 44 - Bouncer/src/b_xapp_main.cc | 184 - Bouncer/src/bouncer.cpp | 48 + Bouncer/src/bouncer.h | 10 + Bouncer/src/header.h | 18 + Bouncer/src/helper.h | 18 + Bouncer/src/main.cpp | 91 + Bouncer/src/routes.txt | 15 - Bouncer/src/run_xapp.sh | 20 - Bouncer/src/subscription.h | 29 + Bouncer/src/xapp-asn/e2ap/e2ap_control.cc | 266 - Bouncer/src/xapp-asn/e2ap/e2ap_control.hpp | 66 - Bouncer/src/xapp-asn/e2ap/e2ap_control_helper.hpp | 50 - Bouncer/src/xapp-asn/e2ap/e2ap_control_response.cc | 415 - .../src/xapp-asn/e2ap/e2ap_control_response.hpp | 79 - Bouncer/src/xapp-asn/e2ap/e2ap_indication.cc | 283 - Bouncer/src/xapp-asn/e2ap/e2ap_indication.hpp | 67 - .../src/xapp-asn/e2ap/e2ap_indication_helper.hpp | 47 - Bouncer/src/xapp-asn/e2ap/generic_helpers.hpp | 49 - Bouncer/src/xapp-asn/e2ap/response_helper.hpp | 181 - .../xapp-asn/e2ap/subscription_delete_request.cc | 185 - .../xapp-asn/e2ap/subscription_delete_request.hpp | 67 - .../xapp-asn/e2ap/subscription_delete_response.cc | 292 - .../xapp-asn/e2ap/subscription_delete_response.hpp | 79 - Bouncer/src/xapp-asn/e2ap/subscription_helper.hpp | 181 - Bouncer/src/xapp-asn/e2ap/subscription_request.cc | 307 - Bouncer/src/xapp-asn/e2ap/subscription_request.hpp | 73 - Bouncer/src/xapp-asn/e2ap/subscription_response.cc | 583 - .../src/xapp-asn/e2ap/subscription_response.hpp | 81 - Bouncer/src/xapp-asn/e2sm/e2sm_control.cc | 190 - Bouncer/src/xapp-asn/e2sm/e2sm_control.hpp | 68 - Bouncer/src/xapp-asn/e2sm/e2sm_helpers.hpp | 104 - Bouncer/src/xapp-asn/e2sm/e2sm_indication.cc | 187 - Bouncer/src/xapp-asn/e2sm/e2sm_indication.hpp | 69 - Bouncer/src/xapp-asn/e2sm/e2sm_subscription.cc | 179 - Bouncer/src/xapp-asn/e2sm/e2sm_subscription.hpp | 69 - Bouncer/src/xapp-formats/e2ap/e2ap_control.cc | 266 - Bouncer/src/xapp-formats/e2ap/e2ap_control.hpp | 66 - .../src/xapp-formats/e2ap/e2ap_control_helper.hpp | 50 - .../src/xapp-formats/e2ap/e2ap_control_response.cc | 415 - .../xapp-formats/e2ap/e2ap_control_response.hpp | 79 - Bouncer/src/xapp-formats/e2ap/e2ap_indication.cc | 283 - Bouncer/src/xapp-formats/e2ap/e2ap_indication.hpp | 67 - .../xapp-formats/e2ap/e2ap_indication_helper.hpp | 47 - Bouncer/src/xapp-formats/e2ap/generic_helpers.hpp | 49 - Bouncer/src/xapp-formats/e2ap/response_helper.hpp | 181 - .../e2ap/subscription_delete_request.cc | 180 - .../e2ap/subscription_delete_request.hpp | 67 - .../e2ap/subscription_delete_response.cc | 292 - .../e2ap/subscription_delete_response.hpp | 79 - .../src/xapp-formats/e2ap/subscription_helper.hpp | 196 - .../src/xapp-formats/e2ap/subscription_request.cc | 308 - .../src/xapp-formats/e2ap/subscription_request.hpp | 73 - .../src/xapp-formats/e2ap/subscription_response.cc | 583 - .../xapp-formats/e2ap/subscription_response.hpp | 81 - Bouncer/src/xapp-formats/e2sm/e2sm.cc | 660 - Bouncer/src/xapp-formats/e2sm/e2sm.hpp | 145 - Bouncer/src/xapp-formats/e2sm/e2sm_helpers.hpp | 115 - Bouncer/src/xapp-mgmt/a1_helper.hpp | 49 - Bouncer/src/xapp-mgmt/format_helper.hpp | 48 - Bouncer/src/xapp-mgmt/msgs_proc.cc | 293 - Bouncer/src/xapp-mgmt/msgs_proc.hpp | 68 - Bouncer/src/xapp-mgmt/subs_mgmt.cc | 148 - Bouncer/src/xapp-mgmt/subs_mgmt.hpp | 253 - Bouncer/src/xapp-mgmt/xapp_handler.hpp | 21 - Bouncer/src/xapp-utils/xapp_config.cc | 138 - Bouncer/src/xapp-utils/xapp_config.hpp | 67 - Bouncer/src/xapp-utils/xapp_rmr.cc | 190 - Bouncer/src/xapp-utils/xapp_rmr.hpp | 213 - Bouncer/src/xapp-utils/xapp_sdl.cc | 71 - Bouncer/src/xapp-utils/xapp_sdl.hpp | 57 - Bouncer/src/xapp.cc | 481 - Bouncer/src/xapp.hpp | 94 - Bouncer/src/xapp_env.sh | 14 - Bouncer/tox.ini | 34 - Bouncer/xapp-descriptor/bouncer-register.json | 9 + Bouncer/xapp-descriptor/config-file.json | 53 + Bouncer/xapp-descriptor/run.sh | 7 + Bouncer/{init => xapp-descriptor}/schema.json | 0 1704 files changed, 262484 insertions(+), 39051 deletions(-) delete mode 100644 Bouncer/README delete mode 100644 Bouncer/asn1c_defs/B-ControlCommand.c delete mode 100644 Bouncer/asn1c_defs/B-ControlCommand.h delete mode 100644 Bouncer/asn1c_defs/B-Header.c delete mode 100644 Bouncer/asn1c_defs/B-Header.h delete mode 100644 Bouncer/asn1c_defs/B-Message.c delete mode 100644 Bouncer/asn1c_defs/B-Message.h delete mode 100644 Bouncer/asn1c_defs/B-TriggerNature.c delete mode 100644 Bouncer/asn1c_defs/B-TriggerNature.h delete mode 100644 Bouncer/asn1c_defs/Cause.c delete mode 100644 Bouncer/asn1c_defs/Cause.h delete mode 100644 Bouncer/asn1c_defs/CauseMisc.c delete mode 100644 Bouncer/asn1c_defs/CauseMisc.h delete mode 100644 Bouncer/asn1c_defs/CauseProtocol.c delete mode 100644 Bouncer/asn1c_defs/CauseProtocol.h delete mode 100644 Bouncer/asn1c_defs/CauseRIC.c delete mode 100644 Bouncer/asn1c_defs/CauseRIC.h delete mode 100644 Bouncer/asn1c_defs/CauseRICservice.c delete mode 100644 Bouncer/asn1c_defs/CauseRICservice.h delete mode 100644 Bouncer/asn1c_defs/CauseTransport.c delete mode 100644 Bouncer/asn1c_defs/CauseTransport.h delete mode 100644 Bouncer/asn1c_defs/Criticality.c delete mode 100644 Bouncer/asn1c_defs/Criticality.h delete mode 100644 Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.c delete mode 100644 Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.h delete mode 100644 Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.c delete mode 100644 Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.h delete mode 100644 Bouncer/asn1c_defs/CriticalityDiagnostics.c delete mode 100644 Bouncer/asn1c_defs/CriticalityDiagnostics.h delete mode 100644 Bouncer/asn1c_defs/E2AP-PDU.c delete mode 100644 Bouncer/asn1c_defs/E2AP-PDU.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.h delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.c delete mode 100644 Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.h delete mode 100644 Bouncer/asn1c_defs/E2setupFailure.c delete mode 100644 Bouncer/asn1c_defs/E2setupFailure.h delete mode 100644 Bouncer/asn1c_defs/E2setupRequest.c delete mode 100644 Bouncer/asn1c_defs/E2setupRequest.h delete mode 100644 Bouncer/asn1c_defs/E2setupResponse.c delete mode 100644 Bouncer/asn1c_defs/E2setupResponse.h delete mode 100644 Bouncer/asn1c_defs/ENB-ID-Choice.c delete mode 100644 Bouncer/asn1c_defs/ENB-ID-Choice.h delete mode 100644 Bouncer/asn1c_defs/ENB-ID.c delete mode 100644 Bouncer/asn1c_defs/ENB-ID.h delete mode 100644 Bouncer/asn1c_defs/ENGNB-ID.c delete mode 100644 Bouncer/asn1c_defs/ENGNB-ID.h delete mode 100644 Bouncer/asn1c_defs/ErrorIndication.c delete mode 100644 Bouncer/asn1c_defs/ErrorIndication.h delete mode 100644 Bouncer/asn1c_defs/GNB-CU-UP-ID.c delete mode 100644 Bouncer/asn1c_defs/GNB-CU-UP-ID.h delete mode 100644 Bouncer/asn1c_defs/GNB-DU-ID.c delete mode 100644 Bouncer/asn1c_defs/GNB-DU-ID.h delete mode 100644 Bouncer/asn1c_defs/GNB-ID-Choice.c delete mode 100644 Bouncer/asn1c_defs/GNB-ID-Choice.h delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-eNB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-eNB-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-gNB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-gNB-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalENB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalENB-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalRIC-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalRIC-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalenGNB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalenGNB-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalgNB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalgNB-ID.h delete mode 100644 Bouncer/asn1c_defs/GlobalngeNB-ID.c delete mode 100644 Bouncer/asn1c_defs/GlobalngeNB-ID.h delete mode 100644 Bouncer/asn1c_defs/InitiatingMessage.c delete mode 100644 Bouncer/asn1c_defs/InitiatingMessage.h delete mode 100644 Bouncer/asn1c_defs/NativeEnumerated.c delete mode 100644 Bouncer/asn1c_defs/OCTET_STRING.c delete mode 100644 Bouncer/asn1c_defs/PLMN-Identity.c delete mode 100644 Bouncer/asn1c_defs/PLMN-Identity.h delete mode 100644 Bouncer/asn1c_defs/Presence.c delete mode 100644 Bouncer/asn1c_defs/Presence.h delete mode 100644 Bouncer/asn1c_defs/ProcedureCode.c delete mode 100644 Bouncer/asn1c_defs/ProcedureCode.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-Container.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-Container.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ContainerList.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ContainerList.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ContainerPair.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ContainerPair.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-Field.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-Field.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-FieldPair.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-FieldPair.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ID.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-ID.h delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-SingleContainer.c delete mode 100644 Bouncer/asn1c_defs/ProtocolIE-SingleContainer.h delete mode 100644 Bouncer/asn1c_defs/RANfunction-Item.c delete mode 100644 Bouncer/asn1c_defs/RANfunction-Item.h delete mode 100644 Bouncer/asn1c_defs/RANfunctionDefinition.c delete mode 100644 Bouncer/asn1c_defs/RANfunctionDefinition.h delete mode 100644 Bouncer/asn1c_defs/RANfunctionID-Item.c delete mode 100644 Bouncer/asn1c_defs/RANfunctionID-Item.h delete mode 100644 Bouncer/asn1c_defs/RANfunctionID.c delete mode 100644 Bouncer/asn1c_defs/RANfunctionID.h delete mode 100644 Bouncer/asn1c_defs/RANfunctionIDcause-Item.c delete mode 100644 Bouncer/asn1c_defs/RANfunctionIDcause-Item.h delete mode 100644 Bouncer/asn1c_defs/RANfunctionRevision.c delete mode 100644 Bouncer/asn1c_defs/RANfunctionRevision.h delete mode 100644 Bouncer/asn1c_defs/RANfunctions-List.c delete mode 100644 Bouncer/asn1c_defs/RANfunctions-List.h delete mode 100644 Bouncer/asn1c_defs/RANfunctionsID-List.c delete mode 100644 Bouncer/asn1c_defs/RANfunctionsID-List.h delete mode 100644 Bouncer/asn1c_defs/RANfunctionsIDcause-List.c delete mode 100644 Bouncer/asn1c_defs/RANfunctionsIDcause-List.h delete mode 100644 Bouncer/asn1c_defs/RANparameter-ID.c delete mode 100644 Bouncer/asn1c_defs/RANparameter-ID.h delete mode 100644 Bouncer/asn1c_defs/RANparameter-Item.c delete mode 100644 Bouncer/asn1c_defs/RANparameter-Item.h delete mode 100644 Bouncer/asn1c_defs/RANparameter-Name.c delete mode 100644 Bouncer/asn1c_defs/RANparameter-Name.h delete mode 100644 Bouncer/asn1c_defs/RANparameter-Test.c delete mode 100644 Bouncer/asn1c_defs/RANparameter-Test.h delete mode 100644 Bouncer/asn1c_defs/RANparameter-Value.c delete mode 100644 Bouncer/asn1c_defs/RANparameter-Value.h delete mode 100644 Bouncer/asn1c_defs/RICaction-Admitted-Item.c delete mode 100644 Bouncer/asn1c_defs/RICaction-Admitted-Item.h delete mode 100644 Bouncer/asn1c_defs/RICaction-Admitted-List.c delete mode 100644 Bouncer/asn1c_defs/RICaction-Admitted-List.h delete mode 100644 Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.c delete mode 100644 Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.h delete mode 100644 Bouncer/asn1c_defs/RICaction-NotAdmitted-List.c delete mode 100644 Bouncer/asn1c_defs/RICaction-NotAdmitted-List.h delete mode 100644 Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.c delete mode 100644 Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.h delete mode 100644 Bouncer/asn1c_defs/RICactionDefinition.c delete mode 100644 Bouncer/asn1c_defs/RICactionDefinition.h delete mode 100644 Bouncer/asn1c_defs/RICactionID.c delete mode 100644 Bouncer/asn1c_defs/RICactionID.h delete mode 100644 Bouncer/asn1c_defs/RICactionType.c delete mode 100644 Bouncer/asn1c_defs/RICactionType.h delete mode 100644 Bouncer/asn1c_defs/RICactions-ToBeSetup-List.c delete mode 100644 Bouncer/asn1c_defs/RICactions-ToBeSetup-List.h delete mode 100644 Bouncer/asn1c_defs/RICcallProcessID.c delete mode 100644 Bouncer/asn1c_defs/RICcallProcessID.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolAckRequest.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolAckRequest.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolAcknowledge.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolAcknowledge.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolFailure.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolFailure.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolHeader.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolHeader.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolMessage.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolMessage.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolOutcome.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolOutcome.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolRequest.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolRequest.h delete mode 100644 Bouncer/asn1c_defs/RICcontrolStatus.c delete mode 100644 Bouncer/asn1c_defs/RICcontrolStatus.h delete mode 100644 Bouncer/asn1c_defs/RICeventTriggerDefinition.c delete mode 100644 Bouncer/asn1c_defs/RICeventTriggerDefinition.h delete mode 100644 Bouncer/asn1c_defs/RICindication.c delete mode 100644 Bouncer/asn1c_defs/RICindication.h delete mode 100644 Bouncer/asn1c_defs/RICindicationHeader.c delete mode 100644 Bouncer/asn1c_defs/RICindicationHeader.h delete mode 100644 Bouncer/asn1c_defs/RICindicationMessage.c delete mode 100644 Bouncer/asn1c_defs/RICindicationMessage.h delete mode 100644 Bouncer/asn1c_defs/RICindicationSN.c delete mode 100644 Bouncer/asn1c_defs/RICindicationSN.h delete mode 100644 Bouncer/asn1c_defs/RICindicationType.c delete mode 100644 Bouncer/asn1c_defs/RICindicationType.h delete mode 100644 Bouncer/asn1c_defs/RICrequestID.c delete mode 100644 Bouncer/asn1c_defs/RICrequestID.h delete mode 100644 Bouncer/asn1c_defs/RICserviceQuery.c delete mode 100644 Bouncer/asn1c_defs/RICserviceQuery.h delete mode 100644 Bouncer/asn1c_defs/RICserviceUpdate.c delete mode 100644 Bouncer/asn1c_defs/RICserviceUpdate.h delete mode 100644 Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.c delete mode 100644 Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.h delete mode 100644 Bouncer/asn1c_defs/RICserviceUpdateFailure.c delete mode 100644 Bouncer/asn1c_defs/RICserviceUpdateFailure.h delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.c delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.h delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.c delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.h delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.c delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.h delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDetails.c delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionDetails.h delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionFailure.c delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionFailure.h delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionRequest.c delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionRequest.h delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionResponse.c delete mode 100644 Bouncer/asn1c_defs/RICsubscriptionResponse.h delete mode 100644 Bouncer/asn1c_defs/RICsubsequentAction.c delete mode 100644 Bouncer/asn1c_defs/RICsubsequentAction.h delete mode 100644 Bouncer/asn1c_defs/RICsubsequentActionType.c delete mode 100644 Bouncer/asn1c_defs/RICsubsequentActionType.h delete mode 100644 Bouncer/asn1c_defs/RICtimeToWait.c delete mode 100644 Bouncer/asn1c_defs/RICtimeToWait.h delete mode 100644 Bouncer/asn1c_defs/ResetRequest.c delete mode 100644 Bouncer/asn1c_defs/ResetRequest.h delete mode 100644 Bouncer/asn1c_defs/ResetResponse.c delete mode 100644 Bouncer/asn1c_defs/ResetResponse.h delete mode 100644 Bouncer/asn1c_defs/SuccessfulOutcome.c delete mode 100644 Bouncer/asn1c_defs/SuccessfulOutcome.h delete mode 100644 Bouncer/asn1c_defs/TimeToWait.c delete mode 100644 Bouncer/asn1c_defs/TimeToWait.h delete mode 100644 Bouncer/asn1c_defs/TriggeringMessage.c delete mode 100644 Bouncer/asn1c_defs/TriggeringMessage.h delete mode 100644 Bouncer/asn1c_defs/TypeOfError.c delete mode 100644 Bouncer/asn1c_defs/TypeOfError.h delete mode 100644 Bouncer/asn1c_defs/UnsuccessfulOutcome.c delete mode 100644 Bouncer/asn1c_defs/UnsuccessfulOutcome.h delete mode 100644 Bouncer/asn1c_defs/asn_constant.h delete mode 100644 Bouncer/asn1c_defs/constr_CHOICE.c delete mode 100644 Bouncer/asn1c_defs/pdu_collection.c create mode 100644 Bouncer/baseimage/Dockerfile delete mode 100644 Bouncer/docs/_static/logo.png delete mode 100644 Bouncer/docs/conf.py delete mode 100644 Bouncer/docs/conf.yaml delete mode 100644 Bouncer/docs/e2sm-Bouncer-v001.asn delete mode 100644 Bouncer/docs/favicon.ico delete mode 100644 Bouncer/docs/index.rst delete mode 100644 Bouncer/docs/installation-guide.rst delete mode 100644 Bouncer/docs/overview.rst delete mode 100644 Bouncer/docs/release-notes.rst delete mode 100644 Bouncer/docs/requirements-docs.txt delete mode 100644 Bouncer/docs/user-guide.rst rename Bouncer/{asn1c_defs => e2ap/headers}/ANY.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/BIT_STRING.h (100%) create mode 100644 Bouncer/e2ap/headers/Cause.h create mode 100644 Bouncer/e2ap/headers/CauseMisc.h create mode 100644 Bouncer/e2ap/headers/CauseProtocol.h create mode 100644 Bouncer/e2ap/headers/CauseRIC.h create mode 100644 Bouncer/e2ap/headers/CauseRICservice.h create mode 100644 Bouncer/e2ap/headers/CauseTransport.h create mode 100644 Bouncer/e2ap/headers/Criticality.h create mode 100644 Bouncer/e2ap/headers/CriticalityDiagnostics-IE-Item.h create mode 100644 Bouncer/e2ap/headers/CriticalityDiagnostics-IE-List.h create mode 100644 Bouncer/e2ap/headers/CriticalityDiagnostics.h create mode 100644 Bouncer/e2ap/headers/E2AP-PDU.h create mode 100644 Bouncer/e2ap/headers/E2setupFailure.h create mode 100644 Bouncer/e2ap/headers/E2setupRequest.h create mode 100644 Bouncer/e2ap/headers/E2setupResponse.h create mode 100644 Bouncer/e2ap/headers/ENB-ID-Choice.h create mode 100644 Bouncer/e2ap/headers/ENB-ID.h create mode 100644 Bouncer/e2ap/headers/ENGNB-ID.h create mode 100644 Bouncer/e2ap/headers/ErrorIndication.h create mode 100644 Bouncer/e2ap/headers/GNB-CU-UP-ID.h create mode 100644 Bouncer/e2ap/headers/GNB-DU-ID.h create mode 100644 Bouncer/e2ap/headers/GNB-ID-Choice.h create mode 100644 Bouncer/e2ap/headers/GlobalE2node-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalE2node-eNB-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalE2node-en-gNB-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalE2node-gNB-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalE2node-ng-eNB-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalENB-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalRIC-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalenGNB-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalgNB-ID.h create mode 100644 Bouncer/e2ap/headers/GlobalngeNB-ID.h rename Bouncer/{asn1c_defs => e2ap/headers}/INTEGER.h (100%) create mode 100644 Bouncer/e2ap/headers/InitiatingMessage.h rename Bouncer/{asn1c_defs => e2ap/headers}/NativeEnumerated.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/NativeInteger.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/OCTET_STRING.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/OPEN_TYPE.h (100%) create mode 100644 Bouncer/e2ap/headers/PLMN-Identity.h create mode 100644 Bouncer/e2ap/headers/Presence.h create mode 100644 Bouncer/e2ap/headers/ProcedureCode.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-Container.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-ContainerList.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-ContainerPair.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-ContainerPairList.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-Field.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-FieldPair.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-ID.h create mode 100644 Bouncer/e2ap/headers/ProtocolIE-SingleContainer.h create mode 100644 Bouncer/e2ap/headers/RANfunction-Item.h create mode 100644 Bouncer/e2ap/headers/RANfunctionDefinition.h create mode 100644 Bouncer/e2ap/headers/RANfunctionID-Item.h create mode 100644 Bouncer/e2ap/headers/RANfunctionID.h create mode 100644 Bouncer/e2ap/headers/RANfunctionIDcause-Item.h create mode 100644 Bouncer/e2ap/headers/RANfunctionRevision.h create mode 100644 Bouncer/e2ap/headers/RANfunctions-List.h create mode 100644 Bouncer/e2ap/headers/RANfunctionsID-List.h create mode 100644 Bouncer/e2ap/headers/RANfunctionsIDcause-List.h create mode 100644 Bouncer/e2ap/headers/RICaction-Admitted-Item.h create mode 100644 Bouncer/e2ap/headers/RICaction-Admitted-List.h create mode 100644 Bouncer/e2ap/headers/RICaction-NotAdmitted-Item.h create mode 100644 Bouncer/e2ap/headers/RICaction-NotAdmitted-List.h create mode 100644 Bouncer/e2ap/headers/RICaction-ToBeSetup-Item.h create mode 100644 Bouncer/e2ap/headers/RICactionDefinition.h create mode 100644 Bouncer/e2ap/headers/RICactionID.h create mode 100644 Bouncer/e2ap/headers/RICactionType.h create mode 100644 Bouncer/e2ap/headers/RICactions-ToBeSetup-List.h create mode 100644 Bouncer/e2ap/headers/RICcallProcessID.h create mode 100644 Bouncer/e2ap/headers/RICcontrolAckRequest.h create mode 100644 Bouncer/e2ap/headers/RICcontrolAcknowledge.h create mode 100644 Bouncer/e2ap/headers/RICcontrolFailure.h create mode 100644 Bouncer/e2ap/headers/RICcontrolHeader.h create mode 100644 Bouncer/e2ap/headers/RICcontrolMessage.h create mode 100644 Bouncer/e2ap/headers/RICcontrolOutcome.h create mode 100644 Bouncer/e2ap/headers/RICcontrolRequest.h create mode 100644 Bouncer/e2ap/headers/RICcontrolStatus.h create mode 100644 Bouncer/e2ap/headers/RICeventTriggerDefinition.h create mode 100644 Bouncer/e2ap/headers/RICindication.h create mode 100644 Bouncer/e2ap/headers/RICindicationHeader.h create mode 100644 Bouncer/e2ap/headers/RICindicationMessage.h create mode 100644 Bouncer/e2ap/headers/RICindicationSN.h create mode 100644 Bouncer/e2ap/headers/RICindicationType.h create mode 100644 Bouncer/e2ap/headers/RICrequestID.h create mode 100644 Bouncer/e2ap/headers/RICserviceQuery.h create mode 100644 Bouncer/e2ap/headers/RICserviceUpdate.h create mode 100644 Bouncer/e2ap/headers/RICserviceUpdateAcknowledge.h create mode 100644 Bouncer/e2ap/headers/RICserviceUpdateFailure.h create mode 100644 Bouncer/e2ap/headers/RICsubscriptionDeleteFailure.h create mode 100644 Bouncer/e2ap/headers/RICsubscriptionDeleteRequest.h create mode 100644 Bouncer/e2ap/headers/RICsubscriptionDeleteResponse.h create mode 100644 Bouncer/e2ap/headers/RICsubscriptionDetails.h create mode 100644 Bouncer/e2ap/headers/RICsubscriptionFailure.h create mode 100644 Bouncer/e2ap/headers/RICsubscriptionRequest.h create mode 100644 Bouncer/e2ap/headers/RICsubscriptionResponse.h create mode 100644 Bouncer/e2ap/headers/RICsubsequentAction.h create mode 100644 Bouncer/e2ap/headers/RICsubsequentActionType.h create mode 100644 Bouncer/e2ap/headers/RICtimeToWait.h create mode 100644 Bouncer/e2ap/headers/ResetRequest.h create mode 100644 Bouncer/e2ap/headers/ResetResponse.h create mode 100644 Bouncer/e2ap/headers/SuccessfulOutcome.h create mode 100644 Bouncer/e2ap/headers/TimeToWait.h create mode 100644 Bouncer/e2ap/headers/TriggeringMessage.h create mode 100644 Bouncer/e2ap/headers/TypeOfError.h create mode 100644 Bouncer/e2ap/headers/UnsuccessfulOutcome.h rename Bouncer/{asn1c_defs => e2ap/headers}/asn_SEQUENCE_OF.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_SET_OF.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_application.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_bit_data.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_codecs.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_codecs_prim.h (100%) create mode 100644 Bouncer/e2ap/headers/asn_constant.h rename Bouncer/{asn1c_defs => e2ap/headers}/asn_internal.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_ioc.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_random_fill.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/asn_system.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/ber_decoder.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/ber_tlv_length.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/ber_tlv_tag.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/constr_CHOICE.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/constr_SEQUENCE.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/constr_SEQUENCE_OF.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/constr_SET_OF.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/constr_TYPE.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/constraints.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/der_encoder.h (100%) create mode 100644 Bouncer/e2ap/headers/oer_decoder.h create mode 100644 Bouncer/e2ap/headers/oer_encoder.h create mode 100644 Bouncer/e2ap/headers/oer_support.h rename Bouncer/{asn1c_defs => e2ap/headers}/per_decoder.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/per_encoder.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/per_opentype.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/per_support.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/xer_decoder.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/xer_encoder.h (100%) rename Bouncer/{asn1c_defs => e2ap/headers}/xer_support.h (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/ANY.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/BIT_STRING.c (100%) create mode 100644 Bouncer/e2ap/lib/BIT_STRING_oer.c create mode 100644 Bouncer/e2ap/lib/Cause.c create mode 100644 Bouncer/e2ap/lib/CauseMisc.c create mode 100644 Bouncer/e2ap/lib/CauseProtocol.c create mode 100644 Bouncer/e2ap/lib/CauseRIC.c create mode 100644 Bouncer/e2ap/lib/CauseRICservice.c create mode 100644 Bouncer/e2ap/lib/CauseTransport.c create mode 100644 Bouncer/e2ap/lib/Criticality.c create mode 100644 Bouncer/e2ap/lib/CriticalityDiagnostics-IE-Item.c create mode 100644 Bouncer/e2ap/lib/CriticalityDiagnostics-IE-List.c create mode 100644 Bouncer/e2ap/lib/CriticalityDiagnostics.c create mode 100644 Bouncer/e2ap/lib/E2AP-PDU.c create mode 100644 Bouncer/e2ap/lib/E2setupFailure.c create mode 100644 Bouncer/e2ap/lib/E2setupRequest.c create mode 100644 Bouncer/e2ap/lib/E2setupResponse.c create mode 100644 Bouncer/e2ap/lib/ENB-ID-Choice.c create mode 100644 Bouncer/e2ap/lib/ENB-ID.c create mode 100644 Bouncer/e2ap/lib/ENGNB-ID.c create mode 100644 Bouncer/e2ap/lib/ErrorIndication.c create mode 100644 Bouncer/e2ap/lib/GNB-CU-UP-ID.c create mode 100644 Bouncer/e2ap/lib/GNB-DU-ID.c create mode 100644 Bouncer/e2ap/lib/GNB-ID-Choice.c create mode 100644 Bouncer/e2ap/lib/GlobalE2node-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalE2node-eNB-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalE2node-en-gNB-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalE2node-gNB-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalE2node-ng-eNB-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalENB-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalRIC-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalenGNB-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalgNB-ID.c create mode 100644 Bouncer/e2ap/lib/GlobalngeNB-ID.c rename Bouncer/{asn1c_defs => e2ap/lib}/INTEGER.c (100%) create mode 100644 Bouncer/e2ap/lib/INTEGER_oer.c create mode 100644 Bouncer/e2ap/lib/InitiatingMessage.c create mode 100644 Bouncer/e2ap/lib/NativeEnumerated.c create mode 100644 Bouncer/e2ap/lib/NativeEnumerated_oer.c rename Bouncer/{asn1c_defs => e2ap/lib}/NativeInteger.c (100%) create mode 100644 Bouncer/e2ap/lib/NativeInteger_oer.c create mode 100644 Bouncer/e2ap/lib/OCTET_STRING.c create mode 100644 Bouncer/e2ap/lib/OCTET_STRING_oer.c rename Bouncer/{asn1c_defs => e2ap/lib}/OPEN_TYPE.c (100%) create mode 100644 Bouncer/e2ap/lib/OPEN_TYPE_oer.c create mode 100644 Bouncer/e2ap/lib/PLMN-Identity.c create mode 100644 Bouncer/e2ap/lib/Presence.c create mode 100644 Bouncer/e2ap/lib/ProcedureCode.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-Container.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-ContainerList.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-ContainerPair.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-ContainerPairList.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-Field.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-FieldPair.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-ID.c create mode 100644 Bouncer/e2ap/lib/ProtocolIE-SingleContainer.c create mode 100644 Bouncer/e2ap/lib/RANfunction-Item.c create mode 100644 Bouncer/e2ap/lib/RANfunctionDefinition.c create mode 100644 Bouncer/e2ap/lib/RANfunctionID-Item.c create mode 100644 Bouncer/e2ap/lib/RANfunctionID.c create mode 100644 Bouncer/e2ap/lib/RANfunctionIDcause-Item.c create mode 100644 Bouncer/e2ap/lib/RANfunctionRevision.c create mode 100644 Bouncer/e2ap/lib/RANfunctions-List.c create mode 100644 Bouncer/e2ap/lib/RANfunctionsID-List.c create mode 100644 Bouncer/e2ap/lib/RANfunctionsIDcause-List.c create mode 100644 Bouncer/e2ap/lib/RICaction-Admitted-Item.c create mode 100644 Bouncer/e2ap/lib/RICaction-Admitted-List.c create mode 100644 Bouncer/e2ap/lib/RICaction-NotAdmitted-Item.c create mode 100644 Bouncer/e2ap/lib/RICaction-NotAdmitted-List.c create mode 100644 Bouncer/e2ap/lib/RICaction-ToBeSetup-Item.c create mode 100644 Bouncer/e2ap/lib/RICactionDefinition.c create mode 100644 Bouncer/e2ap/lib/RICactionID.c create mode 100644 Bouncer/e2ap/lib/RICactionType.c create mode 100644 Bouncer/e2ap/lib/RICactions-ToBeSetup-List.c create mode 100644 Bouncer/e2ap/lib/RICcallProcessID.c create mode 100644 Bouncer/e2ap/lib/RICcontrolAckRequest.c create mode 100644 Bouncer/e2ap/lib/RICcontrolAcknowledge.c create mode 100644 Bouncer/e2ap/lib/RICcontrolFailure.c create mode 100644 Bouncer/e2ap/lib/RICcontrolHeader.c create mode 100644 Bouncer/e2ap/lib/RICcontrolMessage.c create mode 100644 Bouncer/e2ap/lib/RICcontrolOutcome.c create mode 100644 Bouncer/e2ap/lib/RICcontrolRequest.c create mode 100644 Bouncer/e2ap/lib/RICcontrolStatus.c create mode 100644 Bouncer/e2ap/lib/RICeventTriggerDefinition.c create mode 100644 Bouncer/e2ap/lib/RICindication.c create mode 100644 Bouncer/e2ap/lib/RICindicationHeader.c create mode 100644 Bouncer/e2ap/lib/RICindicationMessage.c create mode 100644 Bouncer/e2ap/lib/RICindicationSN.c create mode 100644 Bouncer/e2ap/lib/RICindicationType.c create mode 100644 Bouncer/e2ap/lib/RICrequestID.c create mode 100644 Bouncer/e2ap/lib/RICserviceQuery.c create mode 100644 Bouncer/e2ap/lib/RICserviceUpdate.c create mode 100644 Bouncer/e2ap/lib/RICserviceUpdateAcknowledge.c create mode 100644 Bouncer/e2ap/lib/RICserviceUpdateFailure.c create mode 100644 Bouncer/e2ap/lib/RICsubscriptionDeleteFailure.c create mode 100644 Bouncer/e2ap/lib/RICsubscriptionDeleteRequest.c create mode 100644 Bouncer/e2ap/lib/RICsubscriptionDeleteResponse.c create mode 100644 Bouncer/e2ap/lib/RICsubscriptionDetails.c create mode 100644 Bouncer/e2ap/lib/RICsubscriptionFailure.c create mode 100644 Bouncer/e2ap/lib/RICsubscriptionRequest.c create mode 100644 Bouncer/e2ap/lib/RICsubscriptionResponse.c create mode 100644 Bouncer/e2ap/lib/RICsubsequentAction.c create mode 100644 Bouncer/e2ap/lib/RICsubsequentActionType.c create mode 100644 Bouncer/e2ap/lib/RICtimeToWait.c create mode 100644 Bouncer/e2ap/lib/ResetRequest.c create mode 100644 Bouncer/e2ap/lib/ResetResponse.c create mode 100644 Bouncer/e2ap/lib/SuccessfulOutcome.c create mode 100644 Bouncer/e2ap/lib/TimeToWait.c create mode 100644 Bouncer/e2ap/lib/TriggeringMessage.c create mode 100644 Bouncer/e2ap/lib/TypeOfError.c create mode 100644 Bouncer/e2ap/lib/UnsuccessfulOutcome.c rename Bouncer/{asn1c_defs => e2ap/lib}/asn_SEQUENCE_OF.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/asn_SET_OF.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/asn_application.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/asn_bit_data.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/asn_codecs_prim.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/asn_internal.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/asn_random_fill.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/ber_decoder.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/ber_tlv_length.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/ber_tlv_tag.c (100%) create mode 100644 Bouncer/e2ap/lib/constr_CHOICE.c create mode 100644 Bouncer/e2ap/lib/constr_CHOICE_oer.c rename Bouncer/{asn1c_defs => e2ap/lib}/constr_SEQUENCE.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/constr_SEQUENCE_OF.c (100%) create mode 100644 Bouncer/e2ap/lib/constr_SEQUENCE_oer.c rename Bouncer/{asn1c_defs => e2ap/lib}/constr_SET_OF.c (100%) create mode 100644 Bouncer/e2ap/lib/constr_SET_OF_oer.c rename Bouncer/{asn1c_defs => e2ap/lib}/constr_TYPE.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/constraints.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/der_encoder.c (100%) create mode 100644 Bouncer/e2ap/lib/oer_decoder.c create mode 100644 Bouncer/e2ap/lib/oer_encoder.c create mode 100644 Bouncer/e2ap/lib/oer_support.c rename Bouncer/{asn1c_defs => e2ap/lib}/per_decoder.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/per_encoder.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/per_opentype.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/per_support.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/xer_decoder.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/xer_encoder.c (100%) rename Bouncer/{asn1c_defs => e2ap/lib}/xer_support.c (100%) create mode 100644 Bouncer/e2ap/wrapper.c create mode 100644 Bouncer/e2ap/wrapper.h create mode 100644 Bouncer/e2sm_kpm/headers/AMF-UE-NGAP-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/AMFPointer.h create mode 100644 Bouncer/e2sm_kpm/headers/AMFRegionID.h create mode 100644 Bouncer/e2sm_kpm/headers/AMFSetID.h create mode 100644 Bouncer/e2sm_kpm/headers/ANY.h create mode 100644 Bouncer/e2sm_kpm/headers/BIT_STRING.h create mode 100644 Bouncer/e2sm_kpm/headers/BMPString.h rename Bouncer/{asn1c_defs => e2sm_kpm/headers}/BOOLEAN.h (100%) create mode 100644 Bouncer/e2sm_kpm/headers/C-RNTI.h create mode 100644 Bouncer/e2sm_kpm/headers/CGI.h create mode 100644 Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-CellResourceReportItem.h create mode 100644 Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-Per-UE.h create mode 100644 Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-UeResourceReportItem.h create mode 100644 Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-CellResourceReportItem.h create mode 100644 Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-Per-UE.h create mode 100644 Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-UeResourceReportItem.h create mode 100644 Bouncer/e2sm_kpm/headers/CUUPMeasurement-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/CellResourceReportListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/CoreCPID.h create mode 100644 Bouncer/e2sm_kpm/headers/DU-Usage-Report-CellResourceReportItem.h create mode 100644 Bouncer/e2sm_kpm/headers/DU-Usage-Report-Per-UE.h create mode 100644 Bouncer/e2sm_kpm/headers/DU-Usage-Report-UeResourceReportItem.h create mode 100644 Bouncer/e2sm_kpm/headers/E-UTRA-ARFCN.h create mode 100644 Bouncer/e2sm_kpm/headers/E-UTRA-PCI.h create mode 100644 Bouncer/e2sm_kpm/headers/E-UTRA-TAC.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format1.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format2.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format3.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader-Format1.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format1.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format2.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage.h create mode 100644 Bouncer/e2sm_kpm/headers/E2SM-KPM-RANfunction-Description.h create mode 100644 Bouncer/e2sm_kpm/headers/EN-GNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/ENB-ID-Choice.h create mode 100644 Bouncer/e2sm_kpm/headers/ENB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID-Extension.h create mode 100644 Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/ENGNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/ENUMERATED.h create mode 100644 Bouncer/e2sm_kpm/headers/EPC-CUUP-PM-Format.h create mode 100644 Bouncer/e2sm_kpm/headers/EPC-DU-PM-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/EUTRA-CGI.h create mode 100644 Bouncer/e2sm_kpm/headers/EUTRACellIdentity.h create mode 100644 Bouncer/e2sm_kpm/headers/FGC-CUUP-PM-Format.h create mode 100644 Bouncer/e2sm_kpm/headers/FGC-DU-PM-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnPerCellListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/FiveGS-TAC.h create mode 100644 Bouncer/e2sm_kpm/headers/FiveQI.h create mode 100644 Bouncer/e2sm_kpm/headers/FreqBandNrItem.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-CU-CP-Name.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-CU-CP-UE-E1AP-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-CU-UE-F1AP-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-CU-UP-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-CU-UP-Name.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-DU-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-DU-Name.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-ID-Choice.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GNB-Name.h create mode 100644 Bouncer/e2sm_kpm/headers/GUAMI.h create mode 100644 Bouncer/e2sm_kpm/headers/GUMMEI.h create mode 100644 Bouncer/e2sm_kpm/headers/GeneralString.h create mode 100644 Bouncer/e2sm_kpm/headers/GeneralizedTime.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalENB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalGNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalKPMnode-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalKPMnode-eNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalKPMnode-en-gNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalKPMnode-gNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalKPMnode-ng-eNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalNGRANNodeID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalNgENB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalenGNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalgNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GlobalngeNB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/GranularityPeriod.h create mode 100644 Bouncer/e2sm_kpm/headers/GraphicString.h create mode 100644 Bouncer/e2sm_kpm/headers/GroupID.h create mode 100644 Bouncer/e2sm_kpm/headers/IA5String.h create mode 100644 Bouncer/e2sm_kpm/headers/INTEGER.h create mode 100644 Bouncer/e2sm_kpm/headers/ISO646String.h create mode 100644 Bouncer/e2sm_kpm/headers/IndexToRFSP.h create mode 100644 Bouncer/e2sm_kpm/headers/Interface-MessageID.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceID-E1.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceID-F1.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceID-NG.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceID-S1.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceID-W1.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceID-X2.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceID-Xn.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceIdentifier.h create mode 100644 Bouncer/e2sm_kpm/headers/InterfaceType.h create mode 100644 Bouncer/e2sm_kpm/headers/LabelInfoItem.h create mode 100644 Bouncer/e2sm_kpm/headers/LabelInfoList.h create mode 100644 Bouncer/e2sm_kpm/headers/MME-Code.h create mode 100644 Bouncer/e2sm_kpm/headers/MME-Group-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/MME-UE-S1AP-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/MatchingCondItem.h create mode 100644 Bouncer/e2sm_kpm/headers/MatchingCondList.h create mode 100644 Bouncer/e2sm_kpm/headers/MatchingUEidItem.h create mode 100644 Bouncer/e2sm_kpm/headers/MatchingUEidList.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementCondItem.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementCondList.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementCondUEidItem.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementCondUEidList.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementData.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementDataItem.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-Item.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-List.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementInfoItem.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementInfoList.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementLabel.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementRecord.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementRecordItem.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementType.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementTypeID.h create mode 100644 Bouncer/e2sm_kpm/headers/MeasurementTypeName.h create mode 100644 Bouncer/e2sm_kpm/headers/NG-RANnodeUEXnAPID.h create mode 100644 Bouncer/e2sm_kpm/headers/NGENB-CU-UE-W1AP-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/NGENB-DU-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/NI-Type.h create mode 100644 Bouncer/e2sm_kpm/headers/NR-ARFCN.h create mode 100644 Bouncer/e2sm_kpm/headers/NR-CGI.h create mode 100644 Bouncer/e2sm_kpm/headers/NR-PCI.h create mode 100644 Bouncer/e2sm_kpm/headers/NRCGI.h create mode 100644 Bouncer/e2sm_kpm/headers/NRCellIdentity.h create mode 100644 Bouncer/e2sm_kpm/headers/NRFrequencyBand-List.h create mode 100644 Bouncer/e2sm_kpm/headers/NRFrequencyBandItem.h create mode 100644 Bouncer/e2sm_kpm/headers/NRFrequencyInfo.h create mode 100644 Bouncer/e2sm_kpm/headers/NRFrequencyShift7p5khz.h rename Bouncer/{asn1c_defs => e2sm_kpm/headers}/NULL.h (100%) create mode 100644 Bouncer/e2sm_kpm/headers/NativeEnumerated.h create mode 100644 Bouncer/e2sm_kpm/headers/NativeInteger.h create mode 100644 Bouncer/e2sm_kpm/headers/NativeReal.h create mode 100644 Bouncer/e2sm_kpm/headers/NgENB-ID.h create mode 100644 Bouncer/e2sm_kpm/headers/NumericString.h rename Bouncer/{asn1c_defs => e2sm_kpm/headers}/OBJECT_IDENTIFIER.h (100%) create mode 100644 Bouncer/e2sm_kpm/headers/OCTET_STRING.h create mode 100644 Bouncer/e2sm_kpm/headers/OCUCP-PF-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/OCUUP-PF-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/ODU-PF-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/OPEN_TYPE.h create mode 100644 Bouncer/e2sm_kpm/headers/ObjectDescriptor.h create mode 100644 Bouncer/e2sm_kpm/headers/PF-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/PF-ContainerListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/PLMN-Identity.h create mode 100644 Bouncer/e2sm_kpm/headers/PLMNIdentity.h create mode 100644 Bouncer/e2sm_kpm/headers/PM-Containers-List.h create mode 100644 Bouncer/e2sm_kpm/headers/PerQCIReportListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/PerQCIReportListItemFormat.h create mode 100644 Bouncer/e2sm_kpm/headers/PlmnID-List.h rename Bouncer/{asn1c_defs => e2sm_kpm/headers}/PrintableString.h (100%) create mode 100644 Bouncer/e2sm_kpm/headers/QCI.h create mode 100644 Bouncer/e2sm_kpm/headers/QoSID.h create mode 100644 Bouncer/e2sm_kpm/headers/QosFlowIdentifier.h create mode 100644 Bouncer/e2sm_kpm/headers/RAN-Container.h create mode 100644 Bouncer/e2sm_kpm/headers/RANUEID.h create mode 100644 Bouncer/e2sm_kpm/headers/RANcallProcess-ID-string.h create mode 100644 Bouncer/e2sm_kpm/headers/RANfunction-Name.h create mode 100644 Bouncer/e2sm_kpm/headers/REAL.h create mode 100644 Bouncer/e2sm_kpm/headers/RELATIVE-OID.h create mode 100644 Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-Item.h create mode 100644 Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-List.h create mode 100644 Bouncer/e2sm_kpm/headers/RIC-Format-Type.h create mode 100644 Bouncer/e2sm_kpm/headers/RIC-ReportStyle-Item.h create mode 100644 Bouncer/e2sm_kpm/headers/RIC-ReportStyle-List.h create mode 100644 Bouncer/e2sm_kpm/headers/RIC-Style-Name.h create mode 100644 Bouncer/e2sm_kpm/headers/RIC-Style-Type.h create mode 100644 Bouncer/e2sm_kpm/headers/RRC-MessageID.h create mode 100644 Bouncer/e2sm_kpm/headers/RRCclass-LTE.h create mode 100644 Bouncer/e2sm_kpm/headers/RRCclass-NR.h create mode 100644 Bouncer/e2sm_kpm/headers/RT-Period-IE.h create mode 100644 Bouncer/e2sm_kpm/headers/S-NSSAI.h create mode 100644 Bouncer/e2sm_kpm/headers/SD.h create mode 100644 Bouncer/e2sm_kpm/headers/SNSSAI.h create mode 100644 Bouncer/e2sm_kpm/headers/SST.h create mode 100644 Bouncer/e2sm_kpm/headers/ServedPlmnPerCellListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/ServingCell-ARFCN.h create mode 100644 Bouncer/e2sm_kpm/headers/ServingCell-PCI.h create mode 100644 Bouncer/e2sm_kpm/headers/SlicePerPlmnPerCellListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/SliceToReportListItem.h create mode 100644 Bouncer/e2sm_kpm/headers/SubscriberProfileIDforRFP.h create mode 100644 Bouncer/e2sm_kpm/headers/SupportedSULBandList.h create mode 100644 Bouncer/e2sm_kpm/headers/SupportedSULFreqBandItem.h create mode 100644 Bouncer/e2sm_kpm/headers/T61String.h create mode 100644 Bouncer/e2sm_kpm/headers/TeletexString.h create mode 100644 Bouncer/e2sm_kpm/headers/TestCond-Expression.h create mode 100644 Bouncer/e2sm_kpm/headers/TestCond-Type.h create mode 100644 Bouncer/e2sm_kpm/headers/TestCond-Value.h create mode 100644 Bouncer/e2sm_kpm/headers/TestCondInfo.h create mode 100644 Bouncer/e2sm_kpm/headers/TimeStamp.h create mode 100644 Bouncer/e2sm_kpm/headers/Timestamp.h create mode 100644 Bouncer/e2sm_kpm/headers/Trigger-ConditionIE-Item.h create mode 100644 Bouncer/e2sm_kpm/headers/UE-Report-Type.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-EN-GNB.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-ENB.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-GNB-CU-F1AP-ID-List.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-GNB-CU-UP.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-GNB-DU.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-GNB.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-NG-ENB-DU.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID-NG-ENB.h create mode 100644 Bouncer/e2sm_kpm/headers/UEID.h create mode 100644 Bouncer/e2sm_kpm/headers/UTCTime.h create mode 100644 Bouncer/e2sm_kpm/headers/UTF8String.h create mode 100644 Bouncer/e2sm_kpm/headers/UniversalString.h create mode 100644 Bouncer/e2sm_kpm/headers/VideotexString.h create mode 100644 Bouncer/e2sm_kpm/headers/VisibleString.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_SEQUENCE_OF.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_SET_OF.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_application.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_bit_data.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_codecs.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_codecs_prim.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_constant.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_internal.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_ioc.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_random_fill.h create mode 100644 Bouncer/e2sm_kpm/headers/asn_system.h create mode 100644 Bouncer/e2sm_kpm/headers/ber_decoder.h create mode 100644 Bouncer/e2sm_kpm/headers/ber_tlv_length.h create mode 100644 Bouncer/e2sm_kpm/headers/ber_tlv_tag.h create mode 100644 Bouncer/e2sm_kpm/headers/constr_CHOICE.h create mode 100644 Bouncer/e2sm_kpm/headers/constr_SEQUENCE.h create mode 100644 Bouncer/e2sm_kpm/headers/constr_SEQUENCE_OF.h create mode 100644 Bouncer/e2sm_kpm/headers/constr_SET.h create mode 100644 Bouncer/e2sm_kpm/headers/constr_SET_OF.h create mode 100644 Bouncer/e2sm_kpm/headers/constr_TYPE.h create mode 100644 Bouncer/e2sm_kpm/headers/constraints.h create mode 100644 Bouncer/e2sm_kpm/headers/der_encoder.h create mode 100644 Bouncer/e2sm_kpm/headers/oer_decoder.h create mode 100644 Bouncer/e2sm_kpm/headers/oer_encoder.h create mode 100644 Bouncer/e2sm_kpm/headers/oer_support.h create mode 100644 Bouncer/e2sm_kpm/headers/per_decoder.h create mode 100644 Bouncer/e2sm_kpm/headers/per_encoder.h create mode 100644 Bouncer/e2sm_kpm/headers/per_opentype.h create mode 100644 Bouncer/e2sm_kpm/headers/per_support.h create mode 100644 Bouncer/e2sm_kpm/headers/xer_decoder.h create mode 100644 Bouncer/e2sm_kpm/headers/xer_encoder.h create mode 100644 Bouncer/e2sm_kpm/headers/xer_support.h create mode 100644 Bouncer/e2sm_kpm/lib/AMF-UE-NGAP-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/AMFPointer.c create mode 100644 Bouncer/e2sm_kpm/lib/AMFRegionID.c create mode 100644 Bouncer/e2sm_kpm/lib/AMFSetID.c create mode 100644 Bouncer/e2sm_kpm/lib/ANY.c create mode 100644 Bouncer/e2sm_kpm/lib/BIT_STRING.c create mode 100644 Bouncer/e2sm_kpm/lib/BIT_STRING_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/BMPString.c rename Bouncer/{asn1c_defs => e2sm_kpm/lib}/BOOLEAN.c (100%) create mode 100644 Bouncer/e2sm_kpm/lib/C-RNTI.c create mode 100644 Bouncer/e2sm_kpm/lib/CGI.c create mode 100644 Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-CellResourceReportItem.c create mode 100644 Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-Per-UE.c create mode 100644 Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-UeResourceReportItem.c create mode 100644 Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-CellResourceReportItem.c create mode 100644 Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-Per-UE.c create mode 100644 Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-UeResourceReportItem.c create mode 100644 Bouncer/e2sm_kpm/lib/CUUPMeasurement-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/CellResourceReportListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/CoreCPID.c create mode 100644 Bouncer/e2sm_kpm/lib/DU-Usage-Report-CellResourceReportItem.c create mode 100644 Bouncer/e2sm_kpm/lib/DU-Usage-Report-Per-UE.c create mode 100644 Bouncer/e2sm_kpm/lib/DU-Usage-Report-UeResourceReportItem.c create mode 100644 Bouncer/e2sm_kpm/lib/E-UTRA-ARFCN.c create mode 100644 Bouncer/e2sm_kpm/lib/E-UTRA-PCI.c create mode 100644 Bouncer/e2sm_kpm/lib/E-UTRA-TAC.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format1.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format2.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format3.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader-Format1.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format1.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format2.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage.c create mode 100644 Bouncer/e2sm_kpm/lib/E2SM-KPM-RANfunction-Description.c create mode 100644 Bouncer/e2sm_kpm/lib/EN-GNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/ENB-ID-Choice.c create mode 100644 Bouncer/e2sm_kpm/lib/ENB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID-Extension.c create mode 100644 Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/ENGNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/ENUMERATED.c create mode 100644 Bouncer/e2sm_kpm/lib/EPC-CUUP-PM-Format.c create mode 100644 Bouncer/e2sm_kpm/lib/EPC-DU-PM-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/EUTRA-CGI.c create mode 100644 Bouncer/e2sm_kpm/lib/EUTRACellIdentity.c create mode 100644 Bouncer/e2sm_kpm/lib/FGC-CUUP-PM-Format.c create mode 100644 Bouncer/e2sm_kpm/lib/FGC-DU-PM-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnPerCellListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/FiveGS-TAC.c create mode 100644 Bouncer/e2sm_kpm/lib/FiveQI.c create mode 100644 Bouncer/e2sm_kpm/lib/FreqBandNrItem.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-CU-CP-Name.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-CU-CP-UE-E1AP-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-CU-UE-F1AP-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-CU-UP-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-CU-UP-Name.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-DU-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-DU-Name.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-ID-Choice.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GNB-Name.c create mode 100644 Bouncer/e2sm_kpm/lib/GUAMI.c create mode 100644 Bouncer/e2sm_kpm/lib/GUMMEI.c create mode 100644 Bouncer/e2sm_kpm/lib/GeneralString.c create mode 100644 Bouncer/e2sm_kpm/lib/GeneralizedTime.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalENB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalGNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalKPMnode-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalKPMnode-eNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalKPMnode-en-gNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalKPMnode-gNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalKPMnode-ng-eNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalNGRANNodeID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalNgENB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalenGNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalgNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GlobalngeNB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/GranularityPeriod.c create mode 100644 Bouncer/e2sm_kpm/lib/GraphicString.c create mode 100644 Bouncer/e2sm_kpm/lib/GroupID.c create mode 100644 Bouncer/e2sm_kpm/lib/IA5String.c create mode 100644 Bouncer/e2sm_kpm/lib/INTEGER.c create mode 100644 Bouncer/e2sm_kpm/lib/INTEGER_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/ISO646String.c create mode 100644 Bouncer/e2sm_kpm/lib/IndexToRFSP.c create mode 100644 Bouncer/e2sm_kpm/lib/Interface-MessageID.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceID-E1.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceID-F1.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceID-NG.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceID-S1.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceID-W1.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceID-X2.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceID-Xn.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceIdentifier.c create mode 100644 Bouncer/e2sm_kpm/lib/InterfaceType.c create mode 100644 Bouncer/e2sm_kpm/lib/LabelInfoItem.c create mode 100644 Bouncer/e2sm_kpm/lib/LabelInfoList.c create mode 100644 Bouncer/e2sm_kpm/lib/MME-Code.c create mode 100644 Bouncer/e2sm_kpm/lib/MME-Group-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/MME-UE-S1AP-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/MatchingCondItem.c create mode 100644 Bouncer/e2sm_kpm/lib/MatchingCondList.c create mode 100644 Bouncer/e2sm_kpm/lib/MatchingUEidItem.c create mode 100644 Bouncer/e2sm_kpm/lib/MatchingUEidList.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementCondItem.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementCondList.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementCondUEidItem.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementCondUEidList.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementData.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementDataItem.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-Item.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-List.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementInfoItem.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementInfoList.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementLabel.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementRecord.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementRecordItem.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementType.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementTypeID.c create mode 100644 Bouncer/e2sm_kpm/lib/MeasurementTypeName.c create mode 100644 Bouncer/e2sm_kpm/lib/NG-RANnodeUEXnAPID.c create mode 100644 Bouncer/e2sm_kpm/lib/NGENB-CU-UE-W1AP-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/NGENB-DU-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/NI-Type.c create mode 100644 Bouncer/e2sm_kpm/lib/NR-ARFCN.c create mode 100644 Bouncer/e2sm_kpm/lib/NR-CGI.c create mode 100644 Bouncer/e2sm_kpm/lib/NR-PCI.c create mode 100644 Bouncer/e2sm_kpm/lib/NRCGI.c create mode 100644 Bouncer/e2sm_kpm/lib/NRCellIdentity.c create mode 100644 Bouncer/e2sm_kpm/lib/NRFrequencyBand-List.c create mode 100644 Bouncer/e2sm_kpm/lib/NRFrequencyBandItem.c create mode 100644 Bouncer/e2sm_kpm/lib/NRFrequencyInfo.c create mode 100644 Bouncer/e2sm_kpm/lib/NRFrequencyShift7p5khz.c rename Bouncer/{asn1c_defs => e2sm_kpm/lib}/NULL.c (100%) create mode 100644 Bouncer/e2sm_kpm/lib/NativeEnumerated.c create mode 100644 Bouncer/e2sm_kpm/lib/NativeEnumerated_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/NativeInteger.c create mode 100644 Bouncer/e2sm_kpm/lib/NativeInteger_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/NativeReal.c create mode 100644 Bouncer/e2sm_kpm/lib/NgENB-ID.c create mode 100644 Bouncer/e2sm_kpm/lib/NumericString.c rename Bouncer/{asn1c_defs => e2sm_kpm/lib}/OBJECT_IDENTIFIER.c (100%) create mode 100644 Bouncer/e2sm_kpm/lib/OCTET_STRING.c create mode 100644 Bouncer/e2sm_kpm/lib/OCTET_STRING_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/OCUCP-PF-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/OCUUP-PF-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/ODU-PF-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/OPEN_TYPE.c create mode 100644 Bouncer/e2sm_kpm/lib/OPEN_TYPE_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/ObjectDescriptor.c create mode 100644 Bouncer/e2sm_kpm/lib/PF-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/PF-ContainerListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/PLMN-Identity.c create mode 100644 Bouncer/e2sm_kpm/lib/PLMNIdentity.c create mode 100644 Bouncer/e2sm_kpm/lib/PM-Containers-List.c create mode 100644 Bouncer/e2sm_kpm/lib/PerQCIReportListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/PerQCIReportListItemFormat.c create mode 100644 Bouncer/e2sm_kpm/lib/PlmnID-List.c rename Bouncer/{asn1c_defs => e2sm_kpm/lib}/PrintableString.c (100%) create mode 100644 Bouncer/e2sm_kpm/lib/QCI.c create mode 100644 Bouncer/e2sm_kpm/lib/QoSID.c create mode 100644 Bouncer/e2sm_kpm/lib/QosFlowIdentifier.c create mode 100644 Bouncer/e2sm_kpm/lib/RAN-Container.c create mode 100644 Bouncer/e2sm_kpm/lib/RANUEID.c create mode 100644 Bouncer/e2sm_kpm/lib/RANcallProcess-ID-string.c create mode 100644 Bouncer/e2sm_kpm/lib/RANfunction-Name.c create mode 100644 Bouncer/e2sm_kpm/lib/REAL.c create mode 100644 Bouncer/e2sm_kpm/lib/RELATIVE-OID.c create mode 100644 Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-Item.c create mode 100644 Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-List.c create mode 100644 Bouncer/e2sm_kpm/lib/RIC-Format-Type.c create mode 100644 Bouncer/e2sm_kpm/lib/RIC-ReportStyle-Item.c create mode 100644 Bouncer/e2sm_kpm/lib/RIC-ReportStyle-List.c create mode 100644 Bouncer/e2sm_kpm/lib/RIC-Style-Name.c create mode 100644 Bouncer/e2sm_kpm/lib/RIC-Style-Type.c create mode 100644 Bouncer/e2sm_kpm/lib/RRC-MessageID.c create mode 100644 Bouncer/e2sm_kpm/lib/RRCclass-LTE.c create mode 100644 Bouncer/e2sm_kpm/lib/RRCclass-NR.c create mode 100644 Bouncer/e2sm_kpm/lib/RT-Period-IE.c create mode 100644 Bouncer/e2sm_kpm/lib/S-NSSAI.c create mode 100644 Bouncer/e2sm_kpm/lib/SD.c create mode 100644 Bouncer/e2sm_kpm/lib/SNSSAI.c create mode 100644 Bouncer/e2sm_kpm/lib/SST.c create mode 100644 Bouncer/e2sm_kpm/lib/ServedPlmnPerCellListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/ServingCell-ARFCN.c create mode 100644 Bouncer/e2sm_kpm/lib/ServingCell-PCI.c create mode 100644 Bouncer/e2sm_kpm/lib/SlicePerPlmnPerCellListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/SliceToReportListItem.c create mode 100644 Bouncer/e2sm_kpm/lib/SubscriberProfileIDforRFP.c create mode 100644 Bouncer/e2sm_kpm/lib/SupportedSULBandList.c create mode 100644 Bouncer/e2sm_kpm/lib/SupportedSULFreqBandItem.c create mode 100644 Bouncer/e2sm_kpm/lib/T61String.c create mode 100644 Bouncer/e2sm_kpm/lib/TeletexString.c create mode 100644 Bouncer/e2sm_kpm/lib/TestCond-Expression.c create mode 100644 Bouncer/e2sm_kpm/lib/TestCond-Type.c create mode 100644 Bouncer/e2sm_kpm/lib/TestCond-Value.c create mode 100644 Bouncer/e2sm_kpm/lib/TestCondInfo.c create mode 100644 Bouncer/e2sm_kpm/lib/TimeStamp.c create mode 100644 Bouncer/e2sm_kpm/lib/Timestamp.c create mode 100644 Bouncer/e2sm_kpm/lib/Trigger-ConditionIE-Item.c create mode 100644 Bouncer/e2sm_kpm/lib/UE-Report-Type.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-EN-GNB.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-ENB.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-GNB-CU-F1AP-ID-List.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-GNB-CU-UP.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-GNB-DU.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-GNB.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-NG-ENB-DU.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID-NG-ENB.c create mode 100644 Bouncer/e2sm_kpm/lib/UEID.c create mode 100644 Bouncer/e2sm_kpm/lib/UTCTime.c create mode 100644 Bouncer/e2sm_kpm/lib/UTF8String.c create mode 100644 Bouncer/e2sm_kpm/lib/UniversalString.c create mode 100644 Bouncer/e2sm_kpm/lib/VideotexString.c create mode 100644 Bouncer/e2sm_kpm/lib/VisibleString.c create mode 100644 Bouncer/e2sm_kpm/lib/asn_SEQUENCE_OF.c create mode 100644 Bouncer/e2sm_kpm/lib/asn_SET_OF.c create mode 100644 Bouncer/e2sm_kpm/lib/asn_application.c create mode 100644 Bouncer/e2sm_kpm/lib/asn_bit_data.c create mode 100644 Bouncer/e2sm_kpm/lib/asn_codecs_prim.c create mode 100644 Bouncer/e2sm_kpm/lib/asn_internal.c create mode 100644 Bouncer/e2sm_kpm/lib/asn_random_fill.c create mode 100644 Bouncer/e2sm_kpm/lib/ber_decoder.c create mode 100644 Bouncer/e2sm_kpm/lib/ber_tlv_length.c create mode 100644 Bouncer/e2sm_kpm/lib/ber_tlv_tag.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_CHOICE.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_CHOICE_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_SEQUENCE.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_SEQUENCE_OF.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_SEQUENCE_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_SET.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_SET_OF.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_SET_OF_oer.c create mode 100644 Bouncer/e2sm_kpm/lib/constr_TYPE.c create mode 100644 Bouncer/e2sm_kpm/lib/constraints.c create mode 100644 Bouncer/e2sm_kpm/lib/cscope.out create mode 100644 Bouncer/e2sm_kpm/lib/der_encoder.c create mode 100644 Bouncer/e2sm_kpm/lib/oer_decoder.c create mode 100644 Bouncer/e2sm_kpm/lib/oer_encoder.c create mode 100644 Bouncer/e2sm_kpm/lib/oer_support.c create mode 100644 Bouncer/e2sm_kpm/lib/per_decoder.c create mode 100644 Bouncer/e2sm_kpm/lib/per_encoder.c create mode 100644 Bouncer/e2sm_kpm/lib/per_opentype.c create mode 100644 Bouncer/e2sm_kpm/lib/per_support.c create mode 100644 Bouncer/e2sm_kpm/lib/xer_decoder.c create mode 100644 Bouncer/e2sm_kpm/lib/xer_encoder.c create mode 100644 Bouncer/e2sm_kpm/lib/xer_support.c create mode 100644 Bouncer/e2sm_kpm/wrapper.c create mode 100644 Bouncer/e2sm_kpm/wrapper.h create mode 100644 Bouncer/e2sm_rc/headers/.RANParameter-Testing-Item.h.swp create mode 100644 Bouncer/e2sm_rc/headers/AMF-UE-NGAP-ID.h create mode 100644 Bouncer/e2sm_rc/headers/AMFPointer.h create mode 100644 Bouncer/e2sm_rc/headers/AMFRegionID.h create mode 100644 Bouncer/e2sm_rc/headers/AMFSetID.h create mode 100644 Bouncer/e2sm_rc/headers/BIT_STRING.h create mode 100644 Bouncer/e2sm_rc/headers/BOOLEAN.h create mode 100644 Bouncer/e2sm_rc/headers/CGI.h create mode 100644 Bouncer/e2sm_rc/headers/CallProcessBreakpoint-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/CellIdentification-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/ControlAction-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/ControlOutcome-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/CoreCPID.h create mode 100644 Bouncer/e2sm_rc/headers/E-UTRA-ARFCN.h create mode 100644 Bouncer/e2sm_rc/headers/E-UTRA-PCI.h create mode 100644 Bouncer/e2sm_rc/headers/E-UTRA-TAC.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Indication-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-RANP-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Style-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format2.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-ControlAction-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-Style-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-RANP-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-Style-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format2.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format5.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format2.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format3.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemCell.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemUE.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Indication-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-RANP-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Style-Item.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage.h create mode 100644 Bouncer/e2sm_rc/headers/E2SM-RC-RANFunctionDefinition.h create mode 100644 Bouncer/e2sm_rc/headers/EN-GNB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/ENB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID-Extension.h create mode 100644 Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID.h create mode 100644 Bouncer/e2sm_rc/headers/EUTRA-CGI.h create mode 100644 Bouncer/e2sm_rc/headers/EUTRACellIdentity.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Group.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Individual.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Group.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Individual.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-UE-Info.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info-Item.h create mode 100644 Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info.h create mode 100644 Bouncer/e2sm_rc/headers/FiveGS-TAC.h create mode 100644 Bouncer/e2sm_rc/headers/FiveQI.h create mode 100644 Bouncer/e2sm_rc/headers/FreqBandNrItem.h create mode 100644 Bouncer/e2sm_rc/headers/GNB-CU-CP-UE-E1AP-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GNB-CU-UE-F1AP-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GNB-CU-UP-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GNB-DU-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GNB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GUAMI.h create mode 100644 Bouncer/e2sm_rc/headers/GUMMEI.h create mode 100644 Bouncer/e2sm_rc/headers/GlobalENB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GlobalGNB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GlobalNGRANNodeID.h create mode 100644 Bouncer/e2sm_rc/headers/GlobalNgENB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GlobalenGNB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/GroupID.h create mode 100644 Bouncer/e2sm_rc/headers/INTEGER.h create mode 100644 Bouncer/e2sm_rc/headers/IndexToRFSP.h create mode 100644 Bouncer/e2sm_rc/headers/InsertIndication-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/Interface-MessageID.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceID-E1.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceID-F1.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceID-NG.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceID-S1.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceID-W1.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceID-X2.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceID-Xn.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceIdentifier.h create mode 100644 Bouncer/e2sm_rc/headers/InterfaceType.h create mode 100644 Bouncer/e2sm_rc/headers/L2Parameters-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/LogicalOR.h create mode 100644 Bouncer/e2sm_rc/headers/MME-Code.h create mode 100644 Bouncer/e2sm_rc/headers/MME-Group-ID.h create mode 100644 Bouncer/e2sm_rc/headers/MME-UE-S1AP-ID.h create mode 100644 Bouncer/e2sm_rc/headers/MessageType-Choice-NI.h create mode 100644 Bouncer/e2sm_rc/headers/MessageType-Choice-RRC.h create mode 100644 Bouncer/e2sm_rc/headers/MessageType-Choice.h create mode 100644 Bouncer/e2sm_rc/headers/NG-RANnodeUEXnAPID.h create mode 100644 Bouncer/e2sm_rc/headers/NGENB-CU-UE-W1AP-ID.h create mode 100644 Bouncer/e2sm_rc/headers/NGENB-DU-ID.h create mode 100644 Bouncer/e2sm_rc/headers/NR-ARFCN.h create mode 100644 Bouncer/e2sm_rc/headers/NR-CGI.h create mode 100644 Bouncer/e2sm_rc/headers/NR-PCI.h create mode 100644 Bouncer/e2sm_rc/headers/NRCellIdentity.h create mode 100644 Bouncer/e2sm_rc/headers/NRFrequencyBand-List.h create mode 100644 Bouncer/e2sm_rc/headers/NRFrequencyBandItem.h create mode 100644 Bouncer/e2sm_rc/headers/NRFrequencyInfo.h create mode 100644 Bouncer/e2sm_rc/headers/NRFrequencyShift7p5khz.h create mode 100644 Bouncer/e2sm_rc/headers/NativeEnumerated.h create mode 100644 Bouncer/e2sm_rc/headers/NativeInteger.h create mode 100644 Bouncer/e2sm_rc/headers/NativeReal.h create mode 100644 Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-E-UTRA.h create mode 100644 Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-NR.h create mode 100644 Bouncer/e2sm_rc/headers/NeighborCell-Item.h create mode 100644 Bouncer/e2sm_rc/headers/NeighborCell-List.h create mode 100644 Bouncer/e2sm_rc/headers/NeighborRelation-Info.h create mode 100644 Bouncer/e2sm_rc/headers/NgENB-ID.h create mode 100644 Bouncer/e2sm_rc/headers/OCTET_STRING.h create mode 100644 Bouncer/e2sm_rc/headers/OPEN_TYPE.h create mode 100644 Bouncer/e2sm_rc/headers/PLMNIdentity.h create mode 100644 Bouncer/e2sm_rc/headers/PolicyAction-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/PolicyCondition-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/PrintableString.h create mode 100644 Bouncer/e2sm_rc/headers/QCI.h create mode 100644 Bouncer/e2sm_rc/headers/QoSID.h create mode 100644 Bouncer/e2sm_rc/headers/QosFlowIdentifier.h create mode 100644 Bouncer/e2sm_rc/headers/RAN-CallProcess-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Action-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Breakpoint-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-CallProcess-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Style-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Indication-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Action-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Definition.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-LIST.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Name.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementFalse.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementTrue.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-List.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-Structure.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing-LIST.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing-STRUCTURE.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Testing.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-TestingCondition.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-Value.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementFalse.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementTrue.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-List.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-Structure.h create mode 100644 Bouncer/e2sm_rc/headers/RANParameter-ValueType.h create mode 100644 Bouncer/e2sm_rc/headers/RANUEID.h create mode 100644 Bouncer/e2sm_rc/headers/RANfunction-Name.h create mode 100644 Bouncer/e2sm_rc/headers/REAL.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-Name.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-CallProcessType-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-CallProcessType-Name.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-ControlAction-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-ControlAction-Name.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-EventTrigger-Cell-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-EventTrigger-UE-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-EventTrigger-UEevent-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-EventTriggerCondition-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-Format-Type.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-InsertIndication-ID.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-InsertIndication-Name.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-PolicyAction-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-PolicyAction.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-Style-Name.h create mode 100644 Bouncer/e2sm_rc/headers/RIC-Style-Type.h create mode 100644 Bouncer/e2sm_rc/headers/RRC-MessageID.h create mode 100644 Bouncer/e2sm_rc/headers/RRC-State.h create mode 100644 Bouncer/e2sm_rc/headers/RRCclass-LTE.h create mode 100644 Bouncer/e2sm_rc/headers/RRCclass-NR.h create mode 100644 Bouncer/e2sm_rc/headers/Report-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/S-NSSAI.h create mode 100644 Bouncer/e2sm_rc/headers/SD.h create mode 100644 Bouncer/e2sm_rc/headers/SST.h create mode 100644 Bouncer/e2sm_rc/headers/ServingCell-ARFCN.h create mode 100644 Bouncer/e2sm_rc/headers/ServingCell-PCI.h create mode 100644 Bouncer/e2sm_rc/headers/SubscriberProfileIDforRFP.h create mode 100644 Bouncer/e2sm_rc/headers/SupportedSULBandList.h create mode 100644 Bouncer/e2sm_rc/headers/SupportedSULFreqBandItem.h create mode 100644 Bouncer/e2sm_rc/headers/TriggerType-Choice-L2state.h create mode 100644 Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate-Item.h create mode 100644 Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate.h create mode 100644 Bouncer/e2sm_rc/headers/TriggerType-Choice-UEID.h create mode 100644 Bouncer/e2sm_rc/headers/TriggerType-Choice.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-EN-GNB.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-ENB.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-List.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-GNB-CU-F1AP-ID-List.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-GNB-CU-UP.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-GNB-DU.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-GNB.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-NG-ENB-DU.h create mode 100644 Bouncer/e2sm_rc/headers/UEID-NG-ENB.h create mode 100644 Bouncer/e2sm_rc/headers/UEID.h create mode 100644 Bouncer/e2sm_rc/headers/UEIdentification-RANParameter-Item.h create mode 100644 Bouncer/e2sm_rc/headers/asn_SEQUENCE_OF.h create mode 100644 Bouncer/e2sm_rc/headers/asn_SET_OF.h create mode 100644 Bouncer/e2sm_rc/headers/asn_application.h create mode 100644 Bouncer/e2sm_rc/headers/asn_bit_data.h create mode 100644 Bouncer/e2sm_rc/headers/asn_codecs.h create mode 100644 Bouncer/e2sm_rc/headers/asn_codecs_prim.h create mode 100644 Bouncer/e2sm_rc/headers/asn_constant.h create mode 100644 Bouncer/e2sm_rc/headers/asn_internal.h create mode 100644 Bouncer/e2sm_rc/headers/asn_ioc.h create mode 100644 Bouncer/e2sm_rc/headers/asn_random_fill.h create mode 100644 Bouncer/e2sm_rc/headers/asn_system.h create mode 100644 Bouncer/e2sm_rc/headers/ber_decoder.h create mode 100644 Bouncer/e2sm_rc/headers/ber_tlv_length.h create mode 100644 Bouncer/e2sm_rc/headers/ber_tlv_tag.h create mode 100644 Bouncer/e2sm_rc/headers/constr_CHOICE.h create mode 100644 Bouncer/e2sm_rc/headers/constr_SEQUENCE.h create mode 100644 Bouncer/e2sm_rc/headers/constr_SEQUENCE_OF.h create mode 100644 Bouncer/e2sm_rc/headers/constr_SET_OF.h create mode 100644 Bouncer/e2sm_rc/headers/constr_TYPE.h create mode 100644 Bouncer/e2sm_rc/headers/constraints.h create mode 100644 Bouncer/e2sm_rc/headers/der_encoder.h create mode 100644 Bouncer/e2sm_rc/headers/oer_decoder.h create mode 100644 Bouncer/e2sm_rc/headers/oer_encoder.h create mode 100644 Bouncer/e2sm_rc/headers/oer_support.h create mode 100644 Bouncer/e2sm_rc/headers/per_decoder.h create mode 100644 Bouncer/e2sm_rc/headers/per_encoder.h create mode 100644 Bouncer/e2sm_rc/headers/per_opentype.h create mode 100644 Bouncer/e2sm_rc/headers/per_support.h create mode 100644 Bouncer/e2sm_rc/headers/xer_decoder.h create mode 100644 Bouncer/e2sm_rc/headers/xer_encoder.h create mode 100644 Bouncer/e2sm_rc/headers/xer_support.h create mode 100644 Bouncer/e2sm_rc/lib/AMF-UE-NGAP-ID.c create mode 100644 Bouncer/e2sm_rc/lib/AMFPointer.c create mode 100644 Bouncer/e2sm_rc/lib/AMFRegionID.c create mode 100644 Bouncer/e2sm_rc/lib/AMFSetID.c create mode 100644 Bouncer/e2sm_rc/lib/BIT_STRING.c create mode 100644 Bouncer/e2sm_rc/lib/BIT_STRING_oer.c create mode 100644 Bouncer/e2sm_rc/lib/BOOLEAN.c create mode 100644 Bouncer/e2sm_rc/lib/CGI.c create mode 100644 Bouncer/e2sm_rc/lib/CallProcessBreakpoint-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/CellIdentification-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/ControlAction-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/ControlOutcome-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/CoreCPID.c create mode 100644 Bouncer/e2sm_rc/lib/E-UTRA-ARFCN.c create mode 100644 Bouncer/e2sm_rc/lib/E-UTRA-PCI.c create mode 100644 Bouncer/e2sm_rc/lib/E-UTRA-TAC.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Indication-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-RANP-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Style-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format2.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-ControlAction-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-Style-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-RANP-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-Style-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format2.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format5.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format2.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format3.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemCell.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemUE.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Indication-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-RANP-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Style-Item.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage.c create mode 100644 Bouncer/e2sm_rc/lib/E2SM-RC-RANFunctionDefinition.c create mode 100644 Bouncer/e2sm_rc/lib/EN-GNB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/ENB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID-Extension.c create mode 100644 Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID.c create mode 100644 Bouncer/e2sm_rc/lib/EUTRA-CGI.c create mode 100644 Bouncer/e2sm_rc/lib/EUTRACellIdentity.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Group.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Individual.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Group.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Individual.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-UE-Info.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info-Item.c create mode 100644 Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info.c create mode 100644 Bouncer/e2sm_rc/lib/FiveGS-TAC.c create mode 100644 Bouncer/e2sm_rc/lib/FiveQI.c create mode 100644 Bouncer/e2sm_rc/lib/FreqBandNrItem.c create mode 100644 Bouncer/e2sm_rc/lib/GNB-CU-CP-UE-E1AP-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GNB-CU-UE-F1AP-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GNB-CU-UP-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GNB-DU-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GNB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GUAMI.c create mode 100644 Bouncer/e2sm_rc/lib/GUMMEI.c create mode 100644 Bouncer/e2sm_rc/lib/GlobalENB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GlobalGNB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GlobalNGRANNodeID.c create mode 100644 Bouncer/e2sm_rc/lib/GlobalNgENB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GlobalenGNB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/GroupID.c create mode 100644 Bouncer/e2sm_rc/lib/INTEGER.c create mode 100644 Bouncer/e2sm_rc/lib/INTEGER_oer.c create mode 100644 Bouncer/e2sm_rc/lib/IndexToRFSP.c create mode 100644 Bouncer/e2sm_rc/lib/InsertIndication-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/Interface-MessageID.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceID-E1.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceID-F1.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceID-NG.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceID-S1.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceID-W1.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceID-X2.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceID-Xn.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceIdentifier.c create mode 100644 Bouncer/e2sm_rc/lib/InterfaceType.c create mode 100644 Bouncer/e2sm_rc/lib/L2Parameters-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/LogicalOR.c create mode 100644 Bouncer/e2sm_rc/lib/MME-Code.c create mode 100644 Bouncer/e2sm_rc/lib/MME-Group-ID.c create mode 100644 Bouncer/e2sm_rc/lib/MME-UE-S1AP-ID.c create mode 100644 Bouncer/e2sm_rc/lib/MessageType-Choice-NI.c create mode 100644 Bouncer/e2sm_rc/lib/MessageType-Choice-RRC.c create mode 100644 Bouncer/e2sm_rc/lib/MessageType-Choice.c create mode 100644 Bouncer/e2sm_rc/lib/NG-RANnodeUEXnAPID.c create mode 100644 Bouncer/e2sm_rc/lib/NGENB-CU-UE-W1AP-ID.c create mode 100644 Bouncer/e2sm_rc/lib/NGENB-DU-ID.c create mode 100644 Bouncer/e2sm_rc/lib/NR-ARFCN.c create mode 100644 Bouncer/e2sm_rc/lib/NR-CGI.c create mode 100644 Bouncer/e2sm_rc/lib/NR-PCI.c create mode 100644 Bouncer/e2sm_rc/lib/NRCellIdentity.c create mode 100644 Bouncer/e2sm_rc/lib/NRFrequencyBand-List.c create mode 100644 Bouncer/e2sm_rc/lib/NRFrequencyBandItem.c create mode 100644 Bouncer/e2sm_rc/lib/NRFrequencyInfo.c create mode 100644 Bouncer/e2sm_rc/lib/NRFrequencyShift7p5khz.c create mode 100644 Bouncer/e2sm_rc/lib/NativeEnumerated.c create mode 100644 Bouncer/e2sm_rc/lib/NativeEnumerated_oer.c create mode 100644 Bouncer/e2sm_rc/lib/NativeInteger.c create mode 100644 Bouncer/e2sm_rc/lib/NativeInteger_oer.c create mode 100644 Bouncer/e2sm_rc/lib/NativeReal.c create mode 100644 Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-E-UTRA.c create mode 100644 Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-NR.c create mode 100644 Bouncer/e2sm_rc/lib/NeighborCell-Item.c create mode 100644 Bouncer/e2sm_rc/lib/NeighborCell-List.c create mode 100644 Bouncer/e2sm_rc/lib/NeighborRelation-Info.c create mode 100644 Bouncer/e2sm_rc/lib/NgENB-ID.c create mode 100644 Bouncer/e2sm_rc/lib/OCTET_STRING.c create mode 100644 Bouncer/e2sm_rc/lib/OCTET_STRING_oer.c create mode 100644 Bouncer/e2sm_rc/lib/OPEN_TYPE.c create mode 100644 Bouncer/e2sm_rc/lib/OPEN_TYPE_oer.c create mode 100644 Bouncer/e2sm_rc/lib/PLMNIdentity.c create mode 100644 Bouncer/e2sm_rc/lib/PolicyAction-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/PolicyCondition-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/PrintableString.c create mode 100644 Bouncer/e2sm_rc/lib/QCI.c create mode 100644 Bouncer/e2sm_rc/lib/QoSID.c create mode 100644 Bouncer/e2sm_rc/lib/QosFlowIdentifier.c create mode 100644 Bouncer/e2sm_rc/lib/RAN-CallProcess-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Action-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Breakpoint-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-CallProcess-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Style-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Indication-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Action-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Definition.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-LIST.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Name.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementFalse.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementTrue.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-List.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-Structure.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing-LIST.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing-STRUCTURE.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Testing.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-TestingCondition.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-Value.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementFalse.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementTrue.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-List.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-Structure.c create mode 100644 Bouncer/e2sm_rc/lib/RANParameter-ValueType.c create mode 100644 Bouncer/e2sm_rc/lib/RANUEID.c create mode 100644 Bouncer/e2sm_rc/lib/RANfunction-Name.c create mode 100644 Bouncer/e2sm_rc/lib/REAL.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-Name.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-CallProcessType-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-CallProcessType-Name.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-ControlAction-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-ControlAction-Name.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-EventTrigger-Cell-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-EventTrigger-UE-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-EventTrigger-UEevent-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-EventTriggerCondition-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-Format-Type.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-InsertIndication-ID.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-InsertIndication-Name.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-PolicyAction-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-PolicyAction.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-Style-Name.c create mode 100644 Bouncer/e2sm_rc/lib/RIC-Style-Type.c create mode 100644 Bouncer/e2sm_rc/lib/RRC-MessageID.c create mode 100644 Bouncer/e2sm_rc/lib/RRC-State.c create mode 100644 Bouncer/e2sm_rc/lib/RRCclass-LTE.c create mode 100644 Bouncer/e2sm_rc/lib/RRCclass-NR.c create mode 100644 Bouncer/e2sm_rc/lib/Report-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/S-NSSAI.c create mode 100644 Bouncer/e2sm_rc/lib/SD.c create mode 100644 Bouncer/e2sm_rc/lib/SST.c create mode 100644 Bouncer/e2sm_rc/lib/ServingCell-ARFCN.c create mode 100644 Bouncer/e2sm_rc/lib/ServingCell-PCI.c create mode 100644 Bouncer/e2sm_rc/lib/SubscriberProfileIDforRFP.c create mode 100644 Bouncer/e2sm_rc/lib/SupportedSULBandList.c create mode 100644 Bouncer/e2sm_rc/lib/SupportedSULFreqBandItem.c create mode 100644 Bouncer/e2sm_rc/lib/TriggerType-Choice-L2state.c create mode 100644 Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate-Item.c create mode 100644 Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate.c create mode 100644 Bouncer/e2sm_rc/lib/TriggerType-Choice-UEID.c create mode 100644 Bouncer/e2sm_rc/lib/TriggerType-Choice.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-EN-GNB.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-ENB.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-List.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-GNB-CU-F1AP-ID-List.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-GNB-CU-UP.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-GNB-DU.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-GNB.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-NG-ENB-DU.c create mode 100644 Bouncer/e2sm_rc/lib/UEID-NG-ENB.c create mode 100644 Bouncer/e2sm_rc/lib/UEID.c create mode 100644 Bouncer/e2sm_rc/lib/UEIdentification-RANParameter-Item.c create mode 100644 Bouncer/e2sm_rc/lib/asn_SEQUENCE_OF.c create mode 100644 Bouncer/e2sm_rc/lib/asn_SET_OF.c create mode 100644 Bouncer/e2sm_rc/lib/asn_application.c create mode 100644 Bouncer/e2sm_rc/lib/asn_bit_data.c create mode 100644 Bouncer/e2sm_rc/lib/asn_codecs_prim.c create mode 100644 Bouncer/e2sm_rc/lib/asn_internal.c create mode 100644 Bouncer/e2sm_rc/lib/asn_random_fill.c create mode 100644 Bouncer/e2sm_rc/lib/ber_decoder.c create mode 100644 Bouncer/e2sm_rc/lib/ber_tlv_length.c create mode 100644 Bouncer/e2sm_rc/lib/ber_tlv_tag.c create mode 100644 Bouncer/e2sm_rc/lib/constr_CHOICE.c create mode 100644 Bouncer/e2sm_rc/lib/constr_CHOICE_oer.c create mode 100644 Bouncer/e2sm_rc/lib/constr_SEQUENCE.c create mode 100644 Bouncer/e2sm_rc/lib/constr_SEQUENCE_OF.c create mode 100644 Bouncer/e2sm_rc/lib/constr_SEQUENCE_oer.c create mode 100644 Bouncer/e2sm_rc/lib/constr_SET_OF.c create mode 100644 Bouncer/e2sm_rc/lib/constr_SET_OF_oer.c create mode 100644 Bouncer/e2sm_rc/lib/constr_TYPE.c create mode 100644 Bouncer/e2sm_rc/lib/constraints.c create mode 100644 Bouncer/e2sm_rc/lib/der_encoder.c create mode 100644 Bouncer/e2sm_rc/lib/oer_decoder.c create mode 100644 Bouncer/e2sm_rc/lib/oer_encoder.c create mode 100644 Bouncer/e2sm_rc/lib/oer_support.c create mode 100644 Bouncer/e2sm_rc/lib/per_decoder.c create mode 100644 Bouncer/e2sm_rc/lib/per_encoder.c create mode 100644 Bouncer/e2sm_rc/lib/per_opentype.c create mode 100644 Bouncer/e2sm_rc/lib/per_support.c create mode 100644 Bouncer/e2sm_rc/lib/xer_decoder.c create mode 100644 Bouncer/e2sm_rc/lib/xer_encoder.c create mode 100644 Bouncer/e2sm_rc/lib/xer_support.c create mode 100755 Bouncer/e2sm_rc/wrapper.c create mode 100755 Bouncer/e2sm_rc/wrapper.h delete mode 100644 Bouncer/init/config-file.json delete mode 100644 Bouncer/init/init_script.py delete mode 100644 Bouncer/init/routes.txt delete mode 100644 Bouncer/releases/container-release-app_bxApp.yaml delete mode 100644 Bouncer/rmr-version.yaml create mode 100644 Bouncer/routes.txt delete mode 100644 Bouncer/schemas/b_xapp-policy.json delete mode 100644 Bouncer/schemas/b_xapp-ves.json delete mode 100644 Bouncer/src/Makefile delete mode 100644 Bouncer/src/README delete mode 100644 Bouncer/src/b_xapp_main.cc create mode 100644 Bouncer/src/bouncer.cpp create mode 100644 Bouncer/src/bouncer.h create mode 100644 Bouncer/src/header.h create mode 100644 Bouncer/src/helper.h create mode 100644 Bouncer/src/main.cpp delete mode 100644 Bouncer/src/routes.txt delete mode 100644 Bouncer/src/run_xapp.sh create mode 100644 Bouncer/src/subscription.h delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_control.cc delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_control.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_control_helper.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_control_response.cc delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_control_response.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_indication.cc delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_indication.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/e2ap_indication_helper.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/generic_helpers.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/response_helper.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_delete_request.cc delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_delete_request.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_delete_response.cc delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_delete_response.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_helper.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_request.cc delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_request.hpp delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_response.cc delete mode 100644 Bouncer/src/xapp-asn/e2ap/subscription_response.hpp delete mode 100644 Bouncer/src/xapp-asn/e2sm/e2sm_control.cc delete mode 100644 Bouncer/src/xapp-asn/e2sm/e2sm_control.hpp delete mode 100644 Bouncer/src/xapp-asn/e2sm/e2sm_helpers.hpp delete mode 100644 Bouncer/src/xapp-asn/e2sm/e2sm_indication.cc delete mode 100644 Bouncer/src/xapp-asn/e2sm/e2sm_indication.hpp delete mode 100644 Bouncer/src/xapp-asn/e2sm/e2sm_subscription.cc delete mode 100644 Bouncer/src/xapp-asn/e2sm/e2sm_subscription.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_control.cc delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_control.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_control_helper.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_control_response.cc delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_control_response.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_indication.cc delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_indication.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/e2ap_indication_helper.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/generic_helpers.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/response_helper.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_delete_request.cc delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_delete_request.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_delete_response.cc delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_delete_response.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_helper.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_request.cc delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_request.hpp delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_response.cc delete mode 100644 Bouncer/src/xapp-formats/e2ap/subscription_response.hpp delete mode 100644 Bouncer/src/xapp-formats/e2sm/e2sm.cc delete mode 100644 Bouncer/src/xapp-formats/e2sm/e2sm.hpp delete mode 100644 Bouncer/src/xapp-formats/e2sm/e2sm_helpers.hpp delete mode 100644 Bouncer/src/xapp-mgmt/a1_helper.hpp delete mode 100644 Bouncer/src/xapp-mgmt/format_helper.hpp delete mode 100644 Bouncer/src/xapp-mgmt/msgs_proc.cc delete mode 100644 Bouncer/src/xapp-mgmt/msgs_proc.hpp delete mode 100644 Bouncer/src/xapp-mgmt/subs_mgmt.cc delete mode 100644 Bouncer/src/xapp-mgmt/subs_mgmt.hpp delete mode 100644 Bouncer/src/xapp-mgmt/xapp_handler.hpp delete mode 100644 Bouncer/src/xapp-utils/xapp_config.cc delete mode 100644 Bouncer/src/xapp-utils/xapp_config.hpp delete mode 100644 Bouncer/src/xapp-utils/xapp_rmr.cc delete mode 100644 Bouncer/src/xapp-utils/xapp_rmr.hpp delete mode 100644 Bouncer/src/xapp-utils/xapp_sdl.cc delete mode 100644 Bouncer/src/xapp-utils/xapp_sdl.hpp delete mode 100644 Bouncer/src/xapp.cc delete mode 100644 Bouncer/src/xapp.hpp delete mode 100644 Bouncer/src/xapp_env.sh delete mode 100644 Bouncer/tox.ini create mode 100644 Bouncer/xapp-descriptor/bouncer-register.json create mode 100644 Bouncer/xapp-descriptor/config-file.json create mode 100755 Bouncer/xapp-descriptor/run.sh rename Bouncer/{init => xapp-descriptor}/schema.json (100%) diff --git a/Bouncer/Dockerfile b/Bouncer/Dockerfile index 0205975..444c158 100644 --- a/Bouncer/Dockerfile +++ b/Bouncer/Dockerfile @@ -1,179 +1,66 @@ -#/* -#================================================================================== -# -# Copyright (c) 2019-2020 AT&T Intellectual Property. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#================================================================================== -# */ - -ARG SCHEMA_PATH=schemas -ARG STAGE_DIR=/tmp/bouncer-xapp - -#================================================================================== -FROM nexus3.o-ran-sc.org:10001/ubuntu:18.04 as ricbuild - -# to override repo base, pass in repo argument when running docker build: -# docker build --build-arg REPOBASE=http://abc.def.org . .... -ARG REPOBASE=https://gerrit.oran-osc.org/r -ARG SCHEMA_FILE -ARG SCHEMA_PATH -ARG STAGE_DIR - -# Install necessary packages -WORKDIR ${STAGE_DIR} -RUN apt-get update \ - && apt-get install -y \ - cmake \ - git \ - build-essential \ - automake \ - autoconf-archive \ - autoconf \ - pkg-config \ - gawk \ - libtool \ - wget \ - zlib1g-dev \ - libffi-dev \ - && apt-get clean - -# Install mdclog using debian package hosted at packagecloud.io -ARG MDC_VER=0.0.4-1 -RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog_${MDC_VER}_amd64.deb/download.deb -RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog-dev_${MDC_VER}_amd64.deb/download.deb -RUN dpkg -i mdclog_${MDC_VER}_amd64.deb -RUN dpkg -i mdclog-dev_${MDC_VER}_amd64.deb - -# Install RMr using debian package hosted at packagecloud.io -ARG RMR_VER=4.0.5 -RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMR_VER}_amd64.deb/download.deb -RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMR_VER}_amd64.deb/download.deb -RUN dpkg -i rmr_${RMR_VER}_amd64.deb -RUN dpkg -i rmr-dev_${RMR_VER}_amd64.deb - -#Install RNIB libraries -ARG RNIB_VER=1.0.0 -RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rnib_${RNIB_VER}_all.deb/download.deb -RUN dpkg -i rnib_${RNIB_VER}_all.deb - -## Install SDL Libraries -WORKDIR ${STAGE_DIR} -RUN apt-get install -y cpputest -RUN apt-get remove -y libboost-all-dev -RUN apt-get install -y libboost-all-dev -RUN apt-get install -y libhiredis-dev -#RUN apt-get install -y valgrind - -RUN mkdir /usr/local/include/nlohmann -RUN git clone https://github.com/azadkuh/nlohmann_json_release.git -RUN cp nlohmann_json_release/json.hpp /usr/local/include/nlohmann - -RUN git clone https://gerrit.o-ran-sc.org/r/ric-plt/dbaas -RUN cd dbaas/redismodule && \ - ./autogen.sh && \ - ./configure && \ - make all && \ - make install - -WORKDIR ${STAGE_DIR} -RUN git clone https://gerrit.o-ran-sc.org/r/ric-plt/sdl -RUN cd sdl && \ - ./autogen.sh && \ - ./configure && \ - make all && \ - make install - - -WORKDIR ${STAGE_DIR} -## Install rapidjson - -RUN git clone https://github.com/Tencent/rapidjson && \ - cd rapidjson && \ - mkdir build && \ - cd build && \ - cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && \ - make install && \ - cd ${STAGE_DIR} && \ - rm -rf rapidjson - -WORKDIR ${STAGE_DIR} -## Install CPPRESTSDK - -RUN apt-get install -y libcpprest-dev -RUN apt-get install -y g++ git libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev openssl libssl-dev ninja-build zlib1g-dev -RUN git clone https://github.com/Microsoft/cpprestsdk.git casablanca && \ - cd casablanca && \ - mkdir build && \ - cd build && \ - cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && \ - ninja && \ - ninja install && \ - cd ${STAGE_DIR} - #rm -rf casablanca -##----------------------------------- -# Now install the program -#------------------------------------ -COPY ./ ${STAGE_DIR} -RUN ls -al - - -RUN export CPATH=$CPATH:/usr/local/include && \ - cd src && \ -# source ./xapp_env.sh \ - make clean && \ - make install - -COPY ${SCHEMA_PATH}/* /etc/xapp/ -COPY init/init_script.py /etc/xapp/init_script.py -COPY init/routes.txt /etc/xapp/routes.txt -#--------------------------------------------- -# #Build the final version - -FROM ubuntu:18.04 - -ARG SCHEMA_PATH -ARG STAGE_DIR - -## copy just the needed libraries install it into the final image -COPY --from=ricbuild ${STAGE_DIR}/*.deb /tmp/ -COPY --from=ricbuild /usr/local/lib/librmr_si* /usr/local/lib/ -COPY --from=ricbuild /usr/local/lib/libsdl* /usr/local/lib/ -COPY --from=ricbuild /usr/local/libexec/redismodule/libredis* /usr/local/libexec/redismodule/ -RUN dpkg -i /tmp/*.deb -RUN apt-get update && \ - apt-get install -y libcurl3 python3 && \ - apt-get install -y libboost-all-dev cpputest libcpprest-dev libhiredis-dev valgrind && \ - apt-get clean -COPY --from=ricbuild /etc/xapp/* /etc/xapp/ -COPY --from=ricbuild /usr/local/bin/b_xapp_main /usr/local/bin/b_xapp_main -COPY --from=ricbuild /usr/local/lib/libcpprest.so* /usr/local/bin/ -COPY --from=ricbuild /usr/local/lib/libcpprest.so* /usr/local/lib/ -COPY --from=ricbuild /usr/local/include/rnib/*.h /usr/local/include/rnib/ -COPY --from=ricbuild /usr/local/include/rnib/rnibreader.a /usr/local/include/rnib/ - - -RUN ldconfig -RUN sysctl -w net.ipv6.conf.lo.disable_ipv6=1 - -##ENV PYTHONHOME=/opt/python3 \ -## PYTHONPATH=/opt/python3 \ -ENV RMR_RTG_SVC="9999" \ - RMR_SEED_RT="/etc/xapp/routes.txt" \ - LD_LIBRARY_PATH="/usr/local/lib:/usr/local/libexec" \ - VERBOSE=0 \ - CONFIG_FILE=/opt/ric/config/config-file.json - - - -CMD python3 /etc/xapp/init_script.py $CONFIG_FILE +FROM kumarsandeep3/hcl-bouncer-base-image-ubntu-20:1.0.0 as buildenv +RUN mkdir -p /lite +WORKDIR /lite +#RUN apt-get update +COPY e2ap/ e2ap/ +COPY e2sm_kpm/ e2sm_kpm/ +COPY e2sm_rc/ e2sm_rc/ +# "COMPILING E2AP Wrapper" +RUN cd e2ap && \ + gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ + gcc *.o -shared -o libe2apwrapper.so && \ + cp libe2apwrapper.so /usr/local/lib/ && \ + mkdir /usr/local/include/e2ap && \ + cp wrapper.h headers/*.h /usr/local/include/e2ap && \ + ldconfig +# "COMPILING E2SM-KPM Wrapper" +RUN cd e2sm_kpm && \ + gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ + gcc *.o -shared -o libe2smkpmwrapper.so&& \ + cp libe2smkpmwrapper.so /usr/local/lib/ && \ + mkdir /usr/local/include/e2sm_kpm && \ + cp wrapper.h headers/*.h /usr/local/include/e2sm_kpm && \ + ldconfig +# "COMPILING E2SM-RC Wrapper" +RUN cd e2sm_rc && \ + gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ + gcc *.o -shared -o libe2smrcwrapper.so&& \ + cp libe2smrcwrapper.so /usr/local/lib/ && \ + mkdir /usr/local/include/e2sm_rc && \ + cp wrapper.h headers/*.h /usr/local/include/e2sm_rc && \ + ldconfig + + +# ----- copy files and source code ---------------------------------- + +COPY routes.txt . +COPY xapp-descriptor/ xapp-descriptor/ +COPY src/ src/ + + +RUN g++ -std=c++17 /lite/src/*.cpp -I /lite/src/ -I /lite/e2ap/headers -I /lite/e2sm_kpm/headers -I /lite/e2sm_rc/headers -o bouncer-xapp -lricxfcpp -lrmr_si -lpthread -lm -lboost_system -lcrypto -lssl -lcpprest -lpistache -lnlohmann_json_schema_validator -le2apwrapper -le2smrcwrapper -le2smrcwrapper + +RUN cp bouncer-xapp /usr/local/bin/ + +# ----- create final, smaller, image ---------------------------------- +FROM ubuntu:20.04 + +RUN mkdir -p /lite +WORKDIR /lite + +COPY --from=buildenv /usr/local/lib /usr/local/lib/ +#for ssl +COPY --from=buildenv /lib/x86_64-linux-gnu/libcrypto.so.1.1 /lib/x86_64-linux-gnu/libcrypto.so.1.1 +COPY --from=buildenv /lib/x86_64-linux-gnu/libssl.so.1.1 /lib/x86_64-linux-gnu/libssl.so.1.1 + +COPY --from=buildenv /usr/local/include /usr/local/include +COPY --from=buildenv /usr/local/bin/ /usr/local/bin/ +COPY --from=buildenv /lite/routes.txt /lite/routes.txt + +ENV RMR_SEED_RT=/lite/routes.txt +ENV RMR_SRC_ID=service-ricxapp-bouncer-xapp-rmr.ricxapp:4560 +ENV PATH=/usr/local/bin:$PATH +ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib + + +CMD [ "/usr/local/bin/bouncer-xapp" ] diff --git a/Bouncer/README b/Bouncer/README deleted file mode 100644 index c95aa10..0000000 --- a/Bouncer/README +++ /dev/null @@ -1,43 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - - -This repository consists of Bouncer Xapp developed in C++. Its envisioned to do simple RIC Benchmarking example Xapp. -It is required to have following features: - -1) E2 Subscription Handling -2) DB Access: SDL and RNIB -3) RMR Message handling -4) Bouncer E2SM -5) RIC Indication - -Steps for installation/running Bouncer Xapp. -$ cd init -$ source ./xapp_env.sh -$cd ../src -$ make -$ ./b_xapp_main - -Testing: -======== - -To test the bouncer xapp, E2simulator is required to be build and run. -1. Take the E2simulator code under RIC-Benchmarking/E2-interface. -2. Run/Restart the Near RT RIC Platform pods. -3. Run E2sim Pod using helm chart( build e2sim using docker file available in e2-interface/e2sim/e2sm_examples/kpm_e2sm/Dockerfile) -4. Deploy bouncer xapp by following the xapp onboarding steps - -Login to the bouncer xapp and E2sim Pods using kubectl exec to see the benchmarking timestamp. \ No newline at end of file diff --git a/Bouncer/asn1c_defs/B-ControlCommand.c b/Bouncer/asn1c_defs/B-ControlCommand.c deleted file mode 100644 index 98f0094..0000000 --- a/Bouncer/asn1c_defs/B-ControlCommand.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "B-ControlCommand.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -static asn_per_constraints_t asn_PER_type_B_ControlCommand_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_B_ControlCommand_value2enum_1[] = { - { 0, 8, "addition" }, - { 1, 8, "deletion" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_B_ControlCommand_enum2value_1[] = { - 0, /* addition(0) */ - 1 /* deletion(1) */ - /* This list is extensible */ -}; -static const asn_INTEGER_specifics_t asn_SPC_B_ControlCommand_specs_1 = { - asn_MAP_B_ControlCommand_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_B_ControlCommand_enum2value_1, /* N => "tag"; sorted by N */ - 2, /* Number of elements in the maps */ - 3, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_B_ControlCommand_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_B_ControlCommand = { - "B-ControlCommand", - "B-ControlCommand", - &asn_OP_NativeEnumerated, - asn_DEF_B_ControlCommand_tags_1, - sizeof(asn_DEF_B_ControlCommand_tags_1) - /sizeof(asn_DEF_B_ControlCommand_tags_1[0]), /* 1 */ - asn_DEF_B_ControlCommand_tags_1, /* Same as above */ - sizeof(asn_DEF_B_ControlCommand_tags_1) - /sizeof(asn_DEF_B_ControlCommand_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_B_ControlCommand_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_B_ControlCommand_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/B-ControlCommand.h b/Bouncer/asn1c_defs/B-ControlCommand.h deleted file mode 100644 index 3e418dc..0000000 --- a/Bouncer/asn1c_defs/B-ControlCommand.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _B_ControlCommand_H_ -#define _B_ControlCommand_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum B_ControlCommand { - B_ControlCommand_addition = 0, - B_ControlCommand_deletion = 1 - /* - * Enumeration is extensible - */ -} e_B_ControlCommand; - -/* B-ControlCommand */ -typedef long B_ControlCommand_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_B_ControlCommand; -asn_struct_free_f B_ControlCommand_free; -asn_struct_print_f B_ControlCommand_print; -asn_constr_check_f B_ControlCommand_constraint; -ber_type_decoder_f B_ControlCommand_decode_ber; -der_type_encoder_f B_ControlCommand_encode_der; -xer_type_decoder_f B_ControlCommand_decode_xer; -xer_type_encoder_f B_ControlCommand_encode_xer; -per_type_decoder_f B_ControlCommand_decode_uper; -per_type_encoder_f B_ControlCommand_encode_uper; -per_type_decoder_f B_ControlCommand_decode_aper; -per_type_encoder_f B_ControlCommand_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _B_ControlCommand_H_ */ -#include diff --git a/Bouncer/asn1c_defs/B-Header.c b/Bouncer/asn1c_defs/B-Header.c deleted file mode 100644 index 627deb6..0000000 --- a/Bouncer/asn1c_defs/B-Header.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "B-Header.h" - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_B_Header_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_B_Header = { - "B-Header", - "B-Header", - &asn_OP_NativeInteger, - asn_DEF_B_Header_tags_1, - sizeof(asn_DEF_B_Header_tags_1) - /sizeof(asn_DEF_B_Header_tags_1[0]), /* 1 */ - asn_DEF_B_Header_tags_1, /* Same as above */ - sizeof(asn_DEF_B_Header_tags_1) - /sizeof(asn_DEF_B_Header_tags_1[0]), /* 1 */ - { 0, 0, NativeInteger_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/B-Header.h b/Bouncer/asn1c_defs/B-Header.h deleted file mode 100644 index a2da40d..0000000 --- a/Bouncer/asn1c_defs/B-Header.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _B_Header_H_ -#define _B_Header_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* B-Header */ -typedef long B_Header_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_B_Header; -asn_struct_free_f B_Header_free; -asn_struct_print_f B_Header_print; -asn_constr_check_f B_Header_constraint; -ber_type_decoder_f B_Header_decode_ber; -der_type_encoder_f B_Header_encode_der; -xer_type_decoder_f B_Header_decode_xer; -xer_type_encoder_f B_Header_encode_xer; -per_type_decoder_f B_Header_decode_uper; -per_type_encoder_f B_Header_encode_uper; -per_type_decoder_f B_Header_decode_aper; -per_type_encoder_f B_Header_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _B_Header_H_ */ -#include diff --git a/Bouncer/asn1c_defs/B-Message.c b/Bouncer/asn1c_defs/B-Message.c deleted file mode 100644 index 3b0b6b6..0000000 --- a/Bouncer/asn1c_defs/B-Message.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "B-Message.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_B_Message_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_B_Message = { - "B-Message", - "B-Message", - &asn_OP_OCTET_STRING, - asn_DEF_B_Message_tags_1, - sizeof(asn_DEF_B_Message_tags_1) - /sizeof(asn_DEF_B_Message_tags_1[0]), /* 1 */ - asn_DEF_B_Message_tags_1, /* Same as above */ - sizeof(asn_DEF_B_Message_tags_1) - /sizeof(asn_DEF_B_Message_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/B-Message.h b/Bouncer/asn1c_defs/B-Message.h deleted file mode 100644 index 83904ad..0000000 --- a/Bouncer/asn1c_defs/B-Message.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _B_Message_H_ -#define _B_Message_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* B-Message */ -typedef OCTET_STRING_t B_Message_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_B_Message; -asn_struct_free_f B_Message_free; -asn_struct_print_f B_Message_print; -asn_constr_check_f B_Message_constraint; -ber_type_decoder_f B_Message_decode_ber; -der_type_encoder_f B_Message_encode_der; -xer_type_decoder_f B_Message_decode_xer; -xer_type_encoder_f B_Message_encode_xer; -per_type_decoder_f B_Message_decode_uper; -per_type_encoder_f B_Message_encode_uper; -per_type_decoder_f B_Message_decode_aper; -per_type_encoder_f B_Message_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _B_Message_H_ */ -#include diff --git a/Bouncer/asn1c_defs/B-TriggerNature.c b/Bouncer/asn1c_defs/B-TriggerNature.c deleted file mode 100644 index 6cb0f7a..0000000 --- a/Bouncer/asn1c_defs/B-TriggerNature.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "B-TriggerNature.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_B_TriggerNature_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_B_TriggerNature_value2enum_1[] = { - { 0, 3, "now" }, - { 1, 8, "onchange" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_B_TriggerNature_enum2value_1[] = { - 0, /* now(0) */ - 1 /* onchange(1) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_B_TriggerNature_specs_1 = { - asn_MAP_B_TriggerNature_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_B_TriggerNature_enum2value_1, /* N => "tag"; sorted by N */ - 2, /* Number of elements in the maps */ - 3, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_B_TriggerNature_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_B_TriggerNature = { - "B-TriggerNature", - "B-TriggerNature", - &asn_OP_NativeEnumerated, - asn_DEF_B_TriggerNature_tags_1, - sizeof(asn_DEF_B_TriggerNature_tags_1) - /sizeof(asn_DEF_B_TriggerNature_tags_1[0]), /* 1 */ - asn_DEF_B_TriggerNature_tags_1, /* Same as above */ - sizeof(asn_DEF_B_TriggerNature_tags_1) - /sizeof(asn_DEF_B_TriggerNature_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_B_TriggerNature_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_B_TriggerNature_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/B-TriggerNature.h b/Bouncer/asn1c_defs/B-TriggerNature.h deleted file mode 100644 index 0a0d7b3..0000000 --- a/Bouncer/asn1c_defs/B-TriggerNature.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _B_TriggerNature_H_ -#define _B_TriggerNature_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum B_TriggerNature { - B_TriggerNature_now = 0, - B_TriggerNature_onchange = 1 - /* - * Enumeration is extensible - */ -} e_B_TriggerNature; - -/* B-TriggerNature */ -typedef long B_TriggerNature_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_B_TriggerNature_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_B_TriggerNature; -extern const asn_INTEGER_specifics_t asn_SPC_B_TriggerNature_specs_1; -asn_struct_free_f B_TriggerNature_free; -asn_struct_print_f B_TriggerNature_print; -asn_constr_check_f B_TriggerNature_constraint; -ber_type_decoder_f B_TriggerNature_decode_ber; -der_type_encoder_f B_TriggerNature_encode_der; -xer_type_decoder_f B_TriggerNature_decode_xer; -xer_type_encoder_f B_TriggerNature_encode_xer; -per_type_decoder_f B_TriggerNature_decode_uper; -per_type_encoder_f B_TriggerNature_encode_uper; -per_type_decoder_f B_TriggerNature_decode_aper; -per_type_encoder_f B_TriggerNature_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _B_TriggerNature_H_ */ -#include diff --git a/Bouncer/asn1c_defs/Cause.c b/Bouncer/asn1c_defs/Cause.c deleted file mode 100644 index 216f970..0000000 --- a/Bouncer/asn1c_defs/Cause.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "Cause.h" - -asn_per_constraints_t asn_PER_type_Cause_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_Cause_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.ricRequest), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_CauseRIC, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricRequest" - }, - { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.ricService), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_CauseRICservice, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricService" - }, - { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.transport), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_CauseTransport, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "transport" - }, - { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.protocol), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_CauseProtocol, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocol" - }, - { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.misc), - (ASN_TAG_CLASS_CONTEXT | (4 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_CauseMisc, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "misc" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_Cause_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* misc */ -}; -asn_CHOICE_specifics_t asn_SPC_Cause_specs_1 = { - sizeof(struct Cause), - offsetof(struct Cause, _asn_ctx), - offsetof(struct Cause, present), - sizeof(((struct Cause *)0)->present), - asn_MAP_Cause_tag2el_1, - 5, /* Count of tags in the map */ - 0, 0, - 5 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_Cause = { - "Cause", - "Cause", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_Cause_constr_1, CHOICE_constraint }, - asn_MBR_Cause_1, - 5, /* Elements count */ - &asn_SPC_Cause_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/Cause.h b/Bouncer/asn1c_defs/Cause.h deleted file mode 100644 index 0311e82..0000000 --- a/Bouncer/asn1c_defs/Cause.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _Cause_H_ -#define _Cause_H_ - - -#include - -/* Including external dependencies */ -#include "CauseRIC.h" -#include "CauseRICservice.h" -#include "CauseTransport.h" -#include "CauseProtocol.h" -#include "CauseMisc.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum Cause_PR { - Cause_PR_NOTHING, /* No components present */ - Cause_PR_ricRequest, - Cause_PR_ricService, - Cause_PR_transport, - Cause_PR_protocol, - Cause_PR_misc - /* Extensions may appear below */ - -} Cause_PR; - -/* Cause */ -typedef struct Cause { - Cause_PR present; - union Cause_u { - CauseRIC_t ricRequest; - CauseRICservice_t ricService; - CauseTransport_t transport; - CauseProtocol_t protocol; - CauseMisc_t misc; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Cause_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Cause; -extern asn_CHOICE_specifics_t asn_SPC_Cause_specs_1; -extern asn_TYPE_member_t asn_MBR_Cause_1[5]; -extern asn_per_constraints_t asn_PER_type_Cause_constr_1; - -#ifdef __cplusplus -} -#endif - -#endif /* _Cause_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CauseMisc.c b/Bouncer/asn1c_defs/CauseMisc.c deleted file mode 100644 index 98cb877..0000000 --- a/Bouncer/asn1c_defs/CauseMisc.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CauseMisc.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_CauseMisc_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_CauseMisc_value2enum_1[] = { - { 0, 27, "control-processing-overload" }, - { 1, 16, "hardware-failure" }, - { 2, 15, "om-intervention" }, - { 3, 11, "unspecified" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_CauseMisc_enum2value_1[] = { - 0, /* control-processing-overload(0) */ - 1, /* hardware-failure(1) */ - 2, /* om-intervention(2) */ - 3 /* unspecified(3) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_CauseMisc_specs_1 = { - asn_MAP_CauseMisc_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_CauseMisc_enum2value_1, /* N => "tag"; sorted by N */ - 4, /* Number of elements in the maps */ - 5, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_CauseMisc_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_CauseMisc = { - "CauseMisc", - "CauseMisc", - &asn_OP_NativeEnumerated, - asn_DEF_CauseMisc_tags_1, - sizeof(asn_DEF_CauseMisc_tags_1) - /sizeof(asn_DEF_CauseMisc_tags_1[0]), /* 1 */ - asn_DEF_CauseMisc_tags_1, /* Same as above */ - sizeof(asn_DEF_CauseMisc_tags_1) - /sizeof(asn_DEF_CauseMisc_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_CauseMisc_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_CauseMisc_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CauseMisc.h b/Bouncer/asn1c_defs/CauseMisc.h deleted file mode 100644 index fe9470a..0000000 --- a/Bouncer/asn1c_defs/CauseMisc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CauseMisc_H_ -#define _CauseMisc_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum CauseMisc { - CauseMisc_control_processing_overload = 0, - CauseMisc_hardware_failure = 1, - CauseMisc_om_intervention = 2, - CauseMisc_unspecified = 3 - /* - * Enumeration is extensible - */ -} e_CauseMisc; - -/* CauseMisc */ -typedef long CauseMisc_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_CauseMisc_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_CauseMisc; -extern const asn_INTEGER_specifics_t asn_SPC_CauseMisc_specs_1; -asn_struct_free_f CauseMisc_free; -asn_struct_print_f CauseMisc_print; -asn_constr_check_f CauseMisc_constraint; -ber_type_decoder_f CauseMisc_decode_ber; -der_type_encoder_f CauseMisc_encode_der; -xer_type_decoder_f CauseMisc_decode_xer; -xer_type_encoder_f CauseMisc_encode_xer; -per_type_decoder_f CauseMisc_decode_uper; -per_type_encoder_f CauseMisc_encode_uper; -per_type_decoder_f CauseMisc_decode_aper; -per_type_encoder_f CauseMisc_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _CauseMisc_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CauseProtocol.c b/Bouncer/asn1c_defs/CauseProtocol.c deleted file mode 100644 index 007c664..0000000 --- a/Bouncer/asn1c_defs/CauseProtocol.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CauseProtocol.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_CauseProtocol_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_CauseProtocol_value2enum_1[] = { - { 0, 21, "transfer-syntax-error" }, - { 1, 28, "abstract-syntax-error-reject" }, - { 2, 39, "abstract-syntax-error-ignore-and-notify" }, - { 3, 42, "message-not-compatible-with-receiver-state" }, - { 4, 14, "semantic-error" }, - { 5, 49, "abstract-syntax-error-falsely-constructed-message" }, - { 6, 11, "unspecified" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_CauseProtocol_enum2value_1[] = { - 5, /* abstract-syntax-error-falsely-constructed-message(5) */ - 2, /* abstract-syntax-error-ignore-and-notify(2) */ - 1, /* abstract-syntax-error-reject(1) */ - 3, /* message-not-compatible-with-receiver-state(3) */ - 4, /* semantic-error(4) */ - 0, /* transfer-syntax-error(0) */ - 6 /* unspecified(6) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_CauseProtocol_specs_1 = { - asn_MAP_CauseProtocol_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_CauseProtocol_enum2value_1, /* N => "tag"; sorted by N */ - 7, /* Number of elements in the maps */ - 8, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_CauseProtocol_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_CauseProtocol = { - "CauseProtocol", - "CauseProtocol", - &asn_OP_NativeEnumerated, - asn_DEF_CauseProtocol_tags_1, - sizeof(asn_DEF_CauseProtocol_tags_1) - /sizeof(asn_DEF_CauseProtocol_tags_1[0]), /* 1 */ - asn_DEF_CauseProtocol_tags_1, /* Same as above */ - sizeof(asn_DEF_CauseProtocol_tags_1) - /sizeof(asn_DEF_CauseProtocol_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_CauseProtocol_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_CauseProtocol_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CauseProtocol.h b/Bouncer/asn1c_defs/CauseProtocol.h deleted file mode 100644 index d074a19..0000000 --- a/Bouncer/asn1c_defs/CauseProtocol.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CauseProtocol_H_ -#define _CauseProtocol_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum CauseProtocol { - CauseProtocol_transfer_syntax_error = 0, - CauseProtocol_abstract_syntax_error_reject = 1, - CauseProtocol_abstract_syntax_error_ignore_and_notify = 2, - CauseProtocol_message_not_compatible_with_receiver_state = 3, - CauseProtocol_semantic_error = 4, - CauseProtocol_abstract_syntax_error_falsely_constructed_message = 5, - CauseProtocol_unspecified = 6 - /* - * Enumeration is extensible - */ -} e_CauseProtocol; - -/* CauseProtocol */ -typedef long CauseProtocol_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_CauseProtocol_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_CauseProtocol; -extern const asn_INTEGER_specifics_t asn_SPC_CauseProtocol_specs_1; -asn_struct_free_f CauseProtocol_free; -asn_struct_print_f CauseProtocol_print; -asn_constr_check_f CauseProtocol_constraint; -ber_type_decoder_f CauseProtocol_decode_ber; -der_type_encoder_f CauseProtocol_encode_der; -xer_type_decoder_f CauseProtocol_decode_xer; -xer_type_encoder_f CauseProtocol_encode_xer; -per_type_decoder_f CauseProtocol_decode_uper; -per_type_encoder_f CauseProtocol_encode_uper; -per_type_decoder_f CauseProtocol_decode_aper; -per_type_encoder_f CauseProtocol_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _CauseProtocol_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CauseRIC.c b/Bouncer/asn1c_defs/CauseRIC.c deleted file mode 100644 index 81ca48b..0000000 --- a/Bouncer/asn1c_defs/CauseRIC.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CauseRIC.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_CauseRIC_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 10 } /* (0..10,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_CauseRIC_value2enum_1[] = { - { 0, 23, "ran-function-id-Invalid" }, - { 1, 20, "action-not-supported" }, - { 2, 17, "excessive-actions" }, - { 3, 16, "duplicate-action" }, - { 4, 15, "duplicate-event" }, - { 5, 23, "function-resource-limit" }, - { 6, 18, "request-id-unknown" }, - { 7, 46, "inconsistent-action-subsequent-action-sequence" }, - { 8, 23, "control-message-invalid" }, - { 9, 23, "call-process-id-invalid" }, - { 10, 11, "unspecified" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_CauseRIC_enum2value_1[] = { - 1, /* action-not-supported(1) */ - 9, /* call-process-id-invalid(9) */ - 8, /* control-message-invalid(8) */ - 3, /* duplicate-action(3) */ - 4, /* duplicate-event(4) */ - 2, /* excessive-actions(2) */ - 5, /* function-resource-limit(5) */ - 7, /* inconsistent-action-subsequent-action-sequence(7) */ - 0, /* ran-function-id-Invalid(0) */ - 6, /* request-id-unknown(6) */ - 10 /* unspecified(10) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_CauseRIC_specs_1 = { - asn_MAP_CauseRIC_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_CauseRIC_enum2value_1, /* N => "tag"; sorted by N */ - 11, /* Number of elements in the maps */ - 12, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_CauseRIC_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_CauseRIC = { - "CauseRIC", - "CauseRIC", - &asn_OP_NativeEnumerated, - asn_DEF_CauseRIC_tags_1, - sizeof(asn_DEF_CauseRIC_tags_1) - /sizeof(asn_DEF_CauseRIC_tags_1[0]), /* 1 */ - asn_DEF_CauseRIC_tags_1, /* Same as above */ - sizeof(asn_DEF_CauseRIC_tags_1) - /sizeof(asn_DEF_CauseRIC_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_CauseRIC_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_CauseRIC_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CauseRIC.h b/Bouncer/asn1c_defs/CauseRIC.h deleted file mode 100644 index 9b8f9ec..0000000 --- a/Bouncer/asn1c_defs/CauseRIC.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CauseRIC_H_ -#define _CauseRIC_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum CauseRIC { - CauseRIC_ran_function_id_Invalid = 0, - CauseRIC_action_not_supported = 1, - CauseRIC_excessive_actions = 2, - CauseRIC_duplicate_action = 3, - CauseRIC_duplicate_event = 4, - CauseRIC_function_resource_limit = 5, - CauseRIC_request_id_unknown = 6, - CauseRIC_inconsistent_action_subsequent_action_sequence = 7, - CauseRIC_control_message_invalid = 8, - CauseRIC_call_process_id_invalid = 9, - CauseRIC_unspecified = 10 - /* - * Enumeration is extensible - */ -} e_CauseRIC; - -/* CauseRIC */ -typedef long CauseRIC_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_CauseRIC_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_CauseRIC; -extern const asn_INTEGER_specifics_t asn_SPC_CauseRIC_specs_1; -asn_struct_free_f CauseRIC_free; -asn_struct_print_f CauseRIC_print; -asn_constr_check_f CauseRIC_constraint; -ber_type_decoder_f CauseRIC_decode_ber; -der_type_encoder_f CauseRIC_encode_der; -xer_type_decoder_f CauseRIC_decode_xer; -xer_type_encoder_f CauseRIC_encode_xer; -per_type_decoder_f CauseRIC_decode_uper; -per_type_encoder_f CauseRIC_encode_uper; -per_type_decoder_f CauseRIC_decode_aper; -per_type_encoder_f CauseRIC_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _CauseRIC_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CauseRICservice.c b/Bouncer/asn1c_defs/CauseRICservice.c deleted file mode 100644 index fc06d4c..0000000 --- a/Bouncer/asn1c_defs/CauseRICservice.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CauseRICservice.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_CauseRICservice_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_CauseRICservice_value2enum_1[] = { - { 0, 21, "function-not-required" }, - { 1, 19, "excessive-functions" }, - { 2, 18, "ric-resource-limit" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_CauseRICservice_enum2value_1[] = { - 1, /* excessive-functions(1) */ - 0, /* function-not-required(0) */ - 2 /* ric-resource-limit(2) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_CauseRICservice_specs_1 = { - asn_MAP_CauseRICservice_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_CauseRICservice_enum2value_1, /* N => "tag"; sorted by N */ - 3, /* Number of elements in the maps */ - 4, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_CauseRICservice_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_CauseRICservice = { - "CauseRICservice", - "CauseRICservice", - &asn_OP_NativeEnumerated, - asn_DEF_CauseRICservice_tags_1, - sizeof(asn_DEF_CauseRICservice_tags_1) - /sizeof(asn_DEF_CauseRICservice_tags_1[0]), /* 1 */ - asn_DEF_CauseRICservice_tags_1, /* Same as above */ - sizeof(asn_DEF_CauseRICservice_tags_1) - /sizeof(asn_DEF_CauseRICservice_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_CauseRICservice_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_CauseRICservice_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CauseRICservice.h b/Bouncer/asn1c_defs/CauseRICservice.h deleted file mode 100644 index 98989eb..0000000 --- a/Bouncer/asn1c_defs/CauseRICservice.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CauseRICservice_H_ -#define _CauseRICservice_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum CauseRICservice { - CauseRICservice_function_not_required = 0, - CauseRICservice_excessive_functions = 1, - CauseRICservice_ric_resource_limit = 2 - /* - * Enumeration is extensible - */ -} e_CauseRICservice; - -/* CauseRICservice */ -typedef long CauseRICservice_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_CauseRICservice_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_CauseRICservice; -extern const asn_INTEGER_specifics_t asn_SPC_CauseRICservice_specs_1; -asn_struct_free_f CauseRICservice_free; -asn_struct_print_f CauseRICservice_print; -asn_constr_check_f CauseRICservice_constraint; -ber_type_decoder_f CauseRICservice_decode_ber; -der_type_encoder_f CauseRICservice_encode_der; -xer_type_decoder_f CauseRICservice_decode_xer; -xer_type_encoder_f CauseRICservice_encode_xer; -per_type_decoder_f CauseRICservice_decode_uper; -per_type_encoder_f CauseRICservice_encode_uper; -per_type_decoder_f CauseRICservice_decode_aper; -per_type_encoder_f CauseRICservice_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _CauseRICservice_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CauseTransport.c b/Bouncer/asn1c_defs/CauseTransport.c deleted file mode 100644 index de4d52a..0000000 --- a/Bouncer/asn1c_defs/CauseTransport.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CauseTransport.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_CauseTransport_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_CauseTransport_value2enum_1[] = { - { 0, 11, "unspecified" }, - { 1, 30, "transport-resource-unavailable" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_CauseTransport_enum2value_1[] = { - 1, /* transport-resource-unavailable(1) */ - 0 /* unspecified(0) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_CauseTransport_specs_1 = { - asn_MAP_CauseTransport_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_CauseTransport_enum2value_1, /* N => "tag"; sorted by N */ - 2, /* Number of elements in the maps */ - 3, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_CauseTransport_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_CauseTransport = { - "CauseTransport", - "CauseTransport", - &asn_OP_NativeEnumerated, - asn_DEF_CauseTransport_tags_1, - sizeof(asn_DEF_CauseTransport_tags_1) - /sizeof(asn_DEF_CauseTransport_tags_1[0]), /* 1 */ - asn_DEF_CauseTransport_tags_1, /* Same as above */ - sizeof(asn_DEF_CauseTransport_tags_1) - /sizeof(asn_DEF_CauseTransport_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_CauseTransport_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_CauseTransport_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CauseTransport.h b/Bouncer/asn1c_defs/CauseTransport.h deleted file mode 100644 index 1a7ad59..0000000 --- a/Bouncer/asn1c_defs/CauseTransport.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CauseTransport_H_ -#define _CauseTransport_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum CauseTransport { - CauseTransport_unspecified = 0, - CauseTransport_transport_resource_unavailable = 1 - /* - * Enumeration is extensible - */ -} e_CauseTransport; - -/* CauseTransport */ -typedef long CauseTransport_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_CauseTransport_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_CauseTransport; -extern const asn_INTEGER_specifics_t asn_SPC_CauseTransport_specs_1; -asn_struct_free_f CauseTransport_free; -asn_struct_print_f CauseTransport_print; -asn_constr_check_f CauseTransport_constraint; -ber_type_decoder_f CauseTransport_decode_ber; -der_type_encoder_f CauseTransport_encode_der; -xer_type_decoder_f CauseTransport_decode_xer; -xer_type_encoder_f CauseTransport_encode_xer; -per_type_decoder_f CauseTransport_decode_uper; -per_type_encoder_f CauseTransport_encode_uper; -per_type_decoder_f CauseTransport_decode_aper; -per_type_encoder_f CauseTransport_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _CauseTransport_H_ */ -#include diff --git a/Bouncer/asn1c_defs/Criticality.c b/Bouncer/asn1c_defs/Criticality.c deleted file mode 100644 index e3e69c8..0000000 --- a/Bouncer/asn1c_defs/Criticality.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "Criticality.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_Criticality_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_Criticality_value2enum_1[] = { - { 0, 6, "reject" }, - { 1, 6, "ignore" }, - { 2, 6, "notify" } -}; -static const unsigned int asn_MAP_Criticality_enum2value_1[] = { - 1, /* ignore(1) */ - 2, /* notify(2) */ - 0 /* reject(0) */ -}; -const asn_INTEGER_specifics_t asn_SPC_Criticality_specs_1 = { - asn_MAP_Criticality_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_Criticality_enum2value_1, /* N => "tag"; sorted by N */ - 3, /* Number of elements in the maps */ - 0, /* Enumeration is not extensible */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_Criticality_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Criticality = { - "Criticality", - "Criticality", - &asn_OP_NativeEnumerated, - asn_DEF_Criticality_tags_1, - sizeof(asn_DEF_Criticality_tags_1) - /sizeof(asn_DEF_Criticality_tags_1[0]), /* 1 */ - asn_DEF_Criticality_tags_1, /* Same as above */ - sizeof(asn_DEF_Criticality_tags_1) - /sizeof(asn_DEF_Criticality_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_Criticality_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_Criticality_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/Criticality.h b/Bouncer/asn1c_defs/Criticality.h deleted file mode 100644 index 2df73f9..0000000 --- a/Bouncer/asn1c_defs/Criticality.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _Criticality_H_ -#define _Criticality_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum Criticality { - Criticality_reject = 0, - Criticality_ignore = 1, - Criticality_notify = 2 -} e_Criticality; - -/* Criticality */ -typedef long Criticality_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_Criticality_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_Criticality; -extern const asn_INTEGER_specifics_t asn_SPC_Criticality_specs_1; -asn_struct_free_f Criticality_free; -asn_struct_print_f Criticality_print; -asn_constr_check_f Criticality_constraint; -ber_type_decoder_f Criticality_decode_ber; -der_type_encoder_f Criticality_encode_der; -xer_type_decoder_f Criticality_decode_xer; -xer_type_encoder_f Criticality_encode_xer; -per_type_decoder_f Criticality_decode_uper; -per_type_encoder_f Criticality_encode_uper; -per_type_decoder_f Criticality_decode_aper; -per_type_encoder_f Criticality_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Criticality_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.c b/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.c deleted file mode 100644 index 54b3fc9..0000000 --- a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CriticalityDiagnostics-IE-Item.h" - -asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, iECriticality), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "iECriticality" - }, - { ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, iE_ID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "iE-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, typeOfError), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_TypeOfError, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "typeOfError" - }, -}; -static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_CriticalityDiagnostics_IE_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iECriticality */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* iE-ID */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* typeOfError */ -}; -asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_IE_Item_specs_1 = { - sizeof(struct CriticalityDiagnostics_IE_Item), - offsetof(struct CriticalityDiagnostics_IE_Item, _asn_ctx), - asn_MAP_CriticalityDiagnostics_IE_Item_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 3, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_Item = { - "CriticalityDiagnostics-IE-Item", - "CriticalityDiagnostics-IE-Item", - &asn_OP_SEQUENCE, - asn_DEF_CriticalityDiagnostics_IE_Item_tags_1, - sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1) - /sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */ - asn_DEF_CriticalityDiagnostics_IE_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1) - /sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_CriticalityDiagnostics_IE_Item_1, - 3, /* Elements count */ - &asn_SPC_CriticalityDiagnostics_IE_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.h b/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.h deleted file mode 100644 index 3aa9196..0000000 --- a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-Item.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CriticalityDiagnostics_IE_Item_H_ -#define _CriticalityDiagnostics_IE_Item_H_ - - -#include - -/* Including external dependencies */ -#include "Criticality.h" -#include "ProtocolIE-ID.h" -#include "TypeOfError.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* CriticalityDiagnostics-IE-Item */ -typedef struct CriticalityDiagnostics_IE_Item { - Criticality_t iECriticality; - ProtocolIE_ID_t iE_ID; - TypeOfError_t typeOfError; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CriticalityDiagnostics_IE_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_Item; -extern asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_IE_Item_specs_1; -extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[3]; - -#ifdef __cplusplus -} -#endif - -#endif /* _CriticalityDiagnostics_IE_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.c b/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.c deleted file mode 100644 index 09410ff..0000000 --- a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CriticalityDiagnostics-IE-List.h" - -#include "CriticalityDiagnostics-IE-Item.h" -asn_per_constraints_t asn_PER_type_CriticalityDiagnostics_IE_List_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_List_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_CriticalityDiagnostics_IE_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_IE_List_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_CriticalityDiagnostics_IE_List_specs_1 = { - sizeof(struct CriticalityDiagnostics_IE_List), - offsetof(struct CriticalityDiagnostics_IE_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_List = { - "CriticalityDiagnostics-IE-List", - "CriticalityDiagnostics-IE-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_CriticalityDiagnostics_IE_List_tags_1, - sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1) - /sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */ - asn_DEF_CriticalityDiagnostics_IE_List_tags_1, /* Same as above */ - sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1) - /sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_CriticalityDiagnostics_IE_List_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_CriticalityDiagnostics_IE_List_1, - 1, /* Single element */ - &asn_SPC_CriticalityDiagnostics_IE_List_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.h b/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.h deleted file mode 100644 index 3bbb58b..0000000 --- a/Bouncer/asn1c_defs/CriticalityDiagnostics-IE-List.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CriticalityDiagnostics_IE_List_H_ -#define _CriticalityDiagnostics_IE_List_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct CriticalityDiagnostics_IE_Item; - -/* CriticalityDiagnostics-IE-List */ -typedef struct CriticalityDiagnostics_IE_List { - A_SEQUENCE_OF(struct CriticalityDiagnostics_IE_Item) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CriticalityDiagnostics_IE_List_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_List; -extern asn_SET_OF_specifics_t asn_SPC_CriticalityDiagnostics_IE_List_specs_1; -extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_List_1[1]; -extern asn_per_constraints_t asn_PER_type_CriticalityDiagnostics_IE_List_constr_1; - -#ifdef __cplusplus -} -#endif - -#endif /* _CriticalityDiagnostics_IE_List_H_ */ -#include diff --git a/Bouncer/asn1c_defs/CriticalityDiagnostics.c b/Bouncer/asn1c_defs/CriticalityDiagnostics.c deleted file mode 100644 index d9b8977..0000000 --- a/Bouncer/asn1c_defs/CriticalityDiagnostics.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "CriticalityDiagnostics.h" - -#include "RICrequestID.h" -#include "CriticalityDiagnostics-IE-List.h" -static asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = { - { ATF_POINTER, 5, offsetof(struct CriticalityDiagnostics, procedureCode), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProcedureCode, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "procedureCode" - }, - { ATF_POINTER, 4, offsetof(struct CriticalityDiagnostics, triggeringMessage), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_TriggeringMessage, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "triggeringMessage" - }, - { ATF_POINTER, 3, offsetof(struct CriticalityDiagnostics, procedureCriticality), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "procedureCriticality" - }, - { ATF_POINTER, 2, offsetof(struct CriticalityDiagnostics, ricRequestorID), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricRequestorID" - }, - { ATF_POINTER, 1, offsetof(struct CriticalityDiagnostics, iEsCriticalityDiagnostics), - (ASN_TAG_CLASS_CONTEXT | (4 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_CriticalityDiagnostics_IE_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "iEsCriticalityDiagnostics" - }, -}; -static const int asn_MAP_CriticalityDiagnostics_oms_1[] = { 0, 1, 2, 3, 4 }; -static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_CriticalityDiagnostics_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* triggeringMessage */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* procedureCriticality */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ricRequestorID */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iEsCriticalityDiagnostics */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_specs_1 = { - sizeof(struct CriticalityDiagnostics), - offsetof(struct CriticalityDiagnostics, _asn_ctx), - asn_MAP_CriticalityDiagnostics_tag2el_1, - 5, /* Count of tags in the map */ - asn_MAP_CriticalityDiagnostics_oms_1, /* Optional members */ - 5, 0, /* Root/Additions */ - 5, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics = { - "CriticalityDiagnostics", - "CriticalityDiagnostics", - &asn_OP_SEQUENCE, - asn_DEF_CriticalityDiagnostics_tags_1, - sizeof(asn_DEF_CriticalityDiagnostics_tags_1) - /sizeof(asn_DEF_CriticalityDiagnostics_tags_1[0]), /* 1 */ - asn_DEF_CriticalityDiagnostics_tags_1, /* Same as above */ - sizeof(asn_DEF_CriticalityDiagnostics_tags_1) - /sizeof(asn_DEF_CriticalityDiagnostics_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_CriticalityDiagnostics_1, - 5, /* Elements count */ - &asn_SPC_CriticalityDiagnostics_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/CriticalityDiagnostics.h b/Bouncer/asn1c_defs/CriticalityDiagnostics.h deleted file mode 100644 index 8c67719..0000000 --- a/Bouncer/asn1c_defs/CriticalityDiagnostics.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _CriticalityDiagnostics_H_ -#define _CriticalityDiagnostics_H_ - - -#include - -/* Including external dependencies */ -#include "ProcedureCode.h" -#include "TriggeringMessage.h" -#include "Criticality.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct RICrequestID; -struct CriticalityDiagnostics_IE_List; - -/* CriticalityDiagnostics */ -typedef struct CriticalityDiagnostics { - ProcedureCode_t *procedureCode; /* OPTIONAL */ - TriggeringMessage_t *triggeringMessage; /* OPTIONAL */ - Criticality_t *procedureCriticality; /* OPTIONAL */ - struct RICrequestID *ricRequestorID; /* OPTIONAL */ - struct CriticalityDiagnostics_IE_List *iEsCriticalityDiagnostics; /* OPTIONAL */ - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CriticalityDiagnostics_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics; - -#ifdef __cplusplus -} -#endif - -#endif /* _CriticalityDiagnostics_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2AP-PDU.c b/Bouncer/asn1c_defs/E2AP-PDU.c deleted file mode 100644 index c14802f..0000000 --- a/Bouncer/asn1c_defs/E2AP-PDU.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2AP-PDU.h" - -#include "InitiatingMessage.h" -#include "SuccessfulOutcome.h" -#include "UnsuccessfulOutcome.h" -static asn_per_constraints_t asn_PER_type_E2AP_PDU_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_E2AP_PDU_1[] = { - { ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.initiatingMessage), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_InitiatingMessage, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "initiatingMessage" - }, - { ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.successfulOutcome), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_SuccessfulOutcome, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "successfulOutcome" - }, - { ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.unsuccessfulOutcome), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_UnsuccessfulOutcome, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "unsuccessfulOutcome" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_E2AP_PDU_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* initiatingMessage */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* successfulOutcome */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* unsuccessfulOutcome */ -}; -static asn_CHOICE_specifics_t asn_SPC_E2AP_PDU_specs_1 = { - sizeof(struct E2AP_PDU), - offsetof(struct E2AP_PDU, _asn_ctx), - offsetof(struct E2AP_PDU, present), - sizeof(((struct E2AP_PDU *)0)->present), - asn_MAP_E2AP_PDU_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, - 3 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_E2AP_PDU = { - "E2AP-PDU", - "E2AP-PDU", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_E2AP_PDU_constr_1, CHOICE_constraint }, - asn_MBR_E2AP_PDU_1, - 3, /* Elements count */ - &asn_SPC_E2AP_PDU_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2AP-PDU.h b/Bouncer/asn1c_defs/E2AP-PDU.h deleted file mode 100644 index 52a19b1..0000000 --- a/Bouncer/asn1c_defs/E2AP-PDU.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2AP_PDU_H_ -#define _E2AP_PDU_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum E2AP_PDU_PR { - E2AP_PDU_PR_NOTHING, /* No components present */ - E2AP_PDU_PR_initiatingMessage, - E2AP_PDU_PR_successfulOutcome, - E2AP_PDU_PR_unsuccessfulOutcome - /* Extensions may appear below */ - -} E2AP_PDU_PR; - -/* Forward declarations */ -struct InitiatingMessage; -struct SuccessfulOutcome; -struct UnsuccessfulOutcome; - -/* E2AP-PDU */ -typedef struct E2AP_PDU { - E2AP_PDU_PR present; - union E2AP_PDU_u { - struct InitiatingMessage *initiatingMessage; - struct SuccessfulOutcome *successfulOutcome; - struct UnsuccessfulOutcome *unsuccessfulOutcome; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2AP_PDU_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2AP_PDU; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2AP_PDU_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.c b/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.c deleted file mode 100644 index c3a678c..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-ActionDefinition-Format1.h" - -#include "RANparameter-Item.h" -static int -memb_ranParameter_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - /* Determine the number of elements */ - size = _A_CSEQUENCE_FROM_VOID(sptr)->count; - - if((size >= 1 && size <= 255)) { - /* Perform validation of the inner elements */ - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_per_constraints_t asn_PER_type_ranParameter_List_constr_2 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_ranParameter_List_constr_2 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_ranParameter_List_2[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANparameter_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ranParameter_List_tags_2[] = { - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_ranParameter_List_specs_2 = { - sizeof(struct E2SM_Bouncer_ActionDefinition_Format1__ranParameter_List), - offsetof(struct E2SM_Bouncer_ActionDefinition_Format1__ranParameter_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_ranParameter_List_2 = { - "ranParameter-List", - "ranParameter-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_ranParameter_List_tags_2, - sizeof(asn_DEF_ranParameter_List_tags_2) - /sizeof(asn_DEF_ranParameter_List_tags_2[0]) - 1, /* 1 */ - asn_DEF_ranParameter_List_tags_2, /* Same as above */ - sizeof(asn_DEF_ranParameter_List_tags_2) - /sizeof(asn_DEF_ranParameter_List_tags_2[0]), /* 2 */ - { 0, &asn_PER_type_ranParameter_List_constr_2, SEQUENCE_OF_constraint }, - asn_MBR_ranParameter_List_2, - 1, /* Single element */ - &asn_SPC_ranParameter_List_specs_2 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ActionDefinition_Format1_1[] = { - { ATF_POINTER, 1, offsetof(struct E2SM_Bouncer_ActionDefinition_Format1, ranParameter_List), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - 0, - &asn_DEF_ranParameter_List_2, - 0, - { 0, &asn_PER_memb_ranParameter_List_constr_2, memb_ranParameter_List_constraint_1 }, - 0, 0, /* No default value */ - "ranParameter-List" - }, -}; -static const int asn_MAP_E2SM_Bouncer_ActionDefinition_Format1_oms_1[] = { 0 }; -static const ber_tlv_tag_t asn_DEF_E2SM_Bouncer_ActionDefinition_Format1_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_ActionDefinition_Format1_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-List */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_ActionDefinition_Format1_specs_1 = { - sizeof(struct E2SM_Bouncer_ActionDefinition_Format1), - offsetof(struct E2SM_Bouncer_ActionDefinition_Format1, _asn_ctx), - asn_MAP_E2SM_Bouncer_ActionDefinition_Format1_tag2el_1, - 1, /* Count of tags in the map */ - asn_MAP_E2SM_Bouncer_ActionDefinition_Format1_oms_1, /* Optional members */ - 1, 0, /* Root/Additions */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ActionDefinition_Format1 = { - "E2SM-Bouncer-ActionDefinition-Format1", - "E2SM-Bouncer-ActionDefinition-Format1", - &asn_OP_SEQUENCE, - asn_DEF_E2SM_Bouncer_ActionDefinition_Format1_tags_1, - sizeof(asn_DEF_E2SM_Bouncer_ActionDefinition_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_ActionDefinition_Format1_tags_1[0]), /* 1 */ - asn_DEF_E2SM_Bouncer_ActionDefinition_Format1_tags_1, /* Same as above */ - sizeof(asn_DEF_E2SM_Bouncer_ActionDefinition_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_ActionDefinition_Format1_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2SM_Bouncer_ActionDefinition_Format1_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_ActionDefinition_Format1_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.h b/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.h deleted file mode 100644 index 368e158..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition-Format1.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_ActionDefinition_Format1_H_ -#define _E2SM_Bouncer_ActionDefinition_Format1_H_ - - -#include - -/* Including external dependencies */ -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct RANparameter_Item; - -/* E2SM-Bouncer-ActionDefinition-Format1 */ -typedef struct E2SM_Bouncer_ActionDefinition_Format1 { - struct E2SM_Bouncer_ActionDefinition_Format1__ranParameter_List { - A_SEQUENCE_OF(struct RANparameter_Item) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } *ranParameter_List; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_ActionDefinition_Format1_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ActionDefinition_Format1; -extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_ActionDefinition_Format1_specs_1; -extern asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ActionDefinition_Format1_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_ActionDefinition_Format1_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.c b/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.c deleted file mode 100644 index 5832af0..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-ActionDefinition.h" - -#include "E2SM-Bouncer-ActionDefinition-Format1.h" -static asn_per_constraints_t asn_PER_type_E2SM_Bouncer_ActionDefinition_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ActionDefinition_1[] = { - { ATF_POINTER, 0, offsetof(struct E2SM_Bouncer_ActionDefinition, choice.actionDefinition_Format1), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_E2SM_Bouncer_ActionDefinition_Format1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "actionDefinition-Format1" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_ActionDefinition_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* actionDefinition-Format1 */ -}; -static asn_CHOICE_specifics_t asn_SPC_E2SM_Bouncer_ActionDefinition_specs_1 = { - sizeof(struct E2SM_Bouncer_ActionDefinition), - offsetof(struct E2SM_Bouncer_ActionDefinition, _asn_ctx), - offsetof(struct E2SM_Bouncer_ActionDefinition, present), - sizeof(((struct E2SM_Bouncer_ActionDefinition *)0)->present), - asn_MAP_E2SM_Bouncer_ActionDefinition_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ActionDefinition = { - "E2SM-Bouncer-ActionDefinition", - "E2SM-Bouncer-ActionDefinition", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_E2SM_Bouncer_ActionDefinition_constr_1, CHOICE_constraint }, - asn_MBR_E2SM_Bouncer_ActionDefinition_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_ActionDefinition_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.h b/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.h deleted file mode 100644 index ad6944b..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ActionDefinition.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_ActionDefinition_H_ -#define _E2SM_Bouncer_ActionDefinition_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum E2SM_Bouncer_ActionDefinition_PR { - E2SM_Bouncer_ActionDefinition_PR_NOTHING, /* No components present */ - E2SM_Bouncer_ActionDefinition_PR_actionDefinition_Format1 - /* Extensions may appear below */ - -} E2SM_Bouncer_ActionDefinition_PR; - -/* Forward declarations */ -struct E2SM_Bouncer_ActionDefinition_Format1; - -/* E2SM-Bouncer-ActionDefinition */ -typedef struct E2SM_Bouncer_ActionDefinition { - E2SM_Bouncer_ActionDefinition_PR present; - union E2SM_Bouncer_ActionDefinition_u { - struct E2SM_Bouncer_ActionDefinition_Format1 *actionDefinition_Format1; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_ActionDefinition_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ActionDefinition; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_ActionDefinition_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.c b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.c deleted file mode 100644 index f514394..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-ControlHeader-Format1.h" - -asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ControlHeader_Format1_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2SM_Bouncer_ControlHeader_Format1, controlHeaderParam), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_B_Header, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "controlHeaderParam" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2SM_Bouncer_ControlHeader_Format1_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_ControlHeader_Format1_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* controlHeaderParam */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_ControlHeader_Format1_specs_1 = { - sizeof(struct E2SM_Bouncer_ControlHeader_Format1), - offsetof(struct E2SM_Bouncer_ControlHeader_Format1, _asn_ctx), - asn_MAP_E2SM_Bouncer_ControlHeader_Format1_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlHeader_Format1 = { - "E2SM-Bouncer-ControlHeader-Format1", - "E2SM-Bouncer-ControlHeader-Format1", - &asn_OP_SEQUENCE, - asn_DEF_E2SM_Bouncer_ControlHeader_Format1_tags_1, - sizeof(asn_DEF_E2SM_Bouncer_ControlHeader_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_ControlHeader_Format1_tags_1[0]), /* 1 */ - asn_DEF_E2SM_Bouncer_ControlHeader_Format1_tags_1, /* Same as above */ - sizeof(asn_DEF_E2SM_Bouncer_ControlHeader_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_ControlHeader_Format1_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2SM_Bouncer_ControlHeader_Format1_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_ControlHeader_Format1_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.h b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.h deleted file mode 100644 index 10b300b..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader-Format1.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_ControlHeader_Format1_H_ -#define _E2SM_Bouncer_ControlHeader_Format1_H_ - - -#include - -/* Including external dependencies */ -#include "B-Header.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2SM-Bouncer-ControlHeader-Format1 */ -typedef struct E2SM_Bouncer_ControlHeader_Format1 { - B_Header_t controlHeaderParam; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_ControlHeader_Format1_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlHeader_Format1; -extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_ControlHeader_Format1_specs_1; -extern asn_TYPE_member_t asn_MBR_E2SM_Bouncer_Header_Format1_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_ControlHeader_Format1_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.c b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.c deleted file mode 100644 index f22dd26..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-ControlHeader.h" - -#include "E2SM-Bouncer-ControlHeader-Format1.h" -static asn_per_constraints_t asn_PER_type_E2SM_Bouncer_ControlHeader_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ControlHeader_1[] = { - { ATF_POINTER, 0, offsetof(struct E2SM_Bouncer_ControlHeader, choice.controlHeader_Format1), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_E2SM_Bouncer_ControlHeader_Format1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "controlHeader-Format1" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_ControlHeader_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* controlHeader-Format1 */ -}; -static asn_CHOICE_specifics_t asn_SPC_E2SM_Bouncer_ControlHeader_specs_1 = { - sizeof(struct E2SM_Bouncer_ControlHeader), - offsetof(struct E2SM_Bouncer_ControlHeader, _asn_ctx), - offsetof(struct E2SM_Bouncer_ControlHeader, present), - sizeof(((struct E2SM_Bouncer_ControlHeader *)0)->present), - asn_MAP_E2SM_Bouncer_ControlHeader_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlHeader = { - "E2SM-Bouncer-ControlHeader", - "E2SM-Bouncer-ControlHeader", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_E2SM_Bouncer_ControlHeader_constr_1, CHOICE_constraint }, - asn_MBR_E2SM_Bouncer_ControlHeader_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_ControlHeader_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.h b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.h deleted file mode 100644 index c9c0003..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlHeader.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_ControlHeader_H_ -#define _E2SM_Bouncer_ControlHeader_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum E2SM_Bouncer_ControlHeader_PR { - E2SM_Bouncer_ControlHeader_PR_NOTHING, /* No components present */ - E2SM_Bouncer_ControlHeader_PR_controlHeader_Format1 - /* Extensions may appear below */ - -} E2SM_Bouncer_ControlHeader_PR; - -/* Forward declarations */ -struct E2SM_Bouncer_ControlHeader_Format1; - -/* E2SM-Bouncer-ControlHeader */ -typedef struct E2SM_Bouncer_ControlHeader { - E2SM_Bouncer_ControlHeader_PR present; - union E2SM_Bouncer_ControlHeader_u { - struct E2SM_Bouncer_ControlHeader_Format1 *controlHeader_Format1; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_ControlHeader_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlHeader; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_ControlHeader_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.c b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.c deleted file mode 100644 index 8a97659..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-ControlMessage-Format1.h" - -asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ControlMessage_Format1_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2SM_Bouncer_ControlMessage_Format1, controlMsgParam), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_B_Message, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "controlMsgParam" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2SM_Bouncer_ControlMessage_Format1_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_ControlMessage_Format1_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* controlMsgParam */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_ControlMessage_Format1_specs_1 = { - sizeof(struct E2SM_Bouncer_ControlMessage_Format1), - offsetof(struct E2SM_Bouncer_ControlMessage_Format1, _asn_ctx), - asn_MAP_E2SM_Bouncer_ControlMessage_Format1_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlMessage_Format1 = { - "E2SM-Bouncer-ControlMessage-Format1", - "E2SM-Bouncer-ControlMessage-Format1", - &asn_OP_SEQUENCE, - asn_DEF_E2SM_Bouncer_ControlMessage_Format1_tags_1, - sizeof(asn_DEF_E2SM_Bouncer_ControlMessage_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_ControlMessage_Format1_tags_1[0]), /* 1 */ - asn_DEF_E2SM_Bouncer_ControlMessage_Format1_tags_1, /* Same as above */ - sizeof(asn_DEF_E2SM_Bouncer_ControlMessage_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_ControlMessage_Format1_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2SM_Bouncer_ControlMessage_Format1_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_ControlMessage_Format1_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.h b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.h deleted file mode 100644 index 148376f..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage-Format1.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_ControlMessage_Format1_H_ -#define _E2SM_Bouncer_ControlMessage_Format1_H_ - - -#include - -/* Including external dependencies */ -#include "B-Message.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2SM-Bouncer-ControlMessage-Format1 */ -typedef struct E2SM_Bouncer_ControlMessage_Format1 { - B_Message_t controlMsgParam; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_ControlMessage_Format1_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlMessage_Format1; -extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_ControlMessage_Format1_specs_1; -extern asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ControlMessage_Format1_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_ControlMessage_Format1_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.c b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.c deleted file mode 100644 index 565d4e6..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-ControlMessage.h" - -#include "E2SM-Bouncer-ControlMessage-Format1.h" -static asn_per_constraints_t asn_PER_type_E2SM_Bouncer_ControlMessage_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_E2SM_Bouncer_ControlMessage_1[] = { - { ATF_POINTER, 0, offsetof(struct E2SM_Bouncer_ControlMessage, choice.controlMessage_Format1), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_E2SM_Bouncer_ControlMessage_Format1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "controlMessage-Format1" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_ControlMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* controlMessage-Format1 */ -}; -static asn_CHOICE_specifics_t asn_SPC_E2SM_Bouncer_ControlMessage_specs_1 = { - sizeof(struct E2SM_Bouncer_ControlMessage), - offsetof(struct E2SM_Bouncer_ControlMessage, _asn_ctx), - offsetof(struct E2SM_Bouncer_ControlMessage, present), - sizeof(((struct E2SM_Bouncer_ControlMessage *)0)->present), - asn_MAP_E2SM_Bouncer_ControlMessage_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlMessage = { - "E2SM-Bouncer-ControlMessage", - "E2SM-Bouncer-ControlMessage", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_E2SM_Bouncer_ControlMessage_constr_1, CHOICE_constraint }, - asn_MBR_E2SM_Bouncer_ControlMessage_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_ControlMessage_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.h b/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.h deleted file mode 100644 index 7dac37d..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-ControlMessage.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_ControlMessage_H_ -#define _E2SM_Bouncer_ControlMessage_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum E2SM_Bouncer_ControlMessage_PR { - E2SM_Bouncer_ControlMessage_PR_NOTHING, /* No components present */ - E2SM_Bouncer_ControlMessage_PR_controlMessage_Format1 - /* Extensions may appear below */ - -} E2SM_Bouncer_ControlMessage_PR; - -/* Forward declarations */ -struct E2SM_Bouncer_ControlMessage_Format1; - -/* E2SM-Bouncer-ControlMessage */ -typedef struct E2SM_Bouncer_ControlMessage { - E2SM_Bouncer_ControlMessage_PR present; - union E2SM_Bouncer_ControlMessage_u { - struct E2SM_Bouncer_ControlMessage_Format1 *controlMessage_Format1; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_ControlMessage_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_ControlMessage; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_ControlMessage_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.c b/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.c deleted file mode 100644 index b1b66a9..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-EventTriggerDefinition-Format1.h" - -asn_TYPE_member_t asn_MBR_E2SM_Bouncer_EventTriggerDefinition_Format1_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2SM_Bouncer_EventTriggerDefinition_Format1, triggerNature), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_B_TriggerNature, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "triggerNature" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_EventTriggerDefinition_Format1_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* triggerNature */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_EventTriggerDefinition_Format1_specs_1 = { - sizeof(struct E2SM_Bouncer_EventTriggerDefinition_Format1), - offsetof(struct E2SM_Bouncer_EventTriggerDefinition_Format1, _asn_ctx), - asn_MAP_E2SM_Bouncer_EventTriggerDefinition_Format1_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1 = { - "E2SM-Bouncer-EventTriggerDefinition-Format1", - "E2SM-Bouncer-EventTriggerDefinition-Format1", - &asn_OP_SEQUENCE, - asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1_tags_1, - sizeof(asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1_tags_1[0]), /* 1 */ - asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1_tags_1, /* Same as above */ - sizeof(asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2SM_Bouncer_EventTriggerDefinition_Format1_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_EventTriggerDefinition_Format1_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.h b/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.h deleted file mode 100644 index 2f0de0c..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition-Format1.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_EventTriggerDefinition_Format1_H_ -#define _E2SM_Bouncer_EventTriggerDefinition_Format1_H_ - - -#include - -/* Including external dependencies */ -#include "B-TriggerNature.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2SM-Bouncer-EventTriggerDefinition-Format1 */ -typedef struct E2SM_Bouncer_EventTriggerDefinition_Format1 { - B_TriggerNature_t triggerNature; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_EventTriggerDefinition_Format1_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1; -extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_EventTriggerDefinition_Format1_specs_1; -extern asn_TYPE_member_t asn_MBR_E2SM_Bouncer_EventTriggerDefinition_Format1_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_EventTriggerDefinition_Format1_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.c b/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.c deleted file mode 100644 index 15c8a6d..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-EventTriggerDefinition.h" - -#include "E2SM-Bouncer-EventTriggerDefinition-Format1.h" -static asn_per_constraints_t asn_PER_type_E2SM_Bouncer_EventTriggerDefinition_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_E2SM_Bouncer_EventTriggerDefinition_1[] = { - { ATF_POINTER, 0, offsetof(struct E2SM_Bouncer_EventTriggerDefinition, choice.eventDefinition_Format1), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_E2SM_Bouncer_EventTriggerDefinition_Format1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "eventDefinition-Format1" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_EventTriggerDefinition_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* eventDefinition-Format1 */ -}; -static asn_CHOICE_specifics_t asn_SPC_E2SM_Bouncer_EventTriggerDefinition_specs_1 = { - sizeof(struct E2SM_Bouncer_EventTriggerDefinition), - offsetof(struct E2SM_Bouncer_EventTriggerDefinition, _asn_ctx), - offsetof(struct E2SM_Bouncer_EventTriggerDefinition, present), - sizeof(((struct E2SM_Bouncer_EventTriggerDefinition *)0)->present), - asn_MAP_E2SM_Bouncer_EventTriggerDefinition_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_EventTriggerDefinition = { - "E2SM-Bouncer-EventTriggerDefinition", - "E2SM-Bouncer-EventTriggerDefinition", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_E2SM_Bouncer_EventTriggerDefinition_constr_1, CHOICE_constraint }, - asn_MBR_E2SM_Bouncer_EventTriggerDefinition_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_EventTriggerDefinition_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.h b/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.h deleted file mode 100644 index ccea3b6..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-EventTriggerDefinition.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_EventTriggerDefinition_H_ -#define _E2SM_Bouncer_EventTriggerDefinition_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum E2SM_Bouncer_EventTriggerDefinition_PR { - E2SM_Bouncer_EventTriggerDefinition_PR_NOTHING, /* No components present */ - E2SM_Bouncer_EventTriggerDefinition_PR_eventDefinition_Format1 - /* Extensions may appear below */ - -} E2SM_Bouncer_EventTriggerDefinition_PR; - -/* Forward declarations */ -struct E2SM_Bouncer_EventTriggerDefinition_Format1; - -/* E2SM-Bouncer-EventTriggerDefinition */ -typedef struct E2SM_Bouncer_EventTriggerDefinition { - E2SM_Bouncer_EventTriggerDefinition_PR present; - union E2SM_Bouncer_EventTriggerDefinition_u { - struct E2SM_Bouncer_EventTriggerDefinition_Format1 *eventDefinition_Format1; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_EventTriggerDefinition_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_EventTriggerDefinition; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_EventTriggerDefinition_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.c b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.c deleted file mode 100644 index 04f216c..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-IndicationHeader-Format1.h" - -asn_TYPE_member_t asn_MBR_E2SM_Bouncer_IndicationHeader_Format1_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2SM_Bouncer_IndicationHeader_Format1, indicationHeaderParam), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_B_Header, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "indicationHeaderParam" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2SM_Bouncer_IndicationHeader_Format1_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_IndicationHeader_Format1_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationHeaderParam */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_IndicationHeader_Format1_specs_1 = { - sizeof(struct E2SM_Bouncer_IndicationHeader_Format1), - offsetof(struct E2SM_Bouncer_IndicationHeader_Format1, _asn_ctx), - asn_MAP_E2SM_Bouncer_IndicationHeader_Format1_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationHeader_Format1 = { - "E2SM-Bouncer-IndicationHeader-Format1", - "E2SM-Bouncer-IndicationHeader-Format1", - &asn_OP_SEQUENCE, - asn_DEF_E2SM_Bouncer_IndicationHeader_Format1_tags_1, - sizeof(asn_DEF_E2SM_Bouncer_IndicationHeader_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_IndicationHeader_Format1_tags_1[0]), /* 1 */ - asn_DEF_E2SM_Bouncer_IndicationHeader_Format1_tags_1, /* Same as above */ - sizeof(asn_DEF_E2SM_Bouncer_IndicationHeader_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_IndicationHeader_Format1_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2SM_Bouncer_IndicationHeader_Format1_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_IndicationHeader_Format1_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.h b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.h deleted file mode 100644 index e94cec3..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader-Format1.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_IndicationHeader_Format1_H_ -#define _E2SM_Bouncer_IndicationHeader_Format1_H_ - - -#include - -/* Including external dependencies */ -#include "B-Header.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2SM-Bouncer-IndicationHeader-Format1 */ -typedef struct E2SM_Bouncer_IndicationHeader_Format1 { - B_Header_t indicationHeaderParam; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_IndicationHeader_Format1_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationHeader_Format1; -extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_IndicationHeader_Format1_specs_1; -extern asn_TYPE_member_t asn_MBR_E2SM_Bouncer_IndicationHeader_Format1_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_IndicationHeader_Format1_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.c b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.c deleted file mode 100644 index 9def4f9..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-IndicationHeader.h" - -#include "E2SM-Bouncer-IndicationHeader-Format1.h" -static asn_per_constraints_t asn_PER_type_E2SM_Bouncer_IndicationHeader_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_E2SM_Bouncer_IndicationHeader_1[] = { - { ATF_POINTER, 0, offsetof(struct E2SM_Bouncer_IndicationHeader, choice.indicationHeader_Format1), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_E2SM_Bouncer_IndicationHeader_Format1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "indicationHeader-Format1" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_IndicationHeader_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationHeader-Format1 */ -}; -static asn_CHOICE_specifics_t asn_SPC_E2SM_Bouncer_IndicationHeader_specs_1 = { - sizeof(struct E2SM_Bouncer_IndicationHeader), - offsetof(struct E2SM_Bouncer_IndicationHeader, _asn_ctx), - offsetof(struct E2SM_Bouncer_IndicationHeader, present), - sizeof(((struct E2SM_Bouncer_IndicationHeader *)0)->present), - asn_MAP_E2SM_Bouncer_IndicationHeader_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationHeader = { - "E2SM-Bouncer-IndicationHeader", - "E2SM-Bouncer-IndicationHeader", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_E2SM_Bouncer_IndicationHeader_constr_1, CHOICE_constraint }, - asn_MBR_E2SM_Bouncer_IndicationHeader_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_IndicationHeader_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.h b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.h deleted file mode 100644 index c362a97..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationHeader.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_IndicationHeader_H_ -#define _E2SM_Bouncer_IndicationHeader_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum E2SM_Bouncer_IndicationHeader_PR { - E2SM_Bouncer_IndicationHeader_PR_NOTHING, /* No components present */ - E2SM_Bouncer_IndicationHeader_PR_indicationHeader_Format1 - /* Extensions may appear below */ - -} E2SM_Bouncer_IndicationHeader_PR; - -/* Forward declarations */ -struct E2SM_Bouncer_IndicationHeader_Format1; - -/* E2SM-Bouncer-IndicationHeader */ -typedef struct E2SM_Bouncer_IndicationHeader { - E2SM_Bouncer_IndicationHeader_PR present; - union E2SM_Bouncer_IndicationHeader_u { - struct E2SM_Bouncer_IndicationHeader_Format1 *indicationHeader_Format1; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_IndicationHeader_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationHeader; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_IndicationHeader_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.c b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.c deleted file mode 100644 index 49c170e..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-IndicationMessage-Format1.h" - -asn_TYPE_member_t asn_MBR_E2SM_Bouncer_IndicationMessage_Format1_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2SM_Bouncer_IndicationMessage_Format1, indicationMsgParam), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_B_Message, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "indicationMsgParam" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2SM_Bouncer_IndicationMessage_Format1_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_IndicationMessage_Format1_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationMsgParam */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_IndicationMessage_Format1_specs_1 = { - sizeof(struct E2SM_Bouncer_IndicationMessage_Format1), - offsetof(struct E2SM_Bouncer_IndicationMessage_Format1, _asn_ctx), - asn_MAP_E2SM_Bouncer_IndicationMessage_Format1_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationMessage_Format1 = { - "E2SM-Bouncer-IndicationMessage-Format1", - "E2SM-Bouncer-IndicationMessage-Format1", - &asn_OP_SEQUENCE, - asn_DEF_E2SM_Bouncer_IndicationMessage_Format1_tags_1, - sizeof(asn_DEF_E2SM_Bouncer_IndicationMessage_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_IndicationMessage_Format1_tags_1[0]), /* 1 */ - asn_DEF_E2SM_Bouncer_IndicationMessage_Format1_tags_1, /* Same as above */ - sizeof(asn_DEF_E2SM_Bouncer_IndicationMessage_Format1_tags_1) - /sizeof(asn_DEF_E2SM_Bouncer_IndicationMessage_Format1_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2SM_Bouncer_IndicationMessage_Format1_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_IndicationMessage_Format1_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.h b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.h deleted file mode 100644 index f350184..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage-Format1.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_IndicationMessage_Format1_H_ -#define _E2SM_Bouncer_IndicationMessage_Format1_H_ - - -#include - -/* Including external dependencies */ -#include "B-Message.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2SM-Bouncer-IndicationMessage-Format1 */ -typedef struct E2SM_Bouncer_IndicationMessage_Format1 { - B_Message_t indicationMsgParam; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_IndicationMessage_Format1_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationMessage_Format1; -extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_Bouncer_IndicationMessage_Format1_specs_1; -extern asn_TYPE_member_t asn_MBR_E2SM_Bouncer_IndicationMessage_Format1_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_IndicationMessage_Format1_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.c b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.c deleted file mode 100644 index e7aff76..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2SM-Bouncer-IndicationMessage.h" - -#include "E2SM-Bouncer-IndicationMessage-Format1.h" -static asn_per_constraints_t asn_PER_type_E2SM_Bouncer_IndicationMessage_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_E2SM_Bouncer_IndicationMessage_1[] = { - { ATF_POINTER, 0, offsetof(struct E2SM_Bouncer_IndicationMessage, choice.indicationMessage_Format1), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_E2SM_Bouncer_IndicationMessage_Format1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "indicationMessage-Format1" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_E2SM_Bouncer_IndicationMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationMessage-Format1 */ -}; -static asn_CHOICE_specifics_t asn_SPC_E2SM_Bouncer_IndicationMessage_specs_1 = { - sizeof(struct E2SM_Bouncer_IndicationMessage), - offsetof(struct E2SM_Bouncer_IndicationMessage, _asn_ctx), - offsetof(struct E2SM_Bouncer_IndicationMessage, present), - sizeof(((struct E2SM_Bouncer_IndicationMessage *)0)->present), - asn_MAP_E2SM_Bouncer_IndicationMessage_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationMessage = { - "E2SM-Bouncer-IndicationMessage", - "E2SM-Bouncer-IndicationMessage", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_E2SM_Bouncer_IndicationMessage_constr_1, CHOICE_constraint }, - asn_MBR_E2SM_Bouncer_IndicationMessage_1, - 1, /* Elements count */ - &asn_SPC_E2SM_Bouncer_IndicationMessage_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.h b/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.h deleted file mode 100644 index c404fd2..0000000 --- a/Bouncer/asn1c_defs/E2SM-Bouncer-IndicationMessage.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2SM_Bouncer_IndicationMessage_H_ -#define _E2SM_Bouncer_IndicationMessage_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum E2SM_Bouncer_IndicationMessage_PR { - E2SM_Bouncer_IndicationMessage_PR_NOTHING, /* No components present */ - E2SM_Bouncer_IndicationMessage_PR_indicationMessage_Format1 - /* Extensions may appear below */ - -} E2SM_Bouncer_IndicationMessage_PR; - -/* Forward declarations */ -struct E2SM_Bouncer_IndicationMessage_Format1; - -/* E2SM-Bouncer-IndicationMessage */ -typedef struct E2SM_Bouncer_IndicationMessage { - E2SM_Bouncer_IndicationMessage_PR present; - union E2SM_Bouncer_IndicationMessage_u { - struct E2SM_Bouncer_IndicationMessage_Format1 *indicationMessage_Format1; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2SM_Bouncer_IndicationMessage_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2SM_Bouncer_IndicationMessage; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2SM_Bouncer_IndicationMessage_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2setupFailure.c b/Bouncer/asn1c_defs/E2setupFailure.c deleted file mode 100644 index 0fc15cd..0000000 --- a/Bouncer/asn1c_defs/E2setupFailure.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2setupFailure.h" - -asn_TYPE_member_t asn_MBR_E2setupFailure_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailure, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P13, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2setupFailure_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2setupFailure_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2setupFailure_specs_1 = { - sizeof(struct E2setupFailure), - offsetof(struct E2setupFailure, _asn_ctx), - asn_MAP_E2setupFailure_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2setupFailure = { - "E2setupFailure", - "E2setupFailure", - &asn_OP_SEQUENCE, - asn_DEF_E2setupFailure_tags_1, - sizeof(asn_DEF_E2setupFailure_tags_1) - /sizeof(asn_DEF_E2setupFailure_tags_1[0]), /* 1 */ - asn_DEF_E2setupFailure_tags_1, /* Same as above */ - sizeof(asn_DEF_E2setupFailure_tags_1) - /sizeof(asn_DEF_E2setupFailure_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2setupFailure_1, - 1, /* Elements count */ - &asn_SPC_E2setupFailure_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2setupFailure.h b/Bouncer/asn1c_defs/E2setupFailure.h deleted file mode 100644 index c0f0a80..0000000 --- a/Bouncer/asn1c_defs/E2setupFailure.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2setupFailure_H_ -#define _E2setupFailure_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2setupFailure */ -typedef struct E2setupFailure { - ProtocolIE_Container_1412P13_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2setupFailure_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2setupFailure; -extern asn_SEQUENCE_specifics_t asn_SPC_E2setupFailure_specs_1; -extern asn_TYPE_member_t asn_MBR_E2setupFailure_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2setupFailure_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2setupRequest.c b/Bouncer/asn1c_defs/E2setupRequest.c deleted file mode 100644 index 0f5a3a3..0000000 --- a/Bouncer/asn1c_defs/E2setupRequest.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2setupRequest.h" - -asn_TYPE_member_t asn_MBR_E2setupRequest_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequest, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P11, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2setupRequest_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2setupRequest_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2setupRequest_specs_1 = { - sizeof(struct E2setupRequest), - offsetof(struct E2setupRequest, _asn_ctx), - asn_MAP_E2setupRequest_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2setupRequest = { - "E2setupRequest", - "E2setupRequest", - &asn_OP_SEQUENCE, - asn_DEF_E2setupRequest_tags_1, - sizeof(asn_DEF_E2setupRequest_tags_1) - /sizeof(asn_DEF_E2setupRequest_tags_1[0]), /* 1 */ - asn_DEF_E2setupRequest_tags_1, /* Same as above */ - sizeof(asn_DEF_E2setupRequest_tags_1) - /sizeof(asn_DEF_E2setupRequest_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2setupRequest_1, - 1, /* Elements count */ - &asn_SPC_E2setupRequest_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2setupRequest.h b/Bouncer/asn1c_defs/E2setupRequest.h deleted file mode 100644 index 60ac19d..0000000 --- a/Bouncer/asn1c_defs/E2setupRequest.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2setupRequest_H_ -#define _E2setupRequest_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2setupRequest */ -typedef struct E2setupRequest { - ProtocolIE_Container_1412P11_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2setupRequest_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2setupRequest; -extern asn_SEQUENCE_specifics_t asn_SPC_E2setupRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_E2setupRequest_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2setupRequest_H_ */ -#include diff --git a/Bouncer/asn1c_defs/E2setupResponse.c b/Bouncer/asn1c_defs/E2setupResponse.c deleted file mode 100644 index 04c0ea6..0000000 --- a/Bouncer/asn1c_defs/E2setupResponse.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "E2setupResponse.h" - -asn_TYPE_member_t asn_MBR_E2setupResponse_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponse, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P12, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2setupResponse_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2setupResponse_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2setupResponse_specs_1 = { - sizeof(struct E2setupResponse), - offsetof(struct E2setupResponse, _asn_ctx), - asn_MAP_E2setupResponse_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2setupResponse = { - "E2setupResponse", - "E2setupResponse", - &asn_OP_SEQUENCE, - asn_DEF_E2setupResponse_tags_1, - sizeof(asn_DEF_E2setupResponse_tags_1) - /sizeof(asn_DEF_E2setupResponse_tags_1[0]), /* 1 */ - asn_DEF_E2setupResponse_tags_1, /* Same as above */ - sizeof(asn_DEF_E2setupResponse_tags_1) - /sizeof(asn_DEF_E2setupResponse_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2setupResponse_1, - 1, /* Elements count */ - &asn_SPC_E2setupResponse_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/E2setupResponse.h b/Bouncer/asn1c_defs/E2setupResponse.h deleted file mode 100644 index 3feb668..0000000 --- a/Bouncer/asn1c_defs/E2setupResponse.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _E2setupResponse_H_ -#define _E2setupResponse_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* E2setupResponse */ -typedef struct E2setupResponse { - ProtocolIE_Container_1412P12_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2setupResponse_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_E2setupResponse; -extern asn_SEQUENCE_specifics_t asn_SPC_E2setupResponse_specs_1; -extern asn_TYPE_member_t asn_MBR_E2setupResponse_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _E2setupResponse_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ENB-ID-Choice.c b/Bouncer/asn1c_defs/ENB-ID-Choice.c deleted file mode 100644 index 014dbeb..0000000 --- a/Bouncer/asn1c_defs/ENB-ID-Choice.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ENB-ID-Choice.h" - -static int -memb_enb_ID_macro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 20)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static int -memb_enb_ID_shortmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 18)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static int -memb_enb_ID_longmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 21)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_per_constraints_t asn_PER_memb_enb_ID_macro_constr_2 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_macro), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_enb_ID_macro_constr_2, memb_enb_ID_macro_constraint_1 }, - 0, 0, /* No default value */ - "enb-ID-macro" - }, - { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_shortmacro), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_enb_ID_shortmacro_constr_3, memb_enb_ID_shortmacro_constraint_1 }, - 0, 0, /* No default value */ - "enb-ID-shortmacro" - }, - { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_longmacro), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_enb_ID_longmacro_constr_4, memb_enb_ID_longmacro_constraint_1 }, - 0, 0, /* No default value */ - "enb-ID-longmacro" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_Choice_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enb-ID-macro */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enb-ID-shortmacro */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* enb-ID-longmacro */ -}; -asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1 = { - sizeof(struct ENB_ID_Choice), - offsetof(struct ENB_ID_Choice, _asn_ctx), - offsetof(struct ENB_ID_Choice, present), - sizeof(((struct ENB_ID_Choice *)0)->present), - asn_MAP_ENB_ID_Choice_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, - 3 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice = { - "ENB-ID-Choice", - "ENB-ID-Choice", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_ENB_ID_Choice_constr_1, CHOICE_constraint }, - asn_MBR_ENB_ID_Choice_1, - 3, /* Elements count */ - &asn_SPC_ENB_ID_Choice_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ENB-ID-Choice.h b/Bouncer/asn1c_defs/ENB-ID-Choice.h deleted file mode 100644 index 0fd9d31..0000000 --- a/Bouncer/asn1c_defs/ENB-ID-Choice.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ENB_ID_Choice_H_ -#define _ENB_ID_Choice_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum ENB_ID_Choice_PR { - ENB_ID_Choice_PR_NOTHING, /* No components present */ - ENB_ID_Choice_PR_enb_ID_macro, - ENB_ID_Choice_PR_enb_ID_shortmacro, - ENB_ID_Choice_PR_enb_ID_longmacro - /* Extensions may appear below */ - -} ENB_ID_Choice_PR; - -/* ENB-ID-Choice */ -typedef struct ENB_ID_Choice { - ENB_ID_Choice_PR present; - union ENB_ID_Choice_u { - BIT_STRING_t enb_ID_macro; - BIT_STRING_t enb_ID_shortmacro; - BIT_STRING_t enb_ID_longmacro; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ENB_ID_Choice_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice; -extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1; -extern asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[3]; -extern asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1; - -#ifdef __cplusplus -} -#endif - -#endif /* _ENB_ID_Choice_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ENB-ID.c b/Bouncer/asn1c_defs/ENB-ID.c deleted file mode 100644 index f1b3faf..0000000 --- a/Bouncer/asn1c_defs/ENB-ID.c +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ENB-ID.h" - -static int -memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 20)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static int -memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 28)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static int -memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 18)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static int -memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 21)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_per_constraints_t asn_PER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ENB_ID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.macro_eNB_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_macro_eNB_ID_constr_2, memb_macro_eNB_ID_constraint_1 }, - 0, 0, /* No default value */ - "macro-eNB-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.home_eNB_ID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_home_eNB_ID_constr_3, memb_home_eNB_ID_constraint_1 }, - 0, 0, /* No default value */ - "home-eNB-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.short_Macro_eNB_ID), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_short_Macro_eNB_ID_constr_5, memb_short_Macro_eNB_ID_constraint_1 }, - 0, 0, /* No default value */ - "short-Macro-eNB-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.long_Macro_eNB_ID), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_long_Macro_eNB_ID_constr_6, memb_long_Macro_eNB_ID_constraint_1 }, - 0, 0, /* No default value */ - "long-Macro-eNB-ID" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macro-eNB-ID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* home-eNB-ID */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-Macro-eNB-ID */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-Macro-eNB-ID */ -}; -asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1 = { - sizeof(struct ENB_ID), - offsetof(struct ENB_ID, _asn_ctx), - offsetof(struct ENB_ID, present), - sizeof(((struct ENB_ID *)0)->present), - asn_MAP_ENB_ID_tag2el_1, - 4, /* Count of tags in the map */ - 0, 0, - 2 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_ENB_ID = { - "ENB-ID", - "ENB-ID", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_ENB_ID_constr_1, CHOICE_constraint }, - asn_MBR_ENB_ID_1, - 4, /* Elements count */ - &asn_SPC_ENB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ENB-ID.h b/Bouncer/asn1c_defs/ENB-ID.h deleted file mode 100644 index 3f7d554..0000000 --- a/Bouncer/asn1c_defs/ENB-ID.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ENB_ID_H_ -#define _ENB_ID_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum ENB_ID_PR { - ENB_ID_PR_NOTHING, /* No components present */ - ENB_ID_PR_macro_eNB_ID, - ENB_ID_PR_home_eNB_ID, - /* Extensions may appear below */ - ENB_ID_PR_short_Macro_eNB_ID, - ENB_ID_PR_long_Macro_eNB_ID -} ENB_ID_PR; - -/* ENB-ID */ -typedef struct ENB_ID { - ENB_ID_PR present; - union ENB_ID_u { - BIT_STRING_t macro_eNB_ID; - BIT_STRING_t home_eNB_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - BIT_STRING_t short_Macro_eNB_ID; - BIT_STRING_t long_Macro_eNB_ID; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ENB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ENB_ID; -extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_ENB_ID_1[4]; -extern asn_per_constraints_t asn_PER_type_ENB_ID_constr_1; - -#ifdef __cplusplus -} -#endif - -#endif /* _ENB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ENGNB-ID.c b/Bouncer/asn1c_defs/ENGNB-ID.c deleted file mode 100644 index 635de20..0000000 --- a/Bouncer/asn1c_defs/ENGNB-ID.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ENGNB-ID.h" - -static int -memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size >= 22 && size <= 32)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_per_constraints_t asn_PER_memb_gNB_ID_constr_2 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_ENGNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct ENGNB_ID, choice.gNB_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_gNB_ID_constr_2, memb_gNB_ID_constraint_1 }, - 0, 0, /* No default value */ - "gNB-ID" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_ENGNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-ID */ -}; -asn_CHOICE_specifics_t asn_SPC_ENGNB_ID_specs_1 = { - sizeof(struct ENGNB_ID), - offsetof(struct ENGNB_ID, _asn_ctx), - offsetof(struct ENGNB_ID, present), - sizeof(((struct ENGNB_ID *)0)->present), - asn_MAP_ENGNB_ID_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_ENGNB_ID = { - "ENGNB-ID", - "ENGNB-ID", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_ENGNB_ID_constr_1, CHOICE_constraint }, - asn_MBR_ENGNB_ID_1, - 1, /* Elements count */ - &asn_SPC_ENGNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ENGNB-ID.h b/Bouncer/asn1c_defs/ENGNB-ID.h deleted file mode 100644 index fae9914..0000000 --- a/Bouncer/asn1c_defs/ENGNB-ID.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ENGNB_ID_H_ -#define _ENGNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum ENGNB_ID_PR { - ENGNB_ID_PR_NOTHING, /* No components present */ - ENGNB_ID_PR_gNB_ID - /* Extensions may appear below */ - -} ENGNB_ID_PR; - -/* ENGNB-ID */ -typedef struct ENGNB_ID { - ENGNB_ID_PR present; - union ENGNB_ID_u { - BIT_STRING_t gNB_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ENGNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ENGNB_ID; -extern asn_CHOICE_specifics_t asn_SPC_ENGNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_ENGNB_ID_1[1]; -extern asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1; - -#ifdef __cplusplus -} -#endif - -#endif /* _ENGNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ErrorIndication.c b/Bouncer/asn1c_defs/ErrorIndication.c deleted file mode 100644 index 5225be3..0000000 --- a/Bouncer/asn1c_defs/ErrorIndication.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ErrorIndication.h" - -asn_TYPE_member_t asn_MBR_ErrorIndication_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P10, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_ErrorIndication_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_specs_1 = { - sizeof(struct ErrorIndication), - offsetof(struct ErrorIndication, _asn_ctx), - asn_MAP_ErrorIndication_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_ErrorIndication = { - "ErrorIndication", - "ErrorIndication", - &asn_OP_SEQUENCE, - asn_DEF_ErrorIndication_tags_1, - sizeof(asn_DEF_ErrorIndication_tags_1) - /sizeof(asn_DEF_ErrorIndication_tags_1[0]), /* 1 */ - asn_DEF_ErrorIndication_tags_1, /* Same as above */ - sizeof(asn_DEF_ErrorIndication_tags_1) - /sizeof(asn_DEF_ErrorIndication_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_ErrorIndication_1, - 1, /* Elements count */ - &asn_SPC_ErrorIndication_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ErrorIndication.h b/Bouncer/asn1c_defs/ErrorIndication.h deleted file mode 100644 index a3db103..0000000 --- a/Bouncer/asn1c_defs/ErrorIndication.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ErrorIndication_H_ -#define _ErrorIndication_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* ErrorIndication */ -typedef struct ErrorIndication { - ProtocolIE_Container_1412P10_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ErrorIndication_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ErrorIndication; -extern asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_specs_1; -extern asn_TYPE_member_t asn_MBR_ErrorIndication_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _ErrorIndication_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GNB-CU-UP-ID.c b/Bouncer/asn1c_defs/GNB-CU-UP-ID.c deleted file mode 100644 index 7fccd5d..0000000 --- a/Bouncer/asn1c_defs/GNB-CU-UP-ID.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GNB-CU-UP-ID.h" - -int -GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const INTEGER_t *st = (const INTEGER_t *)sptr; - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(asn_INTEGER2long(st, &value)) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value too large (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if((value >= 0 && value <= 68719476735)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using INTEGER, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID = { - "GNB-CU-UP-ID", - "GNB-CU-UP-ID", - &asn_OP_INTEGER, - asn_DEF_GNB_CU_UP_ID_tags_1, - sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) - /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ - asn_DEF_GNB_CU_UP_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) - /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_GNB_CU_UP_ID_constr_1, GNB_CU_UP_ID_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/GNB-CU-UP-ID.h b/Bouncer/asn1c_defs/GNB-CU-UP-ID.h deleted file mode 100644 index 231a64e..0000000 --- a/Bouncer/asn1c_defs/GNB-CU-UP-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GNB_CU_UP_ID_H_ -#define _GNB_CU_UP_ID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GNB-CU-UP-ID */ -typedef INTEGER_t GNB_CU_UP_ID_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID; -asn_struct_free_f GNB_CU_UP_ID_free; -asn_struct_print_f GNB_CU_UP_ID_print; -asn_constr_check_f GNB_CU_UP_ID_constraint; -ber_type_decoder_f GNB_CU_UP_ID_decode_ber; -der_type_encoder_f GNB_CU_UP_ID_encode_der; -xer_type_decoder_f GNB_CU_UP_ID_decode_xer; -xer_type_encoder_f GNB_CU_UP_ID_encode_xer; -per_type_decoder_f GNB_CU_UP_ID_decode_uper; -per_type_encoder_f GNB_CU_UP_ID_encode_uper; -per_type_decoder_f GNB_CU_UP_ID_decode_aper; -per_type_encoder_f GNB_CU_UP_ID_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _GNB_CU_UP_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GNB-DU-ID.c b/Bouncer/asn1c_defs/GNB-DU-ID.c deleted file mode 100644 index 76534e9..0000000 --- a/Bouncer/asn1c_defs/GNB-DU-ID.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GNB-DU-ID.h" - -int -GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const INTEGER_t *st = (const INTEGER_t *)sptr; - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(asn_INTEGER2long(st, &value)) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value too large (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if((value >= 0 && value <= 68719476735)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using INTEGER, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_GNB_DU_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID = { - "GNB-DU-ID", - "GNB-DU-ID", - &asn_OP_INTEGER, - asn_DEF_GNB_DU_ID_tags_1, - sizeof(asn_DEF_GNB_DU_ID_tags_1) - /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ - asn_DEF_GNB_DU_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GNB_DU_ID_tags_1) - /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_GNB_DU_ID_constr_1, GNB_DU_ID_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/GNB-DU-ID.h b/Bouncer/asn1c_defs/GNB-DU-ID.h deleted file mode 100644 index 29b510c..0000000 --- a/Bouncer/asn1c_defs/GNB-DU-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GNB_DU_ID_H_ -#define _GNB_DU_ID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GNB-DU-ID */ -typedef INTEGER_t GNB_DU_ID_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID; -asn_struct_free_f GNB_DU_ID_free; -asn_struct_print_f GNB_DU_ID_print; -asn_constr_check_f GNB_DU_ID_constraint; -ber_type_decoder_f GNB_DU_ID_decode_ber; -der_type_encoder_f GNB_DU_ID_encode_der; -xer_type_decoder_f GNB_DU_ID_decode_xer; -xer_type_encoder_f GNB_DU_ID_encode_xer; -per_type_decoder_f GNB_DU_ID_decode_uper; -per_type_encoder_f GNB_DU_ID_encode_uper; -per_type_decoder_f GNB_DU_ID_decode_aper; -per_type_encoder_f GNB_DU_ID_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _GNB_DU_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GNB-ID-Choice.c b/Bouncer/asn1c_defs/GNB-ID-Choice.c deleted file mode 100644 index 538454e..0000000 --- a/Bouncer/asn1c_defs/GNB-ID-Choice.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GNB-ID-Choice.h" - -static int -memb_gnb_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size >= 22 && size <= 32)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_per_constraints_t asn_PER_memb_gnb_ID_constr_2 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_GNB_ID_Choice_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GNB_ID_Choice, choice.gnb_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_gnb_ID_constr_2, memb_gnb_ID_constraint_1 }, - 0, 0, /* No default value */ - "gnb-ID" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_GNB_ID_Choice_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gnb-ID */ -}; -asn_CHOICE_specifics_t asn_SPC_GNB_ID_Choice_specs_1 = { - sizeof(struct GNB_ID_Choice), - offsetof(struct GNB_ID_Choice, _asn_ctx), - offsetof(struct GNB_ID_Choice, present), - sizeof(((struct GNB_ID_Choice *)0)->present), - asn_MAP_GNB_ID_Choice_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, - 1 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice = { - "GNB-ID-Choice", - "GNB-ID-Choice", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_GNB_ID_Choice_constr_1, CHOICE_constraint }, - asn_MBR_GNB_ID_Choice_1, - 1, /* Elements count */ - &asn_SPC_GNB_ID_Choice_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GNB-ID-Choice.h b/Bouncer/asn1c_defs/GNB-ID-Choice.h deleted file mode 100644 index c51b572..0000000 --- a/Bouncer/asn1c_defs/GNB-ID-Choice.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GNB_ID_Choice_H_ -#define _GNB_ID_Choice_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum GNB_ID_Choice_PR { - GNB_ID_Choice_PR_NOTHING, /* No components present */ - GNB_ID_Choice_PR_gnb_ID - /* Extensions may appear below */ - -} GNB_ID_Choice_PR; - -/* GNB-ID-Choice */ -typedef struct GNB_ID_Choice { - GNB_ID_Choice_PR present; - union GNB_ID_Choice_u { - BIT_STRING_t gnb_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GNB_ID_Choice_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice; -extern asn_CHOICE_specifics_t asn_SPC_GNB_ID_Choice_specs_1; -extern asn_TYPE_member_t asn_MBR_GNB_ID_Choice_1[1]; -extern asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1; - -#ifdef __cplusplus -} -#endif - -#endif /* _GNB_ID_Choice_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalE2node-ID.c b/Bouncer/asn1c_defs/GlobalE2node-ID.c deleted file mode 100644 index a0c6820..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-ID.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalE2node-ID.h" - -#include "GlobalE2node-gNB-ID.h" -#include "GlobalE2node-en-gNB-ID.h" -#include "GlobalE2node-ng-eNB-ID.h" -#include "GlobalE2node-eNB-ID.h" -static asn_per_constraints_t asn_PER_type_GlobalE2node_ID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_GlobalE2node_ID_1[] = { - { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.gNB), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalE2node_gNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "gNB" - }, - { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.en_gNB), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalE2node_en_gNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "en-gNB" - }, - { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.ng_eNB), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalE2node_ng_eNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ng-eNB" - }, - { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.eNB), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalE2node_eNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "eNB" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* en-gNB */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ng-eNB */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eNB */ -}; -static asn_CHOICE_specifics_t asn_SPC_GlobalE2node_ID_specs_1 = { - sizeof(struct GlobalE2node_ID), - offsetof(struct GlobalE2node_ID, _asn_ctx), - offsetof(struct GlobalE2node_ID, present), - sizeof(((struct GlobalE2node_ID *)0)->present), - asn_MAP_GlobalE2node_ID_tag2el_1, - 4, /* Count of tags in the map */ - 0, 0, - 4 /* Extensions start */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ID = { - "GlobalE2node-ID", - "GlobalE2node-ID", - &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, &asn_PER_type_GlobalE2node_ID_constr_1, CHOICE_constraint }, - asn_MBR_GlobalE2node_ID_1, - 4, /* Elements count */ - &asn_SPC_GlobalE2node_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalE2node-ID.h b/Bouncer/asn1c_defs/GlobalE2node-ID.h deleted file mode 100644 index 7868eb7..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-ID.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalE2node_ID_H_ -#define _GlobalE2node_ID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum GlobalE2node_ID_PR { - GlobalE2node_ID_PR_NOTHING, /* No components present */ - GlobalE2node_ID_PR_gNB, - GlobalE2node_ID_PR_en_gNB, - GlobalE2node_ID_PR_ng_eNB, - GlobalE2node_ID_PR_eNB - /* Extensions may appear below */ - -} GlobalE2node_ID_PR; - -/* Forward declarations */ -struct GlobalE2node_gNB_ID; -struct GlobalE2node_en_gNB_ID; -struct GlobalE2node_ng_eNB_ID; -struct GlobalE2node_eNB_ID; - -/* GlobalE2node-ID */ -typedef struct GlobalE2node_ID { - GlobalE2node_ID_PR present; - union GlobalE2node_ID_u { - struct GlobalE2node_gNB_ID *gNB; - struct GlobalE2node_en_gNB_ID *en_gNB; - struct GlobalE2node_ng_eNB_ID *ng_eNB; - struct GlobalE2node_eNB_ID *eNB; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalE2node_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ID; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalE2node_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalE2node-eNB-ID.c b/Bouncer/asn1c_defs/GlobalE2node-eNB-ID.c deleted file mode 100644 index 14513f5..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-eNB-ID.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalE2node-eNB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_eNB_ID, global_eNB_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalENB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "global-eNB-ID" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalE2node_eNB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_eNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-eNB-ID */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_eNB_ID_specs_1 = { - sizeof(struct GlobalE2node_eNB_ID), - offsetof(struct GlobalE2node_eNB_ID, _asn_ctx), - asn_MAP_GlobalE2node_eNB_ID_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalE2node_eNB_ID = { - "GlobalE2node-eNB-ID", - "GlobalE2node-eNB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalE2node_eNB_ID_tags_1, - sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalE2node_eNB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalE2node_eNB_ID_1, - 1, /* Elements count */ - &asn_SPC_GlobalE2node_eNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalE2node-eNB-ID.h b/Bouncer/asn1c_defs/GlobalE2node-eNB-ID.h deleted file mode 100644 index 779350e..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-eNB-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalE2node_eNB_ID_H_ -#define _GlobalE2node_eNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "GlobalENB-ID.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalE2node-eNB-ID */ -typedef struct GlobalE2node_eNB_ID { - GlobalENB_ID_t global_eNB_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalE2node_eNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_eNB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_eNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalE2node_eNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.c b/Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.c deleted file mode 100644 index c0b3768..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalE2node-en-gNB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalE2node_en_gNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_en_gNB_ID, global_gNB_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalenGNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "global-gNB-ID" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalE2node_en_gNB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_en_gNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-gNB-ID */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_en_gNB_ID_specs_1 = { - sizeof(struct GlobalE2node_en_gNB_ID), - offsetof(struct GlobalE2node_en_gNB_ID, _asn_ctx), - asn_MAP_GlobalE2node_en_gNB_ID_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID = { - "GlobalE2node-en-gNB-ID", - "GlobalE2node-en-gNB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalE2node_en_gNB_ID_tags_1, - sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalE2node_en_gNB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalE2node_en_gNB_ID_1, - 1, /* Elements count */ - &asn_SPC_GlobalE2node_en_gNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.h b/Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.h deleted file mode 100644 index 19e5500..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-en-gNB-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalE2node_en_gNB_ID_H_ -#define _GlobalE2node_en_gNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "GlobalenGNB-ID.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalE2node-en-gNB-ID */ -typedef struct GlobalE2node_en_gNB_ID { - GlobalenGNB_ID_t global_gNB_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalE2node_en_gNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_en_gNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalE2node_en_gNB_ID_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalE2node_en_gNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalE2node-gNB-ID.c b/Bouncer/asn1c_defs/GlobalE2node-gNB-ID.c deleted file mode 100644 index 518e0f3..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-gNB-ID.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalE2node-gNB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalE2node_gNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_gNB_ID, global_gNB_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalgNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "global-gNB-ID" - }, - { ATF_POINTER, 2, offsetof(struct GlobalE2node_gNB_ID, gNB_CU_UP_ID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GNB_CU_UP_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "gNB-CU-UP-ID" - }, - { ATF_POINTER, 1, offsetof(struct GlobalE2node_gNB_ID, gNB_DU_ID), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GNB_DU_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "gNB-DU-ID" - }, -}; -static const int asn_MAP_GlobalE2node_gNB_ID_oms_1[] = { 1, 2 }; -static const ber_tlv_tag_t asn_DEF_GlobalE2node_gNB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_gNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-gNB-ID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-CU-UP-ID */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gNB-DU-ID */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_gNB_ID_specs_1 = { - sizeof(struct GlobalE2node_gNB_ID), - offsetof(struct GlobalE2node_gNB_ID, _asn_ctx), - asn_MAP_GlobalE2node_gNB_ID_tag2el_1, - 3, /* Count of tags in the map */ - asn_MAP_GlobalE2node_gNB_ID_oms_1, /* Optional members */ - 2, 0, /* Root/Additions */ - 3, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID = { - "GlobalE2node-gNB-ID", - "GlobalE2node-gNB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalE2node_gNB_ID_tags_1, - sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalE2node_gNB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalE2node_gNB_ID_1, - 3, /* Elements count */ - &asn_SPC_GlobalE2node_gNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalE2node-gNB-ID.h b/Bouncer/asn1c_defs/GlobalE2node-gNB-ID.h deleted file mode 100644 index f31f72b..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-gNB-ID.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalE2node_gNB_ID_H_ -#define _GlobalE2node_gNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "GlobalgNB-ID.h" -#include "GNB-CU-UP-ID.h" -#include "GNB-DU-ID.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalE2node-gNB-ID */ -typedef struct GlobalE2node_gNB_ID { - GlobalgNB_ID_t global_gNB_ID; - GNB_CU_UP_ID_t *gNB_CU_UP_ID; /* OPTIONAL */ - GNB_DU_ID_t *gNB_DU_ID; /* OPTIONAL */ - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalE2node_gNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_gNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalE2node_gNB_ID_1[3]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalE2node_gNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.c b/Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.c deleted file mode 100644 index 58b345f..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalE2node-ng-eNB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalE2node_ng_eNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_ng_eNB_ID, global_ng_eNB_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalngeNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "global-ng-eNB-ID" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_ng_eNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-ng-eNB-ID */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_ng_eNB_ID_specs_1 = { - sizeof(struct GlobalE2node_ng_eNB_ID), - offsetof(struct GlobalE2node_ng_eNB_ID, _asn_ctx), - asn_MAP_GlobalE2node_ng_eNB_ID_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID = { - "GlobalE2node-ng-eNB-ID", - "GlobalE2node-ng-eNB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalE2node_ng_eNB_ID_tags_1, - sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalE2node_ng_eNB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1) - /sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalE2node_ng_eNB_ID_1, - 1, /* Elements count */ - &asn_SPC_GlobalE2node_ng_eNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.h b/Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.h deleted file mode 100644 index bac3c1a..0000000 --- a/Bouncer/asn1c_defs/GlobalE2node-ng-eNB-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalE2node_ng_eNB_ID_H_ -#define _GlobalE2node_ng_eNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "GlobalngeNB-ID.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalE2node-ng-eNB-ID */ -typedef struct GlobalE2node_ng_eNB_ID { - GlobalngeNB_ID_t global_ng_eNB_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalE2node_ng_eNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_ng_eNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalE2node_ng_eNB_ID_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalE2node_ng_eNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalENB-ID.c b/Bouncer/asn1c_defs/GlobalENB-ID.c deleted file mode 100644 index 781c474..0000000 --- a/Bouncer/asn1c_defs/GlobalENB-ID.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalENB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, pLMN_Identity), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_PLMN_Identity, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "pLMN-Identity" - }, - { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, eNB_ID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_ENB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "eNB-ID" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalENB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalENB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eNB-ID */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1 = { - sizeof(struct GlobalENB_ID), - offsetof(struct GlobalENB_ID, _asn_ctx), - asn_MAP_GlobalENB_ID_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID = { - "GlobalENB-ID", - "GlobalENB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalENB_ID_tags_1, - sizeof(asn_DEF_GlobalENB_ID_tags_1) - /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalENB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalENB_ID_tags_1) - /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalENB_ID_1, - 2, /* Elements count */ - &asn_SPC_GlobalENB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalENB-ID.h b/Bouncer/asn1c_defs/GlobalENB-ID.h deleted file mode 100644 index bd2c018..0000000 --- a/Bouncer/asn1c_defs/GlobalENB-ID.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalENB_ID_H_ -#define _GlobalENB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "PLMN-Identity.h" -#include "ENB-ID.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalENB-ID */ -typedef struct GlobalENB_ID { - PLMN_Identity_t pLMN_Identity; - ENB_ID_t eNB_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalENB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[2]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalENB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalRIC-ID.c b/Bouncer/asn1c_defs/GlobalRIC-ID.c deleted file mode 100644 index 327ab7a..0000000 --- a/Bouncer/asn1c_defs/GlobalRIC-ID.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalRIC-ID.h" - -static int -memb_ric_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - if(st->size > 0) { - /* Size in bits */ - size = 8 * st->size - (st->bits_unused & 0x07); - } else { - size = 0; - } - - if((size == 20)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_per_constraints_t asn_PER_memb_ric_ID_constr_3 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_GlobalRIC_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalRIC_ID, pLMN_Identity), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_PLMN_Identity, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "pLMN-Identity" - }, - { ATF_NOFLAGS, 0, offsetof(struct GlobalRIC_ID, ric_ID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_BIT_STRING, - 0, - { 0, &asn_PER_memb_ric_ID_constr_3, memb_ric_ID_constraint_1 }, - 0, 0, /* No default value */ - "ric-ID" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalRIC_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalRIC_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-ID */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_GlobalRIC_ID_specs_1 = { - sizeof(struct GlobalRIC_ID), - offsetof(struct GlobalRIC_ID, _asn_ctx), - asn_MAP_GlobalRIC_ID_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalRIC_ID = { - "GlobalRIC-ID", - "GlobalRIC-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalRIC_ID_tags_1, - sizeof(asn_DEF_GlobalRIC_ID_tags_1) - /sizeof(asn_DEF_GlobalRIC_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalRIC_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalRIC_ID_tags_1) - /sizeof(asn_DEF_GlobalRIC_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalRIC_ID_1, - 2, /* Elements count */ - &asn_SPC_GlobalRIC_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalRIC-ID.h b/Bouncer/asn1c_defs/GlobalRIC-ID.h deleted file mode 100644 index 2e53f41..0000000 --- a/Bouncer/asn1c_defs/GlobalRIC-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalRIC_ID_H_ -#define _GlobalRIC_ID_H_ - - -#include - -/* Including external dependencies */ -#include "PLMN-Identity.h" -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalRIC-ID */ -typedef struct GlobalRIC_ID { - PLMN_Identity_t pLMN_Identity; - BIT_STRING_t ric_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalRIC_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalRIC_ID; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalRIC_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalenGNB-ID.c b/Bouncer/asn1c_defs/GlobalenGNB-ID.c deleted file mode 100644 index f97c722..0000000 --- a/Bouncer/asn1c_defs/GlobalenGNB-ID.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalenGNB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, pLMN_Identity), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_PLMN_Identity, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "pLMN-Identity" - }, - { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, gNB_ID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_ENGNB_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "gNB-ID" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalenGNB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalenGNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-ID */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1 = { - sizeof(struct GlobalenGNB_ID), - offsetof(struct GlobalenGNB_ID, _asn_ctx), - asn_MAP_GlobalenGNB_ID_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID = { - "GlobalenGNB-ID", - "GlobalenGNB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalenGNB_ID_tags_1, - sizeof(asn_DEF_GlobalenGNB_ID_tags_1) - /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalenGNB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalenGNB_ID_tags_1) - /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalenGNB_ID_1, - 2, /* Elements count */ - &asn_SPC_GlobalenGNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalenGNB-ID.h b/Bouncer/asn1c_defs/GlobalenGNB-ID.h deleted file mode 100644 index e6e8ae8..0000000 --- a/Bouncer/asn1c_defs/GlobalenGNB-ID.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalenGNB_ID_H_ -#define _GlobalenGNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "PLMN-Identity.h" -#include "ENGNB-ID.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalenGNB-ID */ -typedef struct GlobalenGNB_ID { - PLMN_Identity_t pLMN_Identity; - ENGNB_ID_t gNB_ID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalenGNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[2]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalenGNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalgNB-ID.c b/Bouncer/asn1c_defs/GlobalgNB-ID.c deleted file mode 100644 index 318370f..0000000 --- a/Bouncer/asn1c_defs/GlobalgNB-ID.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalgNB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalgNB_ID, plmn_id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_PLMN_Identity, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "plmn-id" - }, - { ATF_NOFLAGS, 0, offsetof(struct GlobalgNB_ID, gnb_id), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_GNB_ID_Choice, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "gnb-id" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalgNB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalgNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gnb-id */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalgNB_ID_specs_1 = { - sizeof(struct GlobalgNB_ID), - offsetof(struct GlobalgNB_ID, _asn_ctx), - asn_MAP_GlobalgNB_ID_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalgNB_ID = { - "GlobalgNB-ID", - "GlobalgNB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalgNB_ID_tags_1, - sizeof(asn_DEF_GlobalgNB_ID_tags_1) - /sizeof(asn_DEF_GlobalgNB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalgNB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalgNB_ID_tags_1) - /sizeof(asn_DEF_GlobalgNB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalgNB_ID_1, - 2, /* Elements count */ - &asn_SPC_GlobalgNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalgNB-ID.h b/Bouncer/asn1c_defs/GlobalgNB-ID.h deleted file mode 100644 index 52efce0..0000000 --- a/Bouncer/asn1c_defs/GlobalgNB-ID.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalgNB_ID_H_ -#define _GlobalgNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "PLMN-Identity.h" -#include "GNB-ID-Choice.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalgNB-ID */ -typedef struct GlobalgNB_ID { - PLMN_Identity_t plmn_id; - GNB_ID_Choice_t gnb_id; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalgNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalgNB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalgNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[2]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalgNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/GlobalngeNB-ID.c b/Bouncer/asn1c_defs/GlobalngeNB-ID.c deleted file mode 100644 index 650ae98..0000000 --- a/Bouncer/asn1c_defs/GlobalngeNB-ID.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "GlobalngeNB-ID.h" - -asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct GlobalngeNB_ID, plmn_id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_PLMN_Identity, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "plmn-id" - }, - { ATF_NOFLAGS, 0, offsetof(struct GlobalngeNB_ID, enb_id), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_ENB_ID_Choice, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "enb-id" - }, -}; -static const ber_tlv_tag_t asn_DEF_GlobalngeNB_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_GlobalngeNB_ID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enb-id */ -}; -asn_SEQUENCE_specifics_t asn_SPC_GlobalngeNB_ID_specs_1 = { - sizeof(struct GlobalngeNB_ID), - offsetof(struct GlobalngeNB_ID, _asn_ctx), - asn_MAP_GlobalngeNB_ID_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_GlobalngeNB_ID = { - "GlobalngeNB-ID", - "GlobalngeNB-ID", - &asn_OP_SEQUENCE, - asn_DEF_GlobalngeNB_ID_tags_1, - sizeof(asn_DEF_GlobalngeNB_ID_tags_1) - /sizeof(asn_DEF_GlobalngeNB_ID_tags_1[0]), /* 1 */ - asn_DEF_GlobalngeNB_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_GlobalngeNB_ID_tags_1) - /sizeof(asn_DEF_GlobalngeNB_ID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_GlobalngeNB_ID_1, - 2, /* Elements count */ - &asn_SPC_GlobalngeNB_ID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/GlobalngeNB-ID.h b/Bouncer/asn1c_defs/GlobalngeNB-ID.h deleted file mode 100644 index 177a467..0000000 --- a/Bouncer/asn1c_defs/GlobalngeNB-ID.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _GlobalngeNB_ID_H_ -#define _GlobalngeNB_ID_H_ - - -#include - -/* Including external dependencies */ -#include "PLMN-Identity.h" -#include "ENB-ID-Choice.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* GlobalngeNB-ID */ -typedef struct GlobalngeNB_ID { - PLMN_Identity_t plmn_id; - ENB_ID_Choice_t enb_id; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GlobalngeNB_ID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GlobalngeNB_ID; -extern asn_SEQUENCE_specifics_t asn_SPC_GlobalngeNB_ID_specs_1; -extern asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[2]; - -#ifdef __cplusplus -} -#endif - -#endif /* _GlobalngeNB_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/InitiatingMessage.c b/Bouncer/asn1c_defs/InitiatingMessage.c deleted file mode 100644 index 9c34727..0000000 --- a/Bouncer/asn1c_defs/InitiatingMessage.c +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "InitiatingMessage.h" - -static const long asn_VAL_1_id_RICsubscription = 8; -static const long asn_VAL_1_reject = 0; -static const long asn_VAL_2_id_RICsubscriptionDelete = 9; -static const long asn_VAL_2_reject = 0; -static const long asn_VAL_3_id_RICserviceUpdate = 7; -static const long asn_VAL_3_reject = 0; -static const long asn_VAL_4_id_RICcontrol = 4; -static const long asn_VAL_4_reject = 0; -static const long asn_VAL_5_id_E2setup = 1; -static const long asn_VAL_5_reject = 0; -static const long asn_VAL_6_id_Reset = 3; -static const long asn_VAL_6_reject = 0; -static const long asn_VAL_7_id_RICindication = 5; -static const long asn_VAL_7_ignore = 1; -static const long asn_VAL_8_id_RICserviceQuery = 6; -static const long asn_VAL_8_ignore = 1; -static const long asn_VAL_9_id_ErrorIndication = 2; -static const long asn_VAL_9_ignore = 1; -static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { - { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore }, - { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore } -}; -static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { - { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } -}; -static int -memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 255)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_InitiatingMessage_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; - size_t constraining_column = 3; /* &procedureCode */ - size_t for_column = 4; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_InitiatingMessage_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; - size_t constraining_column = 3; /* &procedureCode */ - size_t for_column = 0; /* &InitiatingMessage */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = { - { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_value_4[] = { - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionRequest), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionRequest, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICsubscriptionRequest" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionDeleteRequest), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionDeleteRequest, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICsubscriptionDeleteRequest" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceUpdate), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceUpdate, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICserviceUpdate" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICcontrolRequest), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICcontrolRequest, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolRequest" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2setupRequest), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_E2setupRequest, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "E2setupRequest" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ResetRequest), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ResetRequest, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ResetRequest" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICindication), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICindication, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICindication" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceQuery), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceQuery, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICserviceQuery" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ErrorIndication), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ErrorIndication, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ErrorIndication" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 8 }, /* RICsubscriptionRequest */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 7 }, /* RICsubscriptionDeleteRequest */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 6 }, /* RICserviceUpdate */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 5 }, /* RICcontrolRequest */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 4 }, /* E2setupRequest */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 3 }, /* ResetRequest */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 2 }, /* RICindication */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 1 }, /* RICserviceQuery */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 0 } /* ErrorIndication */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { - sizeof(struct InitiatingMessage__value), - offsetof(struct InitiatingMessage__value, _asn_ctx), - offsetof(struct InitiatingMessage__value, present), - sizeof(((struct InitiatingMessage__value *)0)->present), - asn_MAP_value_tag2el_4, - 9, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_4 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_4, - 9, /* Elements count */ - &asn_SPC_value_specs_4 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, procedureCode), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProcedureCode, - 0, - { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 }, - 0, 0, /* No default value */ - "procedureCode" - }, - { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_InitiatingMessage_criticality_type, - { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_4, - select_InitiatingMessage_value_type, - { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_InitiatingMessage_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_InitiatingMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1 = { - sizeof(struct InitiatingMessage), - offsetof(struct InitiatingMessage, _asn_ctx), - asn_MAP_InitiatingMessage_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_InitiatingMessage = { - "InitiatingMessage", - "InitiatingMessage", - &asn_OP_SEQUENCE, - asn_DEF_InitiatingMessage_tags_1, - sizeof(asn_DEF_InitiatingMessage_tags_1) - /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */ - asn_DEF_InitiatingMessage_tags_1, /* Same as above */ - sizeof(asn_DEF_InitiatingMessage_tags_1) - /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_InitiatingMessage_1, - 3, /* Elements count */ - &asn_SPC_InitiatingMessage_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/InitiatingMessage.h b/Bouncer/asn1c_defs/InitiatingMessage.h deleted file mode 100644 index 1072067..0000000 --- a/Bouncer/asn1c_defs/InitiatingMessage.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _InitiatingMessage_H_ -#define _InitiatingMessage_H_ - - -#include - -/* Including external dependencies */ -#include "ProcedureCode.h" -#include "Criticality.h" -#include -#include -#include "RICsubscriptionRequest.h" -#include "RICsubscriptionResponse.h" -#include "RICsubscriptionFailure.h" -#include "RICsubscriptionDeleteRequest.h" -#include "RICsubscriptionDeleteResponse.h" -#include "RICsubscriptionDeleteFailure.h" -#include "RICserviceUpdate.h" -#include "RICserviceUpdateAcknowledge.h" -#include "RICserviceUpdateFailure.h" -#include "RICcontrolRequest.h" -#include "RICcontrolAcknowledge.h" -#include "RICcontrolFailure.h" -#include "E2setupRequest.h" -#include "E2setupResponse.h" -#include "E2setupFailure.h" -#include "ResetRequest.h" -#include "ResetResponse.h" -#include "RICindication.h" -#include "RICserviceQuery.h" -#include "ErrorIndication.h" -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum InitiatingMessage__value_PR { - InitiatingMessage__value_PR_NOTHING, /* No components present */ - InitiatingMessage__value_PR_RICsubscriptionRequest, - InitiatingMessage__value_PR_RICsubscriptionDeleteRequest, - InitiatingMessage__value_PR_RICserviceUpdate, - InitiatingMessage__value_PR_RICcontrolRequest, - InitiatingMessage__value_PR_E2setupRequest, - InitiatingMessage__value_PR_ResetRequest, - InitiatingMessage__value_PR_RICindication, - InitiatingMessage__value_PR_RICserviceQuery, - InitiatingMessage__value_PR_ErrorIndication -} InitiatingMessage__value_PR; - -/* InitiatingMessage */ -typedef struct InitiatingMessage { - ProcedureCode_t procedureCode; - Criticality_t criticality; - struct InitiatingMessage__value { - InitiatingMessage__value_PR present; - union InitiatingMessage__value_u { - RICsubscriptionRequest_t RICsubscriptionRequest; - RICsubscriptionDeleteRequest_t RICsubscriptionDeleteRequest; - RICserviceUpdate_t RICserviceUpdate; - RICcontrolRequest_t RICcontrolRequest; - E2setupRequest_t E2setupRequest; - ResetRequest_t ResetRequest; - RICindication_t RICindication; - RICserviceQuery_t RICserviceQuery; - ErrorIndication_t ErrorIndication; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} InitiatingMessage_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_InitiatingMessage; -extern asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1; -extern asn_TYPE_member_t asn_MBR_InitiatingMessage_1[3]; - -#ifdef __cplusplus -} -#endif - -#endif /* _InitiatingMessage_H_ */ -#include diff --git a/Bouncer/asn1c_defs/NativeEnumerated.c b/Bouncer/asn1c_defs/NativeEnumerated.c deleted file mode 100644 index 800da97..0000000 --- a/Bouncer/asn1c_defs/NativeEnumerated.c +++ /dev/null @@ -1,367 +0,0 @@ -/*- - * Copyright (c) 2004, 2007 Lev Walkin . All rights reserved. - * Redistribution and modifications are permitted subject to BSD license. - */ -/* - * Read the NativeInteger.h for the explanation wrt. differences between - * INTEGER and NativeInteger. - * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this - * implementation deals with the standard (machine-specific) representation - * of them instead of using the platform-independent buffer. - */ -#include -#include - -/* - * NativeEnumerated basic type description. - */ -static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_operation_t asn_OP_NativeEnumerated = { - NativeInteger_free, - NativeInteger_print, - NativeInteger_compare, - NativeInteger_decode_ber, - NativeInteger_encode_der, - NativeInteger_decode_xer, - NativeEnumerated_encode_xer, -#ifdef ASN_DISABLE_OER_SUPPORT - 0, - 0, -#else - NativeEnumerated_decode_oer, - NativeEnumerated_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, -#else - NativeEnumerated_decode_uper, - NativeEnumerated_encode_uper, - NativeEnumerated_decode_aper, - NativeEnumerated_encode_aper, -#endif /* ASN_DISABLE_PER_SUPPORT */ - NativeEnumerated_random_fill, - 0 /* Use generic outmost tag fetcher */ -}; -asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = { - "ENUMERATED", /* The ASN.1 type is still ENUMERATED */ - "ENUMERATED", - &asn_OP_NativeEnumerated, - asn_DEF_NativeEnumerated_tags, - sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), - asn_DEF_NativeEnumerated_tags, /* Same as above */ - sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), - { 0, 0, asn_generic_no_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - -asn_enc_rval_t -NativeEnumerated_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, - int ilevel, enum xer_encoder_flags_e flags, - asn_app_consume_bytes_f *cb, void *app_key) { - const asn_INTEGER_specifics_t *specs = - (const asn_INTEGER_specifics_t *)td->specifics; - asn_enc_rval_t er = {0,0,0}; - const long *native = (const long *)sptr; - const asn_INTEGER_enum_map_t *el; - - (void)ilevel; - (void)flags; - - if(!native) ASN__ENCODE_FAILED; - - el = INTEGER_map_value2enum(specs, *native); - if(el) { - er.encoded = - asn__format_to_callback(cb, app_key, "<%s/>", el->enum_name); - if(er.encoded < 0) ASN__ENCODE_FAILED; - ASN__ENCODED_OK(er); - } else { - ASN_DEBUG( - "ASN.1 forbids dealing with " - "unknown value of ENUMERATED type"); - ASN__ENCODE_FAILED; - } -} - -asn_dec_rval_t -NativeEnumerated_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - void **sptr, asn_per_data_t *pd) { - const asn_INTEGER_specifics_t *specs = td->specifics; - asn_dec_rval_t rval = { RC_OK, 0 }; - long *native = (long *)*sptr; - const asn_per_constraint_t *ct; - long value; - - (void)opt_codec_ctx; - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) - ct = &td->encoding_constraints.per_constraints->value; - else ASN__DECODE_FAILED; /* Mandatory! */ - if(!specs) ASN__DECODE_FAILED; - - if(!native) { - native = (long *)(*sptr = CALLOC(1, sizeof(*native))); - if(!native) ASN__DECODE_FAILED; - } - - ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); - - if(ct->flags & APC_EXTENSIBLE) { - int inext = per_get_few_bits(pd, 1); - if(inext < 0) ASN__DECODE_STARVED; - if(inext) ct = 0; - } - - if(ct && ct->range_bits >= 0) { - value = per_get_few_bits(pd, ct->range_bits); - if(value < 0) ASN__DECODE_STARVED; - if(value >= (specs->extension - ? specs->extension - 1 : specs->map_count)) - ASN__DECODE_FAILED; - } else { - if(!specs->extension) - ASN__DECODE_FAILED; - /* - * X.691, #10.6: normally small non-negative whole number; - */ - value = uper_get_nsnnwn(pd); - if(value < 0) ASN__DECODE_STARVED; - value += specs->extension - 1; - if(value >= specs->map_count) - ASN__DECODE_FAILED; - } - - *native = specs->value2enum[value].nat_value; - ASN_DEBUG("Decoded %s = %ld", td->name, *native); - - return rval; -} - -static int -NativeEnumerated__compar_value2enum(const void *ap, const void *bp) { - const asn_INTEGER_enum_map_t *a = ap; - const asn_INTEGER_enum_map_t *b = bp; - if(a->nat_value == b->nat_value) - return 0; - if(a->nat_value < b->nat_value) - return -1; - return 1; -} - -asn_enc_rval_t -NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - const void *sptr, asn_per_outp_t *po) { - const asn_INTEGER_specifics_t *specs = - (const asn_INTEGER_specifics_t *)td->specifics; - asn_enc_rval_t er = {0,0,0}; - long native, value; - const asn_per_constraint_t *ct; - int inext = 0; - asn_INTEGER_enum_map_t key; - const asn_INTEGER_enum_map_t *kf; - - if(!sptr) ASN__ENCODE_FAILED; - if(!specs) ASN__ENCODE_FAILED; - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) - ct = &td->encoding_constraints.per_constraints->value; - else ASN__ENCODE_FAILED; /* Mandatory! */ - - ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); - - er.encoded = 0; - - native = *(const long *)sptr; - - key.nat_value = native; - kf = bsearch(&key, specs->value2enum, specs->map_count, - sizeof(key), NativeEnumerated__compar_value2enum); - if(!kf) { - ASN_DEBUG("No element corresponds to %ld", native); - ASN__ENCODE_FAILED; - } - value = kf - specs->value2enum; - - if(ct->range_bits >= 0) { - int cmpWith = specs->extension - ? specs->extension - 1 : specs->map_count; - if(value >= cmpWith) - inext = 1; - } - if(ct->flags & APC_EXTENSIBLE) { - if(per_put_few_bits(po, inext, 1)) - ASN__ENCODE_FAILED; - if(inext) ct = 0; - } else if(inext) { - ASN__ENCODE_FAILED; - } - - if(ct && ct->range_bits >= 0) { - if(per_put_few_bits(po, value, ct->range_bits)) - ASN__ENCODE_FAILED; - ASN__ENCODED_OK(er); - } - - if(!specs->extension) - ASN__ENCODE_FAILED; - - /* - * X.691, #10.6: normally small non-negative whole number; - */ - ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", - value, specs->extension, inext, - value - (inext ? (specs->extension - 1) : 0)); - if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) - ASN__ENCODE_FAILED; - - ASN__ENCODED_OK(er); -} - -asn_dec_rval_t -NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - void **sptr, asn_per_data_t *pd) { - const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; - asn_dec_rval_t rval = { RC_OK, 0 }; - long *native = (long *)*sptr; - const asn_per_constraint_t *ct; - long value; - - (void)opt_codec_ctx; - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) - ct = &td->encoding_constraints.per_constraints->value; - else ASN__DECODE_FAILED; /* Mandatory! */ - if(!specs) ASN__DECODE_FAILED; - - if(!native) { - native = (long *)(*sptr = CALLOC(1, sizeof(*native))); - if(!native) ASN__DECODE_FAILED; - } - - ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); - - if(ct->flags & APC_EXTENSIBLE) { - int inext = per_get_few_bits(pd, 1); - if(inext < 0) ASN__DECODE_STARVED; - if(inext) ct = 0; - } - - /* Deal with APER padding */ - if(ct && ct->upper_bound >= 255) { - int padding = 0; - padding = (8 - (pd->moved % 8)) % 8; - ASN_DEBUG("For NativeEnumerated %s,offset= %lu Padding bits = %d", td->name, pd->moved, padding); - ASN_DEBUG("For NativeEnumerated %s, upper bound = %lu", td->name, ct->upper_bound); - if(padding > 0) - per_get_few_bits(pd, padding); - } - - if(ct && ct->range_bits >= 0) { - value = per_get_few_bits(pd, ct->range_bits); - if(value < 0) ASN__DECODE_STARVED; - if(value >= (specs->extension - ? specs->extension - 1 : specs->map_count)) - ASN__DECODE_FAILED; - } else { - if(!specs->extension) - ASN__DECODE_FAILED; - /* - * X.691, #10.6: normally small non-negative whole number; - */ - value = uper_get_nsnnwn(pd); - if(value < 0) ASN__DECODE_STARVED; - value += specs->extension - 1; - if(value >= specs->map_count) - ASN__DECODE_FAILED; - } - - *native = specs->value2enum[value].nat_value; - ASN_DEBUG("Decoded %s = %ld", td->name, *native); - - return rval; -} - -asn_enc_rval_t -NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - const void *sptr, asn_per_outp_t *po) { - const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; - asn_enc_rval_t er = {0,0,0}; - long native, value; - const asn_per_constraint_t *ct; - int inext = 0; - asn_INTEGER_enum_map_t key; - asn_INTEGER_enum_map_t *kf; - - if(!sptr) ASN__ENCODE_FAILED; - if(!specs) ASN__ENCODE_FAILED; - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) - ct = &td->encoding_constraints.per_constraints->value; - else ASN__ENCODE_FAILED; /* Mandatory! */ - - ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); - - er.encoded = 0; - - native = *(const long *)sptr; - if(native < 0) ASN__ENCODE_FAILED; - - key.nat_value = native; - kf = bsearch(&key, specs->value2enum, specs->map_count, - sizeof(key), NativeEnumerated__compar_value2enum); - if(!kf) { - ASN_DEBUG("No element corresponds to %ld", native); - ASN__ENCODE_FAILED; - } - value = kf - specs->value2enum; - - if(ct->range_bits >= 0) { - int cmpWith = specs->extension - ? specs->extension - 1 : specs->map_count; - if(value >= cmpWith) - inext = 1; - } - if(ct->flags & APC_EXTENSIBLE) { - if(per_put_few_bits(po, inext, 1)) - ASN__ENCODE_FAILED; - if(inext) ct = 0; - } else if(inext) { - ASN__ENCODE_FAILED; - } - - if(ct && ct->range_bits >= 0) { - if(per_put_few_bits(po, value, ct->range_bits)) - ASN__ENCODE_FAILED; - ASN__ENCODED_OK(er); - } - - if(!specs->extension) - ASN__ENCODE_FAILED; - - /* - * X.691, #10.6: normally small non-negative whole number; - */ - ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", - value, specs->extension, inext, - value - (inext ? (specs->extension - 1) : 0)); - if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) - ASN__ENCODE_FAILED; - - ASN__ENCODED_OK(er); -} diff --git a/Bouncer/asn1c_defs/OCTET_STRING.c b/Bouncer/asn1c_defs/OCTET_STRING.c deleted file mode 100644 index 432ce5a..0000000 --- a/Bouncer/asn1c_defs/OCTET_STRING.c +++ /dev/null @@ -1,2409 +0,0 @@ -/*- - * Copyright (c) 2003-2017 Lev Walkin . - * All rights reserved. - * Redistribution and modifications are permitted subject to BSD license. - */ -#include -#include -#include /* for .bits_unused member */ -#include - -/* - * OCTET STRING basic type description. - */ -static const ber_tlv_tag_t asn_DEF_OCTET_STRING_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs = { - sizeof(OCTET_STRING_t), - offsetof(OCTET_STRING_t, _asn_ctx), - ASN_OSUBV_STR -}; - -asn_TYPE_operation_t asn_OP_OCTET_STRING = { - OCTET_STRING_free, - OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */ - OCTET_STRING_compare, - OCTET_STRING_decode_ber, - OCTET_STRING_encode_der, - OCTET_STRING_decode_xer_hex, - OCTET_STRING_encode_xer, -#ifdef ASN_DISABLE_OER_SUPPORT - 0, - 0, -#else - OCTET_STRING_decode_oer, - OCTET_STRING_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, -#else - OCTET_STRING_decode_uper, /* Unaligned PER decoder */ - OCTET_STRING_encode_uper, /* Unaligned PER encoder */ - OCTET_STRING_decode_aper, /* Aligned PER decoder */ - OCTET_STRING_encode_aper, /* Aligned PER encoder */ -#endif /* ASN_DISABLE_PER_SUPPORT */ - OCTET_STRING_random_fill, - 0 /* Use generic outmost tag fetcher */ -}; -asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = { - "OCTET STRING", /* Canonical name */ - "OCTET_STRING", /* XML tag name */ - &asn_OP_OCTET_STRING, - asn_DEF_OCTET_STRING_tags, - sizeof(asn_DEF_OCTET_STRING_tags) - / sizeof(asn_DEF_OCTET_STRING_tags[0]), - asn_DEF_OCTET_STRING_tags, /* Same as above */ - sizeof(asn_DEF_OCTET_STRING_tags) - / sizeof(asn_DEF_OCTET_STRING_tags[0]), - { 0, 0, asn_generic_no_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs -}; - -#undef _CH_PHASE -#undef NEXT_PHASE -#undef PREV_PHASE -#define _CH_PHASE(ctx, inc) do { \ - if(ctx->phase == 0) \ - ctx->context = 0; \ - ctx->phase += inc; \ - } while(0) -#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1) -#define PREV_PHASE(ctx) _CH_PHASE(ctx, -1) - -#undef ADVANCE -#define ADVANCE(num_bytes) do { \ - size_t num = (num_bytes); \ - buf_ptr = ((const char *)buf_ptr) + num; \ - size -= num; \ - consumed_myself += num; \ - } while(0) - -#undef RETURN -#define RETURN(_code) do { \ - asn_dec_rval_t tmprval; \ - tmprval.code = _code; \ - tmprval.consumed = consumed_myself; \ - return tmprval; \ - } while(0) - -#undef APPEND -#define APPEND(bufptr, bufsize) do { \ - size_t _bs = (bufsize); /* Append size */ \ - size_t _ns = ctx->context; /* Allocated now */ \ - size_t _es = st->size + _bs; /* Expected size */ \ - /* int is really a typeof(st->size): */ \ - if((int)_es < 0) RETURN(RC_FAIL); \ - if(_ns <= _es) { \ - void *ptr; \ - /* Be nice and round to the memory allocator */ \ - do { _ns = _ns ? _ns << 1 : 16; } \ - while(_ns <= _es); \ - /* int is really a typeof(st->size): */ \ - if((int)_ns < 0) RETURN(RC_FAIL); \ - ptr = REALLOC(st->buf, _ns); \ - if(ptr) { \ - st->buf = (uint8_t *)ptr; \ - ctx->context = _ns; \ - } else { \ - RETURN(RC_FAIL); \ - } \ - ASN_DEBUG("Reallocating into %ld", (long)_ns); \ - } \ - memcpy(st->buf + st->size, bufptr, _bs); \ - /* Convenient nul-termination */ \ - st->buf[_es] = '\0'; \ - st->size = _es; \ - } while(0) - -/* - * The main reason why ASN.1 is still alive is that too much time and effort - * is necessary for learning it more or less adequately, thus creating a gut - * necessity to demonstrate that aquired skill everywhere afterwards. - * No, I am not going to explain what the following stuff is. - */ -struct _stack_el { - ber_tlv_len_t left; /* What's left to read (or -1) */ - ber_tlv_len_t got; /* What was actually processed */ - unsigned cont_level; /* Depth of subcontainment */ - int want_nulls; /* Want null "end of content" octets? */ - int bits_chopped; /* Flag in BIT STRING mode */ - ber_tlv_tag_t tag; /* For debugging purposes */ - struct _stack_el *prev; - struct _stack_el *next; -}; -struct _stack { - struct _stack_el *tail; - struct _stack_el *cur_ptr; -}; - -static struct _stack_el * -OS__add_stack_el(struct _stack *st) { - struct _stack_el *nel; - - /* - * Reuse the old stack frame or allocate a new one. - */ - if(st->cur_ptr && st->cur_ptr->next) { - nel = st->cur_ptr->next; - nel->bits_chopped = 0; - nel->got = 0; - /* Retain the nel->cont_level, it's correct. */ - } else { - nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el)); - if(nel == NULL) - return NULL; - - if(st->tail) { - /* Increase a subcontainment depth */ - nel->cont_level = st->tail->cont_level + 1; - st->tail->next = nel; - } - nel->prev = st->tail; - st->tail = nel; - } - - st->cur_ptr = nel; - - return nel; -} - -static struct _stack * -_new_stack(void) { - return (struct _stack *)CALLOC(1, sizeof(struct _stack)); -} - -/* - * Decode OCTET STRING type. - */ -asn_dec_rval_t -OCTET_STRING_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, void **sptr, - const void *buf_ptr, size_t size, int tag_mode) { - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - BIT_STRING_t *st = (BIT_STRING_t *)*sptr; - asn_dec_rval_t rval; - asn_struct_ctx_t *ctx; - ssize_t consumed_myself = 0; - struct _stack *stck; /* Expectations stack structure */ - struct _stack_el *sel = 0; /* Stack element */ - int tlv_constr; - enum asn_OS_Subvariant type_variant = specs->subvariant; - - ASN_DEBUG("Decoding %s as %s (frame %ld)", - td->name, - (type_variant == ASN_OSUBV_STR) ? - "OCTET STRING" : "OS-SpecialCase", - (long)size); - - /* - * Create the string if does not exist. - */ - if(st == NULL) { - st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); - if(st == NULL) RETURN(RC_FAIL); - } - - /* Restore parsing context */ - ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); - - switch(ctx->phase) { - case 0: - /* - * Check tags. - */ - rval = ber_check_tags(opt_codec_ctx, td, ctx, - buf_ptr, size, tag_mode, -1, - &ctx->left, &tlv_constr); - if(rval.code != RC_OK) - return rval; - - if(tlv_constr) { - /* - * Complex operation, requires stack of expectations. - */ - ctx->ptr = _new_stack(); - if(!ctx->ptr) { - RETURN(RC_FAIL); - } - } else { - /* - * Jump into stackless primitive decoding. - */ - _CH_PHASE(ctx, 3); - if(type_variant == ASN_OSUBV_ANY && tag_mode != 1) - APPEND(buf_ptr, rval.consumed); - ADVANCE(rval.consumed); - goto phase3; - } - - NEXT_PHASE(ctx); - /* Fall through */ - case 1: - phase1: - /* - * Fill the stack with expectations. - */ - stck = (struct _stack *)ctx->ptr; - sel = stck->cur_ptr; - do { - ber_tlv_tag_t tlv_tag; - ber_tlv_len_t tlv_len; - ber_tlv_tag_t expected_tag; - ssize_t tl, ll, tlvl; - /* This one works even if (sel->left == -1) */ - size_t Left = ((!sel||(size_t)sel->left >= size) - ?size:(size_t)sel->left); - - - ASN_DEBUG("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", (void *)sel, - (long)(sel?sel->left:0), - (long)(sel?sel->want_nulls:0), - (long)(sel?sel->got:0) - ); - if(sel && sel->left <= 0 && sel->want_nulls == 0) { - if(sel->prev) { - struct _stack_el *prev = sel->prev; - if(prev->left != -1) { - if(prev->left < sel->got) - RETURN(RC_FAIL); - prev->left -= sel->got; - } - prev->got += sel->got; - sel = stck->cur_ptr = prev; - if(!sel) break; - tlv_constr = 1; - continue; - } else { - sel = stck->cur_ptr = 0; - break; /* Nothing to wait */ - } - } - - tl = ber_fetch_tag(buf_ptr, Left, &tlv_tag); - ASN_DEBUG("fetch tag(size=%ld,L=%ld), %sstack, left=%ld, wn=%ld, tl=%ld", - (long)size, (long)Left, sel?"":"!", - (long)(sel?sel->left:0), - (long)(sel?sel->want_nulls:0), - (long)tl); - switch(tl) { - case -1: RETURN(RC_FAIL); - case 0: RETURN(RC_WMORE); - } - - tlv_constr = BER_TLV_CONSTRUCTED(buf_ptr); - - ll = ber_fetch_length(tlv_constr, - (const char *)buf_ptr + tl,Left - tl,&tlv_len); - ASN_DEBUG("Got tag=%s, tc=%d, left=%ld, tl=%ld, len=%ld, ll=%ld", - ber_tlv_tag_string(tlv_tag), tlv_constr, - (long)Left, (long)tl, (long)tlv_len, (long)ll); - switch(ll) { - case -1: RETURN(RC_FAIL); - case 0: RETURN(RC_WMORE); - } - - if(sel && sel->want_nulls - && ((const uint8_t *)buf_ptr)[0] == 0 - && ((const uint8_t *)buf_ptr)[1] == 0) - { - - ASN_DEBUG("Eat EOC; wn=%d--", sel->want_nulls); - - if(type_variant == ASN_OSUBV_ANY - && (tag_mode != 1 || sel->cont_level)) - APPEND("\0\0", 2); - - ADVANCE(2); - sel->got += 2; - if(sel->left != -1) { - sel->left -= 2; /* assert(sel->left >= 2) */ - } - - sel->want_nulls--; - if(sel->want_nulls == 0) { - /* Move to the next expectation */ - sel->left = 0; - tlv_constr = 1; - } - - continue; - } - - /* - * Set up expected tags, - * depending on ASN.1 type being decoded. - */ - switch(type_variant) { - case ASN_OSUBV_BIT: - /* X.690: 8.6.4.1, NOTE 2 */ - /* Fall through */ - case ASN_OSUBV_STR: - default: - if(sel) { - unsigned level = sel->cont_level; - if(level < td->all_tags_count) { - expected_tag = td->all_tags[level]; - break; - } else if(td->all_tags_count) { - expected_tag = td->all_tags - [td->all_tags_count - 1]; - break; - } - /* else, Fall through */ - } - /* Fall through */ - case ASN_OSUBV_ANY: - expected_tag = tlv_tag; - break; - } - - - if(tlv_tag != expected_tag) { - char buf[2][32]; - ber_tlv_tag_snprint(tlv_tag, - buf[0], sizeof(buf[0])); - ber_tlv_tag_snprint(td->tags[td->tags_count-1], - buf[1], sizeof(buf[1])); - ASN_DEBUG("Tag does not match expectation: %s != %s", - buf[0], buf[1]); - RETURN(RC_FAIL); - } - - tlvl = tl + ll; /* Combined length of T and L encoding */ - if((tlv_len + tlvl) < 0) { - /* tlv_len value is too big */ - ASN_DEBUG("TLV encoding + length (%ld) is too big", - (long)tlv_len); - RETURN(RC_FAIL); - } - - /* - * Append a new expectation. - */ - sel = OS__add_stack_el(stck); - if(!sel) RETURN(RC_FAIL); - - sel->tag = tlv_tag; - - sel->want_nulls = (tlv_len==-1); - if(sel->prev && sel->prev->left != -1) { - /* Check that the parent frame is big enough */ - if(sel->prev->left < tlvl + (tlv_len==-1?0:tlv_len)) - RETURN(RC_FAIL); - if(tlv_len == -1) - sel->left = sel->prev->left - tlvl; - else - sel->left = tlv_len; - } else { - sel->left = tlv_len; - } - if(type_variant == ASN_OSUBV_ANY - && (tag_mode != 1 || sel->cont_level)) - APPEND(buf_ptr, tlvl); - sel->got += tlvl; - ADVANCE(tlvl); - - ASN_DEBUG("+EXPECT2 got=%ld left=%ld, wn=%d, clvl=%u", - (long)sel->got, (long)sel->left, - sel->want_nulls, sel->cont_level); - - } while(tlv_constr); - if(sel == NULL) { - /* Finished operation, "phase out" */ - ASN_DEBUG("Phase out"); - _CH_PHASE(ctx, +3); - break; - } - - NEXT_PHASE(ctx); - /* Fall through */ - case 2: - stck = (struct _stack *)ctx->ptr; - sel = stck->cur_ptr; - ASN_DEBUG("Phase 2: Need %ld bytes, size=%ld, alrg=%ld, wn=%d", - (long)sel->left, (long)size, (long)sel->got, - sel->want_nulls); - { - ber_tlv_len_t len; - - assert(sel->left >= 0); - - len = ((ber_tlv_len_t)size < sel->left) - ? (ber_tlv_len_t)size : sel->left; - if(len > 0) { - if(type_variant == ASN_OSUBV_BIT - && sel->bits_chopped == 0) { - /* Put the unused-bits-octet away */ - st->bits_unused = *(const uint8_t *)buf_ptr; - APPEND(((const char *)buf_ptr+1), (len - 1)); - sel->bits_chopped = 1; - } else { - APPEND(buf_ptr, len); - } - ADVANCE(len); - sel->left -= len; - sel->got += len; - } - - if(sel->left) { - ASN_DEBUG("OS left %ld, size = %ld, wn=%d\n", - (long)sel->left, (long)size, sel->want_nulls); - RETURN(RC_WMORE); - } - - PREV_PHASE(ctx); - goto phase1; - } - break; - case 3: - phase3: - /* - * Primitive form, no stack required. - */ - assert(ctx->left >= 0); - - if(size < (size_t)ctx->left) { - if(!size) RETURN(RC_WMORE); - if(type_variant == ASN_OSUBV_BIT && !ctx->context) { - st->bits_unused = *(const uint8_t *)buf_ptr; - ctx->left--; - ADVANCE(1); - } - APPEND(buf_ptr, size); - assert(ctx->context > 0); - ctx->left -= size; - ADVANCE(size); - RETURN(RC_WMORE); - } else { - if(type_variant == ASN_OSUBV_BIT - && !ctx->context && ctx->left) { - st->bits_unused = *(const uint8_t *)buf_ptr; - ctx->left--; - ADVANCE(1); - } - APPEND(buf_ptr, ctx->left); - ADVANCE(ctx->left); - ctx->left = 0; - - NEXT_PHASE(ctx); - } - break; - } - - if(sel) { - ASN_DEBUG("3sel p=%p, wn=%d, l=%ld, g=%ld, size=%ld", - (void *)sel->prev, sel->want_nulls, - (long)sel->left, (long)sel->got, (long)size); - if(sel->prev || sel->want_nulls > 1 || sel->left > 0) { - RETURN(RC_WMORE); - } - } - - /* - * BIT STRING-specific processing. - */ - if(type_variant == ASN_OSUBV_BIT) { - if(st->size) { - if(st->bits_unused < 0 || st->bits_unused > 7) { - RETURN(RC_FAIL); - } - /* Finalize BIT STRING: zero out unused bits. */ - st->buf[st->size-1] &= 0xff << st->bits_unused; - } else { - if(st->bits_unused) { - RETURN(RC_FAIL); - } - } - } - - ASN_DEBUG("Took %ld bytes to encode %s: [%s]:%ld", - (long)consumed_myself, td->name, - (type_variant == ASN_OSUBV_STR) ? (char *)st->buf : "", - (long)st->size); - - - RETURN(RC_OK); -} - -/* - * Encode OCTET STRING type using DER. - */ -asn_enc_rval_t -OCTET_STRING_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, - int tag_mode, ber_tlv_tag_t tag, - asn_app_consume_bytes_f *cb, void *app_key) { - asn_enc_rval_t er = { 0, 0, 0 }; - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - enum asn_OS_Subvariant type_variant = specs->subvariant; - int fix_last_byte = 0; - - ASN_DEBUG("%s %s as OCTET STRING", - cb?"Estimating":"Encoding", td->name); - - /* - * Write tags. - */ - if(type_variant != ASN_OSUBV_ANY || tag_mode == 1) { - er.encoded = der_write_tags(td, - (type_variant == ASN_OSUBV_BIT) + st->size, - tag_mode, type_variant == ASN_OSUBV_ANY, tag, - cb, app_key); - if(er.encoded == -1) { - er.failed_type = td; - er.structure_ptr = sptr; - return er; - } - } else { - /* Disallow: [] IMPLICIT ANY */ - assert(type_variant != ASN_OSUBV_ANY || tag_mode != -1); - er.encoded = 0; - } - - if(!cb) { - er.encoded += (type_variant == ASN_OSUBV_BIT) + st->size; - ASN__ENCODED_OK(er); - } - - /* - * Prepare to deal with the last octet of BIT STRING. - */ - if(type_variant == ASN_OSUBV_BIT) { - uint8_t b = st->bits_unused & 0x07; - if(b && st->size) fix_last_byte = 1; - ASN__CALLBACK(&b, 1); - } - - /* Invoke callback for the main part of the buffer */ - ASN__CALLBACK(st->buf, st->size - fix_last_byte); - - /* The last octet should be stripped off the unused bits */ - if(fix_last_byte) { - uint8_t b = st->buf[st->size-1] & (0xff << st->bits_unused); - ASN__CALLBACK(&b, 1); - } - - ASN__ENCODED_OK(er); -cb_failed: - ASN__ENCODE_FAILED; -} - -asn_enc_rval_t -OCTET_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, - int ilevel, enum xer_encoder_flags_e flags, - asn_app_consume_bytes_f *cb, void *app_key) { - const char * const h2c = "0123456789ABCDEF"; - const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; - asn_enc_rval_t er = { 0, 0, 0 }; - char scratch[16 * 3 + 4]; - char *p = scratch; - uint8_t *buf; - uint8_t *end; - size_t i; - - if(!st || (!st->buf && st->size)) - ASN__ENCODE_FAILED; - - er.encoded = 0; - - /* - * Dump the contents of the buffer in hexadecimal. - */ - buf = st->buf; - end = buf + st->size; - if(flags & XER_F_CANONICAL) { - char *scend = scratch + (sizeof(scratch) - 2); - for(; buf < end; buf++) { - if(p >= scend) { - ASN__CALLBACK(scratch, p - scratch); - p = scratch; - } - *p++ = h2c[(*buf >> 4) & 0x0F]; - *p++ = h2c[*buf & 0x0F]; - } - - ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ - } else { - for(i = 0; buf < end; buf++, i++) { - if(!(i % 16) && (i || st->size > 16)) { - ASN__CALLBACK(scratch, p-scratch); - p = scratch; - ASN__TEXT_INDENT(1, ilevel); - } - *p++ = h2c[(*buf >> 4) & 0x0F]; - *p++ = h2c[*buf & 0x0F]; - *p++ = 0x20; - } - if(p - scratch) { - p--; /* Remove the tail space */ - ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ - if(st->size > 16) - ASN__TEXT_INDENT(1, ilevel-1); - } - } - - ASN__ENCODED_OK(er); -cb_failed: - ASN__ENCODE_FAILED; -} - -static const struct OCTET_STRING__xer_escape_table_s { - const char *string; - int size; -} OCTET_STRING__xer_escape_table[] = { -#define OSXET(s) { s, sizeof(s) - 1 } - OSXET("\074\156\165\154\057\076"), /* */ - OSXET("\074\163\157\150\057\076"), /* */ - OSXET("\074\163\164\170\057\076"), /* */ - OSXET("\074\145\164\170\057\076"), /* */ - OSXET("\074\145\157\164\057\076"), /* */ - OSXET("\074\145\156\161\057\076"), /* */ - OSXET("\074\141\143\153\057\076"), /* */ - OSXET("\074\142\145\154\057\076"), /* */ - OSXET("\074\142\163\057\076"), /* */ - OSXET("\011"), /* \t */ - OSXET("\012"), /* \n */ - OSXET("\074\166\164\057\076"), /* */ - OSXET("\074\146\146\057\076"), /* */ - OSXET("\015"), /* \r */ - OSXET("\074\163\157\057\076"), /* */ - OSXET("\074\163\151\057\076"), /* */ - OSXET("\074\144\154\145\057\076"), /* */ - OSXET("\074\144\143\061\057\076"), /* */ - OSXET("\074\144\143\062\057\076"), /* */ - OSXET("\074\144\143\063\057\076"), /* */ - OSXET("\074\144\143\064\057\076"), /* */ - OSXET("\074\156\141\153\057\076"), /* */ - OSXET("\074\163\171\156\057\076"), /* */ - OSXET("\074\145\164\142\057\076"), /* */ - OSXET("\074\143\141\156\057\076"), /* */ - OSXET("\074\145\155\057\076"), /* */ - OSXET("\074\163\165\142\057\076"), /* */ - OSXET("\074\145\163\143\057\076"), /* */ - OSXET("\074\151\163\064\057\076"), /* */ - OSXET("\074\151\163\063\057\076"), /* */ - OSXET("\074\151\163\062\057\076"), /* */ - OSXET("\074\151\163\061\057\076"), /* */ - { 0, 0 }, /* " " */ - { 0, 0 }, /* ! */ - { 0, 0 }, /* \" */ - { 0, 0 }, /* # */ - { 0, 0 }, /* $ */ - { 0, 0 }, /* % */ - OSXET("\046\141\155\160\073"), /* & */ - { 0, 0 }, /* ' */ - {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* ()*+,-./ */ - {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* 01234567 */ - {0,0},{0,0},{0,0},{0,0}, /* 89:; */ - OSXET("\046\154\164\073"), /* < */ - { 0, 0 }, /* = */ - OSXET("\046\147\164\073"), /* > */ -}; - -static int -OS__check_escaped_control_char(const void *buf, int size) { - size_t i; - /* - * Inefficient algorithm which translates the escape sequences - * defined above into characters. Returns -1 if not found. - * TODO: replace by a faster algorithm (bsearch(), hash or - * nested table lookups). - */ - for(i = 0; i < 32 /* Don't spend time on the bottom half */; i++) { - const struct OCTET_STRING__xer_escape_table_s *el; - el = &OCTET_STRING__xer_escape_table[i]; - if(el->size == size && memcmp(buf, el->string, size) == 0) - return i; - } - return -1; -} - -static int -OCTET_STRING__handle_control_chars(void *struct_ptr, const void *chunk_buf, size_t chunk_size) { - /* - * This might be one of the escape sequences - * for control characters. Check it out. - * #11.15.5 - */ - int control_char = OS__check_escaped_control_char(chunk_buf,chunk_size); - if(control_char >= 0) { - OCTET_STRING_t *st = (OCTET_STRING_t *)struct_ptr; - void *p = REALLOC(st->buf, st->size + 2); - if(p) { - st->buf = (uint8_t *)p; - st->buf[st->size++] = control_char; - st->buf[st->size] = '\0'; /* nul-termination */ - return 0; - } - } - - return -1; /* No, it's not */ -} - -asn_enc_rval_t -OCTET_STRING_encode_xer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, - int ilevel, enum xer_encoder_flags_e flags, - asn_app_consume_bytes_f *cb, void *app_key) { - const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; - asn_enc_rval_t er = { 0, 0, 0 }; - uint8_t *buf, *end; - uint8_t *ss; /* Sequence start */ - ssize_t encoded_len = 0; - - (void)ilevel; /* Unused argument */ - (void)flags; /* Unused argument */ - - if(!st || (!st->buf && st->size)) - ASN__ENCODE_FAILED; - - buf = st->buf; - end = buf + st->size; - for(ss = buf; buf < end; buf++) { - unsigned int ch = *buf; - int s_len; /* Special encoding sequence length */ - - /* - * Escape certain characters: X.680/11.15 - */ - if(ch < sizeof(OCTET_STRING__xer_escape_table) - /sizeof(OCTET_STRING__xer_escape_table[0]) - && (s_len = OCTET_STRING__xer_escape_table[ch].size)) { - if(((buf - ss) && cb(ss, buf - ss, app_key) < 0) - || cb(OCTET_STRING__xer_escape_table[ch].string, s_len, - app_key) < 0) - ASN__ENCODE_FAILED; - encoded_len += (buf - ss) + s_len; - ss = buf + 1; - } - } - - encoded_len += (buf - ss); - if((buf - ss) && cb(ss, buf - ss, app_key) < 0) - ASN__ENCODE_FAILED; - - er.encoded = encoded_len; - ASN__ENCODED_OK(er); -} - -/* - * Convert from hexadecimal format (cstring): "AB CD EF" - */ -static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { - OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; - const char *chunk_stop = (const char *)chunk_buf; - const char *p = chunk_stop; - const char *pend = p + chunk_size; - unsigned int clv = 0; - int half = 0; /* Half bit */ - uint8_t *buf; - - /* Reallocate buffer according to high cap estimation */ - size_t new_size = st->size + (chunk_size + 1) / 2; - void *nptr = REALLOC(st->buf, new_size + 1); - if(!nptr) return -1; - st->buf = (uint8_t *)nptr; - buf = st->buf + st->size; - - /* - * If something like " a b c " appears here, the " a b":3 will be - * converted, and the rest skipped. That is, unless buf_size is greater - * than chunk_size, then it'll be equivalent to "ABC0". - */ - for(; p < pend; p++) { - int ch = *(const unsigned char *)p; - switch(ch) { - case 0x09: case 0x0a: case 0x0c: case 0x0d: - case 0x20: - /* Ignore whitespace */ - continue; - case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ - case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ - clv = (clv << 4) + (ch - 0x30); - break; - case 0x41: case 0x42: case 0x43: /* ABC */ - case 0x44: case 0x45: case 0x46: /* DEF */ - clv = (clv << 4) + (ch - 0x41 + 10); - break; - case 0x61: case 0x62: case 0x63: /* abc */ - case 0x64: case 0x65: case 0x66: /* def */ - clv = (clv << 4) + (ch - 0x61 + 10); - break; - default: - *buf = 0; /* JIC */ - return -1; - } - if(half++) { - half = 0; - *buf++ = clv; - chunk_stop = p + 1; - } - } - - /* - * Check partial decoding. - */ - if(half) { - if(have_more) { - /* - * Partial specification is fine, - * because no more more PXER_TEXT data is available. - */ - *buf++ = clv << 4; - chunk_stop = p; - } - } else { - chunk_stop = p; - } - - st->size = buf - st->buf; /* Adjust the buffer size */ - assert(st->size <= new_size); - st->buf[st->size] = 0; /* Courtesy termination */ - - return (chunk_stop - (const char *)chunk_buf); /* Converted size */ -} - -/* - * Convert from binary format: "00101011101" - */ -static ssize_t OCTET_STRING__convert_binary(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { - BIT_STRING_t *st = (BIT_STRING_t *)sptr; - const char *p = (const char *)chunk_buf; - const char *pend = p + chunk_size; - int bits_unused = st->bits_unused & 0x7; - uint8_t *buf; - - /* Reallocate buffer according to high cap estimation */ - size_t new_size = st->size + (chunk_size + 7) / 8; - void *nptr = REALLOC(st->buf, new_size + 1); - if(!nptr) return -1; - st->buf = (uint8_t *)nptr; - buf = st->buf + st->size; - - (void)have_more; - - if(bits_unused == 0) - bits_unused = 8; - else if(st->size) - buf--; - - /* - * Convert series of 0 and 1 into the octet string. - */ - for(; p < pend; p++) { - int ch = *(const unsigned char *)p; - switch(ch) { - case 0x09: case 0x0a: case 0x0c: case 0x0d: - case 0x20: - /* Ignore whitespace */ - break; - case 0x30: - case 0x31: - if(bits_unused-- <= 0) { - *++buf = 0; /* Clean the cell */ - bits_unused = 7; - } - *buf |= (ch&1) << bits_unused; - break; - default: - st->bits_unused = bits_unused; - return -1; - } - } - - if(bits_unused == 8) { - st->size = buf - st->buf; - st->bits_unused = 0; - } else { - st->size = buf - st->buf + 1; - st->bits_unused = bits_unused; - } - - assert(st->size <= new_size); - st->buf[st->size] = 0; /* Courtesy termination */ - - return chunk_size; /* Converted in full */ -} - -/* - * Something like strtod(), but with stricter rules. - */ -static int -OS__strtoent(int base, const char *buf, const char *end, int32_t *ret_value) { - const int32_t last_unicode_codepoint = 0x10ffff; - int32_t val = 0; - const char *p; - - for(p = buf; p < end; p++) { - int ch = *p; - - switch(ch) { - case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ - case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ - val = val * base + (ch - 0x30); - break; - case 0x41: case 0x42: case 0x43: /* ABC */ - case 0x44: case 0x45: case 0x46: /* DEF */ - val = val * base + (ch - 0x41 + 10); - break; - case 0x61: case 0x62: case 0x63: /* abc */ - case 0x64: case 0x65: case 0x66: /* def */ - val = val * base + (ch - 0x61 + 10); - break; - case 0x3b: /* ';' */ - *ret_value = val; - return (p - buf) + 1; - default: - return -1; /* Character set error */ - } - - /* Value exceeds the Unicode range. */ - if(val > last_unicode_codepoint) { - return -1; - } - } - - *ret_value = -1; - return (p - buf); -} - -/* - * Convert from the plain UTF-8 format, expanding entity references: "2 < 3" - */ -static ssize_t -OCTET_STRING__convert_entrefs(void *sptr, const void *chunk_buf, - size_t chunk_size, int have_more) { - OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; - const char *p = (const char *)chunk_buf; - const char *pend = p + chunk_size; - uint8_t *buf; - - /* Reallocate buffer */ - size_t new_size = st->size + chunk_size; - void *nptr = REALLOC(st->buf, new_size + 1); - if(!nptr) return -1; - st->buf = (uint8_t *)nptr; - buf = st->buf + st->size; - - /* - * Convert series of 0 and 1 into the octet string. - */ - for(; p < pend; p++) { - int ch = *(const unsigned char *)p; - int len; /* Length of the rest of the chunk */ - - if(ch != 0x26 /* '&' */) { - *buf++ = ch; - continue; /* That was easy... */ - } - - /* - * Process entity reference. - */ - len = chunk_size - (p - (const char *)chunk_buf); - if(len == 1 /* "&" */) goto want_more; - if(p[1] == 0x23 /* '#' */) { - const char *pval; /* Pointer to start of digits */ - int32_t val = 0; /* Entity reference value */ - int base; - - if(len == 2 /* "&#" */) goto want_more; - if(p[2] == 0x78 /* 'x' */) - pval = p + 3, base = 16; - else - pval = p + 2, base = 10; - len = OS__strtoent(base, pval, p + len, &val); - if(len == -1) { - /* Invalid charset. Just copy verbatim. */ - *buf++ = ch; - continue; - } - if(!len || pval[len-1] != 0x3b) goto want_more; - assert(val > 0); - p += (pval - p) + len - 1; /* Advance past entref */ - - if(val < 0x80) { - *buf++ = (char)val; - } else if(val < 0x800) { - *buf++ = 0xc0 | ((val >> 6)); - *buf++ = 0x80 | ((val & 0x3f)); - } else if(val < 0x10000) { - *buf++ = 0xe0 | ((val >> 12)); - *buf++ = 0x80 | ((val >> 6) & 0x3f); - *buf++ = 0x80 | ((val & 0x3f)); - } else if(val < 0x200000) { - *buf++ = 0xf0 | ((val >> 18)); - *buf++ = 0x80 | ((val >> 12) & 0x3f); - *buf++ = 0x80 | ((val >> 6) & 0x3f); - *buf++ = 0x80 | ((val & 0x3f)); - } else if(val < 0x4000000) { - *buf++ = 0xf8 | ((val >> 24)); - *buf++ = 0x80 | ((val >> 18) & 0x3f); - *buf++ = 0x80 | ((val >> 12) & 0x3f); - *buf++ = 0x80 | ((val >> 6) & 0x3f); - *buf++ = 0x80 | ((val & 0x3f)); - } else { - *buf++ = 0xfc | ((val >> 30) & 0x1); - *buf++ = 0x80 | ((val >> 24) & 0x3f); - *buf++ = 0x80 | ((val >> 18) & 0x3f); - *buf++ = 0x80 | ((val >> 12) & 0x3f); - *buf++ = 0x80 | ((val >> 6) & 0x3f); - *buf++ = 0x80 | ((val & 0x3f)); - } - } else { - /* - * Ugly, limited parsing of & > < - */ - char *sc = (char *)memchr(p, 0x3b, len > 5 ? 5 : len); - if(!sc) goto want_more; - if((sc - p) == 4 - && p[1] == 0x61 /* 'a' */ - && p[2] == 0x6d /* 'm' */ - && p[3] == 0x70 /* 'p' */) { - *buf++ = 0x26; - p = sc; - continue; - } - if((sc - p) == 3) { - if(p[1] == 0x6c) { - *buf = 0x3c; /* '<' */ - } else if(p[1] == 0x67) { - *buf = 0x3e; /* '>' */ - } else { - /* Unsupported entity reference */ - *buf++ = ch; - continue; - } - if(p[2] != 0x74) { - /* Unsupported entity reference */ - *buf++ = ch; - continue; - } - buf++; - p = sc; - continue; - } - /* Unsupported entity reference */ - *buf++ = ch; - } - - continue; - want_more: - if(have_more) { - /* - * We know that no more data (of the same type) - * is coming. Copy the rest verbatim. - */ - *buf++ = ch; - continue; - } - chunk_size = (p - (const char *)chunk_buf); - /* Processing stalled: need more data */ - break; - } - - st->size = buf - st->buf; - assert(st->size <= new_size); - st->buf[st->size] = 0; /* Courtesy termination */ - - return chunk_size; /* Converted in full */ -} - -/* - * Decode OCTET STRING from the XML element's body. - */ -static asn_dec_rval_t -OCTET_STRING__decode_xer( - const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, - void **sptr, const char *opt_mname, const void *buf_ptr, size_t size, - int (*opt_unexpected_tag_decoder)(void *struct_ptr, const void *chunk_buf, - size_t chunk_size), - ssize_t (*body_receiver)(void *struct_ptr, const void *chunk_buf, - size_t chunk_size, int have_more)) { - OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; - asn_struct_ctx_t *ctx; /* Per-structure parser context */ - asn_dec_rval_t rval; /* Return value from the decoder */ - int st_allocated; - - /* - * Create the string if does not exist. - */ - if(!st) { - st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); - *sptr = (void *)st; - if(!st) goto sta_failed; - st_allocated = 1; - } else { - st_allocated = 0; - } - if(!st->buf) { - /* This is separate from above section */ - st->buf = (uint8_t *)CALLOC(1, 1); - if(!st->buf) { - if(st_allocated) { - *sptr = 0; - goto stb_failed; - } else { - goto sta_failed; - } - } - } - - /* Restore parsing context */ - ctx = (asn_struct_ctx_t *)(((char *)*sptr) + specs->ctx_offset); - - return xer_decode_general(opt_codec_ctx, ctx, *sptr, xml_tag, - buf_ptr, size, opt_unexpected_tag_decoder, body_receiver); - -stb_failed: - FREEMEM(st); -sta_failed: - rval.code = RC_FAIL; - rval.consumed = 0; - return rval; -} - -/* - * Decode OCTET STRING from the hexadecimal data. - */ -asn_dec_rval_t -OCTET_STRING_decode_xer_hex(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, void **sptr, - const char *opt_mname, const void *buf_ptr, - size_t size) { - return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, - buf_ptr, size, 0, OCTET_STRING__convert_hexadecimal); -} - -/* - * Decode OCTET STRING from the binary (0/1) data. - */ -asn_dec_rval_t -OCTET_STRING_decode_xer_binary(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, void **sptr, - const char *opt_mname, const void *buf_ptr, - size_t size) { - return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, - buf_ptr, size, 0, OCTET_STRING__convert_binary); -} - -/* - * Decode OCTET STRING from the string (ASCII/UTF-8) data. - */ -asn_dec_rval_t -OCTET_STRING_decode_xer_utf8(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, void **sptr, - const char *opt_mname, const void *buf_ptr, - size_t size) { - return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, - buf_ptr, size, - OCTET_STRING__handle_control_chars, - OCTET_STRING__convert_entrefs); -} - -#ifndef ASN_DISABLE_PER_SUPPORT - -static int -OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf, - size_t units, unsigned int bpc, unsigned int unit_bits, - long lb, long ub, const asn_per_constraints_t *pc) { - uint8_t *end = buf + units * bpc; - - ASN_DEBUG("Expanding %d characters into (%ld..%ld):%d", - (int)units, lb, ub, unit_bits); - - /* X.691: 27.5.4 */ - if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { - /* Decode without translation */ - lb = 0; - } else if(pc && pc->code2value) { - if(unit_bits > 16) - return 1; /* FATAL: can't have constrained - * UniversalString with more than - * 16 million code points */ - for(; buf < end; buf += bpc) { - int value; - int code = per_get_few_bits(po, unit_bits); - if(code < 0) return -1; /* WMORE */ - value = pc->code2value(code); - if(value < 0) { - ASN_DEBUG("Code %d (0x%02x) is" - " not in map (%ld..%ld)", - code, code, lb, ub); - return 1; /* FATAL */ - } - switch(bpc) { - case 1: *buf = value; break; - case 2: buf[0] = value >> 8; buf[1] = value; break; - case 4: buf[0] = value >> 24; buf[1] = value >> 16; - buf[2] = value >> 8; buf[3] = value; break; - } - } - return 0; - } - - /* Shortcut the no-op copying to the aligned structure */ - if(lb == 0 && (unit_bits == 8 * bpc)) { - return per_get_many_bits(po, buf, 0, unit_bits * units); - } - - for(; buf < end; buf += bpc) { - int32_t code = per_get_few_bits(po, unit_bits); - int32_t ch = code + lb; - if(code < 0) return -1; /* WMORE */ - if(ch > ub) { - ASN_DEBUG("Code %d is out of range (%ld..%ld)", - ch, lb, ub); - return 1; /* FATAL */ - } - switch(bpc) { - case 1: *buf = ch; break; - case 2: buf[0] = ch >> 8; buf[1] = ch; break; - case 4: buf[0] = ch >> 24; buf[1] = ch >> 16; - buf[2] = ch >> 8; buf[3] = ch; break; - } - } - - return 0; -} - -static int -OCTET_STRING_per_put_characters(asn_per_outp_t *po, const uint8_t *buf, - size_t units, unsigned int bpc, unsigned int unit_bits, - long lb, long ub, const asn_per_constraints_t *pc) { - const uint8_t *end = buf + units * bpc; - - ASN_DEBUG("Squeezing %d characters into (%ld..%ld):%d (%d bpc)", - (int)units, lb, ub, unit_bits, bpc); - - /* X.691: 27.5.4 */ - if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { - /* Encode as is */ - lb = 0; - } else if(pc && pc->value2code) { - for(; buf < end; buf += bpc) { - int code; - uint32_t value; - switch(bpc) { - case 1: value = *(const uint8_t *)buf; break; - case 2: value = (buf[0] << 8) | buf[1]; break; - case 4: value = (buf[0] << 24) | (buf[1] << 16) - | (buf[2] << 8) | buf[3]; break; - default: return -1; - } - code = pc->value2code(value); - if(code < 0) { - ASN_DEBUG("Character %d (0x%02x) is" - " not in map (%ld..%ld)", - *buf, *buf, lb, ub); - return -1; - } - if(per_put_few_bits(po, code, unit_bits)) - return -1; - } - } - - /* Shortcut the no-op copying to the aligned structure */ - if(lb == 0 && (unit_bits == 8 * bpc)) { - return per_put_many_bits(po, buf, unit_bits * units); - } - - for(ub -= lb; buf < end; buf += bpc) { - int ch; - uint32_t value; - switch(bpc) { - case 1: - value = *(const uint8_t *)buf; - break; - case 2: - value = (buf[0] << 8) | buf[1]; - break; - case 4: - value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; - break; - default: - return -1; - } - ch = value - lb; - if(ch < 0 || ch > ub) { - ASN_DEBUG("Character %d (0x%02x) is out of range (%ld..%ld)", *buf, - value, lb, ub + lb); - return -1; - } - if(per_put_few_bits(po, ch, unit_bits)) return -1; - } - - return 0; -} - -static asn_per_constraints_t asn_DEF_OCTET_STRING_constraints = { - { APC_CONSTRAINED, 8, 8, 0, 255 }, - { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, - 0, 0 -}; - -asn_dec_rval_t -OCTET_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, void **sptr, - asn_per_data_t *pd) { - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - const asn_per_constraints_t *pc = - constraints ? constraints : td->encoding_constraints.per_constraints; - const asn_per_constraint_t *cval; - const asn_per_constraint_t *csiz; - asn_dec_rval_t rval = { RC_OK, 0 }; - OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; - ssize_t consumed_myself = 0; - int repeat; - enum { - OS__BPC_CHAR = 1, - OS__BPC_U16 = 2, - OS__BPC_U32 = 4 - } bpc; /* Bytes per character */ - unsigned int unit_bits; - unsigned int canonical_unit_bits; - - (void)opt_codec_ctx; - - if(pc) { - cval = &pc->value; - csiz = &pc->size; - } else { - cval = &asn_DEF_OCTET_STRING_constraints.value; - csiz = &asn_DEF_OCTET_STRING_constraints.size; - } - - switch(specs->subvariant) { - default: - case ASN_OSUBV_ANY: - case ASN_OSUBV_BIT: - ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); - RETURN(RC_FAIL); - break; - case ASN_OSUBV_STR: - canonical_unit_bits = unit_bits = 8; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_CHAR; - break; - case ASN_OSUBV_U16: - canonical_unit_bits = unit_bits = 16; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U16; - break; - case ASN_OSUBV_U32: - canonical_unit_bits = unit_bits = 32; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U32; - break; - } - - /* - * Allocate the string. - */ - if(!st) { - st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); - if(!st) RETURN(RC_FAIL); - } - - ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", - csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", - csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); - - if(csiz->flags & APC_EXTENSIBLE) { - int inext = per_get_few_bits(pd, 1); - if(inext < 0) RETURN(RC_WMORE); - if(inext) { - csiz = &asn_DEF_OCTET_STRING_constraints.size; - unit_bits = canonical_unit_bits; - } - } - - if(csiz->effective_bits >= 0) { - FREEMEM(st->buf); - if(bpc) { - st->size = csiz->upper_bound * bpc; - } else { - st->size = (csiz->upper_bound + 7) >> 3; - } - st->buf = (uint8_t *)MALLOC(st->size + 1); - if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } - } - - /* X.691, #16.5: zero-length encoding */ - /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ - /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ - if(csiz->effective_bits == 0) { - int ret; - if(bpc) { - ASN_DEBUG("Encoding OCTET STRING size %ld", - csiz->upper_bound); - ret = OCTET_STRING_per_get_characters(pd, st->buf, - csiz->upper_bound, bpc, unit_bits, - cval->lower_bound, cval->upper_bound, pc); - if(ret > 0) RETURN(RC_FAIL); - } else { - ASN_DEBUG("Encoding BIT STRING size %ld", - csiz->upper_bound); - ret = per_get_many_bits(pd, st->buf, 0, - unit_bits * csiz->upper_bound); - } - if(ret < 0) RETURN(RC_WMORE); - consumed_myself += unit_bits * csiz->upper_bound; - st->buf[st->size] = 0; - RETURN(RC_OK); - } - - st->size = 0; - do { - ssize_t raw_len; - ssize_t len_bytes; - void *p; - int ret; - - /* Get the PER length */ - raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, - &repeat); - if(raw_len < 0) RETURN(RC_WMORE); - if(raw_len == 0 && st->buf) break; - - ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", - (long)csiz->effective_bits, (long)raw_len, - repeat ? "repeat" : "once", td->name); - len_bytes = raw_len * bpc; - p = REALLOC(st->buf, st->size + len_bytes + 1); - if(!p) RETURN(RC_FAIL); - st->buf = (uint8_t *)p; - - ret = OCTET_STRING_per_get_characters(pd, &st->buf[st->size], raw_len, - bpc, unit_bits, cval->lower_bound, - cval->upper_bound, pc); - if(ret > 0) RETURN(RC_FAIL); - if(ret < 0) RETURN(RC_WMORE); - st->size += len_bytes; - } while(repeat); - st->buf[st->size] = 0; /* nul-terminate */ - - return rval; -} - -asn_enc_rval_t -OCTET_STRING_encode_uper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - const void *sptr, asn_per_outp_t *po) { - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - const asn_per_constraints_t *pc = constraints ? constraints - : td->encoding_constraints.per_constraints; - const asn_per_constraint_t *cval; - const asn_per_constraint_t *csiz; - const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; - asn_enc_rval_t er = { 0, 0, 0 }; - int inext = 0; /* Lies not within extension root */ - unsigned int unit_bits; - unsigned int canonical_unit_bits; - size_t size_in_units; - const uint8_t *buf; - int ret; - enum { - OS__BPC_CHAR = 1, - OS__BPC_U16 = 2, - OS__BPC_U32 = 4 - } bpc; /* Bytes per character */ - int ct_extensible; - - if(!st || (!st->buf && st->size)) - ASN__ENCODE_FAILED; - - if(pc) { - cval = &pc->value; - csiz = &pc->size; - } else { - cval = &asn_DEF_OCTET_STRING_constraints.value; - csiz = &asn_DEF_OCTET_STRING_constraints.size; - } - ct_extensible = csiz->flags & APC_EXTENSIBLE; - - switch(specs->subvariant) { - default: - case ASN_OSUBV_ANY: - case ASN_OSUBV_BIT: - ASN__ENCODE_FAILED; - case ASN_OSUBV_STR: - canonical_unit_bits = unit_bits = 8; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_CHAR; - size_in_units = st->size; - break; - case ASN_OSUBV_U16: - canonical_unit_bits = unit_bits = 16; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U16; - size_in_units = st->size >> 1; - if(st->size & 1) { - ASN_DEBUG("%s string size is not modulo 2", td->name); - ASN__ENCODE_FAILED; - } - break; - case ASN_OSUBV_U32: - canonical_unit_bits = unit_bits = 32; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U32; - size_in_units = st->size >> 2; - if(st->size & 3) { - ASN_DEBUG("%s string size is not modulo 4", td->name); - ASN__ENCODE_FAILED; - } - break; - } - - ASN_DEBUG("Encoding %s into %" ASN_PRI_SIZE " units of %d bits" - " (%ld..%ld, effective %d)%s", - td->name, size_in_units, unit_bits, - csiz->lower_bound, csiz->upper_bound, - csiz->effective_bits, ct_extensible ? " EXT" : ""); - - /* Figure out whether size lies within PER visible constraint */ - - if(csiz->effective_bits >= 0) { - if((ssize_t)size_in_units < csiz->lower_bound - || (ssize_t)size_in_units > csiz->upper_bound) { - if(ct_extensible) { - csiz = &asn_DEF_OCTET_STRING_constraints.size; - unit_bits = canonical_unit_bits; - inext = 1; - } else { - ASN__ENCODE_FAILED; - } - } - } else { - inext = 0; - } - - if(ct_extensible) { - /* Declare whether length is [not] within extension root */ - if(per_put_few_bits(po, inext, 1)) - ASN__ENCODE_FAILED; - } - - if(csiz->effective_bits >= 0 && !inext) { - ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes (%ld), length in %d bits", st->size, - size_in_units - csiz->lower_bound, csiz->effective_bits); - ret = per_put_few_bits(po, size_in_units - csiz->lower_bound, - csiz->effective_bits); - if(ret) ASN__ENCODE_FAILED; - ret = OCTET_STRING_per_put_characters(po, st->buf, size_in_units, bpc, - unit_bits, cval->lower_bound, - cval->upper_bound, pc); - if(ret) ASN__ENCODE_FAILED; - ASN__ENCODED_OK(er); - } - - ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); - - buf = st->buf; - ASN_DEBUG("Encoding %" ASN_PRI_SIZE " in units", size_in_units); - do { - int need_eom = 0; - ssize_t may_save = uper_put_length(po, size_in_units, &need_eom); - if(may_save < 0) ASN__ENCODE_FAILED; - - ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "%s", may_save, size_in_units, - need_eom ? ",+EOM" : ""); - - ret = OCTET_STRING_per_put_characters(po, buf, may_save, bpc, unit_bits, - cval->lower_bound, - cval->upper_bound, pc); - if(ret) ASN__ENCODE_FAILED; - - buf += may_save * bpc; - size_in_units -= may_save; - assert(!(may_save & 0x07) || !size_in_units); - if(need_eom && uper_put_length(po, 0, 0)) - ASN__ENCODE_FAILED; /* End of Message length */ - } while(size_in_units); - - ASN__ENCODED_OK(er); -} - -asn_dec_rval_t -OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - void **sptr, asn_per_data_t *pd) { - - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - const asn_per_constraints_t *pc = constraints ? constraints - : td->encoding_constraints.per_constraints; - const asn_per_constraint_t *cval; - const asn_per_constraint_t *csiz; - asn_dec_rval_t rval = { RC_OK, 0 }; - BIT_STRING_t *st = (BIT_STRING_t *)*sptr; - ssize_t consumed_myself = 0; - int repeat; - enum { - OS__BPC_BIT = 0, - OS__BPC_CHAR = 1, - OS__BPC_U16 = 2, - OS__BPC_U32 = 4 - } bpc; /* Bytes per character */ - unsigned int unit_bits; - unsigned int canonical_unit_bits; - - (void)opt_codec_ctx; - - if(pc) { - cval = &pc->value; - csiz = &pc->size; - } else { - cval = &asn_DEF_OCTET_STRING_constraints.value; - csiz = &asn_DEF_OCTET_STRING_constraints.size; - } - - switch(specs->subvariant) { - default: -/* case ASN_OSUBV_ANY: - ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); - RETURN(RC_FAIL); -*/ - case ASN_OSUBV_BIT: - canonical_unit_bits = unit_bits = 1; - bpc = OS__BPC_BIT; - break; - case ASN_OSUBV_ANY: - case ASN_OSUBV_STR: - canonical_unit_bits = unit_bits = 8; -/* if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; -*/ - bpc = OS__BPC_CHAR; - break; - case ASN_OSUBV_U16: - canonical_unit_bits = unit_bits = 16; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U16; - break; - case ASN_OSUBV_U32: - canonical_unit_bits = unit_bits = 32; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U32; - break; - } - - /* - * Allocate the string. - */ - if(!st) { - st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); - if(!st) RETURN(RC_FAIL); - } - - ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", - csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", - csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); - - if(csiz->flags & APC_EXTENSIBLE) { - int inext = per_get_few_bits(pd, 1); - if(inext < 0) RETURN(RC_WMORE); - if(inext) { - csiz = &asn_DEF_OCTET_STRING_constraints.size; - cval = &asn_DEF_OCTET_STRING_constraints.value; - unit_bits = canonical_unit_bits; - } - } - - if(csiz->effective_bits >= 0) { - FREEMEM(st->buf); - if(bpc) { - st->size = csiz->upper_bound * bpc; - } else { - st->size = (csiz->upper_bound + 7) >> 3; - } - st->buf = (uint8_t *)MALLOC(st->size + 1); - if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } - } - - /* X.691, #16.5: zero-length encoding */ - /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ - /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ - if(csiz->effective_bits == 0) { - int ret; - if (st->size > 2) { /* X.691 #16 NOTE 1 */ - if (aper_get_align(pd) < 0) - RETURN(RC_FAIL); - } - if(bpc) { - ASN_DEBUG("Decoding OCTET STRING size %ld", - csiz->upper_bound); - ret = OCTET_STRING_per_get_characters(pd, st->buf, - csiz->upper_bound, bpc, unit_bits, - cval->lower_bound, cval->upper_bound, pc); - if(ret > 0) RETURN(RC_FAIL); - } else { - ASN_DEBUG("Decoding BIT STRING size %ld", - csiz->upper_bound); - ret = per_get_many_bits(pd, st->buf, 0, - unit_bits * csiz->upper_bound); - } - if(ret < 0) RETURN(RC_WMORE); - consumed_myself += unit_bits * csiz->upper_bound; - st->buf[st->size] = 0; - if(bpc == 0) { - int ubs = (csiz->upper_bound & 0x7); - st->bits_unused = ubs ? 8 - ubs : 0; - } - RETURN(RC_OK); - } - - st->size = 0; - do { - ssize_t raw_len; - ssize_t len_bytes; - ssize_t len_bits; - void *p; - int ret; - - /* Get the PER length */ - if (csiz->upper_bound - csiz->lower_bound == 0) - /* Indefinite length case */ - raw_len = aper_get_length(pd, -1, csiz->effective_bits, &repeat); - else - raw_len = aper_get_length(pd, csiz->upper_bound - csiz->lower_bound + 1, csiz->effective_bits, &repeat); - repeat = 0; - if(raw_len < 0) RETURN(RC_WMORE); - raw_len += csiz->lower_bound; - - ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", - (long)csiz->effective_bits, (long)raw_len, - repeat ? "repeat" : "once", td->name); - - if (raw_len > 2) { /* X.691 #16 NOTE 1 */ - if (aper_get_align(pd) < 0) - RETURN(RC_FAIL); - } - - if(bpc) { - len_bytes = raw_len * bpc; - len_bits = len_bytes * unit_bits; - } else { - len_bits = raw_len; - len_bytes = (len_bits + 7) >> 3; - if(len_bits & 0x7) - st->bits_unused = 8 - (len_bits & 0x7); - /* len_bits be multiple of 16K if repeat is set */ - } - p = REALLOC(st->buf, st->size + len_bytes + 1); - if(!p) RETURN(RC_FAIL); - st->buf = (uint8_t *)p; - - if(bpc) { - ret = OCTET_STRING_per_get_characters(pd, - &st->buf[st->size], raw_len, bpc, unit_bits, - cval->lower_bound, cval->upper_bound, pc); - if(ret > 0) RETURN(RC_FAIL); - } else { - ret = per_get_many_bits(pd, &st->buf[st->size], - 0, len_bits); - } - if(ret < 0) RETURN(RC_WMORE); - st->size += len_bytes; - } while(repeat); - st->buf[st->size] = 0; /* nul-terminate */ - - return rval; -} - -asn_enc_rval_t -OCTET_STRING_encode_aper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - const void *sptr, asn_per_outp_t *po) { - - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - const asn_per_constraints_t *pc = constraints ? constraints - : td->encoding_constraints.per_constraints; - const asn_per_constraint_t *cval; - const asn_per_constraint_t *csiz; - const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; - asn_enc_rval_t er = { 0, 0, 0 }; - int inext = 0; /* Lies not within extension root */ - unsigned int unit_bits; - unsigned int canonical_unit_bits; - unsigned int sizeinunits; - const uint8_t *buf; - int ret; - enum { - OS__BPC_BIT = 0, - OS__BPC_CHAR = 1, - OS__BPC_U16 = 2, - OS__BPC_U32 = 4 - } bpc; /* Bytes per character */ - int ct_extensible; - - if(!st || (!st->buf && st->size)) - ASN__ENCODE_FAILED; - - if(pc) { - cval = &pc->value; - csiz = &pc->size; - } else { - cval = &asn_DEF_OCTET_STRING_constraints.value; - csiz = &asn_DEF_OCTET_STRING_constraints.size; - } - ct_extensible = csiz->flags & APC_EXTENSIBLE; - - switch(specs->subvariant) { - default: - /* case ASN_OSUBV_ANY: - ASN__ENCODE_FAILED; - */ - case ASN_OSUBV_BIT: - canonical_unit_bits = unit_bits = 1; - bpc = OS__BPC_BIT; - sizeinunits = st->size * 8 - (st->bits_unused & 0x07); - ASN_DEBUG("BIT STRING of %d bytes", - sizeinunits); - break; - case ASN_OSUBV_ANY: - case ASN_OSUBV_STR: - canonical_unit_bits = unit_bits = 8; -/* if(cval->flags & APC_CONSTRAINED) - unit_bits = 8; -*/ - bpc = OS__BPC_CHAR; - sizeinunits = st->size; - break; - case ASN_OSUBV_U16: - canonical_unit_bits = unit_bits = 16; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U16; - sizeinunits = st->size / 2; - break; - case ASN_OSUBV_U32: - canonical_unit_bits = unit_bits = 32; - if(cval->flags & APC_CONSTRAINED) - unit_bits = cval->range_bits; - bpc = OS__BPC_U32; - sizeinunits = st->size / 4; - break; - } - - ASN_DEBUG("Encoding %s into %d units of %d bits" - " (%ld..%ld, effective %d)%s", - td->name, sizeinunits, unit_bits, - csiz->lower_bound, csiz->upper_bound, - csiz->effective_bits, ct_extensible ? " EXT" : ""); - - /* Figure out wheter size lies within PER visible constraint */ - - if(csiz->effective_bits >= 0) { - if((int)sizeinunits < csiz->lower_bound - || (int)sizeinunits > csiz->upper_bound) { - if(ct_extensible) { - cval = &asn_DEF_OCTET_STRING_constraints.value; - csiz = &asn_DEF_OCTET_STRING_constraints.size; - unit_bits = canonical_unit_bits; - inext = 1; - } else - ASN__ENCODE_FAILED; - } - } else { - inext = 0; - } - - - if(ct_extensible) { - /* Declare whether length is [not] within extension root */ - if(per_put_few_bits(po, inext, 1)) - ASN__ENCODE_FAILED; - } - - /* X.691, #16.5: zero-length encoding */ - /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ - /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ - if(csiz->effective_bits >= 0) { - ASN_DEBUG("Encoding %lu bytes (%ld), length in %d bits", - st->size, sizeinunits - csiz->lower_bound, - csiz->effective_bits); - if (csiz->effective_bits > 0) { - ret = aper_put_length(po, csiz->upper_bound - csiz->lower_bound + 1, sizeinunits - csiz->lower_bound); - if(ret) ASN__ENCODE_FAILED; - } - if (st->size > 2) { /* X.691 #16 NOTE 1 */ - if (aper_put_align(po) < 0) - ASN__ENCODE_FAILED; - } - if(bpc) { - ret = OCTET_STRING_per_put_characters(po, st->buf, - sizeinunits, bpc, unit_bits, - cval->lower_bound, cval->upper_bound, pc); - } else { - ret = per_put_many_bits(po, st->buf, - sizeinunits * unit_bits); - } - if(ret) ASN__ENCODE_FAILED; - ASN__ENCODED_OK(er); - } - - ASN_DEBUG("Encoding %lu bytes", st->size); - - if(sizeinunits == 0) { - if(aper_put_length(po, -1, 0)) - ASN__ENCODE_FAILED; - ASN__ENCODED_OK(er); - } - - buf = st->buf; - while(sizeinunits) { - ssize_t maySave = aper_put_length(po, -1, sizeinunits); - - if(maySave < 0) ASN__ENCODE_FAILED; - - ASN_DEBUG("Encoding %ld of %ld", - (long)maySave, (long)sizeinunits); - - if(bpc) { - ret = OCTET_STRING_per_put_characters(po, buf, - maySave, bpc, unit_bits, - cval->lower_bound, cval->upper_bound, pc); - } else { - ret = per_put_many_bits(po, buf, maySave * unit_bits); - } - if(ret) ASN__ENCODE_FAILED; - - if(bpc) - buf += maySave * bpc; - else - buf += maySave >> 3; - sizeinunits -= maySave; - assert(!(maySave & 0x07) || !sizeinunits); - } - - ASN__ENCODED_OK(er); -} - -#endif /* ASN_DISABLE_PER_SUPPORT */ - -int -OCTET_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, - int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { - const char * const h2c = "0123456789ABCDEF"; - const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; - char scratch[16 * 3 + 4]; - char *p = scratch; - uint8_t *buf; - uint8_t *end; - size_t i; - - (void)td; /* Unused argument */ - - if(!st || (!st->buf && st->size)) - return (cb("", 8, app_key) < 0) ? -1 : 0; - - /* - * Dump the contents of the buffer in hexadecimal. - */ - buf = st->buf; - end = buf + st->size; - for(i = 0; buf < end; buf++, i++) { - if(!(i % 16) && (i || st->size > 16)) { - if(cb(scratch, p - scratch, app_key) < 0) - return -1; - _i_INDENT(1); - p = scratch; - } - *p++ = h2c[(*buf >> 4) & 0x0F]; - *p++ = h2c[*buf & 0x0F]; - *p++ = 0x20; - } - - if(p > scratch) { - p--; /* Remove the tail space */ - if(cb(scratch, p - scratch, app_key) < 0) - return -1; - } - - return 0; -} - -int -OCTET_STRING_print_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, - int ilevel, asn_app_consume_bytes_f *cb, - void *app_key) { - const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; - - (void)td; /* Unused argument */ - (void)ilevel; /* Unused argument */ - - if(st && (st->buf || !st->size)) { - return (cb(st->buf, st->size, app_key) < 0) ? -1 : 0; - } else { - return (cb("", 8, app_key) < 0) ? -1 : 0; - } -} - -void -OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, - enum asn_struct_free_method method) { - OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; - const asn_OCTET_STRING_specifics_t *specs; - asn_struct_ctx_t *ctx; - struct _stack *stck; - - if(!td || !st) - return; - - specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); - - ASN_DEBUG("Freeing %s as OCTET STRING", td->name); - - if(st->buf) { - FREEMEM(st->buf); - st->buf = 0; - } - - /* - * Remove decode-time stack. - */ - stck = (struct _stack *)ctx->ptr; - if(stck) { - while(stck->tail) { - struct _stack_el *sel = stck->tail; - stck->tail = sel->prev; - FREEMEM(sel); - } - FREEMEM(stck); - } - - switch(method) { - case ASFM_FREE_EVERYTHING: - FREEMEM(sptr); - break; - case ASFM_FREE_UNDERLYING: - break; - case ASFM_FREE_UNDERLYING_AND_RESET: - memset(sptr, 0, - td->specifics - ? ((const asn_OCTET_STRING_specifics_t *)(td->specifics)) - ->struct_size - : sizeof(OCTET_STRING_t)); - break; - } -} - -/* - * Conversion routines. - */ -int -OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) { - void *buf; - - if(st == 0 || (str == 0 && len)) { - errno = EINVAL; - return -1; - } - - /* - * Clear the OCTET STRING. - */ - if(str == NULL) { - FREEMEM(st->buf); - st->buf = 0; - st->size = 0; - return 0; - } - - /* Determine the original string size, if not explicitly given */ - if(len < 0) - len = strlen(str); - - /* Allocate and fill the memory */ - buf = MALLOC(len + 1); - if(buf == NULL) - return -1; - - memcpy(buf, str, len); - ((uint8_t *)buf)[len] = '\0'; /* Couldn't use memcpy(len+1)! */ - FREEMEM(st->buf); - st->buf = (uint8_t *)buf; - st->size = len; - - return 0; -} - -OCTET_STRING_t * -OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, const char *str, - int len) { - const asn_OCTET_STRING_specifics_t *specs = - td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - OCTET_STRING_t *st; - - st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); - if(st && str && OCTET_STRING_fromBuf(st, str, len)) { - FREEMEM(st); - st = NULL; - } - - return st; -} - -/* - * Lexicographically compare the common prefix of both strings, - * and if it is the same return -1 for the smallest string. - */ -int -OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, - const void *bptr) { - const asn_OCTET_STRING_specifics_t *specs = td->specifics; - const OCTET_STRING_t *a = aptr; - const OCTET_STRING_t *b = bptr; - - assert(!specs || specs->subvariant != ASN_OSUBV_BIT); - - if(a && b) { - size_t common_prefix_size = a->size <= b->size ? a->size : b->size; - int ret = memcmp(a->buf, b->buf, common_prefix_size); - if(ret == 0) { - /* Figure out which string with equal prefixes is longer. */ - if(a->size < b->size) { - return -1; - } else if(a->size > b->size) { - return 1; - } else { - return 0; - } - } else { - return ret < 0 ? -1 : 1; - } - } else if(!a && !b) { - return 0; - } else if(!a) { - return -1; - } else { - return 1; - } - -} - -/* - * Biased function for randomizing character values around their limits. - */ -static uint32_t -OCTET_STRING__random_char(unsigned long lb, unsigned long ub) { - assert(lb <= ub); - switch(asn_random_between(0, 16)) { - case 0: - if(lb < ub) return lb + 1; - /* Fall through */ - case 1: - return lb; - case 2: - if(lb < ub) return ub - 1; - /* Fall through */ - case 3: - return ub; - default: - return asn_random_between(lb, ub); - } -} - - -size_t -OCTET_STRING_random_length_constrained( - const asn_TYPE_descriptor_t *td, - const asn_encoding_constraints_t *constraints, size_t max_length) { - const unsigned lengths[] = {0, 1, 2, 3, 4, 8, - 126, 127, 128, 16383, 16384, 16385, - 65534, 65535, 65536, 65537}; - size_t rnd_len; - - /* Figure out how far we should go */ - rnd_len = lengths[asn_random_between( - 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; - - if(!constraints || !constraints->per_constraints) - constraints = &td->encoding_constraints; - if(constraints->per_constraints) { - const asn_per_constraint_t *pc = &constraints->per_constraints->size; - if(pc->flags & APC_CONSTRAINED) { - long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length - ? pc->upper_bound - : (ssize_t)max_length; - if(max_length <= (size_t)pc->lower_bound) { - return pc->lower_bound; - } - if(pc->flags & APC_EXTENSIBLE) { - switch(asn_random_between(0, 5)) { - case 0: - if(pc->lower_bound > 0) { - rnd_len = pc->lower_bound - 1; - break; - } - /* Fall through */ - case 1: - rnd_len = pc->upper_bound + 1; - break; - case 2: - /* Keep rnd_len from the table */ - if(rnd_len <= max_length) { - break; - } - /* Fall through */ - default: - rnd_len = asn_random_between(pc->lower_bound, - suggested_upper_bound); - } - } else { - rnd_len = - asn_random_between(pc->lower_bound, suggested_upper_bound); - } - } else { - rnd_len = asn_random_between(0, max_length); - } - } else if(rnd_len > max_length) { - rnd_len = asn_random_between(0, max_length); - } - - return rnd_len; -} - -asn_random_fill_result_t -OCTET_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, - const asn_encoding_constraints_t *constraints, - size_t max_length) { - const asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (const asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_SPC_OCTET_STRING_specs; - asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; - asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; - asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; - unsigned int unit_bytes = 1; - unsigned long clb = 0; /* Lower bound on char */ - unsigned long cub = 255; /* Higher bound on char value */ - uint8_t *buf; - uint8_t *bend; - uint8_t *b; - size_t rnd_len; - OCTET_STRING_t *st; - - if(max_length == 0 && !*sptr) return result_skipped; - - switch(specs->subvariant) { - default: - case ASN_OSUBV_ANY: - return result_failed; - case ASN_OSUBV_BIT: - /* Handled by BIT_STRING itself. */ - return result_failed; - case ASN_OSUBV_STR: - unit_bytes = 1; - clb = 0; - cub = 255; - break; - case ASN_OSUBV_U16: - unit_bytes = 2; - clb = 0; - cub = 65535; - break; - case ASN_OSUBV_U32: - unit_bytes = 4; - clb = 0; - cub = 0x10FFFF; - break; - } - - if(!constraints || !constraints->per_constraints) - constraints = &td->encoding_constraints; - if(constraints->per_constraints) { - const asn_per_constraint_t *pc = &constraints->per_constraints->value; - if(pc->flags & APC_SEMI_CONSTRAINED) { - clb = pc->lower_bound; - } else if(pc->flags & APC_CONSTRAINED) { - clb = pc->lower_bound; - cub = pc->upper_bound; - } - } - - rnd_len = - OCTET_STRING_random_length_constrained(td, constraints, max_length); - - buf = CALLOC(unit_bytes, rnd_len + 1); - if(!buf) return result_failed; - - bend = &buf[unit_bytes * rnd_len]; - - switch(unit_bytes) { - case 1: - for(b = buf; b < bend; b += unit_bytes) { - *(uint8_t *)b = OCTET_STRING__random_char(clb, cub); - } - *(uint8_t *)b = 0; - break; - case 2: - for(b = buf; b < bend; b += unit_bytes) { - uint32_t code = OCTET_STRING__random_char(clb, cub); - b[0] = code >> 8; - b[1] = code; - } - *(uint16_t *)b = 0; - break; - case 4: - for(b = buf; b < bend; b += unit_bytes) { - uint32_t code = OCTET_STRING__random_char(clb, cub); - b[0] = code >> 24; - b[1] = code >> 16; - b[2] = code >> 8; - b[3] = code; - } - *(uint32_t *)b = 0; - break; - } - - if(*sptr) { - st = *sptr; - FREEMEM(st->buf); - } else { - st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); - if(!st) { - FREEMEM(buf); - return result_failed; - } - } - - st->buf = buf; - st->size = unit_bytes * rnd_len; - - result_ok.length = st->size; - return result_ok; -} diff --git a/Bouncer/asn1c_defs/PLMN-Identity.c b/Bouncer/asn1c_defs/PLMN-Identity.c deleted file mode 100644 index 0bee12e..0000000 --- a/Bouncer/asn1c_defs/PLMN-Identity.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "PLMN-Identity.h" - -int -PLMN_Identity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; - size_t size; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - size = st->size; - - if((size == 3)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_PLMN_Identity_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_PLMN_Identity = { - "PLMN-Identity", - "PLMN-Identity", - &asn_OP_OCTET_STRING, - asn_DEF_PLMN_Identity_tags_1, - sizeof(asn_DEF_PLMN_Identity_tags_1) - /sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */ - asn_DEF_PLMN_Identity_tags_1, /* Same as above */ - sizeof(asn_DEF_PLMN_Identity_tags_1) - /sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_PLMN_Identity_constr_1, PLMN_Identity_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/PLMN-Identity.h b/Bouncer/asn1c_defs/PLMN-Identity.h deleted file mode 100644 index dcdfe18..0000000 --- a/Bouncer/asn1c_defs/PLMN-Identity.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _PLMN_Identity_H_ -#define _PLMN_Identity_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* PLMN-Identity */ -typedef OCTET_STRING_t PLMN_Identity_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_PLMN_Identity; -asn_struct_free_f PLMN_Identity_free; -asn_struct_print_f PLMN_Identity_print; -asn_constr_check_f PLMN_Identity_constraint; -ber_type_decoder_f PLMN_Identity_decode_ber; -der_type_encoder_f PLMN_Identity_encode_der; -xer_type_decoder_f PLMN_Identity_decode_xer; -xer_type_encoder_f PLMN_Identity_encode_xer; -per_type_decoder_f PLMN_Identity_decode_uper; -per_type_encoder_f PLMN_Identity_encode_uper; -per_type_decoder_f PLMN_Identity_decode_aper; -per_type_encoder_f PLMN_Identity_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _PLMN_Identity_H_ */ -#include diff --git a/Bouncer/asn1c_defs/Presence.c b/Bouncer/asn1c_defs/Presence.c deleted file mode 100644 index 2e26921..0000000 --- a/Bouncer/asn1c_defs/Presence.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "Presence.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_Presence_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_Presence_value2enum_1[] = { - { 0, 8, "optional" }, - { 1, 11, "conditional" }, - { 2, 9, "mandatory" } -}; -static const unsigned int asn_MAP_Presence_enum2value_1[] = { - 1, /* conditional(1) */ - 2, /* mandatory(2) */ - 0 /* optional(0) */ -}; -const asn_INTEGER_specifics_t asn_SPC_Presence_specs_1 = { - asn_MAP_Presence_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_Presence_enum2value_1, /* N => "tag"; sorted by N */ - 3, /* Number of elements in the maps */ - 0, /* Enumeration is not extensible */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_Presence_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Presence = { - "Presence", - "Presence", - &asn_OP_NativeEnumerated, - asn_DEF_Presence_tags_1, - sizeof(asn_DEF_Presence_tags_1) - /sizeof(asn_DEF_Presence_tags_1[0]), /* 1 */ - asn_DEF_Presence_tags_1, /* Same as above */ - sizeof(asn_DEF_Presence_tags_1) - /sizeof(asn_DEF_Presence_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_Presence_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_Presence_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/Presence.h b/Bouncer/asn1c_defs/Presence.h deleted file mode 100644 index 7a7c767..0000000 --- a/Bouncer/asn1c_defs/Presence.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _Presence_H_ -#define _Presence_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum Presence { - Presence_optional = 0, - Presence_conditional = 1, - Presence_mandatory = 2 -} e_Presence; - -/* Presence */ -typedef long Presence_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_Presence_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_Presence; -extern const asn_INTEGER_specifics_t asn_SPC_Presence_specs_1; -asn_struct_free_f Presence_free; -asn_struct_print_f Presence_print; -asn_constr_check_f Presence_constraint; -ber_type_decoder_f Presence_decode_ber; -der_type_encoder_f Presence_encode_der; -xer_type_decoder_f Presence_decode_xer; -xer_type_encoder_f Presence_encode_xer; -per_type_decoder_f Presence_decode_uper; -per_type_encoder_f Presence_encode_uper; -per_type_decoder_f Presence_decode_aper; -per_type_encoder_f Presence_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Presence_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProcedureCode.c b/Bouncer/asn1c_defs/ProcedureCode.c deleted file mode 100644 index ad6f7e7..0000000 --- a/Bouncer/asn1c_defs/ProcedureCode.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProcedureCode.h" - -int -ProcedureCode_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 255)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_ProcedureCode_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_ProcedureCode_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProcedureCode = { - "ProcedureCode", - "ProcedureCode", - &asn_OP_NativeInteger, - asn_DEF_ProcedureCode_tags_1, - sizeof(asn_DEF_ProcedureCode_tags_1) - /sizeof(asn_DEF_ProcedureCode_tags_1[0]), /* 1 */ - asn_DEF_ProcedureCode_tags_1, /* Same as above */ - sizeof(asn_DEF_ProcedureCode_tags_1) - /sizeof(asn_DEF_ProcedureCode_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_ProcedureCode_constr_1, ProcedureCode_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/ProcedureCode.h b/Bouncer/asn1c_defs/ProcedureCode.h deleted file mode 100644 index 89996de..0000000 --- a/Bouncer/asn1c_defs/ProcedureCode.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProcedureCode_H_ -#define _ProcedureCode_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* ProcedureCode */ -typedef long ProcedureCode_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_ProcedureCode_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_ProcedureCode; -asn_struct_free_f ProcedureCode_free; -asn_struct_print_f ProcedureCode_print; -asn_constr_check_f ProcedureCode_constraint; -ber_type_decoder_f ProcedureCode_decode_ber; -der_type_encoder_f ProcedureCode_encode_der; -xer_type_decoder_f ProcedureCode_decode_xer; -xer_type_encoder_f ProcedureCode_encode_xer; -per_type_decoder_f ProcedureCode_decode_uper; -per_type_encoder_f ProcedureCode_encode_uper; -per_type_decoder_f ProcedureCode_decode_aper; -per_type_encoder_f ProcedureCode_encode_aper; -#define ProcedureCode_id_E2setup ((ProcedureCode_t)1) -#define ProcedureCode_id_ErrorIndication ((ProcedureCode_t)2) -#define ProcedureCode_id_Reset ((ProcedureCode_t)3) -#define ProcedureCode_id_RICcontrol ((ProcedureCode_t)4) -#define ProcedureCode_id_RICindication ((ProcedureCode_t)5) -#define ProcedureCode_id_RICserviceQuery ((ProcedureCode_t)6) -#define ProcedureCode_id_RICserviceUpdate ((ProcedureCode_t)7) -#define ProcedureCode_id_RICsubscription ((ProcedureCode_t)8) -#define ProcedureCode_id_RICsubscriptionDelete ((ProcedureCode_t)9) - -#ifdef __cplusplus -} -#endif - -#endif /* _ProcedureCode_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-Container.c b/Bouncer/asn1c_defs/ProtocolIE-Container.c deleted file mode 100644 index 89e5e1a..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-Container.c +++ /dev/null @@ -1,810 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-Container.h" - -#include "ProtocolIE-Field.h" -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P0_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P1_constr_3 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P2_constr_5 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P3_constr_7 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P4_constr_9 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P5_constr_11 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P6_constr_13 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P7_constr_15 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P8_constr_17 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P9_constr_19 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P10_constr_21 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P11_constr_23 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P12_constr_25 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P13_constr_27 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P14_constr_29 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P15_constr_31 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P16_constr_33 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P17_constr_35 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P18_constr_37 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P19_constr_39 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P0_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionRequest_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P0_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P0_specs_1 = { - sizeof(struct ProtocolIE_Container_1412P0), - offsetof(struct ProtocolIE_Container_1412P0, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P0 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P0_tags_1, - sizeof(asn_DEF_ProtocolIE_Container_1412P0_tags_1) - /sizeof(asn_DEF_ProtocolIE_Container_1412P0_tags_1[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P0_tags_1, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P0_tags_1) - /sizeof(asn_DEF_ProtocolIE_Container_1412P0_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P0_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P0_1, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P0_specs_1 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P1_3[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionResponse_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P1_tags_3[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P1_specs_3 = { - sizeof(struct ProtocolIE_Container_1412P1), - offsetof(struct ProtocolIE_Container_1412P1, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P1 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P1_tags_3, - sizeof(asn_DEF_ProtocolIE_Container_1412P1_tags_3) - /sizeof(asn_DEF_ProtocolIE_Container_1412P1_tags_3[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P1_tags_3, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P1_tags_3) - /sizeof(asn_DEF_ProtocolIE_Container_1412P1_tags_3[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P1_constr_3, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P1_3, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P1_specs_3 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P2_5[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionFailure_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P2_tags_5[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P2_specs_5 = { - sizeof(struct ProtocolIE_Container_1412P2), - offsetof(struct ProtocolIE_Container_1412P2, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P2 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P2_tags_5, - sizeof(asn_DEF_ProtocolIE_Container_1412P2_tags_5) - /sizeof(asn_DEF_ProtocolIE_Container_1412P2_tags_5[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P2_tags_5, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P2_tags_5) - /sizeof(asn_DEF_ProtocolIE_Container_1412P2_tags_5[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P2_constr_5, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P2_5, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P2_specs_5 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P3_7[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionDeleteRequest_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P3_tags_7[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P3_specs_7 = { - sizeof(struct ProtocolIE_Container_1412P3), - offsetof(struct ProtocolIE_Container_1412P3, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P3 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P3_tags_7, - sizeof(asn_DEF_ProtocolIE_Container_1412P3_tags_7) - /sizeof(asn_DEF_ProtocolIE_Container_1412P3_tags_7[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P3_tags_7, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P3_tags_7) - /sizeof(asn_DEF_ProtocolIE_Container_1412P3_tags_7[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P3_constr_7, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P3_7, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P3_specs_7 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P4_9[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionDeleteResponse_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P4_tags_9[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P4_specs_9 = { - sizeof(struct ProtocolIE_Container_1412P4), - offsetof(struct ProtocolIE_Container_1412P4, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P4 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P4_tags_9, - sizeof(asn_DEF_ProtocolIE_Container_1412P4_tags_9) - /sizeof(asn_DEF_ProtocolIE_Container_1412P4_tags_9[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P4_tags_9, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P4_tags_9) - /sizeof(asn_DEF_ProtocolIE_Container_1412P4_tags_9[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P4_constr_9, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P4_9, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P4_specs_9 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P5_11[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionDeleteFailure_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P5_tags_11[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P5_specs_11 = { - sizeof(struct ProtocolIE_Container_1412P5), - offsetof(struct ProtocolIE_Container_1412P5, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P5 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P5_tags_11, - sizeof(asn_DEF_ProtocolIE_Container_1412P5_tags_11) - /sizeof(asn_DEF_ProtocolIE_Container_1412P5_tags_11[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P5_tags_11, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P5_tags_11) - /sizeof(asn_DEF_ProtocolIE_Container_1412P5_tags_11[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P5_constr_11, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P5_11, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P5_specs_11 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P6_13[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICindication_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P6_tags_13[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P6_specs_13 = { - sizeof(struct ProtocolIE_Container_1412P6), - offsetof(struct ProtocolIE_Container_1412P6, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P6 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P6_tags_13, - sizeof(asn_DEF_ProtocolIE_Container_1412P6_tags_13) - /sizeof(asn_DEF_ProtocolIE_Container_1412P6_tags_13[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P6_tags_13, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P6_tags_13) - /sizeof(asn_DEF_ProtocolIE_Container_1412P6_tags_13[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P6_constr_13, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P6_13, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P6_specs_13 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P7_15[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICcontrolRequest_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P7_tags_15[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P7_specs_15 = { - sizeof(struct ProtocolIE_Container_1412P7), - offsetof(struct ProtocolIE_Container_1412P7, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P7 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P7_tags_15, - sizeof(asn_DEF_ProtocolIE_Container_1412P7_tags_15) - /sizeof(asn_DEF_ProtocolIE_Container_1412P7_tags_15[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P7_tags_15, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P7_tags_15) - /sizeof(asn_DEF_ProtocolIE_Container_1412P7_tags_15[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P7_constr_15, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P7_15, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P7_specs_15 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P8_17[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICcontrolAcknowledge_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P8_tags_17[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P8_specs_17 = { - sizeof(struct ProtocolIE_Container_1412P8), - offsetof(struct ProtocolIE_Container_1412P8, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P8 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P8_tags_17, - sizeof(asn_DEF_ProtocolIE_Container_1412P8_tags_17) - /sizeof(asn_DEF_ProtocolIE_Container_1412P8_tags_17[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P8_tags_17, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P8_tags_17) - /sizeof(asn_DEF_ProtocolIE_Container_1412P8_tags_17[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P8_constr_17, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P8_17, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P8_specs_17 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P9_19[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICcontrolFailure_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P9_tags_19[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P9_specs_19 = { - sizeof(struct ProtocolIE_Container_1412P9), - offsetof(struct ProtocolIE_Container_1412P9, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P9 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P9_tags_19, - sizeof(asn_DEF_ProtocolIE_Container_1412P9_tags_19) - /sizeof(asn_DEF_ProtocolIE_Container_1412P9_tags_19[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P9_tags_19, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P9_tags_19) - /sizeof(asn_DEF_ProtocolIE_Container_1412P9_tags_19[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P9_constr_19, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P9_19, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P9_specs_19 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P10_21[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ErrorIndication_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P10_tags_21[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P10_specs_21 = { - sizeof(struct ProtocolIE_Container_1412P10), - offsetof(struct ProtocolIE_Container_1412P10, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P10 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P10_tags_21, - sizeof(asn_DEF_ProtocolIE_Container_1412P10_tags_21) - /sizeof(asn_DEF_ProtocolIE_Container_1412P10_tags_21[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P10_tags_21, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P10_tags_21) - /sizeof(asn_DEF_ProtocolIE_Container_1412P10_tags_21[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P10_constr_21, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P10_21, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P10_specs_21 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P11_23[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_E2setupRequestIEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P11_tags_23[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P11_specs_23 = { - sizeof(struct ProtocolIE_Container_1412P11), - offsetof(struct ProtocolIE_Container_1412P11, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P11 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P11_tags_23, - sizeof(asn_DEF_ProtocolIE_Container_1412P11_tags_23) - /sizeof(asn_DEF_ProtocolIE_Container_1412P11_tags_23[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P11_tags_23, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P11_tags_23) - /sizeof(asn_DEF_ProtocolIE_Container_1412P11_tags_23[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P11_constr_23, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P11_23, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P11_specs_23 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P12_25[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_E2setupResponseIEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P12_tags_25[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P12_specs_25 = { - sizeof(struct ProtocolIE_Container_1412P12), - offsetof(struct ProtocolIE_Container_1412P12, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P12 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P12_tags_25, - sizeof(asn_DEF_ProtocolIE_Container_1412P12_tags_25) - /sizeof(asn_DEF_ProtocolIE_Container_1412P12_tags_25[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P12_tags_25, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P12_tags_25) - /sizeof(asn_DEF_ProtocolIE_Container_1412P12_tags_25[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P12_constr_25, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P12_25, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P12_specs_25 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P13_27[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_E2setupFailureIEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P13_tags_27[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P13_specs_27 = { - sizeof(struct ProtocolIE_Container_1412P13), - offsetof(struct ProtocolIE_Container_1412P13, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P13 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P13_tags_27, - sizeof(asn_DEF_ProtocolIE_Container_1412P13_tags_27) - /sizeof(asn_DEF_ProtocolIE_Container_1412P13_tags_27[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P13_tags_27, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P13_tags_27) - /sizeof(asn_DEF_ProtocolIE_Container_1412P13_tags_27[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P13_constr_27, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P13_27, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P13_specs_27 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P14_29[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ResetRequestIEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P14_tags_29[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P14_specs_29 = { - sizeof(struct ProtocolIE_Container_1412P14), - offsetof(struct ProtocolIE_Container_1412P14, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P14 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P14_tags_29, - sizeof(asn_DEF_ProtocolIE_Container_1412P14_tags_29) - /sizeof(asn_DEF_ProtocolIE_Container_1412P14_tags_29[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P14_tags_29, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P14_tags_29) - /sizeof(asn_DEF_ProtocolIE_Container_1412P14_tags_29[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P14_constr_29, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P14_29, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P14_specs_29 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P15_31[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ResetResponseIEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P15_tags_31[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P15_specs_31 = { - sizeof(struct ProtocolIE_Container_1412P15), - offsetof(struct ProtocolIE_Container_1412P15, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P15 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P15_tags_31, - sizeof(asn_DEF_ProtocolIE_Container_1412P15_tags_31) - /sizeof(asn_DEF_ProtocolIE_Container_1412P15_tags_31[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P15_tags_31, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P15_tags_31) - /sizeof(asn_DEF_ProtocolIE_Container_1412P15_tags_31[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P15_constr_31, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P15_31, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P15_specs_31 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P16_33[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceUpdate_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P16_tags_33[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P16_specs_33 = { - sizeof(struct ProtocolIE_Container_1412P16), - offsetof(struct ProtocolIE_Container_1412P16, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P16 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P16_tags_33, - sizeof(asn_DEF_ProtocolIE_Container_1412P16_tags_33) - /sizeof(asn_DEF_ProtocolIE_Container_1412P16_tags_33[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P16_tags_33, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P16_tags_33) - /sizeof(asn_DEF_ProtocolIE_Container_1412P16_tags_33[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P16_constr_33, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P16_33, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P16_specs_33 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P17_35[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceUpdateAcknowledge_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P17_tags_35[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P17_specs_35 = { - sizeof(struct ProtocolIE_Container_1412P17), - offsetof(struct ProtocolIE_Container_1412P17, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P17 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P17_tags_35, - sizeof(asn_DEF_ProtocolIE_Container_1412P17_tags_35) - /sizeof(asn_DEF_ProtocolIE_Container_1412P17_tags_35[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P17_tags_35, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P17_tags_35) - /sizeof(asn_DEF_ProtocolIE_Container_1412P17_tags_35[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P17_constr_35, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P17_35, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P17_specs_35 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P18_37[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceUpdateFailure_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P18_tags_37[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P18_specs_37 = { - sizeof(struct ProtocolIE_Container_1412P18), - offsetof(struct ProtocolIE_Container_1412P18, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P18 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P18_tags_37, - sizeof(asn_DEF_ProtocolIE_Container_1412P18_tags_37) - /sizeof(asn_DEF_ProtocolIE_Container_1412P18_tags_37[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P18_tags_37, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P18_tags_37) - /sizeof(asn_DEF_ProtocolIE_Container_1412P18_tags_37[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P18_constr_37, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P18_37, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P18_specs_37 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P19_39[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceQuery_IEs, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1412P19_tags_39[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P19_specs_39 = { - sizeof(struct ProtocolIE_Container_1412P19), - offsetof(struct ProtocolIE_Container_1412P19, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P19 = { - "ProtocolIE-Container", - "ProtocolIE-Container", - &asn_OP_SEQUENCE_OF, - asn_DEF_ProtocolIE_Container_1412P19_tags_39, - sizeof(asn_DEF_ProtocolIE_Container_1412P19_tags_39) - /sizeof(asn_DEF_ProtocolIE_Container_1412P19_tags_39[0]), /* 1 */ - asn_DEF_ProtocolIE_Container_1412P19_tags_39, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_Container_1412P19_tags_39) - /sizeof(asn_DEF_ProtocolIE_Container_1412P19_tags_39[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_Container_1412P19_constr_39, SEQUENCE_OF_constraint }, - asn_MBR_ProtocolIE_Container_1412P19_39, - 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_1412P19_specs_39 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ProtocolIE-Container.h b/Bouncer/asn1c_defs/ProtocolIE-Container.h deleted file mode 100644 index 364495b..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-Container.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_Container_H_ -#define _ProtocolIE_Container_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct RICsubscriptionRequest_IEs; -struct RICsubscriptionResponse_IEs; -struct RICsubscriptionFailure_IEs; -struct RICsubscriptionDeleteRequest_IEs; -struct RICsubscriptionDeleteResponse_IEs; -struct RICsubscriptionDeleteFailure_IEs; -struct RICindication_IEs; -struct RICcontrolRequest_IEs; -struct RICcontrolAcknowledge_IEs; -struct RICcontrolFailure_IEs; -struct ErrorIndication_IEs; -struct E2setupRequestIEs; -struct E2setupResponseIEs; -struct E2setupFailureIEs; -struct ResetRequestIEs; -struct ResetResponseIEs; -struct RICserviceUpdate_IEs; -struct RICserviceUpdateAcknowledge_IEs; -struct RICserviceUpdateFailure_IEs; -struct RICserviceQuery_IEs; - -/* ProtocolIE-Container */ -typedef struct ProtocolIE_Container_1412P0 { - A_SEQUENCE_OF(struct RICsubscriptionRequest_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P0_t; -typedef struct ProtocolIE_Container_1412P1 { - A_SEQUENCE_OF(struct RICsubscriptionResponse_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P1_t; -typedef struct ProtocolIE_Container_1412P2 { - A_SEQUENCE_OF(struct RICsubscriptionFailure_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P2_t; -typedef struct ProtocolIE_Container_1412P3 { - A_SEQUENCE_OF(struct RICsubscriptionDeleteRequest_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P3_t; -typedef struct ProtocolIE_Container_1412P4 { - A_SEQUENCE_OF(struct RICsubscriptionDeleteResponse_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P4_t; -typedef struct ProtocolIE_Container_1412P5 { - A_SEQUENCE_OF(struct RICsubscriptionDeleteFailure_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P5_t; -typedef struct ProtocolIE_Container_1412P6 { - A_SEQUENCE_OF(struct RICindication_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P6_t; -typedef struct ProtocolIE_Container_1412P7 { - A_SEQUENCE_OF(struct RICcontrolRequest_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P7_t; -typedef struct ProtocolIE_Container_1412P8 { - A_SEQUENCE_OF(struct RICcontrolAcknowledge_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P8_t; -typedef struct ProtocolIE_Container_1412P9 { - A_SEQUENCE_OF(struct RICcontrolFailure_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P9_t; -typedef struct ProtocolIE_Container_1412P10 { - A_SEQUENCE_OF(struct ErrorIndication_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P10_t; -typedef struct ProtocolIE_Container_1412P11 { - A_SEQUENCE_OF(struct E2setupRequestIEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P11_t; -typedef struct ProtocolIE_Container_1412P12 { - A_SEQUENCE_OF(struct E2setupResponseIEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P12_t; -typedef struct ProtocolIE_Container_1412P13 { - A_SEQUENCE_OF(struct E2setupFailureIEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P13_t; -typedef struct ProtocolIE_Container_1412P14 { - A_SEQUENCE_OF(struct ResetRequestIEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P14_t; -typedef struct ProtocolIE_Container_1412P15 { - A_SEQUENCE_OF(struct ResetResponseIEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P15_t; -typedef struct ProtocolIE_Container_1412P16 { - A_SEQUENCE_OF(struct RICserviceUpdate_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P16_t; -typedef struct ProtocolIE_Container_1412P17 { - A_SEQUENCE_OF(struct RICserviceUpdateAcknowledge_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P17_t; -typedef struct ProtocolIE_Container_1412P18 { - A_SEQUENCE_OF(struct RICserviceUpdateFailure_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P18_t; -typedef struct ProtocolIE_Container_1412P19 { - A_SEQUENCE_OF(struct RICserviceQuery_IEs) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_1412P19_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P0; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P0_specs_1; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P0_1[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P0_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P1; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P1_specs_3; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P1_3[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P1_constr_3; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P2; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P2_specs_5; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P2_5[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P2_constr_5; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P3; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P3_specs_7; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P3_7[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P3_constr_7; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P4; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P4_specs_9; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P4_9[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P4_constr_9; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P5; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P5_specs_11; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P5_11[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P5_constr_11; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P6; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P6_specs_13; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P6_13[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P6_constr_13; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P7; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P7_specs_15; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P7_15[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P7_constr_15; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P8; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P8_specs_17; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P8_17[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P8_constr_17; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P9; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P9_specs_19; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P9_19[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P9_constr_19; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P10; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P10_specs_21; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P10_21[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P10_constr_21; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P11; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P11_specs_23; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P11_23[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P11_constr_23; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P12; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P12_specs_25; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P12_25[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P12_constr_25; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P13; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P13_specs_27; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P13_27[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P13_constr_27; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P14; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P14_specs_29; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P14_29[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P14_constr_29; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P15; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P15_specs_31; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P15_31[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P15_constr_31; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P16; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P16_specs_33; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P16_33[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P16_constr_33; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P17; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P17_specs_35; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P17_35[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P17_constr_35; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P18; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P18_specs_37; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P18_37[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P18_constr_37; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1412P19; -extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1412P19_specs_39; -extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1412P19_39[1]; -extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1412P19_constr_39; - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_Container_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-ContainerList.c b/Bouncer/asn1c_defs/ProtocolIE-ContainerList.c deleted file mode 100644 index d572233..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ContainerList.c +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-ContainerList.h" - diff --git a/Bouncer/asn1c_defs/ProtocolIE-ContainerList.h b/Bouncer/asn1c_defs/ProtocolIE-ContainerList.h deleted file mode 100644 index e94a09c..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ContainerList.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_ContainerList_H_ -#define _ProtocolIE_ContainerList_H_ - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_ContainerList_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-ContainerPair.c b/Bouncer/asn1c_defs/ProtocolIE-ContainerPair.c deleted file mode 100644 index 49ae4a7..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ContainerPair.c +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-ContainerPair.h" - diff --git a/Bouncer/asn1c_defs/ProtocolIE-ContainerPair.h b/Bouncer/asn1c_defs/ProtocolIE-ContainerPair.h deleted file mode 100644 index 03c2f74..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ContainerPair.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_ContainerPair_H_ -#define _ProtocolIE_ContainerPair_H_ - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_ContainerPair_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.c b/Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.c deleted file mode 100644 index 2923ea5..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.c +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-ContainerPairList.h" - diff --git a/Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.h b/Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.h deleted file mode 100644 index 50ff679..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ContainerPairList.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_ContainerPairList_H_ -#define _ProtocolIE_ContainerPairList_H_ - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_ContainerPairList_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-Field.c b/Bouncer/asn1c_defs/ProtocolIE-Field.c deleted file mode 100644 index caec745..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-Field.c +++ /dev/null @@ -1,7190 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-Field.h" - -static const long asn_VAL_4_id_RICaction_ToBeSetup_Item = 19; -static const long asn_VAL_4_ignore = 1; -static const long asn_VAL_4_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RICaction_ToBeSetup_ItemIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_4_id_RICaction_ToBeSetup_Item }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_ignore }, - { "&Value", aioc__type, &asn_DEF_RICaction_ToBeSetup_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_4_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RICaction_ToBeSetup_ItemIEs_1[] = { - { 1, 4, asn_IOS_RICaction_ToBeSetup_ItemIEs_1_rows } -}; -static const long asn_VAL_9_id_RICaction_Admitted_Item = 14; -static const long asn_VAL_9_ignore = 1; -static const long asn_VAL_9_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RICaction_Admitted_ItemIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_9_id_RICaction_Admitted_Item }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore }, - { "&Value", aioc__type, &asn_DEF_RICaction_Admitted_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_9_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RICaction_Admitted_ItemIEs_1[] = { - { 1, 4, asn_IOS_RICaction_Admitted_ItemIEs_1_rows } -}; -static const long asn_VAL_10_id_RICaction_NotAdmitted_Item = 16; -static const long asn_VAL_10_ignore = 1; -static const long asn_VAL_10_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RICaction_NotAdmitted_ItemIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_10_id_RICaction_NotAdmitted_Item }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_10_ignore }, - { "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_10_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RICaction_NotAdmitted_ItemIEs_1[] = { - { 1, 4, asn_IOS_RICaction_NotAdmitted_ItemIEs_1_rows } -}; -static const long asn_VAL_64_id_RANfunction_Item = 8; -static const long asn_VAL_64_ignore = 1; -static const long asn_VAL_64_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RANfunction_ItemIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_64_id_RANfunction_Item }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_64_ignore }, - { "&Value", aioc__type, &asn_DEF_RANfunction_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_64_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RANfunction_ItemIEs_1[] = { - { 1, 4, asn_IOS_RANfunction_ItemIEs_1_rows } -}; -static const long asn_VAL_65_id_RANfunctionID_Item = 6; -static const long asn_VAL_65_ignore = 1; -static const long asn_VAL_65_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RANfunctionID_ItemIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_65_id_RANfunctionID_Item }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_65_ignore }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_65_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RANfunctionID_ItemIEs_1[] = { - { 1, 4, asn_IOS_RANfunctionID_ItemIEs_1_rows } -}; -static const long asn_VAL_68_id_RANfunctionIEcause_Item = 7; -static const long asn_VAL_68_ignore = 1; -static const long asn_VAL_68_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RANfunctionIDcause_ItemIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_68_id_RANfunctionIEcause_Item }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_68_ignore }, - { "&Value", aioc__type, &asn_DEF_RANfunctionIDcause_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_68_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RANfunctionIDcause_ItemIEs_1[] = { - { 1, 4, asn_IOS_RANfunctionIDcause_ItemIEs_1_rows } -}; -static const long asn_VAL_1_id_RICrequestID = 29; -static const long asn_VAL_1_reject = 0; -static const long asn_VAL_1_mandatory = 2; -static const long asn_VAL_2_id_RANfunctionID = 5; -static const long asn_VAL_2_reject = 0; -static const long asn_VAL_2_mandatory = 2; -static const long asn_VAL_3_id_RICsubscriptionDetails = 30; -static const long asn_VAL_3_reject = 0; -static const long asn_VAL_3_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RICsubscriptionRequest_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_1_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_1_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_2_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_2_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_3_id_RICsubscriptionDetails }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, - { "&Value", aioc__type, &asn_DEF_RICsubscriptionDetails }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_3_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RICsubscriptionRequest_IEs_1[] = { - { 3, 4, asn_IOS_RICsubscriptionRequest_IEs_1_rows } -}; -static const long asn_VAL_5_id_RICrequestID = 29; -static const long asn_VAL_5_reject = 0; -static const long asn_VAL_5_mandatory = 2; -static const long asn_VAL_6_id_RANfunctionID = 5; -static const long asn_VAL_6_reject = 0; -static const long asn_VAL_6_mandatory = 2; -static const long asn_VAL_7_id_RICactions_Admitted = 17; -static const long asn_VAL_7_reject = 0; -static const long asn_VAL_7_mandatory = 2; -static const long asn_VAL_8_id_RICactions_NotAdmitted = 18; -static const long asn_VAL_8_reject = 0; -static const long asn_VAL_8_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICsubscriptionResponse_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_5_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_5_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_6_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_6_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_7_id_RICactions_Admitted }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_reject }, - { "&Value", aioc__type, &asn_DEF_RICaction_Admitted_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_7_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_8_id_RICactions_NotAdmitted }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_reject }, - { "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_8_optional } -}; -static const asn_ioc_set_t asn_IOS_RICsubscriptionResponse_IEs_1[] = { - { 4, 4, asn_IOS_RICsubscriptionResponse_IEs_1_rows } -}; -static const long asn_VAL_11_id_RICrequestID = 29; -static const long asn_VAL_11_reject = 0; -static const long asn_VAL_11_mandatory = 2; -static const long asn_VAL_12_id_RANfunctionID = 5; -static const long asn_VAL_12_reject = 0; -static const long asn_VAL_12_mandatory = 2; -static const long asn_VAL_13_id_RICactions_NotAdmitted = 18; -static const long asn_VAL_13_reject = 0; -static const long asn_VAL_13_mandatory = 2; -static const long asn_VAL_14_id_CriticalityDiagnostics = 2; -static const long asn_VAL_14_ignore = 1; -static const long asn_VAL_14_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICsubscriptionFailure_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_11_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_11_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_11_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_12_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_12_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_12_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_13_id_RICactions_NotAdmitted }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_13_reject }, - { "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_13_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_14_id_CriticalityDiagnostics }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_14_ignore }, - { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_14_optional } -}; -static const asn_ioc_set_t asn_IOS_RICsubscriptionFailure_IEs_1[] = { - { 4, 4, asn_IOS_RICsubscriptionFailure_IEs_1_rows } -}; -static const long asn_VAL_15_id_RICrequestID = 29; -static const long asn_VAL_15_reject = 0; -static const long asn_VAL_15_mandatory = 2; -static const long asn_VAL_16_id_RANfunctionID = 5; -static const long asn_VAL_16_reject = 0; -static const long asn_VAL_16_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteRequest_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_15_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_15_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_15_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_16_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_16_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_16_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteRequest_IEs_1[] = { - { 2, 4, asn_IOS_RICsubscriptionDeleteRequest_IEs_1_rows } -}; -static const long asn_VAL_17_id_RICrequestID = 29; -static const long asn_VAL_17_reject = 0; -static const long asn_VAL_17_mandatory = 2; -static const long asn_VAL_18_id_RANfunctionID = 5; -static const long asn_VAL_18_reject = 0; -static const long asn_VAL_18_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteResponse_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_17_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_17_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_17_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_18_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_18_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_18_mandatory } -}; -static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteResponse_IEs_1[] = { - { 2, 4, asn_IOS_RICsubscriptionDeleteResponse_IEs_1_rows } -}; -static const long asn_VAL_19_id_RICrequestID = 29; -static const long asn_VAL_19_reject = 0; -static const long asn_VAL_19_mandatory = 2; -static const long asn_VAL_20_id_RANfunctionID = 5; -static const long asn_VAL_20_reject = 0; -static const long asn_VAL_20_mandatory = 2; -static const long asn_VAL_21_id_Cause = 1; -static const long asn_VAL_21_ignore = 1; -static const long asn_VAL_21_mandatory = 2; -static const long asn_VAL_22_id_CriticalityDiagnostics = 2; -static const long asn_VAL_22_ignore = 1; -static const long asn_VAL_22_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteFailure_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_19_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_19_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_19_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_20_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_20_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_20_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_21_id_Cause }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_21_ignore }, - { "&Value", aioc__type, &asn_DEF_Cause }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_21_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_22_id_CriticalityDiagnostics }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_22_ignore }, - { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_22_optional } -}; -static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteFailure_IEs_1[] = { - { 4, 4, asn_IOS_RICsubscriptionDeleteFailure_IEs_1_rows } -}; -static const long asn_VAL_23_id_RICrequestID = 29; -static const long asn_VAL_23_reject = 0; -static const long asn_VAL_23_mandatory = 2; -static const long asn_VAL_24_id_RANfunctionID = 5; -static const long asn_VAL_24_reject = 0; -static const long asn_VAL_24_mandatory = 2; -static const long asn_VAL_25_id_RICactionID = 15; -static const long asn_VAL_25_reject = 0; -static const long asn_VAL_25_mandatory = 2; -static const long asn_VAL_26_id_RICindicationSN = 27; -static const long asn_VAL_26_reject = 0; -static const long asn_VAL_26_optional = 0; -static const long asn_VAL_27_id_RICindicationType = 28; -static const long asn_VAL_27_reject = 0; -static const long asn_VAL_27_mandatory = 2; -static const long asn_VAL_28_id_RICindicationHeader = 25; -static const long asn_VAL_28_reject = 0; -static const long asn_VAL_28_mandatory = 2; -static const long asn_VAL_29_id_RICindicationMessage = 26; -static const long asn_VAL_29_reject = 0; -static const long asn_VAL_29_mandatory = 2; -static const long asn_VAL_30_id_RICcallProcessID = 20; -static const long asn_VAL_30_reject = 0; -static const long asn_VAL_30_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICindication_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_23_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_23_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_23_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_24_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_24_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_24_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_25_id_RICactionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_25_reject }, - { "&Value", aioc__type, &asn_DEF_RICactionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_25_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_26_id_RICindicationSN }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_26_reject }, - { "&Value", aioc__type, &asn_DEF_RICindicationSN }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_26_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_27_id_RICindicationType }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_27_reject }, - { "&Value", aioc__type, &asn_DEF_RICindicationType }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_27_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_28_id_RICindicationHeader }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_28_reject }, - { "&Value", aioc__type, &asn_DEF_RICindicationHeader }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_28_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_29_id_RICindicationMessage }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_29_reject }, - { "&Value", aioc__type, &asn_DEF_RICindicationMessage }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_29_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_30_id_RICcallProcessID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_30_reject }, - { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_30_optional } -}; -static const asn_ioc_set_t asn_IOS_RICindication_IEs_1[] = { - { 8, 4, asn_IOS_RICindication_IEs_1_rows } -}; -static const long asn_VAL_31_id_RICrequestID = 29; -static const long asn_VAL_31_reject = 0; -static const long asn_VAL_31_mandatory = 2; -static const long asn_VAL_32_id_RANfunctionID = 5; -static const long asn_VAL_32_reject = 0; -static const long asn_VAL_32_mandatory = 2; -static const long asn_VAL_33_id_RICcallProcessID = 20; -static const long asn_VAL_33_reject = 0; -static const long asn_VAL_33_optional = 0; -static const long asn_VAL_34_id_RICcontrolHeader = 22; -static const long asn_VAL_34_reject = 0; -static const long asn_VAL_34_mandatory = 2; -static const long asn_VAL_35_id_RICcontrolMessage = 23; -static const long asn_VAL_35_reject = 0; -static const long asn_VAL_35_mandatory = 2; -static const long asn_VAL_36_id_RICcontrolAckRequest = 21; -static const long asn_VAL_36_reject = 0; -static const long asn_VAL_36_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICcontrolRequest_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_31_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_31_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_31_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_32_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_32_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_32_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_33_id_RICcallProcessID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_33_reject }, - { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_33_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_34_id_RICcontrolHeader }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_34_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolHeader }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_34_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_35_id_RICcontrolMessage }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_35_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolMessage }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_35_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_36_id_RICcontrolAckRequest }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_36_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolAckRequest }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_36_optional } -}; -static const asn_ioc_set_t asn_IOS_RICcontrolRequest_IEs_1[] = { - { 6, 4, asn_IOS_RICcontrolRequest_IEs_1_rows } -}; -static const long asn_VAL_37_id_RICrequestID = 29; -static const long asn_VAL_37_reject = 0; -static const long asn_VAL_37_mandatory = 2; -static const long asn_VAL_38_id_RANfunctionID = 5; -static const long asn_VAL_38_reject = 0; -static const long asn_VAL_38_mandatory = 2; -static const long asn_VAL_39_id_RICcallProcessID = 20; -static const long asn_VAL_39_reject = 0; -static const long asn_VAL_39_optional = 0; -static const long asn_VAL_40_id_RICcontrolStatus = 24; -static const long asn_VAL_40_reject = 0; -static const long asn_VAL_40_mandatory = 2; -static const long asn_VAL_41_id_RICcontrolOutcome = 32; -static const long asn_VAL_41_reject = 0; -static const long asn_VAL_41_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICcontrolAcknowledge_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_37_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_37_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_37_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_38_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_38_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_38_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_39_id_RICcallProcessID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_39_reject }, - { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_39_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_40_id_RICcontrolStatus }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_40_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolStatus }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_40_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_41_id_RICcontrolOutcome }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_41_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolOutcome }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_41_optional } -}; -static const asn_ioc_set_t asn_IOS_RICcontrolAcknowledge_IEs_1[] = { - { 5, 4, asn_IOS_RICcontrolAcknowledge_IEs_1_rows } -}; -static const long asn_VAL_42_id_RICrequestID = 29; -static const long asn_VAL_42_reject = 0; -static const long asn_VAL_42_mandatory = 2; -static const long asn_VAL_43_id_RANfunctionID = 5; -static const long asn_VAL_43_reject = 0; -static const long asn_VAL_43_mandatory = 2; -static const long asn_VAL_44_id_RICcallProcessID = 20; -static const long asn_VAL_44_reject = 0; -static const long asn_VAL_44_optional = 0; -static const long asn_VAL_45_id_Cause = 1; -static const long asn_VAL_45_ignore = 1; -static const long asn_VAL_45_mandatory = 2; -static const long asn_VAL_46_id_RICcontrolOutcome = 32; -static const long asn_VAL_46_reject = 0; -static const long asn_VAL_46_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICcontrolFailure_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_42_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_42_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_42_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_43_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_43_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_43_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_44_id_RICcallProcessID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_44_reject }, - { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_44_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_45_id_Cause }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_45_ignore }, - { "&Value", aioc__type, &asn_DEF_Cause }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_45_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_46_id_RICcontrolOutcome }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_46_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolOutcome }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_46_optional } -}; -static const asn_ioc_set_t asn_IOS_RICcontrolFailure_IEs_1[] = { - { 5, 4, asn_IOS_RICcontrolFailure_IEs_1_rows } -}; -static const long asn_VAL_47_id_RICrequestID = 29; -static const long asn_VAL_47_reject = 0; -static const long asn_VAL_47_optional = 0; -static const long asn_VAL_48_id_RANfunctionID = 5; -static const long asn_VAL_48_reject = 0; -static const long asn_VAL_48_optional = 0; -static const long asn_VAL_49_id_Cause = 1; -static const long asn_VAL_49_ignore = 1; -static const long asn_VAL_49_optional = 0; -static const long asn_VAL_50_id_CriticalityDiagnostics = 2; -static const long asn_VAL_50_ignore = 1; -static const long asn_VAL_50_optional = 0; -static const asn_ioc_cell_t asn_IOS_ErrorIndication_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_47_id_RICrequestID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_47_reject }, - { "&Value", aioc__type, &asn_DEF_RICrequestID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_47_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_48_id_RANfunctionID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_48_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_48_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_49_id_Cause }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_49_ignore }, - { "&Value", aioc__type, &asn_DEF_Cause }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_49_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_50_id_CriticalityDiagnostics }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_50_ignore }, - { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_50_optional } -}; -static const asn_ioc_set_t asn_IOS_ErrorIndication_IEs_1[] = { - { 4, 4, asn_IOS_ErrorIndication_IEs_1_rows } -}; -static const long asn_VAL_51_id_GlobalE2node_ID = 3; -static const long asn_VAL_51_reject = 0; -static const long asn_VAL_51_mandatory = 2; -static const long asn_VAL_52_id_RANfunctionsAdded = 10; -static const long asn_VAL_52_reject = 0; -static const long asn_VAL_52_optional = 0; -static const asn_ioc_cell_t asn_IOS_E2setupRequestIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_51_id_GlobalE2node_ID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_51_reject }, - { "&Value", aioc__type, &asn_DEF_GlobalE2node_ID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_51_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_52_id_RANfunctionsAdded }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_52_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctions_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_52_optional } -}; -static const asn_ioc_set_t asn_IOS_E2setupRequestIEs_1[] = { - { 2, 4, asn_IOS_E2setupRequestIEs_1_rows } -}; -static const long asn_VAL_53_id_GlobalRIC_ID = 4; -static const long asn_VAL_53_reject = 0; -static const long asn_VAL_53_mandatory = 2; -static const long asn_VAL_54_id_RANfunctionsAccepted = 9; -static const long asn_VAL_54_reject = 0; -static const long asn_VAL_54_optional = 0; -static const long asn_VAL_55_id_RANfunctionsRejected = 13; -static const long asn_VAL_55_reject = 0; -static const long asn_VAL_55_optional = 0; -static const asn_ioc_cell_t asn_IOS_E2setupResponseIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_53_id_GlobalRIC_ID }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_53_reject }, - { "&Value", aioc__type, &asn_DEF_GlobalRIC_ID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_53_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_54_id_RANfunctionsAccepted }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_54_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_54_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_55_id_RANfunctionsRejected }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_55_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_55_optional } -}; -static const asn_ioc_set_t asn_IOS_E2setupResponseIEs_1[] = { - { 3, 4, asn_IOS_E2setupResponseIEs_1_rows } -}; -static const long asn_VAL_56_id_Cause = 1; -static const long asn_VAL_56_ignore = 1; -static const long asn_VAL_56_mandatory = 2; -static const long asn_VAL_57_id_TimeToWait = 31; -static const long asn_VAL_57_ignore = 1; -static const long asn_VAL_57_optional = 0; -static const long asn_VAL_58_id_CriticalityDiagnostics = 2; -static const long asn_VAL_58_ignore = 1; -static const long asn_VAL_58_optional = 0; -static const asn_ioc_cell_t asn_IOS_E2setupFailureIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_56_id_Cause }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_56_ignore }, - { "&Value", aioc__type, &asn_DEF_Cause }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_56_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_57_id_TimeToWait }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_57_ignore }, - { "&Value", aioc__type, &asn_DEF_TimeToWait }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_57_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_58_id_CriticalityDiagnostics }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_58_ignore }, - { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_58_optional } -}; -static const asn_ioc_set_t asn_IOS_E2setupFailureIEs_1[] = { - { 3, 4, asn_IOS_E2setupFailureIEs_1_rows } -}; -static const long asn_VAL_59_id_Cause = 1; -static const long asn_VAL_59_ignore = 1; -static const long asn_VAL_59_mandatory = 2; -static const asn_ioc_cell_t asn_IOS_ResetRequestIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_59_id_Cause }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_59_ignore }, - { "&Value", aioc__type, &asn_DEF_Cause }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_59_mandatory } -}; -static const asn_ioc_set_t asn_IOS_ResetRequestIEs_1[] = { - { 1, 4, asn_IOS_ResetRequestIEs_1_rows } -}; -static const long asn_VAL_60_id_CriticalityDiagnostics = 2; -static const long asn_VAL_60_ignore = 1; -static const long asn_VAL_60_optional = 0; -static const asn_ioc_cell_t asn_IOS_ResetResponseIEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_60_id_CriticalityDiagnostics }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_60_ignore }, - { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_60_optional } -}; -static const asn_ioc_set_t asn_IOS_ResetResponseIEs_1[] = { - { 1, 4, asn_IOS_ResetResponseIEs_1_rows } -}; -static const long asn_VAL_61_id_RANfunctionsAdded = 10; -static const long asn_VAL_61_reject = 0; -static const long asn_VAL_61_optional = 0; -static const long asn_VAL_62_id_RANfunctionsModified = 12; -static const long asn_VAL_62_reject = 0; -static const long asn_VAL_62_optional = 0; -static const long asn_VAL_63_id_RANfunctionsDeleted = 11; -static const long asn_VAL_63_reject = 0; -static const long asn_VAL_63_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICserviceUpdate_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_61_id_RANfunctionsAdded }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_61_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctions_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_61_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_62_id_RANfunctionsModified }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_62_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctions_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_62_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_63_id_RANfunctionsDeleted }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_63_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_63_optional } -}; -static const asn_ioc_set_t asn_IOS_RICserviceUpdate_IEs_1[] = { - { 3, 4, asn_IOS_RICserviceUpdate_IEs_1_rows } -}; -static const long asn_VAL_66_id_RANfunctionsAccepted = 9; -static const long asn_VAL_66_reject = 0; -static const long asn_VAL_66_optional = 0; -static const long asn_VAL_67_id_RANfunctionsRejected = 13; -static const long asn_VAL_67_reject = 0; -static const long asn_VAL_67_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICserviceUpdateAcknowledge_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_66_id_RANfunctionsAccepted }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_66_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_66_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_67_id_RANfunctionsRejected }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_67_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_67_optional } -}; -static const asn_ioc_set_t asn_IOS_RICserviceUpdateAcknowledge_IEs_1[] = { - { 2, 4, asn_IOS_RICserviceUpdateAcknowledge_IEs_1_rows } -}; -static const long asn_VAL_69_id_RANfunctionsRejected = 13; -static const long asn_VAL_69_ignore = 1; -static const long asn_VAL_69_optional = 0; -static const long asn_VAL_70_id_TimeToWait = 31; -static const long asn_VAL_70_ignore = 1; -static const long asn_VAL_70_optional = 0; -static const long asn_VAL_71_id_CriticalityDiagnostics = 2; -static const long asn_VAL_71_ignore = 1; -static const long asn_VAL_71_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICserviceUpdateFailure_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_69_id_RANfunctionsRejected }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_69_ignore }, - { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_69_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_70_id_TimeToWait }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_70_ignore }, - { "&Value", aioc__type, &asn_DEF_TimeToWait }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_70_optional }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_71_id_CriticalityDiagnostics }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_71_ignore }, - { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_71_optional } -}; -static const asn_ioc_set_t asn_IOS_RICserviceUpdateFailure_IEs_1[] = { - { 3, 4, asn_IOS_RICserviceUpdateFailure_IEs_1_rows } -}; -static const long asn_VAL_72_id_RANfunctionsAccepted = 9; -static const long asn_VAL_72_reject = 0; -static const long asn_VAL_72_optional = 0; -static const asn_ioc_cell_t asn_IOS_RICserviceQuery_IEs_1_rows[] = { - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_72_id_RANfunctionsAccepted }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_72_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_72_optional } -}; -static const asn_ioc_set_t asn_IOS_RICserviceQuery_IEs_1[] = { - { 1, 4, asn_IOS_RICserviceQuery_IEs_1_rows } -}; -static int -memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICaction_ToBeSetup_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICaction_ToBeSetup_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_ToBeSetup_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICaction_ToBeSetup_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICaction_ToBeSetup_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_ToBeSetup_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICaction_Admitted_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICaction_Admitted_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_Admitted_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICaction_Admitted_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICaction_Admitted_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_Admitted_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICaction_NotAdmitted_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICaction_NotAdmitted_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_NotAdmitted_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICaction_NotAdmitted_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICaction_NotAdmitted_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_NotAdmitted_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RANfunction_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RANfunction_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunction_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RANfunction_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RANfunction_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunction_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RANfunctionID_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RANfunctionID_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionID_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RANfunctionID_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RANfunctionID_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionID_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RANfunctionIDcause_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RANfunctionIDcause_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionIDcause_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RANfunctionIDcause_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RANfunctionIDcause_ItemIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionIDcause_ItemIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICsubscriptionRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionRequest_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionRequest_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICsubscriptionRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionRequest_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionRequest_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICsubscriptionResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionResponse_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionResponse_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICsubscriptionResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionResponse_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionResponse_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICsubscriptionFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICsubscriptionFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICsubscriptionDeleteRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequest_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequest_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICsubscriptionDeleteRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequest_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequest_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICsubscriptionDeleteResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteResponse_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteResponse_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICsubscriptionDeleteResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteResponse_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteResponse_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICsubscriptionDeleteFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICsubscriptionDeleteFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICindication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICindication_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICindication_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICindication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICindication_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICindication_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICcontrolRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICcontrolRequest_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolRequest_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICcontrolRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICcontrolRequest_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolRequest_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICcontrolAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICcontrolAcknowledge_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolAcknowledge_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICcontrolAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICcontrolAcknowledge_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolAcknowledge_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICcontrolFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICcontrolFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICcontrolFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICcontrolFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_ErrorIndication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_ErrorIndication_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ErrorIndication_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_ErrorIndication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_ErrorIndication_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ErrorIndication_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_E2setupRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2setupRequestIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupRequestIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_E2setupRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2setupRequestIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupRequestIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_E2setupResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2setupResponseIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupResponseIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_E2setupResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2setupResponseIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupResponseIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_E2setupFailureIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2setupFailureIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupFailureIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_E2setupFailureIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2setupFailureIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupFailureIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_ResetRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_ResetRequestIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetRequestIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_ResetRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_ResetRequestIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetRequestIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_ResetResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_ResetResponseIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetResponseIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_ResetResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_ResetResponseIEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetResponseIEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICserviceUpdate_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdate_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdate_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICserviceUpdate_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdate_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdate_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICserviceUpdateAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateAcknowledge_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateAcknowledge_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICserviceUpdateAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateAcknowledge_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateAcknowledge_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICserviceUpdateFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICserviceUpdateFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateFailure_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateFailure_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static int -memb_id_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_RICserviceQuery_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceQuery_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 1; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceQuery_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_RICserviceQuery_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_RICserviceQuery_IEs_1; - size_t constraining_column = 0; /* &id */ - size_t for_column = 2; /* &Value */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceQuery_IEs, id)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_6 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_7 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_8 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_10 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_11 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_12 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_14 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_15 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_16 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_18 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_19 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_20 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_22 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_23 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_24 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_26 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_27 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_28 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_30 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_31 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_32 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_34 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_35 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_36 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_38 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_39 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_40 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_42 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_43 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_44 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_46 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_47 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_48 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_50 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_51 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_52 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_54 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_55 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_56 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_58 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_59 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_60 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_62 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_63 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_64 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_66 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_67 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_68 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_70 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_71 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_72 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_74 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_75 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_76 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_78 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_79 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_80 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_82 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_83 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_84 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_86 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_87 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_88 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_90 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_91 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_92 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_94 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_95 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_96 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_98 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_99 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_100 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_id_constr_102 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_103 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_104 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_value_4[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs__value, choice.RICaction_ToBeSetup_Item), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICaction_ToBeSetup_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICaction-ToBeSetup-Item" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-ToBeSetup-Item */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { - sizeof(struct RICaction_ToBeSetup_ItemIEs__value), - offsetof(struct RICaction_ToBeSetup_ItemIEs__value, _asn_ctx), - offsetof(struct RICaction_ToBeSetup_ItemIEs__value, present), - sizeof(((struct RICaction_ToBeSetup_ItemIEs__value *)0)->present), - asn_MAP_value_tag2el_4, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_4 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_4, - 1, /* Elements count */ - &asn_SPC_value_specs_4 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_ItemIEs_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_2, memb_id_constraint_1 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICaction_ToBeSetup_ItemIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_4, - select_RICaction_ToBeSetup_ItemIEs_value_type, - { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 = { - sizeof(struct RICaction_ToBeSetup_ItemIEs), - offsetof(struct RICaction_ToBeSetup_ItemIEs, _asn_ctx), - asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_ItemIEs = { - "RICaction-ToBeSetup-ItemIEs", - "RICaction-ToBeSetup-ItemIEs", - &asn_OP_SEQUENCE, - asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1, - sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1) - /sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[0]), /* 1 */ - asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1, /* Same as above */ - sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1) - /sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_ToBeSetup_ItemIEs_1, - 3, /* Elements count */ - &asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_8[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs__value, choice.RICaction_Admitted_Item), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICaction_Admitted_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICaction-Admitted-Item" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_8[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-Admitted-Item */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_8 = { - sizeof(struct RICaction_Admitted_ItemIEs__value), - offsetof(struct RICaction_Admitted_ItemIEs__value, _asn_ctx), - offsetof(struct RICaction_Admitted_ItemIEs__value, present), - sizeof(((struct RICaction_Admitted_ItemIEs__value *)0)->present), - asn_MAP_value_tag2el_8, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_8 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_8, - 1, /* Elements count */ - &asn_SPC_value_specs_8 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICaction_Admitted_ItemIEs_5[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_6, memb_id_constraint_5 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICaction_Admitted_ItemIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_7, memb_criticality_constraint_5 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_8, - select_RICaction_Admitted_ItemIEs_value_type, - { 0, &asn_PER_memb_value_constr_8, memb_value_constraint_5 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_ItemIEs_tags_5[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_ItemIEs_specs_5 = { - sizeof(struct RICaction_Admitted_ItemIEs), - offsetof(struct RICaction_Admitted_ItemIEs, _asn_ctx), - asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_ItemIEs = { - "RICaction-Admitted-ItemIEs", - "RICaction-Admitted-ItemIEs", - &asn_OP_SEQUENCE, - asn_DEF_RICaction_Admitted_ItemIEs_tags_5, - sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5) - /sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5[0]), /* 1 */ - asn_DEF_RICaction_Admitted_ItemIEs_tags_5, /* Same as above */ - sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5) - /sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_Admitted_ItemIEs_5, - 3, /* Elements count */ - &asn_SPC_RICaction_Admitted_ItemIEs_specs_5 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_12[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs__value, choice.RICaction_NotAdmitted_Item), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICaction_NotAdmitted_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICaction-NotAdmitted-Item" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_12[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-NotAdmitted-Item */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_12 = { - sizeof(struct RICaction_NotAdmitted_ItemIEs__value), - offsetof(struct RICaction_NotAdmitted_ItemIEs__value, _asn_ctx), - offsetof(struct RICaction_NotAdmitted_ItemIEs__value, present), - sizeof(((struct RICaction_NotAdmitted_ItemIEs__value *)0)->present), - asn_MAP_value_tag2el_12, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_12 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_12, - 1, /* Elements count */ - &asn_SPC_value_specs_12 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_ItemIEs_9[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_10, memb_id_constraint_9 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICaction_NotAdmitted_ItemIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_11, memb_criticality_constraint_9 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_12, - select_RICaction_NotAdmitted_ItemIEs_value_type, - { 0, &asn_PER_memb_value_constr_12, memb_value_constraint_9 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 = { - sizeof(struct RICaction_NotAdmitted_ItemIEs), - offsetof(struct RICaction_NotAdmitted_ItemIEs, _asn_ctx), - asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_ItemIEs = { - "RICaction-NotAdmitted-ItemIEs", - "RICaction-NotAdmitted-ItemIEs", - &asn_OP_SEQUENCE, - asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9, - sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9) - /sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[0]), /* 1 */ - asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9, /* Same as above */ - sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9) - /sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_NotAdmitted_ItemIEs_9, - 3, /* Elements count */ - &asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_16[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs__value, choice.RANfunction_Item), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunction_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunction-Item" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_16[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunction-Item */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_16 = { - sizeof(struct RANfunction_ItemIEs__value), - offsetof(struct RANfunction_ItemIEs__value, _asn_ctx), - offsetof(struct RANfunction_ItemIEs__value, present), - sizeof(((struct RANfunction_ItemIEs__value *)0)->present), - asn_MAP_value_tag2el_16, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_16 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_16, - 1, /* Elements count */ - &asn_SPC_value_specs_16 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_13[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_14, memb_id_constraint_13 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RANfunction_ItemIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_15, memb_criticality_constraint_13 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_16, - select_RANfunction_ItemIEs_value_type, - { 0, &asn_PER_memb_value_constr_16, memb_value_constraint_13 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunction_ItemIEs_tags_13[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RANfunction_ItemIEs_tag2el_13[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RANfunction_ItemIEs_specs_13 = { - sizeof(struct RANfunction_ItemIEs), - offsetof(struct RANfunction_ItemIEs, _asn_ctx), - asn_MAP_RANfunction_ItemIEs_tag2el_13, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunction_ItemIEs = { - "RANfunction-ItemIEs", - "RANfunction-ItemIEs", - &asn_OP_SEQUENCE, - asn_DEF_RANfunction_ItemIEs_tags_13, - sizeof(asn_DEF_RANfunction_ItemIEs_tags_13) - /sizeof(asn_DEF_RANfunction_ItemIEs_tags_13[0]), /* 1 */ - asn_DEF_RANfunction_ItemIEs_tags_13, /* Same as above */ - sizeof(asn_DEF_RANfunction_ItemIEs_tags_13) - /sizeof(asn_DEF_RANfunction_ItemIEs_tags_13[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunction_ItemIEs_13, - 3, /* Elements count */ - &asn_SPC_RANfunction_ItemIEs_specs_13 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_20[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs__value, choice.RANfunctionID_Item), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionID_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID-Item" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_20[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionID-Item */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_20 = { - sizeof(struct RANfunctionID_ItemIEs__value), - offsetof(struct RANfunctionID_ItemIEs__value, _asn_ctx), - offsetof(struct RANfunctionID_ItemIEs__value, present), - sizeof(((struct RANfunctionID_ItemIEs__value *)0)->present), - asn_MAP_value_tag2el_20, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_20 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_20, - 1, /* Elements count */ - &asn_SPC_value_specs_20 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_17[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_18, memb_id_constraint_17 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RANfunctionID_ItemIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_19, memb_criticality_constraint_17 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_20, - select_RANfunctionID_ItemIEs_value_type, - { 0, &asn_PER_memb_value_constr_20, memb_value_constraint_17 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionID_ItemIEs_tags_17[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RANfunctionID_ItemIEs_tag2el_17[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_ItemIEs_specs_17 = { - sizeof(struct RANfunctionID_ItemIEs), - offsetof(struct RANfunctionID_ItemIEs, _asn_ctx), - asn_MAP_RANfunctionID_ItemIEs_tag2el_17, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionID_ItemIEs = { - "RANfunctionID-ItemIEs", - "RANfunctionID-ItemIEs", - &asn_OP_SEQUENCE, - asn_DEF_RANfunctionID_ItemIEs_tags_17, - sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17) - /sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17[0]), /* 1 */ - asn_DEF_RANfunctionID_ItemIEs_tags_17, /* Same as above */ - sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17) - /sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunctionID_ItemIEs_17, - 3, /* Elements count */ - &asn_SPC_RANfunctionID_ItemIEs_specs_17 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_24[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs__value, choice.RANfunctionIDcause_Item), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionIDcause_Item, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionIDcause-Item" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_24[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionIDcause-Item */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_24 = { - sizeof(struct RANfunctionIDcause_ItemIEs__value), - offsetof(struct RANfunctionIDcause_ItemIEs__value, _asn_ctx), - offsetof(struct RANfunctionIDcause_ItemIEs__value, present), - sizeof(((struct RANfunctionIDcause_ItemIEs__value *)0)->present), - asn_MAP_value_tag2el_24, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_24 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_24, - 1, /* Elements count */ - &asn_SPC_value_specs_24 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_21[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_22, memb_id_constraint_21 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RANfunctionIDcause_ItemIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_23, memb_criticality_constraint_21 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_24, - select_RANfunctionIDcause_ItemIEs_value_type, - { 0, &asn_PER_memb_value_constr_24, memb_value_constraint_21 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 = { - sizeof(struct RANfunctionIDcause_ItemIEs), - offsetof(struct RANfunctionIDcause_ItemIEs, _asn_ctx), - asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_ItemIEs = { - "RANfunctionIDcause-ItemIEs", - "RANfunctionIDcause-ItemIEs", - &asn_OP_SEQUENCE, - asn_DEF_RANfunctionIDcause_ItemIEs_tags_21, - sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21) - /sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[0]), /* 1 */ - asn_DEF_RANfunctionIDcause_ItemIEs_tags_21, /* Same as above */ - sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21) - /sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunctionIDcause_ItemIEs_21, - 3, /* Elements count */ - &asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_28[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICsubscriptionDetails), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionDetails, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICsubscriptionDetails" - }, -}; -static const unsigned asn_MAP_value_to_canonical_28[] = { 1, 0, 2 }; -static const unsigned asn_MAP_value_from_canonical_28[] = { 1, 0, 2 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_28[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* RICsubscriptionDetails */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_28 = { - sizeof(struct RICsubscriptionRequest_IEs__value), - offsetof(struct RICsubscriptionRequest_IEs__value, _asn_ctx), - offsetof(struct RICsubscriptionRequest_IEs__value, present), - sizeof(((struct RICsubscriptionRequest_IEs__value *)0)->present), - asn_MAP_value_tag2el_28, - 3, /* Count of tags in the map */ - asn_MAP_value_to_canonical_28, - asn_MAP_value_from_canonical_28, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_28 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_28, - 3, /* Elements count */ - &asn_SPC_value_specs_28 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_25[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_26, memb_id_constraint_25 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICsubscriptionRequest_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_27, memb_criticality_constraint_25 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_28, - select_RICsubscriptionRequest_IEs_value_type, - { 0, &asn_PER_memb_value_constr_28, memb_value_constraint_25 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_IEs_tags_25[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionRequest_IEs_tag2el_25[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_IEs_specs_25 = { - sizeof(struct RICsubscriptionRequest_IEs), - offsetof(struct RICsubscriptionRequest_IEs, _asn_ctx), - asn_MAP_RICsubscriptionRequest_IEs_tag2el_25, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest_IEs = { - "RICsubscriptionRequest-IEs", - "RICsubscriptionRequest-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionRequest_IEs_tags_25, - sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25) - /sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25[0]), /* 1 */ - asn_DEF_RICsubscriptionRequest_IEs_tags_25, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25) - /sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionRequest_IEs_25, - 3, /* Elements count */ - &asn_SPC_RICsubscriptionRequest_IEs_specs_25 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_32[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICaction_Admitted_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICaction_Admitted_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICaction-Admitted-List" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICaction_NotAdmitted_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICaction_NotAdmitted_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICaction-NotAdmitted-List" - }, -}; -static const unsigned asn_MAP_value_to_canonical_32[] = { 1, 0, 2, 3 }; -static const unsigned asn_MAP_value_from_canonical_32[] = { 1, 0, 2, 3 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_32[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* RICrequestID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* RICaction-Admitted-List */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* RICaction-NotAdmitted-List */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_32 = { - sizeof(struct RICsubscriptionResponse_IEs__value), - offsetof(struct RICsubscriptionResponse_IEs__value, _asn_ctx), - offsetof(struct RICsubscriptionResponse_IEs__value, present), - sizeof(((struct RICsubscriptionResponse_IEs__value *)0)->present), - asn_MAP_value_tag2el_32, - 4, /* Count of tags in the map */ - asn_MAP_value_to_canonical_32, - asn_MAP_value_from_canonical_32, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_32 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_32, - 4, /* Elements count */ - &asn_SPC_value_specs_32 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_29[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_30, memb_id_constraint_29 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICsubscriptionResponse_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_31, memb_criticality_constraint_29 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_32, - select_RICsubscriptionResponse_IEs_value_type, - { 0, &asn_PER_memb_value_constr_32, memb_value_constraint_29 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_IEs_tags_29[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_IEs_tag2el_29[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_IEs_specs_29 = { - sizeof(struct RICsubscriptionResponse_IEs), - offsetof(struct RICsubscriptionResponse_IEs, _asn_ctx), - asn_MAP_RICsubscriptionResponse_IEs_tag2el_29, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse_IEs = { - "RICsubscriptionResponse-IEs", - "RICsubscriptionResponse-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionResponse_IEs_tags_29, - sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29) - /sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29[0]), /* 1 */ - asn_DEF_RICsubscriptionResponse_IEs_tags_29, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29) - /sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionResponse_IEs_29, - 3, /* Elements count */ - &asn_SPC_RICsubscriptionResponse_IEs_specs_29 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_36[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICaction_NotAdmitted_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICaction_NotAdmitted_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICaction-NotAdmitted-List" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.CriticalityDiagnostics), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_CriticalityDiagnostics, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "CriticalityDiagnostics" - }, -}; -static const unsigned asn_MAP_value_to_canonical_36[] = { 1, 0, 2, 3 }; -static const unsigned asn_MAP_value_from_canonical_36[] = { 1, 0, 2, 3 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_36[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* RICrequestID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* RICaction-NotAdmitted-List */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* CriticalityDiagnostics */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_36 = { - sizeof(struct RICsubscriptionFailure_IEs__value), - offsetof(struct RICsubscriptionFailure_IEs__value, _asn_ctx), - offsetof(struct RICsubscriptionFailure_IEs__value, present), - sizeof(((struct RICsubscriptionFailure_IEs__value *)0)->present), - asn_MAP_value_tag2el_36, - 4, /* Count of tags in the map */ - asn_MAP_value_to_canonical_36, - asn_MAP_value_from_canonical_36, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_36 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_36, - 4, /* Elements count */ - &asn_SPC_value_specs_36 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_33[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_34, memb_id_constraint_33 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICsubscriptionFailure_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_35, memb_criticality_constraint_33 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_36, - select_RICsubscriptionFailure_IEs_value_type, - { 0, &asn_PER_memb_value_constr_36, memb_value_constraint_33 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_IEs_tags_33[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionFailure_IEs_tag2el_33[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_IEs_specs_33 = { - sizeof(struct RICsubscriptionFailure_IEs), - offsetof(struct RICsubscriptionFailure_IEs, _asn_ctx), - asn_MAP_RICsubscriptionFailure_IEs_tag2el_33, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure_IEs = { - "RICsubscriptionFailure-IEs", - "RICsubscriptionFailure-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionFailure_IEs_tags_33, - sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33) - /sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33[0]), /* 1 */ - asn_DEF_RICsubscriptionFailure_IEs_tags_33, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33) - /sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionFailure_IEs_33, - 3, /* Elements count */ - &asn_SPC_RICsubscriptionFailure_IEs_specs_33 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_40[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, -}; -static const unsigned asn_MAP_value_to_canonical_40[] = { 1, 0 }; -static const unsigned asn_MAP_value_from_canonical_40[] = { 1, 0 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_40[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_40 = { - sizeof(struct RICsubscriptionDeleteRequest_IEs__value), - offsetof(struct RICsubscriptionDeleteRequest_IEs__value, _asn_ctx), - offsetof(struct RICsubscriptionDeleteRequest_IEs__value, present), - sizeof(((struct RICsubscriptionDeleteRequest_IEs__value *)0)->present), - asn_MAP_value_tag2el_40, - 2, /* Count of tags in the map */ - asn_MAP_value_to_canonical_40, - asn_MAP_value_from_canonical_40, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_40 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_40, - 2, /* Elements count */ - &asn_SPC_value_specs_40 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_37[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_38, memb_id_constraint_37 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICsubscriptionDeleteRequest_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_39, memb_criticality_constraint_37 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_40, - select_RICsubscriptionDeleteRequest_IEs_value_type, - { 0, &asn_PER_memb_value_constr_40, memb_value_constraint_37 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_IEs_tag2el_37[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37 = { - sizeof(struct RICsubscriptionDeleteRequest_IEs), - offsetof(struct RICsubscriptionDeleteRequest_IEs, _asn_ctx), - asn_MAP_RICsubscriptionDeleteRequest_IEs_tag2el_37, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest_IEs = { - "RICsubscriptionDeleteRequest-IEs", - "RICsubscriptionDeleteRequest-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37, - sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37) - /sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[0]), /* 1 */ - asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37) - /sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionDeleteRequest_IEs_37, - 3, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_44[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, -}; -static const unsigned asn_MAP_value_to_canonical_44[] = { 1, 0 }; -static const unsigned asn_MAP_value_from_canonical_44[] = { 1, 0 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_44[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_44 = { - sizeof(struct RICsubscriptionDeleteResponse_IEs__value), - offsetof(struct RICsubscriptionDeleteResponse_IEs__value, _asn_ctx), - offsetof(struct RICsubscriptionDeleteResponse_IEs__value, present), - sizeof(((struct RICsubscriptionDeleteResponse_IEs__value *)0)->present), - asn_MAP_value_tag2el_44, - 2, /* Count of tags in the map */ - asn_MAP_value_to_canonical_44, - asn_MAP_value_from_canonical_44, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_44 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_44, - 2, /* Elements count */ - &asn_SPC_value_specs_44 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_41[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_42, memb_id_constraint_41 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICsubscriptionDeleteResponse_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_43, memb_criticality_constraint_41 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_44, - select_RICsubscriptionDeleteResponse_IEs_value_type, - { 0, &asn_PER_memb_value_constr_44, memb_value_constraint_41 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteResponse_IEs_tag2el_41[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41 = { - sizeof(struct RICsubscriptionDeleteResponse_IEs), - offsetof(struct RICsubscriptionDeleteResponse_IEs, _asn_ctx), - asn_MAP_RICsubscriptionDeleteResponse_IEs_tag2el_41, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse_IEs = { - "RICsubscriptionDeleteResponse-IEs", - "RICsubscriptionDeleteResponse-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41, - sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41) - /sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[0]), /* 1 */ - asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41) - /sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionDeleteResponse_IEs_41, - 3, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_48[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.Cause), - -1 /* Ambiguous tag (CHOICE?) */, - 0, - &asn_DEF_Cause, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "Cause" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.CriticalityDiagnostics), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_CriticalityDiagnostics, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "CriticalityDiagnostics" - }, -}; -static const unsigned asn_MAP_value_to_canonical_48[] = { 1, 0, 3, 2 }; -static const unsigned asn_MAP_value_from_canonical_48[] = { 1, 0, 3, 2 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_48[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* CriticalityDiagnostics */ - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* ricRequest */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* ricService */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_48 = { - sizeof(struct RICsubscriptionDeleteFailure_IEs__value), - offsetof(struct RICsubscriptionDeleteFailure_IEs__value, _asn_ctx), - offsetof(struct RICsubscriptionDeleteFailure_IEs__value, present), - sizeof(((struct RICsubscriptionDeleteFailure_IEs__value *)0)->present), - asn_MAP_value_tag2el_48, - 8, /* Count of tags in the map */ - asn_MAP_value_to_canonical_48, - asn_MAP_value_from_canonical_48, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_48 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_48, - 4, /* Elements count */ - &asn_SPC_value_specs_48 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_45[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_46, memb_id_constraint_45 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICsubscriptionDeleteFailure_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_47, memb_criticality_constraint_45 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_48, - select_RICsubscriptionDeleteFailure_IEs_value_type, - { 0, &asn_PER_memb_value_constr_48, memb_value_constraint_45 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteFailure_IEs_tag2el_45[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45 = { - sizeof(struct RICsubscriptionDeleteFailure_IEs), - offsetof(struct RICsubscriptionDeleteFailure_IEs, _asn_ctx), - asn_MAP_RICsubscriptionDeleteFailure_IEs_tag2el_45, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure_IEs = { - "RICsubscriptionDeleteFailure-IEs", - "RICsubscriptionDeleteFailure-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45, - sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45) - /sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[0]), /* 1 */ - asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45) - /sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionDeleteFailure_IEs_45, - 3, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_52[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICactionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RICactionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICactionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationSN), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RICindicationSN, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICindicationSN" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationType), - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), - 0, - &asn_DEF_RICindicationType, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICindicationType" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationHeader), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICindicationHeader, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICindicationHeader" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationMessage), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICindicationMessage, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICindicationMessage" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICcallProcessID), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcallProcessID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcallProcessID" - }, -}; -static const unsigned asn_MAP_value_to_canonical_52[] = { 1, 2, 3, 5, 6, 7, 4, 0 }; -static const unsigned asn_MAP_value_from_canonical_52[] = { 7, 0, 1, 2, 6, 3, 4, 5 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_52[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 2 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* RICactionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -2, 0 }, /* RICindicationSN */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 5, 0, 2 }, /* RICindicationHeader */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, -1, 1 }, /* RICindicationMessage */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 7, -2, 0 }, /* RICcallProcessID */ - { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* RICindicationType */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_52 = { - sizeof(struct RICindication_IEs__value), - offsetof(struct RICindication_IEs__value, _asn_ctx), - offsetof(struct RICindication_IEs__value, present), - sizeof(((struct RICindication_IEs__value *)0)->present), - asn_MAP_value_tag2el_52, - 8, /* Count of tags in the map */ - asn_MAP_value_to_canonical_52, - asn_MAP_value_from_canonical_52, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_52 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_52, - 8, /* Elements count */ - &asn_SPC_value_specs_52 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICindication_IEs_49[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_50, memb_id_constraint_49 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICindication_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_51, memb_criticality_constraint_49 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_52, - select_RICindication_IEs_value_type, - { 0, &asn_PER_memb_value_constr_52, memb_value_constraint_49 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICindication_IEs_tags_49[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICindication_IEs_tag2el_49[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICindication_IEs_specs_49 = { - sizeof(struct RICindication_IEs), - offsetof(struct RICindication_IEs, _asn_ctx), - asn_MAP_RICindication_IEs_tag2el_49, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICindication_IEs = { - "RICindication-IEs", - "RICindication-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICindication_IEs_tags_49, - sizeof(asn_DEF_RICindication_IEs_tags_49) - /sizeof(asn_DEF_RICindication_IEs_tags_49[0]), /* 1 */ - asn_DEF_RICindication_IEs_tags_49, /* Same as above */ - sizeof(asn_DEF_RICindication_IEs_tags_49) - /sizeof(asn_DEF_RICindication_IEs_tags_49[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICindication_IEs_49, - 3, /* Elements count */ - &asn_SPC_RICindication_IEs_specs_49 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_56[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcallProcessID), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcallProcessID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcallProcessID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolHeader), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcontrolHeader, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolHeader" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolMessage), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcontrolMessage, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolMessage" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolAckRequest), - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), - 0, - &asn_DEF_RICcontrolAckRequest, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolAckRequest" - }, -}; -static const unsigned asn_MAP_value_to_canonical_56[] = { 1, 2, 3, 4, 5, 0 }; -static const unsigned asn_MAP_value_from_canonical_56[] = { 5, 0, 1, 2, 3, 4 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_56[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 2 }, /* RICcallProcessID */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -1, 1 }, /* RICcontrolHeader */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -2, 0 }, /* RICcontrolMessage */ - { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 0 }, /* RICcontrolAckRequest */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_56 = { - sizeof(struct RICcontrolRequest_IEs__value), - offsetof(struct RICcontrolRequest_IEs__value, _asn_ctx), - offsetof(struct RICcontrolRequest_IEs__value, present), - sizeof(((struct RICcontrolRequest_IEs__value *)0)->present), - asn_MAP_value_tag2el_56, - 6, /* Count of tags in the map */ - asn_MAP_value_to_canonical_56, - asn_MAP_value_from_canonical_56, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_56 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_56, - 6, /* Elements count */ - &asn_SPC_value_specs_56 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_53[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_54, memb_id_constraint_53 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICcontrolRequest_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_55, memb_criticality_constraint_53 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_56, - select_RICcontrolRequest_IEs_value_type, - { 0, &asn_PER_memb_value_constr_56, memb_value_constraint_53 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_IEs_tags_53[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_IEs_tag2el_53[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_IEs_specs_53 = { - sizeof(struct RICcontrolRequest_IEs), - offsetof(struct RICcontrolRequest_IEs, _asn_ctx), - asn_MAP_RICcontrolRequest_IEs_tag2el_53, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest_IEs = { - "RICcontrolRequest-IEs", - "RICcontrolRequest-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICcontrolRequest_IEs_tags_53, - sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53) - /sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53[0]), /* 1 */ - asn_DEF_RICcontrolRequest_IEs_tags_53, /* Same as above */ - sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53) - /sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICcontrolRequest_IEs_53, - 3, /* Elements count */ - &asn_SPC_RICcontrolRequest_IEs_specs_53 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_60[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcallProcessID), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcallProcessID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcallProcessID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolStatus), - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), - 0, - &asn_DEF_RICcontrolStatus, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolStatus" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolOutcome), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcontrolOutcome, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolOutcome" - }, -}; -static const unsigned asn_MAP_value_to_canonical_60[] = { 1, 2, 4, 3, 0 }; -static const unsigned asn_MAP_value_from_canonical_60[] = { 4, 0, 1, 3, 2 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_60[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* RICcallProcessID */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -1, 0 }, /* RICcontrolOutcome */ - { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* RICcontrolStatus */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_60 = { - sizeof(struct RICcontrolAcknowledge_IEs__value), - offsetof(struct RICcontrolAcknowledge_IEs__value, _asn_ctx), - offsetof(struct RICcontrolAcknowledge_IEs__value, present), - sizeof(((struct RICcontrolAcknowledge_IEs__value *)0)->present), - asn_MAP_value_tag2el_60, - 5, /* Count of tags in the map */ - asn_MAP_value_to_canonical_60, - asn_MAP_value_from_canonical_60, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_60 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_60, - 5, /* Elements count */ - &asn_SPC_value_specs_60 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_57[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_58, memb_id_constraint_57 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICcontrolAcknowledge_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_59, memb_criticality_constraint_57 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_60, - select_RICcontrolAcknowledge_IEs_value_type, - { 0, &asn_PER_memb_value_constr_60, memb_value_constraint_57 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_IEs_tags_57[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolAcknowledge_IEs_tag2el_57[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_IEs_specs_57 = { - sizeof(struct RICcontrolAcknowledge_IEs), - offsetof(struct RICcontrolAcknowledge_IEs, _asn_ctx), - asn_MAP_RICcontrolAcknowledge_IEs_tag2el_57, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge_IEs = { - "RICcontrolAcknowledge-IEs", - "RICcontrolAcknowledge-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICcontrolAcknowledge_IEs_tags_57, - sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57) - /sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57[0]), /* 1 */ - asn_DEF_RICcontrolAcknowledge_IEs_tags_57, /* Same as above */ - sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57) - /sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICcontrolAcknowledge_IEs_57, - 3, /* Elements count */ - &asn_SPC_RICcontrolAcknowledge_IEs_specs_57 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_64[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICcallProcessID), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcallProcessID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcallProcessID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.Cause), - -1 /* Ambiguous tag (CHOICE?) */, - 0, - &asn_DEF_Cause, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "Cause" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICcontrolOutcome), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_RICcontrolOutcome, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolOutcome" - }, -}; -static const unsigned asn_MAP_value_to_canonical_64[] = { 1, 2, 4, 0, 3 }; -static const unsigned asn_MAP_value_from_canonical_64[] = { 3, 0, 1, 4, 2 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_64[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* RICcallProcessID */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -1, 0 }, /* RICcontrolOutcome */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* RICrequestID */ - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* ricRequest */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* ricService */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* transport */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* misc */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_64 = { - sizeof(struct RICcontrolFailure_IEs__value), - offsetof(struct RICcontrolFailure_IEs__value, _asn_ctx), - offsetof(struct RICcontrolFailure_IEs__value, present), - sizeof(((struct RICcontrolFailure_IEs__value *)0)->present), - asn_MAP_value_tag2el_64, - 9, /* Count of tags in the map */ - asn_MAP_value_to_canonical_64, - asn_MAP_value_from_canonical_64, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_64 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_64, - 5, /* Elements count */ - &asn_SPC_value_specs_64 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_61[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_62, memb_id_constraint_61 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICcontrolFailure_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_63, memb_criticality_constraint_61 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_64, - select_RICcontrolFailure_IEs_value_type, - { 0, &asn_PER_memb_value_constr_64, memb_value_constraint_61 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_IEs_tags_61[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolFailure_IEs_tag2el_61[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_IEs_specs_61 = { - sizeof(struct RICcontrolFailure_IEs), - offsetof(struct RICcontrolFailure_IEs, _asn_ctx), - asn_MAP_RICcontrolFailure_IEs_tag2el_61, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure_IEs = { - "RICcontrolFailure-IEs", - "RICcontrolFailure-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICcontrolFailure_IEs_tags_61, - sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61) - /sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61[0]), /* 1 */ - asn_DEF_RICcontrolFailure_IEs_tags_61, /* Same as above */ - sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61) - /sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICcontrolFailure_IEs_61, - 3, /* Elements count */ - &asn_SPC_RICcontrolFailure_IEs_specs_61 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_68[] = { - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RICrequestID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICrequestID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICrequestID" - }, - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.Cause), - -1 /* Ambiguous tag (CHOICE?) */, - 0, - &asn_DEF_Cause, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "Cause" - }, - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.CriticalityDiagnostics), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_CriticalityDiagnostics, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "CriticalityDiagnostics" - }, -}; -static const unsigned asn_MAP_value_to_canonical_68[] = { 1, 0, 3, 2 }; -static const unsigned asn_MAP_value_from_canonical_68[] = { 1, 0, 3, 2 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_68[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* CriticalityDiagnostics */ - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* ricRequest */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* ricService */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_68 = { - sizeof(struct ErrorIndication_IEs__value), - offsetof(struct ErrorIndication_IEs__value, _asn_ctx), - offsetof(struct ErrorIndication_IEs__value, present), - sizeof(((struct ErrorIndication_IEs__value *)0)->present), - asn_MAP_value_tag2el_68, - 8, /* Count of tags in the map */ - asn_MAP_value_to_canonical_68, - asn_MAP_value_from_canonical_68, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_68 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_68, - 4, /* Elements count */ - &asn_SPC_value_specs_68 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_65[] = { - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_66, memb_id_constraint_65 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_ErrorIndication_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_67, memb_criticality_constraint_65 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_68, - select_ErrorIndication_IEs_value_type, - { 0, &asn_PER_memb_value_constr_68, memb_value_constraint_65 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_ErrorIndication_IEs_tags_65[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_IEs_tag2el_65[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_IEs_specs_65 = { - sizeof(struct ErrorIndication_IEs), - offsetof(struct ErrorIndication_IEs, _asn_ctx), - asn_MAP_ErrorIndication_IEs_tag2el_65, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_ErrorIndication_IEs = { - "ErrorIndication-IEs", - "ErrorIndication-IEs", - &asn_OP_SEQUENCE, - asn_DEF_ErrorIndication_IEs_tags_65, - sizeof(asn_DEF_ErrorIndication_IEs_tags_65) - /sizeof(asn_DEF_ErrorIndication_IEs_tags_65[0]), /* 1 */ - asn_DEF_ErrorIndication_IEs_tags_65, /* Same as above */ - sizeof(asn_DEF_ErrorIndication_IEs_tags_65) - /sizeof(asn_DEF_ErrorIndication_IEs_tags_65[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_ErrorIndication_IEs_65, - 3, /* Elements count */ - &asn_SPC_ErrorIndication_IEs_specs_65 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_72[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.GlobalE2node_ID), - -1 /* Ambiguous tag (CHOICE?) */, - 0, - &asn_DEF_GlobalE2node_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "GlobalE2node-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.RANfunctions_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctions_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctions-List" - }, -}; -static const unsigned asn_MAP_value_to_canonical_72[] = { 1, 0 }; -static const unsigned asn_MAP_value_from_canonical_72[] = { 1, 0 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_72[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* RANfunctions-List */ - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* en-gNB */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* ng-eNB */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 } /* eNB */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_72 = { - sizeof(struct E2setupRequestIEs__value), - offsetof(struct E2setupRequestIEs__value, _asn_ctx), - offsetof(struct E2setupRequestIEs__value, present), - sizeof(((struct E2setupRequestIEs__value *)0)->present), - asn_MAP_value_tag2el_72, - 5, /* Count of tags in the map */ - asn_MAP_value_to_canonical_72, - asn_MAP_value_from_canonical_72, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_72 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_72, - 2, /* Elements count */ - &asn_SPC_value_specs_72 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_E2setupRequestIEs_69[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_70, memb_id_constraint_69 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_E2setupRequestIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_71, memb_criticality_constraint_69 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_72, - select_E2setupRequestIEs_value_type, - { 0, &asn_PER_memb_value_constr_72, memb_value_constraint_69 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2setupRequestIEs_tags_69[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2setupRequestIEs_tag2el_69[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2setupRequestIEs_specs_69 = { - sizeof(struct E2setupRequestIEs), - offsetof(struct E2setupRequestIEs, _asn_ctx), - asn_MAP_E2setupRequestIEs_tag2el_69, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2setupRequestIEs = { - "E2setupRequestIEs", - "E2setupRequestIEs", - &asn_OP_SEQUENCE, - asn_DEF_E2setupRequestIEs_tags_69, - sizeof(asn_DEF_E2setupRequestIEs_tags_69) - /sizeof(asn_DEF_E2setupRequestIEs_tags_69[0]), /* 1 */ - asn_DEF_E2setupRequestIEs_tags_69, /* Same as above */ - sizeof(asn_DEF_E2setupRequestIEs_tags_69) - /sizeof(asn_DEF_E2setupRequestIEs_tags_69[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2setupRequestIEs_69, - 3, /* Elements count */ - &asn_SPC_E2setupRequestIEs_specs_69 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_76[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.GlobalRIC_ID), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_GlobalRIC_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "GlobalRIC-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsID_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionsID_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionsID-List" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsIDcause_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionsIDcause_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionsIDcause-List" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_76[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* GlobalRIC-ID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 1 }, /* RANfunctionsID-List */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 0 } /* RANfunctionsIDcause-List */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_76 = { - sizeof(struct E2setupResponseIEs__value), - offsetof(struct E2setupResponseIEs__value, _asn_ctx), - offsetof(struct E2setupResponseIEs__value, present), - sizeof(((struct E2setupResponseIEs__value *)0)->present), - asn_MAP_value_tag2el_76, - 3, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_76 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_76, - 3, /* Elements count */ - &asn_SPC_value_specs_76 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_E2setupResponseIEs_73[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_74, memb_id_constraint_73 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_E2setupResponseIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_75, memb_criticality_constraint_73 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_76, - select_E2setupResponseIEs_value_type, - { 0, &asn_PER_memb_value_constr_76, memb_value_constraint_73 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2setupResponseIEs_tags_73[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2setupResponseIEs_tag2el_73[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2setupResponseIEs_specs_73 = { - sizeof(struct E2setupResponseIEs), - offsetof(struct E2setupResponseIEs, _asn_ctx), - asn_MAP_E2setupResponseIEs_tag2el_73, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2setupResponseIEs = { - "E2setupResponseIEs", - "E2setupResponseIEs", - &asn_OP_SEQUENCE, - asn_DEF_E2setupResponseIEs_tags_73, - sizeof(asn_DEF_E2setupResponseIEs_tags_73) - /sizeof(asn_DEF_E2setupResponseIEs_tags_73[0]), /* 1 */ - asn_DEF_E2setupResponseIEs_tags_73, /* Same as above */ - sizeof(asn_DEF_E2setupResponseIEs_tags_73) - /sizeof(asn_DEF_E2setupResponseIEs_tags_73[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2setupResponseIEs_73, - 3, /* Elements count */ - &asn_SPC_E2setupResponseIEs_specs_73 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_80[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.Cause), - -1 /* Ambiguous tag (CHOICE?) */, - 0, - &asn_DEF_Cause, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "Cause" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.TimeToWait), - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), - 0, - &asn_DEF_TimeToWait, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "TimeToWait" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.CriticalityDiagnostics), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_CriticalityDiagnostics, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "CriticalityDiagnostics" - }, -}; -static const unsigned asn_MAP_value_to_canonical_80[] = { 1, 2, 0 }; -static const unsigned asn_MAP_value_from_canonical_80[] = { 2, 0, 1 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_80[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* CriticalityDiagnostics */ - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* ricService */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* transport */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_80 = { - sizeof(struct E2setupFailureIEs__value), - offsetof(struct E2setupFailureIEs__value, _asn_ctx), - offsetof(struct E2setupFailureIEs__value, present), - sizeof(((struct E2setupFailureIEs__value *)0)->present), - asn_MAP_value_tag2el_80, - 7, /* Count of tags in the map */ - asn_MAP_value_to_canonical_80, - asn_MAP_value_from_canonical_80, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_80 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_80, - 3, /* Elements count */ - &asn_SPC_value_specs_80 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_E2setupFailureIEs_77[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_78, memb_id_constraint_77 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_E2setupFailureIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_79, memb_criticality_constraint_77 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_80, - select_E2setupFailureIEs_value_type, - { 0, &asn_PER_memb_value_constr_80, memb_value_constraint_77 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_E2setupFailureIEs_tags_77[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_E2setupFailureIEs_tag2el_77[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_E2setupFailureIEs_specs_77 = { - sizeof(struct E2setupFailureIEs), - offsetof(struct E2setupFailureIEs, _asn_ctx), - asn_MAP_E2setupFailureIEs_tag2el_77, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_E2setupFailureIEs = { - "E2setupFailureIEs", - "E2setupFailureIEs", - &asn_OP_SEQUENCE, - asn_DEF_E2setupFailureIEs_tags_77, - sizeof(asn_DEF_E2setupFailureIEs_tags_77) - /sizeof(asn_DEF_E2setupFailureIEs_tags_77[0]), /* 1 */ - asn_DEF_E2setupFailureIEs_tags_77, /* Same as above */ - sizeof(asn_DEF_E2setupFailureIEs_tags_77) - /sizeof(asn_DEF_E2setupFailureIEs_tags_77[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_E2setupFailureIEs_77, - 3, /* Elements count */ - &asn_SPC_E2setupFailureIEs_specs_77 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_84[] = { - { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs__value, choice.Cause), - -1 /* Ambiguous tag (CHOICE?) */, - 0, - &asn_DEF_Cause, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "Cause" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_84[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* ricService */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* transport */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_84 = { - sizeof(struct ResetRequestIEs__value), - offsetof(struct ResetRequestIEs__value, _asn_ctx), - offsetof(struct ResetRequestIEs__value, present), - sizeof(((struct ResetRequestIEs__value *)0)->present), - asn_MAP_value_tag2el_84, - 5, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_84 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_84, - 1, /* Elements count */ - &asn_SPC_value_specs_84 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ResetRequestIEs_81[] = { - { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_82, memb_id_constraint_81 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_ResetRequestIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_83, memb_criticality_constraint_81 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_84, - select_ResetRequestIEs_value_type, - { 0, &asn_PER_memb_value_constr_84, memb_value_constraint_81 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_ResetRequestIEs_tags_81[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_ResetRequestIEs_tag2el_81[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_ResetRequestIEs_specs_81 = { - sizeof(struct ResetRequestIEs), - offsetof(struct ResetRequestIEs, _asn_ctx), - asn_MAP_ResetRequestIEs_tag2el_81, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_ResetRequestIEs = { - "ResetRequestIEs", - "ResetRequestIEs", - &asn_OP_SEQUENCE, - asn_DEF_ResetRequestIEs_tags_81, - sizeof(asn_DEF_ResetRequestIEs_tags_81) - /sizeof(asn_DEF_ResetRequestIEs_tags_81[0]), /* 1 */ - asn_DEF_ResetRequestIEs_tags_81, /* Same as above */ - sizeof(asn_DEF_ResetRequestIEs_tags_81) - /sizeof(asn_DEF_ResetRequestIEs_tags_81[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_ResetRequestIEs_81, - 3, /* Elements count */ - &asn_SPC_ResetRequestIEs_specs_81 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_88[] = { - { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs__value, choice.CriticalityDiagnostics), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_CriticalityDiagnostics, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "CriticalityDiagnostics" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_88[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* CriticalityDiagnostics */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_88 = { - sizeof(struct ResetResponseIEs__value), - offsetof(struct ResetResponseIEs__value, _asn_ctx), - offsetof(struct ResetResponseIEs__value, present), - sizeof(((struct ResetResponseIEs__value *)0)->present), - asn_MAP_value_tag2el_88, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_88 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_88, - 1, /* Elements count */ - &asn_SPC_value_specs_88 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ResetResponseIEs_85[] = { - { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_86, memb_id_constraint_85 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_ResetResponseIEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_87, memb_criticality_constraint_85 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_88, - select_ResetResponseIEs_value_type, - { 0, &asn_PER_memb_value_constr_88, memb_value_constraint_85 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_ResetResponseIEs_tags_85[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_ResetResponseIEs_tag2el_85[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_ResetResponseIEs_specs_85 = { - sizeof(struct ResetResponseIEs), - offsetof(struct ResetResponseIEs, _asn_ctx), - asn_MAP_ResetResponseIEs_tag2el_85, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_ResetResponseIEs = { - "ResetResponseIEs", - "ResetResponseIEs", - &asn_OP_SEQUENCE, - asn_DEF_ResetResponseIEs_tags_85, - sizeof(asn_DEF_ResetResponseIEs_tags_85) - /sizeof(asn_DEF_ResetResponseIEs_tags_85[0]), /* 1 */ - asn_DEF_ResetResponseIEs_tags_85, /* Same as above */ - sizeof(asn_DEF_ResetResponseIEs_tags_85) - /sizeof(asn_DEF_ResetResponseIEs_tags_85[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_ResetResponseIEs_85, - 3, /* Elements count */ - &asn_SPC_ResetResponseIEs_specs_85 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_92[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.RANfunctions_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctions_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctions-List" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.RANfunctionsID_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionsID_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionsID-List" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_92[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctions-List */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* RANfunctionsID-List */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_92 = { - sizeof(struct RICserviceUpdate_IEs__value), - offsetof(struct RICserviceUpdate_IEs__value, _asn_ctx), - offsetof(struct RICserviceUpdate_IEs__value, present), - sizeof(((struct RICserviceUpdate_IEs__value *)0)->present), - asn_MAP_value_tag2el_92, - 2, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_92 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_92, - 2, /* Elements count */ - &asn_SPC_value_specs_92 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_89[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_90, memb_id_constraint_89 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICserviceUpdate_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_91, memb_criticality_constraint_89 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_92, - select_RICserviceUpdate_IEs_value_type, - { 0, &asn_PER_memb_value_constr_92, memb_value_constraint_89 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_IEs_tags_89[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdate_IEs_tag2el_89[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_IEs_specs_89 = { - sizeof(struct RICserviceUpdate_IEs), - offsetof(struct RICserviceUpdate_IEs, _asn_ctx), - asn_MAP_RICserviceUpdate_IEs_tag2el_89, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate_IEs = { - "RICserviceUpdate-IEs", - "RICserviceUpdate-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceUpdate_IEs_tags_89, - sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89) - /sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89[0]), /* 1 */ - asn_DEF_RICserviceUpdate_IEs_tags_89, /* Same as above */ - sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89) - /sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceUpdate_IEs_89, - 3, /* Elements count */ - &asn_SPC_RICserviceUpdate_IEs_specs_89 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_96[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs__value, choice.RANfunctionsID_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionsID_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionsID-List" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs__value, choice.RANfunctionsIDcause_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionsIDcause_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionsIDcause-List" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_96[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctionsID-List */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* RANfunctionsIDcause-List */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_96 = { - sizeof(struct RICserviceUpdateAcknowledge_IEs__value), - offsetof(struct RICserviceUpdateAcknowledge_IEs__value, _asn_ctx), - offsetof(struct RICserviceUpdateAcknowledge_IEs__value, present), - sizeof(((struct RICserviceUpdateAcknowledge_IEs__value *)0)->present), - asn_MAP_value_tag2el_96, - 2, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_96 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_96, - 2, /* Elements count */ - &asn_SPC_value_specs_96 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_93[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_94, memb_id_constraint_93 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICserviceUpdateAcknowledge_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_95, memb_criticality_constraint_93 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_96, - select_RICserviceUpdateAcknowledge_IEs_value_type, - { 0, &asn_PER_memb_value_constr_96, memb_value_constraint_93 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93 = { - sizeof(struct RICserviceUpdateAcknowledge_IEs), - offsetof(struct RICserviceUpdateAcknowledge_IEs, _asn_ctx), - asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge_IEs = { - "RICserviceUpdateAcknowledge-IEs", - "RICserviceUpdateAcknowledge-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93, - sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93) - /sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[0]), /* 1 */ - asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93, /* Same as above */ - sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93) - /sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceUpdateAcknowledge_IEs_93, - 3, /* Elements count */ - &asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_100[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.RANfunctionsIDcause_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionsIDcause_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionsIDcause-List" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.TimeToWait), - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), - 0, - &asn_DEF_TimeToWait, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "TimeToWait" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.CriticalityDiagnostics), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_CriticalityDiagnostics, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "CriticalityDiagnostics" - }, -}; -static const unsigned asn_MAP_value_to_canonical_100[] = { 1, 0, 2 }; -static const unsigned asn_MAP_value_from_canonical_100[] = { 1, 0, 2 }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_100[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctionsIDcause-List */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* CriticalityDiagnostics */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_100 = { - sizeof(struct RICserviceUpdateFailure_IEs__value), - offsetof(struct RICserviceUpdateFailure_IEs__value, _asn_ctx), - offsetof(struct RICserviceUpdateFailure_IEs__value, present), - sizeof(((struct RICserviceUpdateFailure_IEs__value *)0)->present), - asn_MAP_value_tag2el_100, - 3, /* Count of tags in the map */ - asn_MAP_value_to_canonical_100, - asn_MAP_value_from_canonical_100, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_100 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_100, - 3, /* Elements count */ - &asn_SPC_value_specs_100 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_97[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_98, memb_id_constraint_97 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICserviceUpdateFailure_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_99, memb_criticality_constraint_97 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_100, - select_RICserviceUpdateFailure_IEs_value_type, - { 0, &asn_PER_memb_value_constr_100, memb_value_constraint_97 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_IEs_tags_97[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_IEs_specs_97 = { - sizeof(struct RICserviceUpdateFailure_IEs), - offsetof(struct RICserviceUpdateFailure_IEs, _asn_ctx), - asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure_IEs = { - "RICserviceUpdateFailure-IEs", - "RICserviceUpdateFailure-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceUpdateFailure_IEs_tags_97, - sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97) - /sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97[0]), /* 1 */ - asn_DEF_RICserviceUpdateFailure_IEs_tags_97, /* Same as above */ - sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97) - /sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceUpdateFailure_IEs_97, - 3, /* Elements count */ - &asn_SPC_RICserviceUpdateFailure_IEs_specs_97 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_value_104[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs__value, choice.RANfunctionsID_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RANfunctionsID_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionsID-List" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_104[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionsID-List */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_104 = { - sizeof(struct RICserviceQuery_IEs__value), - offsetof(struct RICserviceQuery_IEs__value, _asn_ctx), - offsetof(struct RICserviceQuery_IEs__value, present), - sizeof(((struct RICserviceQuery_IEs__value *)0)->present), - asn_MAP_value_tag2el_104, - 1, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_104 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_104, - 1, /* Elements count */ - &asn_SPC_value_specs_104 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_101[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, id), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_ID, - 0, - { 0, &asn_PER_memb_id_constr_102, memb_id_constraint_101 }, - 0, 0, /* No default value */ - "id" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_RICserviceQuery_IEs_criticality_type, - { 0, &asn_PER_memb_criticality_constr_103, memb_criticality_constraint_101 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_104, - select_RICserviceQuery_IEs_value_type, - { 0, &asn_PER_memb_value_constr_104, memb_value_constraint_101 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceQuery_IEs_tags_101[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceQuery_IEs_tag2el_101[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_IEs_specs_101 = { - sizeof(struct RICserviceQuery_IEs), - offsetof(struct RICserviceQuery_IEs, _asn_ctx), - asn_MAP_RICserviceQuery_IEs_tag2el_101, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceQuery_IEs = { - "RICserviceQuery-IEs", - "RICserviceQuery-IEs", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceQuery_IEs_tags_101, - sizeof(asn_DEF_RICserviceQuery_IEs_tags_101) - /sizeof(asn_DEF_RICserviceQuery_IEs_tags_101[0]), /* 1 */ - asn_DEF_RICserviceQuery_IEs_tags_101, /* Same as above */ - sizeof(asn_DEF_RICserviceQuery_IEs_tags_101) - /sizeof(asn_DEF_RICserviceQuery_IEs_tags_101[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceQuery_IEs_101, - 3, /* Elements count */ - &asn_SPC_RICserviceQuery_IEs_specs_101 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ProtocolIE-Field.h b/Bouncer/asn1c_defs/ProtocolIE-Field.h deleted file mode 100644 index 2515bf4..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-Field.h +++ /dev/null @@ -1,757 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_Field_H_ -#define _ProtocolIE_Field_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-ID.h" -#include "Criticality.h" -#include -#include -#include "RICaction-ToBeSetup-Item.h" -#include "Presence.h" -#include -#include -#include -#include "RICaction-Admitted-Item.h" -#include "RICaction-NotAdmitted-Item.h" -#include "RANfunction-Item.h" -#include "RANfunctionID-Item.h" -#include "RANfunctionIDcause-Item.h" -#include "RICrequestID.h" -#include "RANfunctionID.h" -#include "RICsubscriptionDetails.h" -#include "RICaction-Admitted-List.h" -#include "RICaction-NotAdmitted-List.h" -#include "CriticalityDiagnostics.h" -#include "Cause.h" -#include "RICactionID.h" -#include "RICindicationSN.h" -#include "RICindicationType.h" -#include "RICindicationHeader.h" -#include "RICindicationMessage.h" -#include "RICcallProcessID.h" -#include "RICcontrolHeader.h" -#include "RICcontrolMessage.h" -#include "RICcontrolAckRequest.h" -#include "RICcontrolStatus.h" -#include "RICcontrolOutcome.h" -#include "GlobalE2node-ID.h" -#include "RANfunctions-List.h" -#include "GlobalRIC-ID.h" -#include "RANfunctionsID-List.h" -#include "RANfunctionsIDcause-List.h" -#include "TimeToWait.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RICaction_ToBeSetup_ItemIEs__value_PR { - RICaction_ToBeSetup_ItemIEs__value_PR_NOTHING, /* No components present */ - RICaction_ToBeSetup_ItemIEs__value_PR_RICaction_ToBeSetup_Item -} RICaction_ToBeSetup_ItemIEs__value_PR; -typedef enum RICaction_Admitted_ItemIEs__value_PR { - RICaction_Admitted_ItemIEs__value_PR_NOTHING, /* No components present */ - RICaction_Admitted_ItemIEs__value_PR_RICaction_Admitted_Item -} RICaction_Admitted_ItemIEs__value_PR; -typedef enum RICaction_NotAdmitted_ItemIEs__value_PR { - RICaction_NotAdmitted_ItemIEs__value_PR_NOTHING, /* No components present */ - RICaction_NotAdmitted_ItemIEs__value_PR_RICaction_NotAdmitted_Item -} RICaction_NotAdmitted_ItemIEs__value_PR; -typedef enum RANfunction_ItemIEs__value_PR { - RANfunction_ItemIEs__value_PR_NOTHING, /* No components present */ - RANfunction_ItemIEs__value_PR_RANfunction_Item -} RANfunction_ItemIEs__value_PR; -typedef enum RANfunctionID_ItemIEs__value_PR { - RANfunctionID_ItemIEs__value_PR_NOTHING, /* No components present */ - RANfunctionID_ItemIEs__value_PR_RANfunctionID_Item -} RANfunctionID_ItemIEs__value_PR; -typedef enum RANfunctionIDcause_ItemIEs__value_PR { - RANfunctionIDcause_ItemIEs__value_PR_NOTHING, /* No components present */ - RANfunctionIDcause_ItemIEs__value_PR_RANfunctionIDcause_Item -} RANfunctionIDcause_ItemIEs__value_PR; -typedef enum RICsubscriptionRequest_IEs__value_PR { - RICsubscriptionRequest_IEs__value_PR_NOTHING, /* No components present */ - RICsubscriptionRequest_IEs__value_PR_RICrequestID, - RICsubscriptionRequest_IEs__value_PR_RANfunctionID, - RICsubscriptionRequest_IEs__value_PR_RICsubscriptionDetails -} RICsubscriptionRequest_IEs__value_PR; -typedef enum RICsubscriptionResponse_IEs__value_PR { - RICsubscriptionResponse_IEs__value_PR_NOTHING, /* No components present */ - RICsubscriptionResponse_IEs__value_PR_RICrequestID, - RICsubscriptionResponse_IEs__value_PR_RANfunctionID, - RICsubscriptionResponse_IEs__value_PR_RICaction_Admitted_List, - RICsubscriptionResponse_IEs__value_PR_RICaction_NotAdmitted_List -} RICsubscriptionResponse_IEs__value_PR; -typedef enum RICsubscriptionFailure_IEs__value_PR { - RICsubscriptionFailure_IEs__value_PR_NOTHING, /* No components present */ - RICsubscriptionFailure_IEs__value_PR_RICrequestID, - RICsubscriptionFailure_IEs__value_PR_RANfunctionID, - RICsubscriptionFailure_IEs__value_PR_RICaction_NotAdmitted_List, - RICsubscriptionFailure_IEs__value_PR_CriticalityDiagnostics -} RICsubscriptionFailure_IEs__value_PR; -typedef enum RICsubscriptionDeleteRequest_IEs__value_PR { - RICsubscriptionDeleteRequest_IEs__value_PR_NOTHING, /* No components present */ - RICsubscriptionDeleteRequest_IEs__value_PR_RICrequestID, - RICsubscriptionDeleteRequest_IEs__value_PR_RANfunctionID -} RICsubscriptionDeleteRequest_IEs__value_PR; -typedef enum RICsubscriptionDeleteResponse_IEs__value_PR { - RICsubscriptionDeleteResponse_IEs__value_PR_NOTHING, /* No components present */ - RICsubscriptionDeleteResponse_IEs__value_PR_RICrequestID, - RICsubscriptionDeleteResponse_IEs__value_PR_RANfunctionID -} RICsubscriptionDeleteResponse_IEs__value_PR; -typedef enum RICsubscriptionDeleteFailure_IEs__value_PR { - RICsubscriptionDeleteFailure_IEs__value_PR_NOTHING, /* No components present */ - RICsubscriptionDeleteFailure_IEs__value_PR_RICrequestID, - RICsubscriptionDeleteFailure_IEs__value_PR_RANfunctionID, - RICsubscriptionDeleteFailure_IEs__value_PR_Cause, - RICsubscriptionDeleteFailure_IEs__value_PR_CriticalityDiagnostics -} RICsubscriptionDeleteFailure_IEs__value_PR; -typedef enum RICindication_IEs__value_PR { - RICindication_IEs__value_PR_NOTHING, /* No components present */ - RICindication_IEs__value_PR_RICrequestID, - RICindication_IEs__value_PR_RANfunctionID, - RICindication_IEs__value_PR_RICactionID, - RICindication_IEs__value_PR_RICindicationSN, - RICindication_IEs__value_PR_RICindicationType, - RICindication_IEs__value_PR_RICindicationHeader, - RICindication_IEs__value_PR_RICindicationMessage, - RICindication_IEs__value_PR_RICcallProcessID -} RICindication_IEs__value_PR; -typedef enum RICcontrolRequest_IEs__value_PR { - RICcontrolRequest_IEs__value_PR_NOTHING, /* No components present */ - RICcontrolRequest_IEs__value_PR_RICrequestID, - RICcontrolRequest_IEs__value_PR_RANfunctionID, - RICcontrolRequest_IEs__value_PR_RICcallProcessID, - RICcontrolRequest_IEs__value_PR_RICcontrolHeader, - RICcontrolRequest_IEs__value_PR_RICcontrolMessage, - RICcontrolRequest_IEs__value_PR_RICcontrolAckRequest -} RICcontrolRequest_IEs__value_PR; -typedef enum RICcontrolAcknowledge_IEs__value_PR { - RICcontrolAcknowledge_IEs__value_PR_NOTHING, /* No components present */ - RICcontrolAcknowledge_IEs__value_PR_RICrequestID, - RICcontrolAcknowledge_IEs__value_PR_RANfunctionID, - RICcontrolAcknowledge_IEs__value_PR_RICcallProcessID, - RICcontrolAcknowledge_IEs__value_PR_RICcontrolStatus, - RICcontrolAcknowledge_IEs__value_PR_RICcontrolOutcome -} RICcontrolAcknowledge_IEs__value_PR; -typedef enum RICcontrolFailure_IEs__value_PR { - RICcontrolFailure_IEs__value_PR_NOTHING, /* No components present */ - RICcontrolFailure_IEs__value_PR_RICrequestID, - RICcontrolFailure_IEs__value_PR_RANfunctionID, - RICcontrolFailure_IEs__value_PR_RICcallProcessID, - RICcontrolFailure_IEs__value_PR_Cause, - RICcontrolFailure_IEs__value_PR_RICcontrolOutcome -} RICcontrolFailure_IEs__value_PR; -typedef enum ErrorIndication_IEs__value_PR { - ErrorIndication_IEs__value_PR_NOTHING, /* No components present */ - ErrorIndication_IEs__value_PR_RICrequestID, - ErrorIndication_IEs__value_PR_RANfunctionID, - ErrorIndication_IEs__value_PR_Cause, - ErrorIndication_IEs__value_PR_CriticalityDiagnostics -} ErrorIndication_IEs__value_PR; -typedef enum E2setupRequestIEs__value_PR { - E2setupRequestIEs__value_PR_NOTHING, /* No components present */ - E2setupRequestIEs__value_PR_GlobalE2node_ID, - E2setupRequestIEs__value_PR_RANfunctions_List -} E2setupRequestIEs__value_PR; -typedef enum E2setupResponseIEs__value_PR { - E2setupResponseIEs__value_PR_NOTHING, /* No components present */ - E2setupResponseIEs__value_PR_GlobalRIC_ID, - E2setupResponseIEs__value_PR_RANfunctionsID_List, - E2setupResponseIEs__value_PR_RANfunctionsIDcause_List -} E2setupResponseIEs__value_PR; -typedef enum E2setupFailureIEs__value_PR { - E2setupFailureIEs__value_PR_NOTHING, /* No components present */ - E2setupFailureIEs__value_PR_Cause, - E2setupFailureIEs__value_PR_TimeToWait, - E2setupFailureIEs__value_PR_CriticalityDiagnostics -} E2setupFailureIEs__value_PR; -typedef enum ResetRequestIEs__value_PR { - ResetRequestIEs__value_PR_NOTHING, /* No components present */ - ResetRequestIEs__value_PR_Cause -} ResetRequestIEs__value_PR; -typedef enum ResetResponseIEs__value_PR { - ResetResponseIEs__value_PR_NOTHING, /* No components present */ - ResetResponseIEs__value_PR_CriticalityDiagnostics -} ResetResponseIEs__value_PR; -typedef enum RICserviceUpdate_IEs__value_PR { - RICserviceUpdate_IEs__value_PR_NOTHING, /* No components present */ - RICserviceUpdate_IEs__value_PR_RANfunctions_List, - RICserviceUpdate_IEs__value_PR_RANfunctionsID_List -} RICserviceUpdate_IEs__value_PR; -typedef enum RICserviceUpdateAcknowledge_IEs__value_PR { - RICserviceUpdateAcknowledge_IEs__value_PR_NOTHING, /* No components present */ - RICserviceUpdateAcknowledge_IEs__value_PR_RANfunctionsID_List, - RICserviceUpdateAcknowledge_IEs__value_PR_RANfunctionsIDcause_List -} RICserviceUpdateAcknowledge_IEs__value_PR; -typedef enum RICserviceUpdateFailure_IEs__value_PR { - RICserviceUpdateFailure_IEs__value_PR_NOTHING, /* No components present */ - RICserviceUpdateFailure_IEs__value_PR_RANfunctionsIDcause_List, - RICserviceUpdateFailure_IEs__value_PR_TimeToWait, - RICserviceUpdateFailure_IEs__value_PR_CriticalityDiagnostics -} RICserviceUpdateFailure_IEs__value_PR; -typedef enum RICserviceQuery_IEs__value_PR { - RICserviceQuery_IEs__value_PR_NOTHING, /* No components present */ - RICserviceQuery_IEs__value_PR_RANfunctionsID_List -} RICserviceQuery_IEs__value_PR; - -/* ProtocolIE-Field */ -typedef struct RICaction_ToBeSetup_ItemIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICaction_ToBeSetup_ItemIEs__value { - RICaction_ToBeSetup_ItemIEs__value_PR present; - union RICaction_ToBeSetup_ItemIEs__value_u { - RICaction_ToBeSetup_Item_t RICaction_ToBeSetup_Item; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_ToBeSetup_ItemIEs_t; -typedef struct RICaction_Admitted_ItemIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICaction_Admitted_ItemIEs__value { - RICaction_Admitted_ItemIEs__value_PR present; - union RICaction_Admitted_ItemIEs__value_u { - RICaction_Admitted_Item_t RICaction_Admitted_Item; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_Admitted_ItemIEs_t; -typedef struct RICaction_NotAdmitted_ItemIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICaction_NotAdmitted_ItemIEs__value { - RICaction_NotAdmitted_ItemIEs__value_PR present; - union RICaction_NotAdmitted_ItemIEs__value_u { - RICaction_NotAdmitted_Item_t RICaction_NotAdmitted_Item; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_NotAdmitted_ItemIEs_t; -typedef struct RANfunction_ItemIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RANfunction_ItemIEs__value { - RANfunction_ItemIEs__value_PR present; - union RANfunction_ItemIEs__value_u { - RANfunction_Item_t RANfunction_Item; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunction_ItemIEs_t; -typedef struct RANfunctionID_ItemIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RANfunctionID_ItemIEs__value { - RANfunctionID_ItemIEs__value_PR present; - union RANfunctionID_ItemIEs__value_u { - RANfunctionID_Item_t RANfunctionID_Item; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunctionID_ItemIEs_t; -typedef struct RANfunctionIDcause_ItemIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RANfunctionIDcause_ItemIEs__value { - RANfunctionIDcause_ItemIEs__value_PR present; - union RANfunctionIDcause_ItemIEs__value_u { - RANfunctionIDcause_Item_t RANfunctionIDcause_Item; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunctionIDcause_ItemIEs_t; -typedef struct RICsubscriptionRequest_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICsubscriptionRequest_IEs__value { - RICsubscriptionRequest_IEs__value_PR present; - union RICsubscriptionRequest_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - RICsubscriptionDetails_t RICsubscriptionDetails; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionRequest_IEs_t; -typedef struct RICsubscriptionResponse_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICsubscriptionResponse_IEs__value { - RICsubscriptionResponse_IEs__value_PR present; - union RICsubscriptionResponse_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - RICaction_Admitted_List_t RICaction_Admitted_List; - RICaction_NotAdmitted_List_t RICaction_NotAdmitted_List; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionResponse_IEs_t; -typedef struct RICsubscriptionFailure_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICsubscriptionFailure_IEs__value { - RICsubscriptionFailure_IEs__value_PR present; - union RICsubscriptionFailure_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - RICaction_NotAdmitted_List_t RICaction_NotAdmitted_List; - CriticalityDiagnostics_t CriticalityDiagnostics; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionFailure_IEs_t; -typedef struct RICsubscriptionDeleteRequest_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICsubscriptionDeleteRequest_IEs__value { - RICsubscriptionDeleteRequest_IEs__value_PR present; - union RICsubscriptionDeleteRequest_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionDeleteRequest_IEs_t; -typedef struct RICsubscriptionDeleteResponse_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICsubscriptionDeleteResponse_IEs__value { - RICsubscriptionDeleteResponse_IEs__value_PR present; - union RICsubscriptionDeleteResponse_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionDeleteResponse_IEs_t; -typedef struct RICsubscriptionDeleteFailure_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICsubscriptionDeleteFailure_IEs__value { - RICsubscriptionDeleteFailure_IEs__value_PR present; - union RICsubscriptionDeleteFailure_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - Cause_t Cause; - CriticalityDiagnostics_t CriticalityDiagnostics; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionDeleteFailure_IEs_t; -typedef struct RICindication_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICindication_IEs__value { - RICindication_IEs__value_PR present; - union RICindication_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - RICactionID_t RICactionID; - RICindicationSN_t RICindicationSN; - RICindicationType_t RICindicationType; - RICindicationHeader_t RICindicationHeader; - RICindicationMessage_t RICindicationMessage; - RICcallProcessID_t RICcallProcessID; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICindication_IEs_t; -typedef struct RICcontrolRequest_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICcontrolRequest_IEs__value { - RICcontrolRequest_IEs__value_PR present; - union RICcontrolRequest_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - RICcallProcessID_t RICcallProcessID; - RICcontrolHeader_t RICcontrolHeader; - RICcontrolMessage_t RICcontrolMessage; - RICcontrolAckRequest_t RICcontrolAckRequest; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICcontrolRequest_IEs_t; -typedef struct RICcontrolAcknowledge_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICcontrolAcknowledge_IEs__value { - RICcontrolAcknowledge_IEs__value_PR present; - union RICcontrolAcknowledge_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - RICcallProcessID_t RICcallProcessID; - RICcontrolStatus_t RICcontrolStatus; - RICcontrolOutcome_t RICcontrolOutcome; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICcontrolAcknowledge_IEs_t; -typedef struct RICcontrolFailure_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICcontrolFailure_IEs__value { - RICcontrolFailure_IEs__value_PR present; - union RICcontrolFailure_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - RICcallProcessID_t RICcallProcessID; - Cause_t Cause; - RICcontrolOutcome_t RICcontrolOutcome; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICcontrolFailure_IEs_t; -typedef struct ErrorIndication_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct ErrorIndication_IEs__value { - ErrorIndication_IEs__value_PR present; - union ErrorIndication_IEs__value_u { - RICrequestID_t RICrequestID; - RANfunctionID_t RANfunctionID; - Cause_t Cause; - CriticalityDiagnostics_t CriticalityDiagnostics; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ErrorIndication_IEs_t; -typedef struct E2setupRequestIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct E2setupRequestIEs__value { - E2setupRequestIEs__value_PR present; - union E2setupRequestIEs__value_u { - GlobalE2node_ID_t GlobalE2node_ID; - RANfunctions_List_t RANfunctions_List; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2setupRequestIEs_t; -typedef struct E2setupResponseIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct E2setupResponseIEs__value { - E2setupResponseIEs__value_PR present; - union E2setupResponseIEs__value_u { - GlobalRIC_ID_t GlobalRIC_ID; - RANfunctionsID_List_t RANfunctionsID_List; - RANfunctionsIDcause_List_t RANfunctionsIDcause_List; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2setupResponseIEs_t; -typedef struct E2setupFailureIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct E2setupFailureIEs__value { - E2setupFailureIEs__value_PR present; - union E2setupFailureIEs__value_u { - Cause_t Cause; - TimeToWait_t TimeToWait; - CriticalityDiagnostics_t CriticalityDiagnostics; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} E2setupFailureIEs_t; -typedef struct ResetRequestIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct ResetRequestIEs__value { - ResetRequestIEs__value_PR present; - union ResetRequestIEs__value_u { - Cause_t Cause; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ResetRequestIEs_t; -typedef struct ResetResponseIEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct ResetResponseIEs__value { - ResetResponseIEs__value_PR present; - union ResetResponseIEs__value_u { - CriticalityDiagnostics_t CriticalityDiagnostics; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ResetResponseIEs_t; -typedef struct RICserviceUpdate_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICserviceUpdate_IEs__value { - RICserviceUpdate_IEs__value_PR present; - union RICserviceUpdate_IEs__value_u { - RANfunctions_List_t RANfunctions_List; - RANfunctionsID_List_t RANfunctionsID_List; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceUpdate_IEs_t; -typedef struct RICserviceUpdateAcknowledge_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICserviceUpdateAcknowledge_IEs__value { - RICserviceUpdateAcknowledge_IEs__value_PR present; - union RICserviceUpdateAcknowledge_IEs__value_u { - RANfunctionsID_List_t RANfunctionsID_List; - RANfunctionsIDcause_List_t RANfunctionsIDcause_List; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceUpdateAcknowledge_IEs_t; -typedef struct RICserviceUpdateFailure_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICserviceUpdateFailure_IEs__value { - RICserviceUpdateFailure_IEs__value_PR present; - union RICserviceUpdateFailure_IEs__value_u { - RANfunctionsIDcause_List_t RANfunctionsIDcause_List; - TimeToWait_t TimeToWait; - CriticalityDiagnostics_t CriticalityDiagnostics; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceUpdateFailure_IEs_t; -typedef struct RICserviceQuery_IEs { - ProtocolIE_ID_t id; - Criticality_t criticality; - struct RICserviceQuery_IEs__value { - RICserviceQuery_IEs__value_PR present; - union RICserviceQuery_IEs__value_u { - RANfunctionsID_List_t RANfunctionsID_List; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceQuery_IEs_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_ItemIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1; -extern asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_ItemIEs_1[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_ItemIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_ItemIEs_specs_5; -extern asn_TYPE_member_t asn_MBR_RICaction_Admitted_ItemIEs_5[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_ItemIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9; -extern asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_ItemIEs_9[3]; -extern asn_TYPE_descriptor_t asn_DEF_RANfunction_ItemIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RANfunction_ItemIEs_specs_13; -extern asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_13[3]; -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionID_ItemIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_ItemIEs_specs_17; -extern asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_17[3]; -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_ItemIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_ItemIEs_specs_21; -extern asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_21[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_IEs_specs_25; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_25[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_IEs_specs_29; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_29[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_IEs_specs_33; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_33[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_37[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_41[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_45[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICindication_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICindication_IEs_specs_49; -extern asn_TYPE_member_t asn_MBR_RICindication_IEs_49[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_IEs_specs_53; -extern asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_53[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_IEs_specs_57; -extern asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_57[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_IEs_specs_61; -extern asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_61[3]; -extern asn_TYPE_descriptor_t asn_DEF_ErrorIndication_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_IEs_specs_65; -extern asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_65[3]; -extern asn_TYPE_descriptor_t asn_DEF_E2setupRequestIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_E2setupRequestIEs_specs_69; -extern asn_TYPE_member_t asn_MBR_E2setupRequestIEs_69[3]; -extern asn_TYPE_descriptor_t asn_DEF_E2setupResponseIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_E2setupResponseIEs_specs_73; -extern asn_TYPE_member_t asn_MBR_E2setupResponseIEs_73[3]; -extern asn_TYPE_descriptor_t asn_DEF_E2setupFailureIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_E2setupFailureIEs_specs_77; -extern asn_TYPE_member_t asn_MBR_E2setupFailureIEs_77[3]; -extern asn_TYPE_descriptor_t asn_DEF_ResetRequestIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_ResetRequestIEs_specs_81; -extern asn_TYPE_member_t asn_MBR_ResetRequestIEs_81[3]; -extern asn_TYPE_descriptor_t asn_DEF_ResetResponseIEs; -extern asn_SEQUENCE_specifics_t asn_SPC_ResetResponseIEs_specs_85; -extern asn_TYPE_member_t asn_MBR_ResetResponseIEs_85[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_IEs_specs_89; -extern asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_89[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93; -extern asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_93[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_IEs_specs_97; -extern asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_97[3]; -extern asn_TYPE_descriptor_t asn_DEF_RICserviceQuery_IEs; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_IEs_specs_101; -extern asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_101[3]; - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_Field_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-FieldPair.c b/Bouncer/asn1c_defs/ProtocolIE-FieldPair.c deleted file mode 100644 index 82bda1a..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-FieldPair.c +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-FieldPair.h" - diff --git a/Bouncer/asn1c_defs/ProtocolIE-FieldPair.h b/Bouncer/asn1c_defs/ProtocolIE-FieldPair.h deleted file mode 100644 index 191ea27..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-FieldPair.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_FieldPair_H_ -#define _ProtocolIE_FieldPair_H_ - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_FieldPair_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-ID.c b/Bouncer/asn1c_defs/ProtocolIE-ID.c deleted file mode 100644 index 92c8c14..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ID.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-ID.h" - -int -ProtocolIE_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_ProtocolIE_ID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_ID = { - "ProtocolIE-ID", - "ProtocolIE-ID", - &asn_OP_NativeInteger, - asn_DEF_ProtocolIE_ID_tags_1, - sizeof(asn_DEF_ProtocolIE_ID_tags_1) - /sizeof(asn_DEF_ProtocolIE_ID_tags_1[0]), /* 1 */ - asn_DEF_ProtocolIE_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_ID_tags_1) - /sizeof(asn_DEF_ProtocolIE_ID_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_ProtocolIE_ID_constr_1, ProtocolIE_ID_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/ProtocolIE-ID.h b/Bouncer/asn1c_defs/ProtocolIE-ID.h deleted file mode 100644 index a6afe03..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-ID.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_ID_H_ -#define _ProtocolIE_ID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* ProtocolIE-ID */ -typedef long ProtocolIE_ID_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_ProtocolIE_ID_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_ID; -asn_struct_free_f ProtocolIE_ID_free; -asn_struct_print_f ProtocolIE_ID_print; -asn_constr_check_f ProtocolIE_ID_constraint; -ber_type_decoder_f ProtocolIE_ID_decode_ber; -der_type_encoder_f ProtocolIE_ID_encode_der; -xer_type_decoder_f ProtocolIE_ID_decode_xer; -xer_type_encoder_f ProtocolIE_ID_encode_xer; -per_type_decoder_f ProtocolIE_ID_decode_uper; -per_type_encoder_f ProtocolIE_ID_encode_uper; -per_type_decoder_f ProtocolIE_ID_decode_aper; -per_type_encoder_f ProtocolIE_ID_encode_aper; -#define ProtocolIE_ID_id_Cause ((ProtocolIE_ID_t)1) -#define ProtocolIE_ID_id_CriticalityDiagnostics ((ProtocolIE_ID_t)2) -#define ProtocolIE_ID_id_GlobalE2node_ID ((ProtocolIE_ID_t)3) -#define ProtocolIE_ID_id_GlobalRIC_ID ((ProtocolIE_ID_t)4) -#define ProtocolIE_ID_id_RANfunctionID ((ProtocolIE_ID_t)5) -#define ProtocolIE_ID_id_RANfunctionID_Item ((ProtocolIE_ID_t)6) -#define ProtocolIE_ID_id_RANfunctionIEcause_Item ((ProtocolIE_ID_t)7) -#define ProtocolIE_ID_id_RANfunction_Item ((ProtocolIE_ID_t)8) -#define ProtocolIE_ID_id_RANfunctionsAccepted ((ProtocolIE_ID_t)9) -#define ProtocolIE_ID_id_RANfunctionsAdded ((ProtocolIE_ID_t)10) -#define ProtocolIE_ID_id_RANfunctionsDeleted ((ProtocolIE_ID_t)11) -#define ProtocolIE_ID_id_RANfunctionsModified ((ProtocolIE_ID_t)12) -#define ProtocolIE_ID_id_RANfunctionsRejected ((ProtocolIE_ID_t)13) -#define ProtocolIE_ID_id_RICaction_Admitted_Item ((ProtocolIE_ID_t)14) -#define ProtocolIE_ID_id_RICactionID ((ProtocolIE_ID_t)15) -#define ProtocolIE_ID_id_RICaction_NotAdmitted_Item ((ProtocolIE_ID_t)16) -#define ProtocolIE_ID_id_RICactions_Admitted ((ProtocolIE_ID_t)17) -#define ProtocolIE_ID_id_RICactions_NotAdmitted ((ProtocolIE_ID_t)18) -#define ProtocolIE_ID_id_RICaction_ToBeSetup_Item ((ProtocolIE_ID_t)19) -#define ProtocolIE_ID_id_RICcallProcessID ((ProtocolIE_ID_t)20) -#define ProtocolIE_ID_id_RICcontrolAckRequest ((ProtocolIE_ID_t)21) -#define ProtocolIE_ID_id_RICcontrolHeader ((ProtocolIE_ID_t)22) -#define ProtocolIE_ID_id_RICcontrolMessage ((ProtocolIE_ID_t)23) -#define ProtocolIE_ID_id_RICcontrolStatus ((ProtocolIE_ID_t)24) -#define ProtocolIE_ID_id_RICindicationHeader ((ProtocolIE_ID_t)25) -#define ProtocolIE_ID_id_RICindicationMessage ((ProtocolIE_ID_t)26) -#define ProtocolIE_ID_id_RICindicationSN ((ProtocolIE_ID_t)27) -#define ProtocolIE_ID_id_RICindicationType ((ProtocolIE_ID_t)28) -#define ProtocolIE_ID_id_RICrequestID ((ProtocolIE_ID_t)29) -#define ProtocolIE_ID_id_RICsubscriptionDetails ((ProtocolIE_ID_t)30) -#define ProtocolIE_ID_id_TimeToWait ((ProtocolIE_ID_t)31) -#define ProtocolIE_ID_id_RICcontrolOutcome ((ProtocolIE_ID_t)32) - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ProtocolIE-SingleContainer.c b/Bouncer/asn1c_defs/ProtocolIE-SingleContainer.c deleted file mode 100644 index 506b061..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-SingleContainer.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ProtocolIE-SingleContainer.h" - -/* - * This type is implemented using RICaction_ToBeSetup_ItemIEs, - * so here we adjust the DEF accordingly. - */ -/* - * This type is implemented using RICaction_Admitted_ItemIEs, - * so here we adjust the DEF accordingly. - */ -/* - * This type is implemented using RICaction_NotAdmitted_ItemIEs, - * so here we adjust the DEF accordingly. - */ -/* - * This type is implemented using RANfunction_ItemIEs, - * so here we adjust the DEF accordingly. - */ -/* - * This type is implemented using RANfunctionID_ItemIEs, - * so here we adjust the DEF accordingly. - */ -/* - * This type is implemented using RANfunctionIDcause_ItemIEs, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_1415P0_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P0 = { - "ProtocolIE-SingleContainer", - "ProtocolIE-SingleContainer", - &asn_OP_SEQUENCE, - asn_DEF_ProtocolIE_SingleContainer_1415P0_tags_1, - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P0_tags_1) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P0_tags_1[0]), /* 1 */ - asn_DEF_ProtocolIE_SingleContainer_1415P0_tags_1, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P0_tags_1) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P0_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_ToBeSetup_ItemIEs_1, - 3, /* Elements count */ - &asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 /* Additional specs */ -}; - -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_1415P1_tags_2[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P1 = { - "ProtocolIE-SingleContainer", - "ProtocolIE-SingleContainer", - &asn_OP_SEQUENCE, - asn_DEF_ProtocolIE_SingleContainer_1415P1_tags_2, - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P1_tags_2) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P1_tags_2[0]), /* 1 */ - asn_DEF_ProtocolIE_SingleContainer_1415P1_tags_2, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P1_tags_2) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P1_tags_2[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_Admitted_ItemIEs_5, - 3, /* Elements count */ - &asn_SPC_RICaction_Admitted_ItemIEs_specs_5 /* Additional specs */ -}; - -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_1415P2_tags_3[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P2 = { - "ProtocolIE-SingleContainer", - "ProtocolIE-SingleContainer", - &asn_OP_SEQUENCE, - asn_DEF_ProtocolIE_SingleContainer_1415P2_tags_3, - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P2_tags_3) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P2_tags_3[0]), /* 1 */ - asn_DEF_ProtocolIE_SingleContainer_1415P2_tags_3, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P2_tags_3) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P2_tags_3[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_NotAdmitted_ItemIEs_9, - 3, /* Elements count */ - &asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 /* Additional specs */ -}; - -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_1415P3_tags_4[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P3 = { - "ProtocolIE-SingleContainer", - "ProtocolIE-SingleContainer", - &asn_OP_SEQUENCE, - asn_DEF_ProtocolIE_SingleContainer_1415P3_tags_4, - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P3_tags_4) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P3_tags_4[0]), /* 1 */ - asn_DEF_ProtocolIE_SingleContainer_1415P3_tags_4, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P3_tags_4) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P3_tags_4[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunction_ItemIEs_13, - 3, /* Elements count */ - &asn_SPC_RANfunction_ItemIEs_specs_13 /* Additional specs */ -}; - -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_1415P4_tags_5[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P4 = { - "ProtocolIE-SingleContainer", - "ProtocolIE-SingleContainer", - &asn_OP_SEQUENCE, - asn_DEF_ProtocolIE_SingleContainer_1415P4_tags_5, - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P4_tags_5) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P4_tags_5[0]), /* 1 */ - asn_DEF_ProtocolIE_SingleContainer_1415P4_tags_5, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P4_tags_5) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P4_tags_5[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunctionID_ItemIEs_17, - 3, /* Elements count */ - &asn_SPC_RANfunctionID_ItemIEs_specs_17 /* Additional specs */ -}; - -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_1415P5_tags_6[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P5 = { - "ProtocolIE-SingleContainer", - "ProtocolIE-SingleContainer", - &asn_OP_SEQUENCE, - asn_DEF_ProtocolIE_SingleContainer_1415P5_tags_6, - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P5_tags_6) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P5_tags_6[0]), /* 1 */ - asn_DEF_ProtocolIE_SingleContainer_1415P5_tags_6, /* Same as above */ - sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P5_tags_6) - /sizeof(asn_DEF_ProtocolIE_SingleContainer_1415P5_tags_6[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunctionIDcause_ItemIEs_21, - 3, /* Elements count */ - &asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ProtocolIE-SingleContainer.h b/Bouncer/asn1c_defs/ProtocolIE-SingleContainer.h deleted file mode 100644 index 5cf2853..0000000 --- a/Bouncer/asn1c_defs/ProtocolIE-SingleContainer.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-Containers" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ProtocolIE_SingleContainer_H_ -#define _ProtocolIE_SingleContainer_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Field.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* ProtocolIE-SingleContainer */ -typedef RICaction_ToBeSetup_ItemIEs_t ProtocolIE_SingleContainer_1415P0_t; -typedef RICaction_Admitted_ItemIEs_t ProtocolIE_SingleContainer_1415P1_t; -typedef RICaction_NotAdmitted_ItemIEs_t ProtocolIE_SingleContainer_1415P2_t; -typedef RANfunction_ItemIEs_t ProtocolIE_SingleContainer_1415P3_t; -typedef RANfunctionID_ItemIEs_t ProtocolIE_SingleContainer_1415P4_t; -typedef RANfunctionIDcause_ItemIEs_t ProtocolIE_SingleContainer_1415P5_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P0; -asn_struct_free_f ProtocolIE_SingleContainer_1415P0_free; -asn_struct_print_f ProtocolIE_SingleContainer_1415P0_print; -asn_constr_check_f ProtocolIE_SingleContainer_1415P0_constraint; -ber_type_decoder_f ProtocolIE_SingleContainer_1415P0_decode_ber; -der_type_encoder_f ProtocolIE_SingleContainer_1415P0_encode_der; -xer_type_decoder_f ProtocolIE_SingleContainer_1415P0_decode_xer; -xer_type_encoder_f ProtocolIE_SingleContainer_1415P0_encode_xer; -per_type_decoder_f ProtocolIE_SingleContainer_1415P0_decode_uper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P0_encode_uper; -per_type_decoder_f ProtocolIE_SingleContainer_1415P0_decode_aper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P0_encode_aper; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P1; -asn_struct_free_f ProtocolIE_SingleContainer_1415P1_free; -asn_struct_print_f ProtocolIE_SingleContainer_1415P1_print; -asn_constr_check_f ProtocolIE_SingleContainer_1415P1_constraint; -ber_type_decoder_f ProtocolIE_SingleContainer_1415P1_decode_ber; -der_type_encoder_f ProtocolIE_SingleContainer_1415P1_encode_der; -xer_type_decoder_f ProtocolIE_SingleContainer_1415P1_decode_xer; -xer_type_encoder_f ProtocolIE_SingleContainer_1415P1_encode_xer; -per_type_decoder_f ProtocolIE_SingleContainer_1415P1_decode_uper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P1_encode_uper; -per_type_decoder_f ProtocolIE_SingleContainer_1415P1_decode_aper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P1_encode_aper; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P2; -asn_struct_free_f ProtocolIE_SingleContainer_1415P2_free; -asn_struct_print_f ProtocolIE_SingleContainer_1415P2_print; -asn_constr_check_f ProtocolIE_SingleContainer_1415P2_constraint; -ber_type_decoder_f ProtocolIE_SingleContainer_1415P2_decode_ber; -der_type_encoder_f ProtocolIE_SingleContainer_1415P2_encode_der; -xer_type_decoder_f ProtocolIE_SingleContainer_1415P2_decode_xer; -xer_type_encoder_f ProtocolIE_SingleContainer_1415P2_encode_xer; -per_type_decoder_f ProtocolIE_SingleContainer_1415P2_decode_uper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P2_encode_uper; -per_type_decoder_f ProtocolIE_SingleContainer_1415P2_decode_aper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P2_encode_aper; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P3; -asn_struct_free_f ProtocolIE_SingleContainer_1415P3_free; -asn_struct_print_f ProtocolIE_SingleContainer_1415P3_print; -asn_constr_check_f ProtocolIE_SingleContainer_1415P3_constraint; -ber_type_decoder_f ProtocolIE_SingleContainer_1415P3_decode_ber; -der_type_encoder_f ProtocolIE_SingleContainer_1415P3_encode_der; -xer_type_decoder_f ProtocolIE_SingleContainer_1415P3_decode_xer; -xer_type_encoder_f ProtocolIE_SingleContainer_1415P3_encode_xer; -per_type_decoder_f ProtocolIE_SingleContainer_1415P3_decode_uper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P3_encode_uper; -per_type_decoder_f ProtocolIE_SingleContainer_1415P3_decode_aper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P3_encode_aper; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P4; -asn_struct_free_f ProtocolIE_SingleContainer_1415P4_free; -asn_struct_print_f ProtocolIE_SingleContainer_1415P4_print; -asn_constr_check_f ProtocolIE_SingleContainer_1415P4_constraint; -ber_type_decoder_f ProtocolIE_SingleContainer_1415P4_decode_ber; -der_type_encoder_f ProtocolIE_SingleContainer_1415P4_encode_der; -xer_type_decoder_f ProtocolIE_SingleContainer_1415P4_decode_xer; -xer_type_encoder_f ProtocolIE_SingleContainer_1415P4_encode_xer; -per_type_decoder_f ProtocolIE_SingleContainer_1415P4_decode_uper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P4_encode_uper; -per_type_decoder_f ProtocolIE_SingleContainer_1415P4_decode_aper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P4_encode_aper; -extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_1415P5; -asn_struct_free_f ProtocolIE_SingleContainer_1415P5_free; -asn_struct_print_f ProtocolIE_SingleContainer_1415P5_print; -asn_constr_check_f ProtocolIE_SingleContainer_1415P5_constraint; -ber_type_decoder_f ProtocolIE_SingleContainer_1415P5_decode_ber; -der_type_encoder_f ProtocolIE_SingleContainer_1415P5_encode_der; -xer_type_decoder_f ProtocolIE_SingleContainer_1415P5_decode_xer; -xer_type_encoder_f ProtocolIE_SingleContainer_1415P5_encode_xer; -per_type_decoder_f ProtocolIE_SingleContainer_1415P5_decode_uper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P5_encode_uper; -per_type_decoder_f ProtocolIE_SingleContainer_1415P5_decode_aper; -per_type_encoder_f ProtocolIE_SingleContainer_1415P5_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _ProtocolIE_SingleContainer_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunction-Item.c b/Bouncer/asn1c_defs/RANfunction-Item.c deleted file mode 100644 index 9d60d21..0000000 --- a/Bouncer/asn1c_defs/RANfunction-Item.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunction-Item.h" - -static asn_TYPE_member_t asn_MBR_RANfunction_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranFunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionDefinition), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANfunctionDefinition, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranFunctionDefinition" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionRevision), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANfunctionRevision, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranFunctionRevision" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunction_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RANfunction_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunctionID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranFunctionDefinition */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranFunctionRevision */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Item_specs_1 = { - sizeof(struct RANfunction_Item), - offsetof(struct RANfunction_Item, _asn_ctx), - asn_MAP_RANfunction_Item_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 3, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunction_Item = { - "RANfunction-Item", - "RANfunction-Item", - &asn_OP_SEQUENCE, - asn_DEF_RANfunction_Item_tags_1, - sizeof(asn_DEF_RANfunction_Item_tags_1) - /sizeof(asn_DEF_RANfunction_Item_tags_1[0]), /* 1 */ - asn_DEF_RANfunction_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunction_Item_tags_1) - /sizeof(asn_DEF_RANfunction_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunction_Item_1, - 3, /* Elements count */ - &asn_SPC_RANfunction_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunction-Item.h b/Bouncer/asn1c_defs/RANfunction-Item.h deleted file mode 100644 index 3877316..0000000 --- a/Bouncer/asn1c_defs/RANfunction-Item.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunction_Item_H_ -#define _RANfunction_Item_H_ - - -#include - -/* Including external dependencies */ -#include "RANfunctionID.h" -#include "RANfunctionDefinition.h" -#include "RANfunctionRevision.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANfunction-Item */ -typedef struct RANfunction_Item { - RANfunctionID_t ranFunctionID; - RANfunctionDefinition_t ranFunctionDefinition; - RANfunctionRevision_t ranFunctionRevision; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunction_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANfunction_Item; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunction_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctionDefinition.c b/Bouncer/asn1c_defs/RANfunctionDefinition.c deleted file mode 100644 index bec3c36..0000000 --- a/Bouncer/asn1c_defs/RANfunctionDefinition.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctionDefinition.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RANfunctionDefinition_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionDefinition = { - "RANfunctionDefinition", - "RANfunctionDefinition", - &asn_OP_OCTET_STRING, - asn_DEF_RANfunctionDefinition_tags_1, - sizeof(asn_DEF_RANfunctionDefinition_tags_1) - /sizeof(asn_DEF_RANfunctionDefinition_tags_1[0]), /* 1 */ - asn_DEF_RANfunctionDefinition_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctionDefinition_tags_1) - /sizeof(asn_DEF_RANfunctionDefinition_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctionDefinition.h b/Bouncer/asn1c_defs/RANfunctionDefinition.h deleted file mode 100644 index 2fdead2..0000000 --- a/Bouncer/asn1c_defs/RANfunctionDefinition.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctionDefinition_H_ -#define _RANfunctionDefinition_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANfunctionDefinition */ -typedef OCTET_STRING_t RANfunctionDefinition_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionDefinition; -asn_struct_free_f RANfunctionDefinition_free; -asn_struct_print_f RANfunctionDefinition_print; -asn_constr_check_f RANfunctionDefinition_constraint; -ber_type_decoder_f RANfunctionDefinition_decode_ber; -der_type_encoder_f RANfunctionDefinition_encode_der; -xer_type_decoder_f RANfunctionDefinition_decode_xer; -xer_type_encoder_f RANfunctionDefinition_encode_xer; -per_type_decoder_f RANfunctionDefinition_decode_uper; -per_type_encoder_f RANfunctionDefinition_encode_uper; -per_type_decoder_f RANfunctionDefinition_decode_aper; -per_type_encoder_f RANfunctionDefinition_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctionDefinition_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctionID-Item.c b/Bouncer/asn1c_defs/RANfunctionID-Item.c deleted file mode 100644 index 7a2c15c..0000000 --- a/Bouncer/asn1c_defs/RANfunctionID-Item.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctionID-Item.h" - -static asn_TYPE_member_t asn_MBR_RANfunctionID_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_Item, ranFunctionID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranFunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_Item, ranFunctionRevision), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANfunctionRevision, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranFunctionRevision" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionID_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RANfunctionID_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunctionID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranFunctionRevision */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_Item_specs_1 = { - sizeof(struct RANfunctionID_Item), - offsetof(struct RANfunctionID_Item, _asn_ctx), - asn_MAP_RANfunctionID_Item_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionID_Item = { - "RANfunctionID-Item", - "RANfunctionID-Item", - &asn_OP_SEQUENCE, - asn_DEF_RANfunctionID_Item_tags_1, - sizeof(asn_DEF_RANfunctionID_Item_tags_1) - /sizeof(asn_DEF_RANfunctionID_Item_tags_1[0]), /* 1 */ - asn_DEF_RANfunctionID_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctionID_Item_tags_1) - /sizeof(asn_DEF_RANfunctionID_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunctionID_Item_1, - 2, /* Elements count */ - &asn_SPC_RANfunctionID_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctionID-Item.h b/Bouncer/asn1c_defs/RANfunctionID-Item.h deleted file mode 100644 index 30fb177..0000000 --- a/Bouncer/asn1c_defs/RANfunctionID-Item.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctionID_Item_H_ -#define _RANfunctionID_Item_H_ - - -#include - -/* Including external dependencies */ -#include "RANfunctionID.h" -#include "RANfunctionRevision.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANfunctionID-Item */ -typedef struct RANfunctionID_Item { - RANfunctionID_t ranFunctionID; - RANfunctionRevision_t ranFunctionRevision; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunctionID_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionID_Item; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctionID_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctionID.c b/Bouncer/asn1c_defs/RANfunctionID.c deleted file mode 100644 index ca5602f..0000000 --- a/Bouncer/asn1c_defs/RANfunctionID.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctionID.h" - -int -RANfunctionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 4095)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RANfunctionID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionID = { - "RANfunctionID", - "RANfunctionID", - &asn_OP_NativeInteger, - asn_DEF_RANfunctionID_tags_1, - sizeof(asn_DEF_RANfunctionID_tags_1) - /sizeof(asn_DEF_RANfunctionID_tags_1[0]), /* 1 */ - asn_DEF_RANfunctionID_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctionID_tags_1) - /sizeof(asn_DEF_RANfunctionID_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RANfunctionID_constr_1, RANfunctionID_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctionID.h b/Bouncer/asn1c_defs/RANfunctionID.h deleted file mode 100644 index e8ea3f6..0000000 --- a/Bouncer/asn1c_defs/RANfunctionID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctionID_H_ -#define _RANfunctionID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANfunctionID */ -typedef long RANfunctionID_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RANfunctionID_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionID; -asn_struct_free_f RANfunctionID_free; -asn_struct_print_f RANfunctionID_print; -asn_constr_check_f RANfunctionID_constraint; -ber_type_decoder_f RANfunctionID_decode_ber; -der_type_encoder_f RANfunctionID_encode_der; -xer_type_decoder_f RANfunctionID_decode_xer; -xer_type_encoder_f RANfunctionID_encode_xer; -per_type_decoder_f RANfunctionID_decode_uper; -per_type_encoder_f RANfunctionID_encode_uper; -per_type_decoder_f RANfunctionID_decode_aper; -per_type_encoder_f RANfunctionID_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctionID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctionIDcause-Item.c b/Bouncer/asn1c_defs/RANfunctionIDcause-Item.c deleted file mode 100644 index aca1f62..0000000 --- a/Bouncer/asn1c_defs/RANfunctionIDcause-Item.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctionIDcause-Item.h" - -static asn_TYPE_member_t asn_MBR_RANfunctionIDcause_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_Item, ranFunctionID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANfunctionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranFunctionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_Item, cause), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_Cause, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "cause" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionIDcause_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RANfunctionIDcause_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunctionID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cause */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_Item_specs_1 = { - sizeof(struct RANfunctionIDcause_Item), - offsetof(struct RANfunctionIDcause_Item, _asn_ctx), - asn_MAP_RANfunctionIDcause_Item_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_Item = { - "RANfunctionIDcause-Item", - "RANfunctionIDcause-Item", - &asn_OP_SEQUENCE, - asn_DEF_RANfunctionIDcause_Item_tags_1, - sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1) - /sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1[0]), /* 1 */ - asn_DEF_RANfunctionIDcause_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1) - /sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANfunctionIDcause_Item_1, - 2, /* Elements count */ - &asn_SPC_RANfunctionIDcause_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctionIDcause-Item.h b/Bouncer/asn1c_defs/RANfunctionIDcause-Item.h deleted file mode 100644 index c4505b5..0000000 --- a/Bouncer/asn1c_defs/RANfunctionIDcause-Item.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctionIDcause_Item_H_ -#define _RANfunctionIDcause_Item_H_ - - -#include - -/* Including external dependencies */ -#include "RANfunctionID.h" -#include "Cause.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANfunctionIDcause-Item */ -typedef struct RANfunctionIDcause_Item { - RANfunctionID_t ranFunctionID; - Cause_t cause; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunctionIDcause_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_Item; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctionIDcause_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctionRevision.c b/Bouncer/asn1c_defs/RANfunctionRevision.c deleted file mode 100644 index 563dda0..0000000 --- a/Bouncer/asn1c_defs/RANfunctionRevision.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctionRevision.h" - -int -RANfunctionRevision_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 4095)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RANfunctionRevision_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionRevision_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionRevision = { - "RANfunctionRevision", - "RANfunctionRevision", - &asn_OP_NativeInteger, - asn_DEF_RANfunctionRevision_tags_1, - sizeof(asn_DEF_RANfunctionRevision_tags_1) - /sizeof(asn_DEF_RANfunctionRevision_tags_1[0]), /* 1 */ - asn_DEF_RANfunctionRevision_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctionRevision_tags_1) - /sizeof(asn_DEF_RANfunctionRevision_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RANfunctionRevision_constr_1, RANfunctionRevision_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctionRevision.h b/Bouncer/asn1c_defs/RANfunctionRevision.h deleted file mode 100644 index 74853ea..0000000 --- a/Bouncer/asn1c_defs/RANfunctionRevision.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctionRevision_H_ -#define _RANfunctionRevision_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANfunctionRevision */ -typedef long RANfunctionRevision_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RANfunctionRevision_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionRevision; -asn_struct_free_f RANfunctionRevision_free; -asn_struct_print_f RANfunctionRevision_print; -asn_constr_check_f RANfunctionRevision_constraint; -ber_type_decoder_f RANfunctionRevision_decode_ber; -der_type_encoder_f RANfunctionRevision_encode_der; -xer_type_decoder_f RANfunctionRevision_decode_xer; -xer_type_encoder_f RANfunctionRevision_encode_xer; -per_type_decoder_f RANfunctionRevision_decode_uper; -per_type_encoder_f RANfunctionRevision_encode_uper; -per_type_decoder_f RANfunctionRevision_decode_aper; -per_type_encoder_f RANfunctionRevision_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctionRevision_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctions-List.c b/Bouncer/asn1c_defs/RANfunctions-List.c deleted file mode 100644 index 12912e0..0000000 --- a/Bouncer/asn1c_defs/RANfunctions-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctions-List.h" - -#include "ProtocolIE-SingleContainer.h" -static asn_per_constraints_t asn_PER_type_RANfunctions_List_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 9, 9, 0, 256 } /* (SIZE(0..256)) */, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_RANfunctions_List_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ProtocolIE_SingleContainer_1415P3, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunctions_List_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_RANfunctions_List_specs_1 = { - sizeof(struct RANfunctions_List), - offsetof(struct RANfunctions_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctions_List = { - "RANfunctions-List", - "RANfunctions-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_RANfunctions_List_tags_1, - sizeof(asn_DEF_RANfunctions_List_tags_1) - /sizeof(asn_DEF_RANfunctions_List_tags_1[0]), /* 1 */ - asn_DEF_RANfunctions_List_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctions_List_tags_1) - /sizeof(asn_DEF_RANfunctions_List_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RANfunctions_List_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_RANfunctions_List_1, - 1, /* Single element */ - &asn_SPC_RANfunctions_List_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctions-List.h b/Bouncer/asn1c_defs/RANfunctions-List.h deleted file mode 100644 index 6a4a41a..0000000 --- a/Bouncer/asn1c_defs/RANfunctions-List.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctions_List_H_ -#define _RANfunctions_List_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct ProtocolIE_SingleContainer; - -/* RANfunctions-List */ -typedef struct RANfunctions_List { - A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunctions_List_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANfunctions_List; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctions_List_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctionsID-List.c b/Bouncer/asn1c_defs/RANfunctionsID-List.c deleted file mode 100644 index 3e5dda5..0000000 --- a/Bouncer/asn1c_defs/RANfunctionsID-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctionsID-List.h" - -#include "ProtocolIE-SingleContainer.h" -static asn_per_constraints_t asn_PER_type_RANfunctionsID_List_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 9, 9, 0, 256 } /* (SIZE(0..256)) */, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_RANfunctionsID_List_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ProtocolIE_SingleContainer_1415P4, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionsID_List_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_RANfunctionsID_List_specs_1 = { - sizeof(struct RANfunctionsID_List), - offsetof(struct RANfunctionsID_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionsID_List = { - "RANfunctionsID-List", - "RANfunctionsID-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_RANfunctionsID_List_tags_1, - sizeof(asn_DEF_RANfunctionsID_List_tags_1) - /sizeof(asn_DEF_RANfunctionsID_List_tags_1[0]), /* 1 */ - asn_DEF_RANfunctionsID_List_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctionsID_List_tags_1) - /sizeof(asn_DEF_RANfunctionsID_List_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RANfunctionsID_List_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_RANfunctionsID_List_1, - 1, /* Single element */ - &asn_SPC_RANfunctionsID_List_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctionsID-List.h b/Bouncer/asn1c_defs/RANfunctionsID-List.h deleted file mode 100644 index 5313c5c..0000000 --- a/Bouncer/asn1c_defs/RANfunctionsID-List.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctionsID_List_H_ -#define _RANfunctionsID_List_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct ProtocolIE_SingleContainer; - -/* RANfunctionsID-List */ -typedef struct RANfunctionsID_List { - A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunctionsID_List_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionsID_List; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctionsID_List_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANfunctionsIDcause-List.c b/Bouncer/asn1c_defs/RANfunctionsIDcause-List.c deleted file mode 100644 index 75fa57f..0000000 --- a/Bouncer/asn1c_defs/RANfunctionsIDcause-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANfunctionsIDcause-List.h" - -#include "ProtocolIE-SingleContainer.h" -static asn_per_constraints_t asn_PER_type_RANfunctionsIDcause_List_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 9, 9, 0, 256 } /* (SIZE(0..256)) */, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_RANfunctionsIDcause_List_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ProtocolIE_SingleContainer_1415P5, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANfunctionsIDcause_List_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_RANfunctionsIDcause_List_specs_1 = { - sizeof(struct RANfunctionsIDcause_List), - offsetof(struct RANfunctionsIDcause_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_RANfunctionsIDcause_List = { - "RANfunctionsIDcause-List", - "RANfunctionsIDcause-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_RANfunctionsIDcause_List_tags_1, - sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1) - /sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1[0]), /* 1 */ - asn_DEF_RANfunctionsIDcause_List_tags_1, /* Same as above */ - sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1) - /sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RANfunctionsIDcause_List_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_RANfunctionsIDcause_List_1, - 1, /* Single element */ - &asn_SPC_RANfunctionsIDcause_List_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANfunctionsIDcause-List.h b/Bouncer/asn1c_defs/RANfunctionsIDcause-List.h deleted file mode 100644 index d1cbefd..0000000 --- a/Bouncer/asn1c_defs/RANfunctionsIDcause-List.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANfunctionsIDcause_List_H_ -#define _RANfunctionsIDcause_List_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct ProtocolIE_SingleContainer; - -/* RANfunctionsIDcause-List */ -typedef struct RANfunctionsIDcause_List { - A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANfunctionsIDcause_List_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANfunctionsIDcause_List; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANfunctionsIDcause_List_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANparameter-ID.c b/Bouncer/asn1c_defs/RANparameter-ID.c deleted file mode 100644 index 7f81582..0000000 --- a/Bouncer/asn1c_defs/RANparameter-ID.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANparameter-ID.h" - -int -RANparameter_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 255)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RANparameter_ID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_RANparameter_ID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RANparameter_ID = { - "RANparameter-ID", - "RANparameter-ID", - &asn_OP_NativeInteger, - asn_DEF_RANparameter_ID_tags_1, - sizeof(asn_DEF_RANparameter_ID_tags_1) - /sizeof(asn_DEF_RANparameter_ID_tags_1[0]), /* 1 */ - asn_DEF_RANparameter_ID_tags_1, /* Same as above */ - sizeof(asn_DEF_RANparameter_ID_tags_1) - /sizeof(asn_DEF_RANparameter_ID_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RANparameter_ID_constr_1, RANparameter_ID_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/RANparameter-ID.h b/Bouncer/asn1c_defs/RANparameter-ID.h deleted file mode 100644 index 8b52f95..0000000 --- a/Bouncer/asn1c_defs/RANparameter-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANparameter_ID_H_ -#define _RANparameter_ID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANparameter-ID */ -typedef long RANparameter_ID_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RANparameter_ID_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RANparameter_ID; -asn_struct_free_f RANparameter_ID_free; -asn_struct_print_f RANparameter_ID_print; -asn_constr_check_f RANparameter_ID_constraint; -ber_type_decoder_f RANparameter_ID_decode_ber; -der_type_encoder_f RANparameter_ID_encode_der; -xer_type_decoder_f RANparameter_ID_decode_xer; -xer_type_encoder_f RANparameter_ID_encode_xer; -per_type_decoder_f RANparameter_ID_decode_uper; -per_type_encoder_f RANparameter_ID_encode_uper; -per_type_decoder_f RANparameter_ID_decode_aper; -per_type_encoder_f RANparameter_ID_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANparameter_ID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANparameter-Item.c b/Bouncer/asn1c_defs/RANparameter-Item.c deleted file mode 100644 index a5afd51..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Item.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANparameter-Item.h" - -asn_TYPE_member_t asn_MBR_RANparameter_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANparameter_Item, ranParameter_ID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANparameter_ID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranParameter-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANparameter_Item, ranParameter_Name), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANparameter_Name, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranParameter-Name" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANparameter_Item, ranParameter_Test), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANparameter_Test, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranParameter-Test" - }, - { ATF_NOFLAGS, 0, offsetof(struct RANparameter_Item, ranParameter_Value), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANparameter_Value, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ranParameter-Value" - }, -}; -static const ber_tlv_tag_t asn_DEF_RANparameter_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RANparameter_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-Name */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranParameter-Test */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ranParameter-Value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RANparameter_Item_specs_1 = { - sizeof(struct RANparameter_Item), - offsetof(struct RANparameter_Item, _asn_ctx), - asn_MAP_RANparameter_Item_tag2el_1, - 4, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 4, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RANparameter_Item = { - "RANparameter-Item", - "RANparameter-Item", - &asn_OP_SEQUENCE, - asn_DEF_RANparameter_Item_tags_1, - sizeof(asn_DEF_RANparameter_Item_tags_1) - /sizeof(asn_DEF_RANparameter_Item_tags_1[0]), /* 1 */ - asn_DEF_RANparameter_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_RANparameter_Item_tags_1) - /sizeof(asn_DEF_RANparameter_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RANparameter_Item_1, - 4, /* Elements count */ - &asn_SPC_RANparameter_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANparameter-Item.h b/Bouncer/asn1c_defs/RANparameter-Item.h deleted file mode 100644 index 538cb33..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Item.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANparameter_Item_H_ -#define _RANparameter_Item_H_ - - -#include - -/* Including external dependencies */ -#include "RANparameter-ID.h" -#include "RANparameter-Name.h" -#include "RANparameter-Test.h" -#include "RANparameter-Value.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANparameter-Item */ -typedef struct RANparameter_Item { - RANparameter_ID_t ranParameter_ID; - RANparameter_Name_t ranParameter_Name; - RANparameter_Test_t ranParameter_Test; - RANparameter_Value_t ranParameter_Value; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RANparameter_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANparameter_Item; -extern asn_SEQUENCE_specifics_t asn_SPC_RANparameter_Item_specs_1; -extern asn_TYPE_member_t asn_MBR_RANparameter_Item_1[4]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANparameter_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANparameter-Name.c b/Bouncer/asn1c_defs/RANparameter-Name.c deleted file mode 100644 index f438227..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Name.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANparameter-Name.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RANparameter_Name_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RANparameter_Name = { - "RANparameter-Name", - "RANparameter-Name", - &asn_OP_OCTET_STRING, - asn_DEF_RANparameter_Name_tags_1, - sizeof(asn_DEF_RANparameter_Name_tags_1) - /sizeof(asn_DEF_RANparameter_Name_tags_1[0]), /* 1 */ - asn_DEF_RANparameter_Name_tags_1, /* Same as above */ - sizeof(asn_DEF_RANparameter_Name_tags_1) - /sizeof(asn_DEF_RANparameter_Name_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANparameter-Name.h b/Bouncer/asn1c_defs/RANparameter-Name.h deleted file mode 100644 index 16031b9..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Name.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANparameter_Name_H_ -#define _RANparameter_Name_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANparameter-Name */ -typedef OCTET_STRING_t RANparameter_Name_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANparameter_Name; -asn_struct_free_f RANparameter_Name_free; -asn_struct_print_f RANparameter_Name_print; -asn_constr_check_f RANparameter_Name_constraint; -ber_type_decoder_f RANparameter_Name_decode_ber; -der_type_encoder_f RANparameter_Name_encode_der; -xer_type_decoder_f RANparameter_Name_decode_xer; -xer_type_encoder_f RANparameter_Name_encode_xer; -per_type_decoder_f RANparameter_Name_decode_uper; -per_type_encoder_f RANparameter_Name_encode_uper; -per_type_decoder_f RANparameter_Name_decode_aper; -per_type_encoder_f RANparameter_Name_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANparameter_Name_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANparameter-Test.c b/Bouncer/asn1c_defs/RANparameter-Test.c deleted file mode 100644 index 957969e..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Test.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANparameter-Test.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RANparameter_Test_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_RANparameter_Test_value2enum_1[] = { - { 0, 5, "equal" }, - { 1, 11, "greaterthan" }, - { 2, 8, "lessthan" }, - { 3, 8, "contains" }, - { 4, 7, "present" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_RANparameter_Test_enum2value_1[] = { - 3, /* contains(3) */ - 0, /* equal(0) */ - 1, /* greaterthan(1) */ - 2, /* lessthan(2) */ - 4 /* present(4) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_RANparameter_Test_specs_1 = { - asn_MAP_RANparameter_Test_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_RANparameter_Test_enum2value_1, /* N => "tag"; sorted by N */ - 5, /* Number of elements in the maps */ - 6, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_RANparameter_Test_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RANparameter_Test = { - "RANparameter-Test", - "RANparameter-Test", - &asn_OP_NativeEnumerated, - asn_DEF_RANparameter_Test_tags_1, - sizeof(asn_DEF_RANparameter_Test_tags_1) - /sizeof(asn_DEF_RANparameter_Test_tags_1[0]), /* 1 */ - asn_DEF_RANparameter_Test_tags_1, /* Same as above */ - sizeof(asn_DEF_RANparameter_Test_tags_1) - /sizeof(asn_DEF_RANparameter_Test_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RANparameter_Test_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_RANparameter_Test_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANparameter-Test.h b/Bouncer/asn1c_defs/RANparameter-Test.h deleted file mode 100644 index 88ed58e..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Test.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANparameter_Test_H_ -#define _RANparameter_Test_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RANparameter_Test { - RANparameter_Test_equal = 0, - RANparameter_Test_greaterthan = 1, - RANparameter_Test_lessthan = 2, - RANparameter_Test_contains = 3, - RANparameter_Test_present = 4 - /* - * Enumeration is extensible - */ -} e_RANparameter_Test; - -/* RANparameter-Test */ -typedef long RANparameter_Test_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RANparameter_Test_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RANparameter_Test; -extern const asn_INTEGER_specifics_t asn_SPC_RANparameter_Test_specs_1; -asn_struct_free_f RANparameter_Test_free; -asn_struct_print_f RANparameter_Test_print; -asn_constr_check_f RANparameter_Test_constraint; -ber_type_decoder_f RANparameter_Test_decode_ber; -der_type_encoder_f RANparameter_Test_encode_der; -xer_type_decoder_f RANparameter_Test_decode_xer; -xer_type_encoder_f RANparameter_Test_encode_xer; -per_type_decoder_f RANparameter_Test_decode_uper; -per_type_encoder_f RANparameter_Test_encode_uper; -per_type_decoder_f RANparameter_Test_decode_aper; -per_type_encoder_f RANparameter_Test_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANparameter_Test_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RANparameter-Value.c b/Bouncer/asn1c_defs/RANparameter-Value.c deleted file mode 100644 index e398738..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Value.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RANparameter-Value.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RANparameter_Value_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RANparameter_Value = { - "RANparameter-Value", - "RANparameter-Value", - &asn_OP_OCTET_STRING, - asn_DEF_RANparameter_Value_tags_1, - sizeof(asn_DEF_RANparameter_Value_tags_1) - /sizeof(asn_DEF_RANparameter_Value_tags_1[0]), /* 1 */ - asn_DEF_RANparameter_Value_tags_1, /* Same as above */ - sizeof(asn_DEF_RANparameter_Value_tags_1) - /sizeof(asn_DEF_RANparameter_Value_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RANparameter-Value.h b/Bouncer/asn1c_defs/RANparameter-Value.h deleted file mode 100644 index 7b0a2da..0000000 --- a/Bouncer/asn1c_defs/RANparameter-Value.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2SM-Bouncer-IEs" - * found in "/home/ubuntu/ASN-Defns/e2sm-Bouncer-v002.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RANparameter_Value_H_ -#define _RANparameter_Value_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RANparameter-Value */ -typedef OCTET_STRING_t RANparameter_Value_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RANparameter_Value; -asn_struct_free_f RANparameter_Value_free; -asn_struct_print_f RANparameter_Value_print; -asn_constr_check_f RANparameter_Value_constraint; -ber_type_decoder_f RANparameter_Value_decode_ber; -der_type_encoder_f RANparameter_Value_encode_der; -xer_type_decoder_f RANparameter_Value_decode_xer; -xer_type_encoder_f RANparameter_Value_encode_xer; -per_type_decoder_f RANparameter_Value_decode_uper; -per_type_encoder_f RANparameter_Value_encode_uper; -per_type_decoder_f RANparameter_Value_decode_aper; -per_type_encoder_f RANparameter_Value_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RANparameter_Value_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICaction-Admitted-Item.c b/Bouncer/asn1c_defs/RICaction-Admitted-Item.c deleted file mode 100644 index 01034b5..0000000 --- a/Bouncer/asn1c_defs/RICaction-Admitted-Item.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICaction-Admitted-Item.h" - -static asn_TYPE_member_t asn_MBR_RICaction_Admitted_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_Item, ricActionID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICactionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricActionID" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_Admitted_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ricActionID */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_Item_specs_1 = { - sizeof(struct RICaction_Admitted_Item), - offsetof(struct RICaction_Admitted_Item, _asn_ctx), - asn_MAP_RICaction_Admitted_Item_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_Item = { - "RICaction-Admitted-Item", - "RICaction-Admitted-Item", - &asn_OP_SEQUENCE, - asn_DEF_RICaction_Admitted_Item_tags_1, - sizeof(asn_DEF_RICaction_Admitted_Item_tags_1) - /sizeof(asn_DEF_RICaction_Admitted_Item_tags_1[0]), /* 1 */ - asn_DEF_RICaction_Admitted_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_RICaction_Admitted_Item_tags_1) - /sizeof(asn_DEF_RICaction_Admitted_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_Admitted_Item_1, - 1, /* Elements count */ - &asn_SPC_RICaction_Admitted_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICaction-Admitted-Item.h b/Bouncer/asn1c_defs/RICaction-Admitted-Item.h deleted file mode 100644 index 52cada2..0000000 --- a/Bouncer/asn1c_defs/RICaction-Admitted-Item.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICaction_Admitted_Item_H_ -#define _RICaction_Admitted_Item_H_ - - -#include - -/* Including external dependencies */ -#include "RICactionID.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICaction-Admitted-Item */ -typedef struct RICaction_Admitted_Item { - RICactionID_t ricActionID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_Admitted_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_Item; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICaction_Admitted_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICaction-Admitted-List.c b/Bouncer/asn1c_defs/RICaction-Admitted-List.c deleted file mode 100644 index acf003f..0000000 --- a/Bouncer/asn1c_defs/RICaction-Admitted-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICaction-Admitted-List.h" - -#include "ProtocolIE-SingleContainer.h" -static asn_per_constraints_t asn_PER_type_RICaction_Admitted_List_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_RICaction_Admitted_List_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ProtocolIE_SingleContainer_1415P1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_List_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_RICaction_Admitted_List_specs_1 = { - sizeof(struct RICaction_Admitted_List), - offsetof(struct RICaction_Admitted_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_List = { - "RICaction-Admitted-List", - "RICaction-Admitted-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_RICaction_Admitted_List_tags_1, - sizeof(asn_DEF_RICaction_Admitted_List_tags_1) - /sizeof(asn_DEF_RICaction_Admitted_List_tags_1[0]), /* 1 */ - asn_DEF_RICaction_Admitted_List_tags_1, /* Same as above */ - sizeof(asn_DEF_RICaction_Admitted_List_tags_1) - /sizeof(asn_DEF_RICaction_Admitted_List_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICaction_Admitted_List_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_RICaction_Admitted_List_1, - 1, /* Single element */ - &asn_SPC_RICaction_Admitted_List_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICaction-Admitted-List.h b/Bouncer/asn1c_defs/RICaction-Admitted-List.h deleted file mode 100644 index 063508c..0000000 --- a/Bouncer/asn1c_defs/RICaction-Admitted-List.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICaction_Admitted_List_H_ -#define _RICaction_Admitted_List_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct ProtocolIE_SingleContainer; - -/* RICaction-Admitted-List */ -typedef struct RICaction_Admitted_List { - A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_Admitted_List_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_List; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICaction_Admitted_List_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.c b/Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.c deleted file mode 100644 index 364fcd3..0000000 --- a/Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICaction-NotAdmitted-Item.h" - -static asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_Item, ricActionID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICactionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricActionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_Item, cause), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_Cause, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "cause" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_NotAdmitted_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricActionID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cause */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_Item_specs_1 = { - sizeof(struct RICaction_NotAdmitted_Item), - offsetof(struct RICaction_NotAdmitted_Item, _asn_ctx), - asn_MAP_RICaction_NotAdmitted_Item_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_Item = { - "RICaction-NotAdmitted-Item", - "RICaction-NotAdmitted-Item", - &asn_OP_SEQUENCE, - asn_DEF_RICaction_NotAdmitted_Item_tags_1, - sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1) - /sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1[0]), /* 1 */ - asn_DEF_RICaction_NotAdmitted_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1) - /sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_NotAdmitted_Item_1, - 2, /* Elements count */ - &asn_SPC_RICaction_NotAdmitted_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.h b/Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.h deleted file mode 100644 index 73826cc..0000000 --- a/Bouncer/asn1c_defs/RICaction-NotAdmitted-Item.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICaction_NotAdmitted_Item_H_ -#define _RICaction_NotAdmitted_Item_H_ - - -#include - -/* Including external dependencies */ -#include "RICactionID.h" -#include "Cause.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICaction-NotAdmitted-Item */ -typedef struct RICaction_NotAdmitted_Item { - RICactionID_t ricActionID; - Cause_t cause; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_NotAdmitted_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_Item; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICaction_NotAdmitted_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICaction-NotAdmitted-List.c b/Bouncer/asn1c_defs/RICaction-NotAdmitted-List.c deleted file mode 100644 index 4fdb387..0000000 --- a/Bouncer/asn1c_defs/RICaction-NotAdmitted-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICaction-NotAdmitted-List.h" - -#include "ProtocolIE-SingleContainer.h" -static asn_per_constraints_t asn_PER_type_RICaction_NotAdmitted_List_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 5, 5, 0, 16 } /* (SIZE(0..16)) */, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_List_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ProtocolIE_SingleContainer_1415P2, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_List_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_RICaction_NotAdmitted_List_specs_1 = { - sizeof(struct RICaction_NotAdmitted_List), - offsetof(struct RICaction_NotAdmitted_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_List = { - "RICaction-NotAdmitted-List", - "RICaction-NotAdmitted-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_RICaction_NotAdmitted_List_tags_1, - sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1) - /sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1[0]), /* 1 */ - asn_DEF_RICaction_NotAdmitted_List_tags_1, /* Same as above */ - sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1) - /sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICaction_NotAdmitted_List_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_RICaction_NotAdmitted_List_1, - 1, /* Single element */ - &asn_SPC_RICaction_NotAdmitted_List_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICaction-NotAdmitted-List.h b/Bouncer/asn1c_defs/RICaction-NotAdmitted-List.h deleted file mode 100644 index 4406da9..0000000 --- a/Bouncer/asn1c_defs/RICaction-NotAdmitted-List.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICaction_NotAdmitted_List_H_ -#define _RICaction_NotAdmitted_List_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct ProtocolIE_SingleContainer; - -/* RICaction-NotAdmitted-List */ -typedef struct RICaction_NotAdmitted_List { - A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_NotAdmitted_List_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_List; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICaction_NotAdmitted_List_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.c b/Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.c deleted file mode 100644 index 1e8983b..0000000 --- a/Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICaction-ToBeSetup-Item.h" - -#include "RICsubsequentAction.h" -static asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_Item, ricActionID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICactionID, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricActionID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_Item, ricActionType), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICactionType, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricActionType" - }, - { ATF_POINTER, 2, offsetof(struct RICaction_ToBeSetup_Item, ricActionDefinition), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICactionDefinition, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricActionDefinition" - }, - { ATF_POINTER, 1, offsetof(struct RICaction_ToBeSetup_Item, ricSubsequentAction), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICsubsequentAction, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricSubsequentAction" - }, -}; -static const int asn_MAP_RICaction_ToBeSetup_Item_oms_1[] = { 2, 3 }; -static const ber_tlv_tag_t asn_DEF_RICaction_ToBeSetup_Item_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_ToBeSetup_Item_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricActionID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricActionType */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ricActionDefinition */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ricSubsequentAction */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_Item_specs_1 = { - sizeof(struct RICaction_ToBeSetup_Item), - offsetof(struct RICaction_ToBeSetup_Item, _asn_ctx), - asn_MAP_RICaction_ToBeSetup_Item_tag2el_1, - 4, /* Count of tags in the map */ - asn_MAP_RICaction_ToBeSetup_Item_oms_1, /* Optional members */ - 2, 0, /* Root/Additions */ - 4, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_Item = { - "RICaction-ToBeSetup-Item", - "RICaction-ToBeSetup-Item", - &asn_OP_SEQUENCE, - asn_DEF_RICaction_ToBeSetup_Item_tags_1, - sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1) - /sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1[0]), /* 1 */ - asn_DEF_RICaction_ToBeSetup_Item_tags_1, /* Same as above */ - sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1) - /sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICaction_ToBeSetup_Item_1, - 4, /* Elements count */ - &asn_SPC_RICaction_ToBeSetup_Item_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.h b/Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.h deleted file mode 100644 index faf8bbf..0000000 --- a/Bouncer/asn1c_defs/RICaction-ToBeSetup-Item.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICaction_ToBeSetup_Item_H_ -#define _RICaction_ToBeSetup_Item_H_ - - -#include - -/* Including external dependencies */ -#include "RICactionID.h" -#include "RICactionType.h" -#include "RICactionDefinition.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct RICsubsequentAction; - -/* RICaction-ToBeSetup-Item */ -typedef struct RICaction_ToBeSetup_Item { - RICactionID_t ricActionID; - RICactionType_t ricActionType; - RICactionDefinition_t *ricActionDefinition; /* OPTIONAL */ - struct RICsubsequentAction *ricSubsequentAction; /* OPTIONAL */ - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICaction_ToBeSetup_Item_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_Item; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICaction_ToBeSetup_Item_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICactionDefinition.c b/Bouncer/asn1c_defs/RICactionDefinition.c deleted file mode 100644 index 3fcd14e..0000000 --- a/Bouncer/asn1c_defs/RICactionDefinition.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICactionDefinition.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICactionDefinition_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICactionDefinition = { - "RICactionDefinition", - "RICactionDefinition", - &asn_OP_OCTET_STRING, - asn_DEF_RICactionDefinition_tags_1, - sizeof(asn_DEF_RICactionDefinition_tags_1) - /sizeof(asn_DEF_RICactionDefinition_tags_1[0]), /* 1 */ - asn_DEF_RICactionDefinition_tags_1, /* Same as above */ - sizeof(asn_DEF_RICactionDefinition_tags_1) - /sizeof(asn_DEF_RICactionDefinition_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICactionDefinition.h b/Bouncer/asn1c_defs/RICactionDefinition.h deleted file mode 100644 index 489c195..0000000 --- a/Bouncer/asn1c_defs/RICactionDefinition.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICactionDefinition_H_ -#define _RICactionDefinition_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICactionDefinition */ -typedef OCTET_STRING_t RICactionDefinition_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICactionDefinition; -asn_struct_free_f RICactionDefinition_free; -asn_struct_print_f RICactionDefinition_print; -asn_constr_check_f RICactionDefinition_constraint; -ber_type_decoder_f RICactionDefinition_decode_ber; -der_type_encoder_f RICactionDefinition_encode_der; -xer_type_decoder_f RICactionDefinition_decode_xer; -xer_type_encoder_f RICactionDefinition_encode_xer; -per_type_decoder_f RICactionDefinition_decode_uper; -per_type_encoder_f RICactionDefinition_encode_uper; -per_type_decoder_f RICactionDefinition_decode_aper; -per_type_encoder_f RICactionDefinition_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICactionDefinition_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICactionID.c b/Bouncer/asn1c_defs/RICactionID.c deleted file mode 100644 index 0a94813..0000000 --- a/Bouncer/asn1c_defs/RICactionID.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICactionID.h" - -int -RICactionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 255)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RICactionID_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_RICactionID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICactionID = { - "RICactionID", - "RICactionID", - &asn_OP_NativeInteger, - asn_DEF_RICactionID_tags_1, - sizeof(asn_DEF_RICactionID_tags_1) - /sizeof(asn_DEF_RICactionID_tags_1[0]), /* 1 */ - asn_DEF_RICactionID_tags_1, /* Same as above */ - sizeof(asn_DEF_RICactionID_tags_1) - /sizeof(asn_DEF_RICactionID_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICactionID_constr_1, RICactionID_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/RICactionID.h b/Bouncer/asn1c_defs/RICactionID.h deleted file mode 100644 index 851d5b3..0000000 --- a/Bouncer/asn1c_defs/RICactionID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICactionID_H_ -#define _RICactionID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICactionID */ -typedef long RICactionID_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RICactionID_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RICactionID; -asn_struct_free_f RICactionID_free; -asn_struct_print_f RICactionID_print; -asn_constr_check_f RICactionID_constraint; -ber_type_decoder_f RICactionID_decode_ber; -der_type_encoder_f RICactionID_encode_der; -xer_type_decoder_f RICactionID_decode_xer; -xer_type_encoder_f RICactionID_encode_xer; -per_type_decoder_f RICactionID_decode_uper; -per_type_encoder_f RICactionID_encode_uper; -per_type_decoder_f RICactionID_decode_aper; -per_type_encoder_f RICactionID_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICactionID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICactionType.c b/Bouncer/asn1c_defs/RICactionType.c deleted file mode 100644 index 0469ed8..0000000 --- a/Bouncer/asn1c_defs/RICactionType.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICactionType.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RICactionType_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_RICactionType_value2enum_1[] = { - { 0, 6, "report" }, - { 1, 6, "insert" }, - { 2, 6, "policy" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_RICactionType_enum2value_1[] = { - 1, /* insert(1) */ - 2, /* policy(2) */ - 0 /* report(0) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_RICactionType_specs_1 = { - asn_MAP_RICactionType_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_RICactionType_enum2value_1, /* N => "tag"; sorted by N */ - 3, /* Number of elements in the maps */ - 4, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_RICactionType_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICactionType = { - "RICactionType", - "RICactionType", - &asn_OP_NativeEnumerated, - asn_DEF_RICactionType_tags_1, - sizeof(asn_DEF_RICactionType_tags_1) - /sizeof(asn_DEF_RICactionType_tags_1[0]), /* 1 */ - asn_DEF_RICactionType_tags_1, /* Same as above */ - sizeof(asn_DEF_RICactionType_tags_1) - /sizeof(asn_DEF_RICactionType_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICactionType_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_RICactionType_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICactionType.h b/Bouncer/asn1c_defs/RICactionType.h deleted file mode 100644 index bc4ae24..0000000 --- a/Bouncer/asn1c_defs/RICactionType.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICactionType_H_ -#define _RICactionType_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RICactionType { - RICactionType_report = 0, - RICactionType_insert = 1, - RICactionType_policy = 2 - /* - * Enumeration is extensible - */ -} e_RICactionType; - -/* RICactionType */ -typedef long RICactionType_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RICactionType_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RICactionType; -extern const asn_INTEGER_specifics_t asn_SPC_RICactionType_specs_1; -asn_struct_free_f RICactionType_free; -asn_struct_print_f RICactionType_print; -asn_constr_check_f RICactionType_constraint; -ber_type_decoder_f RICactionType_decode_ber; -der_type_encoder_f RICactionType_encode_der; -xer_type_decoder_f RICactionType_decode_xer; -xer_type_encoder_f RICactionType_encode_xer; -per_type_decoder_f RICactionType_decode_uper; -per_type_encoder_f RICactionType_encode_uper; -per_type_decoder_f RICactionType_decode_aper; -per_type_encoder_f RICactionType_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICactionType_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICactions-ToBeSetup-List.c b/Bouncer/asn1c_defs/RICactions-ToBeSetup-List.c deleted file mode 100644 index edf0d42..0000000 --- a/Bouncer/asn1c_defs/RICactions-ToBeSetup-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICactions-ToBeSetup-List.h" - -#include "ProtocolIE-SingleContainer.h" -asn_per_constraints_t asn_PER_type_RICactions_ToBeSetup_List_constr_1 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_RICactions_ToBeSetup_List_1[] = { - { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ProtocolIE_SingleContainer_1415P0, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICactions_ToBeSetup_List_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -asn_SET_OF_specifics_t asn_SPC_RICactions_ToBeSetup_List_specs_1 = { - sizeof(struct RICactions_ToBeSetup_List), - offsetof(struct RICactions_ToBeSetup_List, _asn_ctx), - 0, /* XER encoding is XMLDelimitedItemList */ -}; -asn_TYPE_descriptor_t asn_DEF_RICactions_ToBeSetup_List = { - "RICactions-ToBeSetup-List", - "RICactions-ToBeSetup-List", - &asn_OP_SEQUENCE_OF, - asn_DEF_RICactions_ToBeSetup_List_tags_1, - sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1) - /sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1[0]), /* 1 */ - asn_DEF_RICactions_ToBeSetup_List_tags_1, /* Same as above */ - sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1) - /sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICactions_ToBeSetup_List_constr_1, SEQUENCE_OF_constraint }, - asn_MBR_RICactions_ToBeSetup_List_1, - 1, /* Single element */ - &asn_SPC_RICactions_ToBeSetup_List_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICactions-ToBeSetup-List.h b/Bouncer/asn1c_defs/RICactions-ToBeSetup-List.h deleted file mode 100644 index 506bbb8..0000000 --- a/Bouncer/asn1c_defs/RICactions-ToBeSetup-List.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICactions_ToBeSetup_List_H_ -#define _RICactions_ToBeSetup_List_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Forward declarations */ -struct ProtocolIE_SingleContainer; - -/* RICactions-ToBeSetup-List */ -typedef struct RICactions_ToBeSetup_List { - A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICactions_ToBeSetup_List_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICactions_ToBeSetup_List; -extern asn_SET_OF_specifics_t asn_SPC_RICactions_ToBeSetup_List_specs_1; -extern asn_TYPE_member_t asn_MBR_RICactions_ToBeSetup_List_1[1]; -extern asn_per_constraints_t asn_PER_type_RICactions_ToBeSetup_List_constr_1; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICactions_ToBeSetup_List_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcallProcessID.c b/Bouncer/asn1c_defs/RICcallProcessID.c deleted file mode 100644 index 26f1de5..0000000 --- a/Bouncer/asn1c_defs/RICcallProcessID.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcallProcessID.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICcallProcessID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICcallProcessID = { - "RICcallProcessID", - "RICcallProcessID", - &asn_OP_OCTET_STRING, - asn_DEF_RICcallProcessID_tags_1, - sizeof(asn_DEF_RICcallProcessID_tags_1) - /sizeof(asn_DEF_RICcallProcessID_tags_1[0]), /* 1 */ - asn_DEF_RICcallProcessID_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcallProcessID_tags_1) - /sizeof(asn_DEF_RICcallProcessID_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcallProcessID.h b/Bouncer/asn1c_defs/RICcallProcessID.h deleted file mode 100644 index 6f72308..0000000 --- a/Bouncer/asn1c_defs/RICcallProcessID.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcallProcessID_H_ -#define _RICcallProcessID_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICcallProcessID */ -typedef OCTET_STRING_t RICcallProcessID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcallProcessID; -asn_struct_free_f RICcallProcessID_free; -asn_struct_print_f RICcallProcessID_print; -asn_constr_check_f RICcallProcessID_constraint; -ber_type_decoder_f RICcallProcessID_decode_ber; -der_type_encoder_f RICcallProcessID_encode_der; -xer_type_decoder_f RICcallProcessID_decode_xer; -xer_type_encoder_f RICcallProcessID_encode_xer; -per_type_decoder_f RICcallProcessID_decode_uper; -per_type_encoder_f RICcallProcessID_encode_uper; -per_type_decoder_f RICcallProcessID_decode_aper; -per_type_encoder_f RICcallProcessID_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcallProcessID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolAckRequest.c b/Bouncer/asn1c_defs/RICcontrolAckRequest.c deleted file mode 100644 index e6028d7..0000000 --- a/Bouncer/asn1c_defs/RICcontrolAckRequest.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolAckRequest.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -static asn_per_constraints_t asn_PER_type_RICcontrolAckRequest_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_RICcontrolAckRequest_value2enum_1[] = { - { 0, 5, "noAck" }, - { 1, 3, "ack" }, - { 2, 4, "nAck" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_RICcontrolAckRequest_enum2value_1[] = { - 1, /* ack(1) */ - 2, /* nAck(2) */ - 0 /* noAck(0) */ - /* This list is extensible */ -}; -static const asn_INTEGER_specifics_t asn_SPC_RICcontrolAckRequest_specs_1 = { - asn_MAP_RICcontrolAckRequest_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_RICcontrolAckRequest_enum2value_1, /* N => "tag"; sorted by N */ - 3, /* Number of elements in the maps */ - 4, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolAckRequest_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolAckRequest = { - "RICcontrolAckRequest", - "RICcontrolAckRequest", - &asn_OP_NativeEnumerated, - asn_DEF_RICcontrolAckRequest_tags_1, - sizeof(asn_DEF_RICcontrolAckRequest_tags_1) - /sizeof(asn_DEF_RICcontrolAckRequest_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolAckRequest_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolAckRequest_tags_1) - /sizeof(asn_DEF_RICcontrolAckRequest_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICcontrolAckRequest_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_RICcontrolAckRequest_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolAckRequest.h b/Bouncer/asn1c_defs/RICcontrolAckRequest.h deleted file mode 100644 index bdefee2..0000000 --- a/Bouncer/asn1c_defs/RICcontrolAckRequest.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolAckRequest_H_ -#define _RICcontrolAckRequest_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RICcontrolAckRequest { - RICcontrolAckRequest_noAck = 0, - RICcontrolAckRequest_ack = 1, - RICcontrolAckRequest_nAck = 2 - /* - * Enumeration is extensible - */ -} e_RICcontrolAckRequest; - -/* RICcontrolAckRequest */ -typedef long RICcontrolAckRequest_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolAckRequest; -asn_struct_free_f RICcontrolAckRequest_free; -asn_struct_print_f RICcontrolAckRequest_print; -asn_constr_check_f RICcontrolAckRequest_constraint; -ber_type_decoder_f RICcontrolAckRequest_decode_ber; -der_type_encoder_f RICcontrolAckRequest_encode_der; -xer_type_decoder_f RICcontrolAckRequest_decode_xer; -xer_type_encoder_f RICcontrolAckRequest_encode_xer; -per_type_decoder_f RICcontrolAckRequest_decode_uper; -per_type_encoder_f RICcontrolAckRequest_encode_uper; -per_type_decoder_f RICcontrolAckRequest_decode_aper; -per_type_encoder_f RICcontrolAckRequest_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolAckRequest_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolAcknowledge.c b/Bouncer/asn1c_defs/RICcontrolAcknowledge.c deleted file mode 100644 index 6c14811..0000000 --- a/Bouncer/asn1c_defs/RICcontrolAcknowledge.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolAcknowledge.h" - -asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P8, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolAcknowledge_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_specs_1 = { - sizeof(struct RICcontrolAcknowledge), - offsetof(struct RICcontrolAcknowledge, _asn_ctx), - asn_MAP_RICcontrolAcknowledge_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge = { - "RICcontrolAcknowledge", - "RICcontrolAcknowledge", - &asn_OP_SEQUENCE, - asn_DEF_RICcontrolAcknowledge_tags_1, - sizeof(asn_DEF_RICcontrolAcknowledge_tags_1) - /sizeof(asn_DEF_RICcontrolAcknowledge_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolAcknowledge_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolAcknowledge_tags_1) - /sizeof(asn_DEF_RICcontrolAcknowledge_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICcontrolAcknowledge_1, - 1, /* Elements count */ - &asn_SPC_RICcontrolAcknowledge_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolAcknowledge.h b/Bouncer/asn1c_defs/RICcontrolAcknowledge.h deleted file mode 100644 index f1d40b7..0000000 --- a/Bouncer/asn1c_defs/RICcontrolAcknowledge.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolAcknowledge_H_ -#define _RICcontrolAcknowledge_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICcontrolAcknowledge */ -typedef struct RICcontrolAcknowledge { - ProtocolIE_Container_1412P8_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICcontrolAcknowledge_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge; -extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_specs_1; -extern asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolAcknowledge_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolFailure.c b/Bouncer/asn1c_defs/RICcontrolFailure.c deleted file mode 100644 index 3fcef66..0000000 --- a/Bouncer/asn1c_defs/RICcontrolFailure.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolFailure.h" - -asn_TYPE_member_t asn_MBR_RICcontrolFailure_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P9, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolFailure_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_specs_1 = { - sizeof(struct RICcontrolFailure), - offsetof(struct RICcontrolFailure, _asn_ctx), - asn_MAP_RICcontrolFailure_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure = { - "RICcontrolFailure", - "RICcontrolFailure", - &asn_OP_SEQUENCE, - asn_DEF_RICcontrolFailure_tags_1, - sizeof(asn_DEF_RICcontrolFailure_tags_1) - /sizeof(asn_DEF_RICcontrolFailure_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolFailure_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolFailure_tags_1) - /sizeof(asn_DEF_RICcontrolFailure_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICcontrolFailure_1, - 1, /* Elements count */ - &asn_SPC_RICcontrolFailure_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolFailure.h b/Bouncer/asn1c_defs/RICcontrolFailure.h deleted file mode 100644 index 14b86d4..0000000 --- a/Bouncer/asn1c_defs/RICcontrolFailure.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolFailure_H_ -#define _RICcontrolFailure_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICcontrolFailure */ -typedef struct RICcontrolFailure { - ProtocolIE_Container_1412P9_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICcontrolFailure_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure; -extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_specs_1; -extern asn_TYPE_member_t asn_MBR_RICcontrolFailure_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolFailure_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolHeader.c b/Bouncer/asn1c_defs/RICcontrolHeader.c deleted file mode 100644 index 073f472..0000000 --- a/Bouncer/asn1c_defs/RICcontrolHeader.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolHeader.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICcontrolHeader_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolHeader = { - "RICcontrolHeader", - "RICcontrolHeader", - &asn_OP_OCTET_STRING, - asn_DEF_RICcontrolHeader_tags_1, - sizeof(asn_DEF_RICcontrolHeader_tags_1) - /sizeof(asn_DEF_RICcontrolHeader_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolHeader_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolHeader_tags_1) - /sizeof(asn_DEF_RICcontrolHeader_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolHeader.h b/Bouncer/asn1c_defs/RICcontrolHeader.h deleted file mode 100644 index 24c7187..0000000 --- a/Bouncer/asn1c_defs/RICcontrolHeader.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolHeader_H_ -#define _RICcontrolHeader_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICcontrolHeader */ -typedef OCTET_STRING_t RICcontrolHeader_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolHeader; -asn_struct_free_f RICcontrolHeader_free; -asn_struct_print_f RICcontrolHeader_print; -asn_constr_check_f RICcontrolHeader_constraint; -ber_type_decoder_f RICcontrolHeader_decode_ber; -der_type_encoder_f RICcontrolHeader_encode_der; -xer_type_decoder_f RICcontrolHeader_decode_xer; -xer_type_encoder_f RICcontrolHeader_encode_xer; -per_type_decoder_f RICcontrolHeader_decode_uper; -per_type_encoder_f RICcontrolHeader_encode_uper; -per_type_decoder_f RICcontrolHeader_decode_aper; -per_type_encoder_f RICcontrolHeader_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolHeader_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolMessage.c b/Bouncer/asn1c_defs/RICcontrolMessage.c deleted file mode 100644 index 8906e37..0000000 --- a/Bouncer/asn1c_defs/RICcontrolMessage.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolMessage.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICcontrolMessage_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolMessage = { - "RICcontrolMessage", - "RICcontrolMessage", - &asn_OP_OCTET_STRING, - asn_DEF_RICcontrolMessage_tags_1, - sizeof(asn_DEF_RICcontrolMessage_tags_1) - /sizeof(asn_DEF_RICcontrolMessage_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolMessage_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolMessage_tags_1) - /sizeof(asn_DEF_RICcontrolMessage_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolMessage.h b/Bouncer/asn1c_defs/RICcontrolMessage.h deleted file mode 100644 index dcd5ece..0000000 --- a/Bouncer/asn1c_defs/RICcontrolMessage.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolMessage_H_ -#define _RICcontrolMessage_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICcontrolMessage */ -typedef OCTET_STRING_t RICcontrolMessage_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolMessage; -asn_struct_free_f RICcontrolMessage_free; -asn_struct_print_f RICcontrolMessage_print; -asn_constr_check_f RICcontrolMessage_constraint; -ber_type_decoder_f RICcontrolMessage_decode_ber; -der_type_encoder_f RICcontrolMessage_encode_der; -xer_type_decoder_f RICcontrolMessage_decode_xer; -xer_type_encoder_f RICcontrolMessage_encode_xer; -per_type_decoder_f RICcontrolMessage_decode_uper; -per_type_encoder_f RICcontrolMessage_encode_uper; -per_type_decoder_f RICcontrolMessage_decode_aper; -per_type_encoder_f RICcontrolMessage_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolMessage_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolOutcome.c b/Bouncer/asn1c_defs/RICcontrolOutcome.c deleted file mode 100644 index 49e615a..0000000 --- a/Bouncer/asn1c_defs/RICcontrolOutcome.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolOutcome.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICcontrolOutcome_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolOutcome = { - "RICcontrolOutcome", - "RICcontrolOutcome", - &asn_OP_OCTET_STRING, - asn_DEF_RICcontrolOutcome_tags_1, - sizeof(asn_DEF_RICcontrolOutcome_tags_1) - /sizeof(asn_DEF_RICcontrolOutcome_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolOutcome_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolOutcome_tags_1) - /sizeof(asn_DEF_RICcontrolOutcome_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolOutcome.h b/Bouncer/asn1c_defs/RICcontrolOutcome.h deleted file mode 100644 index f185ee3..0000000 --- a/Bouncer/asn1c_defs/RICcontrolOutcome.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolOutcome_H_ -#define _RICcontrolOutcome_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICcontrolOutcome */ -typedef OCTET_STRING_t RICcontrolOutcome_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolOutcome; -asn_struct_free_f RICcontrolOutcome_free; -asn_struct_print_f RICcontrolOutcome_print; -asn_constr_check_f RICcontrolOutcome_constraint; -ber_type_decoder_f RICcontrolOutcome_decode_ber; -der_type_encoder_f RICcontrolOutcome_encode_der; -xer_type_decoder_f RICcontrolOutcome_decode_xer; -xer_type_encoder_f RICcontrolOutcome_encode_xer; -per_type_decoder_f RICcontrolOutcome_decode_uper; -per_type_encoder_f RICcontrolOutcome_encode_uper; -per_type_decoder_f RICcontrolOutcome_decode_aper; -per_type_encoder_f RICcontrolOutcome_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolOutcome_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolRequest.c b/Bouncer/asn1c_defs/RICcontrolRequest.c deleted file mode 100644 index e9aa676..0000000 --- a/Bouncer/asn1c_defs/RICcontrolRequest.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolRequest.h" - -asn_TYPE_member_t asn_MBR_RICcontrolRequest_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P7, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_specs_1 = { - sizeof(struct RICcontrolRequest), - offsetof(struct RICcontrolRequest, _asn_ctx), - asn_MAP_RICcontrolRequest_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest = { - "RICcontrolRequest", - "RICcontrolRequest", - &asn_OP_SEQUENCE, - asn_DEF_RICcontrolRequest_tags_1, - sizeof(asn_DEF_RICcontrolRequest_tags_1) - /sizeof(asn_DEF_RICcontrolRequest_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolRequest_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolRequest_tags_1) - /sizeof(asn_DEF_RICcontrolRequest_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICcontrolRequest_1, - 1, /* Elements count */ - &asn_SPC_RICcontrolRequest_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolRequest.h b/Bouncer/asn1c_defs/RICcontrolRequest.h deleted file mode 100644 index 18a8e9e..0000000 --- a/Bouncer/asn1c_defs/RICcontrolRequest.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolRequest_H_ -#define _RICcontrolRequest_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICcontrolRequest */ -typedef struct RICcontrolRequest { - ProtocolIE_Container_1412P7_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICcontrolRequest_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest; -extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_RICcontrolRequest_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolRequest_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICcontrolStatus.c b/Bouncer/asn1c_defs/RICcontrolStatus.c deleted file mode 100644 index 60c6fbf..0000000 --- a/Bouncer/asn1c_defs/RICcontrolStatus.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICcontrolStatus.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -static asn_per_constraints_t asn_PER_type_RICcontrolStatus_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_RICcontrolStatus_value2enum_1[] = { - { 0, 7, "success" }, - { 1, 8, "rejected" }, - { 2, 6, "failed" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_RICcontrolStatus_enum2value_1[] = { - 2, /* failed(2) */ - 1, /* rejected(1) */ - 0 /* success(0) */ - /* This list is extensible */ -}; -static const asn_INTEGER_specifics_t asn_SPC_RICcontrolStatus_specs_1 = { - asn_MAP_RICcontrolStatus_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_RICcontrolStatus_enum2value_1, /* N => "tag"; sorted by N */ - 3, /* Number of elements in the maps */ - 4, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_RICcontrolStatus_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICcontrolStatus = { - "RICcontrolStatus", - "RICcontrolStatus", - &asn_OP_NativeEnumerated, - asn_DEF_RICcontrolStatus_tags_1, - sizeof(asn_DEF_RICcontrolStatus_tags_1) - /sizeof(asn_DEF_RICcontrolStatus_tags_1[0]), /* 1 */ - asn_DEF_RICcontrolStatus_tags_1, /* Same as above */ - sizeof(asn_DEF_RICcontrolStatus_tags_1) - /sizeof(asn_DEF_RICcontrolStatus_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICcontrolStatus_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_RICcontrolStatus_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICcontrolStatus.h b/Bouncer/asn1c_defs/RICcontrolStatus.h deleted file mode 100644 index 8e09491..0000000 --- a/Bouncer/asn1c_defs/RICcontrolStatus.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICcontrolStatus_H_ -#define _RICcontrolStatus_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RICcontrolStatus { - RICcontrolStatus_success = 0, - RICcontrolStatus_rejected = 1, - RICcontrolStatus_failed = 2 - /* - * Enumeration is extensible - */ -} e_RICcontrolStatus; - -/* RICcontrolStatus */ -typedef long RICcontrolStatus_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICcontrolStatus; -asn_struct_free_f RICcontrolStatus_free; -asn_struct_print_f RICcontrolStatus_print; -asn_constr_check_f RICcontrolStatus_constraint; -ber_type_decoder_f RICcontrolStatus_decode_ber; -der_type_encoder_f RICcontrolStatus_encode_der; -xer_type_decoder_f RICcontrolStatus_decode_xer; -xer_type_encoder_f RICcontrolStatus_encode_xer; -per_type_decoder_f RICcontrolStatus_decode_uper; -per_type_encoder_f RICcontrolStatus_encode_uper; -per_type_decoder_f RICcontrolStatus_decode_aper; -per_type_encoder_f RICcontrolStatus_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICcontrolStatus_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICeventTriggerDefinition.c b/Bouncer/asn1c_defs/RICeventTriggerDefinition.c deleted file mode 100644 index 2aeaeab..0000000 --- a/Bouncer/asn1c_defs/RICeventTriggerDefinition.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICeventTriggerDefinition.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICeventTriggerDefinition_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICeventTriggerDefinition = { - "RICeventTriggerDefinition", - "RICeventTriggerDefinition", - &asn_OP_OCTET_STRING, - asn_DEF_RICeventTriggerDefinition_tags_1, - sizeof(asn_DEF_RICeventTriggerDefinition_tags_1) - /sizeof(asn_DEF_RICeventTriggerDefinition_tags_1[0]), /* 1 */ - asn_DEF_RICeventTriggerDefinition_tags_1, /* Same as above */ - sizeof(asn_DEF_RICeventTriggerDefinition_tags_1) - /sizeof(asn_DEF_RICeventTriggerDefinition_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICeventTriggerDefinition.h b/Bouncer/asn1c_defs/RICeventTriggerDefinition.h deleted file mode 100644 index 963c158..0000000 --- a/Bouncer/asn1c_defs/RICeventTriggerDefinition.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICeventTriggerDefinition_H_ -#define _RICeventTriggerDefinition_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICeventTriggerDefinition */ -typedef OCTET_STRING_t RICeventTriggerDefinition_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICeventTriggerDefinition; -asn_struct_free_f RICeventTriggerDefinition_free; -asn_struct_print_f RICeventTriggerDefinition_print; -asn_constr_check_f RICeventTriggerDefinition_constraint; -ber_type_decoder_f RICeventTriggerDefinition_decode_ber; -der_type_encoder_f RICeventTriggerDefinition_encode_der; -xer_type_decoder_f RICeventTriggerDefinition_decode_xer; -xer_type_encoder_f RICeventTriggerDefinition_encode_xer; -per_type_decoder_f RICeventTriggerDefinition_decode_uper; -per_type_encoder_f RICeventTriggerDefinition_encode_uper; -per_type_decoder_f RICeventTriggerDefinition_decode_aper; -per_type_encoder_f RICeventTriggerDefinition_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICeventTriggerDefinition_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICindication.c b/Bouncer/asn1c_defs/RICindication.c deleted file mode 100644 index 52c6f62..0000000 --- a/Bouncer/asn1c_defs/RICindication.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICindication.h" - -asn_TYPE_member_t asn_MBR_RICindication_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICindication, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P6, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICindication_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICindication_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICindication_specs_1 = { - sizeof(struct RICindication), - offsetof(struct RICindication, _asn_ctx), - asn_MAP_RICindication_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICindication = { - "RICindication", - "RICindication", - &asn_OP_SEQUENCE, - asn_DEF_RICindication_tags_1, - sizeof(asn_DEF_RICindication_tags_1) - /sizeof(asn_DEF_RICindication_tags_1[0]), /* 1 */ - asn_DEF_RICindication_tags_1, /* Same as above */ - sizeof(asn_DEF_RICindication_tags_1) - /sizeof(asn_DEF_RICindication_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICindication_1, - 1, /* Elements count */ - &asn_SPC_RICindication_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICindication.h b/Bouncer/asn1c_defs/RICindication.h deleted file mode 100644 index 3cab9e2..0000000 --- a/Bouncer/asn1c_defs/RICindication.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICindication_H_ -#define _RICindication_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICindication */ -typedef struct RICindication { - ProtocolIE_Container_1412P6_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICindication_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICindication; -extern asn_SEQUENCE_specifics_t asn_SPC_RICindication_specs_1; -extern asn_TYPE_member_t asn_MBR_RICindication_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICindication_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICindicationHeader.c b/Bouncer/asn1c_defs/RICindicationHeader.c deleted file mode 100644 index 77aa08e..0000000 --- a/Bouncer/asn1c_defs/RICindicationHeader.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICindicationHeader.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICindicationHeader_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICindicationHeader = { - "RICindicationHeader", - "RICindicationHeader", - &asn_OP_OCTET_STRING, - asn_DEF_RICindicationHeader_tags_1, - sizeof(asn_DEF_RICindicationHeader_tags_1) - /sizeof(asn_DEF_RICindicationHeader_tags_1[0]), /* 1 */ - asn_DEF_RICindicationHeader_tags_1, /* Same as above */ - sizeof(asn_DEF_RICindicationHeader_tags_1) - /sizeof(asn_DEF_RICindicationHeader_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICindicationHeader.h b/Bouncer/asn1c_defs/RICindicationHeader.h deleted file mode 100644 index 2ec1a1e..0000000 --- a/Bouncer/asn1c_defs/RICindicationHeader.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICindicationHeader_H_ -#define _RICindicationHeader_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICindicationHeader */ -typedef OCTET_STRING_t RICindicationHeader_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICindicationHeader; -asn_struct_free_f RICindicationHeader_free; -asn_struct_print_f RICindicationHeader_print; -asn_constr_check_f RICindicationHeader_constraint; -ber_type_decoder_f RICindicationHeader_decode_ber; -der_type_encoder_f RICindicationHeader_encode_der; -xer_type_decoder_f RICindicationHeader_decode_xer; -xer_type_encoder_f RICindicationHeader_encode_xer; -per_type_decoder_f RICindicationHeader_decode_uper; -per_type_encoder_f RICindicationHeader_encode_uper; -per_type_decoder_f RICindicationHeader_decode_aper; -per_type_encoder_f RICindicationHeader_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICindicationHeader_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICindicationMessage.c b/Bouncer/asn1c_defs/RICindicationMessage.c deleted file mode 100644 index 18db177..0000000 --- a/Bouncer/asn1c_defs/RICindicationMessage.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICindicationMessage.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_RICindicationMessage_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICindicationMessage = { - "RICindicationMessage", - "RICindicationMessage", - &asn_OP_OCTET_STRING, - asn_DEF_RICindicationMessage_tags_1, - sizeof(asn_DEF_RICindicationMessage_tags_1) - /sizeof(asn_DEF_RICindicationMessage_tags_1[0]), /* 1 */ - asn_DEF_RICindicationMessage_tags_1, /* Same as above */ - sizeof(asn_DEF_RICindicationMessage_tags_1) - /sizeof(asn_DEF_RICindicationMessage_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICindicationMessage.h b/Bouncer/asn1c_defs/RICindicationMessage.h deleted file mode 100644 index 2b198ca..0000000 --- a/Bouncer/asn1c_defs/RICindicationMessage.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICindicationMessage_H_ -#define _RICindicationMessage_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICindicationMessage */ -typedef OCTET_STRING_t RICindicationMessage_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICindicationMessage; -asn_struct_free_f RICindicationMessage_free; -asn_struct_print_f RICindicationMessage_print; -asn_constr_check_f RICindicationMessage_constraint; -ber_type_decoder_f RICindicationMessage_decode_ber; -der_type_encoder_f RICindicationMessage_encode_der; -xer_type_decoder_f RICindicationMessage_decode_xer; -xer_type_encoder_f RICindicationMessage_encode_xer; -per_type_decoder_f RICindicationMessage_decode_uper; -per_type_encoder_f RICindicationMessage_encode_uper; -per_type_decoder_f RICindicationMessage_decode_aper; -per_type_encoder_f RICindicationMessage_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICindicationMessage_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICindicationSN.c b/Bouncer/asn1c_defs/RICindicationSN.c deleted file mode 100644 index e458b29..0000000 --- a/Bouncer/asn1c_defs/RICindicationSN.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICindicationSN.h" - -int -RICindicationSN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -/* - * This type is implemented using NativeInteger, - * so here we adjust the DEF accordingly. - */ -static asn_per_constraints_t asn_PER_type_RICindicationSN_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const ber_tlv_tag_t asn_DEF_RICindicationSN_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICindicationSN = { - "RICindicationSN", - "RICindicationSN", - &asn_OP_NativeInteger, - asn_DEF_RICindicationSN_tags_1, - sizeof(asn_DEF_RICindicationSN_tags_1) - /sizeof(asn_DEF_RICindicationSN_tags_1[0]), /* 1 */ - asn_DEF_RICindicationSN_tags_1, /* Same as above */ - sizeof(asn_DEF_RICindicationSN_tags_1) - /sizeof(asn_DEF_RICindicationSN_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICindicationSN_constr_1, RICindicationSN_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ -}; - diff --git a/Bouncer/asn1c_defs/RICindicationSN.h b/Bouncer/asn1c_defs/RICindicationSN.h deleted file mode 100644 index 898a1c5..0000000 --- a/Bouncer/asn1c_defs/RICindicationSN.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICindicationSN_H_ -#define _RICindicationSN_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICindicationSN */ -typedef long RICindicationSN_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICindicationSN; -asn_struct_free_f RICindicationSN_free; -asn_struct_print_f RICindicationSN_print; -asn_constr_check_f RICindicationSN_constraint; -ber_type_decoder_f RICindicationSN_decode_ber; -der_type_encoder_f RICindicationSN_encode_der; -xer_type_decoder_f RICindicationSN_decode_xer; -xer_type_encoder_f RICindicationSN_encode_xer; -per_type_decoder_f RICindicationSN_decode_uper; -per_type_encoder_f RICindicationSN_encode_uper; -per_type_decoder_f RICindicationSN_decode_aper; -per_type_encoder_f RICindicationSN_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICindicationSN_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICindicationType.c b/Bouncer/asn1c_defs/RICindicationType.c deleted file mode 100644 index 2fb4a3d..0000000 --- a/Bouncer/asn1c_defs/RICindicationType.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICindicationType.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -static asn_per_constraints_t asn_PER_type_RICindicationType_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_RICindicationType_value2enum_1[] = { - { 0, 6, "report" }, - { 1, 6, "insert" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_RICindicationType_enum2value_1[] = { - 1, /* insert(1) */ - 0 /* report(0) */ - /* This list is extensible */ -}; -static const asn_INTEGER_specifics_t asn_SPC_RICindicationType_specs_1 = { - asn_MAP_RICindicationType_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_RICindicationType_enum2value_1, /* N => "tag"; sorted by N */ - 2, /* Number of elements in the maps */ - 3, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_RICindicationType_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICindicationType = { - "RICindicationType", - "RICindicationType", - &asn_OP_NativeEnumerated, - asn_DEF_RICindicationType_tags_1, - sizeof(asn_DEF_RICindicationType_tags_1) - /sizeof(asn_DEF_RICindicationType_tags_1[0]), /* 1 */ - asn_DEF_RICindicationType_tags_1, /* Same as above */ - sizeof(asn_DEF_RICindicationType_tags_1) - /sizeof(asn_DEF_RICindicationType_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICindicationType_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_RICindicationType_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICindicationType.h b/Bouncer/asn1c_defs/RICindicationType.h deleted file mode 100644 index d665337..0000000 --- a/Bouncer/asn1c_defs/RICindicationType.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICindicationType_H_ -#define _RICindicationType_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RICindicationType { - RICindicationType_report = 0, - RICindicationType_insert = 1 - /* - * Enumeration is extensible - */ -} e_RICindicationType; - -/* RICindicationType */ -typedef long RICindicationType_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICindicationType; -asn_struct_free_f RICindicationType_free; -asn_struct_print_f RICindicationType_print; -asn_constr_check_f RICindicationType_constraint; -ber_type_decoder_f RICindicationType_decode_ber; -der_type_encoder_f RICindicationType_encode_der; -xer_type_decoder_f RICindicationType_decode_xer; -xer_type_encoder_f RICindicationType_encode_xer; -per_type_decoder_f RICindicationType_decode_uper; -per_type_encoder_f RICindicationType_encode_uper; -per_type_decoder_f RICindicationType_decode_aper; -per_type_encoder_f RICindicationType_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICindicationType_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICrequestID.c b/Bouncer/asn1c_defs/RICrequestID.c deleted file mode 100644 index cc350e3..0000000 --- a/Bouncer/asn1c_defs/RICrequestID.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICrequestID.h" - -static int -memb_ricRequestorID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static int -memb_ricInstanceID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 65535)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_per_constraints_t asn_PER_memb_ricRequestorID_constr_2 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_ricInstanceID_constr_3 CC_NOTUSED = { - { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -asn_TYPE_member_t asn_MBR_RICrequestID_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICrequestID, ricRequestorID), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_NativeInteger, - 0, - { 0, &asn_PER_memb_ricRequestorID_constr_2, memb_ricRequestorID_constraint_1 }, - 0, 0, /* No default value */ - "ricRequestorID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICrequestID, ricInstanceID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_NativeInteger, - 0, - { 0, &asn_PER_memb_ricInstanceID_constr_3, memb_ricInstanceID_constraint_1 }, - 0, 0, /* No default value */ - "ricInstanceID" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICrequestID_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICrequestID_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequestorID */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ricInstanceID */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICrequestID_specs_1 = { - sizeof(struct RICrequestID), - offsetof(struct RICrequestID, _asn_ctx), - asn_MAP_RICrequestID_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICrequestID = { - "RICrequestID", - "RICrequestID", - &asn_OP_SEQUENCE, - asn_DEF_RICrequestID_tags_1, - sizeof(asn_DEF_RICrequestID_tags_1) - /sizeof(asn_DEF_RICrequestID_tags_1[0]), /* 1 */ - asn_DEF_RICrequestID_tags_1, /* Same as above */ - sizeof(asn_DEF_RICrequestID_tags_1) - /sizeof(asn_DEF_RICrequestID_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICrequestID_1, - 2, /* Elements count */ - &asn_SPC_RICrequestID_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICrequestID.h b/Bouncer/asn1c_defs/RICrequestID.h deleted file mode 100644 index 4b3ab0a..0000000 --- a/Bouncer/asn1c_defs/RICrequestID.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICrequestID_H_ -#define _RICrequestID_H_ - - -#include - -/* Including external dependencies */ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICrequestID */ -typedef struct RICrequestID { - long ricRequestorID; - long ricInstanceID; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICrequestID_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICrequestID; -extern asn_SEQUENCE_specifics_t asn_SPC_RICrequestID_specs_1; -extern asn_TYPE_member_t asn_MBR_RICrequestID_1[2]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICrequestID_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICserviceQuery.c b/Bouncer/asn1c_defs/RICserviceQuery.c deleted file mode 100644 index 73f7fcc..0000000 --- a/Bouncer/asn1c_defs/RICserviceQuery.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICserviceQuery.h" - -asn_TYPE_member_t asn_MBR_RICserviceQuery_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P19, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceQuery_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceQuery_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_specs_1 = { - sizeof(struct RICserviceQuery), - offsetof(struct RICserviceQuery, _asn_ctx), - asn_MAP_RICserviceQuery_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceQuery = { - "RICserviceQuery", - "RICserviceQuery", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceQuery_tags_1, - sizeof(asn_DEF_RICserviceQuery_tags_1) - /sizeof(asn_DEF_RICserviceQuery_tags_1[0]), /* 1 */ - asn_DEF_RICserviceQuery_tags_1, /* Same as above */ - sizeof(asn_DEF_RICserviceQuery_tags_1) - /sizeof(asn_DEF_RICserviceQuery_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceQuery_1, - 1, /* Elements count */ - &asn_SPC_RICserviceQuery_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICserviceQuery.h b/Bouncer/asn1c_defs/RICserviceQuery.h deleted file mode 100644 index 77c63e2..0000000 --- a/Bouncer/asn1c_defs/RICserviceQuery.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICserviceQuery_H_ -#define _RICserviceQuery_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICserviceQuery */ -typedef struct RICserviceQuery { - ProtocolIE_Container_1412P19_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceQuery_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICserviceQuery; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_specs_1; -extern asn_TYPE_member_t asn_MBR_RICserviceQuery_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICserviceQuery_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICserviceUpdate.c b/Bouncer/asn1c_defs/RICserviceUpdate.c deleted file mode 100644 index 1a93f22..0000000 --- a/Bouncer/asn1c_defs/RICserviceUpdate.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICserviceUpdate.h" - -asn_TYPE_member_t asn_MBR_RICserviceUpdate_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P16, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdate_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_specs_1 = { - sizeof(struct RICserviceUpdate), - offsetof(struct RICserviceUpdate, _asn_ctx), - asn_MAP_RICserviceUpdate_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate = { - "RICserviceUpdate", - "RICserviceUpdate", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceUpdate_tags_1, - sizeof(asn_DEF_RICserviceUpdate_tags_1) - /sizeof(asn_DEF_RICserviceUpdate_tags_1[0]), /* 1 */ - asn_DEF_RICserviceUpdate_tags_1, /* Same as above */ - sizeof(asn_DEF_RICserviceUpdate_tags_1) - /sizeof(asn_DEF_RICserviceUpdate_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceUpdate_1, - 1, /* Elements count */ - &asn_SPC_RICserviceUpdate_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICserviceUpdate.h b/Bouncer/asn1c_defs/RICserviceUpdate.h deleted file mode 100644 index 613f8fd..0000000 --- a/Bouncer/asn1c_defs/RICserviceUpdate.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICserviceUpdate_H_ -#define _RICserviceUpdate_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICserviceUpdate */ -typedef struct RICserviceUpdate { - ProtocolIE_Container_1412P16_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceUpdate_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_specs_1; -extern asn_TYPE_member_t asn_MBR_RICserviceUpdate_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICserviceUpdate_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.c b/Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.c deleted file mode 100644 index 7792227..0000000 --- a/Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICserviceUpdateAcknowledge.h" - -asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P17, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateAcknowledge_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_specs_1 = { - sizeof(struct RICserviceUpdateAcknowledge), - offsetof(struct RICserviceUpdateAcknowledge, _asn_ctx), - asn_MAP_RICserviceUpdateAcknowledge_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge = { - "RICserviceUpdateAcknowledge", - "RICserviceUpdateAcknowledge", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceUpdateAcknowledge_tags_1, - sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1) - /sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1[0]), /* 1 */ - asn_DEF_RICserviceUpdateAcknowledge_tags_1, /* Same as above */ - sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1) - /sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceUpdateAcknowledge_1, - 1, /* Elements count */ - &asn_SPC_RICserviceUpdateAcknowledge_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.h b/Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.h deleted file mode 100644 index 0dc17cc..0000000 --- a/Bouncer/asn1c_defs/RICserviceUpdateAcknowledge.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICserviceUpdateAcknowledge_H_ -#define _RICserviceUpdateAcknowledge_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICserviceUpdateAcknowledge */ -typedef struct RICserviceUpdateAcknowledge { - ProtocolIE_Container_1412P17_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceUpdateAcknowledge_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_specs_1; -extern asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICserviceUpdateAcknowledge_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICserviceUpdateFailure.c b/Bouncer/asn1c_defs/RICserviceUpdateFailure.c deleted file mode 100644 index f3d1b01..0000000 --- a/Bouncer/asn1c_defs/RICserviceUpdateFailure.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICserviceUpdateFailure.h" - -asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P18, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateFailure_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_specs_1 = { - sizeof(struct RICserviceUpdateFailure), - offsetof(struct RICserviceUpdateFailure, _asn_ctx), - asn_MAP_RICserviceUpdateFailure_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure = { - "RICserviceUpdateFailure", - "RICserviceUpdateFailure", - &asn_OP_SEQUENCE, - asn_DEF_RICserviceUpdateFailure_tags_1, - sizeof(asn_DEF_RICserviceUpdateFailure_tags_1) - /sizeof(asn_DEF_RICserviceUpdateFailure_tags_1[0]), /* 1 */ - asn_DEF_RICserviceUpdateFailure_tags_1, /* Same as above */ - sizeof(asn_DEF_RICserviceUpdateFailure_tags_1) - /sizeof(asn_DEF_RICserviceUpdateFailure_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICserviceUpdateFailure_1, - 1, /* Elements count */ - &asn_SPC_RICserviceUpdateFailure_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICserviceUpdateFailure.h b/Bouncer/asn1c_defs/RICserviceUpdateFailure.h deleted file mode 100644 index 78fe31f..0000000 --- a/Bouncer/asn1c_defs/RICserviceUpdateFailure.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICserviceUpdateFailure_H_ -#define _RICserviceUpdateFailure_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICserviceUpdateFailure */ -typedef struct RICserviceUpdateFailure { - ProtocolIE_Container_1412P18_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICserviceUpdateFailure_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure; -extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_specs_1; -extern asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICserviceUpdateFailure_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.c b/Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.c deleted file mode 100644 index f4344d9..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubscriptionDeleteFailure.h" - -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P5, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteFailure_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_specs_1 = { - sizeof(struct RICsubscriptionDeleteFailure), - offsetof(struct RICsubscriptionDeleteFailure, _asn_ctx), - asn_MAP_RICsubscriptionDeleteFailure_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure = { - "RICsubscriptionDeleteFailure", - "RICsubscriptionDeleteFailure", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionDeleteFailure_tags_1, - sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1) - /sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1[0]), /* 1 */ - asn_DEF_RICsubscriptionDeleteFailure_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1) - /sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionDeleteFailure_1, - 1, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteFailure_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.h b/Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.h deleted file mode 100644 index 094e91e..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDeleteFailure.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubscriptionDeleteFailure_H_ -#define _RICsubscriptionDeleteFailure_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubscriptionDeleteFailure */ -typedef struct RICsubscriptionDeleteFailure { - ProtocolIE_Container_1412P5_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionDeleteFailure_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_specs_1; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubscriptionDeleteFailure_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.c b/Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.c deleted file mode 100644 index 170a7b5..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubscriptionDeleteRequest.h" - -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P3, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_specs_1 = { - sizeof(struct RICsubscriptionDeleteRequest), - offsetof(struct RICsubscriptionDeleteRequest, _asn_ctx), - asn_MAP_RICsubscriptionDeleteRequest_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest = { - "RICsubscriptionDeleteRequest", - "RICsubscriptionDeleteRequest", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionDeleteRequest_tags_1, - sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1) - /sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1[0]), /* 1 */ - asn_DEF_RICsubscriptionDeleteRequest_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1) - /sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionDeleteRequest_1, - 1, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteRequest_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.h b/Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.h deleted file mode 100644 index bf69065..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDeleteRequest.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubscriptionDeleteRequest_H_ -#define _RICsubscriptionDeleteRequest_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubscriptionDeleteRequest */ -typedef struct RICsubscriptionDeleteRequest { - ProtocolIE_Container_1412P3_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionDeleteRequest_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubscriptionDeleteRequest_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.c b/Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.c deleted file mode 100644 index bb9b5b3..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubscriptionDeleteResponse.h" - -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P4, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteResponse_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_specs_1 = { - sizeof(struct RICsubscriptionDeleteResponse), - offsetof(struct RICsubscriptionDeleteResponse, _asn_ctx), - asn_MAP_RICsubscriptionDeleteResponse_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse = { - "RICsubscriptionDeleteResponse", - "RICsubscriptionDeleteResponse", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionDeleteResponse_tags_1, - sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1) - /sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1[0]), /* 1 */ - asn_DEF_RICsubscriptionDeleteResponse_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1) - /sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionDeleteResponse_1, - 1, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteResponse_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.h b/Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.h deleted file mode 100644 index 9c5020c..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDeleteResponse.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubscriptionDeleteResponse_H_ -#define _RICsubscriptionDeleteResponse_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubscriptionDeleteResponse */ -typedef struct RICsubscriptionDeleteResponse { - ProtocolIE_Container_1412P4_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionDeleteResponse_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_specs_1; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubscriptionDeleteResponse_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubscriptionDetails.c b/Bouncer/asn1c_defs/RICsubscriptionDetails.c deleted file mode 100644 index 6d9cd43..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDetails.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubscriptionDetails.h" - -static asn_TYPE_member_t asn_MBR_RICsubscriptionDetails_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDetails, ricEventTriggerDefinition), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICeventTriggerDefinition, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricEventTriggerDefinition" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDetails, ricAction_ToBeSetup_List), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICactions_ToBeSetup_List, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricAction-ToBeSetup-List" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDetails_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDetails_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricEventTriggerDefinition */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ricAction-ToBeSetup-List */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDetails_specs_1 = { - sizeof(struct RICsubscriptionDetails), - offsetof(struct RICsubscriptionDetails, _asn_ctx), - asn_MAP_RICsubscriptionDetails_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDetails = { - "RICsubscriptionDetails", - "RICsubscriptionDetails", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionDetails_tags_1, - sizeof(asn_DEF_RICsubscriptionDetails_tags_1) - /sizeof(asn_DEF_RICsubscriptionDetails_tags_1[0]), /* 1 */ - asn_DEF_RICsubscriptionDetails_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionDetails_tags_1) - /sizeof(asn_DEF_RICsubscriptionDetails_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionDetails_1, - 2, /* Elements count */ - &asn_SPC_RICsubscriptionDetails_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubscriptionDetails.h b/Bouncer/asn1c_defs/RICsubscriptionDetails.h deleted file mode 100644 index 7b7d497..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionDetails.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubscriptionDetails_H_ -#define _RICsubscriptionDetails_H_ - - -#include - -/* Including external dependencies */ -#include "RICeventTriggerDefinition.h" -#include "RICactions-ToBeSetup-List.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubscriptionDetails */ -typedef struct RICsubscriptionDetails { - RICeventTriggerDefinition_t ricEventTriggerDefinition; - RICactions_ToBeSetup_List_t ricAction_ToBeSetup_List; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionDetails_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDetails; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubscriptionDetails_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubscriptionFailure.c b/Bouncer/asn1c_defs/RICsubscriptionFailure.c deleted file mode 100644 index cbcccfe..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionFailure.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubscriptionFailure.h" - -asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P2, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionFailure_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_specs_1 = { - sizeof(struct RICsubscriptionFailure), - offsetof(struct RICsubscriptionFailure, _asn_ctx), - asn_MAP_RICsubscriptionFailure_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure = { - "RICsubscriptionFailure", - "RICsubscriptionFailure", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionFailure_tags_1, - sizeof(asn_DEF_RICsubscriptionFailure_tags_1) - /sizeof(asn_DEF_RICsubscriptionFailure_tags_1[0]), /* 1 */ - asn_DEF_RICsubscriptionFailure_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionFailure_tags_1) - /sizeof(asn_DEF_RICsubscriptionFailure_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionFailure_1, - 1, /* Elements count */ - &asn_SPC_RICsubscriptionFailure_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubscriptionFailure.h b/Bouncer/asn1c_defs/RICsubscriptionFailure.h deleted file mode 100644 index 5d56ea2..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionFailure.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubscriptionFailure_H_ -#define _RICsubscriptionFailure_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubscriptionFailure */ -typedef struct RICsubscriptionFailure { - ProtocolIE_Container_1412P2_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionFailure_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_specs_1; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubscriptionFailure_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubscriptionRequest.c b/Bouncer/asn1c_defs/RICsubscriptionRequest.c deleted file mode 100644 index cecb478..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionRequest.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubscriptionRequest.h" - -asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P0, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionRequest_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_specs_1 = { - sizeof(struct RICsubscriptionRequest), - offsetof(struct RICsubscriptionRequest, _asn_ctx), - asn_MAP_RICsubscriptionRequest_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest = { - "RICsubscriptionRequest", - "RICsubscriptionRequest", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionRequest_tags_1, - sizeof(asn_DEF_RICsubscriptionRequest_tags_1) - /sizeof(asn_DEF_RICsubscriptionRequest_tags_1[0]), /* 1 */ - asn_DEF_RICsubscriptionRequest_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionRequest_tags_1) - /sizeof(asn_DEF_RICsubscriptionRequest_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionRequest_1, - 1, /* Elements count */ - &asn_SPC_RICsubscriptionRequest_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubscriptionRequest.h b/Bouncer/asn1c_defs/RICsubscriptionRequest.h deleted file mode 100644 index a320a3f..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionRequest.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubscriptionRequest_H_ -#define _RICsubscriptionRequest_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubscriptionRequest */ -typedef struct RICsubscriptionRequest { - ProtocolIE_Container_1412P0_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionRequest_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubscriptionRequest_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubscriptionResponse.c b/Bouncer/asn1c_defs/RICsubscriptionResponse.c deleted file mode 100644 index fc2bceb..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionResponse.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubscriptionResponse.h" - -asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P1, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_specs_1 = { - sizeof(struct RICsubscriptionResponse), - offsetof(struct RICsubscriptionResponse, _asn_ctx), - asn_MAP_RICsubscriptionResponse_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse = { - "RICsubscriptionResponse", - "RICsubscriptionResponse", - &asn_OP_SEQUENCE, - asn_DEF_RICsubscriptionResponse_tags_1, - sizeof(asn_DEF_RICsubscriptionResponse_tags_1) - /sizeof(asn_DEF_RICsubscriptionResponse_tags_1[0]), /* 1 */ - asn_DEF_RICsubscriptionResponse_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubscriptionResponse_tags_1) - /sizeof(asn_DEF_RICsubscriptionResponse_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubscriptionResponse_1, - 1, /* Elements count */ - &asn_SPC_RICsubscriptionResponse_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubscriptionResponse.h b/Bouncer/asn1c_defs/RICsubscriptionResponse.h deleted file mode 100644 index 9f6279b..0000000 --- a/Bouncer/asn1c_defs/RICsubscriptionResponse.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubscriptionResponse_H_ -#define _RICsubscriptionResponse_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubscriptionResponse */ -typedef struct RICsubscriptionResponse { - ProtocolIE_Container_1412P1_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubscriptionResponse_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_specs_1; -extern asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubscriptionResponse_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubsequentAction.c b/Bouncer/asn1c_defs/RICsubsequentAction.c deleted file mode 100644 index 2ce9f49..0000000 --- a/Bouncer/asn1c_defs/RICsubsequentAction.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubsequentAction.h" - -asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubsequentAction, ricSubsequentActionType), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICsubsequentActionType, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricSubsequentActionType" - }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubsequentAction, ricTimeToWait), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RICtimeToWait, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ricTimeToWait" - }, -}; -static const ber_tlv_tag_t asn_DEF_RICsubsequentAction_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_RICsubsequentAction_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricSubsequentActionType */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ricTimeToWait */ -}; -asn_SEQUENCE_specifics_t asn_SPC_RICsubsequentAction_specs_1 = { - sizeof(struct RICsubsequentAction), - offsetof(struct RICsubsequentAction, _asn_ctx), - asn_MAP_RICsubsequentAction_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_RICsubsequentAction = { - "RICsubsequentAction", - "RICsubsequentAction", - &asn_OP_SEQUENCE, - asn_DEF_RICsubsequentAction_tags_1, - sizeof(asn_DEF_RICsubsequentAction_tags_1) - /sizeof(asn_DEF_RICsubsequentAction_tags_1[0]), /* 1 */ - asn_DEF_RICsubsequentAction_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubsequentAction_tags_1) - /sizeof(asn_DEF_RICsubsequentAction_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_RICsubsequentAction_1, - 2, /* Elements count */ - &asn_SPC_RICsubsequentAction_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubsequentAction.h b/Bouncer/asn1c_defs/RICsubsequentAction.h deleted file mode 100644 index 1c1e484..0000000 --- a/Bouncer/asn1c_defs/RICsubsequentAction.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubsequentAction_H_ -#define _RICsubsequentAction_H_ - - -#include - -/* Including external dependencies */ -#include "RICsubsequentActionType.h" -#include "RICtimeToWait.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* RICsubsequentAction */ -typedef struct RICsubsequentAction { - RICsubsequentActionType_t ricSubsequentActionType; - RICtimeToWait_t ricTimeToWait; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RICsubsequentAction_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RICsubsequentAction; -extern asn_SEQUENCE_specifics_t asn_SPC_RICsubsequentAction_specs_1; -extern asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[2]; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubsequentAction_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICsubsequentActionType.c b/Bouncer/asn1c_defs/RICsubsequentActionType.c deleted file mode 100644 index 63f47b3..0000000 --- a/Bouncer/asn1c_defs/RICsubsequentActionType.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICsubsequentActionType.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RICsubsequentActionType_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_RICsubsequentActionType_value2enum_1[] = { - { 0, 8, "continue" }, - { 1, 4, "wait" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_RICsubsequentActionType_enum2value_1[] = { - 0, /* continue(0) */ - 1 /* wait(1) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_RICsubsequentActionType_specs_1 = { - asn_MAP_RICsubsequentActionType_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_RICsubsequentActionType_enum2value_1, /* N => "tag"; sorted by N */ - 2, /* Number of elements in the maps */ - 3, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_RICsubsequentActionType_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICsubsequentActionType = { - "RICsubsequentActionType", - "RICsubsequentActionType", - &asn_OP_NativeEnumerated, - asn_DEF_RICsubsequentActionType_tags_1, - sizeof(asn_DEF_RICsubsequentActionType_tags_1) - /sizeof(asn_DEF_RICsubsequentActionType_tags_1[0]), /* 1 */ - asn_DEF_RICsubsequentActionType_tags_1, /* Same as above */ - sizeof(asn_DEF_RICsubsequentActionType_tags_1) - /sizeof(asn_DEF_RICsubsequentActionType_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICsubsequentActionType_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_RICsubsequentActionType_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICsubsequentActionType.h b/Bouncer/asn1c_defs/RICsubsequentActionType.h deleted file mode 100644 index 716dc6c..0000000 --- a/Bouncer/asn1c_defs/RICsubsequentActionType.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICsubsequentActionType_H_ -#define _RICsubsequentActionType_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RICsubsequentActionType { - RICsubsequentActionType_continue = 0, - RICsubsequentActionType_wait = 1 - /* - * Enumeration is extensible - */ -} e_RICsubsequentActionType; - -/* RICsubsequentActionType */ -typedef long RICsubsequentActionType_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RICsubsequentActionType_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RICsubsequentActionType; -extern const asn_INTEGER_specifics_t asn_SPC_RICsubsequentActionType_specs_1; -asn_struct_free_f RICsubsequentActionType_free; -asn_struct_print_f RICsubsequentActionType_print; -asn_constr_check_f RICsubsequentActionType_constraint; -ber_type_decoder_f RICsubsequentActionType_decode_ber; -der_type_encoder_f RICsubsequentActionType_encode_der; -xer_type_decoder_f RICsubsequentActionType_decode_xer; -xer_type_encoder_f RICsubsequentActionType_encode_xer; -per_type_decoder_f RICsubsequentActionType_decode_uper; -per_type_encoder_f RICsubsequentActionType_encode_uper; -per_type_decoder_f RICsubsequentActionType_decode_aper; -per_type_encoder_f RICsubsequentActionType_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICsubsequentActionType_H_ */ -#include diff --git a/Bouncer/asn1c_defs/RICtimeToWait.c b/Bouncer/asn1c_defs/RICtimeToWait.c deleted file mode 100644 index 2df21d7..0000000 --- a/Bouncer/asn1c_defs/RICtimeToWait.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "RICtimeToWait.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_RICtimeToWait_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 5, 5, 0, 17 } /* (0..17,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_RICtimeToWait_value2enum_1[] = { - { 0, 4, "zero" }, - { 1, 4, "w1ms" }, - { 2, 4, "w2ms" }, - { 3, 4, "w5ms" }, - { 4, 5, "w10ms" }, - { 5, 5, "w20ms" }, - { 6, 5, "w30ms" }, - { 7, 5, "w40ms" }, - { 8, 5, "w50ms" }, - { 9, 6, "w100ms" }, - { 10, 6, "w200ms" }, - { 11, 6, "w500ms" }, - { 12, 3, "w1s" }, - { 13, 3, "w2s" }, - { 14, 3, "w5s" }, - { 15, 4, "w10s" }, - { 16, 4, "w20s" }, - { 17, 4, "w60s" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_RICtimeToWait_enum2value_1[] = { - 9, /* w100ms(9) */ - 4, /* w10ms(4) */ - 15, /* w10s(15) */ - 1, /* w1ms(1) */ - 12, /* w1s(12) */ - 10, /* w200ms(10) */ - 5, /* w20ms(5) */ - 16, /* w20s(16) */ - 2, /* w2ms(2) */ - 13, /* w2s(13) */ - 6, /* w30ms(6) */ - 7, /* w40ms(7) */ - 11, /* w500ms(11) */ - 8, /* w50ms(8) */ - 3, /* w5ms(3) */ - 14, /* w5s(14) */ - 17, /* w60s(17) */ - 0 /* zero(0) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_RICtimeToWait_specs_1 = { - asn_MAP_RICtimeToWait_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_RICtimeToWait_enum2value_1, /* N => "tag"; sorted by N */ - 18, /* Number of elements in the maps */ - 19, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_RICtimeToWait_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_RICtimeToWait = { - "RICtimeToWait", - "RICtimeToWait", - &asn_OP_NativeEnumerated, - asn_DEF_RICtimeToWait_tags_1, - sizeof(asn_DEF_RICtimeToWait_tags_1) - /sizeof(asn_DEF_RICtimeToWait_tags_1[0]), /* 1 */ - asn_DEF_RICtimeToWait_tags_1, /* Same as above */ - sizeof(asn_DEF_RICtimeToWait_tags_1) - /sizeof(asn_DEF_RICtimeToWait_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_RICtimeToWait_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_RICtimeToWait_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/RICtimeToWait.h b/Bouncer/asn1c_defs/RICtimeToWait.h deleted file mode 100644 index 3f6626c..0000000 --- a/Bouncer/asn1c_defs/RICtimeToWait.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _RICtimeToWait_H_ -#define _RICtimeToWait_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum RICtimeToWait { - RICtimeToWait_zero = 0, - RICtimeToWait_w1ms = 1, - RICtimeToWait_w2ms = 2, - RICtimeToWait_w5ms = 3, - RICtimeToWait_w10ms = 4, - RICtimeToWait_w20ms = 5, - RICtimeToWait_w30ms = 6, - RICtimeToWait_w40ms = 7, - RICtimeToWait_w50ms = 8, - RICtimeToWait_w100ms = 9, - RICtimeToWait_w200ms = 10, - RICtimeToWait_w500ms = 11, - RICtimeToWait_w1s = 12, - RICtimeToWait_w2s = 13, - RICtimeToWait_w5s = 14, - RICtimeToWait_w10s = 15, - RICtimeToWait_w20s = 16, - RICtimeToWait_w60s = 17 - /* - * Enumeration is extensible - */ -} e_RICtimeToWait; - -/* RICtimeToWait */ -typedef long RICtimeToWait_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_RICtimeToWait_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_RICtimeToWait; -extern const asn_INTEGER_specifics_t asn_SPC_RICtimeToWait_specs_1; -asn_struct_free_f RICtimeToWait_free; -asn_struct_print_f RICtimeToWait_print; -asn_constr_check_f RICtimeToWait_constraint; -ber_type_decoder_f RICtimeToWait_decode_ber; -der_type_encoder_f RICtimeToWait_encode_der; -xer_type_decoder_f RICtimeToWait_decode_xer; -xer_type_encoder_f RICtimeToWait_encode_xer; -per_type_decoder_f RICtimeToWait_decode_uper; -per_type_encoder_f RICtimeToWait_encode_uper; -per_type_decoder_f RICtimeToWait_decode_aper; -per_type_encoder_f RICtimeToWait_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _RICtimeToWait_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ResetRequest.c b/Bouncer/asn1c_defs/ResetRequest.c deleted file mode 100644 index e70f0a9..0000000 --- a/Bouncer/asn1c_defs/ResetRequest.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ResetRequest.h" - -asn_TYPE_member_t asn_MBR_ResetRequest_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct ResetRequest, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P14, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_ResetRequest_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_ResetRequest_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_ResetRequest_specs_1 = { - sizeof(struct ResetRequest), - offsetof(struct ResetRequest, _asn_ctx), - asn_MAP_ResetRequest_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_ResetRequest = { - "ResetRequest", - "ResetRequest", - &asn_OP_SEQUENCE, - asn_DEF_ResetRequest_tags_1, - sizeof(asn_DEF_ResetRequest_tags_1) - /sizeof(asn_DEF_ResetRequest_tags_1[0]), /* 1 */ - asn_DEF_ResetRequest_tags_1, /* Same as above */ - sizeof(asn_DEF_ResetRequest_tags_1) - /sizeof(asn_DEF_ResetRequest_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_ResetRequest_1, - 1, /* Elements count */ - &asn_SPC_ResetRequest_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ResetRequest.h b/Bouncer/asn1c_defs/ResetRequest.h deleted file mode 100644 index f1bf2ae..0000000 --- a/Bouncer/asn1c_defs/ResetRequest.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ResetRequest_H_ -#define _ResetRequest_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* ResetRequest */ -typedef struct ResetRequest { - ProtocolIE_Container_1412P14_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ResetRequest_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ResetRequest; -extern asn_SEQUENCE_specifics_t asn_SPC_ResetRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_ResetRequest_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _ResetRequest_H_ */ -#include diff --git a/Bouncer/asn1c_defs/ResetResponse.c b/Bouncer/asn1c_defs/ResetResponse.c deleted file mode 100644 index 92fc800..0000000 --- a/Bouncer/asn1c_defs/ResetResponse.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "ResetResponse.h" - -asn_TYPE_member_t asn_MBR_ResetResponse_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct ResetResponse, protocolIEs), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProtocolIE_Container_1412P15, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "protocolIEs" - }, -}; -static const ber_tlv_tag_t asn_DEF_ResetResponse_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_ResetResponse_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ -}; -asn_SEQUENCE_specifics_t asn_SPC_ResetResponse_specs_1 = { - sizeof(struct ResetResponse), - offsetof(struct ResetResponse, _asn_ctx), - asn_MAP_ResetResponse_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_ResetResponse = { - "ResetResponse", - "ResetResponse", - &asn_OP_SEQUENCE, - asn_DEF_ResetResponse_tags_1, - sizeof(asn_DEF_ResetResponse_tags_1) - /sizeof(asn_DEF_ResetResponse_tags_1[0]), /* 1 */ - asn_DEF_ResetResponse_tags_1, /* Same as above */ - sizeof(asn_DEF_ResetResponse_tags_1) - /sizeof(asn_DEF_ResetResponse_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_ResetResponse_1, - 1, /* Elements count */ - &asn_SPC_ResetResponse_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/ResetResponse.h b/Bouncer/asn1c_defs/ResetResponse.h deleted file mode 100644 index c6e10ea..0000000 --- a/Bouncer/asn1c_defs/ResetResponse.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Contents" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _ResetResponse_H_ -#define _ResetResponse_H_ - - -#include - -/* Including external dependencies */ -#include "ProtocolIE-Container.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* ResetResponse */ -typedef struct ResetResponse { - ProtocolIE_Container_1412P15_t protocolIEs; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ResetResponse_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ResetResponse; -extern asn_SEQUENCE_specifics_t asn_SPC_ResetResponse_specs_1; -extern asn_TYPE_member_t asn_MBR_ResetResponse_1[1]; - -#ifdef __cplusplus -} -#endif - -#endif /* _ResetResponse_H_ */ -#include diff --git a/Bouncer/asn1c_defs/SuccessfulOutcome.c b/Bouncer/asn1c_defs/SuccessfulOutcome.c deleted file mode 100644 index 8e9941f..0000000 --- a/Bouncer/asn1c_defs/SuccessfulOutcome.c +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "SuccessfulOutcome.h" - -static const long asn_VAL_1_id_RICsubscription = 8; -static const long asn_VAL_1_reject = 0; -static const long asn_VAL_2_id_RICsubscriptionDelete = 9; -static const long asn_VAL_2_reject = 0; -static const long asn_VAL_3_id_RICserviceUpdate = 7; -static const long asn_VAL_3_reject = 0; -static const long asn_VAL_4_id_RICcontrol = 4; -static const long asn_VAL_4_reject = 0; -static const long asn_VAL_5_id_E2setup = 1; -static const long asn_VAL_5_reject = 0; -static const long asn_VAL_6_id_Reset = 3; -static const long asn_VAL_6_reject = 0; -static const long asn_VAL_7_id_RICindication = 5; -static const long asn_VAL_7_ignore = 1; -static const long asn_VAL_8_id_RICserviceQuery = 6; -static const long asn_VAL_8_ignore = 1; -static const long asn_VAL_9_id_ErrorIndication = 2; -static const long asn_VAL_9_ignore = 1; -static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { - { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore }, - { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore } -}; -static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { - { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } -}; -static int -memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 255)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_SuccessfulOutcome_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; - size_t constraining_column = 3; /* &procedureCode */ - size_t for_column = 4; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SuccessfulOutcome, procedureCode)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_SuccessfulOutcome_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; - size_t constraining_column = 3; /* &procedureCode */ - size_t for_column = 1; /* &SuccessfulOutcome */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SuccessfulOutcome, procedureCode)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = { - { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_value_4[] = { - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICsubscriptionResponse), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionResponse, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICsubscriptionResponse" - }, - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICsubscriptionDeleteResponse), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionDeleteResponse, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICsubscriptionDeleteResponse" - }, - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICserviceUpdateAcknowledge), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceUpdateAcknowledge, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICserviceUpdateAcknowledge" - }, - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICcontrolAcknowledge), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICcontrolAcknowledge, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolAcknowledge" - }, - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.E2setupResponse), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_E2setupResponse, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "E2setupResponse" - }, - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.ResetResponse), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ResetResponse, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ResetResponse" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 5 }, /* RICsubscriptionResponse */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 4 }, /* RICsubscriptionDeleteResponse */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 3 }, /* RICserviceUpdateAcknowledge */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 2 }, /* RICcontrolAcknowledge */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 1 }, /* E2setupResponse */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 0 } /* ResetResponse */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { - sizeof(struct SuccessfulOutcome__value), - offsetof(struct SuccessfulOutcome__value, _asn_ctx), - offsetof(struct SuccessfulOutcome__value, present), - sizeof(((struct SuccessfulOutcome__value *)0)->present), - asn_MAP_value_tag2el_4, - 6, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_4 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_4, - 6, /* Elements count */ - &asn_SPC_value_specs_4 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, procedureCode), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProcedureCode, - 0, - { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 }, - 0, 0, /* No default value */ - "procedureCode" - }, - { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_SuccessfulOutcome_criticality_type, - { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_4, - select_SuccessfulOutcome_value_type, - { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_SuccessfulOutcome_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_SuccessfulOutcome_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_SuccessfulOutcome_specs_1 = { - sizeof(struct SuccessfulOutcome), - offsetof(struct SuccessfulOutcome, _asn_ctx), - asn_MAP_SuccessfulOutcome_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_SuccessfulOutcome = { - "SuccessfulOutcome", - "SuccessfulOutcome", - &asn_OP_SEQUENCE, - asn_DEF_SuccessfulOutcome_tags_1, - sizeof(asn_DEF_SuccessfulOutcome_tags_1) - /sizeof(asn_DEF_SuccessfulOutcome_tags_1[0]), /* 1 */ - asn_DEF_SuccessfulOutcome_tags_1, /* Same as above */ - sizeof(asn_DEF_SuccessfulOutcome_tags_1) - /sizeof(asn_DEF_SuccessfulOutcome_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_SuccessfulOutcome_1, - 3, /* Elements count */ - &asn_SPC_SuccessfulOutcome_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/SuccessfulOutcome.h b/Bouncer/asn1c_defs/SuccessfulOutcome.h deleted file mode 100644 index 906aa20..0000000 --- a/Bouncer/asn1c_defs/SuccessfulOutcome.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _SuccessfulOutcome_H_ -#define _SuccessfulOutcome_H_ - - -#include - -/* Including external dependencies */ -#include "ProcedureCode.h" -#include "Criticality.h" -#include -#include -#include "RICsubscriptionRequest.h" -#include "RICsubscriptionResponse.h" -#include "RICsubscriptionFailure.h" -#include "RICsubscriptionDeleteRequest.h" -#include "RICsubscriptionDeleteResponse.h" -#include "RICsubscriptionDeleteFailure.h" -#include "RICserviceUpdate.h" -#include "RICserviceUpdateAcknowledge.h" -#include "RICserviceUpdateFailure.h" -#include "RICcontrolRequest.h" -#include "RICcontrolAcknowledge.h" -#include "RICcontrolFailure.h" -#include "E2setupRequest.h" -#include "E2setupResponse.h" -#include "E2setupFailure.h" -#include "ResetRequest.h" -#include "ResetResponse.h" -#include "RICindication.h" -#include "RICserviceQuery.h" -#include "ErrorIndication.h" -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum SuccessfulOutcome__value_PR { - SuccessfulOutcome__value_PR_NOTHING, /* No components present */ - SuccessfulOutcome__value_PR_RICsubscriptionResponse, - SuccessfulOutcome__value_PR_RICsubscriptionDeleteResponse, - SuccessfulOutcome__value_PR_RICserviceUpdateAcknowledge, - SuccessfulOutcome__value_PR_RICcontrolAcknowledge, - SuccessfulOutcome__value_PR_E2setupResponse, - SuccessfulOutcome__value_PR_ResetResponse -} SuccessfulOutcome__value_PR; - -/* SuccessfulOutcome */ -typedef struct SuccessfulOutcome { - ProcedureCode_t procedureCode; - Criticality_t criticality; - struct SuccessfulOutcome__value { - SuccessfulOutcome__value_PR present; - union SuccessfulOutcome__value_u { - RICsubscriptionResponse_t RICsubscriptionResponse; - RICsubscriptionDeleteResponse_t RICsubscriptionDeleteResponse; - RICserviceUpdateAcknowledge_t RICserviceUpdateAcknowledge; - RICcontrolAcknowledge_t RICcontrolAcknowledge; - E2setupResponse_t E2setupResponse; - ResetResponse_t ResetResponse; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SuccessfulOutcome_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SuccessfulOutcome; -extern asn_SEQUENCE_specifics_t asn_SPC_SuccessfulOutcome_specs_1; -extern asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[3]; - -#ifdef __cplusplus -} -#endif - -#endif /* _SuccessfulOutcome_H_ */ -#include diff --git a/Bouncer/asn1c_defs/TimeToWait.c b/Bouncer/asn1c_defs/TimeToWait.c deleted file mode 100644 index 6c1d6af..0000000 --- a/Bouncer/asn1c_defs/TimeToWait.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "TimeToWait.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -static asn_per_constraints_t asn_PER_type_TimeToWait_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_TimeToWait_value2enum_1[] = { - { 0, 3, "v1s" }, - { 1, 3, "v2s" }, - { 2, 3, "v5s" }, - { 3, 4, "v10s" }, - { 4, 4, "v20s" }, - { 5, 4, "v60s" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_TimeToWait_enum2value_1[] = { - 3, /* v10s(3) */ - 0, /* v1s(0) */ - 4, /* v20s(4) */ - 1, /* v2s(1) */ - 2, /* v5s(2) */ - 5 /* v60s(5) */ - /* This list is extensible */ -}; -static const asn_INTEGER_specifics_t asn_SPC_TimeToWait_specs_1 = { - asn_MAP_TimeToWait_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_TimeToWait_enum2value_1, /* N => "tag"; sorted by N */ - 6, /* Number of elements in the maps */ - 7, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_TimeToWait_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_TimeToWait = { - "TimeToWait", - "TimeToWait", - &asn_OP_NativeEnumerated, - asn_DEF_TimeToWait_tags_1, - sizeof(asn_DEF_TimeToWait_tags_1) - /sizeof(asn_DEF_TimeToWait_tags_1[0]), /* 1 */ - asn_DEF_TimeToWait_tags_1, /* Same as above */ - sizeof(asn_DEF_TimeToWait_tags_1) - /sizeof(asn_DEF_TimeToWait_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_TimeToWait_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_TimeToWait_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/TimeToWait.h b/Bouncer/asn1c_defs/TimeToWait.h deleted file mode 100644 index a9ff45b..0000000 --- a/Bouncer/asn1c_defs/TimeToWait.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _TimeToWait_H_ -#define _TimeToWait_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum TimeToWait { - TimeToWait_v1s = 0, - TimeToWait_v2s = 1, - TimeToWait_v5s = 2, - TimeToWait_v10s = 3, - TimeToWait_v20s = 4, - TimeToWait_v60s = 5 - /* - * Enumeration is extensible - */ -} e_TimeToWait; - -/* TimeToWait */ -typedef long TimeToWait_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TimeToWait; -asn_struct_free_f TimeToWait_free; -asn_struct_print_f TimeToWait_print; -asn_constr_check_f TimeToWait_constraint; -ber_type_decoder_f TimeToWait_decode_ber; -der_type_encoder_f TimeToWait_encode_der; -xer_type_decoder_f TimeToWait_decode_xer; -xer_type_encoder_f TimeToWait_encode_xer; -per_type_decoder_f TimeToWait_decode_uper; -per_type_encoder_f TimeToWait_encode_uper; -per_type_decoder_f TimeToWait_decode_aper; -per_type_encoder_f TimeToWait_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _TimeToWait_H_ */ -#include diff --git a/Bouncer/asn1c_defs/TriggeringMessage.c b/Bouncer/asn1c_defs/TriggeringMessage.c deleted file mode 100644 index 41f10ca..0000000 --- a/Bouncer/asn1c_defs/TriggeringMessage.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "TriggeringMessage.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_TriggeringMessage_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_TriggeringMessage_value2enum_1[] = { - { 0, 18, "initiating-message" }, - { 1, 18, "successful-outcome" }, - { 2, 21, "unsuccessfull-outcome" } -}; -static const unsigned int asn_MAP_TriggeringMessage_enum2value_1[] = { - 0, /* initiating-message(0) */ - 1, /* successful-outcome(1) */ - 2 /* unsuccessfull-outcome(2) */ -}; -const asn_INTEGER_specifics_t asn_SPC_TriggeringMessage_specs_1 = { - asn_MAP_TriggeringMessage_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_TriggeringMessage_enum2value_1, /* N => "tag"; sorted by N */ - 3, /* Number of elements in the maps */ - 0, /* Enumeration is not extensible */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_TriggeringMessage_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_TriggeringMessage = { - "TriggeringMessage", - "TriggeringMessage", - &asn_OP_NativeEnumerated, - asn_DEF_TriggeringMessage_tags_1, - sizeof(asn_DEF_TriggeringMessage_tags_1) - /sizeof(asn_DEF_TriggeringMessage_tags_1[0]), /* 1 */ - asn_DEF_TriggeringMessage_tags_1, /* Same as above */ - sizeof(asn_DEF_TriggeringMessage_tags_1) - /sizeof(asn_DEF_TriggeringMessage_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_TriggeringMessage_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_TriggeringMessage_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/TriggeringMessage.h b/Bouncer/asn1c_defs/TriggeringMessage.h deleted file mode 100644 index da7b498..0000000 --- a/Bouncer/asn1c_defs/TriggeringMessage.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-CommonDataTypes" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _TriggeringMessage_H_ -#define _TriggeringMessage_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum TriggeringMessage { - TriggeringMessage_initiating_message = 0, - TriggeringMessage_successful_outcome = 1, - TriggeringMessage_unsuccessfull_outcome = 2 -} e_TriggeringMessage; - -/* TriggeringMessage */ -typedef long TriggeringMessage_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_TriggeringMessage_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_TriggeringMessage; -extern const asn_INTEGER_specifics_t asn_SPC_TriggeringMessage_specs_1; -asn_struct_free_f TriggeringMessage_free; -asn_struct_print_f TriggeringMessage_print; -asn_constr_check_f TriggeringMessage_constraint; -ber_type_decoder_f TriggeringMessage_decode_ber; -der_type_encoder_f TriggeringMessage_encode_der; -xer_type_decoder_f TriggeringMessage_decode_xer; -xer_type_encoder_f TriggeringMessage_encode_xer; -per_type_decoder_f TriggeringMessage_decode_uper; -per_type_encoder_f TriggeringMessage_encode_uper; -per_type_decoder_f TriggeringMessage_decode_aper; -per_type_encoder_f TriggeringMessage_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _TriggeringMessage_H_ */ -#include diff --git a/Bouncer/asn1c_defs/TypeOfError.c b/Bouncer/asn1c_defs/TypeOfError.c deleted file mode 100644 index ad4e6cd..0000000 --- a/Bouncer/asn1c_defs/TypeOfError.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "TypeOfError.h" - -/* - * This type is implemented using NativeEnumerated, - * so here we adjust the DEF accordingly. - */ -asn_per_constraints_t asn_PER_type_TypeOfError_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static const asn_INTEGER_enum_map_t asn_MAP_TypeOfError_value2enum_1[] = { - { 0, 14, "not-understood" }, - { 1, 7, "missing" } - /* This list is extensible */ -}; -static const unsigned int asn_MAP_TypeOfError_enum2value_1[] = { - 1, /* missing(1) */ - 0 /* not-understood(0) */ - /* This list is extensible */ -}; -const asn_INTEGER_specifics_t asn_SPC_TypeOfError_specs_1 = { - asn_MAP_TypeOfError_value2enum_1, /* "tag" => N; sorted by tag */ - asn_MAP_TypeOfError_enum2value_1, /* N => "tag"; sorted by N */ - 2, /* Number of elements in the maps */ - 3, /* Extensions before this member */ - 1, /* Strict enumeration */ - 0, /* Native long size */ - 0 -}; -static const ber_tlv_tag_t asn_DEF_TypeOfError_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_TypeOfError = { - "TypeOfError", - "TypeOfError", - &asn_OP_NativeEnumerated, - asn_DEF_TypeOfError_tags_1, - sizeof(asn_DEF_TypeOfError_tags_1) - /sizeof(asn_DEF_TypeOfError_tags_1[0]), /* 1 */ - asn_DEF_TypeOfError_tags_1, /* Same as above */ - sizeof(asn_DEF_TypeOfError_tags_1) - /sizeof(asn_DEF_TypeOfError_tags_1[0]), /* 1 */ - { 0, &asn_PER_type_TypeOfError_constr_1, NativeEnumerated_constraint }, - 0, 0, /* Defined elsewhere */ - &asn_SPC_TypeOfError_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/TypeOfError.h b/Bouncer/asn1c_defs/TypeOfError.h deleted file mode 100644 index b2cc876..0000000 --- a/Bouncer/asn1c_defs/TypeOfError.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-IEs" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _TypeOfError_H_ -#define _TypeOfError_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum TypeOfError { - TypeOfError_not_understood = 0, - TypeOfError_missing = 1 - /* - * Enumeration is extensible - */ -} e_TypeOfError; - -/* TypeOfError */ -typedef long TypeOfError_t; - -/* Implementation */ -extern asn_per_constraints_t asn_PER_type_TypeOfError_constr_1; -extern asn_TYPE_descriptor_t asn_DEF_TypeOfError; -extern const asn_INTEGER_specifics_t asn_SPC_TypeOfError_specs_1; -asn_struct_free_f TypeOfError_free; -asn_struct_print_f TypeOfError_print; -asn_constr_check_f TypeOfError_constraint; -ber_type_decoder_f TypeOfError_decode_ber; -der_type_encoder_f TypeOfError_encode_der; -xer_type_decoder_f TypeOfError_decode_xer; -xer_type_encoder_f TypeOfError_encode_xer; -per_type_decoder_f TypeOfError_decode_uper; -per_type_encoder_f TypeOfError_encode_uper; -per_type_decoder_f TypeOfError_decode_aper; -per_type_encoder_f TypeOfError_encode_aper; - -#ifdef __cplusplus -} -#endif - -#endif /* _TypeOfError_H_ */ -#include diff --git a/Bouncer/asn1c_defs/UnsuccessfulOutcome.c b/Bouncer/asn1c_defs/UnsuccessfulOutcome.c deleted file mode 100644 index 4483d36..0000000 --- a/Bouncer/asn1c_defs/UnsuccessfulOutcome.c +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#include "UnsuccessfulOutcome.h" - -static const long asn_VAL_1_id_RICsubscription = 8; -static const long asn_VAL_1_reject = 0; -static const long asn_VAL_2_id_RICsubscriptionDelete = 9; -static const long asn_VAL_2_reject = 0; -static const long asn_VAL_3_id_RICserviceUpdate = 7; -static const long asn_VAL_3_reject = 0; -static const long asn_VAL_4_id_RICcontrol = 4; -static const long asn_VAL_4_reject = 0; -static const long asn_VAL_5_id_E2setup = 1; -static const long asn_VAL_5_reject = 0; -static const long asn_VAL_6_id_Reset = 3; -static const long asn_VAL_6_reject = 0; -static const long asn_VAL_7_id_RICindication = 5; -static const long asn_VAL_7_ignore = 1; -static const long asn_VAL_8_id_RICserviceQuery = 6; -static const long asn_VAL_8_ignore = 1; -static const long asn_VAL_9_id_ErrorIndication = 2; -static const long asn_VAL_9_ignore = 1; -static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { - { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse }, - { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest }, - { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore }, - { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore }, - { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication }, - { "&SuccessfulOutcome", }, - { "&UnsuccessfulOutcome", }, - { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication }, - { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore } -}; -static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { - { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } -}; -static int -memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - long value; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - value = *(const long *)sptr; - - if((value >= 0 && value <= 255)) { - /* Constraint check succeeded */ - return 0; - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: constraint failed (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -static asn_type_selector_result_t -select_UnsuccessfulOutcome_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; - size_t constraining_column = 3; /* &procedureCode */ - size_t for_column = 4; /* &criticality */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct UnsuccessfulOutcome, procedureCode)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_type_selector_result_t -select_UnsuccessfulOutcome_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { - asn_type_selector_result_t result = {0, 0}; - const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; - size_t constraining_column = 3; /* &procedureCode */ - size_t for_column = 2; /* &UnsuccessfulOutcome */ - size_t row, presence_index = 0; - const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct UnsuccessfulOutcome, procedureCode)); - - for(row=0; row < itable->rows_count; row++) { - const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; - const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; - - if(type_cell->cell_kind == aioc__undefined) - continue; - - presence_index++; - if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { - result.type_descriptor = type_cell->type_descriptor; - result.presence_index = presence_index; - break; - } - } - - return result; -} - -static int -memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - - if(1 /* No applicable constraints whatsoever */) { - /* Nothing is here. See below */ - } - - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); -} - -static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = { - { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { - { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_value_4[] = { - { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionFailure), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionFailure, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICsubscriptionFailure" - }, - { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionDeleteFailure), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICsubscriptionDeleteFailure, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICsubscriptionDeleteFailure" - }, - { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICserviceUpdateFailure), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICserviceUpdateFailure, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICserviceUpdateFailure" - }, - { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICcontrolFailure), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_RICcontrolFailure, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICcontrolFailure" - }, - { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2setupFailure), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_E2setupFailure, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "E2setupFailure" - }, -}; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 4 }, /* RICsubscriptionFailure */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 3 }, /* RICsubscriptionDeleteFailure */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 2 }, /* RICserviceUpdateFailure */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 1 }, /* RICcontrolFailure */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 0 } /* E2setupFailure */ -}; -static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { - sizeof(struct UnsuccessfulOutcome__value), - offsetof(struct UnsuccessfulOutcome__value, _asn_ctx), - offsetof(struct UnsuccessfulOutcome__value, present), - sizeof(((struct UnsuccessfulOutcome__value *)0)->present), - asn_MAP_value_tag2el_4, - 5, /* Count of tags in the map */ - 0, 0, - -1 /* Extensions start */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_4 = { - "value", - "value", - &asn_OP_OPEN_TYPE, - 0, /* No effective tags (pointer) */ - 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ - 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_4, - 5, /* Elements count */ - &asn_SPC_value_specs_4 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, procedureCode), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProcedureCode, - 0, - { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 }, - 0, 0, /* No default value */ - "procedureCode" - }, - { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, criticality), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_Criticality, - select_UnsuccessfulOutcome_criticality_type, - { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, - 0, 0, /* No default value */ - "criticality" - }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, value), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - +1, /* EXPLICIT tag at current level */ - &asn_DEF_value_4, - select_UnsuccessfulOutcome_value_type, - { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, - 0, 0, /* No default value */ - "value" - }, -}; -static const ber_tlv_tag_t asn_DEF_UnsuccessfulOutcome_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_UnsuccessfulOutcome_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ -}; -asn_SEQUENCE_specifics_t asn_SPC_UnsuccessfulOutcome_specs_1 = { - sizeof(struct UnsuccessfulOutcome), - offsetof(struct UnsuccessfulOutcome, _asn_ctx), - asn_MAP_UnsuccessfulOutcome_tag2el_1, - 3, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_UnsuccessfulOutcome = { - "UnsuccessfulOutcome", - "UnsuccessfulOutcome", - &asn_OP_SEQUENCE, - asn_DEF_UnsuccessfulOutcome_tags_1, - sizeof(asn_DEF_UnsuccessfulOutcome_tags_1) - /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */ - asn_DEF_UnsuccessfulOutcome_tags_1, /* Same as above */ - sizeof(asn_DEF_UnsuccessfulOutcome_tags_1) - /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_UnsuccessfulOutcome_1, - 3, /* Elements count */ - &asn_SPC_UnsuccessfulOutcome_specs_1 /* Additional specs */ -}; - diff --git a/Bouncer/asn1c_defs/UnsuccessfulOutcome.h b/Bouncer/asn1c_defs/UnsuccessfulOutcome.h deleted file mode 100644 index 5d8386e..0000000 --- a/Bouncer/asn1c_defs/UnsuccessfulOutcome.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "E2AP-PDU-Descriptions" - * found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn" - * `asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER` - */ - -#ifndef _UnsuccessfulOutcome_H_ -#define _UnsuccessfulOutcome_H_ - - -#include - -/* Including external dependencies */ -#include "ProcedureCode.h" -#include "Criticality.h" -#include -#include -#include "RICsubscriptionRequest.h" -#include "RICsubscriptionResponse.h" -#include "RICsubscriptionFailure.h" -#include "RICsubscriptionDeleteRequest.h" -#include "RICsubscriptionDeleteResponse.h" -#include "RICsubscriptionDeleteFailure.h" -#include "RICserviceUpdate.h" -#include "RICserviceUpdateAcknowledge.h" -#include "RICserviceUpdateFailure.h" -#include "RICcontrolRequest.h" -#include "RICcontrolAcknowledge.h" -#include "RICcontrolFailure.h" -#include "E2setupRequest.h" -#include "E2setupResponse.h" -#include "E2setupFailure.h" -#include "ResetRequest.h" -#include "ResetResponse.h" -#include "RICindication.h" -#include "RICserviceQuery.h" -#include "ErrorIndication.h" -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum UnsuccessfulOutcome__value_PR { - UnsuccessfulOutcome__value_PR_NOTHING, /* No components present */ - UnsuccessfulOutcome__value_PR_RICsubscriptionFailure, - UnsuccessfulOutcome__value_PR_RICsubscriptionDeleteFailure, - UnsuccessfulOutcome__value_PR_RICserviceUpdateFailure, - UnsuccessfulOutcome__value_PR_RICcontrolFailure, - UnsuccessfulOutcome__value_PR_E2setupFailure -} UnsuccessfulOutcome__value_PR; - -/* UnsuccessfulOutcome */ -typedef struct UnsuccessfulOutcome { - ProcedureCode_t procedureCode; - Criticality_t criticality; - struct UnsuccessfulOutcome__value { - UnsuccessfulOutcome__value_PR present; - union UnsuccessfulOutcome__value_u { - RICsubscriptionFailure_t RICsubscriptionFailure; - RICsubscriptionDeleteFailure_t RICsubscriptionDeleteFailure; - RICserviceUpdateFailure_t RICserviceUpdateFailure; - RICcontrolFailure_t RICcontrolFailure; - E2setupFailure_t E2setupFailure; - } choice; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } value; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} UnsuccessfulOutcome_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UnsuccessfulOutcome; -extern asn_SEQUENCE_specifics_t asn_SPC_UnsuccessfulOutcome_specs_1; -extern asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[3]; - -#ifdef __cplusplus -} -#endif - -#endif /* _UnsuccessfulOutcome_H_ */ -#include diff --git a/Bouncer/asn1c_defs/asn_constant.h b/Bouncer/asn1c_defs/asn_constant.h deleted file mode 100644 index cdae2a4..0000000 --- a/Bouncer/asn1c_defs/asn_constant.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - */ - -#ifndef _ASN_CONSTANT_H -#define _ASN_CONSTANT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define maxProtocolIEs (65535) -#define maxnoofErrors (256) -#define maxofRANfunctionID (256) -#define maxofRICactionID (16) -#define maxofRANParameters (255) - - -#ifdef __cplusplus -} -#endif - -#endif /* _ASN_CONSTANT_H */ diff --git a/Bouncer/asn1c_defs/constr_CHOICE.c b/Bouncer/asn1c_defs/constr_CHOICE.c deleted file mode 100644 index 613e6ea..0000000 --- a/Bouncer/asn1c_defs/constr_CHOICE.c +++ /dev/null @@ -1,1511 +0,0 @@ -/* - * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. - * Redistribution and modifications are permitted subject to BSD license. - */ -#include -#include -#include - -/* - * Number of bytes left for this structure. - * (ctx->left) indicates the number of bytes _transferred_ for the structure. - * (size) contains the number of bytes in the buffer passed. - */ -#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) - -/* - * If the subprocessor function returns with an indication that it wants - * more data, it may well be a fatal decoding problem, because the - * size is constrained by the 's L, even if the buffer size allows - * reading more data. - * For example, consider the buffer containing the following TLVs: - * ... - * The TLV length clearly indicates that one byte is expected in V, but - * if the V processor returns with "want more data" even if the buffer - * contains way more data than the V processor have seen. - */ -#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) - -/* - * This macro "eats" the part of the buffer which is definitely "consumed", - * i.e. was correctly converted into local representation or rightfully skipped. - */ -#undef ADVANCE -#define ADVANCE(num_bytes) do { \ - size_t num = num_bytes; \ - ptr = ((const char *)ptr) + num;\ - size -= num; \ - if(ctx->left >= 0) \ - ctx->left -= num; \ - consumed_myself += num; \ - } while(0) - -/* - * Switch to the next phase of parsing. - */ -#undef NEXT_PHASE -#define NEXT_PHASE(ctx) do { \ - ctx->phase++; \ - ctx->step = 0; \ - } while(0) - -/* - * Return a standardized complex structure. - */ -#undef RETURN -#define RETURN(_code) do { \ - rval.code = _code; \ - rval.consumed = consumed_myself;\ - return rval; \ - } while(0) - -/* - * See the definitions. - */ -static unsigned _fetch_present_idx(const void *struct_ptr, unsigned off, - unsigned size); -static void _set_present_idx(void *sptr, unsigned offset, unsigned size, - unsigned pres); -static const void *_get_member_ptr(const asn_TYPE_descriptor_t *, - const void *sptr, asn_TYPE_member_t **elm, - unsigned *present); - -/* - * Tags are canonically sorted in the tag to member table. - */ -static int -_search4tag(const void *ap, const void *bp) { - const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; - const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; - - int a_class = BER_TAG_CLASS(a->el_tag); - int b_class = BER_TAG_CLASS(b->el_tag); - - if(a_class == b_class) { - ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); - ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); - - if(a_value == b_value) - return 0; - else if(a_value < b_value) - return -1; - else - return 1; - } else if(a_class < b_class) { - return -1; - } else { - return 1; - } -} - -/* - * The decoder of the CHOICE type. - */ -asn_dec_rval_t -CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, void **struct_ptr, - const void *ptr, size_t size, int tag_mode) { - /* - * Bring closer parts of structure description. - */ - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - asn_TYPE_member_t *elements = td->elements; - - /* - * Parts of the structure being constructed. - */ - void *st = *struct_ptr; /* Target structure. */ - asn_struct_ctx_t *ctx; /* Decoder context */ - - ber_tlv_tag_t tlv_tag; /* T from TLV */ - ssize_t tag_len; /* Length of TLV's T */ - asn_dec_rval_t rval; /* Return code from subparsers */ - - ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ - - ASN_DEBUG("Decoding %s as CHOICE", td->name); - - /* - * Create the target structure if it is not present already. - */ - if(st == 0) { - st = *struct_ptr = CALLOC(1, specs->struct_size); - if(st == 0) { - RETURN(RC_FAIL); - } - } - - /* - * Restore parsing context. - */ - ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); - - /* - * Start to parse where left previously - */ - switch(ctx->phase) { - case 0: - /* - * PHASE 0. - * Check that the set of tags associated with given structure - * perfectly fits our expectations. - */ - - if(tag_mode || td->tags_count) { - rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, - tag_mode, -1, &ctx->left, 0); - if(rval.code != RC_OK) { - ASN_DEBUG("%s tagging check failed: %d", - td->name, rval.code); - return rval; - } - - if(ctx->left >= 0) { - /* ?Substracted below! */ - ctx->left += rval.consumed; - } - ADVANCE(rval.consumed); - } else { - ctx->left = -1; - } - - NEXT_PHASE(ctx); - - ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", - (long)ctx->left, (long)size); - - /* Fall through */ - case 1: - /* - * Fetch the T from TLV. - */ - tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); - ASN_DEBUG("In %s CHOICE tag length %d", td->name, (int)tag_len); - switch(tag_len) { - case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); - /* Fall through */ - case -1: RETURN(RC_FAIL); - } - - do { - const asn_TYPE_tag2member_t *t2m; - asn_TYPE_tag2member_t key; - - key.el_tag = tlv_tag; - t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, - specs->tag2el, specs->tag2el_count, - sizeof(specs->tag2el[0]), _search4tag); - if(t2m) { - /* - * Found the element corresponding to the tag. - */ - NEXT_PHASE(ctx); - ctx->step = t2m->el_no; - break; - } else if(specs->ext_start == -1) { - ASN_DEBUG("Unexpected tag %s " - "in non-extensible CHOICE %s", - ber_tlv_tag_string(tlv_tag), td->name); - RETURN(RC_FAIL); - } else { - /* Skip this tag */ - ssize_t skip; - - ASN_DEBUG("Skipping unknown tag %s", - ber_tlv_tag_string(tlv_tag)); - - skip = ber_skip_length(opt_codec_ctx, - BER_TLV_CONSTRUCTED(ptr), - (const char *)ptr + tag_len, - LEFT - tag_len); - - switch(skip) { - case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); - /* Fall through */ - case -1: RETURN(RC_FAIL); - } - - ADVANCE(skip + tag_len); - RETURN(RC_OK); - } - } while(0); - - case 2: - /* - * PHASE 2. - * Read in the element. - */ - do { - asn_TYPE_member_t *elm;/* CHOICE's element */ - void *memb_ptr; /* Pointer to the member */ - void **memb_ptr2; /* Pointer to that pointer */ - - elm = &elements[ctx->step]; - - /* - * Compute the position of the member inside a structure, - * and also a type of containment (it may be contained - * as pointer or using inline inclusion). - */ - if(elm->flags & ATF_POINTER) { - /* Member is a pointer to another structure */ - memb_ptr2 = (void **)((char *)st + elm->memb_offset); - } else { - /* - * A pointer to a pointer - * holding the start of the structure - */ - memb_ptr = (char *)st + elm->memb_offset; - memb_ptr2 = &memb_ptr; - } - /* Set presence to be able to free it properly at any time */ - _set_present_idx(st, specs->pres_offset, - specs->pres_size, ctx->step + 1); - /* - * Invoke the member fetch routine according to member's type - */ - rval = elm->type->op->ber_decoder(opt_codec_ctx, elm->type, - memb_ptr2, ptr, LEFT, elm->tag_mode); - switch(rval.code) { - case RC_OK: - break; - case RC_WMORE: /* More data expected */ - if(!SIZE_VIOLATION) { - ADVANCE(rval.consumed); - RETURN(RC_WMORE); - } - RETURN(RC_FAIL); - case RC_FAIL: /* Fatal error */ - RETURN(rval.code); - } /* switch(rval) */ - - ADVANCE(rval.consumed); - } while(0); - - NEXT_PHASE(ctx); - - /* Fall through */ - case 3: - ASN_DEBUG("CHOICE %s Leftover: %ld, size = %ld, tm=%d, tc=%d", - td->name, (long)ctx->left, (long)size, - tag_mode, td->tags_count); - - if(ctx->left > 0) { - /* - * The type must be fully decoded - * by the CHOICE member-specific decoder. - */ - RETURN(RC_FAIL); - } - - if(ctx->left == -1 - && !(tag_mode || td->tags_count)) { - /* - * This is an untagged CHOICE. - * It doesn't contain nothing - * except for the member itself, including all its tags. - * The decoding is completed. - */ - NEXT_PHASE(ctx); - break; - } - - /* - * Read in the "end of data chunks"'s. - */ - while(ctx->left < 0) { - ssize_t tl; - - tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); - switch(tl) { - case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); - /* Fall through */ - case -1: RETURN(RC_FAIL); - } - - /* - * Expected <0><0>... - */ - if(((const uint8_t *)ptr)[0] == 0) { - if(LEFT < 2) { - if(SIZE_VIOLATION) - RETURN(RC_FAIL); - else - RETURN(RC_WMORE); - } else if(((const uint8_t *)ptr)[1] == 0) { - /* - * Correctly finished with <0><0>. - */ - ADVANCE(2); - ctx->left++; - continue; - } - } else { - ASN_DEBUG("Unexpected continuation in %s", - td->name); - RETURN(RC_FAIL); - } - - /* UNREACHABLE */ - } - - NEXT_PHASE(ctx); - case 4: - /* No meaningful work here */ - break; - } - - RETURN(RC_OK); -} - -asn_enc_rval_t -CHOICE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, - int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, - void *app_key) { - const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; - asn_TYPE_member_t *elm; /* CHOICE element */ - asn_enc_rval_t erval = {0,0,0}; - const void *memb_ptr; - size_t computed_size = 0; - unsigned present; - - if(!sptr) ASN__ENCODE_FAILED; - - ASN_DEBUG("%s %s as CHOICE", - cb?"Encoding":"Estimating", td->name); - - present = _fetch_present_idx(sptr, - specs->pres_offset, specs->pres_size); - - /* - * If the structure was not initialized, it cannot be encoded: - * can't deduce what to encode in the choice type. - */ - if(present == 0 || present > td->elements_count) { - if(present == 0 && td->elements_count == 0) { - /* The CHOICE is empty?! */ - erval.encoded = 0; - ASN__ENCODED_OK(erval); - } - ASN__ENCODE_FAILED; - } - - /* - * Seek over the present member of the structure. - */ - elm = &td->elements[present-1]; - if(elm->flags & ATF_POINTER) { - memb_ptr = - *(const void *const *)((const char *)sptr + elm->memb_offset); - if(memb_ptr == 0) { - if(elm->optional) { - erval.encoded = 0; - ASN__ENCODED_OK(erval); - } - /* Mandatory element absent */ - ASN__ENCODE_FAILED; - } - } else { - memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); - } - - /* - * If the CHOICE itself is tagged EXPLICIT: - * T ::= [2] EXPLICIT CHOICE { ... } - * Then emit the appropriate tags. - */ - if(tag_mode == 1 || td->tags_count) { - /* - * For this, we need to pre-compute the member. - */ - ssize_t ret; - - /* Encode member with its tag */ - erval = elm->type->op->der_encoder(elm->type, memb_ptr, - elm->tag_mode, elm->tag, 0, 0); - if(erval.encoded == -1) - return erval; - - /* Encode CHOICE with parent or my own tag */ - ret = der_write_tags(td, erval.encoded, tag_mode, 1, tag, - cb, app_key); - if(ret == -1) - ASN__ENCODE_FAILED; - computed_size += ret; - } - - /* - * Encode the single underlying member. - */ - erval = elm->type->op->der_encoder(elm->type, memb_ptr, - elm->tag_mode, elm->tag, cb, app_key); - if(erval.encoded == -1) - return erval; - - ASN_DEBUG("Encoded CHOICE member in %ld bytes (+%ld)", - (long)erval.encoded, (long)computed_size); - - erval.encoded += computed_size; - - return erval; -} - -ber_tlv_tag_t -CHOICE_outmost_tag(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag) { - const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; - unsigned present; - - assert(tag_mode == 0); (void)tag_mode; - assert(tag == 0); (void)tag; - - /* - * Figure out which CHOICE element is encoded. - */ - present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); - - if(present > 0 && present <= td->elements_count) { - const asn_TYPE_member_t *elm = &td->elements[present-1]; - const void *memb_ptr; - - if(elm->flags & ATF_POINTER) { - memb_ptr = *(const void * const *) - ((const char *)ptr + elm->memb_offset); - } else { - memb_ptr = (const void *) - ((const char *)ptr + elm->memb_offset); - } - - return asn_TYPE_outmost_tag(elm->type, memb_ptr, - elm->tag_mode, elm->tag); - } else { - return (ber_tlv_tag_t)-1; - } -} - -int -CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_app_constraint_failed_f *ctfailcb, void *app_key) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - unsigned present; - - if(!sptr) { - ASN__CTFAIL(app_key, td, sptr, - "%s: value not given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } - - /* - * Figure out which CHOICE element is encoded. - */ - present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); - if(present > 0 && present <= td->elements_count) { - asn_TYPE_member_t *elm = &td->elements[present-1]; - const void *memb_ptr; - - if(elm->flags & ATF_POINTER) { - memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); - if(!memb_ptr) { - if(elm->optional) - return 0; - ASN__CTFAIL(app_key, td, sptr, - "%s: mandatory CHOICE element %s absent (%s:%d)", - td->name, elm->name, __FILE__, __LINE__); - return -1; - } - } else { - memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); - } - - if(elm->encoding_constraints.general_constraints) { - return elm->encoding_constraints.general_constraints(elm->type, memb_ptr, - ctfailcb, app_key); - } else { - return elm->type->encoding_constraints.general_constraints(elm->type, - memb_ptr, ctfailcb, app_key); - } - } else { - ASN__CTFAIL(app_key, td, sptr, - "%s: no CHOICE element given (%s:%d)", - td->name, __FILE__, __LINE__); - return -1; - } -} - -#undef XER_ADVANCE -#define XER_ADVANCE(num_bytes) do { \ - size_t num = num_bytes; \ - buf_ptr = (const void *)(((const char *)buf_ptr) + num); \ - size -= num; \ - consumed_myself += num; \ - } while(0) - -/* - * Decode the XER (XML) data. - */ -asn_dec_rval_t -CHOICE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, void **struct_ptr, - const char *opt_mname, const void *buf_ptr, size_t size) { - /* - * Bring closer parts of structure description. - */ - const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; - const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; - - /* - * Parts of the structure being constructed. - */ - void *st = *struct_ptr; /* Target structure. */ - asn_struct_ctx_t *ctx; /* Decoder context */ - - asn_dec_rval_t rval; /* Return value of a decoder */ - ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ - size_t edx; /* Element index */ - - /* - * Create the target structure if it is not present already. - */ - if(st == 0) { - st = *struct_ptr = CALLOC(1, specs->struct_size); - if(st == 0) RETURN(RC_FAIL); - } - - /* - * Restore parsing context. - */ - ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); - if(ctx->phase == 0 && !*xml_tag) - ctx->phase = 1; /* Skip the outer tag checking phase */ - - /* - * Phases of XER/XML processing: - * Phase 0: Check that the opening tag matches our expectations. - * Phase 1: Processing body and reacting on closing tag. - * Phase 2: Processing inner type. - * Phase 3: Only waiting for closing tag. - * Phase 4: Skipping unknown extensions. - * Phase 5: PHASED OUT - */ - for(edx = ctx->step; ctx->phase <= 4;) { - pxer_chunk_type_e ch_type; /* XER chunk type */ - ssize_t ch_size; /* Chunk size */ - xer_check_tag_e tcv; /* Tag check value */ - asn_TYPE_member_t *elm; - - /* - * Go inside the member. - */ - if(ctx->phase == 2) { - asn_dec_rval_t tmprval; - void *memb_ptr; /* Pointer to the member */ - void **memb_ptr2; /* Pointer to that pointer */ - unsigned old_present; - - elm = &td->elements[edx]; - - if(elm->flags & ATF_POINTER) { - /* Member is a pointer to another structure */ - memb_ptr2 = (void **)((char *)st - + elm->memb_offset); - } else { - memb_ptr = (char *)st + elm->memb_offset; - memb_ptr2 = &memb_ptr; - } - - /* Start/Continue decoding the inner member */ - tmprval = elm->type->op->xer_decoder(opt_codec_ctx, - elm->type, memb_ptr2, elm->name, - buf_ptr, size); - XER_ADVANCE(tmprval.consumed); - ASN_DEBUG("XER/CHOICE: itdf: [%s] code=%d", - elm->type->name, tmprval.code); - old_present = _fetch_present_idx(st, - specs->pres_offset, specs->pres_size); - assert(old_present == 0 || old_present == edx + 1); - /* Record what we've got */ - _set_present_idx(st, - specs->pres_offset, specs->pres_size, edx + 1); - if(tmprval.code != RC_OK) - RETURN(tmprval.code); - ctx->phase = 3; - /* Fall through */ - } - - /* No need to wait for closing tag; special mode. */ - if(ctx->phase == 3 && !*xml_tag) { - ctx->phase = 5; /* Phase out */ - RETURN(RC_OK); - } - - /* - * Get the next part of the XML stream. - */ - ch_size = xer_next_token(&ctx->context, buf_ptr, size, &ch_type); - if(ch_size == -1) { - RETURN(RC_FAIL); - } else { - switch(ch_type) { - case PXER_WMORE: - RETURN(RC_WMORE); - case PXER_COMMENT: /* Got XML comment */ - case PXER_TEXT: /* Ignore free-standing text */ - XER_ADVANCE(ch_size); /* Skip silently */ - continue; - case PXER_TAG: - break; /* Check the rest down there */ - } - } - - tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); - ASN_DEBUG("XER/CHOICE checked [%c%c%c%c] vs [%s], tcv=%d", - ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', - ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', - ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', - ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', - xml_tag, tcv); - - /* Skip the extensions section */ - if(ctx->phase == 4) { - ASN_DEBUG("skip_unknown(%d, %ld)", - tcv, (long)ctx->left); - switch(xer_skip_unknown(tcv, &ctx->left)) { - case -1: - ctx->phase = 5; - RETURN(RC_FAIL); - case 1: - ctx->phase = 3; - /* Fall through */ - case 0: - XER_ADVANCE(ch_size); - continue; - case 2: - ctx->phase = 3; - break; - } - } - - switch(tcv) { - case XCT_BOTH: - break; /* No CHOICE? */ - case XCT_CLOSING: - if(ctx->phase != 3) - break; - XER_ADVANCE(ch_size); - ctx->phase = 5; /* Phase out */ - RETURN(RC_OK); - case XCT_OPENING: - if(ctx->phase == 0) { - XER_ADVANCE(ch_size); - ctx->phase = 1; /* Processing body phase */ - continue; - } - /* Fall through */ - case XCT_UNKNOWN_OP: - case XCT_UNKNOWN_BO: - - if(ctx->phase != 1) - break; /* Really unexpected */ - - /* - * Search which inner member corresponds to this tag. - */ - for(edx = 0; edx < td->elements_count; edx++) { - elm = &td->elements[edx]; - tcv = xer_check_tag(buf_ptr,ch_size,elm->name); - switch(tcv) { - case XCT_BOTH: - case XCT_OPENING: - /* - * Process this member. - */ - ctx->step = edx; - ctx->phase = 2; - break; - case XCT_UNKNOWN_OP: - case XCT_UNKNOWN_BO: - continue; - default: - edx = td->elements_count; - break; /* Phase out */ - } - break; - } - if(edx != td->elements_count) - continue; - - /* It is expected extension */ - if(specs->ext_start != -1) { - ASN_DEBUG("Got anticipated extension"); - /* - * Check for (XCT_BOTH or XCT_UNKNOWN_BO) - * By using a mask. Only record a pure - * tags. - */ - if(tcv & XCT_CLOSING) { - /* Found without body */ - ctx->phase = 3; /* Terminating */ - } else { - ctx->left = 1; - ctx->phase = 4; /* Skip ...'s */ - } - XER_ADVANCE(ch_size); - continue; - } - - /* Fall through */ - default: - break; - } - - ASN_DEBUG("Unexpected XML tag [%c%c%c%c] in CHOICE [%s]" - " (ph=%d, tag=%s)", - ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', - ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', - ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', - ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', - td->name, ctx->phase, xml_tag); - break; - } - - ctx->phase = 5; /* Phase out, just in case */ - RETURN(RC_FAIL); -} - - -asn_enc_rval_t -CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, - enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, - void *app_key) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - asn_enc_rval_t er = {0,0,0}; - unsigned present = 0; - - if(!sptr) - ASN__ENCODE_FAILED; - - /* - * Figure out which CHOICE element is encoded. - */ - present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); - - if(present == 0 || present > td->elements_count) { - ASN__ENCODE_FAILED; - } else { - asn_enc_rval_t tmper = {0,0,0}; - asn_TYPE_member_t *elm = &td->elements[present-1]; - const void *memb_ptr = NULL; - const char *mname = elm->name; - unsigned int mlen = strlen(mname); - - if(elm->flags & ATF_POINTER) { - memb_ptr = - *(const void *const *)((const char *)sptr + elm->memb_offset); - if(!memb_ptr) ASN__ENCODE_FAILED; - } else { - memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); - } - - er.encoded = 0; - - if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel); - ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); - - tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, - ilevel + 1, flags, cb, app_key); - if(tmper.encoded == -1) return tmper; - er.encoded += tmper.encoded; - - ASN__CALLBACK3("", 1); - } - - if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel - 1); - - ASN__ENCODED_OK(er); -cb_failed: - ASN__ENCODE_FAILED; -} - -asn_dec_rval_t -CHOICE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, void **sptr, - asn_per_data_t *pd) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - asn_dec_rval_t rv; - const asn_per_constraint_t *ct; - asn_TYPE_member_t *elm; /* CHOICE's element */ - void *memb_ptr; - void **memb_ptr2; - void *st = *sptr; - int value; - - if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) - ASN__DECODE_FAILED; - - /* - * Create the target structure if it is not present already. - */ - if(!st) { - st = *sptr = CALLOC(1, specs->struct_size); - if(!st) ASN__DECODE_FAILED; - } - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; - else ct = 0; - - if(ct && ct->flags & APC_EXTENSIBLE) { - value = per_get_few_bits(pd, 1); - if(value < 0) ASN__DECODE_STARVED; - if(value) ct = 0; /* Not restricted */ - } - - if(ct && ct->range_bits >= 0) { - value = per_get_few_bits(pd, ct->range_bits); - if(value < 0) ASN__DECODE_STARVED; - ASN_DEBUG("CHOICE %s got index %d in range %d", - td->name, value, ct->range_bits); - if(value > ct->upper_bound) - ASN__DECODE_FAILED; - } else { - if(specs->ext_start == -1) - ASN__DECODE_FAILED; - value = uper_get_nsnnwn(pd); - if(value < 0) ASN__DECODE_STARVED; - value += specs->ext_start; - if((unsigned)value >= td->elements_count) - ASN__DECODE_FAILED; - } - - /* Adjust if canonical order is different from natural order */ - if(specs->from_canonical_order) { - ASN_DEBUG("CHOICE presence from wire %d", value); - value = specs->from_canonical_order[value]; - ASN_DEBUG("CHOICE presence index effective %d", value); - } - - /* Set presence to be able to free it later */ - _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); - - elm = &td->elements[value]; - if(elm->flags & ATF_POINTER) { - /* Member is a pointer to another structure */ - memb_ptr2 = (void **)((char *)st + elm->memb_offset); - } else { - memb_ptr = (char *)st + elm->memb_offset; - memb_ptr2 = &memb_ptr; - } - ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); - - if(ct && ct->range_bits >= 0) { - rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, - elm->encoding_constraints.per_constraints, memb_ptr2, pd); - } else { - rv = uper_open_type_get(opt_codec_ctx, elm->type, - elm->encoding_constraints.per_constraints, memb_ptr2, pd); - } - - if(rv.code != RC_OK) - ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", - elm->name, td->name, rv.code); - return rv; -} - -asn_enc_rval_t -CHOICE_encode_uper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, const void *sptr, - asn_per_outp_t *po) { - const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; - asn_TYPE_member_t *elm; /* CHOICE's element */ - const asn_per_constraint_t *ct; - const void *memb_ptr; - unsigned present; - int present_enc; - - if(!sptr) ASN__ENCODE_FAILED; - - ASN_DEBUG("Encoding %s as CHOICE", td->name); - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) - ct = &td->encoding_constraints.per_constraints->value; - else ct = 0; - - present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); - - /* - * If the structure was not initialized properly, it cannot be encoded: - * can't deduce what to encode in the choice type. - */ - if(present == 0 || present > td->elements_count) - ASN__ENCODE_FAILED; - else - present--; - - ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); - - /* Adjust if canonical order is different from natural order */ - if(specs->to_canonical_order) - present_enc = specs->to_canonical_order[present]; - else - present_enc = present; - - if(ct && ct->range_bits >= 0) { - if(present_enc < ct->lower_bound - || present_enc > ct->upper_bound) { - if(ct->flags & APC_EXTENSIBLE) { - ASN_DEBUG( - "CHOICE member %d (enc %d) is an extension (%ld..%ld)", - present, present_enc, ct->lower_bound, ct->upper_bound); - if(per_put_few_bits(po, 1, 1)) - ASN__ENCODE_FAILED; - } else { - ASN__ENCODE_FAILED; - } - ct = 0; - } - } - if(ct && ct->flags & APC_EXTENSIBLE) { - ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", - present, present_enc, ct->lower_bound, ct->upper_bound); - if(per_put_few_bits(po, 0, 1)) - ASN__ENCODE_FAILED; - } - - - elm = &td->elements[present]; - ASN_DEBUG("CHOICE member \"%s\" %d (as %d)", elm->name, present, - present_enc); - if(elm->flags & ATF_POINTER) { - /* Member is a pointer to another structure */ - memb_ptr = - *(const void *const *)((const char *)sptr + elm->memb_offset); - if(!memb_ptr) ASN__ENCODE_FAILED; - } else { - memb_ptr = (const char *)sptr + elm->memb_offset; - } - - if(ct && ct->range_bits >= 0) { - if(per_put_few_bits(po, present_enc, ct->range_bits)) - ASN__ENCODE_FAILED; - - return elm->type->op->uper_encoder( - elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); - } else { - asn_enc_rval_t rval = {0,0,0}; - if(specs->ext_start == -1) ASN__ENCODE_FAILED; - if(uper_put_nsnnwn(po, present_enc - specs->ext_start)) - ASN__ENCODE_FAILED; - if(uper_open_type_put(elm->type, - elm->encoding_constraints.per_constraints, - memb_ptr, po)) - ASN__ENCODE_FAILED; - rval.encoded = 0; - ASN__ENCODED_OK(rval); - } -} - -asn_dec_rval_t -CHOICE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, - const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { - const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; - asn_dec_rval_t rv; - const asn_per_constraint_t *ct; - asn_TYPE_member_t *elm; /* CHOICE's element */ - void *memb_ptr; - void **memb_ptr2; - void *st = *sptr; - int value; - - if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) - ASN__DECODE_FAILED; - - /* - * Create the target structure if it is not present already. - */ - if(!st) { - st = *sptr = CALLOC(1, specs->struct_size); - if(!st) ASN__DECODE_FAILED; - } - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) - ct = &td->encoding_constraints.per_constraints->value; - else ct = 0; - - if(ct && ct->flags & APC_EXTENSIBLE) { - value = per_get_few_bits(pd, 1); - if(value < 0) ASN__DECODE_STARVED; - if(value) ct = 0; /* Not restricted */ - } - - if(ct && ct->range_bits >= 0) { - value = per_get_few_bits(pd, ct->range_bits); - if(value < 0) ASN__DECODE_STARVED; - ASN_DEBUG("CHOICE %s got index %d in range %d", - td->name, value, ct->range_bits); - if(value > ct->upper_bound) - ASN__DECODE_FAILED; - } else { - if(specs->ext_start == -1) - ASN__DECODE_FAILED; - value = uper_get_nsnnwn(pd); - if(value < 0) ASN__DECODE_STARVED; - value += specs->ext_start; - if((unsigned)value >= td->elements_count) - ASN__DECODE_FAILED; - } - - /* Adjust if canonical order is different from natural order */ - if(specs->from_canonical_order) - value = specs->from_canonical_order[value]; - - /* Set presence to be able to free it later */ - _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); - - elm = &td->elements[value]; - if(elm->flags & ATF_POINTER) { - /* Member is a pointer to another structure */ - memb_ptr2 = (void **)((char *)st + elm->memb_offset); - } else { - memb_ptr = (char *)st + elm->memb_offset; - memb_ptr2 = &memb_ptr; - } - ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); - - if(ct && ct->range_bits >= 0) { - rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, - elm->encoding_constraints.per_constraints, memb_ptr2, pd); - } else { - rv = uper_open_type_get(opt_codec_ctx, elm->type, - elm->encoding_constraints.per_constraints, memb_ptr2, pd); - } - - if(rv.code != RC_OK) - ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", - elm->name, td->name, rv.code); - return rv; -} - -asn_enc_rval_t -CHOICE_encode_aper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - const void *sptr, asn_per_outp_t *po) { - const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; - const asn_TYPE_member_t *elm; /* CHOICE's element */ - const asn_per_constraint_t *ct; - const void *memb_ptr; - int present; - - if(!sptr) ASN__ENCODE_FAILED; - - ASN_DEBUG("Encoding %s as CHOICE using ALIGNED PER", td->name); - - if(constraints) ct = &constraints->value; - else if(td->encoding_constraints.per_constraints) - ct = &td->encoding_constraints.per_constraints->value; - else ct = 0; - - present = _fetch_present_idx(sptr, - specs->pres_offset, specs->pres_size); - - /* - * If the structure was not initialized properly, it cannot be encoded: - * can't deduce what to encode in the choice type. - */ - if(present <= 0 || (unsigned)present > td->elements_count) - ASN__ENCODE_FAILED; - else - present--; - - /* Adjust if canonical order is different from natural order */ - if(specs->to_canonical_order) - present = specs->to_canonical_order[present]; - - ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); - - if(ct && ct->range_bits >= 0) { - if(present < ct->lower_bound - || present > ct->upper_bound) { - if(ct->flags & APC_EXTENSIBLE) { - if(per_put_few_bits(po, 1, 1)) - ASN__ENCODE_FAILED; - } else { - ASN__ENCODE_FAILED; - } - ct = 0; - } - } - if(ct && ct->flags & APC_EXTENSIBLE) { - if(per_put_few_bits(po, 0, 1)) - ASN__ENCODE_FAILED; - } - - elm = &td->elements[present]; - if(elm->flags & ATF_POINTER) { - /* Member is a pointer to another structure */ - memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); - if(!memb_ptr) ASN__ENCODE_FAILED; - } else { - memb_ptr = (const char *)sptr + elm->memb_offset; - } - - if(ct && ct->range_bits >= 0) { - if(per_put_few_bits(po, present, ct->range_bits)) - ASN__ENCODE_FAILED; - - return elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, - memb_ptr, po); - } else { - asn_enc_rval_t rval = {0,0,0}; - if(specs->ext_start == -1) - ASN__ENCODE_FAILED; - if (ct) { - if(aper_put_nsnnwn(po, ct->range_bits, present - specs->ext_start)) - ASN__ENCODE_FAILED; - } - if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, - memb_ptr, po)) - ASN__ENCODE_FAILED; - rval.encoded = 0; - ASN__ENCODED_OK(rval); - } -} - -int -CHOICE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, - asn_app_consume_bytes_f *cb, void *app_key) { - const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; - unsigned present; - - if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; - - /* - * Figure out which CHOICE element is encoded. - */ - present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); - - /* - * Print that element. - */ - if(present > 0 && present <= td->elements_count) { - asn_TYPE_member_t *elm = &td->elements[present-1]; - const void *memb_ptr; - - if(elm->flags & ATF_POINTER) { - memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); - if(!memb_ptr) return (cb("", 8, app_key) < 0) ? -1 : 0; - } else { - memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); - } - - /* Print member's name and stuff */ - if(0) { - if(cb(elm->name, strlen(elm->name), app_key) < 0 - || cb(": ", 2, app_key) < 0) - return -1; - } - - return elm->type->op->print_struct(elm->type, memb_ptr, ilevel, - cb, app_key); - } else { - return (cb("", 8, app_key) < 0) ? -1 : 0; - } -} - -void -CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr, - enum asn_struct_free_method method) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - unsigned present; - - if(!td || !ptr) - return; - - ASN_DEBUG("Freeing %s as CHOICE", td->name); - - /* - * Figure out which CHOICE element is encoded. - */ - present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); - - /* - * Free that element. - */ - if(present > 0 && present <= td->elements_count) { - asn_TYPE_member_t *elm = &td->elements[present-1]; - void *memb_ptr; - - if(elm->flags & ATF_POINTER) { - memb_ptr = *(void **)((char *)ptr + elm->memb_offset); - if(memb_ptr) - ASN_STRUCT_FREE(*elm->type, memb_ptr); - } else { - memb_ptr = (void *)((char *)ptr + elm->memb_offset); - ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); - } - } - - switch(method) { - case ASFM_FREE_EVERYTHING: - FREEMEM(ptr); - break; - case ASFM_FREE_UNDERLYING: - break; - case ASFM_FREE_UNDERLYING_AND_RESET: - memset(ptr, 0, specs->struct_size); - break; - } -} - - -/* - * The following functions functions offer protection against -fshort-enums, - * compatible with little- and big-endian machines. - * If assertion is triggered, either disable -fshort-enums, or add an entry - * here with the ->pres_size of your target stracture. - * Unless the target structure is packed, the ".present" member - * is guaranteed to be aligned properly. ASN.1 compiler itself does not - * produce packed code. - */ -static unsigned -_fetch_present_idx(const void *struct_ptr, unsigned pres_offset, - unsigned pres_size) { - const void *present_ptr; - unsigned present; - - present_ptr = ((const char *)struct_ptr) + pres_offset; - - switch(pres_size) { - case sizeof(int): present = *(const unsigned int *)present_ptr; break; - case sizeof(short): present = *(const unsigned short *)present_ptr; break; - case sizeof(char): present = *(const unsigned char *)present_ptr; break; - default: - /* ANSI C mandates enum to be equivalent to integer */ - assert(pres_size != sizeof(int)); - return 0; /* If not aborted, pass back safe value */ - } - - return present; -} - -static void -_set_present_idx(void *struct_ptr, unsigned pres_offset, unsigned pres_size, - unsigned present) { - void *present_ptr; - present_ptr = ((char *)struct_ptr) + pres_offset; - - switch(pres_size) { - case sizeof(int): *(unsigned int *)present_ptr = present; break; - case sizeof(short): *(unsigned short *)present_ptr = present; break; - case sizeof(char): *(unsigned char *)present_ptr = present; break; - default: - /* ANSI C mandates enum to be equivalent to integer */ - assert(pres_size != sizeof(int)); - } -} - -static const void * -_get_member_ptr(const asn_TYPE_descriptor_t *td, const void *sptr, - asn_TYPE_member_t **elm_ptr, unsigned *present_out) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - unsigned present; - - if(!sptr) { - *elm_ptr = NULL; - *present_out = 0; - return NULL; - } - - /* - * Figure out which CHOICE element is encoded. - */ - present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); - *present_out = present; - - /* - * The presence index is intentionally 1-based to avoid - * treating zeroed structure as a valid one. - */ - if(present > 0 && present <= td->elements_count) { - asn_TYPE_member_t *const elm = &td->elements[present - 1]; - const void *memb_ptr; - - if(elm->flags & ATF_POINTER) { - memb_ptr = - *(const void *const *)((const char *)sptr + elm->memb_offset); - } else { - memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); - } - *elm_ptr = elm; - return memb_ptr; - } else { - *elm_ptr = NULL; - return NULL; - } - -} - -int -CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { - asn_TYPE_member_t *aelm; - asn_TYPE_member_t *belm; - unsigned apresent = 0; - unsigned bpresent = 0; - const void *amember = _get_member_ptr(td, aptr, &aelm, &apresent); - const void *bmember = _get_member_ptr(td, bptr, &belm, &bpresent); - - if(amember && bmember) { - if(apresent == bpresent) { - assert(aelm == belm); - return aelm->type->op->compare_struct(aelm->type, amember, bmember); - } else if(apresent < bpresent) { - return -1; - } else { - return 1; - } - } else if(!amember) { - return -1; - } else { - return 1; - } -} - -/* - * Return the 1-based choice variant presence index. - * Returns 0 in case of error. - */ -unsigned -CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, const void *sptr) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - return _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); -} - -/* - * Sets or resets the 1-based choice variant presence index. - * In case a previous index is not zero, the currently selected structure - * member is freed and zeroed-out first. - * Returns 0 on success and -1 on error. - */ -int -CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, - unsigned present) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - unsigned old_present; - - if(!sptr) { - return -1; - } - - if(present > td->elements_count) - return -1; - - old_present = - _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); - if(present == old_present) - return 0; - - if(old_present != 0) { - assert(old_present <= td->elements_count); - ASN_STRUCT_RESET(*td, sptr); - } - - _set_present_idx(sptr, specs->pres_offset, specs->pres_size, present); - - return 0; -} - - -asn_random_fill_result_t -CHOICE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, - const asn_encoding_constraints_t *constr, - size_t max_length) { - const asn_CHOICE_specifics_t *specs = - (const asn_CHOICE_specifics_t *)td->specifics; - asn_random_fill_result_t res; - asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; - asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; - const asn_TYPE_member_t *elm; - unsigned present; - void *memb_ptr; /* Pointer to the member */ - void **memb_ptr2; /* Pointer to that pointer */ - void *st = *sptr; - - if(max_length == 0) return result_skipped; - - (void)constr; - - if(st == NULL) { - st = CALLOC(1, specs->struct_size); - if(st == NULL) { - return result_failed; - } - } - - present = asn_random_between(1, td->elements_count); - elm = &td->elements[present - 1]; - - if(elm->flags & ATF_POINTER) { - /* Member is a pointer to another structure */ - memb_ptr2 = (void **)((char *)st + elm->memb_offset); - } else { - memb_ptr = (char *)st + elm->memb_offset; - memb_ptr2 = &memb_ptr; - } - - res = elm->type->op->random_fill(elm->type, memb_ptr2, - &elm->encoding_constraints, max_length); - _set_present_idx(st, specs->pres_offset, specs->pres_size, present); - if(res.code == ARFILL_OK) { - *sptr = st; - } else { - if(st == *sptr) { - ASN_STRUCT_RESET(*td, st); - } else { - ASN_STRUCT_FREE(*td, st); - } - } - - return res; -} - - -asn_TYPE_operation_t asn_OP_CHOICE = { - CHOICE_free, - CHOICE_print, - CHOICE_compare, - CHOICE_decode_ber, - CHOICE_encode_der, - CHOICE_decode_xer, - CHOICE_encode_xer, -#ifdef ASN_DISABLE_OER_SUPPORT - 0, - 0, -#else - CHOICE_decode_oer, - CHOICE_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, -#else - CHOICE_decode_uper, - CHOICE_encode_uper, - CHOICE_decode_aper, - CHOICE_encode_aper, -#endif /* ASN_DISABLE_PER_SUPPORT */ - CHOICE_random_fill, - CHOICE_outmost_tag -}; diff --git a/Bouncer/asn1c_defs/pdu_collection.c b/Bouncer/asn1c_defs/pdu_collection.c deleted file mode 100644 index c77a828..0000000 --- a/Bouncer/asn1c_defs/pdu_collection.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - */ - -struct asn_TYPE_descriptor_s; /* Forward declaration */ - -extern struct asn_TYPE_descriptor_s asn_DEF_E2AP_PDU; -extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_Bouncer_EventTriggerDefinition; -extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_Bouncer_ActionDefinition; -extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_Bouncer_IndicationHeader; -extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_Bouncer_IndicationMessage; -extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_Bouncer_ControlHeader; -extern struct asn_TYPE_descriptor_s asn_DEF_E2SM_Bouncer_ControlMessage; -extern struct asn_TYPE_descriptor_s asn_DEF_B_ControlCommand; - - -struct asn_TYPE_descriptor_s *asn_pdu_collection[] = { - /* From module E2AP-PDU-Descriptions in /home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn */ - &asn_DEF_E2AP_PDU, - /* From module E2SM-Bouncer-IEs in /home/sjana/ASN-Defns/e2sm-Bouncer-v002.asn */ - &asn_DEF_E2SM_Bouncer_EventTriggerDefinition, - &asn_DEF_E2SM_Bouncer_ActionDefinition, - &asn_DEF_E2SM_Bouncer_IndicationHeader, - &asn_DEF_E2SM_Bouncer_IndicationMessage, - &asn_DEF_E2SM_Bouncer_ControlHeader, - &asn_DEF_E2SM_Bouncer_ControlMessage, - &asn_DEF_B_ControlCommand, - 0 -}; - diff --git a/Bouncer/baseimage/Dockerfile b/Bouncer/baseimage/Dockerfile new file mode 100644 index 0000000..66a2084 --- /dev/null +++ b/Bouncer/baseimage/Dockerfile @@ -0,0 +1,149 @@ +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 as buildenv +#FROM nexus3.o-ran-sc.org:10001/ubuntu:18.04 as buildenv +# spaces to save things in the build image to copy to final image +RUN mkdir -p /playpen/assets /playpen/src /playpen/bin +ARG SRC=. + +WORKDIR /playpen + +# versions we snarf from package cloud +ARG RMR_VER=4.8.1 +#ARG SDL_VER=1.4.0 +ARG XFCPP_VER=2.3.8 + +# package cloud urls for wget +ARG PC_REL_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch +# ARG PC_STG_URL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch + +# pull in rmr +RUN wget -nv --content-disposition ${PC_REL_URL}/rmr_${RMR_VER}_amd64.deb/download.deb && \ + wget -nv --content-disposition ${PC_REL_URL}/rmr-dev_${RMR_VER}_amd64.deb/download.deb && \ + dpkg -i rmr_${RMR_VER}_amd64.deb rmr-dev_${RMR_VER}_amd64.deb + +# pull in xapp framework c++ +RUN wget -nv --content-disposition ${PC_REL_URL}/ricxfcpp-dev_${XFCPP_VER}_amd64.deb/download.deb && \ + wget -nv --content-disposition ${PC_REL_URL}/ricxfcpp_${XFCPP_VER}_amd64.deb/download.deb && \ + dpkg -i ricxfcpp-dev_${XFCPP_VER}_amd64.deb ricxfcpp_${XFCPP_VER}_amd64.deb + +# # snarf up SDL dependencies, then pull SDL package and install +RUN apt-get update && apt-get install -y \ + libboost-filesystem1.67.0 \ + libboost-system1.67.0 \ + libhiredis-dev \ + libhiredis0.14 \ + && apt-get clean +#RUN wget -nv --content-disposition ${PC_REL_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \ +# wget -nv --content-disposition ${PC_REL_URL}/sdl-dev_${SDL_VER}-1_amd64.deb/download.deb &&\ +# dpkg -i sdl-dev_${SDL_VER}-1_amd64.deb sdl_${SDL_VER}-1_amd64.deb + +#RUN apt-get update && apt-get install -y cmake gcc make git g++ wget +#building cpprestsdk +RUN apt-get install -y libcpprest-dev + +RUN apt-get install -y g++ git libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev openssl libssl-dev ninja-build zlib1g-dev + +RUN git clone https://github.com/Microsoft/cpprestsdk.git casablanca && \ + cd casablanca && \ + mkdir build && \ + cd build && \ + cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && \ + ninja && \ + ninja install && \ + cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && \ + ninja && \ + ninja install && \ + rm -rf casablanca +RUN apt-get update && apt-get install -y cmake gcc make git g++ wget +#installing all dependicies for pistache +RUN apt-get update && apt-get install -y cmake gcc make \ +git g++ wget meson libcurl4-openssl-dev libssl-dev pkg-config ninja-build +RUN git clone https://github.com/Tencent/rapidjson && \ + cd rapidjson && \ + mkdir build && \ + cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && \ + make install && \ + cd ../../ + #rm -rf rapidjson + +#building and installing pistache +RUN git clone https://github.com/pistacheio/pistache.git +RUN cd pistache && \ + meson setup build \ + --buildtype=release \ + -DPISTACHE_USE_SSL=true \ + -DPISTACHE_BUILD_EXAMPLES=true \ + -DPISTACHE_BUILD_TESTS=true \ + -DPISTACHE_BUILD_DOCS=false \ + --prefix="/usr/local" +RUN cd pistache/build && \ + ninja && \ + ninja install +RUN cp /usr/local/lib/x86_64-linux-gnu/libpistache* /usr/local/lib/ +RUN cp /usr/local/lib/x86_64-linux-gnu/pkgconfig/libpistache.pc /usr/local/lib/pkgconfig + +#install nlohmann json +RUN git clone https://github.com/nlohmann/json.git && cd json && cmake . && make install + +#install json-schema-validator +RUN git clone https://github.com/pboettch/json-schema-validator.git && cd json-schema-validator &&mkdir build &&cd build && cmake .. && make install + +COPY e2ap/ e2ap/ +COPY e2sm_kpm/ e2sm_kpm/ +COPY e2sm_rc/ e2sm_rc/ +# "COMPILING E2AP Wrapper" +RUN cd e2ap && \ + gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ + gcc *.o -shared -o libe2apwrapper.so && \ + cp libe2apwrapper.so /usr/local/lib/ && \ + mkdir /usr/local/include/e2ap && \ + cp wrapper.h headers/*.h /usr/local/include/e2ap && \ + ldconfig +# "COMPILING E2SM-KPM Wrapper" +RUN cd e2sm_kpm && \ + gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ + gcc *.o -shared -o libe2smkpmwrapper.so&& \ + cp libe2smkpmwrapper.so /usr/local/lib/ && \ + mkdir /usr/local/include/e2sm_kpm && \ + cp wrapper.h headers/*.h /usr/local/include/e2sm_kpm && \ + ldconfig +# "COMPILING E2SM-RC Wrapper" +RUN cd e2sm_rc && \ + gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ + gcc *.o -shared -o libe2smrcwrapper.so&& \ + cp libe2smrcwrapper.so /usr/local/lib/ && \ + mkdir /usr/local/include/e2sm_rc && \ + cp wrapper.h headers/*.h /usr/local/include/e2sm_rc && \ + ldconfig +#... +#FROM ubuntu:20.04 + +#COPY --from=buildenv /usr/local/lib /usr/local/lib/ +#COPY --from=buildenv /usr/local/include /usr/local/include +#COPY --from=buildenv /usr/local/bin/rmr_probe /usr/local/bin/ +#COPY --from=buildenv /playpen/bin /usr/local/bin/ +#COPY --from=buildenv /playpen/assets /data + + +ENV PATH=/usr/local/bin:$PATH +ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib + +COPY routes.txt . +COPY bouncer.cpp . + +# if needed, set RMR vars +ENV RMR_SEED_RT=/playpen/routes.txt +#ENV RMR_RTG_SVC=rm-host:port +ENV RMR_SRC_ID=service-ricxapp-bouncer-xapp-rmr.ricxapp:4560 +# ENV RMR_VCTL_FILE=/tmp/rmr.v +# RUN echo "2" >/tmp/rmr.v +#ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y gcc g++ +#libboost-all-dev +RUN ls + +RUN g++ -std=c++17 bouncer.cpp -o bouncer-xapp -lricxfcpp -lrmr_si -lpthread -lm -lboost_system -lcrypto -lssl -lcpprest -lpistache -lnlohmann_json_schema_validator -le2apwrapper -le2smrcwrapper -le2smrcwrapper + +RUN cp bouncer-xapp /usr/local/bin/ +CMD [ "/usr/local/bin/bouncer-xapp" ] + diff --git a/Bouncer/docs/_static/logo.png b/Bouncer/docs/_static/logo.png deleted file mode 100644 index c3b6ce56468d87a3d9463ee75297b3895fc9a414..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43935 zcmdRV1y>y1vgqK!-8I48-Gh5@cL>34aCe8`1P=r!c+dd`w=lT7ySqQWbI(2RuDjOz z0k3=Y>h9{2y{mTbUD6%(MOg+Fi3kY*0HDgrN~!?>P>%11%Ln*(hyYMu_5B2EC9Wh6 z0MsTRKbyk6-&2^&swn{g-ZTI}U?>3a_znu(2LRmI0Dwc2cd85k0N*LQRaFQ8fJU~~ z&;jZwDGHc7+OwEiIGS0qc-lL?Qvd)$o&xWe_Le|X3Qv1G2Uh`4;ZOg<5O}}-2h943 z;$J90Tj5VSN?#}>99=9axLLSZ*glCMQBY6_xmbJ^P?MDYH~IUW@TYG;ppyVAtA~dN ziw7r*ql* z8~@8UN1)@ou3fCniaL-{0sVS91$cT*8dn< z1PNV=AsGM=1IS5=Yj{E(wr@+G9 z^hp-7PIS_oS-wV1l&UDjW@2DR(VS63abL7hvm-UveBfha`_O~J*>n6Ch4Zg_x~uZs zlYhn2oMFis{~c4)n9)s(U-{wP(@b@_zv0bE>x|}%JpUfk`u`XEI1RF={qTV07Ss1A zxa)R&l(L`QHN)xB(-ZtX4BD9`!IQp4Aby7NtCW%mB^?C*q7W&0AO7UpSv_lR+VL(S zV=rumFA=!@pAd3AK1|T}(x%LAmE(|T`kxYX%VoR_$B?Rj)3@^6i}b6r=Dh@94f7mvwg=$i2|8C8>s4Z+BE|#j7a|i(e8Cflj>OJJ+*TJDSI<|xy{gFKL94>cfm zP%x865OQ^itF$s9v6fP0C_o;Pm;v0NAYoaaDOi`-DHj>oM@RJC{tMrv5?lP%2UiUH z^K@YNsLHk!7Y%g|lYo5?Z`7}mzWhO~b;fh?;7FQza;P^7GK{B>&7=&C_d!j%6_fpH z>%!~?*SDoG$mrf@E|l)`11+&k>tI1j2?6d@X2A2+%xw&wX^Jn1;ob`B6atNs2eU2& zQ@Dy7$%=44Dt`DeRO0*>15D+$64mukLc!0<-a_D%MO2mSmtx+eA~OjYd^!aguVm!; zL_4>0WsBGjy5B=MuyGS@vk1b!J>Z6yP)>V{Foc57DJ9gsvjm)H{Lhk>qD>u6=XCSg zk@?OY{u(KJ!y^Ogh5qbmx=wG`Zb9i;Nn8t2Y&;O)!ZfreLk-42eal!3j0s|gmX(N+ z?sm>_p}~6mNGEMNoP>aX#DS^6!+6fqBI*4juUD!whxH*5&|YdM>5{DMswYhjZH2Iz zKmnRne}(BYyGTs@X_D@7bL(v53en9^gCp^rtNXsC{RiMQq^;6!k}JSdC;!mp1t>%Y zOpn1+k@tB7*EYFp-iYS(5R9l+t-~ zcG9a#K^_^72IzSGSz@a05=%WbYwax*%_SI~M>6TCC)X@%d~&LL*>IEZgEOZwGG^=> zRQnaQqVr!-LX#IeTv&XlXBIJN#h{D>bcm8nK0z7gI#VGw7kzqKY9jB$Cy9^47j-=+ zu#W1%r6{VpvY)*a6BTRE&4&plhm;S+w5U4i4KsEC@-H|75qvA*Rihb2|K{ngd^Ck(wn=336Zn** zlw7m1QDTQkZi#9Vc7XEA0cD^oFnkeB5H3R~5ouu?;?Cp}n^ zkLxmZ(h#JjgR*5NxL@DpviG@uMY5Vc!UM&5H?Nfdl;%GPH)L7l#Z2(LCNOEtnNsm! z%bH9%kS9nV3Sv51K6}gZbjk^T{iex^3;XJ`m>YwXMW$PSzH1I}uf{Q3hlO?`k%)1=#Oa^)S;wD{rdTha!q# zRY_J$at2x!VUsp8^+bTobF7hg^#-=ikABGlCk=o^!o6kdWF2P^Z%Rg;E~R6k_9ayoM{IqJEZ+uk z(qPKP54xn7`yFuBrV5PXP=(N%3#lod>BDC~XRn?I*WlYR_MI!{F-AWR&pAk(gC2FA zF1Z&P=xP6}Rs|A3umtT?SPpf^2%fDK+N2jhVcw={SUUm(;R7EKTJdwt;GY8wJ9!== z#4J!7A}Ef#TYyks)_@GH7>p-c4od7xctG|ewo7)p2gnsGNj8$5$6Kg|;&?{vAkum_ zN=yZ8xcmEAPz6MItfYmgqGr!+{j)4>@j4Z69)+;#R$dm44Q!tr)z<8%eiz2o?qEWF z41gX)B%tDo84G1EMIQYAA-y<#g2|t71yYUWS?}a@U7808WsC!<`$o&RM&hO?$}4(J zJda#UKPu@Bvw>MYZG?^ifBKIP-z(xIbqfvtnJT&Gtma}b@7XR0@t?L=A}u)HbkZoH z%ldBXpRjpn)DWWY^mWcd`p(X)do)ge_MppT8p*q6yJ`@ZIiFj3MX>dr(Pt6JC~hqrUitn?hPUGDb{+Zn;|{8c zyR)^WHKAv9(;z_){MV9Pz%z3gPP?Gz6)AANr4$L>t9(sPhF2^lP`qv#z1++x>i+mP zNxA!PZF#(gz%Ym552N84{>cIAR>?Fj?D%_{VYbL!j!-(o$Z{GvU9!Z=K#x)GWmPZ5 zj(fxzj_^;PI{D&jQa&H~|b zdPv2V9#~1*o@Nrer|nmLZZ}gT_gYt=RT=kh%~~%P@WzRHGiw9=FE_nxluxPmO**5l(>L`dV{`f94&LrDNg~BDvDo>f zd}*SswVJWovEsZm3YNIAX`nxuY!`w`QW@30rbi&k^3(y;5oHRT7k(g2jIQRJTl|=1 zQ=(AA#?qkz{NAM{a)MLeC@K+?(7|7K4KRmYhOa@)SELn~65&?wcemtF?G5A&!=U|& z-HUkYb?-&Ol2wRq)DgU?Y_$9KYs+YUO=4#yg0kl$s7;j-4xMH!lLga zgg$hzxk$bZjz+2QexapzVHDJbPxrt@&NxUcd{vmxU5i8OCH+359j7tDPPqVp^0&)F zguNyzmT5hlR25HytG(j6C>4^X?I8?onusY@(WC~PP>DSf6vzl`3gAIELfM?7i1l#t zB&~My<=nf^4>n?el#JBA|3cYWSN_Ns=|#pM$A&LP&PZr-7ta29FVawB!3|M;sZ(Xk z>%x%ksbXTixo!CnXNfBZdF1zz0ipq9iU}|dsgU5anHgzEaLuX?0e4$}*2Vag&rU&= zFV~LM_+SZSLt$l*WFns!v0(O7q&lFAOQepjqfcVxz(J7<$BVEH;=Nb=dKm=_OM$Iq zk4B4sEbmppFt@Xop3TNGRiiQ0o8qjz{uPy6bN@>rLj)&-&Oej{!R&Ji4QYbgLR29~ zRHg7`{5Mm-9|X$VihPq2M6A;ze~Zvz#${kqDKn7sku%FOOGN?yK8!ab{!QezDQ@{w3(@!ND*C<;;`P9=58 zQc?Iz@=V)s(XlZ-_kO~{Fuwk^^||Q^el$hSf*8(mg0LiE7`JZ}#1GCE%gsVy%L_rK zyt>D2{#BSeZr|6kY0QEfoV5$G+T-~s(AoaavSs9>J*sr(cj3#;aanOccm0CVy|8d0 z+Mqf0H`-Ky%6~tL5lNjs(Tu1aI*tRHLs}#Wlk{V}-lJl$Y}4T6-VB|m%z+Zwhb*B7 z80a^)*4@F@(9v}$nfZ)19@iOZw#TTX9~q%#THR{ANWEN)266Ck;bD0?lF*wm5TL=n z`|95$mrq%^o&#PV#RSzv9YT0vDG&npcDFKPyj)|)N3&a)9o0PVY;k=ZfG)?zD<5^Z zlznnw&Tbcd^c?n6as_Uqkte)FV0U+#`->6(1e*i`M6clhsBsr`CTTlzyZMCty-`#+ z?DzreihBv&H1Rc2(jql6ai0ed5Php(*hH|RG)JJM z7hs*}>n)VHOy~^4nKWgm^1(Hg+nQIE#UY4Hx%A1s`cSLWq(=$eur8qe zZCRntns4B2b>^>t{(

r@f1gRWk|A*%4`3la7*fhEBO++ zfvvjve+IanAb3ebpxo91qho!$LEb@?k6|ww@9ND|r^>H%YwgJ3G{&6QZiQ(mXHDRr za4yHb!baK{{OxHH8KCusjrz)sK~m1J%m6P)B3N`$$ack0DB~-kGNe}ZK1cs1(@jP* z5!0niAjjsxj0xxK4K~L#5rwN1f!1SBih)1Zz&~XF_yZ~7(@(3bEw*V%9bAUU>3(0D z-%=sal%EY%wVWwvB)umubUJhR7?KAYi9x!ayGpDKFf!{8VFZb+EDQk-4KCD`w;}Uv z*9Q~)ebqj5ryHg^kUxXaXdr!yc^jKQ9p4m5$=cxC=0$=bPBz>vX;Vs87LJn2SYL~+ z#b^_%XoM$cYM7t|ZNj;wS6eYk*D1t&$V;RHaXc}thgrNPOJYVyq)`zUdaIz>&%{#9~QC#g<7y`5DdM z3{Bi)h?As?!UONF@y=h(EIjwmR`@q-r8tr24JkN_lvP{c#^;6IwkOj!^Ij5yugnZ` zn%WM4_qBd_OYmP1(UgR^+vd@pG1AsfH3PK9OdsQ$ER;e;8-EAV2@s zfDern_9?;w4P*^7LZ-^r7*ng-jXzPx^%*B`lO~q@5i_Srt{W$+XX52Tx`9X!8pAj~ zJ=;}5eSYEL%zx-<>ZgZe=RjO{Tp!27fl#D{THL9onTVkKJy@R|NjF5T@vdlF@hfIN z7b&Kw>Od@11A}l9_obH3HMKEa`7TU;2cb`6hQo*S~LEjqyot z)rF_9DGP5>(TVIkY%5Vp!UwZ<@reb$o30sgE5curw>Z8V2h;l)ySHl(N8Vpf4wck+ zJqAKsGj%m4<08S^qS{=$SQ$X#Ikp%&gDY7f=TDCM(DX5N)Qf7S-Zs`;3|mgIq&ER5 zot0~pW+knaSozDm3aim=n%edt7|SmSV_HU1rrrn5HU(o7+j-H((a*LC|>ak*pD_qItJBChVP{t*0j z`m_vB_7r}*A3O8 z)|`n1g?!pBbcq;ArYJK_^?ipkRo&zx#1p<~7PLj94HxV<-^g0CN-qk^&$pr#QKa)n zNvy_!D3>P1R%#X{Pvhv(1J*;O*U)4XrzFMhWS}+&@M*)-a61yS&H{kj;lDfCKAo0) z{AacrG~h(;yy|D%GYFXIof#A6zc&#n$>pyHBD55{ZVcSh$)JGfi5`I4OLa5*H-l>M zB{!*PX&R>bs;Ovz1~2bCKE@0{AdDlFhA2XX1Jf~MPnp>g#x9yvXhm>cI5Li< z83l0>>5JtQxG*nb9f|oYO|w&CjgeH)+e#Ng9sUs3HT6)`mF~hAllSAP>UUe|WXmF6 zjh?u@DXr=PbmtRqy2u{x*!A0S`WQ>Q%LYkYJ7VfiYxwYGEiIuaQoWOP<}_uozIDdD zvZ&JR!g`-=^>LX;FHw>a2++P_qL|hUXt@R_Q6c77!yj+uYh4f z7m~o8v3>uOwY;(>F=oHJ$aWq0@(}MSbM?Zy^&rW2E90jK;0_2XWJrobjy(-#cOcqeUV|)$WAt zeM0Hpm?_!`^N}f{49@{SzIn`va4f$ID4> zVrNi>>kO00pJ1C$@kT??onBLYg$mc_Zk-MCFB3a^2m^O0PW2qeQpZfY(cNwnzk!N& zllqU70&I&cr`-sA^1%xKC4~Zng zJ^AE@;c2Dvz_cs+uh|n((bCUV44~cEK?)N8& zc}47oH~for!8UMHp7CG$pvhY=Qjw7*9?%V)T+UbLL=S$^7{vu+{LWFn}H2+m{y=AFsV= z_$3TgoxxMj`zKY+a|26^CjU1mEz6)EWvF|+^{o&WE9)2tUdQKC%|rFec$n{j{XI(K~$wN=wC^U$7iM+WV9_h4-n(Gle60N2x~$Hlo^W1`G8M%U#7BnYfUxD}#~ zcww;~$%~4L3H4C89QVyWRpTF+=8EefptHfUZhiq=_pK`l(Ijp9;pEu~=rWiecLzRY zAKV5Ze(S0>^8bksYs~N3()x@##_Xk|ne?2cTM}P|6Vt_q#$}`ktOFc1mdvV{^q_WZ zk3coSoc5pWt7+7OeN`&n5{U&aWmF8^^lU}?4Vm{?iUrTBwsw8b8LK;f;lKuTx+HpU z9ObF2DeT@LIt?UeyAk|M`T#|QonMp#2eaG-b!Ti(&B?DvgGV6c`Xcs|?Yh=p`?pb2 zR6m*aCfKK#IFcHT{PD1&YI^ahZO3)S2Kp{4hOIKYkHW3^xHT)ioGXYp%Pu-WC9@1G z7j|EIX~hrWDIe(7Q0sw;uaLLmHbXe_lrK_W9_(YP+vjW0^U{4%=-6LZIW|hFO51t* zESBT9nGfZGRAa7hx&zp4cn^J8%%)eSx#YNKoXHNrOnat85Z0Uk-oAHJIh04!E9BfD zo_$2f9=nWw zGX{W}7=!$aog+1%u9m2?Vdu$t%EmvClw~omo5Q}Qfwhg7FCM2<4tIka>+H}#>a)~N z`0lX=2??~mvsc#_W1>< zu12q{2)JNUPkp7+@~rA%%;q3Xa`c9#{mQL|)@_n((PhIDXMJi1HaZHSWLBZ_uR5FO zA;LPHFXy31@y!n>@XTku`j$}8&18xIk9AUR2IxC}^#}(r#?zLkc+0+LHuC-9Oi*S- zeS|r{Rujgq#0YAu+)E3O?j&0+Oorw!?eOE-+V}E)r`XjR@R2LSTT6SjppTRz4sVv4 zzqJa+Y8oC6vlZY)|&6QC@GPM1eJC%PFB8 zJgXo9=0HroRe3*`Im?iGB+K(XG%Kuf=UG|lD!5+> z0s2XjV8i(j>$?j}5PoD}HJoSUadm~kYk+;g7QaGUQ^rE7U4B;<_(kUJI+NFS>`8sc zD+WV5d#_{vI_VO@FBH){rO~Xn-J0Whax{O5vQ1=<>kkBazwt5iC;iL76RTihn`mTG z5GuTPPLs!}r6XAOiPdyq%PVpfD?8hXde)V72W_|m=r)UNR`fe#3vb;ajQNmBKIw)j zj|_D$eS6vOr|x3G5rc-6pUq0o_p_}dp|OeKv4Hh#_0#+7aKrh?@jM3;nN{1@otf(1 z+0(Jj#$2#Z{LS)Vkrn(Q;Y({somNl!Eh<068J|Zfl+xj+;Ct;*n9u^uGh`;ufuidvq0{{V`MmOt#NmK`w{cUs8a^~{EROHx7#7@@-YTE1PAyo>rU|{y zf}|Rnea1AdjtADId+ZtMk8zx{y)XLv>guOk_QPRnz@g*V02elc;o|Sy3cq2UU9MVZ ztm>UpXXRe*5FmKSn%ufMzU_YA^U`$v$2DJWz1W?;iAX4{XH+$d;%(80-5Uw6mxyEiLs6ezw+k8 zbkzvNOV@b1zq}V5c$b-F+)hPaD%zuWs;%(S(z<=T^+({0Fa&k^*+TaM6Tqti4}33` zy)ij4lwU8bXbW9|{L2@`0`G`?nfT70$oq$rct=JlomffK52Z@XTSKdP;inHSJ~X47 zcaT#$y_dQkC!lpc-y0~V`+Kk1j(JOWPFJ6GWy!Rmv6A@F20k@8O>Gt>8Vtmtf2hEH zX>GOW$BT}@4I*NtR>;^w%k8#dKv?F~`^)|WhSoFGWAX|Jw!gl5%IA4`z?nVq%C5iKZ- z7T&12Jd}F{Gid?(g=`mR!XjUuxF(G_kKOfZ`NhA-@TFW&tYRt!-`97KQAMz&Trr*V z5e@VZ%)yuD!y9;DZ@q+FH75M=3oR>QjcOAC^bCt|yq81efjgL4+W9qK4?uiv6ixZ% zb?;O=N3;pwe%xbScrUokXzStd&Y4sCnAj{0K0ch4{-vYhkKq)9X>9AL(4D)Tp9e%2 ztP9owtZe=c%Jig#cYp3|C^0bZny2k}$gFP%476>gfaN_l418Z+?!}koqP~{Z#}#8v{U+dIoL zmGYvN>V02LAZ`ePwC_nS?j^p~`oQ`??~kh=Ub-4%w9MAr9Gg1;XJfuk+^h(JZyp)G ziwo_(axECHD=_?ryFf(grJ_-tF~b7tY*#!dywa~wV^>v#L|Lv%-2P1yK4c(v!@9{k z5I5U#6mDEhaw()M^E8OW4W2g^ar96Rn=F{J=UT~by%854-XyA_IO+eAZ7#&+XtYoS->#|uq>!_I93B)L~;@~Fd;UT8odRh-) z+qqPA+=q{SDc_XmO=-32da7URfEN69Eo0JKZX88M+Pyc*c1YIjw(`x5x^fS#2DPIt z%a|7kr44TtWQ{ji0e)IB#Lv^b5Ph_sB>i+vht3B$F&7s@!r2@Bk zTQR|=&QEGUN1U9Y+=Q5CEC29)ec(gpa)1Ic=m%*8)V$#CG1&{b`KZ0~=;6{f<9bQ^ zp_n2w+AQSsZ5+bZrFOa=6?I<0XZWJBrsy$t5ew(}#$b5-Cv`vd8|RP!=Ug3_(Y0vO z?N6vc-&qT%z35Z>TsE}1AA$A^%*?y7WWrPk8#oomy>5bn8BW|;=>=zg5)G%DD99MU zDs*eX)>kGAnzA4DDQwXZU7eaCiS&RZ(Zn0?<`+z{7J42U$Vm4X&u^u_WA+9G%O80_8L>{Pz zUFobp4eLAnYw6eT9{4`3^i{|lB*t=EB5a3yOYxd-7>nLB6uX#m2Kv7FTIe3u6sItt4REiiCM)T?!OG7rrf>WIXiMQvEaVFZwZ7Igi%ES(j{YCW>1osQCT~ zX!P|(Z%zljgWZ`Mb-R~FIzWvtI)_2A8k`Mnagu4JBy{!Ev% z-|v$=(*JcM2Ns?RRBGynn)DzOYp@5SU5k^#wuOkDpt;y|-m)`qLRI>~$bM4zje?$8 zfAklD;PvU;6BTL!aa+N(m>MGq)9cJ*#B!LiJ>U%)a{n;d#!Gg1eRAr3PDXaiB0ksB zN+yB2As28s`7OTcj#yq;lc(?`u+ZTyG3@bJQ;q@FG%l5tXx*TZzbueH;7m-;OJ~$fdTWH8$oNB$^`8GCQmbfeszY_= zu#cmpT<7G$q&v4~z{P+z)9lt`JDb|5gxP(83u3XNGRZI2oqX1Pn0ckB#3raTaW50g z3EK}`pc*DJR)QFBt1l>xaQ-#4=j^y_&=hy52I}F;M#Ew3clsmHX1tY3dn7GQ`0rt3 zZ9&3TB#9!6%&`)0^jo{X&ytkY%bc8t!~Db$1CZO(2fK^dx&M^$!{3|c0S^EqIQKzk95PUWI*4wim$s$*YS-#qav6o^{%5|d}`#chOwa^c6OD7gW zc|0DDR-?Z}^()8h;MX1O?$7fAbyk>2@`RY9!J)Ibju_~pBX=XvK zE_z`AEv6Xs+w-CZT~J-y1g8U*w5@7Gf57e%WoKu#jJ0{)1N3y7EP=MDl~H9|!@KJL zQ2(6t$RqY_kvq^+W#tQx8PD1a!$!w}P7J&1=`YTlBLju;xU!MgFewqylb%{>t6{ZB zlUl}U~^lg@6F+VYDZmf}xD zm1^<(ironD#a1)cciP_%8_9LamEEh1F9}X*n z^L0g6y?CkXj$ohjqF+tFX!_-<2i|FbQ$?TLDb0WjrNf=ztSC7T5X4Jl>#__h4UeGLQ%GpckS`} zK-|WmSH)wy$rOV`rBPp+`eqM#qh>}b&8yZ*4o!p`aAQssz;d`_~gDzOh zJ*G|$f0y2uhcCi9kOVC;VIHSt&3}O-!rx7aVn6{05b2#JUeHR^FoKR)L7H|)sy8cMMcR!AQtxO_o3 z!%es9M~8_t=RJqZ{nnNT+O@0R4?w^bC5`w(IBmQLv5!r!s(QrKG+ndpvUJTV(#2KWBO%irqRVcap=mo&+v{^%5Awi9` zDq(pNV|-TD6O16l##XZ9y$z!LCT3ieNqVd$4jOuST4->s!c-+@-N$;hwgl@B=Lya~ zNy$%6}TaASr*rt(8pdxe(Y2#c(QhEVmHx?ez$}<9;NP&6$^>HHzJk6o0g2HKF^5Bn#chH zBA2(<`tW-9KRk!P;mi~SI`WRqJ+`qRM zPx?^nVdzI}+gjGqjH+k9)_{3)AL2)wbITog@3^%J!kmU%(SV54#Y8xU?M4SN{Duwm zxb;nO6=DsbwtEfJS|WY31wvjaHu6pkAUWj ze$5wHM&8x;pA#Ntz0UmipV~hxyT|mL&@->y-nU1D%b)f8zHqO<0Pv3v42a(|id$p+ zcGbKCkVf`34J{EP;+Mtuh?G@sf-}J#xShlJ$SM`bVppt1;>+?Qgd83o(0TLmxO|%- zdDZQi^#*gfs*?qE=hgakY3`CFsl%njf&ER`mzb6NEc+74vCHPiU4F3Dh8d$<)eK%> zYP&Ol5Au!mcW>ik{BOw%mUHAjV`;a}g<%E{yX{d&_3qiu@L|*E<%~ih^g=z3l9H~< zSNX!sM+$hCcKsFFi@+D4@>4ar&t7ZivCMj-BaN{Q%Sy+=RS=p{!cbKw^jYAj#|EBW zARrz;gFjn&-`rfqiiF0Yq19U$0p?Au3%p#SG-H01XB$UQH>TODTF`|kwi`E1y`+8|{mfio6(vG8A$mAU=b z#`)Lc(o^lpxVg+bp!<2&t{MVv=5PA~*xX+he~;1~>~Yno)YvU;-N7ce9F1SBMzlKY z?>)LJto$XpM+5L_6*kORyBU4IGoCCLT0&dpUGcss-Gi%^3Cql_>k1Ix@a28(@X%>n zgfafR5FIgsKr3^@ZO*$KpkD&{c#zsy$%C$fbeaCJ^9y?O>n`!I`Uk?wF z(sOZGzj`zfZ+yGoiZN5`u6R>HT=lZ`!sBdDeYI?UFaEb@C!k3hEg!+Z^)o4JSO9Y1;=nfe*| zl=|FQ`)kmjkh*B9qbH~CTsN6?yR~}{eq0k4g8)>I#nCV;dkcj;4~?cL#q;DB(1UWh zX0%K23iVym4#cn+U?yxsi*MAyWVxkv(ge@>Ye^o+0WR=v zM=7nIiLgZRezLBb^l%^n4u>%{wtx^ki7uv%}iu}^Mx z{GtrF?>QNA1G{VxoeST`;v1VZ5~u|FrJo8v9Y5&mHQTSpjUtZ842W{ZbSIcX+TPR0 z;hQOPW%h52MUJSP9SHW1_JtLAZwuW=R&S}dKzJ6Bdbnmm*8_;sTd@C?t!LmX<1Z*) zh^1*zv$pdAh4lJvVZSb2RRN5;=@@++?4Fh>uapC_=a#Vpx^0_r7*;%w=CDSAs$y2Y z_+2~a+QHFZun(4rb25XMc7o9pIKVS~c~`73XU;%oySY+xr>MKC%HNdLuASKj)f{jk(X!22whd}yz(@ay7vCn?H)PNB=gliXV~M5eH?-ym{W@d%m`Tf080KhV;NtPAw1WT9;MS4InPJ=M zx2!Aog_)Yb5(h?>mD&qD;|It70O>cVi$>n>L{i6ujZpS&4fktmXA*fmik1~5m%hs4 zDwe?^Oy>IFrMq@*it1XX*zT6opN%O3F_VzbGEhxKtV~PW#U`@>U=M;d4)>E*a&KD_ zx`v@sCChrxf%jTPOqU}7EQ${2VCx5?)i5v%yA zuN}7gfYWxDAG42rZmGp+A0ck8IUdG>)2i4YuaC=S9sr(~t&OOmyI7;E^(|(|NZHsR zv_YK9-@NCybM!@opDrrWHVB_lYx(2Gu;%#Q^tWta{GJu`e-`gR z_4PKmy&V2hC1<2_?=OJ}r zw3ENp`k}ZsI_S5%y)n8KaVc$Ha~CT`Gkbd-*!rpBwK3}>t@^WjqMA=6)O%y{`R7~66i4lBJqg*Z}Aatr~bdKIBz)e?Wj|l z?=2SEt3q8>V}(`KC^ywaEgOT)+$QiOEl<^5$U3Q5UUebI56FO9n=@?SRQphTiKQLck#_e}Nm);RF=2fv zsQOx0oziB9Nu$BRM@Vllj812S46VKl*iK zJnUEXm{L|l%KmoBjOsPQ73u$`0gPTE!Y?(18i^d@36v;9$9L4bjyR=la9R~sQLlSn zwO1QNLQ%=Qe@AwzPY;2f=V1N9hyyX(R$A{@Sn)^zdF3oQ&qe!8^$4^SiR`Jokc}V3 z>`VXF?OT?*#dIoWRsQClZJLNFx{(}wX9qYfL)q*2=_c#->PnsW^*JrDiG2J1416$( z^R1XGTQ#5li464MB;Qo<0|ooSZ2ffxfxJv&ISM5o&a=VpC)XXNyicCg4J~{h>|~DJ z8d`+=2U-icJP2}E7DaBV1leA-al3c3t{*ehSyH+n0-Vi|@10mIh<|NmKf5VjdKs-b z>jW7l`84$11&x2g4u}m{dV^(~Ntby;0>q4Ejnte_v2bk0pukJe&|L$Pm2~4fR0}xq zw~-~H1i zwVK4ndj~3j^uurrlHevltrGH1lB$PSYbbQM)P^XQ}L zMUewmiDLwHTx=^f%RzMZ6Xe?*^<_@N0V70>Ylj2jZ2A6Y(Y$Q(P(*me%(wDLt27-@ z=D5i?uL=H&PsG}`Rw_#W38W(p_MBQ!`4L&gCjfBb2e)n=X=1>lH@Uk6y!@PQ7a#fX zLD6MLj_1hDX)pF%}tr~Qw%}mADbQ^NZyQ$i=P{71Q zE)qUv@aL}pM7F#*WTAGOZ{JGG`bd9-@OH2d1;B6!$1>PwJ3o(1?wiFn#FNFVcn`nz zez`b)J81;nof{r^7Z3yTwqD@0e){5!Pft~Rf&FE@O8`{oK|lB?8w0veVj(Tzm@KCG z!?2$DXKEGEtJBk$)0+eCjQFe_fIJqG2Jxs*N`_Oxm9O{R<~IKgDKVXDp%-nsPCxx# z23d>sX9~K(y2AcuC;TTd;tNCia+Zzr2KL=vXH4kPwO9MIY>Pv8$oy|AAnod-169?g z#ko|*1^^W3OZF3CW$3-@7w^*wp$lNl--_i8}&it|H z4ZPgzqc|Xi@@5k5k?SqwsGrH>zo5>jL@+**oE+|ippW^zEat$d8fy>5>je^fU2B}G zuoFB9;=l@5wdDj>0vHu+BTkx`ZAS)e<+ErG6p5bak*WU=0G~i$zX;ruS-iOP)M?D8 zQI{!rdnLUR1!!vWz21WJSy{xC$94?~=FSpWb)07*naR0^KPw63p<0o@)sZcDhr5O5G+Ky8<@vJmFkajBtHX;(+hG%&`n%z&!q;q~3p)$6 z!vYJpZ-1(kFMbH4(r>pTzh?3fKu!C$F7oKA$=IWAku8%)pX4$@aiV7mlS&1Cve4p* zOx?a#E4_L18ph2`!5jZ#ari%*YSdL<1KvDR$F_1^DSJdHUv^u5TJ-d%@!iRun|tgL zYrA6Bu)y-ITXzMX_W_9gq=snMumxPjXTcJ<2q7woOR*E^veOCIo-z?yi7zhsVZrIj zM5MOwsUE;RTh5_LAD=_ZR%cgf3)|6tyovtPIafZg zqpQm13NvsPIBxrZvUR4b(K}6?ESF!q^+{-_k%TC+aNF77Hxh zvGSh);GY6!b-V}81gbQK@afZuAI9W20d$cmOJ^mr>2`PmyDf{enL6>zNz^jSK-%X2~#}O$#af4ME!GrR61V(jdZ7HECt^3ULDW)GVe>yg;9TJQ@PD zhJ;Ops{QymPPjL`+@+ejT67w7KabBzTeVigUf}1^EtZV-W6gTO`mT(1Sm3z5>yKzZ zw+4Xt!#cz>7h&g+OO#iO3!T30!U>b|Q8)S3+6CN24TPPGa>b<9)dZ0~9UJxlj|3=&#;xL41b#udD4EU;|*h8-J6pYxTYxrJCd zkcP(g6jOkfxk(9ZT2c!Bzn;ic3QtQH&2^iE)=#y3#xe44b_E=CE-g(g?hJTi#NY5z z7t0GmbO8Jg}WPe-4tPNoV%G35Gxu-01_i=6>)e2cBA zV-4%C-E>Kw>wN&D@4j?iDc6_va+T^Y3t+By=kTfCrm<%Oz}nYj(-6tHebLB?Otn#W z^8bRQwQmjq+;$>k`{aw5nL25HE8QGeub}~3CetQs^cr9J-cq}wtqya!U;!^J_a4cl z3au_~qx#**yHSfd`3_m21n~0Jrjciu;Jo>trOz1&cz>_5Egod?()btsI_Gi|flWLn&Bq&k;`r zvst2(VR154l|z4M=wGM|^LDD71sb#fK1|?^s7J=0uMXvwwGF`SLJG(Vpo(v=FtO!@ zPMV}Od_+t4il0_* z(9%p9_CdkOd5fE0`uODBa$92VUaL(*XuF??}@R}C}#NQ)thNn zax~Ck{F}1>C_;@}E30C(LJwA(cyn8!*y(f@$kGD7pPYe70N*`)s@gib8dw&zXQ`IMO7R^{vDa4rO|dB z;x{d)8>6QwzG~>@MNik&6~1RJfKxBIw<8{A6E4U7xoQLEzbAd-y1?4(t4K|0ZFXG3 zA}8@AXHuq*x{W-3jJ){?Qy6-br;vq4386_?;+*&9vcX237c}juUi%h#T1KFO zj$w|;Or2Qt-Vb{CoZPoMV$MCf4LY!aPcF=EjePxCv$y61%B33(ujk2Lq^JE zW4J{pNq@g%jXMrp%0MMJUjdJ%T=e`f;mI9ds z>Ke;A4U7^OpW4!z({bXW(Cl->b1IN~@#( z0=0Sc*{amw%&LH6m{$nUHqE{Zq=&pTNGB5-iHxNSP$}~UHed3TJVM=J%npZgNgncq z;FQT^gDXyeU0k)-Uhvj_GpicKEZO+1@s6kaYU*UZ3LJQ6(>k1%R#@Pct8T&PyK1jZ zCY7ua^tK+eo8|p*x(2`k+qYwlcYV78dG^Vc(ev^0 zlG{OQLz*qYuzgjsY$zXsv@ILblk`k0dtlUVxD_;R{XtM4psn)GcWYA1s+J5qV16mrZAwJaK8cN+b9wY#byewaWDsc+1p@ zIpe$TnWI*jHUqt$J~0C=PKC2TODs^zPZGQW}0#z)4CBod_QTI!A!YhxA-8phLLe(LS04SGaT`5kU(COPw zV0AhjX+TVmlx;ndMrhQV4hzlp8Kx6iz6osfrDdq0zTZqx&I@wY??ip&$V`fJOdI$5 zYO)`WiS^V@jY~K!t+z@_9 zFXxrhg%_qtKvv@PMMiv^W{2hBKpGw8?KDE;)Jd97UKTDB@a~4yCSnY}xZHi%Q@gP8 zWQK>khx5G$2xU0*K)Q zAc;%P$%8@C3#UANLKQjjMNV|5eUlPITVAw@tQmPrM3@=*nSeJA7Q_BVuZ8bb8>=mE z+vfeAdaCz7(t!Uh^CvV`dnfHI&>jomI9RsL1SRXtmVkZCUx;sBmd}0L7$<;e)2LqJ z!k7!AxScIA`6Yws28ebt5 zlhn+!^#W*4d~vzqNmNfP+4@{tk;521(0Otz6g!>H0<*Ee8pY#^^@?V7uv_jLJ`;1_ z3xR)0CuJy!h1!KCbn(d*UMMNQiN-WP9k+D|kG@Tpu8tXmB%V)iPzmpiv(Mcpv6D-@WTFxbe>H-Qv5F_p1e#oUsJ^ z5WJ=b7Bc$YGjzH!k&Rdk+gI9#!sDP{(uK5SM4ZTksf`?wF@gh0C%Wx;wJ>GNM%__j z%1asvOS}Xi!bZ!w9Lm_sNvT~s-oUaNR@jpLJ!A8FvG9s6IKt|?%>1<~FqZnBbRwCi0ebFhR zHs9t6-=;}ee6D`uymvhgXP`e_kDSP40^Xhu@HqtY(o*zxh0iZqtl#CUiK$*5ed|@~ z;NH4+v2}&fT_Fa-0>$CtGE{WwY${8b>1Cg7dV#lQV9q}yYSL}!Y8ME)Jp2|cL^=94i4V5JuEX};EeLl~OL$a^SP9LJO8@U+r& z0fD3MZ3jKIxp(Kj=i|20Do+z*sIL zKq-8qB+|nXuUs~r;Y#vpI%RB{iB}oHN20OEQ8#np87C}*l`NLA19)M1$d1mJ~vByI9<*Hv$4RATtXb zc>HlJ57C){H{o#-D^B(gojk3K0)rtaRs!MbU~kf*@5}N)Di?j}jBL7uZJ%KikBD(x z=qZI9bw{F#2UKy@NewrpiyZ)OfFq06z2J?)@#(jAo3D=YBgMVuG&;)oB;W2k=Pb~1 z3*;t-ab$z{j4TU6u-i9uDqdWU8ZaTC2;PY=Bd;VbB}n?TosJ4jJe5FXY@eDWE@9he zSoE22^iwHK!Y4Nzb#vug4Tq68_RBQjG8uU@KWvWQ-9Wx=7v=5Ufw}KrVCi7bjlQ*a z0#^F3Y`f81hRy<&ERZuVD>EKUXmupFTpi9Yx5lht=9K_4q$Lv?X&KHj)5Si+h7$hN z3Jae(NLX-#aiLB3DW5z{m|K8CaI;PgH(AUV57v+=V`m25Sn=~DG}nH2<*v! zU+&wMQwNVBQf}Wi7Nn`H7GQs^oA++YbS_cW761;N1Dy>W1zW2O?2deK`4rZC%ajA* z&W1cYoajrYC+d+G8QT|KqCf4EZ{&p$C9tD*IFwI7pHn6^r%f>5UD6}%Uv0v|2FlwD zMC9p$UF+~dKkM349-Z1T+Bl}9j1tg+Po-f%#*k+Z_^}fLB1hTXU&m! zp!XM#n|)O%@}ISyai^=fhnqgdt!HZK3fk2c zI5If_Wc4y!X_8czy|JW*uwmz90HzI1<)dzX27QNs&9?8jS@V-ukxPs}^2e7&=Yq#a2zg#&EweB4)0_sYvl z4_lG7dR|A2TfC@C`-J2Pf00>v5<+G8-?0se>97IFlpm4PALcRTBC02sJYt23$|0P5tkWwUw!p0*vIHS(MaZmXmP$;ZSK+S|Upw5(_ojF++(6H8$xS!Bh`c>ow*w1@FKQ zHY5A4UM^^xhyRcr#YyBp*_cyD_{E*@KQvpUJHpZ;v^ohV3}VjFIcI_PTOhAXXCv2> z+L7}_ZZW1$79y*#@$;8JnREr=gubDp|H^!KD4(veavEWDT>1?UMa?T2Z~fy0&; zoiqJ&k1`+32f00zZNy~?-d-@oq5o5j6rj_xT>HHRCBA!eFHE1Px!B73OP#iv%YQH} zfN%2goy)w|*B&SFVVnHX{Bbd8CV5sLb=y-WA}>H{`{YU74wEL%=#og}r_cR4L~&-$Gw?2Q zhg8jMBFD|%0ynQ-GmLrNi?Y{TStFMU9>J;;`XOl67yosIPx*4du;r5y)Cg&{E%5z@Ht0}err^C}YWER5Z8p{@YS*!8eomj} z!SNHj&WNr+eQkmLLkm~nBtfn;X_M19B6gV>fhUlgjJjC}0Z|h!$52y70aB3@e_GnK zE(mheY&$z@hbdEg)Xfy>RF-y6ZE19kH&bT{-tW5bK7J_q5vy1|6Xd<$hGS!Yv>~U8 zr3x*fD{5jIz)Gckw^hC??#JL1A{PYb1JK$s-yK?2W1IYZHJJ!|9VJ zo`Pwr+S^Xi>TuKq%36Z=BEA2z1+C86>30^O1#WuIXBPp9Uea!BaK3vSN5t|Y#p2iv z%DO_ts6-bznb4jNWy{OrNK$o^jyb(XKN+YRekj?86 z7UYQ;M7o;A5%^O$nDP4$=hUH2@4if0SGmnJ*4hRWXOZ;hvd%)z_3HIGjosE6ay^KnCQE=m^?pSej`^qLZYNV@P0Es7`fa&CDn zOd&MtmT;~L(&7QNY4_Z@4ShjJ%2h?Bup9TeOa-X}cuGn_ssH=yGs zj0f&cQJ+o`f@l~dep8BSAJKpf$x zfUJ}+1XlssL|*8WlQiNR8X}cO@FGJ$d3=On;W0g3{6Jy2Od3-h<#=!8LE`GXUzkV} zKP>_8yb2z}4R83Ml_tvH(j=TdIf4^*zxR-@c69s&X1b}Um6-H;VM`6*lsgM3{ZbgA zWBUpS+LIA@^Jat~8r~L}>rVF!J6ayWD(i!Cu@)KGZV*ceQY?nu5Y+v%vl_xVI z;2i?uH@&pFCE#6}KM!BkQS0qW^lF#@zUQ!~zWrcM9XNtWg`3c!y5SkAUa9rP`3~jp zvh8yV+;qyCQMCU{QO%CF`YBAC@T5TjLIzAYCM2Lvl6}c7647cr;iu&ppU$fQ`VdNV zm#1K?5_p5WEthY8klPaQzIyd7Q+Pt%$%^-bW6RxyGrzw3P);4gS9sdel*{jbWixu} z#cEH`#*Gt|i{YsKX@SDrh38-@;Q5`b9ao$b{J8*cE-_C))1IQR%U7w}kT#v3=#uod zjHD47r7MlPC2iW5^g^!$-awMaj$d+8!)Ka^&X#~Tm3u0<2VPTeQKfL* zbA3*6EqHre)O4f;Nv27B6{ZB;suQt`^E0(T$uC`kj@+>+6RAuIhg22KM~Op zfKq(Y)8R_8M$Q&YrIR$aAA)#7G0FJ@7pjUPA<58)9X@}iyS3hJw>6C>Ed%d-p~Q*! z&C|=te0LfsMOx_e z?J)U5Gjw65=@hhFtx>lnYJz2XfD(?p%cbyPi+fkxw{uos9cw9gk53%kjQ=)%US90} zh;amd7{{mo+x@72_1MpoSl~LP0c4N0sNZ)@bx=jN)E|8<4(jI)K_;VYnN+3S-@ zS-F;iH%nIXgWK`6Z0gjkS=FpfiFs2Fj4O4^ec=dPZrZG}H%c1OWMr?#O^=w0I6& zT0pw>DfL`6lz%~gS=QC2ofZHHd4A6ORg4oma)RJYbtQ0XZ~A6p=?+X=EgbUF5F5%% z8v1f2^5w&2n@<_r**u2ngf@(S(e079=XrOYx@8OgXP=#GIe1@r;kS-y-}`=4m)VuJ zi&OLF9K!AR#?O6q&*T2=ml4XH7oT;vTgCJ^zUp226|Jwzb+MUT(Yn|IH$LZ6X8_`^ z?7kxMv4YbeqAl{$CDOi>+wLYJljcdBzR24&2~UT7$RmO1P4m;b2>-+OB5#e2i-EpF z^v}j`Ie4>hn6AGS-p<(+v=`FK9QfA&;6Ht=jT?Dl<9L^vW|B^?bKk51U zHo!x*WaUa~#M%PhEW^=5bAD8q%x|etp1xso_)@^A`-hLC!zy;`HsX$i{T5{|QaxDJ!np zrksQ?q0mq3GCCv09CceG?=ASk%f02Pn~${(yl;5*Z*AMUVfmdwscl&{Z&u}|3-Zye*|BwRKw z22rLwM2>zU%do^k3C3)Syr>M*rKQW$NZL`ntmM0}$lZD3xsT6!iJ&NJBa&WH{Kfst z{{88v#)<^BL30n{b?ujbl2ecFgvo2x-)=IsEEUPxNj&v3K4dfhGzKU>iq8DgsV+L@RqJ1&0gXxsZFy> zE_9()N|W%WkE*51h3U$*mB+#|kjCykmMjz8>}x;MMH_7e@1OsC$<_@IEdA-z`^L%^ zt&7q6-6w$W$7Y^?`k8NDWLEtukF*ByXEKZ}!*CM6LTxWSZ>FS?anP1*9HhUC}gB|4CA6rncu_c{4k=WQq4 z|Hu=GhS`VO3f@Y+tFV3JobPUWXlYZQx}SY@JFkH^bON>iE>0x;2aLj>d>VxK{#GcT zv`E@j=Hs9m&LbzD>T0jpEy#b}`x~=fFEXFQicLNCvUEtNPhyrT+Rh9BQ?#Ra@%yo79e%JgeJn;mX&33;gACKd}Ovw%>`IyLN?% zZ54hBA^Nk)22{%kCQ^IUP2>^unJ%4x^>p1yI`R@7b~x0?mz4x?$UK}cOx;~c*KBBQ z2k&2OKC*4smN~a>xSvarXBu+Ordqv`mM?BMW4Zp{{@7FB$H$E)3LrFX5@|+dbw3F! z>#udA?=qXX2rW>|y%jCy!rn0k{)N=o{RYRDF0Ea{Xa^BL8w1T z9mdPGaFlP-MC36{nE<=tyzd?V(B?f6IWw>A;H}h}pfH*H_Al;Pe(dnU(SaU)^Dc54 z_mPhX`ryU}-J_UmuyFP!(;XJU}Rx$X}1|7LB= zHeEjJV6}2fX*rd#a!LaJA+MZUO;tCwbu*G21QYknctC{H#8Ld zZ11+Q^&8e6hli4>U}hESMMWHe^V^trY*Om;KlIhlH)Ayl+bQT7xRWqsx!$cj$-t6* zpkmF%Yx3F;-i@l9*?ZLqry~R))1WDF<4Yu}q(tebU8PZXtOLU7G!=D4LNW!z5%*kx zHy)2ao>)A!E}dr<@s5D^+O;3qTPphBS%24Zb!b2Kk__9Ou~dweQxaOpE9X{|4|NGFGgj^-ooJ(vxo$m%qm4YRzkcd%vp@c|JjXEB5%6Z# zzOTN!f7jTPzqscFSd`G^94)|Ul%qHa<~t86^@ZDV>Y?p8P0b#Ko7d--t)#_Rq&O(8 zN+}pw{Wrb&;x6Ba5trNrT3`Wg$O(M)eyHxc^SWzR7wsNjvV>TI71H!=U&5AH4B|1* z$}AjpTLc7cIXg@##^sW@BoKHfA4>$ik(~FSmoNT+a;s#r1k5SS9p1t(ESdg z1q%MqTT$;<_GaA!9GE#31E)0a#Fr47K7#V{(5|aU&=;T$`Q@m`GZkWo*Q8u~~ zs#5cYyi(5hZa)6*>|az$J{<$^+iqJkfoX!TJ-u&a>cKlsRD*Qpi5S0@&rvu(@bIte zJoUNT^6Eh>DJ=27lr)IfQWWwR;>5xCxlg6lXRLmc`t$QXbv~NSdr_~RSQ?nNKhG3Y z(P|U&Y#^4n&?K!5s=^aLOjF*GY;W8lro zcwYWCyg^>S;l8D6*XBiT^j+Z&a~_;-{cfc`_oJNpm;3T+-(e8T+g&I$?Kf^&!ns%# z^{+|9`GaABFRcE;JkR$(gwf;~y;)-{YQTKAkBd%Pb=nu6(2Z~;FEsHJ-t=*`jJheC z=1xx^mdB>^2-xAA|Mg{eKk}I5(+a<%;JtS3hj!w&eDm0$yjuIC6>4f?$h@>`MMZmE zC!gkrF&F-S*ZbykkghdJ-=* z*%0HlSj&Fixk~4MTi<&@PyYMdG2{1W#-CgL>1Si6?e|dpo_<;Famqv!yyJ#$kkM}K zX2fg}7__3(?qEgGM}lhU(z+xrzGP4+dEZ@q?z10~c&q%5gZF|3g@}~V)+-Q!%C-I?&A3g4=Pu@19Zdr?|lq0y6NxQD0M!!`p7{(dS&h@he{_KK3 z`+x0y37B0+b!OeS^uD*Y)^5DW@~XwQaKN^_0CoZdf58MoNJ0pP0D%dUjl}szGcl_} zhLB~*%n-hOBxDA%kBNyl4A>akl5N?RE!o<)?p90P>b>83=l`qjxwr0nuUp-+TD?_C z_g2+8r%u)VtL}NH>(;H?>?i$uaE)_tO}E`M*c00y(^DrxjSOa#D(6Lpm{R7LSYC86 zE;a5_Qgn%oiFwv_WU_@KwtoE%?$GHCGj6=`;1cV9ihmF9yZ^-DTJ_SC%ds?W#+x<0 zsGkGvw9_==C$UT6w_i-EFJda?(brOHI18c}aT#r~`ZTc>GN18xziD}lNTV6dX*@A%1xh466iT5)_i6CEtqos&uBKDbIkpagz=VvD+aT4rdx)& zeYKR04k>9QgkCDoe5uzhGIkl!X2>}ugX z`VqCmEQ_%#o`&?SFy6ebd?x=8qNn(>&XL{CYWMbeGVZ3K)5cTD*%D5r3}fg#iv3YO z_k$|+KcB8v2Tmoi#2ZWs#6v4S%Jg6SUDwaiC1ml7aXBm}-SX8Yd}nYQu()o%;K5~r zNf>Vq;lN0SvA#wSZJu1W&`iv86yiBU7utAUx0E*eBo~X1drANC7-bqWv&MMu+O@40 zugU){t~Fo4RR0S<>QFsLo7~#(v*>&=;-~R~&;73^)V9Z})Yo@ZsRO-SnSx*&aZhbh zDgPdS*Vcx!sLBz1DpTL$ST>s#yhm)AT!lv!iEd3pJ~|8D?bJEs5!PGau%kyR=?>ehar zZPyb={ZMlRZ)xsMs{is>HH>(*f1o#soe7{-20gwuuM(pl#lW0ZzlaP0;f+7zTBc-d8T8!u6@DirH!T`?|~8j z$K6Tq4K}HeygzuXM*aCS)&9#TQiWVGu^8+x_R@FQbVWHYWqX0)yN=T5OW6noQ#Ta zI%QOO|8H+9@rOUGN!<67>cTU}lIw=Xy!-suHeYy7DsoDu9fA9G)hiCElw0GH4e2 zlzE0qvCxDc&qrUjBAvQK&W#A}E(OD~)$|_hZ9L zJ8tFXr(A=aB<{Ukb*gz$R<$j|lA++^4FV`HCIT|JG)<7q_UcQ+Q=fA7Y@OF!O`X}Jn*(l%B`#{4nfo=O!5 zR9yyNCb71Il|JA&E*;B4GqG@k`)(Y0>N6fXQ}H1BNR=M|(Hg{A+|Qr=aM#gi<0Yp* zmzw@6&aQ@hHuo>7s`M`a_FMTgogGc89S^Ni&5K81zz39Hl%aZd`dz6C2mn&fqruho zaID1A%@5({m3?LV3aYhQcd&mO@3hAvDi0^86PPhQ`msxp_rG;dL3 z{!hV;*#ysJRh?f`eMkQWb;Z!iX>G#HE2r^3joDKA4aR#8jVW*czP`3FiRCxn1Q_)MgdX>r%TB8se(qIO zU6(PR2h(&IoB&P6^lZ5nPIsJkbFq~>`8W(8yg<(A)hw+~iv_Zh*0Mo8LNnzeJzBpd z!@7)YAOl`8_=`b*)(l)}gXq*v)pAA=+g}WbQ5!HAEt@eBG! z7%Vgk?Gw8E(;(1dKbp|yAQB)y$feeyHHi&f| zJPCGLorY4~_~3rf@;HfHl=oD_=rgK*^eJ3wa6d6dM)H)EH0Spu&CzUl#&`?e(Be8M zYozV+y10HXBC1bxhH~_C{?iA$5B!;tKELN#>v?OC^VJV}$?OA2zngikI5~{BFJJiK zDz*77`!WBGjcNpS3b-(x2+%3#Mpo|u=69-m^3dTooO=Aa-@W;vyyriisabq@*S7DR zw>7TQd7`*)`cJ*d?<7PbMFrUijUx7CnHe+~VzS`%?o_2t194UgUk&Ytf>2d!I3^zS)S#)LJyiDsn%Fhqa z+st>j4*nbVPdjbKUI2+0UqU4Zy>14HdH3u4U&n?gvf;P~nNkcPFGveb+Y?PIlPlt$ z`JE4)IP_)8&P15io;Lw$Zq7b&dLaERp!+Ee5JqS&dt_~mQHjP@kG=eXexY>hG0^BYCL)fa39YmBRX zxngWdGiKF}jo}_o-lj`=(P!(D9|_TH%h2mir;>CkXDrMKtG8*>AFVH{#6P2#)(KKH z*zLow^d^qxR+ zAFA64{&RVJvowjl#}X~Qr*>`I#idn2DYj^i1wK^VvAIUoC)%-nV+ZE(=tZx?6v(AO z^kQ7uavbfTnb*~&Q{;+u9Aqled{yt)sh{rO=x;9ZxJz$b<~0p^=8NauIQq1z!$D~D zffHkfkY=T)!|P^UvWvJ?Ctgfezx}J-2md?yGZjk5z)ZE{jP-8Zc<(3iXAu8H3IAH4 z0bhA(zk1WV_NbZ$?0tZ|Gv4Kfno~!5;PHeIGqT9jrc9IZ)_Ucp!h>3DnW+X*-!W8q z0O?ooK>Ag`SlsU?)RD1tqOUGnJGggtt!DAm-J5IGXmx|i=37+KUj{FFH9%Vp=q?1X z_^U%d3s{DHJHPAZd2|@Qq&?!L_(R|fVtXJ>oyT-qIXeFPzh2C~(sErnV z4r!D_MsDm%vCvqM>3BX^=N;5XT?`^4v8GjMlkjC~r?jl*Ln$u^eNVOyOhq~T&4xEB zTZbM{>D(b0Ps1Uk_#YlD$gyS9IMO*?!eG)7U(;ebg8M>C8(pScP)5sElzFCDD7@=K zCyyKtiq1$B8p0W=eF~MP(}};!V(l?ty-kX7^6%K5CiU#Y7pQA)->1^m=XH&|G{eP{ zM}Y4Yw4e`hsLOG?z8$v)Kb$mz8*?C?Eq0Ch!<{QXapN)Mj}(0WDDJ?XqUZIYU|%j# z=+F4M48G2tt4k$vM~Aa{wR}fGZJWY$%(ks5b$pO_cUldnQZUA8l}cA*>x@SHjgAM1 zsuf2Yj-_ZPH`ZCMhLH9POR%@V5_r`O;MJn-c%VqLF&zO7C^o5|>D%mIKD6AnY12{J zEYxY{yORY>i3Y8c*luhkn(&Rum7IyCyI8K2U#iQN6)k}bmdW~Gn`y(%HqEJlv1!xi zZ!h}AzeBs*1W*FjTMwv2s%Vz{!M)TEEOalp2bOxk2BU8VJ#XVFp-^i2%UAP6m!%1s6``ckcVN$$9g08jj9lW1_nt(3K|1-*@SIY{m>g|1-)rG@Lpo|T{Z3;2DSs6<@s7>cJjdDl`zfvqTmSsAg zpADY3r|L5=tH$B)vfB~l-Iffy&*5qX?RgxQa|NbAHsuG)y4O| z|M1~HlbyNqobkK~k>|BN;`^um7JqVm(uT~({@=TwT&8O3bL!G9M=%&ohubnPJ!cW9 zM$387Ti1q(=BD&UBv1cX!xHfZ~^d>SilTeTpC5$v>~%)r@KtMZH0 zJ9{^)m7{e2$e{3OMjwx1?{FEg{8PTYC3v`Jg~)In684C-vES zf^w(v^Z%9EV7Pg~vuTtL zs=DSpR-l;ACYg()FK&XwK{gi2FK&!D$;?E0MTPiLXR0UC6}4M**aMohNH&tNQ}&{g%JUY$>Z)u15r0d4Tk;Zfpp6dU1I7=oQAb}}jDctMx(K=0AuwwYz+Tn( zw`F*pdPmP@)tal*^Z&D^dFQzy##|OuRqilq#%BHuAXajAjI1%dl?=AIc${0&3 zAXpJO_7SoCJRFTb|F!OYFGaMOPt8f={p6FM9!(|_U&8P8u2KlO0%fGXN^Sq{h3c3# z;H45S?+};`2>5s^TBWx3U#Z@D@+wuAua*a5v!QV_)CR0FDGXq~`#6kf-0>2l%7%&g zmDteY^0pk)b`V_>lc#ls3Qa=zXv>3zbpD&Rj@gi&bJHdQ8m3Q9c68h_ggmED%u5gf zlMZ)wETv8!X;KaC8P(W668?IJ{UeI3xY94Y#hx%ZkzOe%1M*DuM7rFx39%DAB(`a# zX**v@-lkD@W`eJpu!j5gzK!a-(-&grJluwX?O|k_A(J;0p&MGfpI@-ZujQ6)(XYZTL9 z#{snEEj2o6^CBJ4E195%Kn^dJd4F-J^S~3OdS*j@P8)AdpCr7*7qRa5xk_M02K)`` z_+GQGRlJ)km2xzP!1N%%XD}C!tx)ei@kVvg5Z?OHbif``O5tu$@t zE6Lk5%ATLVH-u8^x}l5J+j=&rHmoR-tD-YuKUmj!t5GJ;bL60x$_UR$QD0nE_!5g; z<^0S|o781q!b%f9tc+U7{*peEbd;A=T%OleDTp+Al4cyGO-i5fb}wGa`NXewADDI1 zC30d=c=2X5`D5SMg0hrl^T0MmC3 zeyzH#_iFW)6IZE*JYU`vb8(LAnzQOWy?bDF_Mk?l5;~P=yj(g&rFc?S93-8#@HY84 zP_}Hq$>JCAk3V?g(35e=*_E5~o;TqGD< zv_+niz@4K1#j|U!x7lvv-*Tq5n;H>2^^8OlvVV19b}!Lr`Zxj-7(smJMwQ%!ugHBX zu27O>$+5vGLiRz##Twc#lCUoD+ho|J=>R?%sNzjG`t52SeD&K=wSw|%#oAh(LIr6U zmfZ6F;WZ-vnz!1}iE(^?N9`+HsnK@zKw4xrx995X&82y?1W8OTg*Vg3*lV!|=2b82 z?*pIPR^h+*AQ!uD-95yXS{xQx+wbE;gt4@BT5Z-Ce7iN;2S~N7>SY_;&`UJ6i~zXS z(9DZU9;-s>fIBt)a&7)=<3h*N7D?Wn>h(kl!&pLV=*e&YtkN+`tsC=kq>q1oT)s#% zS(yYtC#0mx{;@G8(@m*o)yC1UV#apFEWy2AihNtHHp;WuV&}$6ASDHpc>OH~FTy3I zGX%sGofs{{;woexi5Wt&jLTu?vb#I_cjlr3$&qp}`#d4CaVj+u1m$>(<(WARo#Kdh z$);(6yYep`#Rg`%8V{MnOMfUtYKN1k=wx-w0L*!I)2WSDjV#kWL?q-&u!KKbSm*5X zZsdsP@|Hw<3Hmoyc29t0dnOXB9OA5 zJy`|Z@F)Zp{Lz=&k7e-AG|HK#Um>bORYC&DHX-3W-Jl&Yn#)X>8QIXY3R3HwYK;&_ zjD$CW9V{Y!zi+PZqR#$1L82*wZK>Ds^PffX=Zd)>$4>5yIQinhE`fuWXbf9t2G;4!3eFn#Y&tD%%U&zBC3~k%T$6!MbVJP4lHB2_7%hvVaJ>#{L0*F zvfDh}LW?4?lRQIe=~cd=o~NqMmtpM;<#}~tg6t6fFK5S3Vn*4Wo|Gv46@z@h89bhi zmKs{4A}1KqXuX{QS7dZqisyOQ@FLWiWuY&w9$je96JR1K!jge3hnEfzQi-qqLbZt| zbBPY$!{?O~GER}LlMwit-B@=;bYDk3V_gS4FXd=M%2 zM#+rN|A6sV{?xhm}?PVKD+eLJOY=*!J0Qh~9Ngu+QYRZvYU(~bg-z|A#3a^z?dX@9_A zM|4V3Kr=}Ih=ycO1BQ7~8=P+|LbVaU$l$|%k={Aub1os3s=w!X5jS=pkA|H-x>EY= z;7xb9xm|v5uciV&U(V9_GVre)pMM&kU(c&Y_$>ok-G2LkqrB$b*m%?>o;*CB_yoO$ zE`IR-)neAKpWWYtmfYLE_D21ws7+FJ5^X%HV0K7~l_|NRN8~>AtIDTStst)7NCp1y zQ6MEto@*$XuTGWa)u|#FAsB=IL?t(RCR#Y?<+#V;>^5FO4o8dT$^fnG8X)ugYfFwe zfB7R*y-Rl%Thzp17M}6+Y(e{;*3(k&A_kd6wSf)TU;` zVdZ}m!lgq)upPbvxlcZf=)}+{-1j6w`x+yGcn=@U!LzpFzu5qK6^=(sIc%rKVqvTX z5Lt=%nu4L4E1~wBT`1nY{m%PB<>sD1G)B1JgL<00GjxJuSz_c}fdB*73#TV&vE6C6 zw%o+w16iRcg*> zHS6+PKGb;TOF%7`u{Dx2lX1+ZnTA3u)r}JP(_qs?L!3c;pC^)Lc}ByURQIXvFRke0 z2hmcfXqpCI&8I)<6YA2T$ZK>M8P0oz zwU!*AHkcI~o+Uuq=O2VVKc?`05?Po<#+XL(KuIJ7rFD)s?YOli1tUe5KdUt`@9n%0Ypw#b0 zZ#}m54@ggf_PDi5E8WoTdj&0n{RjYbi4DQ9L-bmlWzRKf_4Am8!oeb~Zq@_%1YT|T_QaC~iAu~q#Y5m0Km{ox54 z)8DZer&dBjx8O4Kkv8ExK;-)?<`Q8+u1(fU7#C5K$*JU}~$bM_Q6J$_UBXd$cWi@9h{7a}=oo zWA25{0{S-oV~<`4I`38DqZ~|u&NFwB(``^fXo@|rQ|$7k@_FU6x2(o(Syq@$kA_S8*1BLkGpROoj*j&9Gj zK8gQhNLa_#R3|~oyf5CIz43gz3M;82;#+cu7mZ9ziR2KJVG<|KVH~l(LD-P9{MC6( ztwuxS3v!HgL&6DX1leENM>(@zZVh@DQVWTXqh!BV)Q&36s2?WpJWhWqe!8N|@&IT6 zJIqBoTRfMW9#Kl|YA~O!KFtd~)XK(DdVbpK&%&!}ESnxkn~8H1wOf3I-K zq3@K~xnE9)z4-@)-Tt#X&@F4tbE;@<_Gl>`xgckAo^Yz1AESHxyhPb6HN1EIj_4dX znDULYgEssDVm7Vejnf-f>bc5J8aBe$fP8`C2-iar-?E|y`=OYCAsn6U@K#=NM0lbk-?w<{Yx zUErW8e=ive?JM9O4YIv1P42ca_WG9D+Hu9z@Xe$~ktlEZ7jL*{Y|0KDtM_Z9RUUSx z(tR&!-O6}XYuCjvRv=DGuj&u1o1W1WN(R128#OVWovHV4ub!PO-IZ zjpq90FJ!#ymo=xs*xE0tx35&cRYR?p!n8=cL!=>)wI zv%7dlGrXC}r36S3^+l|$x&dS?`f2o#?t0oS;c?*}$@7{TI3y;p+mX^ovJ;g(xb3=1 zWmT1QQ;`AgwoJxK`915}G~?{7XAfJPD_hjD#mE|pL~GLp0IW5%m(mBgDX#$}Dsf`Q z=m}}ENJ@iooV1Vz^t3312@CCQ`&^d>lQAty7)TSwz<7AwQfBGeX}dG;cMef`?M}MB zHIShEJ*5r}O~^o#f2OLpjrcU0y@#v#k_yS1?+WUXVD|z=jBi3aHo~{Sk{|^3Voi)lFz#;Qc6TAVa@6%Fa=V1UsF4Rw z_n^xieoQ4|(Os*sOBX};O7-^t66MUSrYzF#q;gQIRYRo*WXap1UC+Y|Vn^;c!>nk- z19qDvNGroho1jyzoH(vO&)g#);O>*@JuDG|zS4)8X(w0z+nG4tpyeT~ zt?DQ2{vW<9ei$bb-gKLS5WmK zKqyxoJjoEt)}`xAyo|D}62Y`w5IRX<``)*KPJfY36VZ(;Ke_Mr>>_1rAP{$Kx0JVg!yPK~7a$^IW5H_mA#=FN{L? zu6p}Y4*Zsa5`S+0ErUf$^rSy@Vssstz`qoz5{}GB310p4(xxNtecUekH(-1`V*BaU z{FM`(JR63F{Kv=p@)QW^t{Zs1e{%i9FBFL5p=S?y<2Fw1hvF-hD8kE{j`gI*wd{wU zF6`a&r@$CLCQp)?IQBg>Yv`->vFIQauD#Np`T0{V|7(3;w#X*F1sf|;C$Yxp`jQBh zN-dop6XU6N?FOtZdwJah^FwZHqgd{>$>K?{F1cRTPam&z+9#369R}SWo-u}P0iSl!M@|e$|s9^}^;w2i@XossQA~K)D{qeX7y6;@T)$0k@ah)AY;~T_EbD>B0m`vi$_9}S2RNb|^5*MtRPm9yW?$|@aDk`0(G``h zVm@LL(T^`9CIZN{EOLdL?{+Gsu1T9jmi}BHb_ZQwK(11t( z5tixv5p5fdqXm^&RQM>ncL0P&%w2bE0!S8x!G#?uGSJFsZ6iT~A36N(A^eV4Jo7pK zj!bl^42``ye$@%>c#7d?iw@{<1>?i|KPE+I@pD%SaNB-V*Wiq;w-mQl2&)YdR%vUL zkyhP)z2a;%6MK-(x!|t~DS&nTr)sUxfb^hzGKnkZiNWa~{<@KLVJxKlV}2@S${FKU znZoc2w*$1DcXrcDCQTUiWw$TxvyuEC%W7@gzu;FiqMP8o6UfUP10x}CndIrR@N5oT z-RereQe1Q49@P?minA^WK1OJ;xc>_#38B2)C1M(F&Se?U6j+o0oU=K1%~1%Q984I^ zhiY|D!q3pm?e52YOWFWVeXM^zF0lV8%kI%~TDo2=<5=kM$8o#D4+ko00**h&k>?4^ ztP^ic#LQc1X&qIUex0f+CAulogmVi;{KI zxzH=*A>H5Kho6T0YrRVko9L`+g-|=zAe!+=x36`YlQOY5snymx^11 z_YsZVJC7j!>TZf`G{V3kqx)ctY~u)>t+q>J7imfn@MZi`o^zfqejrv*CwR2q%$VUZw6 z5n%eqS1zS|{*{A*815ujK^(A`W0z*QESOVuvuq_-qG(c@ zii~TXY)!3zD*vCwYz^mQ!mJEpngU>{Z<>Biq-noDLlnaeQMQFt_*N@=rbGxl@78-$ zYE_SkBEmJd!W~TXDL})RIc-c$vF>U+*mH*Ya_ow202qL`!I(k1wS6MAbCI)_pwY*97kpJ+_3%yHA@ACdAp@ zjD9|6&qP_silYLq{x)~XRNYY**+Ca=-3L6){wSz+=M-HI_i8HDV(QP%UH#&$>hD!8 zXV%do*qINAsEwC0$-Fm=KKI z#VuTk@M>2~am;D;HWZU`UMh%KD63;y;+B*5+g8!-AJMRW+=nJwsoON7mzb`RI6-tn zLxQp=9LSIwW!0`GDI*!uu2cxo>^M7Q7P(sS;$X+MfEzF>ek}lf6gwpf9eOTrDU`;= zi9br&UB6*m6yERk^R~~=k#%2%6rqihoL1xWMrB(^rnlRA*;ydMBXv0Nuq_2%@^cji z2)}_8n%hi!L~vTP21w*2pSrLL-jNT?MCd?tZl=KspMqLkw|&mN#jt_r8>mD{eV~-U zyC~s_X-c}T(YLEcINY)eO?0uUOzaT?>5`n_vGZ~ba7xOIC$aOOjXA|r^Z8?gPQ@}K z$jUr`Pveb*F`7#2N!)zKw=~xLo6rpIHPSEvF@#10*~md6l6Zc2Frm&BV&PyQr*=FG zsSia}CtN>442CXgk$@yMRw-k`b0Ohr-fVuEbr|U6;>4HujG~>;_1C#u_VZ&;Vaqi> z_CoW;n!Wegf0B|X#krMdukxSuRv=vw?`JoFFxd@it_*Swv8v+y5iuiyK|smJR{6pU-Ap}m3n z`t&G>X!bpw+iMmV8rVyYG=kA2ziAeO{&F8?m@3afSf!8r8Qy+H!k+wipUH50iq{&! zOtT?!Hr%Y7y0rSNR#|ogvldFC^XMUI!ADJkV~1Eu`oQXVsaZY-4NrZ1546x7E(Gck zjR1?Q`jF}lO*7Hm+v8p}k}a(*XYH*=1`a6L2vKq<*}7-ZZ9U|yb@|la^c_mV*sO~{ zf`u{zU}oJw_FCMCu_^$s3FQOW2%II$j3qaxME zZt)y%A=5<~;P~GS3Fn})Om|`8um;opEAR0z9{AgH*k0@HzxC*-jA3a~13MAqV_$$O zY_ce{D{6O|>|VJ=xSepD%*KRzJlWF&7F2HlatSU$ONno#UZ1?;)WFaGFLo zMX!M^U2Sn^FB-FG|3e|{^&yqPQmtvm^LYP<8u{M&lAysml!AX8$rM52eZaP!*ZFMr2-vC7XDK>9w$&um4$K^FF9g39J6G8JHKw?tI?EI zrsT|S%sT`Pt~i3MzC5YR1oRPs@$_nG@V)_=(k7Y}J*7$U{07lXTn*9eRP4#)W`Vbe zK!=_*)QQx*zy&opdnjJpH`2so(8=88kjVG;9-(6u-t+b2>k+Ga1GcoHEy7e0xMlA*Aci$1czP!0dj0@uo6M8dV(wEnKJ66nnJ*W5ft`JE*ar>%~zA z>ECAV6&L)Xw7Q?)i}dD(R1pw5X0Dd(t5y-6?yxwk9}=_9L*hH4z9YlKZShe>EtP_S zF=BN%w$qI z&+U5zo!%i=jTk9aR}OdZBh8&~RTMw_s^_U%1Gc*lDbHt9UOt9iz=A+3^~dZJGSc0IS11nACh^*9U>Enm6VzM)Ha zLL*AtP4es6=jOK0Iv+N=IeXpq<|BTsMpx-1Gm9%AH#)8+9UdvI|041d3!v6F{Wdj) z^BaY+0Iq@^U^P;$IFv5H6)4$cdHlUNx^?KiWHCch^kLYDjHOJ-jQ!>0*L@at+dWUD zh_73o{5wJoo0a1py=8o&Qb;0M^P|2z!f;|Kpgqv@XkYg6s2N(-esbSIli;zrLS=GV z?pic%n}&$kjTuDQxAB53WQGwD{)Jfy&h{Px`Y1<&!f0-04dtaDyTTj@j>HKQRG~e0 zN_-`8HVjO5(#8;nFvd%On)4ZBQ#czjxTlilF@g}b6LLMCMgOe(2)cRSykZcdO=-x9 z#&{9k#k1^JRn`lz&)dtYUV4HHio_t@z6`HBDiq|B;ttc#C)vU=G2aW*PVs=Xp|j(L zMw|3$CW?nYoMhS^EGRuv(G{sU^s*Z92OIxEDq_26O{J%dajhH54DA$3Q+v+Q!_P5QIiC_=J&ZxR9vi5a_UJbzyui{S98oUM#y zhVw@MMa|W{!`ICMJtU_#IxpS76H9OMBSFw0Z3=xO{*?Ql$OJ!;ZvP%R33jZvFMmES z5|m$8aphHcw!qmy8Z{I9$Go4?=3?-Xd^@s9f};=VYvGBAtLbZ{N?MJLg_JGJ5@s7m zmqAbBNtn%k6tD>ycZ$f(%9ua7F&o+V$@F8*Sj@%yYz!0|Kry$EJ00-r`sCWiLvI`x zVZH74kliR4qedJh|CxgLx6BwA@X4}^D=C0X$^+&_J+5Cx-<@&GbllsHER00&eLU+( z;z$bOT-fr#(^rW2!e1kfJSPQS++|m3oO#(7ZF4u}|4cN-fcT9)V_eA4Fkaf^YPVC7 zA>3!)9CXZ3&G<}y@7gSZp0w)12ic7X&XU-N|K1t5f9}muN{MH*CXrN{2j3`?E-f9hUro>chg}}@@%`xN9z4Jvt3l4#d5jts3N^7HkCBd~3P$fc z*1vamN~>&HB*@1uT->bA4JxF5qv@R!28Jvvet^sQ2^ViAjWgX({FPyu7xX!3t5=1S zDyDiCwx>CI5Zk!m6$MZM=qycOF<5_!&IQHjcKTlVVBVF<=O1XmJ=;u>$ch5N8fx8v zRk-3`0cdQnXum#r?Nwm>ZU(aG`rkj!gY*A!V$H>!eX)lbsYP5A((W~0;H*!mB@^#W z6yxzS`X=(LLZp0h<&Z!aU|S?=o+JN~y=z0*NbX8$ z{&*plyLHvGk;Wu?d~r>CzC(e!3sMDrNgLsud~oHM@W@*b`u=@!S7!`74uk`vTS;ZT zY)?b=;yq;=_M+a|H{$sbfxKp{CSLP*Vi##JXw{2U_Ah0E@%`QCz#V1(J@&HL(3jml zE7JeAxAk3NgYSCV&fz%Qoz^AjgK9gVZgU>q=xADWgv3A&ceG-WnEs5DHuSERI&h&d z-ax^qIMD(FBe9N6R$}6N1~E5r%O}vZ14+d|=xCdulS4_VOEK(vkPB3Q*Jb0e#eDkp z#CAFdPm+SOO5aAz;F~J>WyFgV7;u>ls~uukKfa~-AUm=WX>mM0I@hMHO6u2Se6Dw3!s-veBRf8e7U@e=P)Oz1l+&PBRrw z@hxUYFWX6>_?qbnY}i%pnjY&_8_8(wp5R-G3s$3?GB~`e>JR+k{4cis-NmqDcV+kQ zJ$l3o7cTy)?uH+z?;SLjam72R8+w$A9D}oORnUKB`(GFZ3y`5HPguO~-ljofnO*!o z#WaN05Lccn2sgBYzOAG6-nTjytwkMq*0#DWEA*!1U_;4jyr|vjru~wD1p9%E#b6A} zqFL|7x<=}kd>$)XO^@Mn*aNcMEkj#AdQip7ZA3+M=$-ImRB8nERitP?*e0y}$|ny% zynDs$-i}h)!XDWP#5hcZ1ily2QZmyZQcEc@AABYfJwR4=#%Q!P^bd(HtNS}!d;CQ! zpsEo-L!Ld&2TQX)@r$NvAo>>l@h@d6w8_VOel6ZcN-e%}EOQqJk*i~OlCDKb5P;lh z)KQU3Z`e-3UBu6ja7UPOia|_vGVvRT_AZ<(&-gNuIJU&X|Jf!x7+8>2{{{nf)lm55`v zJPhrM451}?_rbDtBpnseqdO*gGREsr_UWOWAlRD*1+_@~ngX5|5g>;-m12dRHY8`A zJ77tebwOBQQ=N{6R7$fRRubE5ha)DgtwAGb%RofIJwKI`8E+?P6-=5bzRT%vnvc>(UwzKFdFvp)a0W;W6>ePc#c34=p*2S?&*I zUJ>cy2HD50;IlRK8kcS=4ie;yi!5|SmECgejkHVhbSBTn+VF$V zB)v&&Fpep2jV{tnhXE!_>gpff(SiNODM)@?T6Wo`#)-60QHoUzjtJQ?=96?QOn+qB zk$$J70r0V-u+=&@EsnV9uaQ+QVu9Mf5XKwm-2Z2_$4OY zhO(#On3=GBb-`m>3%Uya#F@5lceE-TDYQDm(3Hr9Eau;KB!fdcU=n}JyhZu=d->n$m0H)P3T8&W-OU^w&MKd{~F)8Soy2z(=E{`wetjd2j3bS;GSDkgG^sk2CyB zLb?Y+K0zNXYEnvXU0Jn!JCN90X>olyA>K$1^pUmV3EB@##0S!u*+ZIMf>nhv3Yr9U zvoTfO^>Qc_H)2Ck0Evj6zW@LL diff --git a/Bouncer/docs/conf.py b/Bouncer/docs/conf.py deleted file mode 100644 index e0da2a6..0000000 --- a/Bouncer/docs/conf.py +++ /dev/null @@ -1,9 +0,0 @@ -from docs_conf.conf import * -linkcheck_ignore = [ - 'http://localhost.*', - 'http://127.0.0.1.*', - 'https://gerrit.o-ran-sc.org.*' -] -#extensions = ['sphinx.ext.autosectionlabel'] -#intersphinx_mapping = {} -#intersphinx_mapping['ric-app-bouncer'] = ('https://o-ran-sc-doc.readthedocs.io/projects/o-ran-sc-ric-app-bouncer/en/%s' % 'latest') diff --git a/Bouncer/docs/conf.yaml b/Bouncer/docs/conf.yaml deleted file mode 100644 index 4b50426..0000000 --- a/Bouncer/docs/conf.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -project_cfg: oran -project: ric-app-bouncer diff --git a/Bouncer/docs/e2sm-Bouncer-v001.asn b/Bouncer/docs/e2sm-Bouncer-v001.asn deleted file mode 100644 index 93ec4f8..0000000 --- a/Bouncer/docs/e2sm-Bouncer-v001.asn +++ /dev/null @@ -1,215 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - --- ASN1START --- ************************************************************** --- E2SM-Bouncer --- Information Element Definitions --- --- ************************************************************** - -E2SM-Bouncer-IEs { } - -DEFINITIONS AUTOMATIC TAGS ::= - -BEGIN - --- ************************************************************** --- --- Lists --- --- ************************************************************** - -maxofRANParameters INTEGER ::= 255 - --- E2 Service model IEs - --- --------------------------------------------------- --- Event Trigger Definition OCTET STRING contents --- --------------------------------------------------- - --- E2SM-Bouncer-EventTriggerDefinition IE -E2SM-Bouncer-EventTriggerDefinition ::= CHOICE{ - eventDefinition-Format1 E2SM-Bouncer-EventTriggerDefinition-Format1, - ... -} - --- E2SM-Bouncer-eventTriggerDefinition IE Format 1 -E2SM-Bouncer-EventTriggerDefinition-Format1 ::= SEQUENCE{ - triggerNature B-TriggerNature, - ... -} - --- --------------------------------------------------- --- Action Definition OCTET STRING contents --- --------------------------------------------------- -E2SM-Bouncer-ActionDefinition ::= CHOICE{ - actionDefinition-Format1 E2SM-Bouncer-ActionDefinition-Format1, - ... -} - --- E2SM-Bouncer-actionDefinition IE used for Action Format 1 -E2SM-Bouncer-ActionDefinition-Format1 ::= SEQUENCE{ - ranParameter-List SEQUENCE (SIZE(1..maxofRANParameters)) OF RANparameter-Item OPTIONAL, - ... -} - - - --- --------------------------------------------------- --- Indication Header OCTET STRING contents --- --------------------------------------------------- - -E2SM-Bouncer-IndicationHeader ::= CHOICE{ - indicationHeader-Format1 E2SM-Bouncer-IndicationHeader-Format1, - ... -} - --- E2SM-Bouncer-indicationHeader Format 1 -E2SM-Bouncer-IndicationHeader-Format1 ::= SEQUENCE{ - indicationHeaderParam B-Header, - ... -} - --- --------------------------------------------------- --- Indication Message OCTET STRING contents --- --------------------------------------------------- - --- E2SM-Bouncer-indicationMessage IE -E2SM-Bouncer-IndicationMessage ::= CHOICE{ - indicationMessage-Format1 E2SM-Bouncer-IndicationMessage-Format1, - ... -} - --- E2SM-Bouncer-IndicationMessage Format 1 -E2SM-Bouncer-IndicationMessage-Format1 ::= SEQUENCE{ - indicationMsgParam B-Message, - ... -} - - --- --------------------------------------------------- --- Call Process ID --- --------------------------------------------------- - --- Not defined in this E2SM - --- --------------------------------------------------- --- Control Header OCTET STRING contents --- --------------------------------------------------- - --- E2SM-Bouncer-ControlHeader -E2SM-Bouncer-ControlHeader ::= CHOICE{ - controlHeader-Format1 E2SM-Bouncer-ControlHeader-Format1, - ... -} - --- E2SM-Bouncer-ControlHeader Format 1 -E2SM-Bouncer-ControlHeader-Format1 ::= SEQUENCE{ - controlHeaderParam B-Header, - ... -} - - --- --------------------------------------------------- --- Control Message OCTET STRING contents --- --------------------------------------------------- - --- E2SM-Bouncer-ControlMessage -E2SM-Bouncer-ControlMessage ::= CHOICE{ - controlMessage-Format1 E2SM-Bouncer-ControlMessage-Format1, - ... -} - --- E2SM-Bouncer-controlMessage Format 1 -E2SM-Bouncer-ControlMessage-Format1 ::= SEQUENCE{ - controlMsgParam B-Message, - ... -} - --- --------------------------------------------------- --- commmon IEs --- --------------------------------------------------- - --- A --- B --- C --- D --- E --- F --- G --- H - -B-Header ::= INTEGER - -B-Message ::= OCTET STRING - -B-TriggerNature ::= ENUMERATED{ - now, - onchange, - ... -} --- I --- J --- K --- L --- M --- N --- O --- P --- Q --- R - - -RANparameter-Item ::= SEQUENCE { - ranParameter-ID RANparameter-ID, - ranParameter-Name RANparameter-Name, - ranParameter-Test RANparameter-Test, - ranParameter-Value RANparameter-Value, - ... -} - - -RANparameter-ID ::= INTEGER (0..maxofRANParameters) - -RANparameter-Name ::= OCTET STRING - -RANparameter-Test ::= ENUMERATED{ - equal, - greaterthan, - lessthan, - contains, - present, - ... -} - -RANparameter-Value ::= OCTET STRING - --- S --- T --- U --- V --- W --- X --- Y --- Z - -END --- ASN1STOP - - - - diff --git a/Bouncer/docs/favicon.ico b/Bouncer/docs/favicon.ico deleted file mode 100644 index 00b0fd0ef0b4e78fbb8cdb413ce84561dfeb404f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15086 zcmcJW2V9fq_Q!*^*Y@7O)jL{-B7s1{OaiD3*&`%Ttk%}OweH#~IBK=vV#v^9$@`w~^E~HS=Nvd315SI6Sj<7m z<)mA2I6XNW4wu{Txig3J0M|OBWZzGEkHd+;53KPU+`<_RVb@hJOLg&A{f!h$4Wh)s zoukD4dq#=Bm=rA@x+YpY@=UaN-2G_r#OINsugjMR=Tv_0u;@jo-HOK(t+!?kusoLB z%k1XYye^MC{$rH;pU#HQ+Wl2Lt$j|U*z5gBv7c?EIOv;5ai0U=e+>T0Xz>sw_zC=w ziL^{S74kJL6NNzLP_$?PEfGd4XWJ!J4d?GscyO~$T6OttKG)=CPfL@m4_mAMZGRWx z=-fWS(bX}+(K9Ym?0Y{_EUAqY_a^W|z5w$O$SeNnCj2p??a;&3a~Ga%GF9$vKIo$;rRJE#K?zTk0q_iEwoKF2d2}&j?2kCHM*akhbv82X{DR zF(i`Wgv%&KxSVF#Y#|S`Q)Fp!zJOQV%pD-3ArB(NB3kO?Oy7I-qENXXO&%zrF(V{2Vq^e~816@72I5+9Acgt{ zQ@G1eigKKQdQ8)?{}_>e{#fwG3s+N^T{8KY9VQFo6R5+%3h=MDFxts|6Q{oK!TbRv z1l)y-dpOao-d;3%av$oq;B%5L{fq*Z29w`H3HdJYCZBn(w-&7vSM_bac z{>~KQ{V6SVo(x+FMP25iY>9s*`XLc@SW9zkQmK2_W2nOs$i8|Dqg{v1jWX=?F}8FK z+t^>J_HXzR-AJ7n)BYodvGV1Vp{&?_5*rkxK*`bC$*bDw0khFv5hFiL6 zv+8>v=^*qB@8$C6_>kcw-!zAUl0zwI?N=0(*arS7YW`m1J|MSI?Z|aFhg^mjP*7iE zn&HmI_#)IJ3O1u2zfIde-hK;B;_q(gg98nHkY3L<+`5`;nEVfY-0WJkwXIQ@r`zGN z^Tv^ETNp`G=8<$$NL%^qJ*OB|q5aFjUk3gP@K?JG;nepS$RW>u9ciLxFxH91;Ez?! zKl=C=+h&lfDH{W9JU8@#Vd@L6;pXA`_;+wP?H2ZOnKgdyxN7;%2$E(jd_Dh?VDb+S zWcIK0{no7n_J0-QcZ2s==Aqyp>M@~nAMi`T-xvJD!9T0#7o4Q-12`vK`+oRvte31Z zO1u>O%OSe&3XH=11Af1l;WfUI1Jixyy2^ZJI~#k?ba=n%bG1K%|GgfcaXO3ob8J23 z{~kEM`^?SYuVnKln}0Opm+>!mNTUf>`^d`VB>34__zC>m$=ood8a6ap`?*ih_FqpJ z96lf|QYkyMf@HfRTi_o>fw6-rAmK~$*}aiG&j0t2`^CE^+Rtjs`$+MU&fwnwex*MC zS=M{Vw#zBDo`GM}2WjYo%?G)L8ynZQ*@OFXhpY?#S$;H;WCxb(=U+X6BrC^Lz>awG zxp{{?vTGIYkI1hry!w6{D_kLf{an|_zrbcUiMwWkUA3N}+=D*IfTZSHblc~tdET(~ zi-!jvNqQ+i))N0Tl57m6fC~r6H>Zre@`ya1P@?+->Y#bXyOgoQRpY>4sbfE||8U#g z?Dy@B-dZ=6Yzw1pJ#+colk zQAfVTMBaIn=lP5p>;Eq7?A}=6>QCZ?NvCx9VgF%he<#xm*b|+F4K?(Ek-86f7MWKB zj``hsXKk~WUr6~~o~eg_>s$)j5lI2}ZjpbP5<+VJ=d{NwhyL$fxwY?)bNF!z_-oku zs~*3p^qtL5BlX;2_y_xq*H4Wyl%uABV8@Y!~skr)&B4Pr~I_ zGJXWVvKjx5B^3DcdGar?iPN68QJZuWY{ne$wTSprErm$iL{N4!f!jrF6=#nEu%k$Gcny{|xZgGy93P z-$uR7uMn@xU9kTQ$%3#xVEelL;6KawZ-f7dE`K~p53ZuX$B)RrT;1lHwr?m`!iL(v z3ujCB#yPAH0{;uP|M}i_4>@=H9sKvnvdgbvzX~~zK2Wb`mgX11|Flqkbw_zq{-CQz zVK;Tn+rEtIP={$P>3`Sj;I{?;BgQ|*>MU&M8Q32{?tuNjkV}wE^ubZGvcV-4A|a?4NJ2y_<*GA7s(xIokgb`0qh}0Xyr1bE-bD;{O8v zXQab_bQMW2>?HqUJ$A1izXjlTYf1mRUSIC8wsV}rrp%F6=g{^AU}wVm;7`bHu(P@7 zBHo`NE1P?aUkU!Q#`ZtDnk2tn)Mq!EYmYG|+H{s{OPw}|5;}fmedvf&x5sGvBCr=i zav`h_eh2$a$Q82emPLGrY{vf*O8d4jwdJ?YrjK|c z)2BDo+>D(`KIAF*|A5>A|8=tB-6X#FDdW!t|2Z}PdXk+^rhuG0{rs4VeDahv-A~sp zuuZIb?LN6J%$nbV_1}<rbGdgKt_6K&7h-$`+jFH-!6Jy(8i^Ca-s z$TBxmK<;z>(G|!ixO|}C6E%}MH6!_>t%lsGv9>3R@yDOX<`7frllb>3* z1m`cMI;<$`X%}7gp?Qabjy%J{KrnBG z6hhu?D~ubzv*f{M+@F&`4tA*)znfw$_;t>%@{?=qE|c#6Zq@F|I|LZEJN^F$zDslqI_OAFfpz-32eoZhc@qCKmr-qKg}aSA07Uue0PP1 zrtLLl@c9%2`Qe0_vg7Nj0u(u~wIQ$UdUD)@_D@sUzjpg;_zC=E9}8JhN_MkfkoA}n za1@hOuOhM%fzcYmhgd-b5PLB9D1eQCyMI1e4|-14Uo`OdZsf1$dnuOj-4xC2lhs3Z zIN@X2{ho^Ho?oXwRDE!<_Raip;EygP`^Xn$w*(UYf^5GnCYzbXWIYw- zmqlbfwh(oLj4e>hn0yk90Q(Tg=gs&p@x2v1O`Gd0WqTrBrN=kk4am)ZZ6A0mFb?+D zkZ{Y(mfK&$9|88okTCGiFDBc0V4saLq=;<4DI}X|kV)Vl4;kGee-1w|r;k2n?Q7Cq z3k_tuB8EtAWajz5sMTrrrhU=tF6N?)DiUo{%|C4X>e^3B{HzZ&{9l88>KpmX1hU*2 z{J`8+t@rYzvF`^RN}3k%@Xw;A%-WxEjwiPpbtFy&|N6@R75__&-w5!x=r`AHf6aT@ zia{MD7Y|Gi$Sca%X4Za>b1?H|5nI#5X{f`Rzp(uWtL(o*&_6F)5S-gd!_}5jwr29* z0)PK)q^v?;b+WAJF5um7da%9spp@!wjYdvVb2wqgXUO&me;W@ z%uRnQO$l!YKZ*~S&qL}p?5t$-kPqWm5cSH&x^N3)`Z(sLWb^~-pqf9UF#j|izZ(0W ziSetk|B34HE0|DFYc;v>3`EKwU#NGUY|7Z0&*0@j5+Heuor#Jcds43kez*HXJ#P~^ zT~(6sa4p$mZn94(SIwb1^AF>nrJjFmF#lM8gEe7Rv6A=Qi-+cmO2f>SRWyrFw1)9b zzX9_H5I@K|$OHdU_!0}jpM&;)gt6Sf?|hR;bdAXVqLOTm*OSej8nWJ6Mb>Lyl3-;8 z@#D+MGPay}G38_)TV7|jyz+tRs+TLeuB~!5+*jYKIp$5QulpYC9U%7L|H`+Jc6;U0 zA0CgX-0csl?|BDjgkOlnj6aLW=A4qOPbo=oq@Jwy*OA4pTH>bHR+(+BQJ8M3KGt=8 z)vPY-s~t=>*Zl2uI{#PS!I#?+?JorXNboOrxkJane_wo^iX5`2%J!VH2K*J^&jJ5+ z-tO8IZbt14vy>XoZpqdEHeFw1@Gfjb*&T>DoJOhQaLm}}5)P*WD>FHq_N)wt7FIH4 zVH}QLTGnoc>9WxDx!W+s=kcYP?(v;ck zGib8eGqg(8Gx1sd?ADi>=Van>Oiws_KJ;@~$+%Eva=hzQT%1lN>au+%E7kWl)Cc^U zda3G(`l{-U`fJ*Opo6swYbOJIXlyq;s1y6FX;=1MCE2KvI!}v>TYVsnd0L(E;VoXs zX?ibGEVGFc_nQ&CQz5HMuAH z=#%@X-MhVz7xP|(qq_@odR8GP?0%H^(`x8PjCllPJY)*;NWMYt!feO_iWElBw{}T2 zgDm%Di@RP*<{Dp;z%Tq(`BTWT=nDN&kz&`JD3K5Ha-_)9>IWHwI6cdSdZm9^gZ>!A z@8gg^v<$K1sn)5~)AVGCh4HD)h_i~!jFVv%t$QKI!xgy_nM<6V>KAx

4K$ruCE1 z6v%X$l;$A+WKj>+22)V)8Q__tsz1{oD`fctaftb@q**pw5vOB*{loVVn;33xnDNGS zD^e)*U)Ql12r)&^)(c&_BB& zheV@4UKKl!7p|eHf()`XVR72M#mKh^H8)CW(JrFw9b6XpxZfT-19>egCsE+4vB(QS zTsh*?M*TjaV&t+|kjLbY$$k8Xadb*KUL?!%?IE)$_UT1S7p!zP+-y`Aj3uoxYSwQtKqu7Ffq`$0^Fvphe+~M#Kz{`E&vzSXun0K}N!`ET9P#gMbbq$XM8y4H z)gOLuibl+q<%RGToS}3`VY)8{KC=@(XnIPbJB!FUfz$a`L+NTcP{iQaSs5YhH-G zyC8O*t+ z(h>5>sU*)F+U)kYZ83Gkp65fqlGUH-pTs|aoC_9jh8-Yx%A(8eXO@DiuDvg$jF6w% zR4GS{M5TY*_Y{=Q;^OevAjXNaP#N|ivewjF`!{jIL@UIN5qDMV|I+F(eC(H?{{;E~ z0|9@x8{AEa8-N69oMS#qyLBS z5FbX;!4f=;e ze{Bq6o`Kw}(8*#|h}W`sbC*NVe>+=#IlV-!eL@Q>FZJMy*D_+P|U`TP=frpSI}K{%yR&`mS*f$#;iX zW*O`c%8_>@1QC-{4!vh1QD`{uOGo@2aEe z6WAMz_pn$Ai}fJx&%J^;$&-4tf3Z9h`Y&v!fTBuWzeXuNL2N;wU8lCZ58(c0+N0aU zU)8=zP0SB5OT_!E__v5Jd{zeg`<3N*NUt5%jSaK7#&cC%X^vI&OP%?yH4M<%5t3k` z6F163{U4(3nQp`@go=9@e_NUUpqr-~#~j*S)eq3m;wpuRsf-h)Rkiy31HJ!*EQd7l zC$ly{%+2Zn@w+45AX4n=eKB=B^j9_04+flp$oUxJ3frrT5EGdr+Vb*^XLjf`hcKUT z4Fvj{NVh!rP@%i0qJ}S4d?UZGl@A~LUFr2B`f@s`$61wr_!O(E5YI@1KV9UISlMho zfS&guGRP%}{@8`a-;aYe^gl$bNF=|uqn-TZ+IZ6L;3L} zXW7XOPn!9Mq2KGVlEgSC3sW2QlS5KP9sC%#>|@HJ1VP0s;Fo@&sHHuPHB!T;+E zpDFWK2O(DAt;mP3*GFT=eKOazlO6hDk>u889X|@QL*|R;pfvA6@e&$EETgrUMC2Id`XoK%&3j8(`)P7g%q0m1-Q~%t{ zh?iJs>aJbNc1L#)yz}2*o8}fV7WZG^%S(a&bxrickEHg&H0Ynz;QO5l-Cs7*ADsIT z{zhMIolW0M&TRJy$a#LNvHq+LAZ#qUUV$yb_oIqsFh3Ua!?mQJ)t~7f1)smV{*MHG zbNe;br|)y%{W~uHCADXuSE=D(`FYGA<-&ZL+rY3A3j>QoX!L*Ir2ZQHWAc@Pk@;Eh z`2`646wSu1KK<+(`oIjj6Co;JG4n}cA4KjCVUNFHOdN$D4EA8Z95xtHO15Dd{qTXo zel28q)M_#sHicIuXtd#ydtUF%1Sqrt+hIK{yKdveTVVzKJ*Kqe=PKGbh%46oNiKq z!)2yCzrL8>O~RFO_s+4h(|7Aq>6;Z{|*bPXbOB zPKQkVgIK0nRr_%7I)iX;r9pU@(tx=)IAJPBgT~>|P^zC0?pfeapQ73RQkv)4kCt>Fi}Q1+>VF8LaCV*~ zNP8jbdSr7qqrFzZYJ5eC#l|zfko+_(^mFPR-j4$3`B1=D_S9z>k0$yDP=wPQoOxm( ziP-P%#6ENHC2qt2N31q7e}6*A$Q7R^exv%IhXCYy`z`P-_nv8U!+qjMhuwy?KQTD4 z$L*z#;T7??KioEz9J}r(u2K4Ks?W51RB@xKmSquu4^#%Y849ACRpb^tkiI9mi>IYB;( zial=6shMviMi}!R&Mj+MuAq#29A`%C)lCoXK`cL8c5nqrZeX8MTCemgZFyfDFI*>& zwoiTOWp)W?4ea~PGIMZ$jr3f)IuE0qiZQm>zZ>d({U}Q0g;*bWY~K}mek?c6{AwM$ zUveu;y*8B6Gt7s4y*K0H2&=QE9%lFNtM|OWV6S(V-JdOa_`B+U-vaf%P7wRD+1SK7 z%Hr|S5ae#;W1spE`?SYTu}9z1ct6`09jPr7Zmo*KdSs;GKn$6S`!+zTRq#4|)A6qSv+`X=j8I@uVyMQ%yOI5vaZAF&D^0JA1kD{-5W`#F#uae~@sAA17*f03z z6k)9n?wb(&e$e&f@&0U&%=QHj5#vioTxJc{!sTUkcHh3JvmR4Sf&rNO`eEH2fOWTD z9@gZXB)-ctmCr?bWUXPqvz$F>dnJ6_&F5 z=62Q8kCg%0*+%I9)p$mU&vVoRF?SX#wZmG#=3o{-6ihEH5{xfcjdfq=Ud?lG?}v~+ z@KJAd`;#7suPCc+_Se>0ZK`@|v7#c~JgQuVScQ(Cs0uT9Hm+o1CmxPfB=Qj^m26BZ XY+}&}KC=mD;X?Iq*l*cA?B4$ePY*3q diff --git a/Bouncer/docs/index.rst b/Bouncer/docs/index.rst deleted file mode 100644 index 0d56bfd..0000000 --- a/Bouncer/docs/index.rst +++ /dev/null @@ -1,32 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - - -Welcome to O-RAN SC Bouncer xAPP Documentation -======================================================== - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - overview.rst - release-notes.rst - installation-guide.rst - user-guide.rst - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/Bouncer/docs/installation-guide.rst b/Bouncer/docs/installation-guide.rst deleted file mode 100644 index 75e2e35..0000000 --- a/Bouncer/docs/installation-guide.rst +++ /dev/null @@ -1,77 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - - -Installation Guide -================== - -.. contents:: - :depth: 3 - :local: - -Abstract --------- - -This document describes how to install the Bouncer xAPP. - -Version history - -+--------------------+--------------------+--------------------+--------------------+ -| **Date** | **Ver.** | **Organization** | **Comment** | -| | | | | -+--------------------+--------------------+--------------------+--------------------+ -| 2020-11-17 |1.0.0 |HCL Technologies | Cherry Release | -| | | | | -+--------------------+--------------------+--------------------+--------------------+ - - -Introduction ------------- - -This document provides guidelines on how to install and configure the Bouncer xAPP in various environments/operating modes. -The audience of this document is assumed to have good knowledge in RIC Platform. - - -Preface -------- -The Bouncer xAPP can be run directly as a Linux binary, as a docker image, or in a pod in a Kubernetes environment. The first -two can be used for testing/evaluation. The last option is how an xAPP is deployed in the RAN Intelligent Controller environment. -This document covers all three methods. - - - - -Software Installation and Deployment ------------------------------------- -The build process assumes a Linux environment with a gcc (>= 4.0) compatible compiler and has been tested on Ubuntu. For building docker images, -the Docker environment must be present in the system. - - -Build Process -~~~~~~~~~~~~~ -The Bouncer xAPP can be either tested as a Linux binary or as a docker image. - 1. **Linux binary**: - The Bouncer xAPP may be compiled and invoked directly. Pre-requisite software packages that must be installed prior to compiling are documented in the Dockerfile in the repository. README file in the repository mentions the steps to be followed to make "b-xapp-main" binary. - - 2. **Docker Image**: From the root of the repository, run *docker --no-cache build -t ./* . - - -Deployment -~~~~~~~~~~ -**Invoking xAPP docker container directly** (not in RIC Kubernetes env.): - xAPP descriptor(config-file.json) is available say under directory /home/ubuntu/config-file.json, the docker image can be invoked as *docker run --net host -it --rm -v "/home/test-config:/opt/ric/config" --name "B-xAPP" *. - - diff --git a/Bouncer/docs/overview.rst b/Bouncer/docs/overview.rst deleted file mode 100644 index d3a37db..0000000 --- a/Bouncer/docs/overview.rst +++ /dev/null @@ -1,38 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - - - -Bouncer xAPP Overview -================================ - -The Bouncer xAPP repository contains open-source code for a prototype xAPP for near real-time -RAN Intelligent Controller. The Bouncer xAPP aims to provide basic RIC Benchmarking implementation of : - --E2 interfaces interactions. - --xAPP Configuration management. - --E2 subscription handling - --Receiving E2 RIC Indication - - -The Bouncer xAPP code is intended to follow xAPP C++ Framework to implement the prototype. - - - - diff --git a/Bouncer/docs/release-notes.rst b/Bouncer/docs/release-notes.rst deleted file mode 100644 index ece382c..0000000 --- a/Bouncer/docs/release-notes.rst +++ /dev/null @@ -1,88 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - -Release Notes -============= - - -This document provides the release notes for the Bronze Release of the Bouncer xAPP. - -.. contents:: - :depth: 3 - :local: - - -Version history ---------------- - -+--------------------+--------------------+--------------------+--------------------+ -| **Date** | **Ver.** | **Organization** | **Comment** | -| | | | | -+--------------------+--------------------+--------------------+--------------------+ -| 2020-11-18 | 1.0.0 | HCL Technologies | First draft | -| | | | | -+--------------------+--------------------+--------------------+--------------------+ - - - -Summary -------- - -The Bronze release of the Bouncer xAPP demonstrates E2 interface interactions, persistent storage read-write, RMR and E2 Subscription handling. -Bouncer xAPP uses its Bouncer E2SM (can be found at /src/xapp-asn/e2sm/) for ASN PDUs. - - -Release Data ------------- - -+--------------------------------------+--------------------------------------+ -| **Project** | RAN Intelligent Controller | -| | | -+--------------------------------------+--------------------------------------+ -| **Repo/commit-ID** | ric-app/benchmarking | -| | | -+--------------------------------------+--------------------------------------+ -| **Release designation** | Cherry | -| | | -+--------------------------------------+--------------------------------------+ -| **Release date** | 2020-11-18 | -| | | -+--------------------------------------+--------------------------------------+ -| **Purpose of the delivery** | open-source Bouncer xAPP | -| | | -| | | -+--------------------------------------+--------------------------------------+ - -Components ----------- - -- *src/* contains the main source code. Under that directory : - - + *xapp.hpp, xapp.cc* is generic class which implements all the xAPP functionalities for xapp developer to pick and choose. - + *xapp-utils/* contains generic classes for - persistent data management, configuration management, RMR send/receive etc. - + *xapp-asn/* contains generic classes for generating/processing ASN1 E2AP and E2SM messages. - + *xapp-mgmt/* contains code specific xapp management of subscriptions and received messages. - - - - -Limitations ------------ -- The Bouncer xAPP target RIC Benchmarking usecase to determine the latency/thoughput in the RAN-RIC interaction. - -- The subscription process assumes, on sending subscription request results in valid subscription response and receiving the message indication. - -- The Bouncer xAPP address RIC Benchmarking usecase doesn't address A1 policy and SDL persistent data storage in particular. diff --git a/Bouncer/docs/requirements-docs.txt b/Bouncer/docs/requirements-docs.txt deleted file mode 100644 index 09a0c1c..0000000 --- a/Bouncer/docs/requirements-docs.txt +++ /dev/null @@ -1,5 +0,0 @@ -sphinx -sphinx-rtd-theme -sphinxcontrib-httpdomain -recommonmark -lfdocs-conf diff --git a/Bouncer/docs/user-guide.rst b/Bouncer/docs/user-guide.rst deleted file mode 100644 index eec0bef..0000000 --- a/Bouncer/docs/user-guide.rst +++ /dev/null @@ -1,202 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - - -============================================================================================ -Bouncer xAPP (C++) -============================================================================================ --------------------------------------------------------------------------------------------- -User's Guide --------------------------------------------------------------------------------------------- - -Introduction -============================================================================================ - -The RIC platform provides set of functions that the xAPPs can use to accomplish their tasks. -The Bouncer xAPP is envisioned to provide xAPP developers, examples of implementing these sets of functions. - -Bouncer xAPP Features -============================================================================================ - -RIC Platform provides many APIs and libraries to aid the development of xAPPs. All xAPPs will have some custom -processing functional logic core to the xApp and some additional non-functional platform related processing using -these APIs and libraries. Bouncer xAPP attempts to show the usage of such additional platform processing using RIC platform APIs and libraries. - - -The Bouncer xApp demonstrates how an xApp uses E2 interfaces and near-ric platform for the RIC Benchmarking implementation. -The following paragraphs cover the various steps involved to create an Bouncer xApp instance, setting its configuration, -retrieving R-NIB data, sending subscription, connecting SDL, and usage of "Bouncer SM" - -Bouncer Creation -============================================================================================ - -The creation of the xApp instance is as simple as invoking -the object's constructor with two required parameters: - - -Bouncer xAPP, may choose to create following objects for obtaining desired set of functionalities provided under xapp-utils: - -XappRmr --------------------------------------------------------------------------------------------- -An xAPP can have the capability of receiving and sending rmr messages. This is achieved by creating an XappRmr object. The constructor of xAPPRMR object requires xAPP developer to provide -xAPP's listening port and developer configurable number of attempts need to be made to send the message. The key functionalities of the class being : - -1. Setting RMR initial context: ...xapp_rmr_init(...) - -2. Sending RMR message: ...xapp_rmr_send(xapp_rmr_header, void*) - -3. Receiving RMR message: ...xapp_rmr_receive(msghandler,...) - -The RMR Header can be defined using xapp_rmr_header : -:: - - typedef struct{ - struct timespec ts; - int32_t message_type; //mandatory - int32_t state; - int32_t payload_length; //mandatory - unsigned char sid[RMR_MAX_SID]; - unsigned char src[RMR_MAX_SRC]; - unsigned char meid[RMR_MAX_MEID]; - - } xapp_rmr_header; - -Except for message type and payload length, its developers prerogative to use remaining header information. -The XappMsgHandler (msghandler) instance in xapp_rmr_receive function handles received messages. The handling of messages is based on -the usecase catered by a xAPP. Hence, XappMsgHandler class used in Bouncer xAPP is not very comprehensive and addresses only Healthcheck Messages. - -XappSettings -------------------------------------------------------------------------------------------- -An xAPP has the capability to use environment variables or xapp-descriptor information as its configuration settings -creating XappSettings object, whose key functions being : - -1. Loading Default Settings: ...loadDefaultSettings() - -2. Loading Environment Variables: ...loadEnvVarSettings() - -3. Loading Command Line Settings: ...loadCmdlineSettings(argc, argv) - - - -Bouncer E2 Message Handling -============================================================================================ -Helper Objects --------------------------------------------------------------------------------------------- -Bouncer xAPP creates wrapper datastructures mirroring ASN and JSON messages. These datastructures facilitate processing of -E2 messages in the xAPP. A sample helper object for Health Check message being: -:: - - struct a1_policy_helper{ - std::string operation; - std::string policy_type_id; - std::string policy_instance_id; - std::string handler_id; - std::string status; - }; - -And a sample E2AP Control datastructure: -:: - - struct ric_control_helper{ - ric_control_helper(void):req_id(1), req_seq_no(1), func_id(0), action_id(1), control_ack(-1), cause(0), sub_cause(0), control_status(1), control_msg(0), control_msg_size(0), control_header(0), control_header_size(0), call_process_id(0), call_process_id_size(0){}; - long int req_id, req_seq_no, func_id, action_id, control_ack, cause, sub_cause, control_status; - - unsigned char* control_msg; - size_t control_msg_size; - - unsigned char* control_header; - size_t control_header_size; - - unsigned char *call_process_id; - size_t call_process_id_size; - - }; - -As mentioned, these datastructures are very much tied to the message specifications. - - - -ASN Encoding/Decoding --------------------------------------------------------------------------------------------- -RIC platform provided ASN1C (modified) library is used for processing ASN1 messages. Bouncer xAPP, for each -ASN message type, uses a class which is responsible for handling a particular message type. -The class encapsulates, the APIs and datastructures used in ASN1C using helper objects. For example: -:: - - class ric_control_response{ - ... - bool encode_e2ap_control_response(..., ric_control_helper &); - bool set_fields(..., ric_control_helper &); - bool get_fields(..., ric_control_helper &); - ... - } - -Note, the helper objects and message type processing classes can be found under xapp-asn subdirectories. - -E2AP Subscription --------------------------------------------------------------------------------------------- -In Bouncer xAPP, we consider sunny-side scenario, in which for a E2AP subscription request sent, it is assumed, -that Bouncer xAPP will be receiving E2AP subscription response. Handling advanced subscription (class SubscriptionHandler) flows is out of the -scope of Bouncer xAPP. Current form of class SubscriptionHandler has following key functionalities: - -1. manage_subscription_request(...) - -2. manage_subscription_response(...) - - -The manage_subscription_request function waits for the response for a specified time for subscription response -and if no response is received within a specified time, gives a time out error message. A subscription message -is created using ASN Encodong/Decoding and Helper classes. (Refer test_sub.h). Bouncer xAPP sends the subscriptions based -on the gNodeB IDs received from RNIB. Please refer following function in xapp.* for RNIB transactions: set_rnib_gnblist(...) - - -E2SM Subscription, Indication, Control --------------------------------------------------------------------------------------------- -Bouncer E2SM (e2sm-Bouncer-v001.asn) is an example E2SM available in the docs directory. The Helper and -encoding/decoding classes are in xapp-asn/e2sm. Sample code for control message E2SM: -:: - - //ControlHeader - unsigned char header_buf[128]; - size_t header_buf_len = 128; - - //ControlMessage - unsigned char msg_buf[128]; - size_t msg_buf_len = 128; - - bool res; - - e2sm_control_helper e2sm_cntrldata; //helper object - e2sm_control e2sm_cntrl; //encoding/decoding object - - unsigned char msg[20] = "Bouncer"; - - e2sm_cntrldata.header = 1001; - e2sm_cntrldata.message = msg; - e2sm_cntrldata.message_len = strlen((const char*)e2sm_cntrldata.message); - - - // Encode the control header - res = e2sm_cntrl.encode_control_header(&header_buf[0], &header_buf_len, e2sm_cntrldata); - if(!res) - std::cout << e2sm_cntrl.get_error() << std::endl; - - // Encode the control message - res = e2sm_cntrl.encode_control_message(&msg_buf[0], &msg_buf_len, e2sm_cntrldata); - if(!res) - std::cout << e2sm_cntrl.get_error() << std::endl; - - diff --git a/Bouncer/asn1c_defs/ANY.h b/Bouncer/e2ap/headers/ANY.h similarity index 100% rename from Bouncer/asn1c_defs/ANY.h rename to Bouncer/e2ap/headers/ANY.h diff --git a/Bouncer/asn1c_defs/BIT_STRING.h b/Bouncer/e2ap/headers/BIT_STRING.h similarity index 100% rename from Bouncer/asn1c_defs/BIT_STRING.h rename to Bouncer/e2ap/headers/BIT_STRING.h diff --git a/Bouncer/e2ap/headers/Cause.h b/Bouncer/e2ap/headers/Cause.h new file mode 100644 index 0000000..7bd7e80 --- /dev/null +++ b/Bouncer/e2ap/headers/Cause.h @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _Cause_H_ +#define _Cause_H_ + + +#include + +/* Including external dependencies */ +#include "CauseRIC.h" +#include "CauseRICservice.h" +#include "CauseTransport.h" +#include "CauseProtocol.h" +#include "CauseMisc.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Cause_PR { + Cause_PR_NOTHING, /* No components present */ + Cause_PR_ricRequest, + Cause_PR_ricService, + Cause_PR_transport, + Cause_PR_protocol, + Cause_PR_misc + /* Extensions may appear below */ + +} Cause_PR; + +/* Cause */ +typedef struct Cause { + Cause_PR present; + union Cause_u { + CauseRIC_t ricRequest; + CauseRICservice_t ricService; + CauseTransport_t transport; + CauseProtocol_t protocol; + CauseMisc_t misc; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Cause_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Cause; +extern asn_CHOICE_specifics_t asn_SPC_Cause_specs_1; +extern asn_TYPE_member_t asn_MBR_Cause_1[5]; +extern asn_per_constraints_t asn_PER_type_Cause_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Cause_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CauseMisc.h b/Bouncer/e2ap/headers/CauseMisc.h new file mode 100644 index 0000000..1b1efcf --- /dev/null +++ b/Bouncer/e2ap/headers/CauseMisc.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CauseMisc_H_ +#define _CauseMisc_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CauseMisc { + CauseMisc_control_processing_overload = 0, + CauseMisc_hardware_failure = 1, + CauseMisc_om_intervention = 2, + CauseMisc_unspecified = 3 + /* + * Enumeration is extensible + */ +} e_CauseMisc; + +/* CauseMisc */ +typedef long CauseMisc_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_CauseMisc_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_CauseMisc; +extern const asn_INTEGER_specifics_t asn_SPC_CauseMisc_specs_1; +asn_struct_free_f CauseMisc_free; +asn_struct_print_f CauseMisc_print; +asn_constr_check_f CauseMisc_constraint; +ber_type_decoder_f CauseMisc_decode_ber; +der_type_encoder_f CauseMisc_encode_der; +xer_type_decoder_f CauseMisc_decode_xer; +xer_type_encoder_f CauseMisc_encode_xer; +oer_type_decoder_f CauseMisc_decode_oer; +oer_type_encoder_f CauseMisc_encode_oer; +per_type_decoder_f CauseMisc_decode_uper; +per_type_encoder_f CauseMisc_encode_uper; +per_type_decoder_f CauseMisc_decode_aper; +per_type_encoder_f CauseMisc_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _CauseMisc_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CauseProtocol.h b/Bouncer/e2ap/headers/CauseProtocol.h new file mode 100644 index 0000000..8b49178 --- /dev/null +++ b/Bouncer/e2ap/headers/CauseProtocol.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CauseProtocol_H_ +#define _CauseProtocol_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CauseProtocol { + CauseProtocol_transfer_syntax_error = 0, + CauseProtocol_abstract_syntax_error_reject = 1, + CauseProtocol_abstract_syntax_error_ignore_and_notify = 2, + CauseProtocol_message_not_compatible_with_receiver_state = 3, + CauseProtocol_semantic_error = 4, + CauseProtocol_abstract_syntax_error_falsely_constructed_message = 5, + CauseProtocol_unspecified = 6 + /* + * Enumeration is extensible + */ +} e_CauseProtocol; + +/* CauseProtocol */ +typedef long CauseProtocol_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_CauseProtocol_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_CauseProtocol; +extern const asn_INTEGER_specifics_t asn_SPC_CauseProtocol_specs_1; +asn_struct_free_f CauseProtocol_free; +asn_struct_print_f CauseProtocol_print; +asn_constr_check_f CauseProtocol_constraint; +ber_type_decoder_f CauseProtocol_decode_ber; +der_type_encoder_f CauseProtocol_encode_der; +xer_type_decoder_f CauseProtocol_decode_xer; +xer_type_encoder_f CauseProtocol_encode_xer; +oer_type_decoder_f CauseProtocol_decode_oer; +oer_type_encoder_f CauseProtocol_encode_oer; +per_type_decoder_f CauseProtocol_decode_uper; +per_type_encoder_f CauseProtocol_encode_uper; +per_type_decoder_f CauseProtocol_decode_aper; +per_type_encoder_f CauseProtocol_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _CauseProtocol_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CauseRIC.h b/Bouncer/e2ap/headers/CauseRIC.h new file mode 100644 index 0000000..92cbb95 --- /dev/null +++ b/Bouncer/e2ap/headers/CauseRIC.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CauseRIC_H_ +#define _CauseRIC_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CauseRIC { + CauseRIC_ran_function_id_Invalid = 0, + CauseRIC_action_not_supported = 1, + CauseRIC_excessive_actions = 2, + CauseRIC_duplicate_action = 3, + CauseRIC_duplicate_event = 4, + CauseRIC_function_resource_limit = 5, + CauseRIC_request_id_unknown = 6, + CauseRIC_inconsistent_action_subsequent_action_sequence = 7, + CauseRIC_control_message_invalid = 8, + CauseRIC_call_process_id_invalid = 9, + CauseRIC_unspecified = 10 + /* + * Enumeration is extensible + */ +} e_CauseRIC; + +/* CauseRIC */ +typedef long CauseRIC_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_CauseRIC_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_CauseRIC; +extern const asn_INTEGER_specifics_t asn_SPC_CauseRIC_specs_1; +asn_struct_free_f CauseRIC_free; +asn_struct_print_f CauseRIC_print; +asn_constr_check_f CauseRIC_constraint; +ber_type_decoder_f CauseRIC_decode_ber; +der_type_encoder_f CauseRIC_encode_der; +xer_type_decoder_f CauseRIC_decode_xer; +xer_type_encoder_f CauseRIC_encode_xer; +oer_type_decoder_f CauseRIC_decode_oer; +oer_type_encoder_f CauseRIC_encode_oer; +per_type_decoder_f CauseRIC_decode_uper; +per_type_encoder_f CauseRIC_encode_uper; +per_type_decoder_f CauseRIC_decode_aper; +per_type_encoder_f CauseRIC_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _CauseRIC_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CauseRICservice.h b/Bouncer/e2ap/headers/CauseRICservice.h new file mode 100644 index 0000000..99ec743 --- /dev/null +++ b/Bouncer/e2ap/headers/CauseRICservice.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CauseRICservice_H_ +#define _CauseRICservice_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CauseRICservice { + CauseRICservice_function_not_required = 0, + CauseRICservice_excessive_functions = 1, + CauseRICservice_ric_resource_limit = 2 + /* + * Enumeration is extensible + */ +} e_CauseRICservice; + +/* CauseRICservice */ +typedef long CauseRICservice_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_CauseRICservice_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_CauseRICservice; +extern const asn_INTEGER_specifics_t asn_SPC_CauseRICservice_specs_1; +asn_struct_free_f CauseRICservice_free; +asn_struct_print_f CauseRICservice_print; +asn_constr_check_f CauseRICservice_constraint; +ber_type_decoder_f CauseRICservice_decode_ber; +der_type_encoder_f CauseRICservice_encode_der; +xer_type_decoder_f CauseRICservice_decode_xer; +xer_type_encoder_f CauseRICservice_encode_xer; +oer_type_decoder_f CauseRICservice_decode_oer; +oer_type_encoder_f CauseRICservice_encode_oer; +per_type_decoder_f CauseRICservice_decode_uper; +per_type_encoder_f CauseRICservice_encode_uper; +per_type_decoder_f CauseRICservice_decode_aper; +per_type_encoder_f CauseRICservice_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _CauseRICservice_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CauseTransport.h b/Bouncer/e2ap/headers/CauseTransport.h new file mode 100644 index 0000000..5204d28 --- /dev/null +++ b/Bouncer/e2ap/headers/CauseTransport.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CauseTransport_H_ +#define _CauseTransport_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CauseTransport { + CauseTransport_unspecified = 0, + CauseTransport_transport_resource_unavailable = 1 + /* + * Enumeration is extensible + */ +} e_CauseTransport; + +/* CauseTransport */ +typedef long CauseTransport_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_CauseTransport_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_CauseTransport; +extern const asn_INTEGER_specifics_t asn_SPC_CauseTransport_specs_1; +asn_struct_free_f CauseTransport_free; +asn_struct_print_f CauseTransport_print; +asn_constr_check_f CauseTransport_constraint; +ber_type_decoder_f CauseTransport_decode_ber; +der_type_encoder_f CauseTransport_encode_der; +xer_type_decoder_f CauseTransport_decode_xer; +xer_type_encoder_f CauseTransport_encode_xer; +oer_type_decoder_f CauseTransport_decode_oer; +oer_type_encoder_f CauseTransport_encode_oer; +per_type_decoder_f CauseTransport_decode_uper; +per_type_encoder_f CauseTransport_encode_uper; +per_type_decoder_f CauseTransport_decode_aper; +per_type_encoder_f CauseTransport_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _CauseTransport_H_ */ +#include diff --git a/Bouncer/e2ap/headers/Criticality.h b/Bouncer/e2ap/headers/Criticality.h new file mode 100644 index 0000000..3d32aff --- /dev/null +++ b/Bouncer/e2ap/headers/Criticality.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _Criticality_H_ +#define _Criticality_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Criticality { + Criticality_reject = 0, + Criticality_ignore = 1, + Criticality_notify = 2 +} e_Criticality; + +/* Criticality */ +typedef long Criticality_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Criticality_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Criticality; +extern const asn_INTEGER_specifics_t asn_SPC_Criticality_specs_1; +asn_struct_free_f Criticality_free; +asn_struct_print_f Criticality_print; +asn_constr_check_f Criticality_constraint; +ber_type_decoder_f Criticality_decode_ber; +der_type_encoder_f Criticality_encode_der; +xer_type_decoder_f Criticality_decode_xer; +xer_type_encoder_f Criticality_encode_xer; +oer_type_decoder_f Criticality_decode_oer; +oer_type_encoder_f Criticality_encode_oer; +per_type_decoder_f Criticality_decode_uper; +per_type_encoder_f Criticality_encode_uper; +per_type_decoder_f Criticality_decode_aper; +per_type_encoder_f Criticality_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Criticality_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CriticalityDiagnostics-IE-Item.h b/Bouncer/e2ap/headers/CriticalityDiagnostics-IE-Item.h new file mode 100644 index 0000000..5992ce7 --- /dev/null +++ b/Bouncer/e2ap/headers/CriticalityDiagnostics-IE-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CriticalityDiagnostics_IE_Item_H_ +#define _CriticalityDiagnostics_IE_Item_H_ + + +#include + +/* Including external dependencies */ +#include "Criticality.h" +#include "ProtocolIE-ID.h" +#include "TypeOfError.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* CriticalityDiagnostics-IE-Item */ +typedef struct CriticalityDiagnostics_IE_Item { + Criticality_t iECriticality; + ProtocolIE_ID_t iE_ID; + TypeOfError_t typeOfError; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CriticalityDiagnostics_IE_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_IE_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CriticalityDiagnostics_IE_Item_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CriticalityDiagnostics-IE-List.h b/Bouncer/e2ap/headers/CriticalityDiagnostics-IE-List.h new file mode 100644 index 0000000..b823da4 --- /dev/null +++ b/Bouncer/e2ap/headers/CriticalityDiagnostics-IE-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CriticalityDiagnostics_IE_List_H_ +#define _CriticalityDiagnostics_IE_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CriticalityDiagnostics_IE_Item; + +/* CriticalityDiagnostics-IE-List */ +typedef struct CriticalityDiagnostics_IE_List { + A_SEQUENCE_OF(struct CriticalityDiagnostics_IE_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CriticalityDiagnostics_IE_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_List; +extern asn_SET_OF_specifics_t asn_SPC_CriticalityDiagnostics_IE_List_specs_1; +extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_List_1[1]; +extern asn_per_constraints_t asn_PER_type_CriticalityDiagnostics_IE_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _CriticalityDiagnostics_IE_List_H_ */ +#include diff --git a/Bouncer/e2ap/headers/CriticalityDiagnostics.h b/Bouncer/e2ap/headers/CriticalityDiagnostics.h new file mode 100644 index 0000000..ae04eef --- /dev/null +++ b/Bouncer/e2ap/headers/CriticalityDiagnostics.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CriticalityDiagnostics_H_ +#define _CriticalityDiagnostics_H_ + + +#include + +/* Including external dependencies */ +#include "ProcedureCode.h" +#include "TriggeringMessage.h" +#include "Criticality.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RICrequestID; +struct CriticalityDiagnostics_IE_List; + +/* CriticalityDiagnostics */ +typedef struct CriticalityDiagnostics { + ProcedureCode_t *procedureCode; /* OPTIONAL */ + TriggeringMessage_t *triggeringMessage; /* OPTIONAL */ + Criticality_t *procedureCriticality; /* OPTIONAL */ + struct RICrequestID *ricRequestorID; /* OPTIONAL */ + struct CriticalityDiagnostics_IE_List *iEsCriticalityDiagnostics; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CriticalityDiagnostics_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics; +extern asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_specs_1; +extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CriticalityDiagnostics_H_ */ +#include diff --git a/Bouncer/e2ap/headers/E2AP-PDU.h b/Bouncer/e2ap/headers/E2AP-PDU.h new file mode 100644 index 0000000..1cf3fc7 --- /dev/null +++ b/Bouncer/e2ap/headers/E2AP-PDU.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2AP_PDU_H_ +#define _E2AP_PDU_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2AP_PDU_PR { + E2AP_PDU_PR_NOTHING, /* No components present */ + E2AP_PDU_PR_initiatingMessage, + E2AP_PDU_PR_successfulOutcome, + E2AP_PDU_PR_unsuccessfulOutcome + /* Extensions may appear below */ + +} E2AP_PDU_PR; + +/* Forward declarations */ +struct InitiatingMessage; +struct SuccessfulOutcome; +struct UnsuccessfulOutcome; + +/* E2AP-PDU */ +typedef struct E2AP_PDU { + E2AP_PDU_PR present; + union E2AP_PDU_u { + struct InitiatingMessage *initiatingMessage; + struct SuccessfulOutcome *successfulOutcome; + struct UnsuccessfulOutcome *unsuccessfulOutcome; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2AP_PDU_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2AP_PDU; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2AP_PDU_H_ */ +#include diff --git a/Bouncer/e2ap/headers/E2setupFailure.h b/Bouncer/e2ap/headers/E2setupFailure.h new file mode 100644 index 0000000..9bfcf0b --- /dev/null +++ b/Bouncer/e2ap/headers/E2setupFailure.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2setupFailure_H_ +#define _E2setupFailure_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2setupFailure */ +typedef struct E2setupFailure { + ProtocolIE_Container_87P13_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2setupFailure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2setupFailure; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2setupFailure_H_ */ +#include diff --git a/Bouncer/e2ap/headers/E2setupRequest.h b/Bouncer/e2ap/headers/E2setupRequest.h new file mode 100644 index 0000000..c70a6a5 --- /dev/null +++ b/Bouncer/e2ap/headers/E2setupRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2setupRequest_H_ +#define _E2setupRequest_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2setupRequest */ +typedef struct E2setupRequest { + ProtocolIE_Container_87P11_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2setupRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2setupRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2setupRequest_H_ */ +#include diff --git a/Bouncer/e2ap/headers/E2setupResponse.h b/Bouncer/e2ap/headers/E2setupResponse.h new file mode 100644 index 0000000..f8920af --- /dev/null +++ b/Bouncer/e2ap/headers/E2setupResponse.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2setupResponse_H_ +#define _E2setupResponse_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2setupResponse */ +typedef struct E2setupResponse { + ProtocolIE_Container_87P12_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2setupResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2setupResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2setupResponse_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ENB-ID-Choice.h b/Bouncer/e2ap/headers/ENB-ID-Choice.h new file mode 100644 index 0000000..0ccc3ee --- /dev/null +++ b/Bouncer/e2ap/headers/ENB-ID-Choice.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENB_ID_Choice_H_ +#define _ENB_ID_Choice_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ENB_ID_Choice_PR { + ENB_ID_Choice_PR_NOTHING, /* No components present */ + ENB_ID_Choice_PR_enb_ID_macro, + ENB_ID_Choice_PR_enb_ID_shortmacro, + ENB_ID_Choice_PR_enb_ID_longmacro + /* Extensions may appear below */ + +} ENB_ID_Choice_PR; + +/* ENB-ID-Choice */ +typedef struct ENB_ID_Choice { + ENB_ID_Choice_PR present; + union ENB_ID_Choice_u { + BIT_STRING_t enb_ID_macro; + BIT_STRING_t enb_ID_shortmacro; + BIT_STRING_t enb_ID_longmacro; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ENB_ID_Choice_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice; +extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1; +extern asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[3]; +extern asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_ID_Choice_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ENB-ID.h b/Bouncer/e2ap/headers/ENB-ID.h new file mode 100644 index 0000000..500a7d2 --- /dev/null +++ b/Bouncer/e2ap/headers/ENB-ID.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENB_ID_H_ +#define _ENB_ID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ENB_ID_PR { + ENB_ID_PR_NOTHING, /* No components present */ + ENB_ID_PR_macro_eNB_ID, + ENB_ID_PR_home_eNB_ID, + /* Extensions may appear below */ + ENB_ID_PR_short_Macro_eNB_ID, + ENB_ID_PR_long_Macro_eNB_ID +} ENB_ID_PR; + +/* ENB-ID */ +typedef struct ENB_ID { + ENB_ID_PR present; + union ENB_ID_u { + BIT_STRING_t macro_eNB_ID; + BIT_STRING_t home_eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + BIT_STRING_t short_Macro_eNB_ID; + BIT_STRING_t long_Macro_eNB_ID; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ENB_ID; +extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_ENB_ID_1[4]; +extern asn_per_constraints_t asn_PER_type_ENB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ENGNB-ID.h b/Bouncer/e2ap/headers/ENGNB-ID.h new file mode 100644 index 0000000..58a8c7c --- /dev/null +++ b/Bouncer/e2ap/headers/ENGNB-ID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENGNB_ID_H_ +#define _ENGNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ENGNB_ID_PR { + ENGNB_ID_PR_NOTHING, /* No components present */ + ENGNB_ID_PR_gNB_ID + /* Extensions may appear below */ + +} ENGNB_ID_PR; + +/* ENGNB-ID */ +typedef struct ENGNB_ID { + ENGNB_ID_PR present; + union ENGNB_ID_u { + BIT_STRING_t gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ENGNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ENGNB_ID; +extern asn_CHOICE_specifics_t asn_SPC_ENGNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_ENGNB_ID_1[1]; +extern asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENGNB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ErrorIndication.h b/Bouncer/e2ap/headers/ErrorIndication.h new file mode 100644 index 0000000..88e402e --- /dev/null +++ b/Bouncer/e2ap/headers/ErrorIndication.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ErrorIndication_H_ +#define _ErrorIndication_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ErrorIndication */ +typedef struct ErrorIndication { + ProtocolIE_Container_87P10_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ErrorIndication_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ErrorIndication; + +#ifdef __cplusplus +} +#endif + +#endif /* _ErrorIndication_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GNB-CU-UP-ID.h b/Bouncer/e2ap/headers/GNB-CU-UP-ID.h new file mode 100644 index 0000000..d7df7d8 --- /dev/null +++ b/Bouncer/e2ap/headers/GNB-CU-UP-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_UP_ID_H_ +#define _GNB_CU_UP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-UP-ID */ +typedef INTEGER_t GNB_CU_UP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID; +asn_struct_free_f GNB_CU_UP_ID_free; +asn_struct_print_f GNB_CU_UP_ID_print; +asn_constr_check_f GNB_CU_UP_ID_constraint; +ber_type_decoder_f GNB_CU_UP_ID_decode_ber; +der_type_encoder_f GNB_CU_UP_ID_encode_der; +xer_type_decoder_f GNB_CU_UP_ID_decode_xer; +xer_type_encoder_f GNB_CU_UP_ID_encode_xer; +oer_type_decoder_f GNB_CU_UP_ID_decode_oer; +oer_type_encoder_f GNB_CU_UP_ID_encode_oer; +per_type_decoder_f GNB_CU_UP_ID_decode_uper; +per_type_encoder_f GNB_CU_UP_ID_encode_uper; +per_type_decoder_f GNB_CU_UP_ID_decode_aper; +per_type_encoder_f GNB_CU_UP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_UP_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GNB-DU-ID.h b/Bouncer/e2ap/headers/GNB-DU-ID.h new file mode 100644 index 0000000..b0889fe --- /dev/null +++ b/Bouncer/e2ap/headers/GNB-DU-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_DU_ID_H_ +#define _GNB_DU_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-DU-ID */ +typedef INTEGER_t GNB_DU_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID; +asn_struct_free_f GNB_DU_ID_free; +asn_struct_print_f GNB_DU_ID_print; +asn_constr_check_f GNB_DU_ID_constraint; +ber_type_decoder_f GNB_DU_ID_decode_ber; +der_type_encoder_f GNB_DU_ID_encode_der; +xer_type_decoder_f GNB_DU_ID_decode_xer; +xer_type_encoder_f GNB_DU_ID_encode_xer; +oer_type_decoder_f GNB_DU_ID_decode_oer; +oer_type_encoder_f GNB_DU_ID_encode_oer; +per_type_decoder_f GNB_DU_ID_decode_uper; +per_type_encoder_f GNB_DU_ID_encode_uper; +per_type_decoder_f GNB_DU_ID_decode_aper; +per_type_encoder_f GNB_DU_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_DU_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GNB-ID-Choice.h b/Bouncer/e2ap/headers/GNB-ID-Choice.h new file mode 100644 index 0000000..ec65f85 --- /dev/null +++ b/Bouncer/e2ap/headers/GNB-ID-Choice.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_ID_Choice_H_ +#define _GNB_ID_Choice_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GNB_ID_Choice_PR { + GNB_ID_Choice_PR_NOTHING, /* No components present */ + GNB_ID_Choice_PR_gnb_ID + /* Extensions may appear below */ + +} GNB_ID_Choice_PR; + +/* GNB-ID-Choice */ +typedef struct GNB_ID_Choice { + GNB_ID_Choice_PR present; + union GNB_ID_Choice_u { + BIT_STRING_t gnb_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GNB_ID_Choice_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice; +extern asn_CHOICE_specifics_t asn_SPC_GNB_ID_Choice_specs_1; +extern asn_TYPE_member_t asn_MBR_GNB_ID_Choice_1[1]; +extern asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_ID_Choice_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalE2node-ID.h b/Bouncer/e2ap/headers/GlobalE2node-ID.h new file mode 100644 index 0000000..843e1c2 --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalE2node-ID.h @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalE2node_ID_H_ +#define _GlobalE2node_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GlobalE2node_ID_PR { + GlobalE2node_ID_PR_NOTHING, /* No components present */ + GlobalE2node_ID_PR_gNB, + GlobalE2node_ID_PR_en_gNB, + GlobalE2node_ID_PR_ng_eNB, + GlobalE2node_ID_PR_eNB + /* Extensions may appear below */ + +} GlobalE2node_ID_PR; + +/* Forward declarations */ +struct GlobalE2node_gNB_ID; +struct GlobalE2node_en_gNB_ID; +struct GlobalE2node_ng_eNB_ID; +struct GlobalE2node_eNB_ID; + +/* GlobalE2node-ID */ +typedef struct GlobalE2node_ID { + GlobalE2node_ID_PR present; + union GlobalE2node_ID_u { + struct GlobalE2node_gNB_ID *gNB; + struct GlobalE2node_en_gNB_ID *en_gNB; + struct GlobalE2node_ng_eNB_ID *ng_eNB; + struct GlobalE2node_eNB_ID *eNB; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalE2node_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ID; +extern asn_CHOICE_specifics_t asn_SPC_GlobalE2node_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_ID_1[4]; +extern asn_per_constraints_t asn_PER_type_GlobalE2node_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalE2node_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalE2node-eNB-ID.h b/Bouncer/e2ap/headers/GlobalE2node-eNB-ID.h new file mode 100644 index 0000000..c92e774 --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalE2node-eNB-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalE2node_eNB_ID_H_ +#define _GlobalE2node_eNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalENB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalE2node-eNB-ID */ +typedef struct GlobalE2node_eNB_ID { + GlobalENB_ID_t global_eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalE2node_eNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_eNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_eNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalE2node_eNB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalE2node-en-gNB-ID.h b/Bouncer/e2ap/headers/GlobalE2node-en-gNB-ID.h new file mode 100644 index 0000000..b13588a --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalE2node-en-gNB-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalE2node_en_gNB_ID_H_ +#define _GlobalE2node_en_gNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalenGNB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalE2node-en-gNB-ID */ +typedef struct GlobalE2node_en_gNB_ID { + GlobalenGNB_ID_t global_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalE2node_en_gNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_en_gNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_en_gNB_ID_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalE2node_en_gNB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalE2node-gNB-ID.h b/Bouncer/e2ap/headers/GlobalE2node-gNB-ID.h new file mode 100644 index 0000000..a2121b9 --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalE2node-gNB-ID.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalE2node_gNB_ID_H_ +#define _GlobalE2node_gNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalgNB-ID.h" +#include "GNB-CU-UP-ID.h" +#include "GNB-DU-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalE2node-gNB-ID */ +typedef struct GlobalE2node_gNB_ID { + GlobalgNB_ID_t global_gNB_ID; + GNB_CU_UP_ID_t *gNB_CU_UP_ID; /* OPTIONAL */ + GNB_DU_ID_t *gNB_DU_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalE2node_gNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_gNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_gNB_ID_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalE2node_gNB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalE2node-ng-eNB-ID.h b/Bouncer/e2ap/headers/GlobalE2node-ng-eNB-ID.h new file mode 100644 index 0000000..7a3e0f5 --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalE2node-ng-eNB-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalE2node_ng_eNB_ID_H_ +#define _GlobalE2node_ng_eNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalngeNB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalE2node-ng-eNB-ID */ +typedef struct GlobalE2node_ng_eNB_ID { + GlobalngeNB_ID_t global_ng_eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalE2node_ng_eNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_ng_eNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_ng_eNB_ID_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalE2node_ng_eNB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalENB-ID.h b/Bouncer/e2ap/headers/GlobalENB-ID.h new file mode 100644 index 0000000..2b6cf1c --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalENB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalENB_ID_H_ +#define _GlobalENB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include "ENB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalENB-ID */ +typedef struct GlobalENB_ID { + PLMN_Identity_t pLMN_Identity; + ENB_ID_t eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalENB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalRIC-ID.h b/Bouncer/e2ap/headers/GlobalRIC-ID.h new file mode 100644 index 0000000..ad389c3 --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalRIC-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalRIC_ID_H_ +#define _GlobalRIC_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalRIC-ID */ +typedef struct GlobalRIC_ID { + PLMN_Identity_t pLMN_Identity; + BIT_STRING_t ric_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalRIC_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalRIC_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalRIC_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalRIC_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalRIC_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalenGNB-ID.h b/Bouncer/e2ap/headers/GlobalenGNB-ID.h new file mode 100644 index 0000000..7df68b1 --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalenGNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalenGNB_ID_H_ +#define _GlobalenGNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include "ENGNB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalenGNB-ID */ +typedef struct GlobalenGNB_ID { + PLMN_Identity_t pLMN_Identity; + ENGNB_ID_t gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalenGNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalenGNB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalgNB-ID.h b/Bouncer/e2ap/headers/GlobalgNB-ID.h new file mode 100644 index 0000000..242edf2 --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalgNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalgNB_ID_H_ +#define _GlobalgNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include "GNB-ID-Choice.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalgNB-ID */ +typedef struct GlobalgNB_ID { + PLMN_Identity_t plmn_id; + GNB_ID_Choice_t gnb_id; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalgNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalgNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalgNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalgNB_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/GlobalngeNB-ID.h b/Bouncer/e2ap/headers/GlobalngeNB-ID.h new file mode 100644 index 0000000..8aba4cc --- /dev/null +++ b/Bouncer/e2ap/headers/GlobalngeNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalngeNB_ID_H_ +#define _GlobalngeNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include "ENB-ID-Choice.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalngeNB-ID */ +typedef struct GlobalngeNB_ID { + PLMN_Identity_t plmn_id; + ENB_ID_Choice_t enb_id; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalngeNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalngeNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalngeNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalngeNB_ID_H_ */ +#include diff --git a/Bouncer/asn1c_defs/INTEGER.h b/Bouncer/e2ap/headers/INTEGER.h similarity index 100% rename from Bouncer/asn1c_defs/INTEGER.h rename to Bouncer/e2ap/headers/INTEGER.h diff --git a/Bouncer/e2ap/headers/InitiatingMessage.h b/Bouncer/e2ap/headers/InitiatingMessage.h new file mode 100644 index 0000000..fd10bc7 --- /dev/null +++ b/Bouncer/e2ap/headers/InitiatingMessage.h @@ -0,0 +1,97 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InitiatingMessage_H_ +#define _InitiatingMessage_H_ + + +#include + +/* Including external dependencies */ +#include "ProcedureCode.h" +#include "Criticality.h" +#include +#include +#include "RICsubscriptionRequest.h" +#include "RICsubscriptionResponse.h" +#include "RICsubscriptionFailure.h" +#include "RICsubscriptionDeleteRequest.h" +#include "RICsubscriptionDeleteResponse.h" +#include "RICsubscriptionDeleteFailure.h" +#include "RICserviceUpdate.h" +#include "RICserviceUpdateAcknowledge.h" +#include "RICserviceUpdateFailure.h" +#include "RICcontrolRequest.h" +#include "RICcontrolAcknowledge.h" +#include "RICcontrolFailure.h" +#include "E2setupRequest.h" +#include "E2setupResponse.h" +#include "E2setupFailure.h" +#include "ResetRequest.h" +#include "ResetResponse.h" +#include "RICindication.h" +#include "RICserviceQuery.h" +#include "ErrorIndication.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum InitiatingMessage__value_PR { + InitiatingMessage__value_PR_NOTHING, /* No components present */ + InitiatingMessage__value_PR_RICsubscriptionRequest, + InitiatingMessage__value_PR_RICsubscriptionDeleteRequest, + InitiatingMessage__value_PR_RICserviceUpdate, + InitiatingMessage__value_PR_RICcontrolRequest, + InitiatingMessage__value_PR_E2setupRequest, + InitiatingMessage__value_PR_ResetRequest, + InitiatingMessage__value_PR_RICindication, + InitiatingMessage__value_PR_RICserviceQuery, + InitiatingMessage__value_PR_ErrorIndication +} InitiatingMessage__value_PR; + +/* InitiatingMessage */ +typedef struct InitiatingMessage { + ProcedureCode_t procedureCode; + Criticality_t criticality; + struct InitiatingMessage__value { + InitiatingMessage__value_PR present; + union InitiatingMessage__value_u { + RICsubscriptionRequest_t RICsubscriptionRequest; + RICsubscriptionDeleteRequest_t RICsubscriptionDeleteRequest; + RICserviceUpdate_t RICserviceUpdate; + RICcontrolRequest_t RICcontrolRequest; + E2setupRequest_t E2setupRequest; + ResetRequest_t ResetRequest; + RICindication_t RICindication; + RICserviceQuery_t RICserviceQuery; + ErrorIndication_t ErrorIndication; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InitiatingMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InitiatingMessage; +extern asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1; +extern asn_TYPE_member_t asn_MBR_InitiatingMessage_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InitiatingMessage_H_ */ +#include diff --git a/Bouncer/asn1c_defs/NativeEnumerated.h b/Bouncer/e2ap/headers/NativeEnumerated.h similarity index 100% rename from Bouncer/asn1c_defs/NativeEnumerated.h rename to Bouncer/e2ap/headers/NativeEnumerated.h diff --git a/Bouncer/asn1c_defs/NativeInteger.h b/Bouncer/e2ap/headers/NativeInteger.h similarity index 100% rename from Bouncer/asn1c_defs/NativeInteger.h rename to Bouncer/e2ap/headers/NativeInteger.h diff --git a/Bouncer/asn1c_defs/OCTET_STRING.h b/Bouncer/e2ap/headers/OCTET_STRING.h similarity index 100% rename from Bouncer/asn1c_defs/OCTET_STRING.h rename to Bouncer/e2ap/headers/OCTET_STRING.h diff --git a/Bouncer/asn1c_defs/OPEN_TYPE.h b/Bouncer/e2ap/headers/OPEN_TYPE.h similarity index 100% rename from Bouncer/asn1c_defs/OPEN_TYPE.h rename to Bouncer/e2ap/headers/OPEN_TYPE.h diff --git a/Bouncer/e2ap/headers/PLMN-Identity.h b/Bouncer/e2ap/headers/PLMN-Identity.h new file mode 100644 index 0000000..2fb1a85 --- /dev/null +++ b/Bouncer/e2ap/headers/PLMN-Identity.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PLMN_Identity_H_ +#define _PLMN_Identity_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PLMN-Identity */ +typedef OCTET_STRING_t PLMN_Identity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_PLMN_Identity; +asn_struct_free_f PLMN_Identity_free; +asn_struct_print_f PLMN_Identity_print; +asn_constr_check_f PLMN_Identity_constraint; +ber_type_decoder_f PLMN_Identity_decode_ber; +der_type_encoder_f PLMN_Identity_encode_der; +xer_type_decoder_f PLMN_Identity_decode_xer; +xer_type_encoder_f PLMN_Identity_encode_xer; +oer_type_decoder_f PLMN_Identity_decode_oer; +oer_type_encoder_f PLMN_Identity_encode_oer; +per_type_decoder_f PLMN_Identity_decode_uper; +per_type_encoder_f PLMN_Identity_encode_uper; +per_type_decoder_f PLMN_Identity_decode_aper; +per_type_encoder_f PLMN_Identity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _PLMN_Identity_H_ */ +#include diff --git a/Bouncer/e2ap/headers/Presence.h b/Bouncer/e2ap/headers/Presence.h new file mode 100644 index 0000000..06713ac --- /dev/null +++ b/Bouncer/e2ap/headers/Presence.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _Presence_H_ +#define _Presence_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Presence { + Presence_optional = 0, + Presence_conditional = 1, + Presence_mandatory = 2 +} e_Presence; + +/* Presence */ +typedef long Presence_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Presence_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Presence; +extern const asn_INTEGER_specifics_t asn_SPC_Presence_specs_1; +asn_struct_free_f Presence_free; +asn_struct_print_f Presence_print; +asn_constr_check_f Presence_constraint; +ber_type_decoder_f Presence_decode_ber; +der_type_encoder_f Presence_encode_der; +xer_type_decoder_f Presence_decode_xer; +xer_type_encoder_f Presence_encode_xer; +oer_type_decoder_f Presence_decode_oer; +oer_type_encoder_f Presence_encode_oer; +per_type_decoder_f Presence_decode_uper; +per_type_encoder_f Presence_encode_uper; +per_type_decoder_f Presence_decode_aper; +per_type_encoder_f Presence_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Presence_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProcedureCode.h b/Bouncer/e2ap/headers/ProcedureCode.h new file mode 100644 index 0000000..2b76e8b --- /dev/null +++ b/Bouncer/e2ap/headers/ProcedureCode.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProcedureCode_H_ +#define _ProcedureCode_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ProcedureCode */ +typedef long ProcedureCode_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_ProcedureCode_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ProcedureCode; +asn_struct_free_f ProcedureCode_free; +asn_struct_print_f ProcedureCode_print; +asn_constr_check_f ProcedureCode_constraint; +ber_type_decoder_f ProcedureCode_decode_ber; +der_type_encoder_f ProcedureCode_encode_der; +xer_type_decoder_f ProcedureCode_decode_xer; +xer_type_encoder_f ProcedureCode_encode_xer; +oer_type_decoder_f ProcedureCode_decode_oer; +oer_type_encoder_f ProcedureCode_encode_oer; +per_type_decoder_f ProcedureCode_decode_uper; +per_type_encoder_f ProcedureCode_encode_uper; +per_type_decoder_f ProcedureCode_decode_aper; +per_type_encoder_f ProcedureCode_encode_aper; +#define ProcedureCode_id_E2setup ((ProcedureCode_t)1) +#define ProcedureCode_id_ErrorIndication ((ProcedureCode_t)2) +#define ProcedureCode_id_Reset ((ProcedureCode_t)3) +#define ProcedureCode_id_RICcontrol ((ProcedureCode_t)4) +#define ProcedureCode_id_RICindication ((ProcedureCode_t)5) +#define ProcedureCode_id_RICserviceQuery ((ProcedureCode_t)6) +#define ProcedureCode_id_RICserviceUpdate ((ProcedureCode_t)7) +#define ProcedureCode_id_RICsubscription ((ProcedureCode_t)8) +#define ProcedureCode_id_RICsubscriptionDelete ((ProcedureCode_t)9) + +#ifdef __cplusplus +} +#endif + +#endif /* _ProcedureCode_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-Container.h b/Bouncer/e2ap/headers/ProtocolIE-Container.h new file mode 100644 index 0000000..361db9c --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-Container.h @@ -0,0 +1,253 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_Container_H_ +#define _ProtocolIE_Container_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RICsubscriptionRequest_IEs; +struct RICsubscriptionResponse_IEs; +struct RICsubscriptionFailure_IEs; +struct RICsubscriptionDeleteRequest_IEs; +struct RICsubscriptionDeleteResponse_IEs; +struct RICsubscriptionDeleteFailure_IEs; +struct RICindication_IEs; +struct RICcontrolRequest_IEs; +struct RICcontrolAcknowledge_IEs; +struct RICcontrolFailure_IEs; +struct ErrorIndication_IEs; +struct E2setupRequestIEs; +struct E2setupResponseIEs; +struct E2setupFailureIEs; +struct ResetRequestIEs; +struct ResetResponseIEs; +struct RICserviceUpdate_IEs; +struct RICserviceUpdateAcknowledge_IEs; +struct RICserviceUpdateFailure_IEs; +struct RICserviceQuery_IEs; + +/* ProtocolIE-Container */ +typedef struct ProtocolIE_Container_87P0 { + A_SEQUENCE_OF(struct RICsubscriptionRequest_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P0_t; +typedef struct ProtocolIE_Container_87P1 { + A_SEQUENCE_OF(struct RICsubscriptionResponse_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P1_t; +typedef struct ProtocolIE_Container_87P2 { + A_SEQUENCE_OF(struct RICsubscriptionFailure_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P2_t; +typedef struct ProtocolIE_Container_87P3 { + A_SEQUENCE_OF(struct RICsubscriptionDeleteRequest_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P3_t; +typedef struct ProtocolIE_Container_87P4 { + A_SEQUENCE_OF(struct RICsubscriptionDeleteResponse_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P4_t; +typedef struct ProtocolIE_Container_87P5 { + A_SEQUENCE_OF(struct RICsubscriptionDeleteFailure_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P5_t; +typedef struct ProtocolIE_Container_87P6 { + A_SEQUENCE_OF(struct RICindication_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P6_t; +typedef struct ProtocolIE_Container_87P7 { + A_SEQUENCE_OF(struct RICcontrolRequest_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P7_t; +typedef struct ProtocolIE_Container_87P8 { + A_SEQUENCE_OF(struct RICcontrolAcknowledge_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P8_t; +typedef struct ProtocolIE_Container_87P9 { + A_SEQUENCE_OF(struct RICcontrolFailure_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P9_t; +typedef struct ProtocolIE_Container_87P10 { + A_SEQUENCE_OF(struct ErrorIndication_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P10_t; +typedef struct ProtocolIE_Container_87P11 { + A_SEQUENCE_OF(struct E2setupRequestIEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P11_t; +typedef struct ProtocolIE_Container_87P12 { + A_SEQUENCE_OF(struct E2setupResponseIEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P12_t; +typedef struct ProtocolIE_Container_87P13 { + A_SEQUENCE_OF(struct E2setupFailureIEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P13_t; +typedef struct ProtocolIE_Container_87P14 { + A_SEQUENCE_OF(struct ResetRequestIEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P14_t; +typedef struct ProtocolIE_Container_87P15 { + A_SEQUENCE_OF(struct ResetResponseIEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P15_t; +typedef struct ProtocolIE_Container_87P16 { + A_SEQUENCE_OF(struct RICserviceUpdate_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P16_t; +typedef struct ProtocolIE_Container_87P17 { + A_SEQUENCE_OF(struct RICserviceUpdateAcknowledge_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P17_t; +typedef struct ProtocolIE_Container_87P18 { + A_SEQUENCE_OF(struct RICserviceUpdateFailure_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P18_t; +typedef struct ProtocolIE_Container_87P19 { + A_SEQUENCE_OF(struct RICserviceQuery_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_87P19_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P0; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P0_specs_1; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P0_1[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P1; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P1_specs_3; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P1_3[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P1_constr_3; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P2; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P2_specs_5; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P2_5[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P2_constr_5; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P3; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P3_specs_7; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P3_7[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P3_constr_7; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P4; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P4_specs_9; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P4_9[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P4_constr_9; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P5; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P5_specs_11; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P5_11[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P5_constr_11; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P6; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P6_specs_13; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P6_13[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P6_constr_13; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P7; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P7_specs_15; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P7_15[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P7_constr_15; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P8; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P8_specs_17; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P8_17[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P8_constr_17; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P9; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P9_specs_19; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P9_19[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P9_constr_19; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P10; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P10_specs_21; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P10_21[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P10_constr_21; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P11; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P11_specs_23; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P11_23[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P11_constr_23; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P12; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P12_specs_25; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P12_25[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P12_constr_25; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P13; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P13_specs_27; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P13_27[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P13_constr_27; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P14; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P14_specs_29; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P14_29[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P14_constr_29; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P15; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P15_specs_31; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P15_31[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P15_constr_31; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P16; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P16_specs_33; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P16_33[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P16_constr_33; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P17; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P17_specs_35; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P17_35[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P17_constr_35; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P18; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P18_specs_37; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P18_37[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P18_constr_37; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P19; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P19_specs_39; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P19_39[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P19_constr_39; + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_Container_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-ContainerList.h b/Bouncer/e2ap/headers/ProtocolIE-ContainerList.h new file mode 100644 index 0000000..44b1d2a --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-ContainerList.h @@ -0,0 +1,23 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_ContainerList_H_ +#define _ProtocolIE_ContainerList_H_ + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_ContainerList_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-ContainerPair.h b/Bouncer/e2ap/headers/ProtocolIE-ContainerPair.h new file mode 100644 index 0000000..cac7e26 --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-ContainerPair.h @@ -0,0 +1,23 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_ContainerPair_H_ +#define _ProtocolIE_ContainerPair_H_ + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_ContainerPair_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-ContainerPairList.h b/Bouncer/e2ap/headers/ProtocolIE-ContainerPairList.h new file mode 100644 index 0000000..9d6a2d3 --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-ContainerPairList.h @@ -0,0 +1,23 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_ContainerPairList_H_ +#define _ProtocolIE_ContainerPairList_H_ + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_ContainerPairList_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-Field.h b/Bouncer/e2ap/headers/ProtocolIE-Field.h new file mode 100644 index 0000000..8bbef66 --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-Field.h @@ -0,0 +1,757 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_Field_H_ +#define _ProtocolIE_Field_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-ID.h" +#include "Criticality.h" +#include +#include +#include "RICaction-ToBeSetup-Item.h" +#include "Presence.h" +#include +#include +#include +#include "RICaction-Admitted-Item.h" +#include "RICaction-NotAdmitted-Item.h" +#include "RANfunction-Item.h" +#include "RANfunctionID-Item.h" +#include "RANfunctionIDcause-Item.h" +#include "RICrequestID.h" +#include "RANfunctionID.h" +#include "RICsubscriptionDetails.h" +#include "RICaction-Admitted-List.h" +#include "RICaction-NotAdmitted-List.h" +#include "CriticalityDiagnostics.h" +#include "Cause.h" +#include "RICactionID.h" +#include "RICindicationSN.h" +#include "RICindicationType.h" +#include "RICindicationHeader.h" +#include "RICindicationMessage.h" +#include "RICcallProcessID.h" +#include "RICcontrolHeader.h" +#include "RICcontrolMessage.h" +#include "RICcontrolAckRequest.h" +#include "RICcontrolStatus.h" +#include "RICcontrolOutcome.h" +#include "GlobalE2node-ID.h" +#include "RANfunctions-List.h" +#include "GlobalRIC-ID.h" +#include "RANfunctionsID-List.h" +#include "RANfunctionsIDcause-List.h" +#include "TimeToWait.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RICaction_ToBeSetup_ItemIEs__value_PR { + RICaction_ToBeSetup_ItemIEs__value_PR_NOTHING, /* No components present */ + RICaction_ToBeSetup_ItemIEs__value_PR_RICaction_ToBeSetup_Item +} RICaction_ToBeSetup_ItemIEs__value_PR; +typedef enum RICaction_Admitted_ItemIEs__value_PR { + RICaction_Admitted_ItemIEs__value_PR_NOTHING, /* No components present */ + RICaction_Admitted_ItemIEs__value_PR_RICaction_Admitted_Item +} RICaction_Admitted_ItemIEs__value_PR; +typedef enum RICaction_NotAdmitted_ItemIEs__value_PR { + RICaction_NotAdmitted_ItemIEs__value_PR_NOTHING, /* No components present */ + RICaction_NotAdmitted_ItemIEs__value_PR_RICaction_NotAdmitted_Item +} RICaction_NotAdmitted_ItemIEs__value_PR; +typedef enum RANfunction_ItemIEs__value_PR { + RANfunction_ItemIEs__value_PR_NOTHING, /* No components present */ + RANfunction_ItemIEs__value_PR_RANfunction_Item +} RANfunction_ItemIEs__value_PR; +typedef enum RANfunctionID_ItemIEs__value_PR { + RANfunctionID_ItemIEs__value_PR_NOTHING, /* No components present */ + RANfunctionID_ItemIEs__value_PR_RANfunctionID_Item +} RANfunctionID_ItemIEs__value_PR; +typedef enum RANfunctionIDcause_ItemIEs__value_PR { + RANfunctionIDcause_ItemIEs__value_PR_NOTHING, /* No components present */ + RANfunctionIDcause_ItemIEs__value_PR_RANfunctionIDcause_Item +} RANfunctionIDcause_ItemIEs__value_PR; +typedef enum RICsubscriptionRequest_IEs__value_PR { + RICsubscriptionRequest_IEs__value_PR_NOTHING, /* No components present */ + RICsubscriptionRequest_IEs__value_PR_RICrequestID, + RICsubscriptionRequest_IEs__value_PR_RANfunctionID, + RICsubscriptionRequest_IEs__value_PR_RICsubscriptionDetails +} RICsubscriptionRequest_IEs__value_PR; +typedef enum RICsubscriptionResponse_IEs__value_PR { + RICsubscriptionResponse_IEs__value_PR_NOTHING, /* No components present */ + RICsubscriptionResponse_IEs__value_PR_RICrequestID, + RICsubscriptionResponse_IEs__value_PR_RANfunctionID, + RICsubscriptionResponse_IEs__value_PR_RICaction_Admitted_List, + RICsubscriptionResponse_IEs__value_PR_RICaction_NotAdmitted_List +} RICsubscriptionResponse_IEs__value_PR; +typedef enum RICsubscriptionFailure_IEs__value_PR { + RICsubscriptionFailure_IEs__value_PR_NOTHING, /* No components present */ + RICsubscriptionFailure_IEs__value_PR_RICrequestID, + RICsubscriptionFailure_IEs__value_PR_RANfunctionID, + RICsubscriptionFailure_IEs__value_PR_RICaction_NotAdmitted_List, + RICsubscriptionFailure_IEs__value_PR_CriticalityDiagnostics +} RICsubscriptionFailure_IEs__value_PR; +typedef enum RICsubscriptionDeleteRequest_IEs__value_PR { + RICsubscriptionDeleteRequest_IEs__value_PR_NOTHING, /* No components present */ + RICsubscriptionDeleteRequest_IEs__value_PR_RICrequestID, + RICsubscriptionDeleteRequest_IEs__value_PR_RANfunctionID +} RICsubscriptionDeleteRequest_IEs__value_PR; +typedef enum RICsubscriptionDeleteResponse_IEs__value_PR { + RICsubscriptionDeleteResponse_IEs__value_PR_NOTHING, /* No components present */ + RICsubscriptionDeleteResponse_IEs__value_PR_RICrequestID, + RICsubscriptionDeleteResponse_IEs__value_PR_RANfunctionID +} RICsubscriptionDeleteResponse_IEs__value_PR; +typedef enum RICsubscriptionDeleteFailure_IEs__value_PR { + RICsubscriptionDeleteFailure_IEs__value_PR_NOTHING, /* No components present */ + RICsubscriptionDeleteFailure_IEs__value_PR_RICrequestID, + RICsubscriptionDeleteFailure_IEs__value_PR_RANfunctionID, + RICsubscriptionDeleteFailure_IEs__value_PR_Cause, + RICsubscriptionDeleteFailure_IEs__value_PR_CriticalityDiagnostics +} RICsubscriptionDeleteFailure_IEs__value_PR; +typedef enum RICindication_IEs__value_PR { + RICindication_IEs__value_PR_NOTHING, /* No components present */ + RICindication_IEs__value_PR_RICrequestID, + RICindication_IEs__value_PR_RANfunctionID, + RICindication_IEs__value_PR_RICactionID, + RICindication_IEs__value_PR_RICindicationSN, + RICindication_IEs__value_PR_RICindicationType, + RICindication_IEs__value_PR_RICindicationHeader, + RICindication_IEs__value_PR_RICindicationMessage, + RICindication_IEs__value_PR_RICcallProcessID +} RICindication_IEs__value_PR; +typedef enum RICcontrolRequest_IEs__value_PR { + RICcontrolRequest_IEs__value_PR_NOTHING, /* No components present */ + RICcontrolRequest_IEs__value_PR_RICrequestID, + RICcontrolRequest_IEs__value_PR_RANfunctionID, + RICcontrolRequest_IEs__value_PR_RICcallProcessID, + RICcontrolRequest_IEs__value_PR_RICcontrolHeader, + RICcontrolRequest_IEs__value_PR_RICcontrolMessage, + RICcontrolRequest_IEs__value_PR_RICcontrolAckRequest +} RICcontrolRequest_IEs__value_PR; +typedef enum RICcontrolAcknowledge_IEs__value_PR { + RICcontrolAcknowledge_IEs__value_PR_NOTHING, /* No components present */ + RICcontrolAcknowledge_IEs__value_PR_RICrequestID, + RICcontrolAcknowledge_IEs__value_PR_RANfunctionID, + RICcontrolAcknowledge_IEs__value_PR_RICcallProcessID, + RICcontrolAcknowledge_IEs__value_PR_RICcontrolStatus, + RICcontrolAcknowledge_IEs__value_PR_RICcontrolOutcome +} RICcontrolAcknowledge_IEs__value_PR; +typedef enum RICcontrolFailure_IEs__value_PR { + RICcontrolFailure_IEs__value_PR_NOTHING, /* No components present */ + RICcontrolFailure_IEs__value_PR_RICrequestID, + RICcontrolFailure_IEs__value_PR_RANfunctionID, + RICcontrolFailure_IEs__value_PR_RICcallProcessID, + RICcontrolFailure_IEs__value_PR_Cause, + RICcontrolFailure_IEs__value_PR_RICcontrolOutcome +} RICcontrolFailure_IEs__value_PR; +typedef enum ErrorIndication_IEs__value_PR { + ErrorIndication_IEs__value_PR_NOTHING, /* No components present */ + ErrorIndication_IEs__value_PR_RICrequestID, + ErrorIndication_IEs__value_PR_RANfunctionID, + ErrorIndication_IEs__value_PR_Cause, + ErrorIndication_IEs__value_PR_CriticalityDiagnostics +} ErrorIndication_IEs__value_PR; +typedef enum E2setupRequestIEs__value_PR { + E2setupRequestIEs__value_PR_NOTHING, /* No components present */ + E2setupRequestIEs__value_PR_GlobalE2node_ID, + E2setupRequestIEs__value_PR_RANfunctions_List +} E2setupRequestIEs__value_PR; +typedef enum E2setupResponseIEs__value_PR { + E2setupResponseIEs__value_PR_NOTHING, /* No components present */ + E2setupResponseIEs__value_PR_GlobalRIC_ID, + E2setupResponseIEs__value_PR_RANfunctionsID_List, + E2setupResponseIEs__value_PR_RANfunctionsIDcause_List +} E2setupResponseIEs__value_PR; +typedef enum E2setupFailureIEs__value_PR { + E2setupFailureIEs__value_PR_NOTHING, /* No components present */ + E2setupFailureIEs__value_PR_Cause, + E2setupFailureIEs__value_PR_TimeToWait, + E2setupFailureIEs__value_PR_CriticalityDiagnostics +} E2setupFailureIEs__value_PR; +typedef enum ResetRequestIEs__value_PR { + ResetRequestIEs__value_PR_NOTHING, /* No components present */ + ResetRequestIEs__value_PR_Cause +} ResetRequestIEs__value_PR; +typedef enum ResetResponseIEs__value_PR { + ResetResponseIEs__value_PR_NOTHING, /* No components present */ + ResetResponseIEs__value_PR_CriticalityDiagnostics +} ResetResponseIEs__value_PR; +typedef enum RICserviceUpdate_IEs__value_PR { + RICserviceUpdate_IEs__value_PR_NOTHING, /* No components present */ + RICserviceUpdate_IEs__value_PR_RANfunctions_List, + RICserviceUpdate_IEs__value_PR_RANfunctionsID_List +} RICserviceUpdate_IEs__value_PR; +typedef enum RICserviceUpdateAcknowledge_IEs__value_PR { + RICserviceUpdateAcknowledge_IEs__value_PR_NOTHING, /* No components present */ + RICserviceUpdateAcknowledge_IEs__value_PR_RANfunctionsID_List, + RICserviceUpdateAcknowledge_IEs__value_PR_RANfunctionsIDcause_List +} RICserviceUpdateAcknowledge_IEs__value_PR; +typedef enum RICserviceUpdateFailure_IEs__value_PR { + RICserviceUpdateFailure_IEs__value_PR_NOTHING, /* No components present */ + RICserviceUpdateFailure_IEs__value_PR_RANfunctionsIDcause_List, + RICserviceUpdateFailure_IEs__value_PR_TimeToWait, + RICserviceUpdateFailure_IEs__value_PR_CriticalityDiagnostics +} RICserviceUpdateFailure_IEs__value_PR; +typedef enum RICserviceQuery_IEs__value_PR { + RICserviceQuery_IEs__value_PR_NOTHING, /* No components present */ + RICserviceQuery_IEs__value_PR_RANfunctionsID_List +} RICserviceQuery_IEs__value_PR; + +/* ProtocolIE-Field */ +typedef struct RICaction_ToBeSetup_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICaction_ToBeSetup_ItemIEs__value { + RICaction_ToBeSetup_ItemIEs__value_PR present; + union RICaction_ToBeSetup_ItemIEs__value_u { + RICaction_ToBeSetup_Item_t RICaction_ToBeSetup_Item; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_ToBeSetup_ItemIEs_t; +typedef struct RICaction_Admitted_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICaction_Admitted_ItemIEs__value { + RICaction_Admitted_ItemIEs__value_PR present; + union RICaction_Admitted_ItemIEs__value_u { + RICaction_Admitted_Item_t RICaction_Admitted_Item; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_Admitted_ItemIEs_t; +typedef struct RICaction_NotAdmitted_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICaction_NotAdmitted_ItemIEs__value { + RICaction_NotAdmitted_ItemIEs__value_PR present; + union RICaction_NotAdmitted_ItemIEs__value_u { + RICaction_NotAdmitted_Item_t RICaction_NotAdmitted_Item; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_NotAdmitted_ItemIEs_t; +typedef struct RANfunction_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RANfunction_ItemIEs__value { + RANfunction_ItemIEs__value_PR present; + union RANfunction_ItemIEs__value_u { + RANfunction_Item_t RANfunction_Item; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunction_ItemIEs_t; +typedef struct RANfunctionID_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RANfunctionID_ItemIEs__value { + RANfunctionID_ItemIEs__value_PR present; + union RANfunctionID_ItemIEs__value_u { + RANfunctionID_Item_t RANfunctionID_Item; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunctionID_ItemIEs_t; +typedef struct RANfunctionIDcause_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RANfunctionIDcause_ItemIEs__value { + RANfunctionIDcause_ItemIEs__value_PR present; + union RANfunctionIDcause_ItemIEs__value_u { + RANfunctionIDcause_Item_t RANfunctionIDcause_Item; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunctionIDcause_ItemIEs_t; +typedef struct RICsubscriptionRequest_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscriptionRequest_IEs__value { + RICsubscriptionRequest_IEs__value_PR present; + union RICsubscriptionRequest_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + RICsubscriptionDetails_t RICsubscriptionDetails; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionRequest_IEs_t; +typedef struct RICsubscriptionResponse_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscriptionResponse_IEs__value { + RICsubscriptionResponse_IEs__value_PR present; + union RICsubscriptionResponse_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + RICaction_Admitted_List_t RICaction_Admitted_List; + RICaction_NotAdmitted_List_t RICaction_NotAdmitted_List; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionResponse_IEs_t; +typedef struct RICsubscriptionFailure_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscriptionFailure_IEs__value { + RICsubscriptionFailure_IEs__value_PR present; + union RICsubscriptionFailure_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + RICaction_NotAdmitted_List_t RICaction_NotAdmitted_List; + CriticalityDiagnostics_t CriticalityDiagnostics; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionFailure_IEs_t; +typedef struct RICsubscriptionDeleteRequest_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscriptionDeleteRequest_IEs__value { + RICsubscriptionDeleteRequest_IEs__value_PR present; + union RICsubscriptionDeleteRequest_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDeleteRequest_IEs_t; +typedef struct RICsubscriptionDeleteResponse_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscriptionDeleteResponse_IEs__value { + RICsubscriptionDeleteResponse_IEs__value_PR present; + union RICsubscriptionDeleteResponse_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDeleteResponse_IEs_t; +typedef struct RICsubscriptionDeleteFailure_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscriptionDeleteFailure_IEs__value { + RICsubscriptionDeleteFailure_IEs__value_PR present; + union RICsubscriptionDeleteFailure_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + Cause_t Cause; + CriticalityDiagnostics_t CriticalityDiagnostics; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDeleteFailure_IEs_t; +typedef struct RICindication_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICindication_IEs__value { + RICindication_IEs__value_PR present; + union RICindication_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + RICactionID_t RICactionID; + RICindicationSN_t RICindicationSN; + RICindicationType_t RICindicationType; + RICindicationHeader_t RICindicationHeader; + RICindicationMessage_t RICindicationMessage; + RICcallProcessID_t RICcallProcessID; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICindication_IEs_t; +typedef struct RICcontrolRequest_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICcontrolRequest_IEs__value { + RICcontrolRequest_IEs__value_PR present; + union RICcontrolRequest_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + RICcallProcessID_t RICcallProcessID; + RICcontrolHeader_t RICcontrolHeader; + RICcontrolMessage_t RICcontrolMessage; + RICcontrolAckRequest_t RICcontrolAckRequest; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICcontrolRequest_IEs_t; +typedef struct RICcontrolAcknowledge_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICcontrolAcknowledge_IEs__value { + RICcontrolAcknowledge_IEs__value_PR present; + union RICcontrolAcknowledge_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + RICcallProcessID_t RICcallProcessID; + RICcontrolStatus_t RICcontrolStatus; + RICcontrolOutcome_t RICcontrolOutcome; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICcontrolAcknowledge_IEs_t; +typedef struct RICcontrolFailure_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICcontrolFailure_IEs__value { + RICcontrolFailure_IEs__value_PR present; + union RICcontrolFailure_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + RICcallProcessID_t RICcallProcessID; + Cause_t Cause; + RICcontrolOutcome_t RICcontrolOutcome; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICcontrolFailure_IEs_t; +typedef struct ErrorIndication_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct ErrorIndication_IEs__value { + ErrorIndication_IEs__value_PR present; + union ErrorIndication_IEs__value_u { + RICrequestID_t RICrequestID; + RANfunctionID_t RANfunctionID; + Cause_t Cause; + CriticalityDiagnostics_t CriticalityDiagnostics; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ErrorIndication_IEs_t; +typedef struct E2setupRequestIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2setupRequestIEs__value { + E2setupRequestIEs__value_PR present; + union E2setupRequestIEs__value_u { + GlobalE2node_ID_t GlobalE2node_ID; + RANfunctions_List_t RANfunctions_List; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2setupRequestIEs_t; +typedef struct E2setupResponseIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2setupResponseIEs__value { + E2setupResponseIEs__value_PR present; + union E2setupResponseIEs__value_u { + GlobalRIC_ID_t GlobalRIC_ID; + RANfunctionsID_List_t RANfunctionsID_List; + RANfunctionsIDcause_List_t RANfunctionsIDcause_List; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2setupResponseIEs_t; +typedef struct E2setupFailureIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2setupFailureIEs__value { + E2setupFailureIEs__value_PR present; + union E2setupFailureIEs__value_u { + Cause_t Cause; + TimeToWait_t TimeToWait; + CriticalityDiagnostics_t CriticalityDiagnostics; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2setupFailureIEs_t; +typedef struct ResetRequestIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct ResetRequestIEs__value { + ResetRequestIEs__value_PR present; + union ResetRequestIEs__value_u { + Cause_t Cause; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ResetRequestIEs_t; +typedef struct ResetResponseIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct ResetResponseIEs__value { + ResetResponseIEs__value_PR present; + union ResetResponseIEs__value_u { + CriticalityDiagnostics_t CriticalityDiagnostics; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ResetResponseIEs_t; +typedef struct RICserviceUpdate_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICserviceUpdate_IEs__value { + RICserviceUpdate_IEs__value_PR present; + union RICserviceUpdate_IEs__value_u { + RANfunctions_List_t RANfunctions_List; + RANfunctionsID_List_t RANfunctionsID_List; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceUpdate_IEs_t; +typedef struct RICserviceUpdateAcknowledge_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICserviceUpdateAcknowledge_IEs__value { + RICserviceUpdateAcknowledge_IEs__value_PR present; + union RICserviceUpdateAcknowledge_IEs__value_u { + RANfunctionsID_List_t RANfunctionsID_List; + RANfunctionsIDcause_List_t RANfunctionsIDcause_List; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceUpdateAcknowledge_IEs_t; +typedef struct RICserviceUpdateFailure_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICserviceUpdateFailure_IEs__value { + RICserviceUpdateFailure_IEs__value_PR present; + union RICserviceUpdateFailure_IEs__value_u { + RANfunctionsIDcause_List_t RANfunctionsIDcause_List; + TimeToWait_t TimeToWait; + CriticalityDiagnostics_t CriticalityDiagnostics; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceUpdateFailure_IEs_t; +typedef struct RICserviceQuery_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICserviceQuery_IEs__value { + RICserviceQuery_IEs__value_PR present; + union RICserviceQuery_IEs__value_u { + RANfunctionsID_List_t RANfunctionsID_List; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceQuery_IEs_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1; +extern asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_ItemIEs_1[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_ItemIEs_specs_5; +extern asn_TYPE_member_t asn_MBR_RICaction_Admitted_ItemIEs_5[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9; +extern asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_ItemIEs_9[3]; +extern asn_TYPE_descriptor_t asn_DEF_RANfunction_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunction_ItemIEs_specs_13; +extern asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_13[3]; +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionID_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_ItemIEs_specs_17; +extern asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_17[3]; +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_ItemIEs_specs_21; +extern asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_21[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_IEs_specs_25; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_25[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_IEs_specs_29; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_29[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_IEs_specs_33; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_33[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_37[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_41[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_45[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICindication_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICindication_IEs_specs_49; +extern asn_TYPE_member_t asn_MBR_RICindication_IEs_49[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_IEs_specs_53; +extern asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_53[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_IEs_specs_57; +extern asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_57[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_IEs_specs_61; +extern asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_61[3]; +extern asn_TYPE_descriptor_t asn_DEF_ErrorIndication_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_IEs_specs_65; +extern asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_65[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2setupRequestIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2setupRequestIEs_specs_69; +extern asn_TYPE_member_t asn_MBR_E2setupRequestIEs_69[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2setupResponseIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2setupResponseIEs_specs_73; +extern asn_TYPE_member_t asn_MBR_E2setupResponseIEs_73[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2setupFailureIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2setupFailureIEs_specs_77; +extern asn_TYPE_member_t asn_MBR_E2setupFailureIEs_77[3]; +extern asn_TYPE_descriptor_t asn_DEF_ResetRequestIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_ResetRequestIEs_specs_81; +extern asn_TYPE_member_t asn_MBR_ResetRequestIEs_81[3]; +extern asn_TYPE_descriptor_t asn_DEF_ResetResponseIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_ResetResponseIEs_specs_85; +extern asn_TYPE_member_t asn_MBR_ResetResponseIEs_85[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_IEs_specs_89; +extern asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_89[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93; +extern asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_93[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_IEs_specs_97; +extern asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_97[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICserviceQuery_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_IEs_specs_101; +extern asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_101[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_Field_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-FieldPair.h b/Bouncer/e2ap/headers/ProtocolIE-FieldPair.h new file mode 100644 index 0000000..17a19c7 --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-FieldPair.h @@ -0,0 +1,23 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_FieldPair_H_ +#define _ProtocolIE_FieldPair_H_ + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_FieldPair_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-ID.h b/Bouncer/e2ap/headers/ProtocolIE-ID.h new file mode 100644 index 0000000..dc75633 --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-ID.h @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_ID_H_ +#define _ProtocolIE_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ProtocolIE-ID */ +typedef long ProtocolIE_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_ProtocolIE_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_ID; +asn_struct_free_f ProtocolIE_ID_free; +asn_struct_print_f ProtocolIE_ID_print; +asn_constr_check_f ProtocolIE_ID_constraint; +ber_type_decoder_f ProtocolIE_ID_decode_ber; +der_type_encoder_f ProtocolIE_ID_encode_der; +xer_type_decoder_f ProtocolIE_ID_decode_xer; +xer_type_encoder_f ProtocolIE_ID_encode_xer; +oer_type_decoder_f ProtocolIE_ID_decode_oer; +oer_type_encoder_f ProtocolIE_ID_encode_oer; +per_type_decoder_f ProtocolIE_ID_decode_uper; +per_type_encoder_f ProtocolIE_ID_encode_uper; +per_type_decoder_f ProtocolIE_ID_decode_aper; +per_type_encoder_f ProtocolIE_ID_encode_aper; +#define ProtocolIE_ID_id_Cause ((ProtocolIE_ID_t)1) +#define ProtocolIE_ID_id_CriticalityDiagnostics ((ProtocolIE_ID_t)2) +#define ProtocolIE_ID_id_GlobalE2node_ID ((ProtocolIE_ID_t)3) +#define ProtocolIE_ID_id_GlobalRIC_ID ((ProtocolIE_ID_t)4) +#define ProtocolIE_ID_id_RANfunctionID ((ProtocolIE_ID_t)5) +#define ProtocolIE_ID_id_RANfunctionID_Item ((ProtocolIE_ID_t)6) +#define ProtocolIE_ID_id_RANfunctionIEcause_Item ((ProtocolIE_ID_t)7) +#define ProtocolIE_ID_id_RANfunction_Item ((ProtocolIE_ID_t)8) +#define ProtocolIE_ID_id_RANfunctionsAccepted ((ProtocolIE_ID_t)9) +#define ProtocolIE_ID_id_RANfunctionsAdded ((ProtocolIE_ID_t)10) +#define ProtocolIE_ID_id_RANfunctionsDeleted ((ProtocolIE_ID_t)11) +#define ProtocolIE_ID_id_RANfunctionsModified ((ProtocolIE_ID_t)12) +#define ProtocolIE_ID_id_RANfunctionsRejected ((ProtocolIE_ID_t)13) +#define ProtocolIE_ID_id_RICaction_Admitted_Item ((ProtocolIE_ID_t)14) +#define ProtocolIE_ID_id_RICactionID ((ProtocolIE_ID_t)15) +#define ProtocolIE_ID_id_RICaction_NotAdmitted_Item ((ProtocolIE_ID_t)16) +#define ProtocolIE_ID_id_RICactions_Admitted ((ProtocolIE_ID_t)17) +#define ProtocolIE_ID_id_RICactions_NotAdmitted ((ProtocolIE_ID_t)18) +#define ProtocolIE_ID_id_RICaction_ToBeSetup_Item ((ProtocolIE_ID_t)19) +#define ProtocolIE_ID_id_RICcallProcessID ((ProtocolIE_ID_t)20) +#define ProtocolIE_ID_id_RICcontrolAckRequest ((ProtocolIE_ID_t)21) +#define ProtocolIE_ID_id_RICcontrolHeader ((ProtocolIE_ID_t)22) +#define ProtocolIE_ID_id_RICcontrolMessage ((ProtocolIE_ID_t)23) +#define ProtocolIE_ID_id_RICcontrolStatus ((ProtocolIE_ID_t)24) +#define ProtocolIE_ID_id_RICindicationHeader ((ProtocolIE_ID_t)25) +#define ProtocolIE_ID_id_RICindicationMessage ((ProtocolIE_ID_t)26) +#define ProtocolIE_ID_id_RICindicationSN ((ProtocolIE_ID_t)27) +#define ProtocolIE_ID_id_RICindicationType ((ProtocolIE_ID_t)28) +#define ProtocolIE_ID_id_RICrequestID ((ProtocolIE_ID_t)29) +#define ProtocolIE_ID_id_RICsubscriptionDetails ((ProtocolIE_ID_t)30) +#define ProtocolIE_ID_id_TimeToWait ((ProtocolIE_ID_t)31) +#define ProtocolIE_ID_id_RICcontrolOutcome ((ProtocolIE_ID_t)32) + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_ID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ProtocolIE-SingleContainer.h b/Bouncer/e2ap/headers/ProtocolIE-SingleContainer.h new file mode 100644 index 0000000..eadd741 --- /dev/null +++ b/Bouncer/e2ap/headers/ProtocolIE-SingleContainer.h @@ -0,0 +1,120 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ProtocolIE_SingleContainer_H_ +#define _ProtocolIE_SingleContainer_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Field.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* ProtocolIE-SingleContainer */ +typedef RICaction_ToBeSetup_ItemIEs_t ProtocolIE_SingleContainer_90P0_t; +typedef RICaction_Admitted_ItemIEs_t ProtocolIE_SingleContainer_90P1_t; +typedef RICaction_NotAdmitted_ItemIEs_t ProtocolIE_SingleContainer_90P2_t; +typedef RANfunction_ItemIEs_t ProtocolIE_SingleContainer_90P3_t; +typedef RANfunctionID_ItemIEs_t ProtocolIE_SingleContainer_90P4_t; +typedef RANfunctionIDcause_ItemIEs_t ProtocolIE_SingleContainer_90P5_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P0; +asn_struct_free_f ProtocolIE_SingleContainer_90P0_free; +asn_struct_print_f ProtocolIE_SingleContainer_90P0_print; +asn_constr_check_f ProtocolIE_SingleContainer_90P0_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_90P0_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_90P0_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_90P0_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_90P0_encode_xer; +oer_type_decoder_f ProtocolIE_SingleContainer_90P0_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_90P0_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_90P0_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_90P0_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_90P0_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_90P0_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P1; +asn_struct_free_f ProtocolIE_SingleContainer_90P1_free; +asn_struct_print_f ProtocolIE_SingleContainer_90P1_print; +asn_constr_check_f ProtocolIE_SingleContainer_90P1_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_90P1_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_90P1_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_90P1_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_90P1_encode_xer; +oer_type_decoder_f ProtocolIE_SingleContainer_90P1_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_90P1_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_90P1_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_90P1_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_90P1_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_90P1_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P2; +asn_struct_free_f ProtocolIE_SingleContainer_90P2_free; +asn_struct_print_f ProtocolIE_SingleContainer_90P2_print; +asn_constr_check_f ProtocolIE_SingleContainer_90P2_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_90P2_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_90P2_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_90P2_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_90P2_encode_xer; +oer_type_decoder_f ProtocolIE_SingleContainer_90P2_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_90P2_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_90P2_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_90P2_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_90P2_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_90P2_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P3; +asn_struct_free_f ProtocolIE_SingleContainer_90P3_free; +asn_struct_print_f ProtocolIE_SingleContainer_90P3_print; +asn_constr_check_f ProtocolIE_SingleContainer_90P3_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_90P3_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_90P3_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_90P3_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_90P3_encode_xer; +oer_type_decoder_f ProtocolIE_SingleContainer_90P3_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_90P3_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_90P3_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_90P3_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_90P3_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_90P3_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P4; +asn_struct_free_f ProtocolIE_SingleContainer_90P4_free; +asn_struct_print_f ProtocolIE_SingleContainer_90P4_print; +asn_constr_check_f ProtocolIE_SingleContainer_90P4_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_90P4_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_90P4_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_90P4_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_90P4_encode_xer; +oer_type_decoder_f ProtocolIE_SingleContainer_90P4_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_90P4_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_90P4_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_90P4_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_90P4_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_90P4_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P5; +asn_struct_free_f ProtocolIE_SingleContainer_90P5_free; +asn_struct_print_f ProtocolIE_SingleContainer_90P5_print; +asn_constr_check_f ProtocolIE_SingleContainer_90P5_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_90P5_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_90P5_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_90P5_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_90P5_encode_xer; +oer_type_decoder_f ProtocolIE_SingleContainer_90P5_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_90P5_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_90P5_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_90P5_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_90P5_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_90P5_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _ProtocolIE_SingleContainer_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunction-Item.h b/Bouncer/e2ap/headers/RANfunction-Item.h new file mode 100644 index 0000000..38b5e97 --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunction-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunction_Item_H_ +#define _RANfunction_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANfunctionID.h" +#include "RANfunctionDefinition.h" +#include "RANfunctionRevision.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunction-Item */ +typedef struct RANfunction_Item { + RANfunctionID_t ranFunctionID; + RANfunctionDefinition_t ranFunctionDefinition; + RANfunctionRevision_t ranFunctionRevision; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunction_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunction_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunction_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunction_Item_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctionDefinition.h b/Bouncer/e2ap/headers/RANfunctionDefinition.h new file mode 100644 index 0000000..3676c45 --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctionDefinition.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctionDefinition_H_ +#define _RANfunctionDefinition_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunctionDefinition */ +typedef OCTET_STRING_t RANfunctionDefinition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionDefinition; +asn_struct_free_f RANfunctionDefinition_free; +asn_struct_print_f RANfunctionDefinition_print; +asn_constr_check_f RANfunctionDefinition_constraint; +ber_type_decoder_f RANfunctionDefinition_decode_ber; +der_type_encoder_f RANfunctionDefinition_encode_der; +xer_type_decoder_f RANfunctionDefinition_decode_xer; +xer_type_encoder_f RANfunctionDefinition_encode_xer; +oer_type_decoder_f RANfunctionDefinition_decode_oer; +oer_type_encoder_f RANfunctionDefinition_encode_oer; +per_type_decoder_f RANfunctionDefinition_decode_uper; +per_type_encoder_f RANfunctionDefinition_encode_uper; +per_type_decoder_f RANfunctionDefinition_decode_aper; +per_type_encoder_f RANfunctionDefinition_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionDefinition_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctionID-Item.h b/Bouncer/e2ap/headers/RANfunctionID-Item.h new file mode 100644 index 0000000..f4a643d --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctionID-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctionID_Item_H_ +#define _RANfunctionID_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANfunctionID.h" +#include "RANfunctionRevision.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunctionID-Item */ +typedef struct RANfunctionID_Item { + RANfunctionID_t ranFunctionID; + RANfunctionRevision_t ranFunctionRevision; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunctionID_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionID_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunctionID_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionID_Item_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctionID.h b/Bouncer/e2ap/headers/RANfunctionID.h new file mode 100644 index 0000000..00c4765 --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctionID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctionID_H_ +#define _RANfunctionID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunctionID */ +typedef long RANfunctionID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RANfunctionID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionID; +asn_struct_free_f RANfunctionID_free; +asn_struct_print_f RANfunctionID_print; +asn_constr_check_f RANfunctionID_constraint; +ber_type_decoder_f RANfunctionID_decode_ber; +der_type_encoder_f RANfunctionID_encode_der; +xer_type_decoder_f RANfunctionID_decode_xer; +xer_type_encoder_f RANfunctionID_encode_xer; +oer_type_decoder_f RANfunctionID_decode_oer; +oer_type_encoder_f RANfunctionID_encode_oer; +per_type_decoder_f RANfunctionID_decode_uper; +per_type_encoder_f RANfunctionID_encode_uper; +per_type_decoder_f RANfunctionID_decode_aper; +per_type_encoder_f RANfunctionID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctionIDcause-Item.h b/Bouncer/e2ap/headers/RANfunctionIDcause-Item.h new file mode 100644 index 0000000..65d1d16 --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctionIDcause-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctionIDcause_Item_H_ +#define _RANfunctionIDcause_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANfunctionID.h" +#include "Cause.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunctionIDcause-Item */ +typedef struct RANfunctionIDcause_Item { + RANfunctionID_t ranFunctionID; + Cause_t cause; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunctionIDcause_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunctionIDcause_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionIDcause_Item_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctionRevision.h b/Bouncer/e2ap/headers/RANfunctionRevision.h new file mode 100644 index 0000000..76f500a --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctionRevision.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctionRevision_H_ +#define _RANfunctionRevision_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunctionRevision */ +typedef long RANfunctionRevision_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RANfunctionRevision_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionRevision; +asn_struct_free_f RANfunctionRevision_free; +asn_struct_print_f RANfunctionRevision_print; +asn_constr_check_f RANfunctionRevision_constraint; +ber_type_decoder_f RANfunctionRevision_decode_ber; +der_type_encoder_f RANfunctionRevision_encode_der; +xer_type_decoder_f RANfunctionRevision_decode_xer; +xer_type_encoder_f RANfunctionRevision_encode_xer; +oer_type_decoder_f RANfunctionRevision_decode_oer; +oer_type_encoder_f RANfunctionRevision_encode_oer; +per_type_decoder_f RANfunctionRevision_decode_uper; +per_type_encoder_f RANfunctionRevision_encode_uper; +per_type_decoder_f RANfunctionRevision_decode_aper; +per_type_encoder_f RANfunctionRevision_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionRevision_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctions-List.h b/Bouncer/e2ap/headers/RANfunctions-List.h new file mode 100644 index 0000000..c3fd3e3 --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctions-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctions_List_H_ +#define _RANfunctions_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ProtocolIE_SingleContainer; + +/* RANfunctions-List */ +typedef struct RANfunctions_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunctions_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunctions_List; +extern asn_SET_OF_specifics_t asn_SPC_RANfunctions_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunctions_List_1[1]; +extern asn_per_constraints_t asn_PER_type_RANfunctions_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctions_List_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctionsID-List.h b/Bouncer/e2ap/headers/RANfunctionsID-List.h new file mode 100644 index 0000000..1a77d70 --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctionsID-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctionsID_List_H_ +#define _RANfunctionsID_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ProtocolIE_SingleContainer; + +/* RANfunctionsID-List */ +typedef struct RANfunctionsID_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunctionsID_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionsID_List; +extern asn_SET_OF_specifics_t asn_SPC_RANfunctionsID_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunctionsID_List_1[1]; +extern asn_per_constraints_t asn_PER_type_RANfunctionsID_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionsID_List_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RANfunctionsIDcause-List.h b/Bouncer/e2ap/headers/RANfunctionsIDcause-List.h new file mode 100644 index 0000000..3fd51d1 --- /dev/null +++ b/Bouncer/e2ap/headers/RANfunctionsIDcause-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunctionsIDcause_List_H_ +#define _RANfunctionsIDcause_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ProtocolIE_SingleContainer; + +/* RANfunctionsIDcause-List */ +typedef struct RANfunctionsIDcause_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunctionsIDcause_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionsIDcause_List; +extern asn_SET_OF_specifics_t asn_SPC_RANfunctionsIDcause_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunctionsIDcause_List_1[1]; +extern asn_per_constraints_t asn_PER_type_RANfunctionsIDcause_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionsIDcause_List_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICaction-Admitted-Item.h b/Bouncer/e2ap/headers/RICaction-Admitted-Item.h new file mode 100644 index 0000000..5031b7d --- /dev/null +++ b/Bouncer/e2ap/headers/RICaction-Admitted-Item.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICaction_Admitted_Item_H_ +#define _RICaction_Admitted_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RICactionID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICaction-Admitted-Item */ +typedef struct RICaction_Admitted_Item { + RICactionID_t ricActionID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_Admitted_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RICaction_Admitted_Item_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICaction_Admitted_Item_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICaction-Admitted-List.h b/Bouncer/e2ap/headers/RICaction-Admitted-List.h new file mode 100644 index 0000000..9464982 --- /dev/null +++ b/Bouncer/e2ap/headers/RICaction-Admitted-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICaction_Admitted_List_H_ +#define _RICaction_Admitted_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ProtocolIE_SingleContainer; + +/* RICaction-Admitted-List */ +typedef struct RICaction_Admitted_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_Admitted_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_List; +extern asn_SET_OF_specifics_t asn_SPC_RICaction_Admitted_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RICaction_Admitted_List_1[1]; +extern asn_per_constraints_t asn_PER_type_RICaction_Admitted_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICaction_Admitted_List_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICaction-NotAdmitted-Item.h b/Bouncer/e2ap/headers/RICaction-NotAdmitted-Item.h new file mode 100644 index 0000000..b94f69c --- /dev/null +++ b/Bouncer/e2ap/headers/RICaction-NotAdmitted-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICaction_NotAdmitted_Item_H_ +#define _RICaction_NotAdmitted_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RICactionID.h" +#include "Cause.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICaction-NotAdmitted-Item */ +typedef struct RICaction_NotAdmitted_Item { + RICactionID_t ricActionID; + Cause_t cause; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_NotAdmitted_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICaction_NotAdmitted_Item_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICaction-NotAdmitted-List.h b/Bouncer/e2ap/headers/RICaction-NotAdmitted-List.h new file mode 100644 index 0000000..642683d --- /dev/null +++ b/Bouncer/e2ap/headers/RICaction-NotAdmitted-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICaction_NotAdmitted_List_H_ +#define _RICaction_NotAdmitted_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ProtocolIE_SingleContainer; + +/* RICaction-NotAdmitted-List */ +typedef struct RICaction_NotAdmitted_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_NotAdmitted_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_List; +extern asn_SET_OF_specifics_t asn_SPC_RICaction_NotAdmitted_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_List_1[1]; +extern asn_per_constraints_t asn_PER_type_RICaction_NotAdmitted_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICaction_NotAdmitted_List_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICaction-ToBeSetup-Item.h b/Bouncer/e2ap/headers/RICaction-ToBeSetup-Item.h new file mode 100644 index 0000000..a616014 --- /dev/null +++ b/Bouncer/e2ap/headers/RICaction-ToBeSetup-Item.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICaction_ToBeSetup_Item_H_ +#define _RICaction_ToBeSetup_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RICactionID.h" +#include "RICactionType.h" +#include "RICactionDefinition.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RICsubsequentAction; + +/* RICaction-ToBeSetup-Item */ +typedef struct RICaction_ToBeSetup_Item { + RICactionID_t ricActionID; + RICactionType_t ricActionType; + RICactionDefinition_t *ricActionDefinition; /* OPTIONAL */ + struct RICsubsequentAction *ricSubsequentAction; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICaction_ToBeSetup_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICaction_ToBeSetup_Item_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICactionDefinition.h b/Bouncer/e2ap/headers/RICactionDefinition.h new file mode 100644 index 0000000..349e2a8 --- /dev/null +++ b/Bouncer/e2ap/headers/RICactionDefinition.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICactionDefinition_H_ +#define _RICactionDefinition_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICactionDefinition */ +typedef OCTET_STRING_t RICactionDefinition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICactionDefinition; +asn_struct_free_f RICactionDefinition_free; +asn_struct_print_f RICactionDefinition_print; +asn_constr_check_f RICactionDefinition_constraint; +ber_type_decoder_f RICactionDefinition_decode_ber; +der_type_encoder_f RICactionDefinition_encode_der; +xer_type_decoder_f RICactionDefinition_decode_xer; +xer_type_encoder_f RICactionDefinition_encode_xer; +oer_type_decoder_f RICactionDefinition_decode_oer; +oer_type_encoder_f RICactionDefinition_encode_oer; +per_type_decoder_f RICactionDefinition_decode_uper; +per_type_encoder_f RICactionDefinition_encode_uper; +per_type_decoder_f RICactionDefinition_decode_aper; +per_type_encoder_f RICactionDefinition_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICactionDefinition_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICactionID.h b/Bouncer/e2ap/headers/RICactionID.h new file mode 100644 index 0000000..b8f6447 --- /dev/null +++ b/Bouncer/e2ap/headers/RICactionID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICactionID_H_ +#define _RICactionID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICactionID */ +typedef long RICactionID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICactionID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICactionID; +asn_struct_free_f RICactionID_free; +asn_struct_print_f RICactionID_print; +asn_constr_check_f RICactionID_constraint; +ber_type_decoder_f RICactionID_decode_ber; +der_type_encoder_f RICactionID_encode_der; +xer_type_decoder_f RICactionID_decode_xer; +xer_type_encoder_f RICactionID_encode_xer; +oer_type_decoder_f RICactionID_decode_oer; +oer_type_encoder_f RICactionID_encode_oer; +per_type_decoder_f RICactionID_decode_uper; +per_type_encoder_f RICactionID_encode_uper; +per_type_decoder_f RICactionID_decode_aper; +per_type_encoder_f RICactionID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICactionID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICactionType.h b/Bouncer/e2ap/headers/RICactionType.h new file mode 100644 index 0000000..e4349fd --- /dev/null +++ b/Bouncer/e2ap/headers/RICactionType.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICactionType_H_ +#define _RICactionType_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RICactionType { + RICactionType_report = 0, + RICactionType_insert = 1, + RICactionType_policy = 2 + /* + * Enumeration is extensible + */ +} e_RICactionType; + +/* RICactionType */ +typedef long RICactionType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICactionType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICactionType; +extern const asn_INTEGER_specifics_t asn_SPC_RICactionType_specs_1; +asn_struct_free_f RICactionType_free; +asn_struct_print_f RICactionType_print; +asn_constr_check_f RICactionType_constraint; +ber_type_decoder_f RICactionType_decode_ber; +der_type_encoder_f RICactionType_encode_der; +xer_type_decoder_f RICactionType_decode_xer; +xer_type_encoder_f RICactionType_encode_xer; +oer_type_decoder_f RICactionType_decode_oer; +oer_type_encoder_f RICactionType_encode_oer; +per_type_decoder_f RICactionType_decode_uper; +per_type_encoder_f RICactionType_encode_uper; +per_type_decoder_f RICactionType_decode_aper; +per_type_encoder_f RICactionType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICactionType_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICactions-ToBeSetup-List.h b/Bouncer/e2ap/headers/RICactions-ToBeSetup-List.h new file mode 100644 index 0000000..632b420 --- /dev/null +++ b/Bouncer/e2ap/headers/RICactions-ToBeSetup-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICactions_ToBeSetup_List_H_ +#define _RICactions_ToBeSetup_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ProtocolIE_SingleContainer; + +/* RICactions-ToBeSetup-List */ +typedef struct RICactions_ToBeSetup_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICactions_ToBeSetup_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICactions_ToBeSetup_List; +extern asn_SET_OF_specifics_t asn_SPC_RICactions_ToBeSetup_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RICactions_ToBeSetup_List_1[1]; +extern asn_per_constraints_t asn_PER_type_RICactions_ToBeSetup_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICactions_ToBeSetup_List_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcallProcessID.h b/Bouncer/e2ap/headers/RICcallProcessID.h new file mode 100644 index 0000000..a1a4983 --- /dev/null +++ b/Bouncer/e2ap/headers/RICcallProcessID.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcallProcessID_H_ +#define _RICcallProcessID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICcallProcessID */ +typedef OCTET_STRING_t RICcallProcessID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICcallProcessID; +asn_struct_free_f RICcallProcessID_free; +asn_struct_print_f RICcallProcessID_print; +asn_constr_check_f RICcallProcessID_constraint; +ber_type_decoder_f RICcallProcessID_decode_ber; +der_type_encoder_f RICcallProcessID_encode_der; +xer_type_decoder_f RICcallProcessID_decode_xer; +xer_type_encoder_f RICcallProcessID_encode_xer; +oer_type_decoder_f RICcallProcessID_decode_oer; +oer_type_encoder_f RICcallProcessID_encode_oer; +per_type_decoder_f RICcallProcessID_decode_uper; +per_type_encoder_f RICcallProcessID_encode_uper; +per_type_decoder_f RICcallProcessID_decode_aper; +per_type_encoder_f RICcallProcessID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcallProcessID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolAckRequest.h b/Bouncer/e2ap/headers/RICcontrolAckRequest.h new file mode 100644 index 0000000..abb9553 --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolAckRequest.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolAckRequest_H_ +#define _RICcontrolAckRequest_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RICcontrolAckRequest { + RICcontrolAckRequest_noAck = 0, + RICcontrolAckRequest_ack = 1, + RICcontrolAckRequest_nAck = 2 + /* + * Enumeration is extensible + */ +} e_RICcontrolAckRequest; + +/* RICcontrolAckRequest */ +typedef long RICcontrolAckRequest_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICcontrolAckRequest_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolAckRequest; +extern const asn_INTEGER_specifics_t asn_SPC_RICcontrolAckRequest_specs_1; +asn_struct_free_f RICcontrolAckRequest_free; +asn_struct_print_f RICcontrolAckRequest_print; +asn_constr_check_f RICcontrolAckRequest_constraint; +ber_type_decoder_f RICcontrolAckRequest_decode_ber; +der_type_encoder_f RICcontrolAckRequest_encode_der; +xer_type_decoder_f RICcontrolAckRequest_decode_xer; +xer_type_encoder_f RICcontrolAckRequest_encode_xer; +oer_type_decoder_f RICcontrolAckRequest_decode_oer; +oer_type_encoder_f RICcontrolAckRequest_encode_oer; +per_type_decoder_f RICcontrolAckRequest_decode_uper; +per_type_encoder_f RICcontrolAckRequest_encode_uper; +per_type_decoder_f RICcontrolAckRequest_decode_aper; +per_type_encoder_f RICcontrolAckRequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolAckRequest_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolAcknowledge.h b/Bouncer/e2ap/headers/RICcontrolAcknowledge.h new file mode 100644 index 0000000..361f3d6 --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolAcknowledge.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolAcknowledge_H_ +#define _RICcontrolAcknowledge_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICcontrolAcknowledge */ +typedef struct RICcontrolAcknowledge { + ProtocolIE_Container_87P8_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICcontrolAcknowledge_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolAcknowledge_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolFailure.h b/Bouncer/e2ap/headers/RICcontrolFailure.h new file mode 100644 index 0000000..6eb6a04 --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolFailure.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolFailure_H_ +#define _RICcontrolFailure_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICcontrolFailure */ +typedef struct RICcontrolFailure { + ProtocolIE_Container_87P9_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICcontrolFailure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolFailure_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolHeader.h b/Bouncer/e2ap/headers/RICcontrolHeader.h new file mode 100644 index 0000000..d7cad7d --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolHeader.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolHeader_H_ +#define _RICcontrolHeader_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICcontrolHeader */ +typedef OCTET_STRING_t RICcontrolHeader_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolHeader; +asn_struct_free_f RICcontrolHeader_free; +asn_struct_print_f RICcontrolHeader_print; +asn_constr_check_f RICcontrolHeader_constraint; +ber_type_decoder_f RICcontrolHeader_decode_ber; +der_type_encoder_f RICcontrolHeader_encode_der; +xer_type_decoder_f RICcontrolHeader_decode_xer; +xer_type_encoder_f RICcontrolHeader_encode_xer; +oer_type_decoder_f RICcontrolHeader_decode_oer; +oer_type_encoder_f RICcontrolHeader_encode_oer; +per_type_decoder_f RICcontrolHeader_decode_uper; +per_type_encoder_f RICcontrolHeader_encode_uper; +per_type_decoder_f RICcontrolHeader_decode_aper; +per_type_encoder_f RICcontrolHeader_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolHeader_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolMessage.h b/Bouncer/e2ap/headers/RICcontrolMessage.h new file mode 100644 index 0000000..08fdf4a --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolMessage.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolMessage_H_ +#define _RICcontrolMessage_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICcontrolMessage */ +typedef OCTET_STRING_t RICcontrolMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolMessage; +asn_struct_free_f RICcontrolMessage_free; +asn_struct_print_f RICcontrolMessage_print; +asn_constr_check_f RICcontrolMessage_constraint; +ber_type_decoder_f RICcontrolMessage_decode_ber; +der_type_encoder_f RICcontrolMessage_encode_der; +xer_type_decoder_f RICcontrolMessage_decode_xer; +xer_type_encoder_f RICcontrolMessage_encode_xer; +oer_type_decoder_f RICcontrolMessage_decode_oer; +oer_type_encoder_f RICcontrolMessage_encode_oer; +per_type_decoder_f RICcontrolMessage_decode_uper; +per_type_encoder_f RICcontrolMessage_encode_uper; +per_type_decoder_f RICcontrolMessage_decode_aper; +per_type_encoder_f RICcontrolMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolMessage_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolOutcome.h b/Bouncer/e2ap/headers/RICcontrolOutcome.h new file mode 100644 index 0000000..d70b5a5 --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolOutcome.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolOutcome_H_ +#define _RICcontrolOutcome_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICcontrolOutcome */ +typedef OCTET_STRING_t RICcontrolOutcome_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolOutcome; +asn_struct_free_f RICcontrolOutcome_free; +asn_struct_print_f RICcontrolOutcome_print; +asn_constr_check_f RICcontrolOutcome_constraint; +ber_type_decoder_f RICcontrolOutcome_decode_ber; +der_type_encoder_f RICcontrolOutcome_encode_der; +xer_type_decoder_f RICcontrolOutcome_decode_xer; +xer_type_encoder_f RICcontrolOutcome_encode_xer; +oer_type_decoder_f RICcontrolOutcome_decode_oer; +oer_type_encoder_f RICcontrolOutcome_encode_oer; +per_type_decoder_f RICcontrolOutcome_decode_uper; +per_type_encoder_f RICcontrolOutcome_encode_uper; +per_type_decoder_f RICcontrolOutcome_decode_aper; +per_type_encoder_f RICcontrolOutcome_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolOutcome_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolRequest.h b/Bouncer/e2ap/headers/RICcontrolRequest.h new file mode 100644 index 0000000..db5ba24 --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolRequest_H_ +#define _RICcontrolRequest_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICcontrolRequest */ +typedef struct RICcontrolRequest { + ProtocolIE_Container_87P7_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICcontrolRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolRequest_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICcontrolStatus.h b/Bouncer/e2ap/headers/RICcontrolStatus.h new file mode 100644 index 0000000..033f5a9 --- /dev/null +++ b/Bouncer/e2ap/headers/RICcontrolStatus.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICcontrolStatus_H_ +#define _RICcontrolStatus_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RICcontrolStatus { + RICcontrolStatus_success = 0, + RICcontrolStatus_rejected = 1, + RICcontrolStatus_failed = 2 + /* + * Enumeration is extensible + */ +} e_RICcontrolStatus; + +/* RICcontrolStatus */ +typedef long RICcontrolStatus_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICcontrolStatus_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICcontrolStatus; +extern const asn_INTEGER_specifics_t asn_SPC_RICcontrolStatus_specs_1; +asn_struct_free_f RICcontrolStatus_free; +asn_struct_print_f RICcontrolStatus_print; +asn_constr_check_f RICcontrolStatus_constraint; +ber_type_decoder_f RICcontrolStatus_decode_ber; +der_type_encoder_f RICcontrolStatus_encode_der; +xer_type_decoder_f RICcontrolStatus_decode_xer; +xer_type_encoder_f RICcontrolStatus_encode_xer; +oer_type_decoder_f RICcontrolStatus_decode_oer; +oer_type_encoder_f RICcontrolStatus_encode_oer; +per_type_decoder_f RICcontrolStatus_decode_uper; +per_type_encoder_f RICcontrolStatus_encode_uper; +per_type_decoder_f RICcontrolStatus_decode_aper; +per_type_encoder_f RICcontrolStatus_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICcontrolStatus_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICeventTriggerDefinition.h b/Bouncer/e2ap/headers/RICeventTriggerDefinition.h new file mode 100644 index 0000000..58ec4d2 --- /dev/null +++ b/Bouncer/e2ap/headers/RICeventTriggerDefinition.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICeventTriggerDefinition_H_ +#define _RICeventTriggerDefinition_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICeventTriggerDefinition */ +typedef OCTET_STRING_t RICeventTriggerDefinition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICeventTriggerDefinition; +asn_struct_free_f RICeventTriggerDefinition_free; +asn_struct_print_f RICeventTriggerDefinition_print; +asn_constr_check_f RICeventTriggerDefinition_constraint; +ber_type_decoder_f RICeventTriggerDefinition_decode_ber; +der_type_encoder_f RICeventTriggerDefinition_encode_der; +xer_type_decoder_f RICeventTriggerDefinition_decode_xer; +xer_type_encoder_f RICeventTriggerDefinition_encode_xer; +oer_type_decoder_f RICeventTriggerDefinition_decode_oer; +oer_type_encoder_f RICeventTriggerDefinition_encode_oer; +per_type_decoder_f RICeventTriggerDefinition_decode_uper; +per_type_encoder_f RICeventTriggerDefinition_encode_uper; +per_type_decoder_f RICeventTriggerDefinition_decode_aper; +per_type_encoder_f RICeventTriggerDefinition_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICeventTriggerDefinition_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICindication.h b/Bouncer/e2ap/headers/RICindication.h new file mode 100644 index 0000000..c984ab6 --- /dev/null +++ b/Bouncer/e2ap/headers/RICindication.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICindication_H_ +#define _RICindication_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICindication */ +typedef struct RICindication { + ProtocolIE_Container_87P6_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICindication_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICindication; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICindication_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICindicationHeader.h b/Bouncer/e2ap/headers/RICindicationHeader.h new file mode 100644 index 0000000..3220602 --- /dev/null +++ b/Bouncer/e2ap/headers/RICindicationHeader.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICindicationHeader_H_ +#define _RICindicationHeader_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICindicationHeader */ +typedef OCTET_STRING_t RICindicationHeader_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICindicationHeader; +asn_struct_free_f RICindicationHeader_free; +asn_struct_print_f RICindicationHeader_print; +asn_constr_check_f RICindicationHeader_constraint; +ber_type_decoder_f RICindicationHeader_decode_ber; +der_type_encoder_f RICindicationHeader_encode_der; +xer_type_decoder_f RICindicationHeader_decode_xer; +xer_type_encoder_f RICindicationHeader_encode_xer; +oer_type_decoder_f RICindicationHeader_decode_oer; +oer_type_encoder_f RICindicationHeader_encode_oer; +per_type_decoder_f RICindicationHeader_decode_uper; +per_type_encoder_f RICindicationHeader_encode_uper; +per_type_decoder_f RICindicationHeader_decode_aper; +per_type_encoder_f RICindicationHeader_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICindicationHeader_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICindicationMessage.h b/Bouncer/e2ap/headers/RICindicationMessage.h new file mode 100644 index 0000000..f00ebe7 --- /dev/null +++ b/Bouncer/e2ap/headers/RICindicationMessage.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICindicationMessage_H_ +#define _RICindicationMessage_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICindicationMessage */ +typedef OCTET_STRING_t RICindicationMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICindicationMessage; +asn_struct_free_f RICindicationMessage_free; +asn_struct_print_f RICindicationMessage_print; +asn_constr_check_f RICindicationMessage_constraint; +ber_type_decoder_f RICindicationMessage_decode_ber; +der_type_encoder_f RICindicationMessage_encode_der; +xer_type_decoder_f RICindicationMessage_decode_xer; +xer_type_encoder_f RICindicationMessage_encode_xer; +oer_type_decoder_f RICindicationMessage_decode_oer; +oer_type_encoder_f RICindicationMessage_encode_oer; +per_type_decoder_f RICindicationMessage_decode_uper; +per_type_encoder_f RICindicationMessage_encode_uper; +per_type_decoder_f RICindicationMessage_decode_aper; +per_type_encoder_f RICindicationMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICindicationMessage_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICindicationSN.h b/Bouncer/e2ap/headers/RICindicationSN.h new file mode 100644 index 0000000..498aaef --- /dev/null +++ b/Bouncer/e2ap/headers/RICindicationSN.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICindicationSN_H_ +#define _RICindicationSN_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICindicationSN */ +typedef long RICindicationSN_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICindicationSN_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICindicationSN; +asn_struct_free_f RICindicationSN_free; +asn_struct_print_f RICindicationSN_print; +asn_constr_check_f RICindicationSN_constraint; +ber_type_decoder_f RICindicationSN_decode_ber; +der_type_encoder_f RICindicationSN_encode_der; +xer_type_decoder_f RICindicationSN_decode_xer; +xer_type_encoder_f RICindicationSN_encode_xer; +oer_type_decoder_f RICindicationSN_decode_oer; +oer_type_encoder_f RICindicationSN_encode_oer; +per_type_decoder_f RICindicationSN_decode_uper; +per_type_encoder_f RICindicationSN_encode_uper; +per_type_decoder_f RICindicationSN_decode_aper; +per_type_encoder_f RICindicationSN_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICindicationSN_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICindicationType.h b/Bouncer/e2ap/headers/RICindicationType.h new file mode 100644 index 0000000..ffc0335 --- /dev/null +++ b/Bouncer/e2ap/headers/RICindicationType.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICindicationType_H_ +#define _RICindicationType_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RICindicationType { + RICindicationType_report = 0, + RICindicationType_insert = 1 + /* + * Enumeration is extensible + */ +} e_RICindicationType; + +/* RICindicationType */ +typedef long RICindicationType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICindicationType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICindicationType; +extern const asn_INTEGER_specifics_t asn_SPC_RICindicationType_specs_1; +asn_struct_free_f RICindicationType_free; +asn_struct_print_f RICindicationType_print; +asn_constr_check_f RICindicationType_constraint; +ber_type_decoder_f RICindicationType_decode_ber; +der_type_encoder_f RICindicationType_encode_der; +xer_type_decoder_f RICindicationType_decode_xer; +xer_type_encoder_f RICindicationType_encode_xer; +oer_type_decoder_f RICindicationType_decode_oer; +oer_type_encoder_f RICindicationType_encode_oer; +per_type_decoder_f RICindicationType_decode_uper; +per_type_encoder_f RICindicationType_encode_uper; +per_type_decoder_f RICindicationType_decode_aper; +per_type_encoder_f RICindicationType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICindicationType_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICrequestID.h b/Bouncer/e2ap/headers/RICrequestID.h new file mode 100644 index 0000000..b76c37c --- /dev/null +++ b/Bouncer/e2ap/headers/RICrequestID.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICrequestID_H_ +#define _RICrequestID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICrequestID */ +typedef struct RICrequestID { + long ricRequestorID; + long ricInstanceID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICrequestID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICrequestID; +extern asn_SEQUENCE_specifics_t asn_SPC_RICrequestID_specs_1; +extern asn_TYPE_member_t asn_MBR_RICrequestID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICrequestID_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICserviceQuery.h b/Bouncer/e2ap/headers/RICserviceQuery.h new file mode 100644 index 0000000..3b2c4ee --- /dev/null +++ b/Bouncer/e2ap/headers/RICserviceQuery.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICserviceQuery_H_ +#define _RICserviceQuery_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICserviceQuery */ +typedef struct RICserviceQuery { + ProtocolIE_Container_87P19_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceQuery_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICserviceQuery; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICserviceQuery_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICserviceUpdate.h b/Bouncer/e2ap/headers/RICserviceUpdate.h new file mode 100644 index 0000000..9ade74f --- /dev/null +++ b/Bouncer/e2ap/headers/RICserviceUpdate.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICserviceUpdate_H_ +#define _RICserviceUpdate_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICserviceUpdate */ +typedef struct RICserviceUpdate { + ProtocolIE_Container_87P16_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceUpdate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICserviceUpdate_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICserviceUpdateAcknowledge.h b/Bouncer/e2ap/headers/RICserviceUpdateAcknowledge.h new file mode 100644 index 0000000..4b08d1a --- /dev/null +++ b/Bouncer/e2ap/headers/RICserviceUpdateAcknowledge.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICserviceUpdateAcknowledge_H_ +#define _RICserviceUpdateAcknowledge_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICserviceUpdateAcknowledge */ +typedef struct RICserviceUpdateAcknowledge { + ProtocolIE_Container_87P17_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceUpdateAcknowledge_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICserviceUpdateAcknowledge_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICserviceUpdateFailure.h b/Bouncer/e2ap/headers/RICserviceUpdateFailure.h new file mode 100644 index 0000000..c00559e --- /dev/null +++ b/Bouncer/e2ap/headers/RICserviceUpdateFailure.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICserviceUpdateFailure_H_ +#define _RICserviceUpdateFailure_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICserviceUpdateFailure */ +typedef struct RICserviceUpdateFailure { + ProtocolIE_Container_87P18_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICserviceUpdateFailure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICserviceUpdateFailure_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubscriptionDeleteFailure.h b/Bouncer/e2ap/headers/RICsubscriptionDeleteFailure.h new file mode 100644 index 0000000..59bb7d4 --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubscriptionDeleteFailure.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubscriptionDeleteFailure_H_ +#define _RICsubscriptionDeleteFailure_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionDeleteFailure */ +typedef struct RICsubscriptionDeleteFailure { + ProtocolIE_Container_87P5_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDeleteFailure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionDeleteFailure_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubscriptionDeleteRequest.h b/Bouncer/e2ap/headers/RICsubscriptionDeleteRequest.h new file mode 100644 index 0000000..5019dab --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubscriptionDeleteRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubscriptionDeleteRequest_H_ +#define _RICsubscriptionDeleteRequest_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionDeleteRequest */ +typedef struct RICsubscriptionDeleteRequest { + ProtocolIE_Container_87P3_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDeleteRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionDeleteRequest_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubscriptionDeleteResponse.h b/Bouncer/e2ap/headers/RICsubscriptionDeleteResponse.h new file mode 100644 index 0000000..b1aeba6 --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubscriptionDeleteResponse.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubscriptionDeleteResponse_H_ +#define _RICsubscriptionDeleteResponse_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionDeleteResponse */ +typedef struct RICsubscriptionDeleteResponse { + ProtocolIE_Container_87P4_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDeleteResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionDeleteResponse_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubscriptionDetails.h b/Bouncer/e2ap/headers/RICsubscriptionDetails.h new file mode 100644 index 0000000..9b0a03e --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubscriptionDetails.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubscriptionDetails_H_ +#define _RICsubscriptionDetails_H_ + + +#include + +/* Including external dependencies */ +#include "RICeventTriggerDefinition.h" +#include "RICactions-ToBeSetup-List.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionDetails */ +typedef struct RICsubscriptionDetails { + RICeventTriggerDefinition_t ricEventTriggerDefinition; + RICactions_ToBeSetup_List_t ricAction_ToBeSetup_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDetails_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDetails; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDetails_specs_1; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDetails_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionDetails_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubscriptionFailure.h b/Bouncer/e2ap/headers/RICsubscriptionFailure.h new file mode 100644 index 0000000..c8c4a77 --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubscriptionFailure.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubscriptionFailure_H_ +#define _RICsubscriptionFailure_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionFailure */ +typedef struct RICsubscriptionFailure { + ProtocolIE_Container_87P2_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionFailure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionFailure_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubscriptionRequest.h b/Bouncer/e2ap/headers/RICsubscriptionRequest.h new file mode 100644 index 0000000..9e9e0bb --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubscriptionRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubscriptionRequest_H_ +#define _RICsubscriptionRequest_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionRequest */ +typedef struct RICsubscriptionRequest { + ProtocolIE_Container_87P0_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionRequest_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubscriptionResponse.h b/Bouncer/e2ap/headers/RICsubscriptionResponse.h new file mode 100644 index 0000000..9b8bb17 --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubscriptionResponse.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubscriptionResponse_H_ +#define _RICsubscriptionResponse_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionResponse */ +typedef struct RICsubscriptionResponse { + ProtocolIE_Container_87P1_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionResponse_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubsequentAction.h b/Bouncer/e2ap/headers/RICsubsequentAction.h new file mode 100644 index 0000000..fffdc21 --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubsequentAction.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubsequentAction_H_ +#define _RICsubsequentAction_H_ + + +#include + +/* Including external dependencies */ +#include "RICsubsequentActionType.h" +#include "RICtimeToWait.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubsequentAction */ +typedef struct RICsubsequentAction { + RICsubsequentActionType_t ricSubsequentActionType; + RICtimeToWait_t ricTimeToWait; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubsequentAction_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubsequentAction; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubsequentAction_specs_1; +extern asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubsequentAction_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICsubsequentActionType.h b/Bouncer/e2ap/headers/RICsubsequentActionType.h new file mode 100644 index 0000000..1dea790 --- /dev/null +++ b/Bouncer/e2ap/headers/RICsubsequentActionType.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICsubsequentActionType_H_ +#define _RICsubsequentActionType_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RICsubsequentActionType { + RICsubsequentActionType_continue = 0, + RICsubsequentActionType_wait = 1 + /* + * Enumeration is extensible + */ +} e_RICsubsequentActionType; + +/* RICsubsequentActionType */ +typedef long RICsubsequentActionType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICsubsequentActionType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICsubsequentActionType; +extern const asn_INTEGER_specifics_t asn_SPC_RICsubsequentActionType_specs_1; +asn_struct_free_f RICsubsequentActionType_free; +asn_struct_print_f RICsubsequentActionType_print; +asn_constr_check_f RICsubsequentActionType_constraint; +ber_type_decoder_f RICsubsequentActionType_decode_ber; +der_type_encoder_f RICsubsequentActionType_encode_der; +xer_type_decoder_f RICsubsequentActionType_decode_xer; +xer_type_encoder_f RICsubsequentActionType_encode_xer; +oer_type_decoder_f RICsubsequentActionType_decode_oer; +oer_type_encoder_f RICsubsequentActionType_encode_oer; +per_type_decoder_f RICsubsequentActionType_decode_uper; +per_type_encoder_f RICsubsequentActionType_encode_uper; +per_type_decoder_f RICsubsequentActionType_decode_aper; +per_type_encoder_f RICsubsequentActionType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubsequentActionType_H_ */ +#include diff --git a/Bouncer/e2ap/headers/RICtimeToWait.h b/Bouncer/e2ap/headers/RICtimeToWait.h new file mode 100644 index 0000000..efe9b2a --- /dev/null +++ b/Bouncer/e2ap/headers/RICtimeToWait.h @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RICtimeToWait_H_ +#define _RICtimeToWait_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RICtimeToWait { + RICtimeToWait_zero = 0, + RICtimeToWait_w1ms = 1, + RICtimeToWait_w2ms = 2, + RICtimeToWait_w5ms = 3, + RICtimeToWait_w10ms = 4, + RICtimeToWait_w20ms = 5, + RICtimeToWait_w30ms = 6, + RICtimeToWait_w40ms = 7, + RICtimeToWait_w50ms = 8, + RICtimeToWait_w100ms = 9, + RICtimeToWait_w200ms = 10, + RICtimeToWait_w500ms = 11, + RICtimeToWait_w1s = 12, + RICtimeToWait_w2s = 13, + RICtimeToWait_w5s = 14, + RICtimeToWait_w10s = 15, + RICtimeToWait_w20s = 16, + RICtimeToWait_w60s = 17 + /* + * Enumeration is extensible + */ +} e_RICtimeToWait; + +/* RICtimeToWait */ +typedef long RICtimeToWait_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RICtimeToWait_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RICtimeToWait; +extern const asn_INTEGER_specifics_t asn_SPC_RICtimeToWait_specs_1; +asn_struct_free_f RICtimeToWait_free; +asn_struct_print_f RICtimeToWait_print; +asn_constr_check_f RICtimeToWait_constraint; +ber_type_decoder_f RICtimeToWait_decode_ber; +der_type_encoder_f RICtimeToWait_encode_der; +xer_type_decoder_f RICtimeToWait_decode_xer; +xer_type_encoder_f RICtimeToWait_encode_xer; +oer_type_decoder_f RICtimeToWait_decode_oer; +oer_type_encoder_f RICtimeToWait_encode_oer; +per_type_decoder_f RICtimeToWait_decode_uper; +per_type_encoder_f RICtimeToWait_encode_uper; +per_type_decoder_f RICtimeToWait_decode_aper; +per_type_encoder_f RICtimeToWait_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICtimeToWait_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ResetRequest.h b/Bouncer/e2ap/headers/ResetRequest.h new file mode 100644 index 0000000..b8ccee4 --- /dev/null +++ b/Bouncer/e2ap/headers/ResetRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ResetRequest_H_ +#define _ResetRequest_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ResetRequest */ +typedef struct ResetRequest { + ProtocolIE_Container_87P14_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ResetRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ResetRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _ResetRequest_H_ */ +#include diff --git a/Bouncer/e2ap/headers/ResetResponse.h b/Bouncer/e2ap/headers/ResetResponse.h new file mode 100644 index 0000000..cfd7a3c --- /dev/null +++ b/Bouncer/e2ap/headers/ResetResponse.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ResetResponse_H_ +#define _ResetResponse_H_ + + +#include + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ResetResponse */ +typedef struct ResetResponse { + ProtocolIE_Container_87P15_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ResetResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ResetResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _ResetResponse_H_ */ +#include diff --git a/Bouncer/e2ap/headers/SuccessfulOutcome.h b/Bouncer/e2ap/headers/SuccessfulOutcome.h new file mode 100644 index 0000000..734bd7e --- /dev/null +++ b/Bouncer/e2ap/headers/SuccessfulOutcome.h @@ -0,0 +1,91 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SuccessfulOutcome_H_ +#define _SuccessfulOutcome_H_ + + +#include + +/* Including external dependencies */ +#include "ProcedureCode.h" +#include "Criticality.h" +#include +#include +#include "RICsubscriptionRequest.h" +#include "RICsubscriptionResponse.h" +#include "RICsubscriptionFailure.h" +#include "RICsubscriptionDeleteRequest.h" +#include "RICsubscriptionDeleteResponse.h" +#include "RICsubscriptionDeleteFailure.h" +#include "RICserviceUpdate.h" +#include "RICserviceUpdateAcknowledge.h" +#include "RICserviceUpdateFailure.h" +#include "RICcontrolRequest.h" +#include "RICcontrolAcknowledge.h" +#include "RICcontrolFailure.h" +#include "E2setupRequest.h" +#include "E2setupResponse.h" +#include "E2setupFailure.h" +#include "ResetRequest.h" +#include "ResetResponse.h" +#include "RICindication.h" +#include "RICserviceQuery.h" +#include "ErrorIndication.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum SuccessfulOutcome__value_PR { + SuccessfulOutcome__value_PR_NOTHING, /* No components present */ + SuccessfulOutcome__value_PR_RICsubscriptionResponse, + SuccessfulOutcome__value_PR_RICsubscriptionDeleteResponse, + SuccessfulOutcome__value_PR_RICserviceUpdateAcknowledge, + SuccessfulOutcome__value_PR_RICcontrolAcknowledge, + SuccessfulOutcome__value_PR_E2setupResponse, + SuccessfulOutcome__value_PR_ResetResponse +} SuccessfulOutcome__value_PR; + +/* SuccessfulOutcome */ +typedef struct SuccessfulOutcome { + ProcedureCode_t procedureCode; + Criticality_t criticality; + struct SuccessfulOutcome__value { + SuccessfulOutcome__value_PR present; + union SuccessfulOutcome__value_u { + RICsubscriptionResponse_t RICsubscriptionResponse; + RICsubscriptionDeleteResponse_t RICsubscriptionDeleteResponse; + RICserviceUpdateAcknowledge_t RICserviceUpdateAcknowledge; + RICcontrolAcknowledge_t RICcontrolAcknowledge; + E2setupResponse_t E2setupResponse; + ResetResponse_t ResetResponse; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SuccessfulOutcome_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SuccessfulOutcome; +extern asn_SEQUENCE_specifics_t asn_SPC_SuccessfulOutcome_specs_1; +extern asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _SuccessfulOutcome_H_ */ +#include diff --git a/Bouncer/e2ap/headers/TimeToWait.h b/Bouncer/e2ap/headers/TimeToWait.h new file mode 100644 index 0000000..9627535 --- /dev/null +++ b/Bouncer/e2ap/headers/TimeToWait.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TimeToWait_H_ +#define _TimeToWait_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TimeToWait { + TimeToWait_v1s = 0, + TimeToWait_v2s = 1, + TimeToWait_v5s = 2, + TimeToWait_v10s = 3, + TimeToWait_v20s = 4, + TimeToWait_v60s = 5 + /* + * Enumeration is extensible + */ +} e_TimeToWait; + +/* TimeToWait */ +typedef long TimeToWait_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_TimeToWait_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_TimeToWait; +extern const asn_INTEGER_specifics_t asn_SPC_TimeToWait_specs_1; +asn_struct_free_f TimeToWait_free; +asn_struct_print_f TimeToWait_print; +asn_constr_check_f TimeToWait_constraint; +ber_type_decoder_f TimeToWait_decode_ber; +der_type_encoder_f TimeToWait_encode_der; +xer_type_decoder_f TimeToWait_decode_xer; +xer_type_encoder_f TimeToWait_encode_xer; +oer_type_decoder_f TimeToWait_decode_oer; +oer_type_encoder_f TimeToWait_encode_oer; +per_type_decoder_f TimeToWait_decode_uper; +per_type_encoder_f TimeToWait_encode_uper; +per_type_decoder_f TimeToWait_decode_aper; +per_type_encoder_f TimeToWait_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _TimeToWait_H_ */ +#include diff --git a/Bouncer/e2ap/headers/TriggeringMessage.h b/Bouncer/e2ap/headers/TriggeringMessage.h new file mode 100644 index 0000000..6f9f42e --- /dev/null +++ b/Bouncer/e2ap/headers/TriggeringMessage.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TriggeringMessage_H_ +#define _TriggeringMessage_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TriggeringMessage { + TriggeringMessage_initiating_message = 0, + TriggeringMessage_successful_outcome = 1, + TriggeringMessage_unsuccessfull_outcome = 2 +} e_TriggeringMessage; + +/* TriggeringMessage */ +typedef long TriggeringMessage_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_TriggeringMessage_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_TriggeringMessage; +extern const asn_INTEGER_specifics_t asn_SPC_TriggeringMessage_specs_1; +asn_struct_free_f TriggeringMessage_free; +asn_struct_print_f TriggeringMessage_print; +asn_constr_check_f TriggeringMessage_constraint; +ber_type_decoder_f TriggeringMessage_decode_ber; +der_type_encoder_f TriggeringMessage_encode_der; +xer_type_decoder_f TriggeringMessage_decode_xer; +xer_type_encoder_f TriggeringMessage_encode_xer; +oer_type_decoder_f TriggeringMessage_decode_oer; +oer_type_encoder_f TriggeringMessage_encode_oer; +per_type_decoder_f TriggeringMessage_decode_uper; +per_type_encoder_f TriggeringMessage_encode_uper; +per_type_decoder_f TriggeringMessage_decode_aper; +per_type_encoder_f TriggeringMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _TriggeringMessage_H_ */ +#include diff --git a/Bouncer/e2ap/headers/TypeOfError.h b/Bouncer/e2ap/headers/TypeOfError.h new file mode 100644 index 0000000..aec2d63 --- /dev/null +++ b/Bouncer/e2ap/headers/TypeOfError.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TypeOfError_H_ +#define _TypeOfError_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TypeOfError { + TypeOfError_not_understood = 0, + TypeOfError_missing = 1 + /* + * Enumeration is extensible + */ +} e_TypeOfError; + +/* TypeOfError */ +typedef long TypeOfError_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_TypeOfError_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_TypeOfError; +extern const asn_INTEGER_specifics_t asn_SPC_TypeOfError_specs_1; +asn_struct_free_f TypeOfError_free; +asn_struct_print_f TypeOfError_print; +asn_constr_check_f TypeOfError_constraint; +ber_type_decoder_f TypeOfError_decode_ber; +der_type_encoder_f TypeOfError_encode_der; +xer_type_decoder_f TypeOfError_decode_xer; +xer_type_encoder_f TypeOfError_encode_xer; +oer_type_decoder_f TypeOfError_decode_oer; +oer_type_encoder_f TypeOfError_encode_oer; +per_type_decoder_f TypeOfError_decode_uper; +per_type_encoder_f TypeOfError_encode_uper; +per_type_decoder_f TypeOfError_decode_aper; +per_type_encoder_f TypeOfError_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _TypeOfError_H_ */ +#include diff --git a/Bouncer/e2ap/headers/UnsuccessfulOutcome.h b/Bouncer/e2ap/headers/UnsuccessfulOutcome.h new file mode 100644 index 0000000..baf8838 --- /dev/null +++ b/Bouncer/e2ap/headers/UnsuccessfulOutcome.h @@ -0,0 +1,89 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UnsuccessfulOutcome_H_ +#define _UnsuccessfulOutcome_H_ + + +#include + +/* Including external dependencies */ +#include "ProcedureCode.h" +#include "Criticality.h" +#include +#include +#include "RICsubscriptionRequest.h" +#include "RICsubscriptionResponse.h" +#include "RICsubscriptionFailure.h" +#include "RICsubscriptionDeleteRequest.h" +#include "RICsubscriptionDeleteResponse.h" +#include "RICsubscriptionDeleteFailure.h" +#include "RICserviceUpdate.h" +#include "RICserviceUpdateAcknowledge.h" +#include "RICserviceUpdateFailure.h" +#include "RICcontrolRequest.h" +#include "RICcontrolAcknowledge.h" +#include "RICcontrolFailure.h" +#include "E2setupRequest.h" +#include "E2setupResponse.h" +#include "E2setupFailure.h" +#include "ResetRequest.h" +#include "ResetResponse.h" +#include "RICindication.h" +#include "RICserviceQuery.h" +#include "ErrorIndication.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum UnsuccessfulOutcome__value_PR { + UnsuccessfulOutcome__value_PR_NOTHING, /* No components present */ + UnsuccessfulOutcome__value_PR_RICsubscriptionFailure, + UnsuccessfulOutcome__value_PR_RICsubscriptionDeleteFailure, + UnsuccessfulOutcome__value_PR_RICserviceUpdateFailure, + UnsuccessfulOutcome__value_PR_RICcontrolFailure, + UnsuccessfulOutcome__value_PR_E2setupFailure +} UnsuccessfulOutcome__value_PR; + +/* UnsuccessfulOutcome */ +typedef struct UnsuccessfulOutcome { + ProcedureCode_t procedureCode; + Criticality_t criticality; + struct UnsuccessfulOutcome__value { + UnsuccessfulOutcome__value_PR present; + union UnsuccessfulOutcome__value_u { + RICsubscriptionFailure_t RICsubscriptionFailure; + RICsubscriptionDeleteFailure_t RICsubscriptionDeleteFailure; + RICserviceUpdateFailure_t RICserviceUpdateFailure; + RICcontrolFailure_t RICcontrolFailure; + E2setupFailure_t E2setupFailure; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UnsuccessfulOutcome_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UnsuccessfulOutcome; +extern asn_SEQUENCE_specifics_t asn_SPC_UnsuccessfulOutcome_specs_1; +extern asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UnsuccessfulOutcome_H_ */ +#include diff --git a/Bouncer/asn1c_defs/asn_SEQUENCE_OF.h b/Bouncer/e2ap/headers/asn_SEQUENCE_OF.h similarity index 100% rename from Bouncer/asn1c_defs/asn_SEQUENCE_OF.h rename to Bouncer/e2ap/headers/asn_SEQUENCE_OF.h diff --git a/Bouncer/asn1c_defs/asn_SET_OF.h b/Bouncer/e2ap/headers/asn_SET_OF.h similarity index 100% rename from Bouncer/asn1c_defs/asn_SET_OF.h rename to Bouncer/e2ap/headers/asn_SET_OF.h diff --git a/Bouncer/asn1c_defs/asn_application.h b/Bouncer/e2ap/headers/asn_application.h similarity index 100% rename from Bouncer/asn1c_defs/asn_application.h rename to Bouncer/e2ap/headers/asn_application.h diff --git a/Bouncer/asn1c_defs/asn_bit_data.h b/Bouncer/e2ap/headers/asn_bit_data.h similarity index 100% rename from Bouncer/asn1c_defs/asn_bit_data.h rename to Bouncer/e2ap/headers/asn_bit_data.h diff --git a/Bouncer/asn1c_defs/asn_codecs.h b/Bouncer/e2ap/headers/asn_codecs.h similarity index 100% rename from Bouncer/asn1c_defs/asn_codecs.h rename to Bouncer/e2ap/headers/asn_codecs.h diff --git a/Bouncer/asn1c_defs/asn_codecs_prim.h b/Bouncer/e2ap/headers/asn_codecs_prim.h similarity index 100% rename from Bouncer/asn1c_defs/asn_codecs_prim.h rename to Bouncer/e2ap/headers/asn_codecs_prim.h diff --git a/Bouncer/e2ap/headers/asn_constant.h b/Bouncer/e2ap/headers/asn_constant.h new file mode 100644 index 0000000..a6f348c --- /dev/null +++ b/Bouncer/e2ap/headers/asn_constant.h @@ -0,0 +1,22 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + */ + +#ifndef _ASN_CONSTANT_H +#define _ASN_CONSTANT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define maxProtocolIEs (65535) +#define maxnoofErrors (256) +#define maxofRANfunctionID (256) +#define maxofRICactionID (16) + + +#ifdef __cplusplus +} +#endif + +#endif /* _ASN_CONSTANT_H */ diff --git a/Bouncer/asn1c_defs/asn_internal.h b/Bouncer/e2ap/headers/asn_internal.h similarity index 100% rename from Bouncer/asn1c_defs/asn_internal.h rename to Bouncer/e2ap/headers/asn_internal.h diff --git a/Bouncer/asn1c_defs/asn_ioc.h b/Bouncer/e2ap/headers/asn_ioc.h similarity index 100% rename from Bouncer/asn1c_defs/asn_ioc.h rename to Bouncer/e2ap/headers/asn_ioc.h diff --git a/Bouncer/asn1c_defs/asn_random_fill.h b/Bouncer/e2ap/headers/asn_random_fill.h similarity index 100% rename from Bouncer/asn1c_defs/asn_random_fill.h rename to Bouncer/e2ap/headers/asn_random_fill.h diff --git a/Bouncer/asn1c_defs/asn_system.h b/Bouncer/e2ap/headers/asn_system.h similarity index 100% rename from Bouncer/asn1c_defs/asn_system.h rename to Bouncer/e2ap/headers/asn_system.h diff --git a/Bouncer/asn1c_defs/ber_decoder.h b/Bouncer/e2ap/headers/ber_decoder.h similarity index 100% rename from Bouncer/asn1c_defs/ber_decoder.h rename to Bouncer/e2ap/headers/ber_decoder.h diff --git a/Bouncer/asn1c_defs/ber_tlv_length.h b/Bouncer/e2ap/headers/ber_tlv_length.h similarity index 100% rename from Bouncer/asn1c_defs/ber_tlv_length.h rename to Bouncer/e2ap/headers/ber_tlv_length.h diff --git a/Bouncer/asn1c_defs/ber_tlv_tag.h b/Bouncer/e2ap/headers/ber_tlv_tag.h similarity index 100% rename from Bouncer/asn1c_defs/ber_tlv_tag.h rename to Bouncer/e2ap/headers/ber_tlv_tag.h diff --git a/Bouncer/asn1c_defs/constr_CHOICE.h b/Bouncer/e2ap/headers/constr_CHOICE.h similarity index 100% rename from Bouncer/asn1c_defs/constr_CHOICE.h rename to Bouncer/e2ap/headers/constr_CHOICE.h diff --git a/Bouncer/asn1c_defs/constr_SEQUENCE.h b/Bouncer/e2ap/headers/constr_SEQUENCE.h similarity index 100% rename from Bouncer/asn1c_defs/constr_SEQUENCE.h rename to Bouncer/e2ap/headers/constr_SEQUENCE.h diff --git a/Bouncer/asn1c_defs/constr_SEQUENCE_OF.h b/Bouncer/e2ap/headers/constr_SEQUENCE_OF.h similarity index 100% rename from Bouncer/asn1c_defs/constr_SEQUENCE_OF.h rename to Bouncer/e2ap/headers/constr_SEQUENCE_OF.h diff --git a/Bouncer/asn1c_defs/constr_SET_OF.h b/Bouncer/e2ap/headers/constr_SET_OF.h similarity index 100% rename from Bouncer/asn1c_defs/constr_SET_OF.h rename to Bouncer/e2ap/headers/constr_SET_OF.h diff --git a/Bouncer/asn1c_defs/constr_TYPE.h b/Bouncer/e2ap/headers/constr_TYPE.h similarity index 100% rename from Bouncer/asn1c_defs/constr_TYPE.h rename to Bouncer/e2ap/headers/constr_TYPE.h diff --git a/Bouncer/asn1c_defs/constraints.h b/Bouncer/e2ap/headers/constraints.h similarity index 100% rename from Bouncer/asn1c_defs/constraints.h rename to Bouncer/e2ap/headers/constraints.h diff --git a/Bouncer/asn1c_defs/der_encoder.h b/Bouncer/e2ap/headers/der_encoder.h similarity index 100% rename from Bouncer/asn1c_defs/der_encoder.h rename to Bouncer/e2ap/headers/der_encoder.h diff --git a/Bouncer/e2ap/headers/oer_decoder.h b/Bouncer/e2ap/headers/oer_decoder.h new file mode 100644 index 0000000..40992e9 --- /dev/null +++ b/Bouncer/e2ap/headers/oer_decoder.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_DECODER_H +#define OER_DECODER_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ +struct asn_codec_ctx_s; /* Forward declaration */ + +/* + * The Octet Encoding Rules (OER, X.696 08/2015) decoder for any given type. + * This function may be invoked directly by the application. + * Parses CANONICAL-OER and BASIC-OER. + */ +asn_dec_rval_t oer_decode(const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ + ); + +/* + * Type of generic function which decodes the byte stream into the structure. + */ +typedef asn_dec_rval_t(oer_type_decoder_f)( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + void **struct_ptr, + const void *buf_ptr, + size_t size); + +/* + * Swallow the Open Type (X.696 (08/2015), #30) into /dev/null. + * RETURN VALUES: + * -1: Fatal error deciphering length. + * 0: More data expected than bufptr contains. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_open_type_skip(const void *bufptr, size_t size); + +/* + * Read the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, + void **struct_ptr, const void *bufptr, size_t size); + +/* + * Length-prefixed buffer decoding for primitive types. + */ +oer_type_decoder_f oer_decode_primitive; + + +#ifdef __cplusplus +} +#endif + +#endif /* OER_DECODER_H */ diff --git a/Bouncer/e2ap/headers/oer_encoder.h b/Bouncer/e2ap/headers/oer_encoder.h new file mode 100644 index 0000000..6a7b681 --- /dev/null +++ b/Bouncer/e2ap/headers/oer_encoder.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_ENCODER_H +#define OER_ENCODER_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * The Octet Encoding Rules (OER, X.696 08/2015) encoder for any type. + * This function may be invoked directly by the application. + * Produces CANONICAL-OER output compatible with CANONICAL-OER + * and BASIC-OER decoders. + */ +asn_enc_rval_t oer_encode(const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ +); + +/* A variant of oer_encode() which encodes data into the pre-allocated buffer */ +asn_enc_rval_t oer_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +); + +/* + * Type of the generic OER encoder. + */ +typedef asn_enc_rval_t(oer_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + +/* + * Write out the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * -1: Fatal error encoding the type. + * >0: Number of bytes serialized. + */ +ssize_t oer_open_type_put(const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key); + + +/* + * Length-prefixed buffer encoding for primitive types. + */ +oer_type_encoder_f oer_encode_primitive; + +#ifdef __cplusplus +} +#endif + +#endif /* OER_ENCODER_H */ diff --git a/Bouncer/e2ap/headers/oer_support.h b/Bouncer/e2ap/headers/oer_support.h new file mode 100644 index 0000000..dbc9b5f --- /dev/null +++ b/Bouncer/e2ap/headers/oer_support.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_SUPPORT_H +#define OER_SUPPORT_H + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Pre-computed OER constraints. + */ +typedef struct asn_oer_constraint_number_s { + unsigned width; /* ±8,4,2,1 fixed bytes */ + unsigned positive; /* 1 for unsigned number, 0 for signed */ +} asn_oer_constraint_number_t; +typedef struct asn_oer_constraints_s { + asn_oer_constraint_number_t value; + ssize_t size; /* -1 (no constraint) or >= 0 */ +} asn_oer_constraints_t; + + +/* + * Fetch the length determinant (X.696 (08/2015), #8.6) into *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_fetch_length(const void *bufptr, size_t size, size_t *len_r); + +/* + * Serialize OER length. Returns the number of bytes serialized + * or -1 if a given callback returned with negative result. + */ +ssize_t oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, void *app_key); + + +#ifdef __cplusplus +} +#endif + +#endif /* OER_SUPPORT_H */ diff --git a/Bouncer/asn1c_defs/per_decoder.h b/Bouncer/e2ap/headers/per_decoder.h similarity index 100% rename from Bouncer/asn1c_defs/per_decoder.h rename to Bouncer/e2ap/headers/per_decoder.h diff --git a/Bouncer/asn1c_defs/per_encoder.h b/Bouncer/e2ap/headers/per_encoder.h similarity index 100% rename from Bouncer/asn1c_defs/per_encoder.h rename to Bouncer/e2ap/headers/per_encoder.h diff --git a/Bouncer/asn1c_defs/per_opentype.h b/Bouncer/e2ap/headers/per_opentype.h similarity index 100% rename from Bouncer/asn1c_defs/per_opentype.h rename to Bouncer/e2ap/headers/per_opentype.h diff --git a/Bouncer/asn1c_defs/per_support.h b/Bouncer/e2ap/headers/per_support.h similarity index 100% rename from Bouncer/asn1c_defs/per_support.h rename to Bouncer/e2ap/headers/per_support.h diff --git a/Bouncer/asn1c_defs/xer_decoder.h b/Bouncer/e2ap/headers/xer_decoder.h similarity index 100% rename from Bouncer/asn1c_defs/xer_decoder.h rename to Bouncer/e2ap/headers/xer_decoder.h diff --git a/Bouncer/asn1c_defs/xer_encoder.h b/Bouncer/e2ap/headers/xer_encoder.h similarity index 100% rename from Bouncer/asn1c_defs/xer_encoder.h rename to Bouncer/e2ap/headers/xer_encoder.h diff --git a/Bouncer/asn1c_defs/xer_support.h b/Bouncer/e2ap/headers/xer_support.h similarity index 100% rename from Bouncer/asn1c_defs/xer_support.h rename to Bouncer/e2ap/headers/xer_support.h diff --git a/Bouncer/asn1c_defs/ANY.c b/Bouncer/e2ap/lib/ANY.c similarity index 100% rename from Bouncer/asn1c_defs/ANY.c rename to Bouncer/e2ap/lib/ANY.c diff --git a/Bouncer/asn1c_defs/BIT_STRING.c b/Bouncer/e2ap/lib/BIT_STRING.c similarity index 100% rename from Bouncer/asn1c_defs/BIT_STRING.c rename to Bouncer/e2ap/lib/BIT_STRING.c diff --git a/Bouncer/e2ap/lib/BIT_STRING_oer.c b/Bouncer/e2ap/lib/BIT_STRING_oer.c new file mode 100644 index 0000000..aff5075 --- /dev/null +++ b/Bouncer/e2ap/lib/BIT_STRING_oer.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +BIT_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + + (void)opt_codec_ctx; + + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + if(ct_size >= 0) { + expected_length = (ct_size + 7) >> 3; + st->bits_unused = (8 - (ct_size & 7)) & 7; + } else { + /* + * X.696 (08/2015) #13.3.1 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(expected_length < 1) { + ASN__DECODE_FAILED; + } else if(expected_length > size) { + ASN__DECODE_STARVED; + } + + st->bits_unused = ((const uint8_t *)ptr)[0]; + if(st->bits_unused & ~7) { + ASN_DEBUG("%s: unused bits outside of 0..7 range", td->name); + ASN__DECODE_FAILED; + } + ptr = (const char *)ptr + 1; + size--; + expected_length--; + rval.consumed = len_len + 1; + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + if(expected_length > 0) { + buf[expected_length - 1] &= (0xff << st->bits_unused); + } + + rval.consumed += expected_length; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +BIT_STRING_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + asn_enc_rval_t erval = {0, 0, 0}; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + size_t trailing_zeros = 0; + int fix_last_byte = 0; + + if(!st) ASN__ENCODE_FAILED; + + if(st->bits_unused & ~7) { + ASN_DEBUG("BIT STRING unused bits %d out of 0..7 range", + st->bits_unused); + ASN__ENCODE_FAILED; + } + if(st->bits_unused && !(st->size && st->buf)) { + ASN_DEBUG("BIT STRING %s size 0 can't support unused bits %d", td->name, + st->bits_unused); + ASN__ENCODE_FAILED; + } + + if(ct_size >= 0) { + size_t ct_bytes = (ct_size + 7) >> 3; + if(st->size > ct_bytes) { + ASN_DEBUG("More bits in BIT STRING %s (%" ASN_PRI_SSIZE ") than constrained %" ASN_PRI_SSIZE "", + td->name, 8 * st->size - st->bits_unused, ct_size); + ASN__ENCODE_FAILED; + } + trailing_zeros = ct_bytes - st->size; /* Allow larger constraint */ + } else { + uint8_t ub = st->bits_unused & 7; + ssize_t len_len = oer_serialize_length(1 + st->size, cb, app_key); + if(len_len < 0) ASN__ENCODE_FAILED; + if(cb(&ub, 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + erval.encoded += len_len + 1; + } + + if(st->bits_unused) { + if(st->buf[st->size - 1] & (0xff << st->bits_unused)) { + fix_last_byte = 1; + } + } + + if(cb(st->buf, st->size - fix_last_byte, app_key) < 0) { + ASN__ENCODE_FAILED; + } + + if(fix_last_byte) { + uint8_t b = st->buf[st->size - 1] & (0xff << st->bits_unused); + if(cb(&b, 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + } + + erval.encoded += st->size; + + if(trailing_zeros) { + static uint8_t zeros[16]; + while(trailing_zeros > 0) { + int ret; + if(trailing_zeros < sizeof(zeros)) { + ret = cb(zeros, trailing_zeros, app_key); + erval.encoded += trailing_zeros; + } else { + ret = cb(zeros, sizeof(zeros), app_key); + erval.encoded += sizeof(zeros); + } + if(ret < 0) ASN__ENCODE_FAILED; + } + } + + return erval; +} + + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2ap/lib/Cause.c b/Bouncer/e2ap/lib/Cause.c new file mode 100644 index 0000000..bdb51be --- /dev/null +++ b/Bouncer/e2ap/lib/Cause.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "Cause.h" + +static asn_oer_constraints_t asn_OER_type_Cause_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_Cause_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_Cause_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.ricRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CauseRIC, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.ricService), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CauseRICservice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricService" + }, + { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.transport), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CauseTransport, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "transport" + }, + { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.protocol), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CauseProtocol, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocol" + }, + { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.misc), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CauseMisc, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "misc" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Cause_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* misc */ +}; +asn_CHOICE_specifics_t asn_SPC_Cause_specs_1 = { + sizeof(struct Cause), + offsetof(struct Cause, _asn_ctx), + offsetof(struct Cause, present), + sizeof(((struct Cause *)0)->present), + asn_MAP_Cause_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + 5 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Cause = { + "Cause", + "Cause", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_Cause_constr_1, &asn_PER_type_Cause_constr_1, CHOICE_constraint }, + asn_MBR_Cause_1, + 5, /* Elements count */ + &asn_SPC_Cause_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CauseMisc.c b/Bouncer/e2ap/lib/CauseMisc.c new file mode 100644 index 0000000..e09c0b1 --- /dev/null +++ b/Bouncer/e2ap/lib/CauseMisc.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CauseMisc.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_CauseMisc_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_CauseMisc_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_CauseMisc_value2enum_1[] = { + { 0, 27, "control-processing-overload" }, + { 1, 16, "hardware-failure" }, + { 2, 15, "om-intervention" }, + { 3, 11, "unspecified" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_CauseMisc_enum2value_1[] = { + 0, /* control-processing-overload(0) */ + 1, /* hardware-failure(1) */ + 2, /* om-intervention(2) */ + 3 /* unspecified(3) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_CauseMisc_specs_1 = { + asn_MAP_CauseMisc_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_CauseMisc_enum2value_1, /* N => "tag"; sorted by N */ + 4, /* Number of elements in the maps */ + 5, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_CauseMisc_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_CauseMisc = { + "CauseMisc", + "CauseMisc", + &asn_OP_NativeEnumerated, + asn_DEF_CauseMisc_tags_1, + sizeof(asn_DEF_CauseMisc_tags_1) + /sizeof(asn_DEF_CauseMisc_tags_1[0]), /* 1 */ + asn_DEF_CauseMisc_tags_1, /* Same as above */ + sizeof(asn_DEF_CauseMisc_tags_1) + /sizeof(asn_DEF_CauseMisc_tags_1[0]), /* 1 */ + { &asn_OER_type_CauseMisc_constr_1, &asn_PER_type_CauseMisc_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_CauseMisc_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CauseProtocol.c b/Bouncer/e2ap/lib/CauseProtocol.c new file mode 100644 index 0000000..66bb383 --- /dev/null +++ b/Bouncer/e2ap/lib/CauseProtocol.c @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CauseProtocol.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_CauseProtocol_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_CauseProtocol_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_CauseProtocol_value2enum_1[] = { + { 0, 21, "transfer-syntax-error" }, + { 1, 28, "abstract-syntax-error-reject" }, + { 2, 39, "abstract-syntax-error-ignore-and-notify" }, + { 3, 42, "message-not-compatible-with-receiver-state" }, + { 4, 14, "semantic-error" }, + { 5, 49, "abstract-syntax-error-falsely-constructed-message" }, + { 6, 11, "unspecified" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_CauseProtocol_enum2value_1[] = { + 5, /* abstract-syntax-error-falsely-constructed-message(5) */ + 2, /* abstract-syntax-error-ignore-and-notify(2) */ + 1, /* abstract-syntax-error-reject(1) */ + 3, /* message-not-compatible-with-receiver-state(3) */ + 4, /* semantic-error(4) */ + 0, /* transfer-syntax-error(0) */ + 6 /* unspecified(6) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_CauseProtocol_specs_1 = { + asn_MAP_CauseProtocol_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_CauseProtocol_enum2value_1, /* N => "tag"; sorted by N */ + 7, /* Number of elements in the maps */ + 8, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_CauseProtocol_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_CauseProtocol = { + "CauseProtocol", + "CauseProtocol", + &asn_OP_NativeEnumerated, + asn_DEF_CauseProtocol_tags_1, + sizeof(asn_DEF_CauseProtocol_tags_1) + /sizeof(asn_DEF_CauseProtocol_tags_1[0]), /* 1 */ + asn_DEF_CauseProtocol_tags_1, /* Same as above */ + sizeof(asn_DEF_CauseProtocol_tags_1) + /sizeof(asn_DEF_CauseProtocol_tags_1[0]), /* 1 */ + { &asn_OER_type_CauseProtocol_constr_1, &asn_PER_type_CauseProtocol_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_CauseProtocol_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CauseRIC.c b/Bouncer/e2ap/lib/CauseRIC.c new file mode 100644 index 0000000..7d94696 --- /dev/null +++ b/Bouncer/e2ap/lib/CauseRIC.c @@ -0,0 +1,76 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CauseRIC.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_CauseRIC_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_CauseRIC_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 10 } /* (0..10,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_CauseRIC_value2enum_1[] = { + { 0, 23, "ran-function-id-Invalid" }, + { 1, 20, "action-not-supported" }, + { 2, 17, "excessive-actions" }, + { 3, 16, "duplicate-action" }, + { 4, 15, "duplicate-event" }, + { 5, 23, "function-resource-limit" }, + { 6, 18, "request-id-unknown" }, + { 7, 46, "inconsistent-action-subsequent-action-sequence" }, + { 8, 23, "control-message-invalid" }, + { 9, 23, "call-process-id-invalid" }, + { 10, 11, "unspecified" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_CauseRIC_enum2value_1[] = { + 1, /* action-not-supported(1) */ + 9, /* call-process-id-invalid(9) */ + 8, /* control-message-invalid(8) */ + 3, /* duplicate-action(3) */ + 4, /* duplicate-event(4) */ + 2, /* excessive-actions(2) */ + 5, /* function-resource-limit(5) */ + 7, /* inconsistent-action-subsequent-action-sequence(7) */ + 0, /* ran-function-id-Invalid(0) */ + 6, /* request-id-unknown(6) */ + 10 /* unspecified(10) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_CauseRIC_specs_1 = { + asn_MAP_CauseRIC_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_CauseRIC_enum2value_1, /* N => "tag"; sorted by N */ + 11, /* Number of elements in the maps */ + 12, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_CauseRIC_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_CauseRIC = { + "CauseRIC", + "CauseRIC", + &asn_OP_NativeEnumerated, + asn_DEF_CauseRIC_tags_1, + sizeof(asn_DEF_CauseRIC_tags_1) + /sizeof(asn_DEF_CauseRIC_tags_1[0]), /* 1 */ + asn_DEF_CauseRIC_tags_1, /* Same as above */ + sizeof(asn_DEF_CauseRIC_tags_1) + /sizeof(asn_DEF_CauseRIC_tags_1[0]), /* 1 */ + { &asn_OER_type_CauseRIC_constr_1, &asn_PER_type_CauseRIC_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_CauseRIC_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CauseRICservice.c b/Bouncer/e2ap/lib/CauseRICservice.c new file mode 100644 index 0000000..c2cbccb --- /dev/null +++ b/Bouncer/e2ap/lib/CauseRICservice.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CauseRICservice.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_CauseRICservice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_CauseRICservice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_CauseRICservice_value2enum_1[] = { + { 0, 21, "function-not-required" }, + { 1, 19, "excessive-functions" }, + { 2, 18, "ric-resource-limit" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_CauseRICservice_enum2value_1[] = { + 1, /* excessive-functions(1) */ + 0, /* function-not-required(0) */ + 2 /* ric-resource-limit(2) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_CauseRICservice_specs_1 = { + asn_MAP_CauseRICservice_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_CauseRICservice_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_CauseRICservice_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_CauseRICservice = { + "CauseRICservice", + "CauseRICservice", + &asn_OP_NativeEnumerated, + asn_DEF_CauseRICservice_tags_1, + sizeof(asn_DEF_CauseRICservice_tags_1) + /sizeof(asn_DEF_CauseRICservice_tags_1[0]), /* 1 */ + asn_DEF_CauseRICservice_tags_1, /* Same as above */ + sizeof(asn_DEF_CauseRICservice_tags_1) + /sizeof(asn_DEF_CauseRICservice_tags_1[0]), /* 1 */ + { &asn_OER_type_CauseRICservice_constr_1, &asn_PER_type_CauseRICservice_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_CauseRICservice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CauseTransport.c b/Bouncer/e2ap/lib/CauseTransport.c new file mode 100644 index 0000000..a0a5f38 --- /dev/null +++ b/Bouncer/e2ap/lib/CauseTransport.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CauseTransport.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_CauseTransport_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_CauseTransport_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_CauseTransport_value2enum_1[] = { + { 0, 11, "unspecified" }, + { 1, 30, "transport-resource-unavailable" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_CauseTransport_enum2value_1[] = { + 1, /* transport-resource-unavailable(1) */ + 0 /* unspecified(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_CauseTransport_specs_1 = { + asn_MAP_CauseTransport_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_CauseTransport_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_CauseTransport_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_CauseTransport = { + "CauseTransport", + "CauseTransport", + &asn_OP_NativeEnumerated, + asn_DEF_CauseTransport_tags_1, + sizeof(asn_DEF_CauseTransport_tags_1) + /sizeof(asn_DEF_CauseTransport_tags_1[0]), /* 1 */ + asn_DEF_CauseTransport_tags_1, /* Same as above */ + sizeof(asn_DEF_CauseTransport_tags_1) + /sizeof(asn_DEF_CauseTransport_tags_1[0]), /* 1 */ + { &asn_OER_type_CauseTransport_constr_1, &asn_PER_type_CauseTransport_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_CauseTransport_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/Criticality.c b/Bouncer/e2ap/lib/Criticality.c new file mode 100644 index 0000000..9bfe1ca --- /dev/null +++ b/Bouncer/e2ap/lib/Criticality.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "Criticality.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_Criticality_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_Criticality_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_Criticality_value2enum_1[] = { + { 0, 6, "reject" }, + { 1, 6, "ignore" }, + { 2, 6, "notify" } +}; +static const unsigned int asn_MAP_Criticality_enum2value_1[] = { + 1, /* ignore(1) */ + 2, /* notify(2) */ + 0 /* reject(0) */ +}; +const asn_INTEGER_specifics_t asn_SPC_Criticality_specs_1 = { + asn_MAP_Criticality_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Criticality_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Criticality_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Criticality = { + "Criticality", + "Criticality", + &asn_OP_NativeEnumerated, + asn_DEF_Criticality_tags_1, + sizeof(asn_DEF_Criticality_tags_1) + /sizeof(asn_DEF_Criticality_tags_1[0]), /* 1 */ + asn_DEF_Criticality_tags_1, /* Same as above */ + sizeof(asn_DEF_Criticality_tags_1) + /sizeof(asn_DEF_Criticality_tags_1[0]), /* 1 */ + { &asn_OER_type_Criticality_constr_1, &asn_PER_type_Criticality_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Criticality_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CriticalityDiagnostics-IE-Item.c b/Bouncer/e2ap/lib/CriticalityDiagnostics-IE-Item.c new file mode 100644 index 0000000..d950a0c --- /dev/null +++ b/Bouncer/e2ap/lib/CriticalityDiagnostics-IE-Item.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CriticalityDiagnostics-IE-Item.h" + +asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, iECriticality), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Criticality, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iECriticality" + }, + { ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, iE_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iE-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, typeOfError), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TypeOfError, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "typeOfError" + }, +}; +static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CriticalityDiagnostics_IE_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iECriticality */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* iE-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* typeOfError */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_IE_Item_specs_1 = { + sizeof(struct CriticalityDiagnostics_IE_Item), + offsetof(struct CriticalityDiagnostics_IE_Item, _asn_ctx), + asn_MAP_CriticalityDiagnostics_IE_Item_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_Item = { + "CriticalityDiagnostics-IE-Item", + "CriticalityDiagnostics-IE-Item", + &asn_OP_SEQUENCE, + asn_DEF_CriticalityDiagnostics_IE_Item_tags_1, + sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1) + /sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */ + asn_DEF_CriticalityDiagnostics_IE_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1) + /sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CriticalityDiagnostics_IE_Item_1, + 3, /* Elements count */ + &asn_SPC_CriticalityDiagnostics_IE_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CriticalityDiagnostics-IE-List.c b/Bouncer/e2ap/lib/CriticalityDiagnostics-IE-List.c new file mode 100644 index 0000000..29ae2dd --- /dev/null +++ b/Bouncer/e2ap/lib/CriticalityDiagnostics-IE-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CriticalityDiagnostics-IE-List.h" + +#include "CriticalityDiagnostics-IE-Item.h" +static asn_oer_constraints_t asn_OER_type_CriticalityDiagnostics_IE_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..256)) */}; +asn_per_constraints_t asn_PER_type_CriticalityDiagnostics_IE_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics_IE_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_IE_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_CriticalityDiagnostics_IE_List_specs_1 = { + sizeof(struct CriticalityDiagnostics_IE_List), + offsetof(struct CriticalityDiagnostics_IE_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_List = { + "CriticalityDiagnostics-IE-List", + "CriticalityDiagnostics-IE-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_CriticalityDiagnostics_IE_List_tags_1, + sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1) + /sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */ + asn_DEF_CriticalityDiagnostics_IE_List_tags_1, /* Same as above */ + sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1) + /sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */ + { &asn_OER_type_CriticalityDiagnostics_IE_List_constr_1, &asn_PER_type_CriticalityDiagnostics_IE_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_CriticalityDiagnostics_IE_List_1, + 1, /* Single element */ + &asn_SPC_CriticalityDiagnostics_IE_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/CriticalityDiagnostics.c b/Bouncer/e2ap/lib/CriticalityDiagnostics.c new file mode 100644 index 0000000..c07926c --- /dev/null +++ b/Bouncer/e2ap/lib/CriticalityDiagnostics.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CriticalityDiagnostics.h" + +#include "RICrequestID.h" +#include "CriticalityDiagnostics-IE-List.h" +asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = { + { ATF_POINTER, 5, offsetof(struct CriticalityDiagnostics, procedureCode), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProcedureCode, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "procedureCode" + }, + { ATF_POINTER, 4, offsetof(struct CriticalityDiagnostics, triggeringMessage), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TriggeringMessage, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "triggeringMessage" + }, + { ATF_POINTER, 3, offsetof(struct CriticalityDiagnostics, procedureCriticality), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Criticality, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "procedureCriticality" + }, + { ATF_POINTER, 2, offsetof(struct CriticalityDiagnostics, ricRequestorID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricRequestorID" + }, + { ATF_POINTER, 1, offsetof(struct CriticalityDiagnostics, iEsCriticalityDiagnostics), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CriticalityDiagnostics_IE_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iEsCriticalityDiagnostics" + }, +}; +static const int asn_MAP_CriticalityDiagnostics_oms_1[] = { 0, 1, 2, 3, 4 }; +static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CriticalityDiagnostics_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* triggeringMessage */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* procedureCriticality */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ricRequestorID */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iEsCriticalityDiagnostics */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_specs_1 = { + sizeof(struct CriticalityDiagnostics), + offsetof(struct CriticalityDiagnostics, _asn_ctx), + asn_MAP_CriticalityDiagnostics_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_CriticalityDiagnostics_oms_1, /* Optional members */ + 5, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics = { + "CriticalityDiagnostics", + "CriticalityDiagnostics", + &asn_OP_SEQUENCE, + asn_DEF_CriticalityDiagnostics_tags_1, + sizeof(asn_DEF_CriticalityDiagnostics_tags_1) + /sizeof(asn_DEF_CriticalityDiagnostics_tags_1[0]), /* 1 */ + asn_DEF_CriticalityDiagnostics_tags_1, /* Same as above */ + sizeof(asn_DEF_CriticalityDiagnostics_tags_1) + /sizeof(asn_DEF_CriticalityDiagnostics_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CriticalityDiagnostics_1, + 5, /* Elements count */ + &asn_SPC_CriticalityDiagnostics_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/E2AP-PDU.c b/Bouncer/e2ap/lib/E2AP-PDU.c new file mode 100644 index 0000000..c8386c2 --- /dev/null +++ b/Bouncer/e2ap/lib/E2AP-PDU.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2AP-PDU.h" + +#include "InitiatingMessage.h" +#include "SuccessfulOutcome.h" +#include "UnsuccessfulOutcome.h" +static asn_oer_constraints_t asn_OER_type_E2AP_PDU_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_E2AP_PDU_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_E2AP_PDU_1[] = { + { ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.initiatingMessage), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InitiatingMessage, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "initiatingMessage" + }, + { ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.successfulOutcome), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SuccessfulOutcome, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "successfulOutcome" + }, + { ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.unsuccessfulOutcome), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UnsuccessfulOutcome, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "unsuccessfulOutcome" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_E2AP_PDU_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* initiatingMessage */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* successfulOutcome */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* unsuccessfulOutcome */ +}; +static asn_CHOICE_specifics_t asn_SPC_E2AP_PDU_specs_1 = { + sizeof(struct E2AP_PDU), + offsetof(struct E2AP_PDU, _asn_ctx), + offsetof(struct E2AP_PDU, present), + sizeof(((struct E2AP_PDU *)0)->present), + asn_MAP_E2AP_PDU_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_E2AP_PDU = { + "E2AP-PDU", + "E2AP-PDU", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_E2AP_PDU_constr_1, &asn_PER_type_E2AP_PDU_constr_1, CHOICE_constraint }, + asn_MBR_E2AP_PDU_1, + 3, /* Elements count */ + &asn_SPC_E2AP_PDU_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/E2setupFailure.c b/Bouncer/e2ap/lib/E2setupFailure.c new file mode 100644 index 0000000..1b0bd35 --- /dev/null +++ b/Bouncer/e2ap/lib/E2setupFailure.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2setupFailure.h" + +static asn_TYPE_member_t asn_MBR_E2setupFailure_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailure, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P13, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2setupFailure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2setupFailure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2setupFailure_specs_1 = { + sizeof(struct E2setupFailure), + offsetof(struct E2setupFailure, _asn_ctx), + asn_MAP_E2setupFailure_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2setupFailure = { + "E2setupFailure", + "E2setupFailure", + &asn_OP_SEQUENCE, + asn_DEF_E2setupFailure_tags_1, + sizeof(asn_DEF_E2setupFailure_tags_1) + /sizeof(asn_DEF_E2setupFailure_tags_1[0]), /* 1 */ + asn_DEF_E2setupFailure_tags_1, /* Same as above */ + sizeof(asn_DEF_E2setupFailure_tags_1) + /sizeof(asn_DEF_E2setupFailure_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2setupFailure_1, + 1, /* Elements count */ + &asn_SPC_E2setupFailure_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/E2setupRequest.c b/Bouncer/e2ap/lib/E2setupRequest.c new file mode 100644 index 0000000..92fd09b --- /dev/null +++ b/Bouncer/e2ap/lib/E2setupRequest.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2setupRequest.h" + +static asn_TYPE_member_t asn_MBR_E2setupRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequest, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P11, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2setupRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2setupRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2setupRequest_specs_1 = { + sizeof(struct E2setupRequest), + offsetof(struct E2setupRequest, _asn_ctx), + asn_MAP_E2setupRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2setupRequest = { + "E2setupRequest", + "E2setupRequest", + &asn_OP_SEQUENCE, + asn_DEF_E2setupRequest_tags_1, + sizeof(asn_DEF_E2setupRequest_tags_1) + /sizeof(asn_DEF_E2setupRequest_tags_1[0]), /* 1 */ + asn_DEF_E2setupRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_E2setupRequest_tags_1) + /sizeof(asn_DEF_E2setupRequest_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2setupRequest_1, + 1, /* Elements count */ + &asn_SPC_E2setupRequest_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/E2setupResponse.c b/Bouncer/e2ap/lib/E2setupResponse.c new file mode 100644 index 0000000..b08bc06 --- /dev/null +++ b/Bouncer/e2ap/lib/E2setupResponse.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2setupResponse.h" + +static asn_TYPE_member_t asn_MBR_E2setupResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponse, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P12, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2setupResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2setupResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2setupResponse_specs_1 = { + sizeof(struct E2setupResponse), + offsetof(struct E2setupResponse, _asn_ctx), + asn_MAP_E2setupResponse_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2setupResponse = { + "E2setupResponse", + "E2setupResponse", + &asn_OP_SEQUENCE, + asn_DEF_E2setupResponse_tags_1, + sizeof(asn_DEF_E2setupResponse_tags_1) + /sizeof(asn_DEF_E2setupResponse_tags_1[0]), /* 1 */ + asn_DEF_E2setupResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_E2setupResponse_tags_1) + /sizeof(asn_DEF_E2setupResponse_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2setupResponse_1, + 1, /* Elements count */ + &asn_SPC_E2setupResponse_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ENB-ID-Choice.c b/Bouncer/e2ap/lib/ENB-ID-Choice.c new file mode 100644 index 0000000..b95e5eb --- /dev/null +++ b/Bouncer/e2ap/lib/ENB-ID-Choice.c @@ -0,0 +1,192 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENB-ID-Choice.h" + +static int +memb_enb_ID_macro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_enb_ID_shortmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 18)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_enb_ID_longmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 21)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_enb_ID_macro_constr_2 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +static asn_per_constraints_t asn_PER_memb_enb_ID_macro_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = { + { 0, 0 }, + 18 /* (SIZE(18..18)) */}; +static asn_per_constraints_t asn_PER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = { + { 0, 0 }, + 21 /* (SIZE(21..21)) */}; +static asn_per_constraints_t asn_PER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_macro), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_enb_ID_macro_constr_2, &asn_PER_memb_enb_ID_macro_constr_2, memb_enb_ID_macro_constraint_1 }, + 0, 0, /* No default value */ + "enb-ID-macro" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_shortmacro), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_enb_ID_shortmacro_constr_3, &asn_PER_memb_enb_ID_shortmacro_constr_3, memb_enb_ID_shortmacro_constraint_1 }, + 0, 0, /* No default value */ + "enb-ID-shortmacro" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_longmacro), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_enb_ID_longmacro_constr_4, &asn_PER_memb_enb_ID_longmacro_constr_4, memb_enb_ID_longmacro_constraint_1 }, + 0, 0, /* No default value */ + "enb-ID-longmacro" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_Choice_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enb-ID-macro */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enb-ID-shortmacro */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* enb-ID-longmacro */ +}; +asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1 = { + sizeof(struct ENB_ID_Choice), + offsetof(struct ENB_ID_Choice, _asn_ctx), + offsetof(struct ENB_ID_Choice, present), + sizeof(((struct ENB_ID_Choice *)0)->present), + asn_MAP_ENB_ID_Choice_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice = { + "ENB-ID-Choice", + "ENB-ID-Choice", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ENB_ID_Choice_constr_1, &asn_PER_type_ENB_ID_Choice_constr_1, CHOICE_constraint }, + asn_MBR_ENB_ID_Choice_1, + 3, /* Elements count */ + &asn_SPC_ENB_ID_Choice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ENB-ID.c b/Bouncer/e2ap/lib/ENB-ID.c new file mode 100644 index 0000000..96b8cb5 --- /dev/null +++ b/Bouncer/e2ap/lib/ENB-ID.c @@ -0,0 +1,241 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENB-ID.h" + +static int +memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 28)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 18)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 21)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +static asn_per_constraints_t asn_PER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { + { 0, 0 }, + 28 /* (SIZE(28..28)) */}; +static asn_per_constraints_t asn_PER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { + { 0, 0 }, + 18 /* (SIZE(18..18)) */}; +static asn_per_constraints_t asn_PER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { + { 0, 0 }, + 21 /* (SIZE(21..21)) */}; +static asn_per_constraints_t asn_PER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ENB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ENB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_macro_eNB_ID_constr_2, &asn_PER_memb_macro_eNB_ID_constr_2, memb_macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "macro-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.home_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_home_eNB_ID_constr_3, &asn_PER_memb_home_eNB_ID_constr_3, memb_home_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "home-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.short_Macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_short_Macro_eNB_ID_constr_5, &asn_PER_memb_short_Macro_eNB_ID_constr_5, memb_short_Macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "short-Macro-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.long_Macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_long_Macro_eNB_ID_constr_6, &asn_PER_memb_long_Macro_eNB_ID_constr_6, memb_long_Macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "long-Macro-eNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macro-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* home-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-Macro-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-Macro-eNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1 = { + sizeof(struct ENB_ID), + offsetof(struct ENB_ID, _asn_ctx), + offsetof(struct ENB_ID, present), + sizeof(((struct ENB_ID *)0)->present), + asn_MAP_ENB_ID_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ENB_ID = { + "ENB-ID", + "ENB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ENB_ID_constr_1, &asn_PER_type_ENB_ID_constr_1, CHOICE_constraint }, + asn_MBR_ENB_ID_1, + 4, /* Elements count */ + &asn_SPC_ENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ENGNB-ID.c b/Bouncer/e2ap/lib/ENGNB-ID.c new file mode 100644 index 0000000..4bfdbd8 --- /dev/null +++ b/Bouncer/e2ap/lib/ENGNB-ID.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENGNB-ID.h" + +static int +memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +static asn_per_constraints_t asn_PER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ENGNB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ENGNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ENGNB_ID, choice.gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_gNB_ID_constr_2, &asn_PER_memb_gNB_ID_constr_2, memb_gNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ENGNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_ENGNB_ID_specs_1 = { + sizeof(struct ENGNB_ID), + offsetof(struct ENGNB_ID, _asn_ctx), + offsetof(struct ENGNB_ID, present), + sizeof(((struct ENGNB_ID *)0)->present), + asn_MAP_ENGNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ENGNB_ID = { + "ENGNB-ID", + "ENGNB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ENGNB_ID_constr_1, &asn_PER_type_ENGNB_ID_constr_1, CHOICE_constraint }, + asn_MBR_ENGNB_ID_1, + 1, /* Elements count */ + &asn_SPC_ENGNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ErrorIndication.c b/Bouncer/e2ap/lib/ErrorIndication.c new file mode 100644 index 0000000..a47c6e0 --- /dev/null +++ b/Bouncer/e2ap/lib/ErrorIndication.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ErrorIndication.h" + +static asn_TYPE_member_t asn_MBR_ErrorIndication_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P10, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_ErrorIndication_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_specs_1 = { + sizeof(struct ErrorIndication), + offsetof(struct ErrorIndication, _asn_ctx), + asn_MAP_ErrorIndication_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ErrorIndication = { + "ErrorIndication", + "ErrorIndication", + &asn_OP_SEQUENCE, + asn_DEF_ErrorIndication_tags_1, + sizeof(asn_DEF_ErrorIndication_tags_1) + /sizeof(asn_DEF_ErrorIndication_tags_1[0]), /* 1 */ + asn_DEF_ErrorIndication_tags_1, /* Same as above */ + sizeof(asn_DEF_ErrorIndication_tags_1) + /sizeof(asn_DEF_ErrorIndication_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ErrorIndication_1, + 1, /* Elements count */ + &asn_SPC_ErrorIndication_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GNB-CU-UP-ID.c b/Bouncer/e2ap/lib/GNB-CU-UP-ID.c new file mode 100644 index 0000000..8f960e2 --- /dev/null +++ b/Bouncer/e2ap/lib/GNB-CU-UP-ID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-CU-UP-ID.h" + +int +GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID = { + "GNB-CU-UP-ID", + "GNB-CU-UP-ID", + &asn_OP_INTEGER, + asn_DEF_GNB_CU_UP_ID_tags_1, + sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_UP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_CU_UP_ID_constr_1, &asn_PER_type_GNB_CU_UP_ID_constr_1, GNB_CU_UP_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/GNB-DU-ID.c b/Bouncer/e2ap/lib/GNB-DU-ID.c new file mode 100644 index 0000000..6c0940d --- /dev/null +++ b/Bouncer/e2ap/lib/GNB-DU-ID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-DU-ID.h" + +int +GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_DU_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID = { + "GNB-DU-ID", + "GNB-DU-ID", + &asn_OP_INTEGER, + asn_DEF_GNB_DU_ID_tags_1, + sizeof(asn_DEF_GNB_DU_ID_tags_1) + /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_DU_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_DU_ID_tags_1) + /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_DU_ID_constr_1, &asn_PER_type_GNB_DU_ID_constr_1, GNB_DU_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/GNB-ID-Choice.c b/Bouncer/e2ap/lib/GNB-ID-Choice.c new file mode 100644 index 0000000..085a942 --- /dev/null +++ b/Bouncer/e2ap/lib/GNB-ID-Choice.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-ID-Choice.h" + +static int +memb_gnb_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_gnb_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +static asn_per_constraints_t asn_PER_memb_gnb_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_GNB_ID_Choice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GNB_ID_Choice_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GNB_ID_Choice, choice.gnb_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_gnb_ID_constr_2, &asn_PER_memb_gnb_ID_constr_2, memb_gnb_ID_constraint_1 }, + 0, 0, /* No default value */ + "gnb-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GNB_ID_Choice_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gnb-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_GNB_ID_Choice_specs_1 = { + sizeof(struct GNB_ID_Choice), + offsetof(struct GNB_ID_Choice, _asn_ctx), + offsetof(struct GNB_ID_Choice, present), + sizeof(((struct GNB_ID_Choice *)0)->present), + asn_MAP_GNB_ID_Choice_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice = { + "GNB-ID-Choice", + "GNB-ID-Choice", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GNB_ID_Choice_constr_1, &asn_PER_type_GNB_ID_Choice_constr_1, CHOICE_constraint }, + asn_MBR_GNB_ID_Choice_1, + 1, /* Elements count */ + &asn_SPC_GNB_ID_Choice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalE2node-ID.c b/Bouncer/e2ap/lib/GlobalE2node-ID.c new file mode 100644 index 0000000..13a8295 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalE2node-ID.c @@ -0,0 +1,89 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalE2node-ID.h" + +#include "GlobalE2node-gNB-ID.h" +#include "GlobalE2node-en-gNB-ID.h" +#include "GlobalE2node-ng-eNB-ID.h" +#include "GlobalE2node-eNB-ID.h" +static asn_oer_constraints_t asn_OER_type_GlobalE2node_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GlobalE2node_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GlobalE2node_ID_1[] = { + { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.gNB), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalE2node_gNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.en_gNB), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalE2node_en_gNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "en-gNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.ng_eNB), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalE2node_ng_eNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.eNB), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalE2node_eNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eNB" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* en-gNB */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ng-eNB */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eNB */ +}; +asn_CHOICE_specifics_t asn_SPC_GlobalE2node_ID_specs_1 = { + sizeof(struct GlobalE2node_ID), + offsetof(struct GlobalE2node_ID, _asn_ctx), + offsetof(struct GlobalE2node_ID, present), + sizeof(((struct GlobalE2node_ID *)0)->present), + asn_MAP_GlobalE2node_ID_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ID = { + "GlobalE2node-ID", + "GlobalE2node-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GlobalE2node_ID_constr_1, &asn_PER_type_GlobalE2node_ID_constr_1, CHOICE_constraint }, + asn_MBR_GlobalE2node_ID_1, + 4, /* Elements count */ + &asn_SPC_GlobalE2node_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalE2node-eNB-ID.c b/Bouncer/e2ap/lib/GlobalE2node-eNB-ID.c new file mode 100644 index 0000000..7cb93f1 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalE2node-eNB-ID.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalE2node-eNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_eNB_ID, global_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-eNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalE2node_eNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_eNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-eNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_eNB_ID_specs_1 = { + sizeof(struct GlobalE2node_eNB_ID), + offsetof(struct GlobalE2node_eNB_ID, _asn_ctx), + asn_MAP_GlobalE2node_eNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalE2node_eNB_ID = { + "GlobalE2node-eNB-ID", + "GlobalE2node-eNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalE2node_eNB_ID_tags_1, + sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalE2node_eNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalE2node_eNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GlobalE2node_eNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalE2node-en-gNB-ID.c b/Bouncer/e2ap/lib/GlobalE2node-en-gNB-ID.c new file mode 100644 index 0000000..6444325 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalE2node-en-gNB-ID.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalE2node-en-gNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalE2node_en_gNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_en_gNB_ID, global_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalenGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-gNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalE2node_en_gNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_en_gNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-gNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_en_gNB_ID_specs_1 = { + sizeof(struct GlobalE2node_en_gNB_ID), + offsetof(struct GlobalE2node_en_gNB_ID, _asn_ctx), + asn_MAP_GlobalE2node_en_gNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID = { + "GlobalE2node-en-gNB-ID", + "GlobalE2node-en-gNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalE2node_en_gNB_ID_tags_1, + sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalE2node_en_gNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalE2node_en_gNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GlobalE2node_en_gNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalE2node-gNB-ID.c b/Bouncer/e2ap/lib/GlobalE2node-gNB-ID.c new file mode 100644 index 0000000..31bf024 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalE2node-gNB-ID.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalE2node-gNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalE2node_gNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_gNB_ID, global_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalgNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-gNB-ID" + }, + { ATF_POINTER, 2, offsetof(struct GlobalE2node_gNB_ID, gNB_CU_UP_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-ID" + }, + { ATF_POINTER, 1, offsetof(struct GlobalE2node_gNB_ID, gNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-ID" + }, +}; +static const int asn_MAP_GlobalE2node_gNB_ID_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_GlobalE2node_gNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_gNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-gNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-CU-UP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_gNB_ID_specs_1 = { + sizeof(struct GlobalE2node_gNB_ID), + offsetof(struct GlobalE2node_gNB_ID, _asn_ctx), + asn_MAP_GlobalE2node_gNB_ID_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_GlobalE2node_gNB_ID_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID = { + "GlobalE2node-gNB-ID", + "GlobalE2node-gNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalE2node_gNB_ID_tags_1, + sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalE2node_gNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalE2node_gNB_ID_1, + 3, /* Elements count */ + &asn_SPC_GlobalE2node_gNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalE2node-ng-eNB-ID.c b/Bouncer/e2ap/lib/GlobalE2node-ng-eNB-ID.c new file mode 100644 index 0000000..b3bb491 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalE2node-ng-eNB-ID.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalE2node-ng-eNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalE2node_ng_eNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_ng_eNB_ID, global_ng_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalngeNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-ng-eNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_ng_eNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-ng-eNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_ng_eNB_ID_specs_1 = { + sizeof(struct GlobalE2node_ng_eNB_ID), + offsetof(struct GlobalE2node_ng_eNB_ID, _asn_ctx), + asn_MAP_GlobalE2node_ng_eNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID = { + "GlobalE2node-ng-eNB-ID", + "GlobalE2node-ng-eNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalE2node_ng_eNB_ID_tags_1, + sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalE2node_ng_eNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalE2node_ng_eNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GlobalE2node_ng_eNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalENB-ID.c b/Bouncer/e2ap/lib/GlobalENB-ID.c new file mode 100644 index 0000000..9c34820 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalENB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalENB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalENB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1 = { + sizeof(struct GlobalENB_ID), + offsetof(struct GlobalENB_ID, _asn_ctx), + asn_MAP_GlobalENB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID = { + "GlobalENB-ID", + "GlobalENB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalENB_ID_tags_1, + sizeof(asn_DEF_GlobalENB_ID_tags_1) + /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalENB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalENB_ID_tags_1) + /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalENB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalRIC-ID.c b/Bouncer/e2ap/lib/GlobalRIC-ID.c new file mode 100644 index 0000000..c027c79 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalRIC-ID.c @@ -0,0 +1,99 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalRIC-ID.h" + +static int +memb_ric_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_ric_ID_constr_3 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ID_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GlobalRIC_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalRIC_ID, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalRIC_ID, ric_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_ric_ID_constr_3, &asn_PER_memb_ric_ID_constr_3, memb_ric_ID_constraint_1 }, + 0, 0, /* No default value */ + "ric-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalRIC_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalRIC_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalRIC_ID_specs_1 = { + sizeof(struct GlobalRIC_ID), + offsetof(struct GlobalRIC_ID, _asn_ctx), + asn_MAP_GlobalRIC_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalRIC_ID = { + "GlobalRIC-ID", + "GlobalRIC-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalRIC_ID_tags_1, + sizeof(asn_DEF_GlobalRIC_ID_tags_1) + /sizeof(asn_DEF_GlobalRIC_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalRIC_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalRIC_ID_tags_1) + /sizeof(asn_DEF_GlobalRIC_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalRIC_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalRIC_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalenGNB-ID.c b/Bouncer/e2ap/lib/GlobalenGNB-ID.c new file mode 100644 index 0000000..2599aae --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalenGNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalenGNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ENGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalenGNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalenGNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1 = { + sizeof(struct GlobalenGNB_ID), + offsetof(struct GlobalenGNB_ID, _asn_ctx), + asn_MAP_GlobalenGNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID = { + "GlobalenGNB-ID", + "GlobalenGNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalenGNB_ID_tags_1, + sizeof(asn_DEF_GlobalenGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalenGNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalenGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalenGNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalenGNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalgNB-ID.c b/Bouncer/e2ap/lib/GlobalgNB-ID.c new file mode 100644 index 0000000..2150089 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalgNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalgNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalgNB_ID, plmn_id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "plmn-id" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalgNB_ID, gnb_id), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GNB_ID_Choice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gnb-id" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalgNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalgNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gnb-id */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalgNB_ID_specs_1 = { + sizeof(struct GlobalgNB_ID), + offsetof(struct GlobalgNB_ID, _asn_ctx), + asn_MAP_GlobalgNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalgNB_ID = { + "GlobalgNB-ID", + "GlobalgNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalgNB_ID_tags_1, + sizeof(asn_DEF_GlobalgNB_ID_tags_1) + /sizeof(asn_DEF_GlobalgNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalgNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalgNB_ID_tags_1) + /sizeof(asn_DEF_GlobalgNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalgNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalgNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/GlobalngeNB-ID.c b/Bouncer/e2ap/lib/GlobalngeNB-ID.c new file mode 100644 index 0000000..97d1f41 --- /dev/null +++ b/Bouncer/e2ap/lib/GlobalngeNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalngeNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalngeNB_ID, plmn_id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "plmn-id" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalngeNB_ID, enb_id), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ENB_ID_Choice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "enb-id" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalngeNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalngeNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enb-id */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalngeNB_ID_specs_1 = { + sizeof(struct GlobalngeNB_ID), + offsetof(struct GlobalngeNB_ID, _asn_ctx), + asn_MAP_GlobalngeNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalngeNB_ID = { + "GlobalngeNB-ID", + "GlobalngeNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalngeNB_ID_tags_1, + sizeof(asn_DEF_GlobalngeNB_ID_tags_1) + /sizeof(asn_DEF_GlobalngeNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalngeNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalngeNB_ID_tags_1) + /sizeof(asn_DEF_GlobalngeNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalngeNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalngeNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/asn1c_defs/INTEGER.c b/Bouncer/e2ap/lib/INTEGER.c similarity index 100% rename from Bouncer/asn1c_defs/INTEGER.c rename to Bouncer/e2ap/lib/INTEGER.c diff --git a/Bouncer/e2ap/lib/INTEGER_oer.c b/Bouncer/e2ap/lib/INTEGER_oer.c new file mode 100644 index 0000000..110689b --- /dev/null +++ b/Bouncer/e2ap/lib/INTEGER_oer.c @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +INTEGER_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + INTEGER_t *st = (INTEGER_t *)*sptr; + struct asn_oer_constraint_number_s ct = {0, 0}; + size_t req_bytes; + + (void)opt_codec_ctx; + (void)specs; + + if(!st) { + st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints) ct = constraints->value; + + if(ct.width) { + req_bytes = ct.width; + } else { + /* No lower bound and no upper bound, effectively */ + + ssize_t consumed = oer_fetch_length(ptr, size, &req_bytes); + if(consumed == 0) { + ASN__DECODE_STARVED; + } else if(consumed == -1) { + ASN__DECODE_FAILED; + } + rval.consumed += consumed; + ptr = (const char *)ptr + consumed; + size -= consumed; + } + + if(req_bytes > size) { + ASN__DECODE_STARVED; + } + + if(ct.positive) { + /* X.969 08/2015 10.2(a) */ + unsigned msb; /* Most significant bit */ + size_t useful_size; + + /* Check most significant bit */ + msb = *(const uint8_t *)ptr >> 7; /* yields 0 or 1 */ + useful_size = msb + req_bytes; + st->buf = (uint8_t *)MALLOC(useful_size + 1); + if(!st->buf) { + ASN__DECODE_FAILED; + } + + /* + * Record a large unsigned in a way not to confuse it + * with signed value. + */ + st->buf[0] = '\0'; + memcpy(st->buf + msb, ptr, req_bytes); + st->buf[useful_size] = '\0'; /* Just in case, 0-terminate */ + st->size = useful_size; + + rval.consumed += req_bytes; + return rval; + } else { + /* X.969 08/2015 10.2(b) */ + st->buf = (uint8_t *)MALLOC(req_bytes + 1); + if(!st->buf) { + ASN__DECODE_FAILED; + } + + memcpy(st->buf, ptr, req_bytes); + st->buf[req_bytes] = '\0'; /* Just in case, 0-terminate */ + st->size = req_bytes; + + rval.consumed += req_bytes; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +INTEGER_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const INTEGER_t *st = sptr; + asn_enc_rval_t er = {0,0,0}; + struct asn_oer_constraint_number_s ct = {0, 0}; + const uint8_t *buf; + const uint8_t *end; + size_t useful_bytes; + size_t req_bytes = 0; + int sign = 0; + + if(!st || st->size == 0) ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints) ct = constraints->value; + + er.encoded = 0; + + buf = st->buf; + end = buf + st->size; + + sign = (buf && buf < end) ? buf[0] & 0x80 : 0; + + /* Ignore 9 leading zeroes or ones */ + if(ct.positive) { + if(sign) { + /* The value given is a signed value. Can't proceed. */ + ASN__ENCODE_FAILED; + } + /* Remove leading zeros. */ + for(; buf + 1 < end; buf++) { + if(buf[0] != 0x0) break; + } + } else { + for(; buf + 1 < end; buf++) { + if(buf[0] == 0x0 && (buf[1] & 0x80) == 0) { + continue; + } else if(buf[0] == 0xff && (buf[1] & 0x80) != 0) { + continue; + } + break; + } + } + + useful_bytes = end - buf; + if(ct.width) { + req_bytes = ct.width; + } else { + ssize_t r = oer_serialize_length(useful_bytes, cb, app_key); + if(r < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += r; + req_bytes = useful_bytes; + } + + if(req_bytes < useful_bytes) { + ASN__ENCODE_FAILED; + } + + er.encoded += req_bytes; + + for(; req_bytes > useful_bytes; req_bytes--) { + if(cb(sign?"\xff":"\0", 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + } + + if(cb(buf, useful_bytes, app_key) < 0) { + ASN__ENCODE_FAILED; + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2ap/lib/InitiatingMessage.c b/Bouncer/e2ap/lib/InitiatingMessage.c new file mode 100644 index 0000000..6a6bfdb --- /dev/null +++ b/Bouncer/e2ap/lib/InitiatingMessage.c @@ -0,0 +1,398 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "InitiatingMessage.h" + +static const long asn_VAL_1_id_RICsubscription = 8; +static const long asn_VAL_1_reject = 0; +static const long asn_VAL_2_id_RICsubscriptionDelete = 9; +static const long asn_VAL_2_reject = 0; +static const long asn_VAL_3_id_RICserviceUpdate = 7; +static const long asn_VAL_3_reject = 0; +static const long asn_VAL_4_id_RICcontrol = 4; +static const long asn_VAL_4_reject = 0; +static const long asn_VAL_5_id_E2setup = 1; +static const long asn_VAL_5_reject = 0; +static const long asn_VAL_6_id_Reset = 3; +static const long asn_VAL_6_reject = 0; +static const long asn_VAL_7_id_RICindication = 5; +static const long asn_VAL_7_ignore = 1; +static const long asn_VAL_8_id_RICserviceQuery = 6; +static const long asn_VAL_8_ignore = 1; +static const long asn_VAL_9_id_ErrorIndication = 2; +static const long asn_VAL_9_ignore = 1; +static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore } +}; +static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { + { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } +}; +static int +memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_InitiatingMessage_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; + size_t constraining_column = 3; /* &procedureCode */ + size_t for_column = 4; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_InitiatingMessage_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; + size_t constraining_column = 3; /* &procedureCode */ + size_t for_column = 0; /* &InitiatingMessage */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_oer_constraints_t asn_OER_memb_procedureCode_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_value_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionRequest), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICsubscriptionRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionDeleteRequest), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICsubscriptionDeleteRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceUpdate), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceUpdate, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICserviceUpdate" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICcontrolRequest), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICcontrolRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2setupRequest), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2setupRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "E2setupRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ResetRequest), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ResetRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ResetRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICindication), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICindication, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICindication" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceQuery), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceQuery, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICserviceQuery" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ErrorIndication), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ErrorIndication, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ErrorIndication" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 8 }, /* RICsubscriptionRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 7 }, /* RICsubscriptionDeleteRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 6 }, /* RICserviceUpdate */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 5 }, /* RICcontrolRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 4 }, /* E2setupRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 3 }, /* ResetRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 2 }, /* RICindication */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 1 }, /* RICserviceQuery */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 0 } /* ErrorIndication */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { + sizeof(struct InitiatingMessage__value), + offsetof(struct InitiatingMessage__value, _asn_ctx), + offsetof(struct InitiatingMessage__value, present), + sizeof(((struct InitiatingMessage__value *)0)->present), + asn_MAP_value_tag2el_4, + 9, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_4 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_4, + 9, /* Elements count */ + &asn_SPC_value_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, procedureCode), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProcedureCode, + 0, + { &asn_OER_memb_procedureCode_constr_2, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 }, + 0, 0, /* No default value */ + "procedureCode" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, criticality), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Criticality, + select_InitiatingMessage_criticality_type, + { &asn_OER_memb_criticality_constr_3, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, value), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_value_4, + select_InitiatingMessage_value_type, + { &asn_OER_memb_value_constr_4, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_InitiatingMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InitiatingMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1 = { + sizeof(struct InitiatingMessage), + offsetof(struct InitiatingMessage, _asn_ctx), + asn_MAP_InitiatingMessage_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InitiatingMessage = { + "InitiatingMessage", + "InitiatingMessage", + &asn_OP_SEQUENCE, + asn_DEF_InitiatingMessage_tags_1, + sizeof(asn_DEF_InitiatingMessage_tags_1) + /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */ + asn_DEF_InitiatingMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_InitiatingMessage_tags_1) + /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InitiatingMessage_1, + 3, /* Elements count */ + &asn_SPC_InitiatingMessage_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/NativeEnumerated.c b/Bouncer/e2ap/lib/NativeEnumerated.c new file mode 100644 index 0000000..50ffb1d --- /dev/null +++ b/Bouncer/e2ap/lib/NativeEnumerated.c @@ -0,0 +1,367 @@ +/*- + * Copyright (c) 2004, 2007 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Read the NativeInteger.h for the explanation wrt. differences between + * INTEGER and NativeInteger. + * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this + * implementation deals with the standard (machine-specific) representation + * of them instead of using the platform-independent buffer. + */ +#include +#include + +/* + * NativeEnumerated basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_operation_t asn_OP_NativeEnumerated = { + NativeInteger_free, + NativeInteger_print, + NativeInteger_compare, + NativeInteger_decode_ber, + NativeInteger_encode_der, + NativeInteger_decode_xer, + NativeEnumerated_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + NativeEnumerated_decode_oer, + NativeEnumerated_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + NativeEnumerated_decode_uper, + NativeEnumerated_encode_uper, + NativeEnumerated_decode_aper, + NativeEnumerated_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + NativeEnumerated_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = { + "ENUMERATED", /* The ASN.1 type is still ENUMERATED */ + "ENUMERATED", + &asn_OP_NativeEnumerated, + asn_DEF_NativeEnumerated_tags, + sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), + asn_DEF_NativeEnumerated_tags, /* Same as above */ + sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +asn_enc_rval_t +NativeEnumerated_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + const long *native = (const long *)sptr; + const asn_INTEGER_enum_map_t *el; + + (void)ilevel; + (void)flags; + + if(!native) ASN__ENCODE_FAILED; + + el = INTEGER_map_value2enum(specs, *native); + if(el) { + er.encoded = + asn__format_to_callback(cb, app_key, "<%s/>", el->enum_name); + if(er.encoded < 0) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } else { + ASN_DEBUG( + "ASN.1 forbids dealing with " + "unknown value of ENUMERATED type"); + ASN__ENCODE_FAILED; + } +} + +asn_dec_rval_t +NativeEnumerated_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + long *native = (long *)*sptr; + const asn_per_constraint_t *ct = NULL; + long value; + + (void)opt_codec_ctx; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__DECODE_FAILED; /* Mandatory! */ + if(!specs) ASN__DECODE_FAILED; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + if(value >= (specs->extension + ? specs->extension - 1 : specs->map_count)) + ASN__DECODE_FAILED; + } else { + if(!specs->extension) + ASN__DECODE_FAILED; + /* + * X.691, #10.6: normally small non-negative whole number; + */ + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + if(value >= specs->map_count) + ASN__DECODE_FAILED; + } + + *native = specs->value2enum[value].nat_value; + ASN_DEBUG("Decoded %s = %ld", td->name, *native); + + return rval; +} + +static int +NativeEnumerated__compar_value2enum(const void *ap, const void *bp) { + const asn_INTEGER_enum_map_t *a = ap; + const asn_INTEGER_enum_map_t *b = bp; + if(a->nat_value == b->nat_value) + return 0; + if(a->nat_value < b->nat_value) + return -1; + return 1; +} + +asn_enc_rval_t +NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native, value; + const asn_per_constraint_t *ct = NULL; + int inext = 0; + asn_INTEGER_enum_map_t key; + const asn_INTEGER_enum_map_t *kf; + + if(!sptr) ASN__ENCODE_FAILED; + if(!specs) ASN__ENCODE_FAILED; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__ENCODE_FAILED; /* Mandatory! */ + + ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); + + er.encoded = 0; + + native = *(const long *)sptr; + + key.nat_value = native; + kf = bsearch(&key, specs->value2enum, specs->map_count, + sizeof(key), NativeEnumerated__compar_value2enum); + if(!kf) { + ASN_DEBUG("No element corresponds to %ld", native); + ASN__ENCODE_FAILED; + } + value = kf - specs->value2enum; + + if(ct && ct->range_bits >= 0) { + int cmpWith = specs->extension + ? specs->extension - 1 : specs->map_count; + if(value >= cmpWith) + inext = 1; + } + if(ct && ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, value, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(!specs->extension) + ASN__ENCODE_FAILED; + + /* + * X.691, #10.6: normally small non-negative whole number; + */ + ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", + value, specs->extension, inext, + value - (inext ? (specs->extension - 1) : 0)); + if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + long *native = (long *)*sptr; + const asn_per_constraint_t *ct = NULL; + long value; + + (void)opt_codec_ctx; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__DECODE_FAILED; /* Mandatory! */ + if(!specs) ASN__DECODE_FAILED; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + /* Deal with APER padding */ + if(ct && ct->upper_bound >= 255) { + int padding = 0; + padding = (8 - (pd->moved % 8)) % 8; + ASN_DEBUG("For NativeEnumerated %s,offset= %lu Padding bits = %d", td->name, pd->moved, padding); + ASN_DEBUG("For NativeEnumerated %s, upper bound = %lu", td->name, ct->upper_bound); + if(padding > 0) + per_get_few_bits(pd, padding); + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + if(value >= (specs->extension + ? specs->extension - 1 : specs->map_count)) + ASN__DECODE_FAILED; + } else { + if(!specs->extension) + ASN__DECODE_FAILED; + /* + * X.691, #10.6: normally small non-negative whole number; + */ + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + if(value >= specs->map_count) + ASN__DECODE_FAILED; + } + + *native = specs->value2enum[value].nat_value; + ASN_DEBUG("Decoded %s = %ld", td->name, *native); + + return rval; +} + +asn_enc_rval_t +NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native, value; + const asn_per_constraint_t *ct = NULL; + int inext = 0; + asn_INTEGER_enum_map_t key; + asn_INTEGER_enum_map_t *kf; + + if(!sptr) ASN__ENCODE_FAILED; + if(!specs) ASN__ENCODE_FAILED; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__ENCODE_FAILED; /* Mandatory! */ + + ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); + + er.encoded = 0; + + native = *(const long *)sptr; + if(native < 0) ASN__ENCODE_FAILED; + + key.nat_value = native; + kf = bsearch(&key, specs->value2enum, specs->map_count, + sizeof(key), NativeEnumerated__compar_value2enum); + if(!kf) { + ASN_DEBUG("No element corresponds to %ld", native); + ASN__ENCODE_FAILED; + } + value = kf - specs->value2enum; + + if(ct && ct->range_bits >= 0) { + int cmpWith = specs->extension + ? specs->extension - 1 : specs->map_count; + if(value >= cmpWith) + inext = 1; + } + if(ct && ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, value, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(!specs->extension) + ASN__ENCODE_FAILED; + + /* + * X.691, #10.6: normally small non-negative whole number; + */ + ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", + value, specs->extension, inext, + value - (inext ? (specs->extension - 1) : 0)); + if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/Bouncer/e2ap/lib/NativeEnumerated_oer.c b/Bouncer/e2ap/lib/NativeEnumerated_oer.c new file mode 100644 index 0000000..ee3c189 --- /dev/null +++ b/Bouncer/e2ap/lib/NativeEnumerated_oer.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +static long +asn__nativeenumerated_convert(const uint8_t *b, const uint8_t *end) { + unsigned long value; + + /* Perform the sign initialization */ + /* Actually value = -(*b >> 7); gains nothing, yet unreadable! */ + if((*b >> 7)) { + value = (unsigned long)(-1); + } else { + value = 0; + } + + /* Conversion engine */ + for(; b < end; b++) { + value = (value << 8) | *b; + } + + return value; +} + +asn_dec_rval_t +NativeEnumerated_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + void **nint_ptr, const void *ptr, size_t size) { + asn_dec_rval_t rval = {RC_OK, 0}; + long *native = (long *)*nint_ptr; + const uint8_t *b = ptr; + + (void)opt_codec_ctx; + (void)constraints; + + if(size < 1) { + ASN__DECODE_STARVED; + } + + if((*b & 0x80) == 0) { + /* + * X.696 (08/2015) #11.2 Short form for Enumerated. + */ + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + *native = *b; + rval.consumed = 1; + } else { + /* + * X.696 (08/2015) #11.4 Long form for Enumerated. + */ + size_t length = *b & 0x7f; + const uint8_t *bend; + long value; + + if(length < 1 || length > sizeof(*native)) { + ASN__DECODE_FAILED; + } + if((1 + length) > size) { + ASN__DECODE_STARVED; + } + b++; + bend = b + length; + + value = asn__nativeenumerated_convert(b, bend); + if(value < 0) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + if(specs && specs->field_unsigned) { + ASN__DECODE_FAILED; + } + } + + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + *native = value; + + rval.consumed = (1 + length); + } + + return rval; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeEnumerated_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0,0,0}; + long native; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + + if(native >= 0 && native <= 127) { + /* #11.2 Short form */ + uint8_t b = native; + er.encoded = 1; + if(cb(&b, er.encoded, app_key) < 0) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } else { + /* #11.2 Long form */ + uint8_t buf[1 + sizeof(native)]; + uint8_t *b = &buf[sizeof(native)]; /* Last addressable */ + long final_pattern = -1 * (native < 0); + + for(;;) { + *b-- = native; + native >>= 8; + if(native == final_pattern) { + if(final_pattern) { + if((b[1] & 0x80)) break; + } else { + if(!(b[1] & 0x80)) break; + } + } + } + *b = 0x80 | (&buf[sizeof(native)] - b); + er.encoded = 1 + (&buf[sizeof(native)] - b); + if(cb(b, er.encoded, app_key) < 0) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/asn1c_defs/NativeInteger.c b/Bouncer/e2ap/lib/NativeInteger.c similarity index 100% rename from Bouncer/asn1c_defs/NativeInteger.c rename to Bouncer/e2ap/lib/NativeInteger.c diff --git a/Bouncer/e2ap/lib/NativeInteger_oer.c b/Bouncer/e2ap/lib/NativeInteger_oer.c new file mode 100644 index 0000000..411413a --- /dev/null +++ b/Bouncer/e2ap/lib/NativeInteger_oer.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +NativeInteger_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + void **nint_ptr, const void *ptr, size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + long *native = (long *)*nint_ptr; + INTEGER_t tmpint; + INTEGER_t *tmpintptr = &tmpint; + + memset(&tmpint, 0, sizeof(tmpint)); + + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + /* + * OPTIMIZATION: Encode directly rather than passing through INTEGER. + * Saves a memory allocation. + */ + rval = INTEGER_decode_oer(opt_codec_ctx, td, constraints, + (void **)&tmpintptr, ptr, size); + if(rval.code != RC_OK) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return rval; + } + + if(specs && specs->field_unsigned) { + unsigned long ul; + int ok = asn_INTEGER2ulong(&tmpint, &ul) == 0; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + if(ok) { + *native = ul; + } else { + rval.code = RC_FAIL; + return rval; + } + } else { + long l; + int ok = asn_INTEGER2long(&tmpint, &l) == 0; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + if(ok) { + *native = l; + } else { + rval.code = RC_FAIL; + return rval; + } + } + + return rval; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeInteger_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + INTEGER_t tmpint; + long native; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + memset(&tmpint, 0, sizeof(tmpint)); + + ASN_DEBUG("Encoding %s %ld as NativeInteger", td ? td->name : "", native); + + if((specs && specs->field_unsigned) ? asn_ulong2INTEGER(&tmpint, native) + : asn_long2INTEGER(&tmpint, native)) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + ASN__ENCODE_FAILED; + } else { + asn_enc_rval_t er = + INTEGER_encode_oer(td, constraints, &tmpint, cb, app_key); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return er; + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2ap/lib/OCTET_STRING.c b/Bouncer/e2ap/lib/OCTET_STRING.c new file mode 100644 index 0000000..ae34c96 --- /dev/null +++ b/Bouncer/e2ap/lib/OCTET_STRING.c @@ -0,0 +1,2411 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ +#include + +/* + * OCTET STRING basic type description. + */ +static const ber_tlv_tag_t asn_DEF_OCTET_STRING_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs = { + sizeof(OCTET_STRING_t), + offsetof(OCTET_STRING_t, _asn_ctx), + ASN_OSUBV_STR +}; + +asn_TYPE_operation_t asn_OP_OCTET_STRING = { + OCTET_STRING_free, + OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, /* Unaligned PER decoder */ + OCTET_STRING_encode_uper, /* Unaligned PER encoder */ + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = { + "OCTET STRING", /* Canonical name */ + "OCTET_STRING", /* XML tag name */ + &asn_OP_OCTET_STRING, + asn_DEF_OCTET_STRING_tags, + sizeof(asn_DEF_OCTET_STRING_tags) + / sizeof(asn_DEF_OCTET_STRING_tags[0]), + asn_DEF_OCTET_STRING_tags, /* Same as above */ + sizeof(asn_DEF_OCTET_STRING_tags) + / sizeof(asn_DEF_OCTET_STRING_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs +}; + +#undef _CH_PHASE +#undef NEXT_PHASE +#undef PREV_PHASE +#define _CH_PHASE(ctx, inc) do { \ + if(ctx->phase == 0) \ + ctx->context = 0; \ + ctx->phase += inc; \ + } while(0) +#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1) +#define PREV_PHASE(ctx) _CH_PHASE(ctx, -1) + +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = (num_bytes); \ + buf_ptr = ((const char *)buf_ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +#undef RETURN +#define RETURN(_code) do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +#undef APPEND +#define APPEND(bufptr, bufsize) do { \ + size_t _bs = (bufsize); /* Append size */ \ + size_t _ns = ctx->context; /* Allocated now */ \ + size_t _es = st->size + _bs; /* Expected size */ \ + /* int is really a typeof(st->size): */ \ + if((int)_es < 0) RETURN(RC_FAIL); \ + if(_ns <= _es) { \ + void *ptr; \ + /* Be nice and round to the memory allocator */ \ + do { _ns = _ns ? _ns << 1 : 16; } \ + while(_ns <= _es); \ + /* int is really a typeof(st->size): */ \ + if((int)_ns < 0) RETURN(RC_FAIL); \ + ptr = REALLOC(st->buf, _ns); \ + if(ptr) { \ + st->buf = (uint8_t *)ptr; \ + ctx->context = _ns; \ + } else { \ + RETURN(RC_FAIL); \ + } \ + ASN_DEBUG("Reallocating into %ld", (long)_ns); \ + } \ + memcpy(st->buf + st->size, bufptr, _bs); \ + /* Convenient nul-termination */ \ + st->buf[_es] = '\0'; \ + st->size = _es; \ + } while(0) + +/* + * The main reason why ASN.1 is still alive is that too much time and effort + * is necessary for learning it more or less adequately, thus creating a gut + * necessity to demonstrate that aquired skill everywhere afterwards. + * No, I am not going to explain what the following stuff is. + */ +struct _stack_el { + ber_tlv_len_t left; /* What's left to read (or -1) */ + ber_tlv_len_t got; /* What was actually processed */ + unsigned cont_level; /* Depth of subcontainment */ + int want_nulls; /* Want null "end of content" octets? */ + int bits_chopped; /* Flag in BIT STRING mode */ + ber_tlv_tag_t tag; /* For debugging purposes */ + struct _stack_el *prev; + struct _stack_el *next; +}; +struct _stack { + struct _stack_el *tail; + struct _stack_el *cur_ptr; +}; + +static struct _stack_el * +OS__add_stack_el(struct _stack *st) { + struct _stack_el *nel; + + /* + * Reuse the old stack frame or allocate a new one. + */ + if(st->cur_ptr && st->cur_ptr->next) { + nel = st->cur_ptr->next; + nel->bits_chopped = 0; + nel->got = 0; + /* Retain the nel->cont_level, it's correct. */ + } else { + nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el)); + if(nel == NULL) + return NULL; + + if(st->tail) { + /* Increase a subcontainment depth */ + nel->cont_level = st->tail->cont_level + 1; + st->tail->next = nel; + } + nel->prev = st->tail; + st->tail = nel; + } + + st->cur_ptr = nel; + + return nel; +} + +static struct _stack * +_new_stack(void) { + return (struct _stack *)CALLOC(1, sizeof(struct _stack)); +} + +/* + * Decode OCTET STRING type. + */ +asn_dec_rval_t +OCTET_STRING_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buf_ptr, size_t size, int tag_mode) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + asn_dec_rval_t rval; + asn_struct_ctx_t *ctx; + ssize_t consumed_myself = 0; + struct _stack *stck; /* Expectations stack structure */ + struct _stack_el *sel = 0; /* Stack element */ + int tlv_constr; + enum asn_OS_Subvariant type_variant = specs->subvariant; + + ASN_DEBUG("Decoding %s as %s (frame %ld)", + td->name, + (type_variant == ASN_OSUBV_STR) ? + "OCTET STRING" : "OS-SpecialCase", + (long)size); + + /* + * Create the string if does not exist. + */ + if(st == NULL) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(st == NULL) RETURN(RC_FAIL); + } + + /* Restore parsing context */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + switch(ctx->phase) { + case 0: + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, ctx, + buf_ptr, size, tag_mode, -1, + &ctx->left, &tlv_constr); + if(rval.code != RC_OK) + return rval; + + if(tlv_constr) { + /* + * Complex operation, requires stack of expectations. + */ + ctx->ptr = _new_stack(); + if(!ctx->ptr) { + RETURN(RC_FAIL); + } + } else { + /* + * Jump into stackless primitive decoding. + */ + _CH_PHASE(ctx, 3); + if(type_variant == ASN_OSUBV_ANY && tag_mode != 1) + APPEND(buf_ptr, rval.consumed); + ADVANCE(rval.consumed); + goto phase3; + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 1: + phase1: + /* + * Fill the stack with expectations. + */ + stck = (struct _stack *)ctx->ptr; + sel = stck->cur_ptr; + do { + ber_tlv_tag_t tlv_tag; + ber_tlv_len_t tlv_len; + ber_tlv_tag_t expected_tag; + ssize_t tl, ll, tlvl; + /* This one works even if (sel->left == -1) */ + size_t Left = ((!sel||(size_t)sel->left >= size) + ?size:(size_t)sel->left); + + + ASN_DEBUG("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", (void *)sel, + (long)(sel?sel->left:0), + (long)(sel?sel->want_nulls:0), + (long)(sel?sel->got:0) + ); + if(sel && sel->left <= 0 && sel->want_nulls == 0) { + if(sel->prev) { + struct _stack_el *prev = sel->prev; + if(prev->left != -1) { + if(prev->left < sel->got) + RETURN(RC_FAIL); + prev->left -= sel->got; + } + prev->got += sel->got; + sel = stck->cur_ptr = prev; + if(!sel) break; + tlv_constr = 1; + continue; + } else { + sel = stck->cur_ptr = 0; + break; /* Nothing to wait */ + } + } + + tl = ber_fetch_tag(buf_ptr, Left, &tlv_tag); + ASN_DEBUG("fetch tag(size=%ld,L=%ld), %sstack, left=%ld, wn=%ld, tl=%ld", + (long)size, (long)Left, sel?"":"!", + (long)(sel?sel->left:0), + (long)(sel?sel->want_nulls:0), + (long)tl); + switch(tl) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + tlv_constr = BER_TLV_CONSTRUCTED(buf_ptr); + + ll = ber_fetch_length(tlv_constr, + (const char *)buf_ptr + tl,Left - tl,&tlv_len); + ASN_DEBUG("Got tag=%s, tc=%d, left=%ld, tl=%ld, len=%ld, ll=%ld", + ber_tlv_tag_string(tlv_tag), tlv_constr, + (long)Left, (long)tl, (long)tlv_len, (long)ll); + switch(ll) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + if(sel && sel->want_nulls + && ((const uint8_t *)buf_ptr)[0] == 0 + && ((const uint8_t *)buf_ptr)[1] == 0) + { + + ASN_DEBUG("Eat EOC; wn=%d--", sel->want_nulls); + + if(type_variant == ASN_OSUBV_ANY + && (tag_mode != 1 || sel->cont_level)) + APPEND("\0\0", 2); + + ADVANCE(2); + sel->got += 2; + if(sel->left != -1) { + sel->left -= 2; /* assert(sel->left >= 2) */ + } + + sel->want_nulls--; + if(sel->want_nulls == 0) { + /* Move to the next expectation */ + sel->left = 0; + tlv_constr = 1; + } + + continue; + } + + /* + * Set up expected tags, + * depending on ASN.1 type being decoded. + */ + switch(type_variant) { + case ASN_OSUBV_BIT: + /* X.690: 8.6.4.1, NOTE 2 */ + /* Fall through */ + case ASN_OSUBV_STR: + default: + if(sel) { + unsigned level = sel->cont_level; + if(level < td->all_tags_count) { + expected_tag = td->all_tags[level]; + break; + } else if(td->all_tags_count) { + expected_tag = td->all_tags + [td->all_tags_count - 1]; + break; + } + /* else, Fall through */ + } + /* Fall through */ + case ASN_OSUBV_ANY: + expected_tag = tlv_tag; + break; + } + + + if(tlv_tag != expected_tag) { + char buf[2][32]; + ber_tlv_tag_snprint(tlv_tag, + buf[0], sizeof(buf[0])); + ber_tlv_tag_snprint(td->tags[td->tags_count-1], + buf[1], sizeof(buf[1])); + ASN_DEBUG("Tag does not match expectation: %s != %s", + buf[0], buf[1]); + RETURN(RC_FAIL); + } + + tlvl = tl + ll; /* Combined length of T and L encoding */ + if((tlv_len + tlvl) < 0) { + /* tlv_len value is too big */ + ASN_DEBUG("TLV encoding + length (%ld) is too big", + (long)tlv_len); + RETURN(RC_FAIL); + } + + /* + * Append a new expectation. + */ + sel = OS__add_stack_el(stck); + if(!sel) RETURN(RC_FAIL); + + sel->tag = tlv_tag; + + sel->want_nulls = (tlv_len==-1); + if(sel->prev && sel->prev->left != -1) { + /* Check that the parent frame is big enough */ + if(sel->prev->left < tlvl + (tlv_len==-1?0:tlv_len)) + RETURN(RC_FAIL); + if(tlv_len == -1) + sel->left = sel->prev->left - tlvl; + else + sel->left = tlv_len; + } else { + sel->left = tlv_len; + } + if(type_variant == ASN_OSUBV_ANY + && (tag_mode != 1 || sel->cont_level)) + APPEND(buf_ptr, tlvl); + sel->got += tlvl; + ADVANCE(tlvl); + + ASN_DEBUG("+EXPECT2 got=%ld left=%ld, wn=%d, clvl=%u", + (long)sel->got, (long)sel->left, + sel->want_nulls, sel->cont_level); + + } while(tlv_constr); + if(sel == NULL) { + /* Finished operation, "phase out" */ + ASN_DEBUG("Phase out"); + _CH_PHASE(ctx, +3); + break; + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 2: + stck = (struct _stack *)ctx->ptr; + sel = stck->cur_ptr; + ASN_DEBUG("Phase 2: Need %ld bytes, size=%ld, alrg=%ld, wn=%d", + (long)sel->left, (long)size, (long)sel->got, + sel->want_nulls); + { + ber_tlv_len_t len; + + assert(sel->left >= 0); + + len = ((ber_tlv_len_t)size < sel->left) + ? (ber_tlv_len_t)size : sel->left; + if(len > 0) { + if(type_variant == ASN_OSUBV_BIT + && sel->bits_chopped == 0) { + /* Put the unused-bits-octet away */ + st->bits_unused = *(const uint8_t *)buf_ptr; + APPEND(((const char *)buf_ptr+1), (len - 1)); + sel->bits_chopped = 1; + } else { + APPEND(buf_ptr, len); + } + ADVANCE(len); + sel->left -= len; + sel->got += len; + } + + if(sel->left) { + ASN_DEBUG("OS left %ld, size = %ld, wn=%d\n", + (long)sel->left, (long)size, sel->want_nulls); + RETURN(RC_WMORE); + } + + PREV_PHASE(ctx); + goto phase1; + } + break; + case 3: + phase3: + /* + * Primitive form, no stack required. + */ + assert(ctx->left >= 0); + + if(size < (size_t)ctx->left) { + if(!size) RETURN(RC_WMORE); + if(type_variant == ASN_OSUBV_BIT && !ctx->context) { + st->bits_unused = *(const uint8_t *)buf_ptr; + ctx->left--; + ADVANCE(1); + } + APPEND(buf_ptr, size); + assert(ctx->context > 0); + ctx->left -= size; + ADVANCE(size); + RETURN(RC_WMORE); + } else { + if(type_variant == ASN_OSUBV_BIT + && !ctx->context && ctx->left) { + st->bits_unused = *(const uint8_t *)buf_ptr; + ctx->left--; + ADVANCE(1); + } + APPEND(buf_ptr, ctx->left); + ADVANCE(ctx->left); + ctx->left = 0; + + NEXT_PHASE(ctx); + } + break; + } + + if(sel) { + ASN_DEBUG("3sel p=%p, wn=%d, l=%ld, g=%ld, size=%ld", + (void *)sel->prev, sel->want_nulls, + (long)sel->left, (long)sel->got, (long)size); + if(sel->prev || sel->want_nulls > 1 || sel->left > 0) { + RETURN(RC_WMORE); + } + } + + /* + * BIT STRING-specific processing. + */ + if(type_variant == ASN_OSUBV_BIT) { + if(st->size) { + if(st->bits_unused < 0 || st->bits_unused > 7) { + RETURN(RC_FAIL); + } + /* Finalize BIT STRING: zero out unused bits. */ + st->buf[st->size-1] &= 0xff << st->bits_unused; + } else { + if(st->bits_unused) { + RETURN(RC_FAIL); + } + } + } + + ASN_DEBUG("Took %ld bytes to encode %s: [%s]:%ld", + (long)consumed_myself, td->name, + (type_variant == ASN_OSUBV_STR) ? (char *)st->buf : "", + (long)st->size); + + + RETURN(RC_OK); +} + +/* + * Encode OCTET STRING type using DER. + */ +asn_enc_rval_t +OCTET_STRING_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = { 0, 0, 0 }; + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + enum asn_OS_Subvariant type_variant = specs->subvariant; + int fix_last_byte = 0; + + ASN_DEBUG("%s %s as OCTET STRING", + cb?"Estimating":"Encoding", td->name); + + /* + * Write tags. + */ + if(type_variant != ASN_OSUBV_ANY || tag_mode == 1) { + er.encoded = der_write_tags(td, + (type_variant == ASN_OSUBV_BIT) + st->size, + tag_mode, type_variant == ASN_OSUBV_ANY, tag, + cb, app_key); + if(er.encoded == -1) { + er.failed_type = td; + er.structure_ptr = sptr; + return er; + } + } else { + /* Disallow: [] IMPLICIT ANY */ + assert(type_variant != ASN_OSUBV_ANY || tag_mode != -1); + er.encoded = 0; + } + + if(!cb) { + er.encoded += (type_variant == ASN_OSUBV_BIT) + st->size; + ASN__ENCODED_OK(er); + } + + /* + * Prepare to deal with the last octet of BIT STRING. + */ + if(type_variant == ASN_OSUBV_BIT) { + uint8_t b = st->bits_unused & 0x07; + if(b && st->size) fix_last_byte = 1; + ASN__CALLBACK(&b, 1); + } + + /* Invoke callback for the main part of the buffer */ + ASN__CALLBACK(st->buf, st->size - fix_last_byte); + + /* The last octet should be stripped off the unused bits */ + if(fix_last_byte) { + uint8_t b = st->buf[st->size-1] & (0xff << st->bits_unused); + ASN__CALLBACK(&b, 1); + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +asn_enc_rval_t +OCTET_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + char scratch[16 * 3 + 4]; + char *p = scratch; + uint8_t *buf; + uint8_t *end; + size_t i; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + /* + * Dump the contents of the buffer in hexadecimal. + */ + buf = st->buf; + end = buf + st->size; + if(flags & XER_F_CANONICAL) { + char *scend = scratch + (sizeof(scratch) - 2); + for(; buf < end; buf++) { + if(p >= scend) { + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + } + + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + } else { + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + ASN__CALLBACK(scratch, p-scratch); + p = scratch; + ASN__TEXT_INDENT(1, ilevel); + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + if(p - scratch) { + p--; /* Remove the tail space */ + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + if(st->size > 16) + ASN__TEXT_INDENT(1, ilevel-1); + } + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +static const struct OCTET_STRING__xer_escape_table_s { + const char *string; + int size; +} OCTET_STRING__xer_escape_table[] = { +#define OSXET(s) { s, sizeof(s) - 1 } + OSXET("\074\156\165\154\057\076"), /* */ + OSXET("\074\163\157\150\057\076"), /* */ + OSXET("\074\163\164\170\057\076"), /* */ + OSXET("\074\145\164\170\057\076"), /* */ + OSXET("\074\145\157\164\057\076"), /* */ + OSXET("\074\145\156\161\057\076"), /* */ + OSXET("\074\141\143\153\057\076"), /* */ + OSXET("\074\142\145\154\057\076"), /* */ + OSXET("\074\142\163\057\076"), /* */ + OSXET("\011"), /* \t */ + OSXET("\012"), /* \n */ + OSXET("\074\166\164\057\076"), /* */ + OSXET("\074\146\146\057\076"), /* */ + OSXET("\015"), /* \r */ + OSXET("\074\163\157\057\076"), /* */ + OSXET("\074\163\151\057\076"), /* */ + OSXET("\074\144\154\145\057\076"), /* */ + OSXET("\074\144\143\061\057\076"), /* */ + OSXET("\074\144\143\062\057\076"), /* */ + OSXET("\074\144\143\063\057\076"), /* */ + OSXET("\074\144\143\064\057\076"), /* */ + OSXET("\074\156\141\153\057\076"), /* */ + OSXET("\074\163\171\156\057\076"), /* */ + OSXET("\074\145\164\142\057\076"), /* */ + OSXET("\074\143\141\156\057\076"), /* */ + OSXET("\074\145\155\057\076"), /* */ + OSXET("\074\163\165\142\057\076"), /* */ + OSXET("\074\145\163\143\057\076"), /* */ + OSXET("\074\151\163\064\057\076"), /* */ + OSXET("\074\151\163\063\057\076"), /* */ + OSXET("\074\151\163\062\057\076"), /* */ + OSXET("\074\151\163\061\057\076"), /* */ + { 0, 0 }, /* " " */ + { 0, 0 }, /* ! */ + { 0, 0 }, /* \" */ + { 0, 0 }, /* # */ + { 0, 0 }, /* $ */ + { 0, 0 }, /* % */ + OSXET("\046\141\155\160\073"), /* & */ + { 0, 0 }, /* ' */ + {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* ()*+,-./ */ + {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* 01234567 */ + {0,0},{0,0},{0,0},{0,0}, /* 89:; */ + OSXET("\046\154\164\073"), /* < */ + { 0, 0 }, /* = */ + OSXET("\046\147\164\073"), /* > */ +}; + +static int +OS__check_escaped_control_char(const void *buf, int size) { + size_t i; + /* + * Inefficient algorithm which translates the escape sequences + * defined above into characters. Returns -1 if not found. + * TODO: replace by a faster algorithm (bsearch(), hash or + * nested table lookups). + */ + for(i = 0; i < 32 /* Don't spend time on the bottom half */; i++) { + const struct OCTET_STRING__xer_escape_table_s *el; + el = &OCTET_STRING__xer_escape_table[i]; + if(el->size == size && memcmp(buf, el->string, size) == 0) + return i; + } + return -1; +} + +static int +OCTET_STRING__handle_control_chars(void *struct_ptr, const void *chunk_buf, size_t chunk_size) { + /* + * This might be one of the escape sequences + * for control characters. Check it out. + * #11.15.5 + */ + int control_char = OS__check_escaped_control_char(chunk_buf,chunk_size); + if(control_char >= 0) { + OCTET_STRING_t *st = (OCTET_STRING_t *)struct_ptr; + void *p = REALLOC(st->buf, st->size + 2); + if(p) { + st->buf = (uint8_t *)p; + st->buf[st->size++] = control_char; + st->buf[st->size] = '\0'; /* nul-termination */ + return 0; + } + } + + return -1; /* No, it's not */ +} + +asn_enc_rval_t +OCTET_STRING_encode_xer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + uint8_t *buf, *end; + uint8_t *ss; /* Sequence start */ + ssize_t encoded_len = 0; + + (void)ilevel; /* Unused argument */ + (void)flags; /* Unused argument */ + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + buf = st->buf; + end = buf + st->size; + for(ss = buf; buf < end; buf++) { + unsigned int ch = *buf; + int s_len; /* Special encoding sequence length */ + + /* + * Escape certain characters: X.680/11.15 + */ + if(ch < sizeof(OCTET_STRING__xer_escape_table) + /sizeof(OCTET_STRING__xer_escape_table[0]) + && (s_len = OCTET_STRING__xer_escape_table[ch].size)) { + if(((buf - ss) && cb(ss, buf - ss, app_key) < 0) + || cb(OCTET_STRING__xer_escape_table[ch].string, s_len, + app_key) < 0) + ASN__ENCODE_FAILED; + encoded_len += (buf - ss) + s_len; + ss = buf + 1; + } + } + + encoded_len += (buf - ss); + if((buf - ss) && cb(ss, buf - ss, app_key) < 0) + ASN__ENCODE_FAILED; + + er.encoded = encoded_len; + ASN__ENCODED_OK(er); +} + +/* + * Convert from hexadecimal format (cstring): "AB CD EF" + */ +static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const char *chunk_stop = (const char *)chunk_buf; + const char *p = chunk_stop; + const char *pend = p + chunk_size; + unsigned int clv = 0; + int half = 0; /* Half bit */ + uint8_t *buf; + + /* Reallocate buffer according to high cap estimation */ + size_t new_size = st->size + (chunk_size + 1) / 2; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + /* + * If something like " a b c " appears here, the " a b":3 will be + * converted, and the rest skipped. That is, unless buf_size is greater + * than chunk_size, then it'll be equivalent to "ABC0". + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + switch(ch) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* Ignore whitespace */ + continue; + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ + clv = (clv << 4) + (ch - 0x30); + break; + case 0x41: case 0x42: case 0x43: /* ABC */ + case 0x44: case 0x45: case 0x46: /* DEF */ + clv = (clv << 4) + (ch - 0x41 + 10); + break; + case 0x61: case 0x62: case 0x63: /* abc */ + case 0x64: case 0x65: case 0x66: /* def */ + clv = (clv << 4) + (ch - 0x61 + 10); + break; + default: + *buf = 0; /* JIC */ + return -1; + } + if(half++) { + half = 0; + *buf++ = clv; + chunk_stop = p + 1; + } + } + + /* + * Check partial decoding. + */ + if(half) { + if(have_more) { + /* + * Partial specification is fine, + * because no more more PXER_TEXT data is available. + */ + *buf++ = clv << 4; + chunk_stop = p; + } + } else { + chunk_stop = p; + } + + st->size = buf - st->buf; /* Adjust the buffer size */ + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return (chunk_stop - (const char *)chunk_buf); /* Converted size */ +} + +/* + * Convert from binary format: "00101011101" + */ +static ssize_t OCTET_STRING__convert_binary(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { + BIT_STRING_t *st = (BIT_STRING_t *)sptr; + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + int bits_unused = st->bits_unused & 0x7; + uint8_t *buf; + + /* Reallocate buffer according to high cap estimation */ + size_t new_size = st->size + (chunk_size + 7) / 8; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + (void)have_more; + + if(bits_unused == 0) + bits_unused = 8; + else if(st->size) + buf--; + + /* + * Convert series of 0 and 1 into the octet string. + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + switch(ch) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* Ignore whitespace */ + break; + case 0x30: + case 0x31: + if(bits_unused-- <= 0) { + *++buf = 0; /* Clean the cell */ + bits_unused = 7; + } + *buf |= (ch&1) << bits_unused; + break; + default: + st->bits_unused = bits_unused; + return -1; + } + } + + if(bits_unused == 8) { + st->size = buf - st->buf; + st->bits_unused = 0; + } else { + st->size = buf - st->buf + 1; + st->bits_unused = bits_unused; + } + + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return chunk_size; /* Converted in full */ +} + +/* + * Something like strtod(), but with stricter rules. + */ +static int +OS__strtoent(int base, const char *buf, const char *end, int32_t *ret_value) { + const int32_t last_unicode_codepoint = 0x10ffff; + int32_t val = 0; + const char *p; + + for(p = buf; p < end; p++) { + int ch = *p; + + switch(ch) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ + val = val * base + (ch - 0x30); + break; + case 0x41: case 0x42: case 0x43: /* ABC */ + case 0x44: case 0x45: case 0x46: /* DEF */ + val = val * base + (ch - 0x41 + 10); + break; + case 0x61: case 0x62: case 0x63: /* abc */ + case 0x64: case 0x65: case 0x66: /* def */ + val = val * base + (ch - 0x61 + 10); + break; + case 0x3b: /* ';' */ + *ret_value = val; + return (p - buf) + 1; + default: + return -1; /* Character set error */ + } + + /* Value exceeds the Unicode range. */ + if(val > last_unicode_codepoint) { + return -1; + } + } + + *ret_value = -1; + return (p - buf); +} + +/* + * Convert from the plain UTF-8 format, expanding entity references: "2 < 3" + */ +static ssize_t +OCTET_STRING__convert_entrefs(void *sptr, const void *chunk_buf, + size_t chunk_size, int have_more) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + uint8_t *buf; + + /* Reallocate buffer */ + size_t new_size = st->size + chunk_size; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + /* + * Convert series of 0 and 1 into the octet string. + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + int len; /* Length of the rest of the chunk */ + + if(ch != 0x26 /* '&' */) { + *buf++ = ch; + continue; /* That was easy... */ + } + + /* + * Process entity reference. + */ + len = chunk_size - (p - (const char *)chunk_buf); + if(len == 1 /* "&" */) goto want_more; + if(p[1] == 0x23 /* '#' */) { + const char *pval; /* Pointer to start of digits */ + int32_t val = 0; /* Entity reference value */ + int base; + + if(len == 2 /* "&#" */) goto want_more; + if(p[2] == 0x78 /* 'x' */) + pval = p + 3, base = 16; + else + pval = p + 2, base = 10; + len = OS__strtoent(base, pval, p + len, &val); + if(len == -1) { + /* Invalid charset. Just copy verbatim. */ + *buf++ = ch; + continue; + } + if(!len || pval[len-1] != 0x3b) goto want_more; + assert(val > 0); + p += (pval - p) + len - 1; /* Advance past entref */ + + if(val < 0x80) { + *buf++ = (char)val; + } else if(val < 0x800) { + *buf++ = 0xc0 | ((val >> 6)); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x10000) { + *buf++ = 0xe0 | ((val >> 12)); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x200000) { + *buf++ = 0xf0 | ((val >> 18)); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x4000000) { + *buf++ = 0xf8 | ((val >> 24)); + *buf++ = 0x80 | ((val >> 18) & 0x3f); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else { + *buf++ = 0xfc | ((val >> 30) & 0x1); + *buf++ = 0x80 | ((val >> 24) & 0x3f); + *buf++ = 0x80 | ((val >> 18) & 0x3f); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } + } else { + /* + * Ugly, limited parsing of & > < + */ + char *sc = (char *)memchr(p, 0x3b, len > 5 ? 5 : len); + if(!sc) goto want_more; + if((sc - p) == 4 + && p[1] == 0x61 /* 'a' */ + && p[2] == 0x6d /* 'm' */ + && p[3] == 0x70 /* 'p' */) { + *buf++ = 0x26; + p = sc; + continue; + } + if((sc - p) == 3) { + if(p[1] == 0x6c) { + *buf = 0x3c; /* '<' */ + } else if(p[1] == 0x67) { + *buf = 0x3e; /* '>' */ + } else { + /* Unsupported entity reference */ + *buf++ = ch; + continue; + } + if(p[2] != 0x74) { + /* Unsupported entity reference */ + *buf++ = ch; + continue; + } + buf++; + p = sc; + continue; + } + /* Unsupported entity reference */ + *buf++ = ch; + } + + continue; + want_more: + if(have_more) { + /* + * We know that no more data (of the same type) + * is coming. Copy the rest verbatim. + */ + *buf++ = ch; + continue; + } + chunk_size = (p - (const char *)chunk_buf); + /* Processing stalled: need more data */ + break; + } + + st->size = buf - st->buf; + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return chunk_size; /* Converted in full */ +} + +/* + * Decode OCTET STRING from the XML element's body. + */ +static asn_dec_rval_t +OCTET_STRING__decode_xer( + const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, + void **sptr, const char *opt_mname, const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder)(void *struct_ptr, const void *chunk_buf, + size_t chunk_size), + ssize_t (*body_receiver)(void *struct_ptr, const void *chunk_buf, + size_t chunk_size, int have_more)) { + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + asn_struct_ctx_t *ctx; /* Per-structure parser context */ + asn_dec_rval_t rval; /* Return value from the decoder */ + int st_allocated; + + /* + * Create the string if does not exist. + */ + if(!st) { + st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); + *sptr = (void *)st; + if(!st) goto sta_failed; + st_allocated = 1; + } else { + st_allocated = 0; + } + if(!st->buf) { + /* This is separate from above section */ + st->buf = (uint8_t *)CALLOC(1, 1); + if(!st->buf) { + if(st_allocated) { + *sptr = 0; + goto stb_failed; + } else { + goto sta_failed; + } + } + } + + /* Restore parsing context */ + ctx = (asn_struct_ctx_t *)(((char *)*sptr) + specs->ctx_offset); + + return xer_decode_general(opt_codec_ctx, ctx, *sptr, xml_tag, + buf_ptr, size, opt_unexpected_tag_decoder, body_receiver); + +stb_failed: + FREEMEM(st); +sta_failed: + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; +} + +/* + * Decode OCTET STRING from the hexadecimal data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_hex(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, 0, OCTET_STRING__convert_hexadecimal); +} + +/* + * Decode OCTET STRING from the binary (0/1) data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_binary(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, 0, OCTET_STRING__convert_binary); +} + +/* + * Decode OCTET STRING from the string (ASCII/UTF-8) data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_utf8(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, + OCTET_STRING__handle_control_chars, + OCTET_STRING__convert_entrefs); +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +static int +OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf, + size_t units, unsigned int bpc, unsigned int unit_bits, + long lb, long ub, const asn_per_constraints_t *pc) { + uint8_t *end = buf + units * bpc; + + ASN_DEBUG("Expanding %d characters into (%ld..%ld):%d", + (int)units, lb, ub, unit_bits); + + /* X.691: 27.5.4 */ + if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { + /* Decode without translation */ + lb = 0; + } else if(pc && pc->code2value) { + if(unit_bits > 16) + return 1; /* FATAL: can't have constrained + * UniversalString with more than + * 16 million code points */ + for(; buf < end; buf += bpc) { + int value; + int code = per_get_few_bits(po, unit_bits); + if(code < 0) return -1; /* WMORE */ + value = pc->code2value(code); + if(value < 0) { + ASN_DEBUG("Code %d (0x%02x) is" + " not in map (%ld..%ld)", + code, code, lb, ub); + return 1; /* FATAL */ + } + switch(bpc) { + case 1: *buf = value; break; + case 2: buf[0] = value >> 8; buf[1] = value; break; + case 4: buf[0] = value >> 24; buf[1] = value >> 16; + buf[2] = value >> 8; buf[3] = value; break; + } + } + return 0; + } + + /* Shortcut the no-op copying to the aligned structure */ + if(lb == 0 && (unit_bits == 8 * bpc)) { + return per_get_many_bits(po, buf, 0, unit_bits * units); + } + + for(; buf < end; buf += bpc) { + int32_t code = per_get_few_bits(po, unit_bits); + int32_t ch = code + lb; + if(code < 0) return -1; /* WMORE */ + if(ch > ub) { + ASN_DEBUG("Code %d is out of range (%ld..%ld)", + ch, lb, ub); + return 1; /* FATAL */ + } + switch(bpc) { + case 1: *buf = ch; break; + case 2: buf[0] = ch >> 8; buf[1] = ch; break; + case 4: buf[0] = ch >> 24; buf[1] = ch >> 16; + buf[2] = ch >> 8; buf[3] = ch; break; + } + } + + return 0; +} + +static int +OCTET_STRING_per_put_characters(asn_per_outp_t *po, const uint8_t *buf, + size_t units, unsigned int bpc, unsigned int unit_bits, + long lb, long ub, const asn_per_constraints_t *pc) { + const uint8_t *end = buf + units * bpc; + + ASN_DEBUG("Squeezing %d characters into (%ld..%ld):%d (%d bpc)", + (int)units, lb, ub, unit_bits, bpc); + + /* X.691: 27.5.4 */ + if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { + /* Encode as is */ + lb = 0; + } else if(pc && pc->value2code) { + for(; buf < end; buf += bpc) { + int code; + uint32_t value; + switch(bpc) { + case 1: value = *(const uint8_t *)buf; break; + case 2: value = (buf[0] << 8) | buf[1]; break; + case 4: value = (buf[0] << 24) | (buf[1] << 16) + | (buf[2] << 8) | buf[3]; break; + default: return -1; + } + code = pc->value2code(value); + if(code < 0) { + ASN_DEBUG("Character %d (0x%02x) is" + " not in map (%ld..%ld)", + *buf, *buf, lb, ub); + return -1; + } + if(per_put_few_bits(po, code, unit_bits)) + return -1; + } + } + + /* Shortcut the no-op copying to the aligned structure */ + if(lb == 0 && (unit_bits == 8 * bpc)) { + return per_put_many_bits(po, buf, unit_bits * units); + } + + for(ub -= lb; buf < end; buf += bpc) { + int ch; + uint32_t value; + switch(bpc) { + case 1: + value = *(const uint8_t *)buf; + break; + case 2: + value = (buf[0] << 8) | buf[1]; + break; + case 4: + value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; + break; + default: + return -1; + } + ch = value - lb; + if(ch < 0 || ch > ub) { + ASN_DEBUG("Character %d (0x%02x) is out of range (%ld..%ld)", *buf, + value, lb, ub + lb); + return -1; + } + if(per_put_few_bits(po, ch, unit_bits)) return -1; + } + + return 0; +} + +static asn_per_constraints_t asn_DEF_OCTET_STRING_constraints = { + { APC_CONSTRAINED, 8, 8, 0, 255 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, + 0, 0 +}; + +asn_dec_rval_t +OCTET_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = + constraints ? constraints : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + enum { + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + + (void)opt_codec_ctx; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + case ASN_OSUBV_BIT: + ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); + RETURN(RC_FAIL); + break; + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_CHAR; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + break; + } + + /* + * Allocate the string. + */ + if(!st) { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + if(bpc) { + st->size = csiz->upper_bound * bpc; + } else { + st->size = (csiz->upper_bound + 7) >> 3; + } + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + if(bpc) { + ASN_DEBUG("Encoding OCTET STRING size %ld", + csiz->upper_bound); + ret = OCTET_STRING_per_get_characters(pd, st->buf, + csiz->upper_bound, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ASN_DEBUG("Encoding BIT STRING size %ld", + csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, + unit_bits * csiz->upper_bound); + } + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += unit_bits * csiz->upper_bound; + st->buf[st->size] = 0; + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + void *p; + int ret; + + /* Get the PER length */ + raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, + &repeat); + if(raw_len < 0) RETURN(RC_WMORE); + if(raw_len == 0 && st->buf) break; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + len_bytes = raw_len * bpc; + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + ret = OCTET_STRING_per_get_characters(pd, &st->buf[st->size], raw_len, + bpc, unit_bits, cval->lower_bound, + cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +OCTET_STRING_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + size_t size_in_units; + const uint8_t *buf; + int ret; + enum { + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + case ASN_OSUBV_BIT: + ASN__ENCODE_FAILED; + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_CHAR; + size_in_units = st->size; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + size_in_units = st->size >> 1; + if(st->size & 1) { + ASN_DEBUG("%s string size is not modulo 2", td->name); + ASN__ENCODE_FAILED; + } + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + size_in_units = st->size >> 2; + if(st->size & 3) { + ASN_DEBUG("%s string size is not modulo 4", td->name); + ASN__ENCODE_FAILED; + } + break; + } + + ASN_DEBUG("Encoding %s into %" ASN_PRI_SIZE " units of %d bits" + " (%ld..%ld, effective %d)%s", + td->name, size_in_units, unit_bits, + csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out whether size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((ssize_t)size_in_units < csiz->lower_bound + || (ssize_t)size_in_units > csiz->upper_bound) { + if(ct_extensible) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + inext = 1; + } else { + ASN__ENCODE_FAILED; + } + } + } else { + inext = 0; + } + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + if(csiz->effective_bits >= 0 && !inext) { + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes (%ld), length in %d bits", st->size, + size_in_units - csiz->lower_bound, csiz->effective_bits); + ret = per_put_few_bits(po, size_in_units - csiz->lower_bound, + csiz->effective_bits); + if(ret) ASN__ENCODE_FAILED; + ret = OCTET_STRING_per_put_characters(po, st->buf, size_in_units, bpc, + unit_bits, cval->lower_bound, + cval->upper_bound, pc); + if(ret) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); + + buf = st->buf; + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " in units", size_in_units); + do { + int need_eom = 0; + ssize_t may_save = uper_put_length(po, size_in_units, &need_eom); + if(may_save < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "%s", may_save, size_in_units, + need_eom ? ",+EOM" : ""); + + ret = OCTET_STRING_per_put_characters(po, buf, may_save, bpc, unit_bits, + cval->lower_bound, + cval->upper_bound, pc); + if(ret) ASN__ENCODE_FAILED; + + buf += may_save * bpc; + size_in_units -= may_save; + assert(!(may_save & 0x07) || !size_in_units); + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size_in_units); + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + enum { + OS__BPC_BIT = 0, + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + + (void)opt_codec_ctx; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + + switch(specs->subvariant) { + default: +/* case ASN_OSUBV_ANY: + ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); + RETURN(RC_FAIL); +*/ + case ASN_OSUBV_BIT: + canonical_unit_bits = unit_bits = 1; + bpc = OS__BPC_BIT; + break; + case ASN_OSUBV_ANY: + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; +/* if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; +*/ + bpc = OS__BPC_CHAR; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + break; + } + + /* + * Allocate the string. + */ + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + cval = &asn_DEF_OCTET_STRING_constraints.value; + unit_bits = canonical_unit_bits; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + if(bpc) { + st->size = csiz->upper_bound * bpc; + } else { + st->size = (csiz->upper_bound + 7) >> 3; + } + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + if (st->size > 2) { /* X.691 #16 NOTE 1 */ + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + if(bpc) { + ASN_DEBUG("Decoding OCTET STRING size %ld", + csiz->upper_bound); + ret = OCTET_STRING_per_get_characters(pd, st->buf, + csiz->upper_bound, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ASN_DEBUG("Decoding BIT STRING size %ld", + csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, + unit_bits * csiz->upper_bound); + } + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += unit_bits * csiz->upper_bound; + st->buf[st->size] = 0; + if(bpc == 0) { + int ubs = (csiz->upper_bound & 0x7); + st->bits_unused = ubs ? 8 - ubs : 0; + } + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + ssize_t len_bits; + void *p; + int ret; + + /* Get the PER length */ + if (csiz->upper_bound - csiz->lower_bound == 0) + /* Indefinite length case */ + raw_len = aper_get_length(pd, -1, csiz->effective_bits, &repeat); + else + raw_len = aper_get_length(pd, csiz->upper_bound - csiz->lower_bound + 1, csiz->effective_bits, &repeat); + repeat = 0; + if(raw_len < 0) RETURN(RC_WMORE); + raw_len += csiz->lower_bound; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + + if (raw_len > 2) { /* X.691 #16 NOTE 1 */ + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + + if(bpc) { + len_bytes = raw_len * bpc; + len_bits = len_bytes * unit_bits; + } else { + len_bits = raw_len; + len_bytes = (len_bits + 7) >> 3; + if(len_bits & 0x7) + st->bits_unused = 8 - (len_bits & 0x7); + /* len_bits be multiple of 16K if repeat is set */ + } + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + if(bpc) { + ret = OCTET_STRING_per_get_characters(pd, + &st->buf[st->size], raw_len, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ret = per_get_many_bits(pd, &st->buf[st->size], + 0, len_bits); + } + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +OCTET_STRING_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + unsigned int sizeinunits; + const uint8_t *buf; + int ret; + enum { + OS__BPC_BIT = 0, + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + switch(specs->subvariant) { + default: + /* case ASN_OSUBV_ANY: + ASN__ENCODE_FAILED; + */ + case ASN_OSUBV_BIT: + canonical_unit_bits = unit_bits = 1; + bpc = OS__BPC_BIT; + sizeinunits = st->size * 8 - (st->bits_unused & 0x07); + ASN_DEBUG("BIT STRING of %d bytes", + sizeinunits); + break; + case ASN_OSUBV_ANY: + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; +/* if(cval->flags & APC_CONSTRAINED) + unit_bits = 8; +*/ + bpc = OS__BPC_CHAR; + sizeinunits = st->size; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + sizeinunits = st->size / 2; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + sizeinunits = st->size / 4; + break; + } + + ASN_DEBUG("Encoding %s into %d units of %d bits" + " (%ld..%ld, effective %d)%s", + td->name, sizeinunits, unit_bits, + csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out wheter size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((int)sizeinunits < csiz->lower_bound + || (int)sizeinunits > csiz->upper_bound) { + if(ct_extensible) { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + inext = 1; + } else + ASN__ENCODE_FAILED; + } + } else { + inext = 0; + } + + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits >= 0) { + ASN_DEBUG("Encoding %lu bytes (%ld), length in %d bits", + st->size, sizeinunits - csiz->lower_bound, + csiz->effective_bits); + if (csiz->effective_bits > 0) { + ret = aper_put_length(po, csiz->upper_bound - csiz->lower_bound + 1, sizeinunits - csiz->lower_bound); + if(ret) ASN__ENCODE_FAILED; + } + /* EB MOD + AFAIU if lb != ub it is aligned whatever the number of bits */ + if ((st->size > 2) || (csiz->lower_bound != csiz->upper_bound)) { /* X.691 #16.11 */ + if (aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + } + if(bpc) { + ret = OCTET_STRING_per_put_characters(po, st->buf, + sizeinunits, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + } else { + ret = per_put_many_bits(po, st->buf, + sizeinunits * unit_bits); + } + if(ret) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %lu bytes", st->size); + + if(sizeinunits == 0) { + if(aper_put_length(po, -1, 0)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + buf = st->buf; + while(sizeinunits) { + ssize_t maySave = aper_put_length(po, -1, sizeinunits); + + if(maySave < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %ld of %ld", + (long)maySave, (long)sizeinunits); + + if(bpc) { + ret = OCTET_STRING_per_put_characters(po, buf, + maySave, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + } else { + ret = per_put_many_bits(po, buf, maySave * unit_bits); + } + if(ret) ASN__ENCODE_FAILED; + + if(bpc) + buf += maySave * bpc; + else + buf += maySave >> 3; + sizeinunits -= maySave; + assert(!(maySave & 0x07) || !sizeinunits); + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +int +OCTET_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + char scratch[16 * 3 + 4]; + char *p = scratch; + uint8_t *buf; + uint8_t *end; + size_t i; + + (void)td; /* Unused argument */ + + if(!st || (!st->buf && st->size)) + return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* + * Dump the contents of the buffer in hexadecimal. + */ + buf = st->buf; + end = buf + st->size; + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + _i_INDENT(1); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + + if(p > scratch) { + p--; /* Remove the tail space */ + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + } + + return 0; +} + +int +OCTET_STRING_print_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, + void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(st && (st->buf || !st->size)) { + return (cb(st->buf, st->size, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, + enum asn_struct_free_method method) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const asn_OCTET_STRING_specifics_t *specs; + asn_struct_ctx_t *ctx; + struct _stack *stck; + + if(!td || !st) + return; + + specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + ASN_DEBUG("Freeing %s as OCTET STRING", td->name); + + if(st->buf) { + FREEMEM(st->buf); + st->buf = 0; + } + + /* + * Remove decode-time stack. + */ + stck = (struct _stack *)ctx->ptr; + if(stck) { + while(stck->tail) { + struct _stack_el *sel = stck->tail; + stck->tail = sel->prev; + FREEMEM(sel); + } + FREEMEM(stck); + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(sptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(sptr, 0, + td->specifics + ? ((const asn_OCTET_STRING_specifics_t *)(td->specifics)) + ->struct_size + : sizeof(OCTET_STRING_t)); + break; + } +} + +/* + * Conversion routines. + */ +int +OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) { + void *buf; + + if(st == 0 || (str == 0 && len)) { + errno = EINVAL; + return -1; + } + + /* + * Clear the OCTET STRING. + */ + if(str == NULL) { + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + return 0; + } + + /* Determine the original string size, if not explicitly given */ + if(len < 0) + len = strlen(str); + + /* Allocate and fill the memory */ + buf = MALLOC(len + 1); + if(buf == NULL) + return -1; + + memcpy(buf, str, len); + ((uint8_t *)buf)[len] = '\0'; /* Couldn't use memcpy(len+1)! */ + FREEMEM(st->buf); + st->buf = (uint8_t *)buf; + st->size = len; + + return 0; +} + +OCTET_STRING_t * +OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, const char *str, + int len) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + OCTET_STRING_t *st; + + st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); + if(st && str && OCTET_STRING_fromBuf(st, str, len)) { + FREEMEM(st); + st = NULL; + } + + return st; +} + +/* + * Lexicographically compare the common prefix of both strings, + * and if it is the same return -1 for the smallest string. + */ +int +OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics; + const OCTET_STRING_t *a = aptr; + const OCTET_STRING_t *b = bptr; + + assert(!specs || specs->subvariant != ASN_OSUBV_BIT); + + if(a && b) { + size_t common_prefix_size = a->size <= b->size ? a->size : b->size; + int ret = memcmp(a->buf, b->buf, common_prefix_size); + if(ret == 0) { + /* Figure out which string with equal prefixes is longer. */ + if(a->size < b->size) { + return -1; + } else if(a->size > b->size) { + return 1; + } else { + return 0; + } + } else { + return ret < 0 ? -1 : 1; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } + +} + +/* + * Biased function for randomizing character values around their limits. + */ +static uint32_t +OCTET_STRING__random_char(unsigned long lb, unsigned long ub) { + assert(lb <= ub); + switch(asn_random_between(0, 16)) { + case 0: + if(lb < ub) return lb + 1; + /* Fall through */ + case 1: + return lb; + case 2: + if(lb < ub) return ub - 1; + /* Fall through */ + case 3: + return ub; + default: + return asn_random_between(lb, ub); + } +} + + +size_t +OCTET_STRING_random_length_constrained( + const asn_TYPE_descriptor_t *td, + const asn_encoding_constraints_t *constraints, size_t max_length) { + const unsigned lengths[] = {0, 1, 2, 3, 4, 8, + 126, 127, 128, 16383, 16384, 16385, + 65534, 65535, 65536, 65537}; + size_t rnd_len; + + /* Figure out how far we should go */ + rnd_len = lengths[asn_random_between( + 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->size; + if(pc->flags & APC_CONSTRAINED) { + long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length + ? pc->upper_bound + : (ssize_t)max_length; + if(max_length <= (size_t)pc->lower_bound) { + return pc->lower_bound; + } + if(pc->flags & APC_EXTENSIBLE) { + switch(asn_random_between(0, 5)) { + case 0: + if(pc->lower_bound > 0) { + rnd_len = pc->lower_bound - 1; + break; + } + /* Fall through */ + case 1: + rnd_len = pc->upper_bound + 1; + break; + case 2: + /* Keep rnd_len from the table */ + if(rnd_len <= max_length) { + break; + } + /* Fall through */ + default: + rnd_len = asn_random_between(pc->lower_bound, + suggested_upper_bound); + } + } else { + rnd_len = + asn_random_between(pc->lower_bound, suggested_upper_bound); + } + } else { + rnd_len = asn_random_between(0, max_length); + } + } else if(rnd_len > max_length) { + rnd_len = asn_random_between(0, max_length); + } + + return rnd_len; +} + +asn_random_fill_result_t +OCTET_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + unsigned int unit_bytes = 1; + unsigned long clb = 0; /* Lower bound on char */ + unsigned long cub = 255; /* Higher bound on char value */ + uint8_t *buf; + uint8_t *bend; + uint8_t *b; + size_t rnd_len; + OCTET_STRING_t *st; + + if(max_length == 0 && !*sptr) return result_skipped; + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + return result_failed; + case ASN_OSUBV_BIT: + /* Handled by BIT_STRING itself. */ + return result_failed; + case ASN_OSUBV_STR: + unit_bytes = 1; + clb = 0; + cub = 255; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + clb = 0; + cub = 65535; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + clb = 0; + cub = 0x10FFFF; + break; + } + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->value; + if(pc->flags & APC_SEMI_CONSTRAINED) { + clb = pc->lower_bound; + } else if(pc->flags & APC_CONSTRAINED) { + clb = pc->lower_bound; + cub = pc->upper_bound; + } + } + + rnd_len = + OCTET_STRING_random_length_constrained(td, constraints, max_length); + + buf = CALLOC(unit_bytes, rnd_len + 1); + if(!buf) return result_failed; + + bend = &buf[unit_bytes * rnd_len]; + + switch(unit_bytes) { + case 1: + for(b = buf; b < bend; b += unit_bytes) { + *(uint8_t *)b = OCTET_STRING__random_char(clb, cub); + } + *(uint8_t *)b = 0; + break; + case 2: + for(b = buf; b < bend; b += unit_bytes) { + uint32_t code = OCTET_STRING__random_char(clb, cub); + b[0] = code >> 8; + b[1] = code; + } + *(uint16_t *)b = 0; + break; + case 4: + for(b = buf; b < bend; b += unit_bytes) { + uint32_t code = OCTET_STRING__random_char(clb, cub); + b[0] = code >> 24; + b[1] = code >> 16; + b[2] = code >> 8; + b[3] = code; + } + *(uint32_t *)b = 0; + break; + } + + if(*sptr) { + st = *sptr; + FREEMEM(st->buf); + } else { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) { + FREEMEM(buf); + return result_failed; + } + } + + st->buf = buf; + st->size = unit_bytes * rnd_len; + + result_ok.length = st->size; + return result_ok; +} diff --git a/Bouncer/e2ap/lib/OCTET_STRING_oer.c b/Bouncer/e2ap/lib/OCTET_STRING_oer.c new file mode 100644 index 0000000..c16faea --- /dev/null +++ b/Bouncer/e2ap/lib/OCTET_STRING_oer.c @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +OCTET_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + + size_t unit_bytes; + switch(specs->subvariant) { + default: + case ASN_OSUBV_BIT: + ASN_DEBUG("Invalid use of OCTET STRING to decode BIT STRING"); + ASN__DECODE_FAILED; + case ASN_OSUBV_ANY: + /* Fall through */ + case ASN_OSUBV_STR: + unit_bytes = 1; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + break; + } + + (void)opt_codec_ctx; + + if(!st) { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) ASN__DECODE_FAILED; + } + + if(ct_size >= 0) { + expected_length = unit_bytes * ct_size; + } else { + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + rval.consumed = len_len; + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(expected_length % unit_bytes != 0) { + ASN_DEBUG( + "Data size %" ASN_PRI_SIZE " bytes is not consistent with multiplier %" ASN_PRI_SIZE "", + expected_length, unit_bytes); + ASN__DECODE_FAILED; + } + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + + rval.consumed += expected_length; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +OCTET_STRING_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_enc_rval_t er = {0, 0, 0}; + + if(!st) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s %" ASN_PRI_SIZE " as OCTET STRING", td ? td->name : "", st->size); + + if(ct_size >= 0) { + /* + * Check that available data matches the constraint + */ + size_t unit_bytes; + switch(specs->subvariant) { + default: + case ASN_OSUBV_BIT: + ASN_DEBUG("Invalid use of OCTET STRING to encode BIT STRING"); + ASN__ENCODE_FAILED; + case ASN_OSUBV_ANY: + /* Fall through */ + case ASN_OSUBV_STR: + unit_bytes = 1; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + break; + } + + if(st->size != unit_bytes * (size_t)ct_size) { + ASN_DEBUG( + "Trying to encode %s (%" ASN_PRI_SIZE " bytes) which doesn't fit SIZE " + "constraint (%" ASN_PRI_SIZE ")", + td->name, st->size, ct_size); + ASN__ENCODE_FAILED; + } + } else { + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t ret = oer_serialize_length(st->size, cb, app_key); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += ret; + } + + er.encoded += st->size; + if(cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/asn1c_defs/OPEN_TYPE.c b/Bouncer/e2ap/lib/OPEN_TYPE.c similarity index 100% rename from Bouncer/asn1c_defs/OPEN_TYPE.c rename to Bouncer/e2ap/lib/OPEN_TYPE.c diff --git a/Bouncer/e2ap/lib/OPEN_TYPE_oer.c b/Bouncer/e2ap/lib/OPEN_TYPE_oer.c new file mode 100644 index 0000000..dd2f5c6 --- /dev/null +++ b/Bouncer/e2ap/lib/OPEN_TYPE_oer.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +asn_dec_rval_t +OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + asn_TYPE_member_t *elm, const void *ptr, size_t size) { + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + size_t ot_ret; + + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + ot_ret = oer_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, + &inner_value, ptr, size); + switch(ot_ret) { + default: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + rv.code = RC_OK; + rv.consumed = ot_ret; + return rv; + } else { + /* Oh, now a full-blown failure failure */ + } + /* Fall through */ + case -1: + rv.code = RC_FAIL; + rv.consumed = ot_ret; + break; + case 0: + rv.code = RC_WMORE; + rv.consumed = 0; + break; + } + + if(*memb_ptr2) { + const asn_CHOICE_specifics_t *specs = + selected.type_descriptor->specifics; + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_FREE_CONTENTS_ONLY(*selected.type_descriptor, + inner_value); + memset(*memb_ptr2, 0, specs->struct_size); + } + } + return rv; +} diff --git a/Bouncer/e2ap/lib/PLMN-Identity.c b/Bouncer/e2ap/lib/PLMN-Identity.c new file mode 100644 index 0000000..24f3043 --- /dev/null +++ b/Bouncer/e2ap/lib/PLMN-Identity.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PLMN-Identity.h" + +int +PLMN_Identity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_PLMN_Identity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_PLMN_Identity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_PLMN_Identity = { + "PLMN-Identity", + "PLMN-Identity", + &asn_OP_OCTET_STRING, + asn_DEF_PLMN_Identity_tags_1, + sizeof(asn_DEF_PLMN_Identity_tags_1) + /sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */ + asn_DEF_PLMN_Identity_tags_1, /* Same as above */ + sizeof(asn_DEF_PLMN_Identity_tags_1) + /sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */ + { &asn_OER_type_PLMN_Identity_constr_1, &asn_PER_type_PLMN_Identity_constr_1, PLMN_Identity_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/Presence.c b/Bouncer/e2ap/lib/Presence.c new file mode 100644 index 0000000..c32f9e0 --- /dev/null +++ b/Bouncer/e2ap/lib/Presence.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "Presence.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_Presence_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_Presence_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_Presence_value2enum_1[] = { + { 0, 8, "optional" }, + { 1, 11, "conditional" }, + { 2, 9, "mandatory" } +}; +static const unsigned int asn_MAP_Presence_enum2value_1[] = { + 1, /* conditional(1) */ + 2, /* mandatory(2) */ + 0 /* optional(0) */ +}; +const asn_INTEGER_specifics_t asn_SPC_Presence_specs_1 = { + asn_MAP_Presence_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Presence_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Presence_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Presence = { + "Presence", + "Presence", + &asn_OP_NativeEnumerated, + asn_DEF_Presence_tags_1, + sizeof(asn_DEF_Presence_tags_1) + /sizeof(asn_DEF_Presence_tags_1[0]), /* 1 */ + asn_DEF_Presence_tags_1, /* Same as above */ + sizeof(asn_DEF_Presence_tags_1) + /sizeof(asn_DEF_Presence_tags_1[0]), /* 1 */ + { &asn_OER_type_Presence_constr_1, &asn_PER_type_Presence_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Presence_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ProcedureCode.c b/Bouncer/e2ap/lib/ProcedureCode.c new file mode 100644 index 0000000..8678080 --- /dev/null +++ b/Bouncer/e2ap/lib/ProcedureCode.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProcedureCode.h" + +int +ProcedureCode_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_ProcedureCode_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +asn_per_constraints_t asn_PER_type_ProcedureCode_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_ProcedureCode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProcedureCode = { + "ProcedureCode", + "ProcedureCode", + &asn_OP_NativeInteger, + asn_DEF_ProcedureCode_tags_1, + sizeof(asn_DEF_ProcedureCode_tags_1) + /sizeof(asn_DEF_ProcedureCode_tags_1[0]), /* 1 */ + asn_DEF_ProcedureCode_tags_1, /* Same as above */ + sizeof(asn_DEF_ProcedureCode_tags_1) + /sizeof(asn_DEF_ProcedureCode_tags_1[0]), /* 1 */ + { &asn_OER_type_ProcedureCode_constr_1, &asn_PER_type_ProcedureCode_constr_1, ProcedureCode_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/ProtocolIE-Container.c b/Bouncer/e2ap/lib/ProtocolIE-Container.c new file mode 100644 index 0000000..05014c6 --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-Container.c @@ -0,0 +1,870 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-Container.h" + +#include "ProtocolIE-Field.h" +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P1_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P1_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P2_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P2_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P3_constr_7 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P3_constr_7 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P4_constr_9 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P4_constr_9 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P5_constr_11 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P5_constr_11 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P6_constr_13 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P6_constr_13 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P7_constr_15 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P7_constr_15 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P8_constr_17 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P8_constr_17 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P9_constr_19 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P9_constr_19 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P10_constr_21 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P10_constr_21 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P11_constr_23 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P11_constr_23 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P12_constr_25 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P12_constr_25 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P13_constr_27 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P13_constr_27 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P14_constr_29 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P14_constr_29 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P15_constr_31 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P15_constr_31 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P16_constr_33 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P16_constr_33 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P17_constr_35 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P17_constr_35 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P18_constr_37 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P18_constr_37 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P19_constr_39 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P19_constr_39 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P0_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionRequest_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P0_specs_1 = { + sizeof(struct ProtocolIE_Container_87P0), + offsetof(struct ProtocolIE_Container_87P0, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P0 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P0_tags_1, + sizeof(asn_DEF_ProtocolIE_Container_87P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_Container_87P0_tags_1[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P0_tags_1, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_Container_87P0_tags_1[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P0_constr_1, &asn_PER_type_ProtocolIE_Container_87P0_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P0_1, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P0_specs_1 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P1_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionResponse_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P1_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P1_specs_3 = { + sizeof(struct ProtocolIE_Container_87P1), + offsetof(struct ProtocolIE_Container_87P1, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P1 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P1_tags_3, + sizeof(asn_DEF_ProtocolIE_Container_87P1_tags_3) + /sizeof(asn_DEF_ProtocolIE_Container_87P1_tags_3[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P1_tags_3, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P1_tags_3) + /sizeof(asn_DEF_ProtocolIE_Container_87P1_tags_3[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P1_constr_3, &asn_PER_type_ProtocolIE_Container_87P1_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P1_3, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P1_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P2_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionFailure_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P2_tags_5[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P2_specs_5 = { + sizeof(struct ProtocolIE_Container_87P2), + offsetof(struct ProtocolIE_Container_87P2, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P2 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P2_tags_5, + sizeof(asn_DEF_ProtocolIE_Container_87P2_tags_5) + /sizeof(asn_DEF_ProtocolIE_Container_87P2_tags_5[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P2_tags_5, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P2_tags_5) + /sizeof(asn_DEF_ProtocolIE_Container_87P2_tags_5[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P2_constr_5, &asn_PER_type_ProtocolIE_Container_87P2_constr_5, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P2_5, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P2_specs_5 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P3_7[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteRequest_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P3_tags_7[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P3_specs_7 = { + sizeof(struct ProtocolIE_Container_87P3), + offsetof(struct ProtocolIE_Container_87P3, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P3 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P3_tags_7, + sizeof(asn_DEF_ProtocolIE_Container_87P3_tags_7) + /sizeof(asn_DEF_ProtocolIE_Container_87P3_tags_7[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P3_tags_7, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P3_tags_7) + /sizeof(asn_DEF_ProtocolIE_Container_87P3_tags_7[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P3_constr_7, &asn_PER_type_ProtocolIE_Container_87P3_constr_7, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P3_7, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P3_specs_7 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P4_9[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteResponse_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P4_tags_9[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P4_specs_9 = { + sizeof(struct ProtocolIE_Container_87P4), + offsetof(struct ProtocolIE_Container_87P4, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P4 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P4_tags_9, + sizeof(asn_DEF_ProtocolIE_Container_87P4_tags_9) + /sizeof(asn_DEF_ProtocolIE_Container_87P4_tags_9[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P4_tags_9, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P4_tags_9) + /sizeof(asn_DEF_ProtocolIE_Container_87P4_tags_9[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P4_constr_9, &asn_PER_type_ProtocolIE_Container_87P4_constr_9, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P4_9, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P4_specs_9 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P5_11[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteFailure_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P5_tags_11[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P5_specs_11 = { + sizeof(struct ProtocolIE_Container_87P5), + offsetof(struct ProtocolIE_Container_87P5, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P5 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P5_tags_11, + sizeof(asn_DEF_ProtocolIE_Container_87P5_tags_11) + /sizeof(asn_DEF_ProtocolIE_Container_87P5_tags_11[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P5_tags_11, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P5_tags_11) + /sizeof(asn_DEF_ProtocolIE_Container_87P5_tags_11[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P5_constr_11, &asn_PER_type_ProtocolIE_Container_87P5_constr_11, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P5_11, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P5_specs_11 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P6_13[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICindication_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P6_tags_13[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P6_specs_13 = { + sizeof(struct ProtocolIE_Container_87P6), + offsetof(struct ProtocolIE_Container_87P6, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P6 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P6_tags_13, + sizeof(asn_DEF_ProtocolIE_Container_87P6_tags_13) + /sizeof(asn_DEF_ProtocolIE_Container_87P6_tags_13[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P6_tags_13, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P6_tags_13) + /sizeof(asn_DEF_ProtocolIE_Container_87P6_tags_13[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P6_constr_13, &asn_PER_type_ProtocolIE_Container_87P6_constr_13, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P6_13, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P6_specs_13 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P7_15[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICcontrolRequest_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P7_tags_15[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P7_specs_15 = { + sizeof(struct ProtocolIE_Container_87P7), + offsetof(struct ProtocolIE_Container_87P7, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P7 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P7_tags_15, + sizeof(asn_DEF_ProtocolIE_Container_87P7_tags_15) + /sizeof(asn_DEF_ProtocolIE_Container_87P7_tags_15[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P7_tags_15, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P7_tags_15) + /sizeof(asn_DEF_ProtocolIE_Container_87P7_tags_15[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P7_constr_15, &asn_PER_type_ProtocolIE_Container_87P7_constr_15, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P7_15, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P7_specs_15 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P8_17[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICcontrolAcknowledge_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P8_tags_17[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P8_specs_17 = { + sizeof(struct ProtocolIE_Container_87P8), + offsetof(struct ProtocolIE_Container_87P8, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P8 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P8_tags_17, + sizeof(asn_DEF_ProtocolIE_Container_87P8_tags_17) + /sizeof(asn_DEF_ProtocolIE_Container_87P8_tags_17[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P8_tags_17, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P8_tags_17) + /sizeof(asn_DEF_ProtocolIE_Container_87P8_tags_17[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P8_constr_17, &asn_PER_type_ProtocolIE_Container_87P8_constr_17, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P8_17, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P8_specs_17 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P9_19[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICcontrolFailure_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P9_tags_19[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P9_specs_19 = { + sizeof(struct ProtocolIE_Container_87P9), + offsetof(struct ProtocolIE_Container_87P9, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P9 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P9_tags_19, + sizeof(asn_DEF_ProtocolIE_Container_87P9_tags_19) + /sizeof(asn_DEF_ProtocolIE_Container_87P9_tags_19[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P9_tags_19, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P9_tags_19) + /sizeof(asn_DEF_ProtocolIE_Container_87P9_tags_19[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P9_constr_19, &asn_PER_type_ProtocolIE_Container_87P9_constr_19, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P9_19, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P9_specs_19 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P10_21[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ErrorIndication_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P10_tags_21[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P10_specs_21 = { + sizeof(struct ProtocolIE_Container_87P10), + offsetof(struct ProtocolIE_Container_87P10, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P10 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P10_tags_21, + sizeof(asn_DEF_ProtocolIE_Container_87P10_tags_21) + /sizeof(asn_DEF_ProtocolIE_Container_87P10_tags_21[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P10_tags_21, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P10_tags_21) + /sizeof(asn_DEF_ProtocolIE_Container_87P10_tags_21[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P10_constr_21, &asn_PER_type_ProtocolIE_Container_87P10_constr_21, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P10_21, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P10_specs_21 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P11_23[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2setupRequestIEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P11_tags_23[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P11_specs_23 = { + sizeof(struct ProtocolIE_Container_87P11), + offsetof(struct ProtocolIE_Container_87P11, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P11 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P11_tags_23, + sizeof(asn_DEF_ProtocolIE_Container_87P11_tags_23) + /sizeof(asn_DEF_ProtocolIE_Container_87P11_tags_23[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P11_tags_23, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P11_tags_23) + /sizeof(asn_DEF_ProtocolIE_Container_87P11_tags_23[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P11_constr_23, &asn_PER_type_ProtocolIE_Container_87P11_constr_23, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P11_23, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P11_specs_23 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P12_25[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2setupResponseIEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P12_tags_25[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P12_specs_25 = { + sizeof(struct ProtocolIE_Container_87P12), + offsetof(struct ProtocolIE_Container_87P12, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P12 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P12_tags_25, + sizeof(asn_DEF_ProtocolIE_Container_87P12_tags_25) + /sizeof(asn_DEF_ProtocolIE_Container_87P12_tags_25[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P12_tags_25, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P12_tags_25) + /sizeof(asn_DEF_ProtocolIE_Container_87P12_tags_25[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P12_constr_25, &asn_PER_type_ProtocolIE_Container_87P12_constr_25, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P12_25, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P12_specs_25 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P13_27[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2setupFailureIEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P13_tags_27[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P13_specs_27 = { + sizeof(struct ProtocolIE_Container_87P13), + offsetof(struct ProtocolIE_Container_87P13, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P13 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P13_tags_27, + sizeof(asn_DEF_ProtocolIE_Container_87P13_tags_27) + /sizeof(asn_DEF_ProtocolIE_Container_87P13_tags_27[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P13_tags_27, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P13_tags_27) + /sizeof(asn_DEF_ProtocolIE_Container_87P13_tags_27[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P13_constr_27, &asn_PER_type_ProtocolIE_Container_87P13_constr_27, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P13_27, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P13_specs_27 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P14_29[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ResetRequestIEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P14_tags_29[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P14_specs_29 = { + sizeof(struct ProtocolIE_Container_87P14), + offsetof(struct ProtocolIE_Container_87P14, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P14 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P14_tags_29, + sizeof(asn_DEF_ProtocolIE_Container_87P14_tags_29) + /sizeof(asn_DEF_ProtocolIE_Container_87P14_tags_29[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P14_tags_29, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P14_tags_29) + /sizeof(asn_DEF_ProtocolIE_Container_87P14_tags_29[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P14_constr_29, &asn_PER_type_ProtocolIE_Container_87P14_constr_29, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P14_29, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P14_specs_29 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P15_31[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ResetResponseIEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P15_tags_31[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P15_specs_31 = { + sizeof(struct ProtocolIE_Container_87P15), + offsetof(struct ProtocolIE_Container_87P15, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P15 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P15_tags_31, + sizeof(asn_DEF_ProtocolIE_Container_87P15_tags_31) + /sizeof(asn_DEF_ProtocolIE_Container_87P15_tags_31[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P15_tags_31, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P15_tags_31) + /sizeof(asn_DEF_ProtocolIE_Container_87P15_tags_31[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P15_constr_31, &asn_PER_type_ProtocolIE_Container_87P15_constr_31, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P15_31, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P15_specs_31 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P16_33[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceUpdate_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P16_tags_33[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P16_specs_33 = { + sizeof(struct ProtocolIE_Container_87P16), + offsetof(struct ProtocolIE_Container_87P16, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P16 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P16_tags_33, + sizeof(asn_DEF_ProtocolIE_Container_87P16_tags_33) + /sizeof(asn_DEF_ProtocolIE_Container_87P16_tags_33[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P16_tags_33, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P16_tags_33) + /sizeof(asn_DEF_ProtocolIE_Container_87P16_tags_33[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P16_constr_33, &asn_PER_type_ProtocolIE_Container_87P16_constr_33, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P16_33, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P16_specs_33 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P17_35[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceUpdateAcknowledge_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P17_tags_35[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P17_specs_35 = { + sizeof(struct ProtocolIE_Container_87P17), + offsetof(struct ProtocolIE_Container_87P17, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P17 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P17_tags_35, + sizeof(asn_DEF_ProtocolIE_Container_87P17_tags_35) + /sizeof(asn_DEF_ProtocolIE_Container_87P17_tags_35[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P17_tags_35, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P17_tags_35) + /sizeof(asn_DEF_ProtocolIE_Container_87P17_tags_35[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P17_constr_35, &asn_PER_type_ProtocolIE_Container_87P17_constr_35, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P17_35, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P17_specs_35 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P18_37[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceUpdateFailure_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P18_tags_37[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P18_specs_37 = { + sizeof(struct ProtocolIE_Container_87P18), + offsetof(struct ProtocolIE_Container_87P18, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P18 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P18_tags_37, + sizeof(asn_DEF_ProtocolIE_Container_87P18_tags_37) + /sizeof(asn_DEF_ProtocolIE_Container_87P18_tags_37[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P18_tags_37, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P18_tags_37) + /sizeof(asn_DEF_ProtocolIE_Container_87P18_tags_37[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P18_constr_37, &asn_PER_type_ProtocolIE_Container_87P18_constr_37, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P18_37, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P18_specs_37 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P19_39[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceQuery_IEs, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P19_tags_39[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_87P19_specs_39 = { + sizeof(struct ProtocolIE_Container_87P19), + offsetof(struct ProtocolIE_Container_87P19, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P19 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_87P19_tags_39, + sizeof(asn_DEF_ProtocolIE_Container_87P19_tags_39) + /sizeof(asn_DEF_ProtocolIE_Container_87P19_tags_39[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_87P19_tags_39, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_87P19_tags_39) + /sizeof(asn_DEF_ProtocolIE_Container_87P19_tags_39[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_Container_87P19_constr_39, &asn_PER_type_ProtocolIE_Container_87P19_constr_39, SEQUENCE_OF_constraint }, + asn_MBR_ProtocolIE_Container_87P19_39, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_87P19_specs_39 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ProtocolIE-ContainerList.c b/Bouncer/e2ap/lib/ProtocolIE-ContainerList.c new file mode 100644 index 0000000..b43b010 --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-ContainerList.c @@ -0,0 +1,9 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-ContainerList.h" + diff --git a/Bouncer/e2ap/lib/ProtocolIE-ContainerPair.c b/Bouncer/e2ap/lib/ProtocolIE-ContainerPair.c new file mode 100644 index 0000000..0bf1a47 --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-ContainerPair.c @@ -0,0 +1,9 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-ContainerPair.h" + diff --git a/Bouncer/e2ap/lib/ProtocolIE-ContainerPairList.c b/Bouncer/e2ap/lib/ProtocolIE-ContainerPairList.c new file mode 100644 index 0000000..dba4ec4 --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-ContainerPairList.c @@ -0,0 +1,9 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-ContainerPairList.h" + diff --git a/Bouncer/e2ap/lib/ProtocolIE-Field.c b/Bouncer/e2ap/lib/ProtocolIE-Field.c new file mode 100644 index 0000000..80336e8 --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-Field.c @@ -0,0 +1,7398 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-Field.h" + +static const long asn_VAL_4_id_RICaction_ToBeSetup_Item = 19; +static const long asn_VAL_4_ignore = 1; +static const long asn_VAL_4_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RICaction_ToBeSetup_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_4_id_RICaction_ToBeSetup_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_ignore }, + { "&Value", aioc__type, &asn_DEF_RICaction_ToBeSetup_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_4_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICaction_ToBeSetup_ItemIEs_1[] = { + { 1, 4, asn_IOS_RICaction_ToBeSetup_ItemIEs_1_rows } +}; +static const long asn_VAL_9_id_RICaction_Admitted_Item = 14; +static const long asn_VAL_9_ignore = 1; +static const long asn_VAL_9_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RICaction_Admitted_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_9_id_RICaction_Admitted_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore }, + { "&Value", aioc__type, &asn_DEF_RICaction_Admitted_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_9_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICaction_Admitted_ItemIEs_1[] = { + { 1, 4, asn_IOS_RICaction_Admitted_ItemIEs_1_rows } +}; +static const long asn_VAL_10_id_RICaction_NotAdmitted_Item = 16; +static const long asn_VAL_10_ignore = 1; +static const long asn_VAL_10_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RICaction_NotAdmitted_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_10_id_RICaction_NotAdmitted_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_10_ignore }, + { "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_10_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICaction_NotAdmitted_ItemIEs_1[] = { + { 1, 4, asn_IOS_RICaction_NotAdmitted_ItemIEs_1_rows } +}; +static const long asn_VAL_64_id_RANfunction_Item = 8; +static const long asn_VAL_64_ignore = 1; +static const long asn_VAL_64_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RANfunction_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_64_id_RANfunction_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_64_ignore }, + { "&Value", aioc__type, &asn_DEF_RANfunction_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_64_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RANfunction_ItemIEs_1[] = { + { 1, 4, asn_IOS_RANfunction_ItemIEs_1_rows } +}; +static const long asn_VAL_65_id_RANfunctionID_Item = 6; +static const long asn_VAL_65_ignore = 1; +static const long asn_VAL_65_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RANfunctionID_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_65_id_RANfunctionID_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_65_ignore }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_65_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RANfunctionID_ItemIEs_1[] = { + { 1, 4, asn_IOS_RANfunctionID_ItemIEs_1_rows } +}; +static const long asn_VAL_68_id_RANfunctionIEcause_Item = 7; +static const long asn_VAL_68_ignore = 1; +static const long asn_VAL_68_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RANfunctionIDcause_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_68_id_RANfunctionIEcause_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_68_ignore }, + { "&Value", aioc__type, &asn_DEF_RANfunctionIDcause_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_68_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RANfunctionIDcause_ItemIEs_1[] = { + { 1, 4, asn_IOS_RANfunctionIDcause_ItemIEs_1_rows } +}; +static const long asn_VAL_1_id_RICrequestID = 29; +static const long asn_VAL_1_reject = 0; +static const long asn_VAL_1_mandatory = 2; +static const long asn_VAL_2_id_RANfunctionID = 5; +static const long asn_VAL_2_reject = 0; +static const long asn_VAL_2_mandatory = 2; +static const long asn_VAL_3_id_RICsubscriptionDetails = 30; +static const long asn_VAL_3_reject = 0; +static const long asn_VAL_3_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RICsubscriptionRequest_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_1_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_1_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_2_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_2_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_3_id_RICsubscriptionDetails }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, + { "&Value", aioc__type, &asn_DEF_RICsubscriptionDetails }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_3_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICsubscriptionRequest_IEs_1[] = { + { 3, 4, asn_IOS_RICsubscriptionRequest_IEs_1_rows } +}; +static const long asn_VAL_5_id_RICrequestID = 29; +static const long asn_VAL_5_reject = 0; +static const long asn_VAL_5_mandatory = 2; +static const long asn_VAL_6_id_RANfunctionID = 5; +static const long asn_VAL_6_reject = 0; +static const long asn_VAL_6_mandatory = 2; +static const long asn_VAL_7_id_RICactions_Admitted = 17; +static const long asn_VAL_7_reject = 0; +static const long asn_VAL_7_mandatory = 2; +static const long asn_VAL_8_id_RICactions_NotAdmitted = 18; +static const long asn_VAL_8_reject = 0; +static const long asn_VAL_8_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICsubscriptionResponse_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_5_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_5_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_6_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_6_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_7_id_RICactions_Admitted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_reject }, + { "&Value", aioc__type, &asn_DEF_RICaction_Admitted_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_7_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_8_id_RICactions_NotAdmitted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_reject }, + { "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_8_optional } +}; +static const asn_ioc_set_t asn_IOS_RICsubscriptionResponse_IEs_1[] = { + { 4, 4, asn_IOS_RICsubscriptionResponse_IEs_1_rows } +}; +static const long asn_VAL_11_id_RICrequestID = 29; +static const long asn_VAL_11_reject = 0; +static const long asn_VAL_11_mandatory = 2; +static const long asn_VAL_12_id_RANfunctionID = 5; +static const long asn_VAL_12_reject = 0; +static const long asn_VAL_12_mandatory = 2; +static const long asn_VAL_13_id_RICactions_NotAdmitted = 18; +static const long asn_VAL_13_reject = 0; +static const long asn_VAL_13_mandatory = 2; +static const long asn_VAL_14_id_CriticalityDiagnostics = 2; +static const long asn_VAL_14_ignore = 1; +static const long asn_VAL_14_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICsubscriptionFailure_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_11_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_11_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_11_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_12_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_12_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_12_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_13_id_RICactions_NotAdmitted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_13_reject }, + { "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_13_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_14_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_14_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_14_optional } +}; +static const asn_ioc_set_t asn_IOS_RICsubscriptionFailure_IEs_1[] = { + { 4, 4, asn_IOS_RICsubscriptionFailure_IEs_1_rows } +}; +static const long asn_VAL_15_id_RICrequestID = 29; +static const long asn_VAL_15_reject = 0; +static const long asn_VAL_15_mandatory = 2; +static const long asn_VAL_16_id_RANfunctionID = 5; +static const long asn_VAL_16_reject = 0; +static const long asn_VAL_16_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteRequest_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_15_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_15_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_15_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_16_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_16_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_16_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteRequest_IEs_1[] = { + { 2, 4, asn_IOS_RICsubscriptionDeleteRequest_IEs_1_rows } +}; +static const long asn_VAL_17_id_RICrequestID = 29; +static const long asn_VAL_17_reject = 0; +static const long asn_VAL_17_mandatory = 2; +static const long asn_VAL_18_id_RANfunctionID = 5; +static const long asn_VAL_18_reject = 0; +static const long asn_VAL_18_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteResponse_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_17_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_17_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_17_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_18_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_18_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_18_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteResponse_IEs_1[] = { + { 2, 4, asn_IOS_RICsubscriptionDeleteResponse_IEs_1_rows } +}; +static const long asn_VAL_19_id_RICrequestID = 29; +static const long asn_VAL_19_reject = 0; +static const long asn_VAL_19_mandatory = 2; +static const long asn_VAL_20_id_RANfunctionID = 5; +static const long asn_VAL_20_reject = 0; +static const long asn_VAL_20_mandatory = 2; +static const long asn_VAL_21_id_Cause = 1; +static const long asn_VAL_21_ignore = 1; +static const long asn_VAL_21_mandatory = 2; +static const long asn_VAL_22_id_CriticalityDiagnostics = 2; +static const long asn_VAL_22_ignore = 1; +static const long asn_VAL_22_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteFailure_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_19_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_19_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_19_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_20_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_20_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_20_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_21_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_21_ignore }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_21_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_22_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_22_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_22_optional } +}; +static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteFailure_IEs_1[] = { + { 4, 4, asn_IOS_RICsubscriptionDeleteFailure_IEs_1_rows } +}; +static const long asn_VAL_23_id_RICrequestID = 29; +static const long asn_VAL_23_reject = 0; +static const long asn_VAL_23_mandatory = 2; +static const long asn_VAL_24_id_RANfunctionID = 5; +static const long asn_VAL_24_reject = 0; +static const long asn_VAL_24_mandatory = 2; +static const long asn_VAL_25_id_RICactionID = 15; +static const long asn_VAL_25_reject = 0; +static const long asn_VAL_25_mandatory = 2; +static const long asn_VAL_26_id_RICindicationSN = 27; +static const long asn_VAL_26_reject = 0; +static const long asn_VAL_26_optional = 0; +static const long asn_VAL_27_id_RICindicationType = 28; +static const long asn_VAL_27_reject = 0; +static const long asn_VAL_27_mandatory = 2; +static const long asn_VAL_28_id_RICindicationHeader = 25; +static const long asn_VAL_28_reject = 0; +static const long asn_VAL_28_mandatory = 2; +static const long asn_VAL_29_id_RICindicationMessage = 26; +static const long asn_VAL_29_reject = 0; +static const long asn_VAL_29_mandatory = 2; +static const long asn_VAL_30_id_RICcallProcessID = 20; +static const long asn_VAL_30_reject = 0; +static const long asn_VAL_30_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICindication_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_23_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_23_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_23_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_24_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_24_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_24_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_25_id_RICactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_25_reject }, + { "&Value", aioc__type, &asn_DEF_RICactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_25_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_26_id_RICindicationSN }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_26_reject }, + { "&Value", aioc__type, &asn_DEF_RICindicationSN }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_26_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_27_id_RICindicationType }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_27_reject }, + { "&Value", aioc__type, &asn_DEF_RICindicationType }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_27_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_28_id_RICindicationHeader }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_28_reject }, + { "&Value", aioc__type, &asn_DEF_RICindicationHeader }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_28_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_29_id_RICindicationMessage }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_29_reject }, + { "&Value", aioc__type, &asn_DEF_RICindicationMessage }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_29_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_30_id_RICcallProcessID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_30_reject }, + { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_30_optional } +}; +static const asn_ioc_set_t asn_IOS_RICindication_IEs_1[] = { + { 8, 4, asn_IOS_RICindication_IEs_1_rows } +}; +static const long asn_VAL_31_id_RICrequestID = 29; +static const long asn_VAL_31_reject = 0; +static const long asn_VAL_31_mandatory = 2; +static const long asn_VAL_32_id_RANfunctionID = 5; +static const long asn_VAL_32_reject = 0; +static const long asn_VAL_32_mandatory = 2; +static const long asn_VAL_33_id_RICcallProcessID = 20; +static const long asn_VAL_33_reject = 0; +static const long asn_VAL_33_optional = 0; +static const long asn_VAL_34_id_RICcontrolHeader = 22; +static const long asn_VAL_34_reject = 0; +static const long asn_VAL_34_mandatory = 2; +static const long asn_VAL_35_id_RICcontrolMessage = 23; +static const long asn_VAL_35_reject = 0; +static const long asn_VAL_35_mandatory = 2; +static const long asn_VAL_36_id_RICcontrolAckRequest = 21; +static const long asn_VAL_36_reject = 0; +static const long asn_VAL_36_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICcontrolRequest_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_31_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_31_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_31_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_32_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_32_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_32_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_33_id_RICcallProcessID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_33_reject }, + { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_33_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_34_id_RICcontrolHeader }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_34_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolHeader }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_34_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_35_id_RICcontrolMessage }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_35_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolMessage }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_35_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_36_id_RICcontrolAckRequest }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_36_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolAckRequest }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_36_optional } +}; +static const asn_ioc_set_t asn_IOS_RICcontrolRequest_IEs_1[] = { + { 6, 4, asn_IOS_RICcontrolRequest_IEs_1_rows } +}; +static const long asn_VAL_37_id_RICrequestID = 29; +static const long asn_VAL_37_reject = 0; +static const long asn_VAL_37_mandatory = 2; +static const long asn_VAL_38_id_RANfunctionID = 5; +static const long asn_VAL_38_reject = 0; +static const long asn_VAL_38_mandatory = 2; +static const long asn_VAL_39_id_RICcallProcessID = 20; +static const long asn_VAL_39_reject = 0; +static const long asn_VAL_39_optional = 0; +static const long asn_VAL_40_id_RICcontrolStatus = 24; +static const long asn_VAL_40_reject = 0; +static const long asn_VAL_40_mandatory = 2; +static const long asn_VAL_41_id_RICcontrolOutcome = 32; +static const long asn_VAL_41_reject = 0; +static const long asn_VAL_41_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICcontrolAcknowledge_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_37_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_37_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_37_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_38_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_38_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_38_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_39_id_RICcallProcessID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_39_reject }, + { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_39_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_40_id_RICcontrolStatus }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_40_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolStatus }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_40_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_41_id_RICcontrolOutcome }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_41_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolOutcome }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_41_optional } +}; +static const asn_ioc_set_t asn_IOS_RICcontrolAcknowledge_IEs_1[] = { + { 5, 4, asn_IOS_RICcontrolAcknowledge_IEs_1_rows } +}; +static const long asn_VAL_42_id_RICrequestID = 29; +static const long asn_VAL_42_reject = 0; +static const long asn_VAL_42_mandatory = 2; +static const long asn_VAL_43_id_RANfunctionID = 5; +static const long asn_VAL_43_reject = 0; +static const long asn_VAL_43_mandatory = 2; +static const long asn_VAL_44_id_RICcallProcessID = 20; +static const long asn_VAL_44_reject = 0; +static const long asn_VAL_44_optional = 0; +static const long asn_VAL_45_id_Cause = 1; +static const long asn_VAL_45_ignore = 1; +static const long asn_VAL_45_mandatory = 2; +static const long asn_VAL_46_id_RICcontrolOutcome = 32; +static const long asn_VAL_46_reject = 0; +static const long asn_VAL_46_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICcontrolFailure_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_42_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_42_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_42_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_43_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_43_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_43_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_44_id_RICcallProcessID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_44_reject }, + { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_44_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_45_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_45_ignore }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_45_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_46_id_RICcontrolOutcome }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_46_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolOutcome }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_46_optional } +}; +static const asn_ioc_set_t asn_IOS_RICcontrolFailure_IEs_1[] = { + { 5, 4, asn_IOS_RICcontrolFailure_IEs_1_rows } +}; +static const long asn_VAL_47_id_RICrequestID = 29; +static const long asn_VAL_47_reject = 0; +static const long asn_VAL_47_optional = 0; +static const long asn_VAL_48_id_RANfunctionID = 5; +static const long asn_VAL_48_reject = 0; +static const long asn_VAL_48_optional = 0; +static const long asn_VAL_49_id_Cause = 1; +static const long asn_VAL_49_ignore = 1; +static const long asn_VAL_49_optional = 0; +static const long asn_VAL_50_id_CriticalityDiagnostics = 2; +static const long asn_VAL_50_ignore = 1; +static const long asn_VAL_50_optional = 0; +static const asn_ioc_cell_t asn_IOS_ErrorIndication_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_47_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_47_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_47_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_48_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_48_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_48_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_49_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_49_ignore }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_49_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_50_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_50_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_50_optional } +}; +static const asn_ioc_set_t asn_IOS_ErrorIndication_IEs_1[] = { + { 4, 4, asn_IOS_ErrorIndication_IEs_1_rows } +}; +static const long asn_VAL_51_id_GlobalE2node_ID = 3; +static const long asn_VAL_51_reject = 0; +static const long asn_VAL_51_mandatory = 2; +static const long asn_VAL_52_id_RANfunctionsAdded = 10; +static const long asn_VAL_52_reject = 0; +static const long asn_VAL_52_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2setupRequestIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_51_id_GlobalE2node_ID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_51_reject }, + { "&Value", aioc__type, &asn_DEF_GlobalE2node_ID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_51_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_52_id_RANfunctionsAdded }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_52_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctions_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_52_optional } +}; +static const asn_ioc_set_t asn_IOS_E2setupRequestIEs_1[] = { + { 2, 4, asn_IOS_E2setupRequestIEs_1_rows } +}; +static const long asn_VAL_53_id_GlobalRIC_ID = 4; +static const long asn_VAL_53_reject = 0; +static const long asn_VAL_53_mandatory = 2; +static const long asn_VAL_54_id_RANfunctionsAccepted = 9; +static const long asn_VAL_54_reject = 0; +static const long asn_VAL_54_optional = 0; +static const long asn_VAL_55_id_RANfunctionsRejected = 13; +static const long asn_VAL_55_reject = 0; +static const long asn_VAL_55_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2setupResponseIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_53_id_GlobalRIC_ID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_53_reject }, + { "&Value", aioc__type, &asn_DEF_GlobalRIC_ID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_53_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_54_id_RANfunctionsAccepted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_54_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_54_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_55_id_RANfunctionsRejected }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_55_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_55_optional } +}; +static const asn_ioc_set_t asn_IOS_E2setupResponseIEs_1[] = { + { 3, 4, asn_IOS_E2setupResponseIEs_1_rows } +}; +static const long asn_VAL_56_id_Cause = 1; +static const long asn_VAL_56_ignore = 1; +static const long asn_VAL_56_mandatory = 2; +static const long asn_VAL_57_id_TimeToWait = 31; +static const long asn_VAL_57_ignore = 1; +static const long asn_VAL_57_optional = 0; +static const long asn_VAL_58_id_CriticalityDiagnostics = 2; +static const long asn_VAL_58_ignore = 1; +static const long asn_VAL_58_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2setupFailureIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_56_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_56_ignore }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_56_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_57_id_TimeToWait }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_57_ignore }, + { "&Value", aioc__type, &asn_DEF_TimeToWait }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_57_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_58_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_58_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_58_optional } +}; +static const asn_ioc_set_t asn_IOS_E2setupFailureIEs_1[] = { + { 3, 4, asn_IOS_E2setupFailureIEs_1_rows } +}; +static const long asn_VAL_59_id_Cause = 1; +static const long asn_VAL_59_ignore = 1; +static const long asn_VAL_59_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_ResetRequestIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_59_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_59_ignore }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_59_mandatory } +}; +static const asn_ioc_set_t asn_IOS_ResetRequestIEs_1[] = { + { 1, 4, asn_IOS_ResetRequestIEs_1_rows } +}; +static const long asn_VAL_60_id_CriticalityDiagnostics = 2; +static const long asn_VAL_60_ignore = 1; +static const long asn_VAL_60_optional = 0; +static const asn_ioc_cell_t asn_IOS_ResetResponseIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_60_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_60_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_60_optional } +}; +static const asn_ioc_set_t asn_IOS_ResetResponseIEs_1[] = { + { 1, 4, asn_IOS_ResetResponseIEs_1_rows } +}; +static const long asn_VAL_61_id_RANfunctionsAdded = 10; +static const long asn_VAL_61_reject = 0; +static const long asn_VAL_61_optional = 0; +static const long asn_VAL_62_id_RANfunctionsModified = 12; +static const long asn_VAL_62_reject = 0; +static const long asn_VAL_62_optional = 0; +static const long asn_VAL_63_id_RANfunctionsDeleted = 11; +static const long asn_VAL_63_reject = 0; +static const long asn_VAL_63_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICserviceUpdate_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_61_id_RANfunctionsAdded }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_61_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctions_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_61_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_62_id_RANfunctionsModified }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_62_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctions_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_62_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_63_id_RANfunctionsDeleted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_63_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_63_optional } +}; +static const asn_ioc_set_t asn_IOS_RICserviceUpdate_IEs_1[] = { + { 3, 4, asn_IOS_RICserviceUpdate_IEs_1_rows } +}; +static const long asn_VAL_66_id_RANfunctionsAccepted = 9; +static const long asn_VAL_66_reject = 0; +static const long asn_VAL_66_optional = 0; +static const long asn_VAL_67_id_RANfunctionsRejected = 13; +static const long asn_VAL_67_reject = 0; +static const long asn_VAL_67_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICserviceUpdateAcknowledge_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_66_id_RANfunctionsAccepted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_66_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_66_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_67_id_RANfunctionsRejected }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_67_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_67_optional } +}; +static const asn_ioc_set_t asn_IOS_RICserviceUpdateAcknowledge_IEs_1[] = { + { 2, 4, asn_IOS_RICserviceUpdateAcknowledge_IEs_1_rows } +}; +static const long asn_VAL_69_id_RANfunctionsRejected = 13; +static const long asn_VAL_69_ignore = 1; +static const long asn_VAL_69_optional = 0; +static const long asn_VAL_70_id_TimeToWait = 31; +static const long asn_VAL_70_ignore = 1; +static const long asn_VAL_70_optional = 0; +static const long asn_VAL_71_id_CriticalityDiagnostics = 2; +static const long asn_VAL_71_ignore = 1; +static const long asn_VAL_71_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICserviceUpdateFailure_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_69_id_RANfunctionsRejected }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_69_ignore }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_69_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_70_id_TimeToWait }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_70_ignore }, + { "&Value", aioc__type, &asn_DEF_TimeToWait }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_70_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_71_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_71_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_71_optional } +}; +static const asn_ioc_set_t asn_IOS_RICserviceUpdateFailure_IEs_1[] = { + { 3, 4, asn_IOS_RICserviceUpdateFailure_IEs_1_rows } +}; +static const long asn_VAL_72_id_RANfunctionsAccepted = 9; +static const long asn_VAL_72_reject = 0; +static const long asn_VAL_72_optional = 0; +static const asn_ioc_cell_t asn_IOS_RICserviceQuery_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_72_id_RANfunctionsAccepted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_72_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_72_optional } +}; +static const asn_ioc_set_t asn_IOS_RICserviceQuery_IEs_1[] = { + { 1, 4, asn_IOS_RICserviceQuery_IEs_1_rows } +}; +static int +memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICaction_ToBeSetup_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICaction_ToBeSetup_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_ToBeSetup_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICaction_ToBeSetup_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICaction_ToBeSetup_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_ToBeSetup_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICaction_Admitted_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICaction_Admitted_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_Admitted_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICaction_Admitted_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICaction_Admitted_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_Admitted_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICaction_NotAdmitted_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICaction_NotAdmitted_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_NotAdmitted_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICaction_NotAdmitted_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICaction_NotAdmitted_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_NotAdmitted_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RANfunction_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RANfunction_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunction_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RANfunction_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RANfunction_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunction_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RANfunctionID_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RANfunctionID_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionID_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RANfunctionID_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RANfunctionID_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionID_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RANfunctionIDcause_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RANfunctionIDcause_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionIDcause_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RANfunctionIDcause_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RANfunctionIDcause_ItemIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionIDcause_ItemIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICsubscriptionRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionRequest_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionRequest_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICsubscriptionRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionRequest_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionRequest_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICsubscriptionResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionResponse_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionResponse_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICsubscriptionResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionResponse_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionResponse_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICsubscriptionFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICsubscriptionFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICsubscriptionDeleteRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequest_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequest_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICsubscriptionDeleteRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequest_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequest_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICsubscriptionDeleteResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteResponse_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteResponse_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICsubscriptionDeleteResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteResponse_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteResponse_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICsubscriptionDeleteFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICsubscriptionDeleteFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICindication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICindication_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICindication_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICindication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICindication_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICindication_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICcontrolRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICcontrolRequest_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolRequest_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICcontrolRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICcontrolRequest_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolRequest_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICcontrolAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICcontrolAcknowledge_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolAcknowledge_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICcontrolAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICcontrolAcknowledge_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolAcknowledge_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICcontrolFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICcontrolFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICcontrolFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICcontrolFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_ErrorIndication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_ErrorIndication_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ErrorIndication_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_ErrorIndication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_ErrorIndication_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ErrorIndication_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_E2setupRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2setupRequestIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupRequestIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_E2setupRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2setupRequestIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupRequestIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_E2setupResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2setupResponseIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupResponseIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_E2setupResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2setupResponseIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupResponseIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_E2setupFailureIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2setupFailureIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupFailureIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_E2setupFailureIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2setupFailureIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupFailureIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_ResetRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_ResetRequestIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetRequestIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_ResetRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_ResetRequestIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetRequestIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_ResetResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_ResetResponseIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetResponseIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_ResetResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_ResetResponseIEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetResponseIEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICserviceUpdate_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdate_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdate_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICserviceUpdate_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdate_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdate_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICserviceUpdateAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateAcknowledge_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateAcknowledge_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICserviceUpdateAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateAcknowledge_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateAcknowledge_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICserviceUpdateFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICserviceUpdateFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateFailure_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateFailure_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_id_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_RICserviceQuery_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceQuery_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceQuery_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_RICserviceQuery_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_RICserviceQuery_IEs_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 2; /* &Value */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceQuery_IEs, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_oer_constraints_t asn_OER_memb_id_constr_2 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_6 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_6 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_7 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_7 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_10 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_10 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_11 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_11 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_12 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_12 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_14 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_14 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_15 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_15 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_16 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_16 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_18 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_18 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_19 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_19 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_20 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_20 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_22 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_22 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_23 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_23 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_24 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_24 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_26 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_26 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_27 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_27 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_28 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_28 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_30 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_30 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_31 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_31 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_32 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_32 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_34 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_34 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_35 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_35 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_36 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_36 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_38 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_38 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_39 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_39 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_40 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_40 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_42 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_42 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_43 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_43 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_44 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_44 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_46 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_46 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_47 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_47 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_48 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_48 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_50 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_50 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_51 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_51 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_52 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_52 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_54 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_54 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_55 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_55 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_56 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_56 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_58 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_58 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_59 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_59 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_60 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_60 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_62 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_62 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_63 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_63 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_64 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_64 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_66 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_66 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_67 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_67 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_68 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_68 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_70 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_70 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_71 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_71 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_72 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_72 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_74 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_74 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_75 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_75 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_76 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_76 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_78 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_78 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_79 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_79 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_80 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_80 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_82 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_82 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_83 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_83 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_84 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_84 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_86 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_86 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_87 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_87 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_88 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_88 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_90 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_90 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_91 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_91 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_92 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_92 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_94 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_94 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_95 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_95 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_96 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_96 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_98 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_98 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_99 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_99 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_100 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_100 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_id_constr_102 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_id_constr_102 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_103 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_103 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_104 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_104 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_value_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs__value, choice.RICaction_ToBeSetup_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICaction_ToBeSetup_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICaction-ToBeSetup-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-ToBeSetup-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { + sizeof(struct RICaction_ToBeSetup_ItemIEs__value), + offsetof(struct RICaction_ToBeSetup_ItemIEs__value, _asn_ctx), + offsetof(struct RICaction_ToBeSetup_ItemIEs__value, present), + sizeof(((struct RICaction_ToBeSetup_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_4, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_4 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_4, + 1, /* Elements count */ + &asn_SPC_value_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_ItemIEs_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_2, &asn_PER_memb_id_constr_2, memb_id_constraint_1 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICaction_ToBeSetup_ItemIEs_criticality_type, + { &asn_OER_memb_criticality_constr_3, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_4, + select_RICaction_ToBeSetup_ItemIEs_value_type, + { &asn_OER_memb_value_constr_4, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 = { + sizeof(struct RICaction_ToBeSetup_ItemIEs), + offsetof(struct RICaction_ToBeSetup_ItemIEs, _asn_ctx), + asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_ItemIEs = { + "RICaction-ToBeSetup-ItemIEs", + "RICaction-ToBeSetup-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1, + sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1) + /sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[0]), /* 1 */ + asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1, /* Same as above */ + sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1) + /sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_ToBeSetup_ItemIEs_1, + 3, /* Elements count */ + &asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_8[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs__value, choice.RICaction_Admitted_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICaction_Admitted_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICaction-Admitted-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_8[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-Admitted-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_8 = { + sizeof(struct RICaction_Admitted_ItemIEs__value), + offsetof(struct RICaction_Admitted_ItemIEs__value, _asn_ctx), + offsetof(struct RICaction_Admitted_ItemIEs__value, present), + sizeof(((struct RICaction_Admitted_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_8, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_8 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_8, + 1, /* Elements count */ + &asn_SPC_value_specs_8 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICaction_Admitted_ItemIEs_5[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_6, &asn_PER_memb_id_constr_6, memb_id_constraint_5 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICaction_Admitted_ItemIEs_criticality_type, + { &asn_OER_memb_criticality_constr_7, &asn_PER_memb_criticality_constr_7, memb_criticality_constraint_5 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_8, + select_RICaction_Admitted_ItemIEs_value_type, + { &asn_OER_memb_value_constr_8, &asn_PER_memb_value_constr_8, memb_value_constraint_5 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_ItemIEs_tags_5[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_ItemIEs_specs_5 = { + sizeof(struct RICaction_Admitted_ItemIEs), + offsetof(struct RICaction_Admitted_ItemIEs, _asn_ctx), + asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_ItemIEs = { + "RICaction-Admitted-ItemIEs", + "RICaction-Admitted-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RICaction_Admitted_ItemIEs_tags_5, + sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5) + /sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5[0]), /* 1 */ + asn_DEF_RICaction_Admitted_ItemIEs_tags_5, /* Same as above */ + sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5) + /sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_Admitted_ItemIEs_5, + 3, /* Elements count */ + &asn_SPC_RICaction_Admitted_ItemIEs_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_12[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs__value, choice.RICaction_NotAdmitted_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICaction_NotAdmitted_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICaction-NotAdmitted-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_12[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-NotAdmitted-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_12 = { + sizeof(struct RICaction_NotAdmitted_ItemIEs__value), + offsetof(struct RICaction_NotAdmitted_ItemIEs__value, _asn_ctx), + offsetof(struct RICaction_NotAdmitted_ItemIEs__value, present), + sizeof(((struct RICaction_NotAdmitted_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_12, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_12 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_12, + 1, /* Elements count */ + &asn_SPC_value_specs_12 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_ItemIEs_9[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_10, &asn_PER_memb_id_constr_10, memb_id_constraint_9 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICaction_NotAdmitted_ItemIEs_criticality_type, + { &asn_OER_memb_criticality_constr_11, &asn_PER_memb_criticality_constr_11, memb_criticality_constraint_9 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_12, + select_RICaction_NotAdmitted_ItemIEs_value_type, + { &asn_OER_memb_value_constr_12, &asn_PER_memb_value_constr_12, memb_value_constraint_9 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 = { + sizeof(struct RICaction_NotAdmitted_ItemIEs), + offsetof(struct RICaction_NotAdmitted_ItemIEs, _asn_ctx), + asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_ItemIEs = { + "RICaction-NotAdmitted-ItemIEs", + "RICaction-NotAdmitted-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9, + sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9) + /sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[0]), /* 1 */ + asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9, /* Same as above */ + sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9) + /sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_NotAdmitted_ItemIEs_9, + 3, /* Elements count */ + &asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_16[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs__value, choice.RANfunction_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunction_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunction-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_16[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunction-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_16 = { + sizeof(struct RANfunction_ItemIEs__value), + offsetof(struct RANfunction_ItemIEs__value, _asn_ctx), + offsetof(struct RANfunction_ItemIEs__value, present), + sizeof(((struct RANfunction_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_16, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_16 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_16, + 1, /* Elements count */ + &asn_SPC_value_specs_16 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_13[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_14, &asn_PER_memb_id_constr_14, memb_id_constraint_13 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RANfunction_ItemIEs_criticality_type, + { &asn_OER_memb_criticality_constr_15, &asn_PER_memb_criticality_constr_15, memb_criticality_constraint_13 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_16, + select_RANfunction_ItemIEs_value_type, + { &asn_OER_memb_value_constr_16, &asn_PER_memb_value_constr_16, memb_value_constraint_13 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunction_ItemIEs_tags_13[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunction_ItemIEs_tag2el_13[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunction_ItemIEs_specs_13 = { + sizeof(struct RANfunction_ItemIEs), + offsetof(struct RANfunction_ItemIEs, _asn_ctx), + asn_MAP_RANfunction_ItemIEs_tag2el_13, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunction_ItemIEs = { + "RANfunction-ItemIEs", + "RANfunction-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RANfunction_ItemIEs_tags_13, + sizeof(asn_DEF_RANfunction_ItemIEs_tags_13) + /sizeof(asn_DEF_RANfunction_ItemIEs_tags_13[0]), /* 1 */ + asn_DEF_RANfunction_ItemIEs_tags_13, /* Same as above */ + sizeof(asn_DEF_RANfunction_ItemIEs_tags_13) + /sizeof(asn_DEF_RANfunction_ItemIEs_tags_13[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunction_ItemIEs_13, + 3, /* Elements count */ + &asn_SPC_RANfunction_ItemIEs_specs_13 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_20[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs__value, choice.RANfunctionID_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionID_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_20[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionID-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_20 = { + sizeof(struct RANfunctionID_ItemIEs__value), + offsetof(struct RANfunctionID_ItemIEs__value, _asn_ctx), + offsetof(struct RANfunctionID_ItemIEs__value, present), + sizeof(((struct RANfunctionID_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_20, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_20 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_20, + 1, /* Elements count */ + &asn_SPC_value_specs_20 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_17[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_18, &asn_PER_memb_id_constr_18, memb_id_constraint_17 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RANfunctionID_ItemIEs_criticality_type, + { &asn_OER_memb_criticality_constr_19, &asn_PER_memb_criticality_constr_19, memb_criticality_constraint_17 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_20, + select_RANfunctionID_ItemIEs_value_type, + { &asn_OER_memb_value_constr_20, &asn_PER_memb_value_constr_20, memb_value_constraint_17 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionID_ItemIEs_tags_17[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunctionID_ItemIEs_tag2el_17[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_ItemIEs_specs_17 = { + sizeof(struct RANfunctionID_ItemIEs), + offsetof(struct RANfunctionID_ItemIEs, _asn_ctx), + asn_MAP_RANfunctionID_ItemIEs_tag2el_17, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionID_ItemIEs = { + "RANfunctionID-ItemIEs", + "RANfunctionID-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RANfunctionID_ItemIEs_tags_17, + sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17) + /sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17[0]), /* 1 */ + asn_DEF_RANfunctionID_ItemIEs_tags_17, /* Same as above */ + sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17) + /sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunctionID_ItemIEs_17, + 3, /* Elements count */ + &asn_SPC_RANfunctionID_ItemIEs_specs_17 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_24[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs__value, choice.RANfunctionIDcause_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionIDcause_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionIDcause-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_24[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionIDcause-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_24 = { + sizeof(struct RANfunctionIDcause_ItemIEs__value), + offsetof(struct RANfunctionIDcause_ItemIEs__value, _asn_ctx), + offsetof(struct RANfunctionIDcause_ItemIEs__value, present), + sizeof(((struct RANfunctionIDcause_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_24, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_24 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_24, + 1, /* Elements count */ + &asn_SPC_value_specs_24 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_21[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_22, &asn_PER_memb_id_constr_22, memb_id_constraint_21 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RANfunctionIDcause_ItemIEs_criticality_type, + { &asn_OER_memb_criticality_constr_23, &asn_PER_memb_criticality_constr_23, memb_criticality_constraint_21 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_24, + select_RANfunctionIDcause_ItemIEs_value_type, + { &asn_OER_memb_value_constr_24, &asn_PER_memb_value_constr_24, memb_value_constraint_21 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 = { + sizeof(struct RANfunctionIDcause_ItemIEs), + offsetof(struct RANfunctionIDcause_ItemIEs, _asn_ctx), + asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_ItemIEs = { + "RANfunctionIDcause-ItemIEs", + "RANfunctionIDcause-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RANfunctionIDcause_ItemIEs_tags_21, + sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21) + /sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[0]), /* 1 */ + asn_DEF_RANfunctionIDcause_ItemIEs_tags_21, /* Same as above */ + sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21) + /sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunctionIDcause_ItemIEs_21, + 3, /* Elements count */ + &asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_28[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICsubscriptionDetails), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDetails, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICsubscriptionDetails" + }, +}; +static const unsigned asn_MAP_value_to_canonical_28[] = { 1, 0, 2 }; +static const unsigned asn_MAP_value_from_canonical_28[] = { 1, 0, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_28[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* RICsubscriptionDetails */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_28 = { + sizeof(struct RICsubscriptionRequest_IEs__value), + offsetof(struct RICsubscriptionRequest_IEs__value, _asn_ctx), + offsetof(struct RICsubscriptionRequest_IEs__value, present), + sizeof(((struct RICsubscriptionRequest_IEs__value *)0)->present), + asn_MAP_value_tag2el_28, + 3, /* Count of tags in the map */ + asn_MAP_value_to_canonical_28, + asn_MAP_value_from_canonical_28, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_28 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_28, + 3, /* Elements count */ + &asn_SPC_value_specs_28 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_25[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_26, &asn_PER_memb_id_constr_26, memb_id_constraint_25 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICsubscriptionRequest_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_27, &asn_PER_memb_criticality_constr_27, memb_criticality_constraint_25 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_28, + select_RICsubscriptionRequest_IEs_value_type, + { &asn_OER_memb_value_constr_28, &asn_PER_memb_value_constr_28, memb_value_constraint_25 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_IEs_tags_25[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionRequest_IEs_tag2el_25[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_IEs_specs_25 = { + sizeof(struct RICsubscriptionRequest_IEs), + offsetof(struct RICsubscriptionRequest_IEs, _asn_ctx), + asn_MAP_RICsubscriptionRequest_IEs_tag2el_25, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest_IEs = { + "RICsubscriptionRequest-IEs", + "RICsubscriptionRequest-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionRequest_IEs_tags_25, + sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25) + /sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25[0]), /* 1 */ + asn_DEF_RICsubscriptionRequest_IEs_tags_25, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25) + /sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionRequest_IEs_25, + 3, /* Elements count */ + &asn_SPC_RICsubscriptionRequest_IEs_specs_25 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_32[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICaction_Admitted_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICaction_Admitted_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICaction-Admitted-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICaction_NotAdmitted_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICaction_NotAdmitted_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICaction-NotAdmitted-List" + }, +}; +static const unsigned asn_MAP_value_to_canonical_32[] = { 1, 0, 2, 3 }; +static const unsigned asn_MAP_value_from_canonical_32[] = { 1, 0, 2, 3 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_32[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* RICrequestID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* RICaction-Admitted-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* RICaction-NotAdmitted-List */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_32 = { + sizeof(struct RICsubscriptionResponse_IEs__value), + offsetof(struct RICsubscriptionResponse_IEs__value, _asn_ctx), + offsetof(struct RICsubscriptionResponse_IEs__value, present), + sizeof(((struct RICsubscriptionResponse_IEs__value *)0)->present), + asn_MAP_value_tag2el_32, + 4, /* Count of tags in the map */ + asn_MAP_value_to_canonical_32, + asn_MAP_value_from_canonical_32, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_32 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_32, + 4, /* Elements count */ + &asn_SPC_value_specs_32 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_29[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_30, &asn_PER_memb_id_constr_30, memb_id_constraint_29 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICsubscriptionResponse_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_31, &asn_PER_memb_criticality_constr_31, memb_criticality_constraint_29 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_32, + select_RICsubscriptionResponse_IEs_value_type, + { &asn_OER_memb_value_constr_32, &asn_PER_memb_value_constr_32, memb_value_constraint_29 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_IEs_tags_29[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_IEs_tag2el_29[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_IEs_specs_29 = { + sizeof(struct RICsubscriptionResponse_IEs), + offsetof(struct RICsubscriptionResponse_IEs, _asn_ctx), + asn_MAP_RICsubscriptionResponse_IEs_tag2el_29, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse_IEs = { + "RICsubscriptionResponse-IEs", + "RICsubscriptionResponse-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionResponse_IEs_tags_29, + sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29) + /sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29[0]), /* 1 */ + asn_DEF_RICsubscriptionResponse_IEs_tags_29, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29) + /sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionResponse_IEs_29, + 3, /* Elements count */ + &asn_SPC_RICsubscriptionResponse_IEs_specs_29 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_36[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICaction_NotAdmitted_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICaction_NotAdmitted_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICaction-NotAdmitted-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" + }, +}; +static const unsigned asn_MAP_value_to_canonical_36[] = { 1, 0, 2, 3 }; +static const unsigned asn_MAP_value_from_canonical_36[] = { 1, 0, 2, 3 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_36[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* RICrequestID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* RICaction-NotAdmitted-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* CriticalityDiagnostics */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_36 = { + sizeof(struct RICsubscriptionFailure_IEs__value), + offsetof(struct RICsubscriptionFailure_IEs__value, _asn_ctx), + offsetof(struct RICsubscriptionFailure_IEs__value, present), + sizeof(((struct RICsubscriptionFailure_IEs__value *)0)->present), + asn_MAP_value_tag2el_36, + 4, /* Count of tags in the map */ + asn_MAP_value_to_canonical_36, + asn_MAP_value_from_canonical_36, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_36 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_36, + 4, /* Elements count */ + &asn_SPC_value_specs_36 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_33[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_34, &asn_PER_memb_id_constr_34, memb_id_constraint_33 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICsubscriptionFailure_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_35, &asn_PER_memb_criticality_constr_35, memb_criticality_constraint_33 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_36, + select_RICsubscriptionFailure_IEs_value_type, + { &asn_OER_memb_value_constr_36, &asn_PER_memb_value_constr_36, memb_value_constraint_33 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_IEs_tags_33[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionFailure_IEs_tag2el_33[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_IEs_specs_33 = { + sizeof(struct RICsubscriptionFailure_IEs), + offsetof(struct RICsubscriptionFailure_IEs, _asn_ctx), + asn_MAP_RICsubscriptionFailure_IEs_tag2el_33, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure_IEs = { + "RICsubscriptionFailure-IEs", + "RICsubscriptionFailure-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionFailure_IEs_tags_33, + sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33) + /sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33[0]), /* 1 */ + asn_DEF_RICsubscriptionFailure_IEs_tags_33, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33) + /sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionFailure_IEs_33, + 3, /* Elements count */ + &asn_SPC_RICsubscriptionFailure_IEs_specs_33 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_40[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, +}; +static const unsigned asn_MAP_value_to_canonical_40[] = { 1, 0 }; +static const unsigned asn_MAP_value_from_canonical_40[] = { 1, 0 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_40[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_40 = { + sizeof(struct RICsubscriptionDeleteRequest_IEs__value), + offsetof(struct RICsubscriptionDeleteRequest_IEs__value, _asn_ctx), + offsetof(struct RICsubscriptionDeleteRequest_IEs__value, present), + sizeof(((struct RICsubscriptionDeleteRequest_IEs__value *)0)->present), + asn_MAP_value_tag2el_40, + 2, /* Count of tags in the map */ + asn_MAP_value_to_canonical_40, + asn_MAP_value_from_canonical_40, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_40 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_40, + 2, /* Elements count */ + &asn_SPC_value_specs_40 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_37[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_38, &asn_PER_memb_id_constr_38, memb_id_constraint_37 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICsubscriptionDeleteRequest_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_39, &asn_PER_memb_criticality_constr_39, memb_criticality_constraint_37 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_40, + select_RICsubscriptionDeleteRequest_IEs_value_type, + { &asn_OER_memb_value_constr_40, &asn_PER_memb_value_constr_40, memb_value_constraint_37 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_IEs_tag2el_37[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37 = { + sizeof(struct RICsubscriptionDeleteRequest_IEs), + offsetof(struct RICsubscriptionDeleteRequest_IEs, _asn_ctx), + asn_MAP_RICsubscriptionDeleteRequest_IEs_tag2el_37, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest_IEs = { + "RICsubscriptionDeleteRequest-IEs", + "RICsubscriptionDeleteRequest-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37, + sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37) + /sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37) + /sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionDeleteRequest_IEs_37, + 3, /* Elements count */ + &asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_44[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, +}; +static const unsigned asn_MAP_value_to_canonical_44[] = { 1, 0 }; +static const unsigned asn_MAP_value_from_canonical_44[] = { 1, 0 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_44[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_44 = { + sizeof(struct RICsubscriptionDeleteResponse_IEs__value), + offsetof(struct RICsubscriptionDeleteResponse_IEs__value, _asn_ctx), + offsetof(struct RICsubscriptionDeleteResponse_IEs__value, present), + sizeof(((struct RICsubscriptionDeleteResponse_IEs__value *)0)->present), + asn_MAP_value_tag2el_44, + 2, /* Count of tags in the map */ + asn_MAP_value_to_canonical_44, + asn_MAP_value_from_canonical_44, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_44 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_44, + 2, /* Elements count */ + &asn_SPC_value_specs_44 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_41[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_42, &asn_PER_memb_id_constr_42, memb_id_constraint_41 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICsubscriptionDeleteResponse_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_43, &asn_PER_memb_criticality_constr_43, memb_criticality_constraint_41 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_44, + select_RICsubscriptionDeleteResponse_IEs_value_type, + { &asn_OER_memb_value_constr_44, &asn_PER_memb_value_constr_44, memb_value_constraint_41 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteResponse_IEs_tag2el_41[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41 = { + sizeof(struct RICsubscriptionDeleteResponse_IEs), + offsetof(struct RICsubscriptionDeleteResponse_IEs, _asn_ctx), + asn_MAP_RICsubscriptionDeleteResponse_IEs_tag2el_41, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse_IEs = { + "RICsubscriptionDeleteResponse-IEs", + "RICsubscriptionDeleteResponse-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41, + sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41) + /sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41) + /sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionDeleteResponse_IEs_41, + 3, /* Elements count */ + &asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_48[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Cause, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "Cause" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" + }, +}; +static const unsigned asn_MAP_value_to_canonical_48[] = { 1, 0, 3, 2 }; +static const unsigned asn_MAP_value_from_canonical_48[] = { 1, 0, 3, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_48[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* CriticalityDiagnostics */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_48 = { + sizeof(struct RICsubscriptionDeleteFailure_IEs__value), + offsetof(struct RICsubscriptionDeleteFailure_IEs__value, _asn_ctx), + offsetof(struct RICsubscriptionDeleteFailure_IEs__value, present), + sizeof(((struct RICsubscriptionDeleteFailure_IEs__value *)0)->present), + asn_MAP_value_tag2el_48, + 8, /* Count of tags in the map */ + asn_MAP_value_to_canonical_48, + asn_MAP_value_from_canonical_48, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_48 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_48, + 4, /* Elements count */ + &asn_SPC_value_specs_48 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_45[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_46, &asn_PER_memb_id_constr_46, memb_id_constraint_45 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICsubscriptionDeleteFailure_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_47, &asn_PER_memb_criticality_constr_47, memb_criticality_constraint_45 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_48, + select_RICsubscriptionDeleteFailure_IEs_value_type, + { &asn_OER_memb_value_constr_48, &asn_PER_memb_value_constr_48, memb_value_constraint_45 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteFailure_IEs_tag2el_45[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45 = { + sizeof(struct RICsubscriptionDeleteFailure_IEs), + offsetof(struct RICsubscriptionDeleteFailure_IEs, _asn_ctx), + asn_MAP_RICsubscriptionDeleteFailure_IEs_tag2el_45, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure_IEs = { + "RICsubscriptionDeleteFailure-IEs", + "RICsubscriptionDeleteFailure-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45, + sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45) + /sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45) + /sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionDeleteFailure_IEs_45, + 3, /* Elements count */ + &asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_52[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RICactionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICactionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationSN), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RICindicationSN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICindicationSN" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationType), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_RICindicationType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICindicationType" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationHeader), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICindicationHeader, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICindicationHeader" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationMessage), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICindicationMessage, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICindicationMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICcallProcessID), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcallProcessID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcallProcessID" + }, +}; +static const unsigned asn_MAP_value_to_canonical_52[] = { 1, 2, 3, 5, 6, 7, 4, 0 }; +static const unsigned asn_MAP_value_from_canonical_52[] = { 7, 0, 1, 2, 6, 3, 4, 5 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_52[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 2 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* RICactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -2, 0 }, /* RICindicationSN */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 5, 0, 2 }, /* RICindicationHeader */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, -1, 1 }, /* RICindicationMessage */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 7, -2, 0 }, /* RICcallProcessID */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* RICindicationType */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_52 = { + sizeof(struct RICindication_IEs__value), + offsetof(struct RICindication_IEs__value, _asn_ctx), + offsetof(struct RICindication_IEs__value, present), + sizeof(((struct RICindication_IEs__value *)0)->present), + asn_MAP_value_tag2el_52, + 8, /* Count of tags in the map */ + asn_MAP_value_to_canonical_52, + asn_MAP_value_from_canonical_52, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_52 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_52, + 8, /* Elements count */ + &asn_SPC_value_specs_52 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICindication_IEs_49[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_50, &asn_PER_memb_id_constr_50, memb_id_constraint_49 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICindication_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_51, &asn_PER_memb_criticality_constr_51, memb_criticality_constraint_49 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_52, + select_RICindication_IEs_value_type, + { &asn_OER_memb_value_constr_52, &asn_PER_memb_value_constr_52, memb_value_constraint_49 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICindication_IEs_tags_49[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICindication_IEs_tag2el_49[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICindication_IEs_specs_49 = { + sizeof(struct RICindication_IEs), + offsetof(struct RICindication_IEs, _asn_ctx), + asn_MAP_RICindication_IEs_tag2el_49, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICindication_IEs = { + "RICindication-IEs", + "RICindication-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICindication_IEs_tags_49, + sizeof(asn_DEF_RICindication_IEs_tags_49) + /sizeof(asn_DEF_RICindication_IEs_tags_49[0]), /* 1 */ + asn_DEF_RICindication_IEs_tags_49, /* Same as above */ + sizeof(asn_DEF_RICindication_IEs_tags_49) + /sizeof(asn_DEF_RICindication_IEs_tags_49[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICindication_IEs_49, + 3, /* Elements count */ + &asn_SPC_RICindication_IEs_specs_49 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_56[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcallProcessID), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcallProcessID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcallProcessID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolHeader), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcontrolHeader, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolHeader" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolMessage), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcontrolMessage, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolMessage" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolAckRequest), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_RICcontrolAckRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolAckRequest" + }, +}; +static const unsigned asn_MAP_value_to_canonical_56[] = { 1, 2, 3, 4, 5, 0 }; +static const unsigned asn_MAP_value_from_canonical_56[] = { 5, 0, 1, 2, 3, 4 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_56[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 2 }, /* RICcallProcessID */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -1, 1 }, /* RICcontrolHeader */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -2, 0 }, /* RICcontrolMessage */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 0 }, /* RICcontrolAckRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_56 = { + sizeof(struct RICcontrolRequest_IEs__value), + offsetof(struct RICcontrolRequest_IEs__value, _asn_ctx), + offsetof(struct RICcontrolRequest_IEs__value, present), + sizeof(((struct RICcontrolRequest_IEs__value *)0)->present), + asn_MAP_value_tag2el_56, + 6, /* Count of tags in the map */ + asn_MAP_value_to_canonical_56, + asn_MAP_value_from_canonical_56, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_56 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_56, + 6, /* Elements count */ + &asn_SPC_value_specs_56 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_53[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_54, &asn_PER_memb_id_constr_54, memb_id_constraint_53 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICcontrolRequest_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_55, &asn_PER_memb_criticality_constr_55, memb_criticality_constraint_53 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_56, + select_RICcontrolRequest_IEs_value_type, + { &asn_OER_memb_value_constr_56, &asn_PER_memb_value_constr_56, memb_value_constraint_53 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_IEs_tags_53[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_IEs_tag2el_53[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_IEs_specs_53 = { + sizeof(struct RICcontrolRequest_IEs), + offsetof(struct RICcontrolRequest_IEs, _asn_ctx), + asn_MAP_RICcontrolRequest_IEs_tag2el_53, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest_IEs = { + "RICcontrolRequest-IEs", + "RICcontrolRequest-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICcontrolRequest_IEs_tags_53, + sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53) + /sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53[0]), /* 1 */ + asn_DEF_RICcontrolRequest_IEs_tags_53, /* Same as above */ + sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53) + /sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICcontrolRequest_IEs_53, + 3, /* Elements count */ + &asn_SPC_RICcontrolRequest_IEs_specs_53 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_60[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcallProcessID), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcallProcessID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcallProcessID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolStatus), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_RICcontrolStatus, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolStatus" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolOutcome), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcontrolOutcome, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolOutcome" + }, +}; +static const unsigned asn_MAP_value_to_canonical_60[] = { 1, 2, 4, 3, 0 }; +static const unsigned asn_MAP_value_from_canonical_60[] = { 4, 0, 1, 3, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_60[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* RICcallProcessID */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -1, 0 }, /* RICcontrolOutcome */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* RICcontrolStatus */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_60 = { + sizeof(struct RICcontrolAcknowledge_IEs__value), + offsetof(struct RICcontrolAcknowledge_IEs__value, _asn_ctx), + offsetof(struct RICcontrolAcknowledge_IEs__value, present), + sizeof(((struct RICcontrolAcknowledge_IEs__value *)0)->present), + asn_MAP_value_tag2el_60, + 5, /* Count of tags in the map */ + asn_MAP_value_to_canonical_60, + asn_MAP_value_from_canonical_60, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_60 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_60, + 5, /* Elements count */ + &asn_SPC_value_specs_60 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_57[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_58, &asn_PER_memb_id_constr_58, memb_id_constraint_57 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICcontrolAcknowledge_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_59, &asn_PER_memb_criticality_constr_59, memb_criticality_constraint_57 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_60, + select_RICcontrolAcknowledge_IEs_value_type, + { &asn_OER_memb_value_constr_60, &asn_PER_memb_value_constr_60, memb_value_constraint_57 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_IEs_tags_57[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolAcknowledge_IEs_tag2el_57[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_IEs_specs_57 = { + sizeof(struct RICcontrolAcknowledge_IEs), + offsetof(struct RICcontrolAcknowledge_IEs, _asn_ctx), + asn_MAP_RICcontrolAcknowledge_IEs_tag2el_57, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge_IEs = { + "RICcontrolAcknowledge-IEs", + "RICcontrolAcknowledge-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICcontrolAcknowledge_IEs_tags_57, + sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57) + /sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57[0]), /* 1 */ + asn_DEF_RICcontrolAcknowledge_IEs_tags_57, /* Same as above */ + sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57) + /sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICcontrolAcknowledge_IEs_57, + 3, /* Elements count */ + &asn_SPC_RICcontrolAcknowledge_IEs_specs_57 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_64[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICcallProcessID), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcallProcessID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcallProcessID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Cause, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "Cause" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICcontrolOutcome), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcontrolOutcome, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolOutcome" + }, +}; +static const unsigned asn_MAP_value_to_canonical_64[] = { 1, 2, 4, 0, 3 }; +static const unsigned asn_MAP_value_from_canonical_64[] = { 3, 0, 1, 4, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_64[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* RICcallProcessID */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -1, 0 }, /* RICcontrolOutcome */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* RICrequestID */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_64 = { + sizeof(struct RICcontrolFailure_IEs__value), + offsetof(struct RICcontrolFailure_IEs__value, _asn_ctx), + offsetof(struct RICcontrolFailure_IEs__value, present), + sizeof(((struct RICcontrolFailure_IEs__value *)0)->present), + asn_MAP_value_tag2el_64, + 9, /* Count of tags in the map */ + asn_MAP_value_to_canonical_64, + asn_MAP_value_from_canonical_64, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_64 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_64, + 5, /* Elements count */ + &asn_SPC_value_specs_64 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_61[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_62, &asn_PER_memb_id_constr_62, memb_id_constraint_61 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICcontrolFailure_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_63, &asn_PER_memb_criticality_constr_63, memb_criticality_constraint_61 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_64, + select_RICcontrolFailure_IEs_value_type, + { &asn_OER_memb_value_constr_64, &asn_PER_memb_value_constr_64, memb_value_constraint_61 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_IEs_tags_61[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolFailure_IEs_tag2el_61[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_IEs_specs_61 = { + sizeof(struct RICcontrolFailure_IEs), + offsetof(struct RICcontrolFailure_IEs, _asn_ctx), + asn_MAP_RICcontrolFailure_IEs_tag2el_61, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure_IEs = { + "RICcontrolFailure-IEs", + "RICcontrolFailure-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICcontrolFailure_IEs_tags_61, + sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61) + /sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61[0]), /* 1 */ + asn_DEF_RICcontrolFailure_IEs_tags_61, /* Same as above */ + sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61) + /sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICcontrolFailure_IEs_61, + 3, /* Elements count */ + &asn_SPC_RICcontrolFailure_IEs_specs_61 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_68[] = { + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Cause, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "Cause" + }, + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" + }, +}; +static const unsigned asn_MAP_value_to_canonical_68[] = { 1, 0, 3, 2 }; +static const unsigned asn_MAP_value_from_canonical_68[] = { 1, 0, 3, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_68[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* CriticalityDiagnostics */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_68 = { + sizeof(struct ErrorIndication_IEs__value), + offsetof(struct ErrorIndication_IEs__value, _asn_ctx), + offsetof(struct ErrorIndication_IEs__value, present), + sizeof(((struct ErrorIndication_IEs__value *)0)->present), + asn_MAP_value_tag2el_68, + 8, /* Count of tags in the map */ + asn_MAP_value_to_canonical_68, + asn_MAP_value_from_canonical_68, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_68 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_68, + 4, /* Elements count */ + &asn_SPC_value_specs_68 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_65[] = { + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_66, &asn_PER_memb_id_constr_66, memb_id_constraint_65 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_ErrorIndication_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_67, &asn_PER_memb_criticality_constr_67, memb_criticality_constraint_65 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_68, + select_ErrorIndication_IEs_value_type, + { &asn_OER_memb_value_constr_68, &asn_PER_memb_value_constr_68, memb_value_constraint_65 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_ErrorIndication_IEs_tags_65[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_IEs_tag2el_65[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_IEs_specs_65 = { + sizeof(struct ErrorIndication_IEs), + offsetof(struct ErrorIndication_IEs, _asn_ctx), + asn_MAP_ErrorIndication_IEs_tag2el_65, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ErrorIndication_IEs = { + "ErrorIndication-IEs", + "ErrorIndication-IEs", + &asn_OP_SEQUENCE, + asn_DEF_ErrorIndication_IEs_tags_65, + sizeof(asn_DEF_ErrorIndication_IEs_tags_65) + /sizeof(asn_DEF_ErrorIndication_IEs_tags_65[0]), /* 1 */ + asn_DEF_ErrorIndication_IEs_tags_65, /* Same as above */ + sizeof(asn_DEF_ErrorIndication_IEs_tags_65) + /sizeof(asn_DEF_ErrorIndication_IEs_tags_65[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ErrorIndication_IEs_65, + 3, /* Elements count */ + &asn_SPC_ErrorIndication_IEs_specs_65 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_72[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.GlobalE2node_ID), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_GlobalE2node_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "GlobalE2node-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.RANfunctions_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctions_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctions-List" + }, +}; +static const unsigned asn_MAP_value_to_canonical_72[] = { 1, 0 }; +static const unsigned asn_MAP_value_from_canonical_72[] = { 1, 0 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_72[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* RANfunctions-List */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* en-gNB */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* ng-eNB */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 } /* eNB */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_72 = { + sizeof(struct E2setupRequestIEs__value), + offsetof(struct E2setupRequestIEs__value, _asn_ctx), + offsetof(struct E2setupRequestIEs__value, present), + sizeof(((struct E2setupRequestIEs__value *)0)->present), + asn_MAP_value_tag2el_72, + 5, /* Count of tags in the map */ + asn_MAP_value_to_canonical_72, + asn_MAP_value_from_canonical_72, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_72 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_72, + 2, /* Elements count */ + &asn_SPC_value_specs_72 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2setupRequestIEs_69[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_70, &asn_PER_memb_id_constr_70, memb_id_constraint_69 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2setupRequestIEs_criticality_type, + { &asn_OER_memb_criticality_constr_71, &asn_PER_memb_criticality_constr_71, memb_criticality_constraint_69 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_72, + select_E2setupRequestIEs_value_type, + { &asn_OER_memb_value_constr_72, &asn_PER_memb_value_constr_72, memb_value_constraint_69 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2setupRequestIEs_tags_69[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2setupRequestIEs_tag2el_69[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2setupRequestIEs_specs_69 = { + sizeof(struct E2setupRequestIEs), + offsetof(struct E2setupRequestIEs, _asn_ctx), + asn_MAP_E2setupRequestIEs_tag2el_69, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2setupRequestIEs = { + "E2setupRequestIEs", + "E2setupRequestIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2setupRequestIEs_tags_69, + sizeof(asn_DEF_E2setupRequestIEs_tags_69) + /sizeof(asn_DEF_E2setupRequestIEs_tags_69[0]), /* 1 */ + asn_DEF_E2setupRequestIEs_tags_69, /* Same as above */ + sizeof(asn_DEF_E2setupRequestIEs_tags_69) + /sizeof(asn_DEF_E2setupRequestIEs_tags_69[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2setupRequestIEs_69, + 3, /* Elements count */ + &asn_SPC_E2setupRequestIEs_specs_69 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_76[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.GlobalRIC_ID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_GlobalRIC_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "GlobalRIC-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsID_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionsID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionsID-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsIDcause_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionsIDcause_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionsIDcause-List" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_76[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* GlobalRIC-ID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 1 }, /* RANfunctionsID-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 0 } /* RANfunctionsIDcause-List */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_76 = { + sizeof(struct E2setupResponseIEs__value), + offsetof(struct E2setupResponseIEs__value, _asn_ctx), + offsetof(struct E2setupResponseIEs__value, present), + sizeof(((struct E2setupResponseIEs__value *)0)->present), + asn_MAP_value_tag2el_76, + 3, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_76 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_76, + 3, /* Elements count */ + &asn_SPC_value_specs_76 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2setupResponseIEs_73[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_74, &asn_PER_memb_id_constr_74, memb_id_constraint_73 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2setupResponseIEs_criticality_type, + { &asn_OER_memb_criticality_constr_75, &asn_PER_memb_criticality_constr_75, memb_criticality_constraint_73 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_76, + select_E2setupResponseIEs_value_type, + { &asn_OER_memb_value_constr_76, &asn_PER_memb_value_constr_76, memb_value_constraint_73 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2setupResponseIEs_tags_73[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2setupResponseIEs_tag2el_73[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2setupResponseIEs_specs_73 = { + sizeof(struct E2setupResponseIEs), + offsetof(struct E2setupResponseIEs, _asn_ctx), + asn_MAP_E2setupResponseIEs_tag2el_73, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2setupResponseIEs = { + "E2setupResponseIEs", + "E2setupResponseIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2setupResponseIEs_tags_73, + sizeof(asn_DEF_E2setupResponseIEs_tags_73) + /sizeof(asn_DEF_E2setupResponseIEs_tags_73[0]), /* 1 */ + asn_DEF_E2setupResponseIEs_tags_73, /* Same as above */ + sizeof(asn_DEF_E2setupResponseIEs_tags_73) + /sizeof(asn_DEF_E2setupResponseIEs_tags_73[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2setupResponseIEs_73, + 3, /* Elements count */ + &asn_SPC_E2setupResponseIEs_specs_73 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_80[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Cause, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "Cause" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.TimeToWait), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_TimeToWait, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "TimeToWait" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" + }, +}; +static const unsigned asn_MAP_value_to_canonical_80[] = { 1, 2, 0 }; +static const unsigned asn_MAP_value_from_canonical_80[] = { 2, 0, 1 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_80[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* CriticalityDiagnostics */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_80 = { + sizeof(struct E2setupFailureIEs__value), + offsetof(struct E2setupFailureIEs__value, _asn_ctx), + offsetof(struct E2setupFailureIEs__value, present), + sizeof(((struct E2setupFailureIEs__value *)0)->present), + asn_MAP_value_tag2el_80, + 7, /* Count of tags in the map */ + asn_MAP_value_to_canonical_80, + asn_MAP_value_from_canonical_80, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_80 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_80, + 3, /* Elements count */ + &asn_SPC_value_specs_80 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2setupFailureIEs_77[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_78, &asn_PER_memb_id_constr_78, memb_id_constraint_77 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2setupFailureIEs_criticality_type, + { &asn_OER_memb_criticality_constr_79, &asn_PER_memb_criticality_constr_79, memb_criticality_constraint_77 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_80, + select_E2setupFailureIEs_value_type, + { &asn_OER_memb_value_constr_80, &asn_PER_memb_value_constr_80, memb_value_constraint_77 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2setupFailureIEs_tags_77[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2setupFailureIEs_tag2el_77[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2setupFailureIEs_specs_77 = { + sizeof(struct E2setupFailureIEs), + offsetof(struct E2setupFailureIEs, _asn_ctx), + asn_MAP_E2setupFailureIEs_tag2el_77, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2setupFailureIEs = { + "E2setupFailureIEs", + "E2setupFailureIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2setupFailureIEs_tags_77, + sizeof(asn_DEF_E2setupFailureIEs_tags_77) + /sizeof(asn_DEF_E2setupFailureIEs_tags_77[0]), /* 1 */ + asn_DEF_E2setupFailureIEs_tags_77, /* Same as above */ + sizeof(asn_DEF_E2setupFailureIEs_tags_77) + /sizeof(asn_DEF_E2setupFailureIEs_tags_77[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2setupFailureIEs_77, + 3, /* Elements count */ + &asn_SPC_E2setupFailureIEs_specs_77 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_84[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Cause, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "Cause" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_84[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_84 = { + sizeof(struct ResetRequestIEs__value), + offsetof(struct ResetRequestIEs__value, _asn_ctx), + offsetof(struct ResetRequestIEs__value, present), + sizeof(((struct ResetRequestIEs__value *)0)->present), + asn_MAP_value_tag2el_84, + 5, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_84 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_84, + 1, /* Elements count */ + &asn_SPC_value_specs_84 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ResetRequestIEs_81[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_82, &asn_PER_memb_id_constr_82, memb_id_constraint_81 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_ResetRequestIEs_criticality_type, + { &asn_OER_memb_criticality_constr_83, &asn_PER_memb_criticality_constr_83, memb_criticality_constraint_81 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_84, + select_ResetRequestIEs_value_type, + { &asn_OER_memb_value_constr_84, &asn_PER_memb_value_constr_84, memb_value_constraint_81 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_ResetRequestIEs_tags_81[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ResetRequestIEs_tag2el_81[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ResetRequestIEs_specs_81 = { + sizeof(struct ResetRequestIEs), + offsetof(struct ResetRequestIEs, _asn_ctx), + asn_MAP_ResetRequestIEs_tag2el_81, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ResetRequestIEs = { + "ResetRequestIEs", + "ResetRequestIEs", + &asn_OP_SEQUENCE, + asn_DEF_ResetRequestIEs_tags_81, + sizeof(asn_DEF_ResetRequestIEs_tags_81) + /sizeof(asn_DEF_ResetRequestIEs_tags_81[0]), /* 1 */ + asn_DEF_ResetRequestIEs_tags_81, /* Same as above */ + sizeof(asn_DEF_ResetRequestIEs_tags_81) + /sizeof(asn_DEF_ResetRequestIEs_tags_81[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ResetRequestIEs_81, + 3, /* Elements count */ + &asn_SPC_ResetRequestIEs_specs_81 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_88[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_88[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* CriticalityDiagnostics */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_88 = { + sizeof(struct ResetResponseIEs__value), + offsetof(struct ResetResponseIEs__value, _asn_ctx), + offsetof(struct ResetResponseIEs__value, present), + sizeof(((struct ResetResponseIEs__value *)0)->present), + asn_MAP_value_tag2el_88, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_88 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_88, + 1, /* Elements count */ + &asn_SPC_value_specs_88 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ResetResponseIEs_85[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_86, &asn_PER_memb_id_constr_86, memb_id_constraint_85 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_ResetResponseIEs_criticality_type, + { &asn_OER_memb_criticality_constr_87, &asn_PER_memb_criticality_constr_87, memb_criticality_constraint_85 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_88, + select_ResetResponseIEs_value_type, + { &asn_OER_memb_value_constr_88, &asn_PER_memb_value_constr_88, memb_value_constraint_85 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_ResetResponseIEs_tags_85[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ResetResponseIEs_tag2el_85[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ResetResponseIEs_specs_85 = { + sizeof(struct ResetResponseIEs), + offsetof(struct ResetResponseIEs, _asn_ctx), + asn_MAP_ResetResponseIEs_tag2el_85, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ResetResponseIEs = { + "ResetResponseIEs", + "ResetResponseIEs", + &asn_OP_SEQUENCE, + asn_DEF_ResetResponseIEs_tags_85, + sizeof(asn_DEF_ResetResponseIEs_tags_85) + /sizeof(asn_DEF_ResetResponseIEs_tags_85[0]), /* 1 */ + asn_DEF_ResetResponseIEs_tags_85, /* Same as above */ + sizeof(asn_DEF_ResetResponseIEs_tags_85) + /sizeof(asn_DEF_ResetResponseIEs_tags_85[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ResetResponseIEs_85, + 3, /* Elements count */ + &asn_SPC_ResetResponseIEs_specs_85 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_92[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.RANfunctions_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctions_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctions-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.RANfunctionsID_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionsID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionsID-List" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_92[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctions-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* RANfunctionsID-List */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_92 = { + sizeof(struct RICserviceUpdate_IEs__value), + offsetof(struct RICserviceUpdate_IEs__value, _asn_ctx), + offsetof(struct RICserviceUpdate_IEs__value, present), + sizeof(((struct RICserviceUpdate_IEs__value *)0)->present), + asn_MAP_value_tag2el_92, + 2, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_92 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_92, + 2, /* Elements count */ + &asn_SPC_value_specs_92 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_89[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_90, &asn_PER_memb_id_constr_90, memb_id_constraint_89 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICserviceUpdate_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_91, &asn_PER_memb_criticality_constr_91, memb_criticality_constraint_89 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_92, + select_RICserviceUpdate_IEs_value_type, + { &asn_OER_memb_value_constr_92, &asn_PER_memb_value_constr_92, memb_value_constraint_89 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_IEs_tags_89[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdate_IEs_tag2el_89[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_IEs_specs_89 = { + sizeof(struct RICserviceUpdate_IEs), + offsetof(struct RICserviceUpdate_IEs, _asn_ctx), + asn_MAP_RICserviceUpdate_IEs_tag2el_89, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate_IEs = { + "RICserviceUpdate-IEs", + "RICserviceUpdate-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceUpdate_IEs_tags_89, + sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89) + /sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89[0]), /* 1 */ + asn_DEF_RICserviceUpdate_IEs_tags_89, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89) + /sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceUpdate_IEs_89, + 3, /* Elements count */ + &asn_SPC_RICserviceUpdate_IEs_specs_89 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_96[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs__value, choice.RANfunctionsID_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionsID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionsID-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs__value, choice.RANfunctionsIDcause_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionsIDcause_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionsIDcause-List" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_96[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctionsID-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* RANfunctionsIDcause-List */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_96 = { + sizeof(struct RICserviceUpdateAcknowledge_IEs__value), + offsetof(struct RICserviceUpdateAcknowledge_IEs__value, _asn_ctx), + offsetof(struct RICserviceUpdateAcknowledge_IEs__value, present), + sizeof(((struct RICserviceUpdateAcknowledge_IEs__value *)0)->present), + asn_MAP_value_tag2el_96, + 2, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_96 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_96, + 2, /* Elements count */ + &asn_SPC_value_specs_96 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_93[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_94, &asn_PER_memb_id_constr_94, memb_id_constraint_93 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICserviceUpdateAcknowledge_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_95, &asn_PER_memb_criticality_constr_95, memb_criticality_constraint_93 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_96, + select_RICserviceUpdateAcknowledge_IEs_value_type, + { &asn_OER_memb_value_constr_96, &asn_PER_memb_value_constr_96, memb_value_constraint_93 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93 = { + sizeof(struct RICserviceUpdateAcknowledge_IEs), + offsetof(struct RICserviceUpdateAcknowledge_IEs, _asn_ctx), + asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge_IEs = { + "RICserviceUpdateAcknowledge-IEs", + "RICserviceUpdateAcknowledge-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93, + sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93) + /sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[0]), /* 1 */ + asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93) + /sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceUpdateAcknowledge_IEs_93, + 3, /* Elements count */ + &asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_100[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.RANfunctionsIDcause_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionsIDcause_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionsIDcause-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.TimeToWait), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_TimeToWait, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "TimeToWait" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" + }, +}; +static const unsigned asn_MAP_value_to_canonical_100[] = { 1, 0, 2 }; +static const unsigned asn_MAP_value_from_canonical_100[] = { 1, 0, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_100[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctionsIDcause-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* CriticalityDiagnostics */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_100 = { + sizeof(struct RICserviceUpdateFailure_IEs__value), + offsetof(struct RICserviceUpdateFailure_IEs__value, _asn_ctx), + offsetof(struct RICserviceUpdateFailure_IEs__value, present), + sizeof(((struct RICserviceUpdateFailure_IEs__value *)0)->present), + asn_MAP_value_tag2el_100, + 3, /* Count of tags in the map */ + asn_MAP_value_to_canonical_100, + asn_MAP_value_from_canonical_100, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_100 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_100, + 3, /* Elements count */ + &asn_SPC_value_specs_100 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_97[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_98, &asn_PER_memb_id_constr_98, memb_id_constraint_97 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICserviceUpdateFailure_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_99, &asn_PER_memb_criticality_constr_99, memb_criticality_constraint_97 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_100, + select_RICserviceUpdateFailure_IEs_value_type, + { &asn_OER_memb_value_constr_100, &asn_PER_memb_value_constr_100, memb_value_constraint_97 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_IEs_tags_97[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_IEs_specs_97 = { + sizeof(struct RICserviceUpdateFailure_IEs), + offsetof(struct RICserviceUpdateFailure_IEs, _asn_ctx), + asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure_IEs = { + "RICserviceUpdateFailure-IEs", + "RICserviceUpdateFailure-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceUpdateFailure_IEs_tags_97, + sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97) + /sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97[0]), /* 1 */ + asn_DEF_RICserviceUpdateFailure_IEs_tags_97, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97) + /sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceUpdateFailure_IEs_97, + 3, /* Elements count */ + &asn_SPC_RICserviceUpdateFailure_IEs_specs_97 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_104[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs__value, choice.RANfunctionsID_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionsID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RANfunctionsID-List" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_104[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionsID-List */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_104 = { + sizeof(struct RICserviceQuery_IEs__value), + offsetof(struct RICserviceQuery_IEs__value, _asn_ctx), + offsetof(struct RICserviceQuery_IEs__value, present), + sizeof(((struct RICserviceQuery_IEs__value *)0)->present), + asn_MAP_value_tag2el_104, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_104 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_104, + 1, /* Elements count */ + &asn_SPC_value_specs_104 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_101[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { &asn_OER_memb_id_constr_102, &asn_PER_memb_id_constr_102, memb_id_constraint_101 }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICserviceQuery_IEs_criticality_type, + { &asn_OER_memb_criticality_constr_103, &asn_PER_memb_criticality_constr_103, memb_criticality_constraint_101 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_104, + select_RICserviceQuery_IEs_value_type, + { &asn_OER_memb_value_constr_104, &asn_PER_memb_value_constr_104, memb_value_constraint_101 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceQuery_IEs_tags_101[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceQuery_IEs_tag2el_101[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_IEs_specs_101 = { + sizeof(struct RICserviceQuery_IEs), + offsetof(struct RICserviceQuery_IEs, _asn_ctx), + asn_MAP_RICserviceQuery_IEs_tag2el_101, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceQuery_IEs = { + "RICserviceQuery-IEs", + "RICserviceQuery-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceQuery_IEs_tags_101, + sizeof(asn_DEF_RICserviceQuery_IEs_tags_101) + /sizeof(asn_DEF_RICserviceQuery_IEs_tags_101[0]), /* 1 */ + asn_DEF_RICserviceQuery_IEs_tags_101, /* Same as above */ + sizeof(asn_DEF_RICserviceQuery_IEs_tags_101) + /sizeof(asn_DEF_RICserviceQuery_IEs_tags_101[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceQuery_IEs_101, + 3, /* Elements count */ + &asn_SPC_RICserviceQuery_IEs_specs_101 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ProtocolIE-FieldPair.c b/Bouncer/e2ap/lib/ProtocolIE-FieldPair.c new file mode 100644 index 0000000..fa909ca --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-FieldPair.c @@ -0,0 +1,9 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-FieldPair.h" + diff --git a/Bouncer/e2ap/lib/ProtocolIE-ID.c b/Bouncer/e2ap/lib/ProtocolIE-ID.c new file mode 100644 index 0000000..b0e56de --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-ID.h" + +int +ProtocolIE_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_ProtocolIE_ID_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +asn_per_constraints_t asn_PER_type_ProtocolIE_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_ID = { + "ProtocolIE-ID", + "ProtocolIE-ID", + &asn_OP_NativeInteger, + asn_DEF_ProtocolIE_ID_tags_1, + sizeof(asn_DEF_ProtocolIE_ID_tags_1) + /sizeof(asn_DEF_ProtocolIE_ID_tags_1[0]), /* 1 */ + asn_DEF_ProtocolIE_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_ID_tags_1) + /sizeof(asn_DEF_ProtocolIE_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_ProtocolIE_ID_constr_1, &asn_PER_type_ProtocolIE_ID_constr_1, ProtocolIE_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/ProtocolIE-SingleContainer.c b/Bouncer/e2ap/lib/ProtocolIE-SingleContainer.c new file mode 100644 index 0000000..5b06b80 --- /dev/null +++ b/Bouncer/e2ap/lib/ProtocolIE-SingleContainer.c @@ -0,0 +1,147 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-Containers" + * found in "E2AP-Containers-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ProtocolIE-SingleContainer.h" + +/* + * This type is implemented using RICaction_ToBeSetup_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using RICaction_Admitted_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using RICaction_NotAdmitted_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using RANfunction_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using RANfunctionID_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using RANfunctionIDcause_ItemIEs, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P0 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_90P0_tags_1, + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P0_tags_1[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_90P0_tags_1, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P0_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_ToBeSetup_ItemIEs_1, + 3, /* Elements count */ + &asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P1 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_90P1_tags_2, + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P1_tags_2) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P1_tags_2[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_90P1_tags_2, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P1_tags_2) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P1_tags_2[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_Admitted_ItemIEs_5, + 3, /* Elements count */ + &asn_SPC_RICaction_Admitted_ItemIEs_specs_5 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P2_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P2 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_90P2_tags_3, + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P2_tags_3) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P2_tags_3[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_90P2_tags_3, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P2_tags_3) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P2_tags_3[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_NotAdmitted_ItemIEs_9, + 3, /* Elements count */ + &asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P3_tags_4[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P3 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_90P3_tags_4, + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P3_tags_4) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P3_tags_4[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_90P3_tags_4, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P3_tags_4) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P3_tags_4[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunction_ItemIEs_13, + 3, /* Elements count */ + &asn_SPC_RANfunction_ItemIEs_specs_13 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P4 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5, + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunctionID_ItemIEs_17, + 3, /* Elements count */ + &asn_SPC_RANfunctionID_ItemIEs_specs_17 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P5 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6, + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunctionIDcause_ItemIEs_21, + 3, /* Elements count */ + &asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunction-Item.c b/Bouncer/e2ap/lib/RANfunction-Item.c new file mode 100644 index 0000000..f80753b --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunction-Item.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunction-Item.h" + +asn_TYPE_member_t asn_MBR_RANfunction_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionDefinition), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionDefinition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionDefinition" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionRevision), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionRevision, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionRevision" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunction_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunction_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunctionID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranFunctionDefinition */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranFunctionRevision */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Item_specs_1 = { + sizeof(struct RANfunction_Item), + offsetof(struct RANfunction_Item, _asn_ctx), + asn_MAP_RANfunction_Item_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunction_Item = { + "RANfunction-Item", + "RANfunction-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANfunction_Item_tags_1, + sizeof(asn_DEF_RANfunction_Item_tags_1) + /sizeof(asn_DEF_RANfunction_Item_tags_1[0]), /* 1 */ + asn_DEF_RANfunction_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunction_Item_tags_1) + /sizeof(asn_DEF_RANfunction_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunction_Item_1, + 3, /* Elements count */ + &asn_SPC_RANfunction_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctionDefinition.c b/Bouncer/e2ap/lib/RANfunctionDefinition.c new file mode 100644 index 0000000..49c090f --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctionDefinition.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctionDefinition.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RANfunctionDefinition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionDefinition = { + "RANfunctionDefinition", + "RANfunctionDefinition", + &asn_OP_OCTET_STRING, + asn_DEF_RANfunctionDefinition_tags_1, + sizeof(asn_DEF_RANfunctionDefinition_tags_1) + /sizeof(asn_DEF_RANfunctionDefinition_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionDefinition_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionDefinition_tags_1) + /sizeof(asn_DEF_RANfunctionDefinition_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctionID-Item.c b/Bouncer/e2ap/lib/RANfunctionID-Item.c new file mode 100644 index 0000000..fb2b6fc --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctionID-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctionID-Item.h" + +asn_TYPE_member_t asn_MBR_RANfunctionID_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_Item, ranFunctionID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_Item, ranFunctionRevision), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionRevision, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionRevision" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionID_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunctionID_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunctionID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranFunctionRevision */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_Item_specs_1 = { + sizeof(struct RANfunctionID_Item), + offsetof(struct RANfunctionID_Item, _asn_ctx), + asn_MAP_RANfunctionID_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionID_Item = { + "RANfunctionID-Item", + "RANfunctionID-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANfunctionID_Item_tags_1, + sizeof(asn_DEF_RANfunctionID_Item_tags_1) + /sizeof(asn_DEF_RANfunctionID_Item_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionID_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionID_Item_tags_1) + /sizeof(asn_DEF_RANfunctionID_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunctionID_Item_1, + 2, /* Elements count */ + &asn_SPC_RANfunctionID_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctionID.c b/Bouncer/e2ap/lib/RANfunctionID.c new file mode 100644 index 0000000..d79a9d6 --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctionID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctionID.h" + +int +RANfunctionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 4095)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RANfunctionID_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..4095) */, + -1}; +asn_per_constraints_t asn_PER_type_RANfunctionID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionID = { + "RANfunctionID", + "RANfunctionID", + &asn_OP_NativeInteger, + asn_DEF_RANfunctionID_tags_1, + sizeof(asn_DEF_RANfunctionID_tags_1) + /sizeof(asn_DEF_RANfunctionID_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionID_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionID_tags_1) + /sizeof(asn_DEF_RANfunctionID_tags_1[0]), /* 1 */ + { &asn_OER_type_RANfunctionID_constr_1, &asn_PER_type_RANfunctionID_constr_1, RANfunctionID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctionIDcause-Item.c b/Bouncer/e2ap/lib/RANfunctionIDcause-Item.c new file mode 100644 index 0000000..b74eb64 --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctionIDcause-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctionIDcause-Item.h" + +asn_TYPE_member_t asn_MBR_RANfunctionIDcause_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_Item, ranFunctionID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_Item, cause), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Cause, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cause" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionIDcause_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunctionIDcause_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunctionID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cause */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_Item_specs_1 = { + sizeof(struct RANfunctionIDcause_Item), + offsetof(struct RANfunctionIDcause_Item, _asn_ctx), + asn_MAP_RANfunctionIDcause_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_Item = { + "RANfunctionIDcause-Item", + "RANfunctionIDcause-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANfunctionIDcause_Item_tags_1, + sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1) + /sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionIDcause_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1) + /sizeof(asn_DEF_RANfunctionIDcause_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunctionIDcause_Item_1, + 2, /* Elements count */ + &asn_SPC_RANfunctionIDcause_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctionRevision.c b/Bouncer/e2ap/lib/RANfunctionRevision.c new file mode 100644 index 0000000..32cc4a5 --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctionRevision.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctionRevision.h" + +int +RANfunctionRevision_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 4095)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RANfunctionRevision_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..4095) */, + -1}; +asn_per_constraints_t asn_PER_type_RANfunctionRevision_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionRevision_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionRevision = { + "RANfunctionRevision", + "RANfunctionRevision", + &asn_OP_NativeInteger, + asn_DEF_RANfunctionRevision_tags_1, + sizeof(asn_DEF_RANfunctionRevision_tags_1) + /sizeof(asn_DEF_RANfunctionRevision_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionRevision_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionRevision_tags_1) + /sizeof(asn_DEF_RANfunctionRevision_tags_1[0]), /* 1 */ + { &asn_OER_type_RANfunctionRevision_constr_1, &asn_PER_type_RANfunctionRevision_constr_1, RANfunctionRevision_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctions-List.c b/Bouncer/e2ap/lib/RANfunctions-List.c new file mode 100644 index 0000000..cf01054 --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctions-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctions-List.h" + +#include "ProtocolIE-SingleContainer.h" +static asn_oer_constraints_t asn_OER_type_RANfunctions_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..256)) */}; +asn_per_constraints_t asn_PER_type_RANfunctions_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 0, 256 } /* (SIZE(0..256)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANfunctions_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_90P3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunctions_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RANfunctions_List_specs_1 = { + sizeof(struct RANfunctions_List), + offsetof(struct RANfunctions_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctions_List = { + "RANfunctions-List", + "RANfunctions-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_RANfunctions_List_tags_1, + sizeof(asn_DEF_RANfunctions_List_tags_1) + /sizeof(asn_DEF_RANfunctions_List_tags_1[0]), /* 1 */ + asn_DEF_RANfunctions_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctions_List_tags_1) + /sizeof(asn_DEF_RANfunctions_List_tags_1[0]), /* 1 */ + { &asn_OER_type_RANfunctions_List_constr_1, &asn_PER_type_RANfunctions_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RANfunctions_List_1, + 1, /* Single element */ + &asn_SPC_RANfunctions_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctionsID-List.c b/Bouncer/e2ap/lib/RANfunctionsID-List.c new file mode 100644 index 0000000..b888995 --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctionsID-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctionsID-List.h" + +#include "ProtocolIE-SingleContainer.h" +static asn_oer_constraints_t asn_OER_type_RANfunctionsID_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..256)) */}; +asn_per_constraints_t asn_PER_type_RANfunctionsID_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 0, 256 } /* (SIZE(0..256)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANfunctionsID_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_90P4, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionsID_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RANfunctionsID_List_specs_1 = { + sizeof(struct RANfunctionsID_List), + offsetof(struct RANfunctionsID_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionsID_List = { + "RANfunctionsID-List", + "RANfunctionsID-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_RANfunctionsID_List_tags_1, + sizeof(asn_DEF_RANfunctionsID_List_tags_1) + /sizeof(asn_DEF_RANfunctionsID_List_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionsID_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionsID_List_tags_1) + /sizeof(asn_DEF_RANfunctionsID_List_tags_1[0]), /* 1 */ + { &asn_OER_type_RANfunctionsID_List_constr_1, &asn_PER_type_RANfunctionsID_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RANfunctionsID_List_1, + 1, /* Single element */ + &asn_SPC_RANfunctionsID_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RANfunctionsIDcause-List.c b/Bouncer/e2ap/lib/RANfunctionsIDcause-List.c new file mode 100644 index 0000000..e1ae0d2 --- /dev/null +++ b/Bouncer/e2ap/lib/RANfunctionsIDcause-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunctionsIDcause-List.h" + +#include "ProtocolIE-SingleContainer.h" +static asn_oer_constraints_t asn_OER_type_RANfunctionsIDcause_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..256)) */}; +asn_per_constraints_t asn_PER_type_RANfunctionsIDcause_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 0, 256 } /* (SIZE(0..256)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANfunctionsIDcause_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_90P5, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANfunctionsIDcause_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RANfunctionsIDcause_List_specs_1 = { + sizeof(struct RANfunctionsIDcause_List), + offsetof(struct RANfunctionsIDcause_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunctionsIDcause_List = { + "RANfunctionsIDcause-List", + "RANfunctionsIDcause-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_RANfunctionsIDcause_List_tags_1, + sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1) + /sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionsIDcause_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1) + /sizeof(asn_DEF_RANfunctionsIDcause_List_tags_1[0]), /* 1 */ + { &asn_OER_type_RANfunctionsIDcause_List_constr_1, &asn_PER_type_RANfunctionsIDcause_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RANfunctionsIDcause_List_1, + 1, /* Single element */ + &asn_SPC_RANfunctionsIDcause_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICaction-Admitted-Item.c b/Bouncer/e2ap/lib/RICaction-Admitted-Item.c new file mode 100644 index 0000000..27e741d --- /dev/null +++ b/Bouncer/e2ap/lib/RICaction-Admitted-Item.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICaction-Admitted-Item.h" + +asn_TYPE_member_t asn_MBR_RICaction_Admitted_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_Item, ricActionID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICactionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricActionID" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICaction_Admitted_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ricActionID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_Item_specs_1 = { + sizeof(struct RICaction_Admitted_Item), + offsetof(struct RICaction_Admitted_Item, _asn_ctx), + asn_MAP_RICaction_Admitted_Item_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_Item = { + "RICaction-Admitted-Item", + "RICaction-Admitted-Item", + &asn_OP_SEQUENCE, + asn_DEF_RICaction_Admitted_Item_tags_1, + sizeof(asn_DEF_RICaction_Admitted_Item_tags_1) + /sizeof(asn_DEF_RICaction_Admitted_Item_tags_1[0]), /* 1 */ + asn_DEF_RICaction_Admitted_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RICaction_Admitted_Item_tags_1) + /sizeof(asn_DEF_RICaction_Admitted_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_Admitted_Item_1, + 1, /* Elements count */ + &asn_SPC_RICaction_Admitted_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICaction-Admitted-List.c b/Bouncer/e2ap/lib/RICaction-Admitted-List.c new file mode 100644 index 0000000..e9e8a5b --- /dev/null +++ b/Bouncer/e2ap/lib/RICaction-Admitted-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICaction-Admitted-List.h" + +#include "ProtocolIE-SingleContainer.h" +static asn_oer_constraints_t asn_OER_type_RICaction_Admitted_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..16)) */}; +asn_per_constraints_t asn_PER_type_RICaction_Admitted_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RICaction_Admitted_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_90P1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RICaction_Admitted_List_specs_1 = { + sizeof(struct RICaction_Admitted_List), + offsetof(struct RICaction_Admitted_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_List = { + "RICaction-Admitted-List", + "RICaction-Admitted-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_RICaction_Admitted_List_tags_1, + sizeof(asn_DEF_RICaction_Admitted_List_tags_1) + /sizeof(asn_DEF_RICaction_Admitted_List_tags_1[0]), /* 1 */ + asn_DEF_RICaction_Admitted_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RICaction_Admitted_List_tags_1) + /sizeof(asn_DEF_RICaction_Admitted_List_tags_1[0]), /* 1 */ + { &asn_OER_type_RICaction_Admitted_List_constr_1, &asn_PER_type_RICaction_Admitted_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RICaction_Admitted_List_1, + 1, /* Single element */ + &asn_SPC_RICaction_Admitted_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICaction-NotAdmitted-Item.c b/Bouncer/e2ap/lib/RICaction-NotAdmitted-Item.c new file mode 100644 index 0000000..86212ed --- /dev/null +++ b/Bouncer/e2ap/lib/RICaction-NotAdmitted-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICaction-NotAdmitted-Item.h" + +asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_Item, ricActionID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICactionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricActionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_Item, cause), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Cause, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cause" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICaction_NotAdmitted_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricActionID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cause */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_Item_specs_1 = { + sizeof(struct RICaction_NotAdmitted_Item), + offsetof(struct RICaction_NotAdmitted_Item, _asn_ctx), + asn_MAP_RICaction_NotAdmitted_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_Item = { + "RICaction-NotAdmitted-Item", + "RICaction-NotAdmitted-Item", + &asn_OP_SEQUENCE, + asn_DEF_RICaction_NotAdmitted_Item_tags_1, + sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1) + /sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1[0]), /* 1 */ + asn_DEF_RICaction_NotAdmitted_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1) + /sizeof(asn_DEF_RICaction_NotAdmitted_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_NotAdmitted_Item_1, + 2, /* Elements count */ + &asn_SPC_RICaction_NotAdmitted_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICaction-NotAdmitted-List.c b/Bouncer/e2ap/lib/RICaction-NotAdmitted-List.c new file mode 100644 index 0000000..7c7f6e2 --- /dev/null +++ b/Bouncer/e2ap/lib/RICaction-NotAdmitted-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICaction-NotAdmitted-List.h" + +#include "ProtocolIE-SingleContainer.h" +static asn_oer_constraints_t asn_OER_type_RICaction_NotAdmitted_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..16)) */}; +asn_per_constraints_t asn_PER_type_RICaction_NotAdmitted_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 0, 16 } /* (SIZE(0..16)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_90P2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RICaction_NotAdmitted_List_specs_1 = { + sizeof(struct RICaction_NotAdmitted_List), + offsetof(struct RICaction_NotAdmitted_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_List = { + "RICaction-NotAdmitted-List", + "RICaction-NotAdmitted-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_RICaction_NotAdmitted_List_tags_1, + sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1) + /sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1[0]), /* 1 */ + asn_DEF_RICaction_NotAdmitted_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1) + /sizeof(asn_DEF_RICaction_NotAdmitted_List_tags_1[0]), /* 1 */ + { &asn_OER_type_RICaction_NotAdmitted_List_constr_1, &asn_PER_type_RICaction_NotAdmitted_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RICaction_NotAdmitted_List_1, + 1, /* Single element */ + &asn_SPC_RICaction_NotAdmitted_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICaction-ToBeSetup-Item.c b/Bouncer/e2ap/lib/RICaction-ToBeSetup-Item.c new file mode 100644 index 0000000..1e78073 --- /dev/null +++ b/Bouncer/e2ap/lib/RICaction-ToBeSetup-Item.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICaction-ToBeSetup-Item.h" + +#include "RICsubsequentAction.h" +asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_Item, ricActionID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICactionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricActionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_Item, ricActionType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICactionType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricActionType" + }, + { ATF_POINTER, 2, offsetof(struct RICaction_ToBeSetup_Item, ricActionDefinition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICactionDefinition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricActionDefinition" + }, + { ATF_POINTER, 1, offsetof(struct RICaction_ToBeSetup_Item, ricSubsequentAction), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICsubsequentAction, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricSubsequentAction" + }, +}; +static const int asn_MAP_RICaction_ToBeSetup_Item_oms_1[] = { 2, 3 }; +static const ber_tlv_tag_t asn_DEF_RICaction_ToBeSetup_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICaction_ToBeSetup_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricActionID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricActionType */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ricActionDefinition */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ricSubsequentAction */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_Item_specs_1 = { + sizeof(struct RICaction_ToBeSetup_Item), + offsetof(struct RICaction_ToBeSetup_Item, _asn_ctx), + asn_MAP_RICaction_ToBeSetup_Item_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_RICaction_ToBeSetup_Item_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_Item = { + "RICaction-ToBeSetup-Item", + "RICaction-ToBeSetup-Item", + &asn_OP_SEQUENCE, + asn_DEF_RICaction_ToBeSetup_Item_tags_1, + sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1) + /sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1[0]), /* 1 */ + asn_DEF_RICaction_ToBeSetup_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1) + /sizeof(asn_DEF_RICaction_ToBeSetup_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICaction_ToBeSetup_Item_1, + 4, /* Elements count */ + &asn_SPC_RICaction_ToBeSetup_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICactionDefinition.c b/Bouncer/e2ap/lib/RICactionDefinition.c new file mode 100644 index 0000000..3f157ba --- /dev/null +++ b/Bouncer/e2ap/lib/RICactionDefinition.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICactionDefinition.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICactionDefinition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICactionDefinition = { + "RICactionDefinition", + "RICactionDefinition", + &asn_OP_OCTET_STRING, + asn_DEF_RICactionDefinition_tags_1, + sizeof(asn_DEF_RICactionDefinition_tags_1) + /sizeof(asn_DEF_RICactionDefinition_tags_1[0]), /* 1 */ + asn_DEF_RICactionDefinition_tags_1, /* Same as above */ + sizeof(asn_DEF_RICactionDefinition_tags_1) + /sizeof(asn_DEF_RICactionDefinition_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICactionID.c b/Bouncer/e2ap/lib/RICactionID.c new file mode 100644 index 0000000..73658f5 --- /dev/null +++ b/Bouncer/e2ap/lib/RICactionID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICactionID.h" + +int +RICactionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICactionID_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +asn_per_constraints_t asn_PER_type_RICactionID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RICactionID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICactionID = { + "RICactionID", + "RICactionID", + &asn_OP_NativeInteger, + asn_DEF_RICactionID_tags_1, + sizeof(asn_DEF_RICactionID_tags_1) + /sizeof(asn_DEF_RICactionID_tags_1[0]), /* 1 */ + asn_DEF_RICactionID_tags_1, /* Same as above */ + sizeof(asn_DEF_RICactionID_tags_1) + /sizeof(asn_DEF_RICactionID_tags_1[0]), /* 1 */ + { &asn_OER_type_RICactionID_constr_1, &asn_PER_type_RICactionID_constr_1, RICactionID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/RICactionType.c b/Bouncer/e2ap/lib/RICactionType.c new file mode 100644 index 0000000..bfd33d5 --- /dev/null +++ b/Bouncer/e2ap/lib/RICactionType.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICactionType.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICactionType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RICactionType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RICactionType_value2enum_1[] = { + { 0, 6, "report" }, + { 1, 6, "insert" }, + { 2, 6, "policy" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RICactionType_enum2value_1[] = { + 1, /* insert(1) */ + 2, /* policy(2) */ + 0 /* report(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RICactionType_specs_1 = { + asn_MAP_RICactionType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RICactionType_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RICactionType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICactionType = { + "RICactionType", + "RICactionType", + &asn_OP_NativeEnumerated, + asn_DEF_RICactionType_tags_1, + sizeof(asn_DEF_RICactionType_tags_1) + /sizeof(asn_DEF_RICactionType_tags_1[0]), /* 1 */ + asn_DEF_RICactionType_tags_1, /* Same as above */ + sizeof(asn_DEF_RICactionType_tags_1) + /sizeof(asn_DEF_RICactionType_tags_1[0]), /* 1 */ + { &asn_OER_type_RICactionType_constr_1, &asn_PER_type_RICactionType_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RICactionType_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICactions-ToBeSetup-List.c b/Bouncer/e2ap/lib/RICactions-ToBeSetup-List.c new file mode 100644 index 0000000..93905c3 --- /dev/null +++ b/Bouncer/e2ap/lib/RICactions-ToBeSetup-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICactions-ToBeSetup-List.h" + +#include "ProtocolIE-SingleContainer.h" +static asn_oer_constraints_t asn_OER_type_RICactions_ToBeSetup_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..16)) */}; +asn_per_constraints_t asn_PER_type_RICactions_ToBeSetup_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RICactions_ToBeSetup_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_90P0, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICactions_ToBeSetup_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RICactions_ToBeSetup_List_specs_1 = { + sizeof(struct RICactions_ToBeSetup_List), + offsetof(struct RICactions_ToBeSetup_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RICactions_ToBeSetup_List = { + "RICactions-ToBeSetup-List", + "RICactions-ToBeSetup-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_RICactions_ToBeSetup_List_tags_1, + sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1) + /sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1[0]), /* 1 */ + asn_DEF_RICactions_ToBeSetup_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1) + /sizeof(asn_DEF_RICactions_ToBeSetup_List_tags_1[0]), /* 1 */ + { &asn_OER_type_RICactions_ToBeSetup_List_constr_1, &asn_PER_type_RICactions_ToBeSetup_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RICactions_ToBeSetup_List_1, + 1, /* Single element */ + &asn_SPC_RICactions_ToBeSetup_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcallProcessID.c b/Bouncer/e2ap/lib/RICcallProcessID.c new file mode 100644 index 0000000..fd2d0eb --- /dev/null +++ b/Bouncer/e2ap/lib/RICcallProcessID.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcallProcessID.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICcallProcessID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICcallProcessID = { + "RICcallProcessID", + "RICcallProcessID", + &asn_OP_OCTET_STRING, + asn_DEF_RICcallProcessID_tags_1, + sizeof(asn_DEF_RICcallProcessID_tags_1) + /sizeof(asn_DEF_RICcallProcessID_tags_1[0]), /* 1 */ + asn_DEF_RICcallProcessID_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcallProcessID_tags_1) + /sizeof(asn_DEF_RICcallProcessID_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolAckRequest.c b/Bouncer/e2ap/lib/RICcontrolAckRequest.c new file mode 100644 index 0000000..1db6bee --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolAckRequest.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolAckRequest.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICcontrolAckRequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RICcontrolAckRequest_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RICcontrolAckRequest_value2enum_1[] = { + { 0, 5, "noAck" }, + { 1, 3, "ack" }, + { 2, 4, "nAck" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RICcontrolAckRequest_enum2value_1[] = { + 1, /* ack(1) */ + 2, /* nAck(2) */ + 0 /* noAck(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RICcontrolAckRequest_specs_1 = { + asn_MAP_RICcontrolAckRequest_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RICcontrolAckRequest_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolAckRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolAckRequest = { + "RICcontrolAckRequest", + "RICcontrolAckRequest", + &asn_OP_NativeEnumerated, + asn_DEF_RICcontrolAckRequest_tags_1, + sizeof(asn_DEF_RICcontrolAckRequest_tags_1) + /sizeof(asn_DEF_RICcontrolAckRequest_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolAckRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolAckRequest_tags_1) + /sizeof(asn_DEF_RICcontrolAckRequest_tags_1[0]), /* 1 */ + { &asn_OER_type_RICcontrolAckRequest_constr_1, &asn_PER_type_RICcontrolAckRequest_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RICcontrolAckRequest_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolAcknowledge.c b/Bouncer/e2ap/lib/RICcontrolAcknowledge.c new file mode 100644 index 0000000..85011b6 --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolAcknowledge.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolAcknowledge.h" + +static asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P8, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolAcknowledge_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_specs_1 = { + sizeof(struct RICcontrolAcknowledge), + offsetof(struct RICcontrolAcknowledge, _asn_ctx), + asn_MAP_RICcontrolAcknowledge_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge = { + "RICcontrolAcknowledge", + "RICcontrolAcknowledge", + &asn_OP_SEQUENCE, + asn_DEF_RICcontrolAcknowledge_tags_1, + sizeof(asn_DEF_RICcontrolAcknowledge_tags_1) + /sizeof(asn_DEF_RICcontrolAcknowledge_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolAcknowledge_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolAcknowledge_tags_1) + /sizeof(asn_DEF_RICcontrolAcknowledge_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICcontrolAcknowledge_1, + 1, /* Elements count */ + &asn_SPC_RICcontrolAcknowledge_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolFailure.c b/Bouncer/e2ap/lib/RICcontrolFailure.c new file mode 100644 index 0000000..a847f9f --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolFailure.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolFailure.h" + +static asn_TYPE_member_t asn_MBR_RICcontrolFailure_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P9, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolFailure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_specs_1 = { + sizeof(struct RICcontrolFailure), + offsetof(struct RICcontrolFailure, _asn_ctx), + asn_MAP_RICcontrolFailure_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure = { + "RICcontrolFailure", + "RICcontrolFailure", + &asn_OP_SEQUENCE, + asn_DEF_RICcontrolFailure_tags_1, + sizeof(asn_DEF_RICcontrolFailure_tags_1) + /sizeof(asn_DEF_RICcontrolFailure_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolFailure_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolFailure_tags_1) + /sizeof(asn_DEF_RICcontrolFailure_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICcontrolFailure_1, + 1, /* Elements count */ + &asn_SPC_RICcontrolFailure_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolHeader.c b/Bouncer/e2ap/lib/RICcontrolHeader.c new file mode 100644 index 0000000..3accabb --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolHeader.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolHeader.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICcontrolHeader_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolHeader = { + "RICcontrolHeader", + "RICcontrolHeader", + &asn_OP_OCTET_STRING, + asn_DEF_RICcontrolHeader_tags_1, + sizeof(asn_DEF_RICcontrolHeader_tags_1) + /sizeof(asn_DEF_RICcontrolHeader_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolHeader_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolHeader_tags_1) + /sizeof(asn_DEF_RICcontrolHeader_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolMessage.c b/Bouncer/e2ap/lib/RICcontrolMessage.c new file mode 100644 index 0000000..d865706 --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolMessage.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolMessage.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICcontrolMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolMessage = { + "RICcontrolMessage", + "RICcontrolMessage", + &asn_OP_OCTET_STRING, + asn_DEF_RICcontrolMessage_tags_1, + sizeof(asn_DEF_RICcontrolMessage_tags_1) + /sizeof(asn_DEF_RICcontrolMessage_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolMessage_tags_1) + /sizeof(asn_DEF_RICcontrolMessage_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolOutcome.c b/Bouncer/e2ap/lib/RICcontrolOutcome.c new file mode 100644 index 0000000..806038d --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolOutcome.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolOutcome.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICcontrolOutcome_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolOutcome = { + "RICcontrolOutcome", + "RICcontrolOutcome", + &asn_OP_OCTET_STRING, + asn_DEF_RICcontrolOutcome_tags_1, + sizeof(asn_DEF_RICcontrolOutcome_tags_1) + /sizeof(asn_DEF_RICcontrolOutcome_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolOutcome_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolOutcome_tags_1) + /sizeof(asn_DEF_RICcontrolOutcome_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolRequest.c b/Bouncer/e2ap/lib/RICcontrolRequest.c new file mode 100644 index 0000000..43a04e2 --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolRequest.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolRequest.h" + +static asn_TYPE_member_t asn_MBR_RICcontrolRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P7, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_specs_1 = { + sizeof(struct RICcontrolRequest), + offsetof(struct RICcontrolRequest, _asn_ctx), + asn_MAP_RICcontrolRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest = { + "RICcontrolRequest", + "RICcontrolRequest", + &asn_OP_SEQUENCE, + asn_DEF_RICcontrolRequest_tags_1, + sizeof(asn_DEF_RICcontrolRequest_tags_1) + /sizeof(asn_DEF_RICcontrolRequest_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolRequest_tags_1) + /sizeof(asn_DEF_RICcontrolRequest_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICcontrolRequest_1, + 1, /* Elements count */ + &asn_SPC_RICcontrolRequest_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICcontrolStatus.c b/Bouncer/e2ap/lib/RICcontrolStatus.c new file mode 100644 index 0000000..d2873fc --- /dev/null +++ b/Bouncer/e2ap/lib/RICcontrolStatus.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICcontrolStatus.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICcontrolStatus_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RICcontrolStatus_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RICcontrolStatus_value2enum_1[] = { + { 0, 7, "success" }, + { 1, 8, "rejected" }, + { 2, 6, "failed" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RICcontrolStatus_enum2value_1[] = { + 2, /* failed(2) */ + 1, /* rejected(1) */ + 0 /* success(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RICcontrolStatus_specs_1 = { + asn_MAP_RICcontrolStatus_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RICcontrolStatus_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RICcontrolStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICcontrolStatus = { + "RICcontrolStatus", + "RICcontrolStatus", + &asn_OP_NativeEnumerated, + asn_DEF_RICcontrolStatus_tags_1, + sizeof(asn_DEF_RICcontrolStatus_tags_1) + /sizeof(asn_DEF_RICcontrolStatus_tags_1[0]), /* 1 */ + asn_DEF_RICcontrolStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_RICcontrolStatus_tags_1) + /sizeof(asn_DEF_RICcontrolStatus_tags_1[0]), /* 1 */ + { &asn_OER_type_RICcontrolStatus_constr_1, &asn_PER_type_RICcontrolStatus_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RICcontrolStatus_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICeventTriggerDefinition.c b/Bouncer/e2ap/lib/RICeventTriggerDefinition.c new file mode 100644 index 0000000..a13ddbd --- /dev/null +++ b/Bouncer/e2ap/lib/RICeventTriggerDefinition.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICeventTriggerDefinition.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICeventTriggerDefinition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICeventTriggerDefinition = { + "RICeventTriggerDefinition", + "RICeventTriggerDefinition", + &asn_OP_OCTET_STRING, + asn_DEF_RICeventTriggerDefinition_tags_1, + sizeof(asn_DEF_RICeventTriggerDefinition_tags_1) + /sizeof(asn_DEF_RICeventTriggerDefinition_tags_1[0]), /* 1 */ + asn_DEF_RICeventTriggerDefinition_tags_1, /* Same as above */ + sizeof(asn_DEF_RICeventTriggerDefinition_tags_1) + /sizeof(asn_DEF_RICeventTriggerDefinition_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICindication.c b/Bouncer/e2ap/lib/RICindication.c new file mode 100644 index 0000000..5c40aa5 --- /dev/null +++ b/Bouncer/e2ap/lib/RICindication.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICindication.h" + +static asn_TYPE_member_t asn_MBR_RICindication_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICindication, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P6, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICindication_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICindication_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICindication_specs_1 = { + sizeof(struct RICindication), + offsetof(struct RICindication, _asn_ctx), + asn_MAP_RICindication_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICindication = { + "RICindication", + "RICindication", + &asn_OP_SEQUENCE, + asn_DEF_RICindication_tags_1, + sizeof(asn_DEF_RICindication_tags_1) + /sizeof(asn_DEF_RICindication_tags_1[0]), /* 1 */ + asn_DEF_RICindication_tags_1, /* Same as above */ + sizeof(asn_DEF_RICindication_tags_1) + /sizeof(asn_DEF_RICindication_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICindication_1, + 1, /* Elements count */ + &asn_SPC_RICindication_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICindicationHeader.c b/Bouncer/e2ap/lib/RICindicationHeader.c new file mode 100644 index 0000000..d252382 --- /dev/null +++ b/Bouncer/e2ap/lib/RICindicationHeader.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICindicationHeader.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICindicationHeader_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICindicationHeader = { + "RICindicationHeader", + "RICindicationHeader", + &asn_OP_OCTET_STRING, + asn_DEF_RICindicationHeader_tags_1, + sizeof(asn_DEF_RICindicationHeader_tags_1) + /sizeof(asn_DEF_RICindicationHeader_tags_1[0]), /* 1 */ + asn_DEF_RICindicationHeader_tags_1, /* Same as above */ + sizeof(asn_DEF_RICindicationHeader_tags_1) + /sizeof(asn_DEF_RICindicationHeader_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICindicationMessage.c b/Bouncer/e2ap/lib/RICindicationMessage.c new file mode 100644 index 0000000..bd0ac0f --- /dev/null +++ b/Bouncer/e2ap/lib/RICindicationMessage.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICindicationMessage.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RICindicationMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICindicationMessage = { + "RICindicationMessage", + "RICindicationMessage", + &asn_OP_OCTET_STRING, + asn_DEF_RICindicationMessage_tags_1, + sizeof(asn_DEF_RICindicationMessage_tags_1) + /sizeof(asn_DEF_RICindicationMessage_tags_1[0]), /* 1 */ + asn_DEF_RICindicationMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_RICindicationMessage_tags_1) + /sizeof(asn_DEF_RICindicationMessage_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICindicationSN.c b/Bouncer/e2ap/lib/RICindicationSN.c new file mode 100644 index 0000000..efd2d48 --- /dev/null +++ b/Bouncer/e2ap/lib/RICindicationSN.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICindicationSN.h" + +int +RICindicationSN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICindicationSN_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +asn_per_constraints_t asn_PER_type_RICindicationSN_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RICindicationSN_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICindicationSN = { + "RICindicationSN", + "RICindicationSN", + &asn_OP_NativeInteger, + asn_DEF_RICindicationSN_tags_1, + sizeof(asn_DEF_RICindicationSN_tags_1) + /sizeof(asn_DEF_RICindicationSN_tags_1[0]), /* 1 */ + asn_DEF_RICindicationSN_tags_1, /* Same as above */ + sizeof(asn_DEF_RICindicationSN_tags_1) + /sizeof(asn_DEF_RICindicationSN_tags_1[0]), /* 1 */ + { &asn_OER_type_RICindicationSN_constr_1, &asn_PER_type_RICindicationSN_constr_1, RICindicationSN_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2ap/lib/RICindicationType.c b/Bouncer/e2ap/lib/RICindicationType.c new file mode 100644 index 0000000..58935bb --- /dev/null +++ b/Bouncer/e2ap/lib/RICindicationType.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICindicationType.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICindicationType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RICindicationType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RICindicationType_value2enum_1[] = { + { 0, 6, "report" }, + { 1, 6, "insert" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RICindicationType_enum2value_1[] = { + 1, /* insert(1) */ + 0 /* report(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RICindicationType_specs_1 = { + asn_MAP_RICindicationType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RICindicationType_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RICindicationType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICindicationType = { + "RICindicationType", + "RICindicationType", + &asn_OP_NativeEnumerated, + asn_DEF_RICindicationType_tags_1, + sizeof(asn_DEF_RICindicationType_tags_1) + /sizeof(asn_DEF_RICindicationType_tags_1[0]), /* 1 */ + asn_DEF_RICindicationType_tags_1, /* Same as above */ + sizeof(asn_DEF_RICindicationType_tags_1) + /sizeof(asn_DEF_RICindicationType_tags_1[0]), /* 1 */ + { &asn_OER_type_RICindicationType_constr_1, &asn_PER_type_RICindicationType_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RICindicationType_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICrequestID.c b/Bouncer/e2ap/lib/RICrequestID.c new file mode 100644 index 0000000..1422a31 --- /dev/null +++ b/Bouncer/e2ap/lib/RICrequestID.c @@ -0,0 +1,126 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICrequestID.h" + +static int +memb_ricRequestorID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ricInstanceID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_ricRequestorID_constr_2 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_ricRequestorID_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ricInstanceID_constr_3 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +static asn_per_constraints_t asn_PER_memb_ricInstanceID_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RICrequestID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICrequestID, ricRequestorID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ricRequestorID_constr_2, &asn_PER_memb_ricRequestorID_constr_2, memb_ricRequestorID_constraint_1 }, + 0, 0, /* No default value */ + "ricRequestorID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICrequestID, ricInstanceID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ricInstanceID_constr_3, &asn_PER_memb_ricInstanceID_constr_3, memb_ricInstanceID_constraint_1 }, + 0, 0, /* No default value */ + "ricInstanceID" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICrequestID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICrequestID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequestorID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ricInstanceID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICrequestID_specs_1 = { + sizeof(struct RICrequestID), + offsetof(struct RICrequestID, _asn_ctx), + asn_MAP_RICrequestID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICrequestID = { + "RICrequestID", + "RICrequestID", + &asn_OP_SEQUENCE, + asn_DEF_RICrequestID_tags_1, + sizeof(asn_DEF_RICrequestID_tags_1) + /sizeof(asn_DEF_RICrequestID_tags_1[0]), /* 1 */ + asn_DEF_RICrequestID_tags_1, /* Same as above */ + sizeof(asn_DEF_RICrequestID_tags_1) + /sizeof(asn_DEF_RICrequestID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICrequestID_1, + 2, /* Elements count */ + &asn_SPC_RICrequestID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICserviceQuery.c b/Bouncer/e2ap/lib/RICserviceQuery.c new file mode 100644 index 0000000..a7d452e --- /dev/null +++ b/Bouncer/e2ap/lib/RICserviceQuery.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICserviceQuery.h" + +static asn_TYPE_member_t asn_MBR_RICserviceQuery_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P19, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceQuery_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceQuery_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_specs_1 = { + sizeof(struct RICserviceQuery), + offsetof(struct RICserviceQuery, _asn_ctx), + asn_MAP_RICserviceQuery_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceQuery = { + "RICserviceQuery", + "RICserviceQuery", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceQuery_tags_1, + sizeof(asn_DEF_RICserviceQuery_tags_1) + /sizeof(asn_DEF_RICserviceQuery_tags_1[0]), /* 1 */ + asn_DEF_RICserviceQuery_tags_1, /* Same as above */ + sizeof(asn_DEF_RICserviceQuery_tags_1) + /sizeof(asn_DEF_RICserviceQuery_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceQuery_1, + 1, /* Elements count */ + &asn_SPC_RICserviceQuery_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICserviceUpdate.c b/Bouncer/e2ap/lib/RICserviceUpdate.c new file mode 100644 index 0000000..a562e2f --- /dev/null +++ b/Bouncer/e2ap/lib/RICserviceUpdate.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICserviceUpdate.h" + +static asn_TYPE_member_t asn_MBR_RICserviceUpdate_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P16, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdate_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_specs_1 = { + sizeof(struct RICserviceUpdate), + offsetof(struct RICserviceUpdate, _asn_ctx), + asn_MAP_RICserviceUpdate_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate = { + "RICserviceUpdate", + "RICserviceUpdate", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceUpdate_tags_1, + sizeof(asn_DEF_RICserviceUpdate_tags_1) + /sizeof(asn_DEF_RICserviceUpdate_tags_1[0]), /* 1 */ + asn_DEF_RICserviceUpdate_tags_1, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdate_tags_1) + /sizeof(asn_DEF_RICserviceUpdate_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceUpdate_1, + 1, /* Elements count */ + &asn_SPC_RICserviceUpdate_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICserviceUpdateAcknowledge.c b/Bouncer/e2ap/lib/RICserviceUpdateAcknowledge.c new file mode 100644 index 0000000..845acb2 --- /dev/null +++ b/Bouncer/e2ap/lib/RICserviceUpdateAcknowledge.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICserviceUpdateAcknowledge.h" + +static asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P17, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateAcknowledge_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_specs_1 = { + sizeof(struct RICserviceUpdateAcknowledge), + offsetof(struct RICserviceUpdateAcknowledge, _asn_ctx), + asn_MAP_RICserviceUpdateAcknowledge_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge = { + "RICserviceUpdateAcknowledge", + "RICserviceUpdateAcknowledge", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceUpdateAcknowledge_tags_1, + sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1) + /sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1[0]), /* 1 */ + asn_DEF_RICserviceUpdateAcknowledge_tags_1, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1) + /sizeof(asn_DEF_RICserviceUpdateAcknowledge_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceUpdateAcknowledge_1, + 1, /* Elements count */ + &asn_SPC_RICserviceUpdateAcknowledge_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICserviceUpdateFailure.c b/Bouncer/e2ap/lib/RICserviceUpdateFailure.c new file mode 100644 index 0000000..f54da69 --- /dev/null +++ b/Bouncer/e2ap/lib/RICserviceUpdateFailure.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICserviceUpdateFailure.h" + +static asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P18, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateFailure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_specs_1 = { + sizeof(struct RICserviceUpdateFailure), + offsetof(struct RICserviceUpdateFailure, _asn_ctx), + asn_MAP_RICserviceUpdateFailure_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure = { + "RICserviceUpdateFailure", + "RICserviceUpdateFailure", + &asn_OP_SEQUENCE, + asn_DEF_RICserviceUpdateFailure_tags_1, + sizeof(asn_DEF_RICserviceUpdateFailure_tags_1) + /sizeof(asn_DEF_RICserviceUpdateFailure_tags_1[0]), /* 1 */ + asn_DEF_RICserviceUpdateFailure_tags_1, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdateFailure_tags_1) + /sizeof(asn_DEF_RICserviceUpdateFailure_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICserviceUpdateFailure_1, + 1, /* Elements count */ + &asn_SPC_RICserviceUpdateFailure_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubscriptionDeleteFailure.c b/Bouncer/e2ap/lib/RICsubscriptionDeleteFailure.c new file mode 100644 index 0000000..88a9836 --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubscriptionDeleteFailure.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubscriptionDeleteFailure.h" + +static asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P5, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteFailure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_specs_1 = { + sizeof(struct RICsubscriptionDeleteFailure), + offsetof(struct RICsubscriptionDeleteFailure, _asn_ctx), + asn_MAP_RICsubscriptionDeleteFailure_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure = { + "RICsubscriptionDeleteFailure", + "RICsubscriptionDeleteFailure", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDeleteFailure_tags_1, + sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteFailure_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteFailure_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionDeleteFailure_1, + 1, /* Elements count */ + &asn_SPC_RICsubscriptionDeleteFailure_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubscriptionDeleteRequest.c b/Bouncer/e2ap/lib/RICsubscriptionDeleteRequest.c new file mode 100644 index 0000000..627f516 --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubscriptionDeleteRequest.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubscriptionDeleteRequest.h" + +static asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_specs_1 = { + sizeof(struct RICsubscriptionDeleteRequest), + offsetof(struct RICsubscriptionDeleteRequest, _asn_ctx), + asn_MAP_RICsubscriptionDeleteRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest = { + "RICsubscriptionDeleteRequest", + "RICsubscriptionDeleteRequest", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDeleteRequest_tags_1, + sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteRequest_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionDeleteRequest_1, + 1, /* Elements count */ + &asn_SPC_RICsubscriptionDeleteRequest_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubscriptionDeleteResponse.c b/Bouncer/e2ap/lib/RICsubscriptionDeleteResponse.c new file mode 100644 index 0000000..fc0f72d --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubscriptionDeleteResponse.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubscriptionDeleteResponse.h" + +static asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P4, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_specs_1 = { + sizeof(struct RICsubscriptionDeleteResponse), + offsetof(struct RICsubscriptionDeleteResponse, _asn_ctx), + asn_MAP_RICsubscriptionDeleteResponse_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse = { + "RICsubscriptionDeleteResponse", + "RICsubscriptionDeleteResponse", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDeleteResponse_tags_1, + sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteResponse_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionDeleteResponse_1, + 1, /* Elements count */ + &asn_SPC_RICsubscriptionDeleteResponse_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubscriptionDetails.c b/Bouncer/e2ap/lib/RICsubscriptionDetails.c new file mode 100644 index 0000000..9033dc2 --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubscriptionDetails.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubscriptionDetails.h" + +asn_TYPE_member_t asn_MBR_RICsubscriptionDetails_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDetails, ricEventTriggerDefinition), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICeventTriggerDefinition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricEventTriggerDefinition" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDetails, ricAction_ToBeSetup_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICactions_ToBeSetup_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricAction-ToBeSetup-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDetails_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDetails_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricEventTriggerDefinition */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ricAction-ToBeSetup-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDetails_specs_1 = { + sizeof(struct RICsubscriptionDetails), + offsetof(struct RICsubscriptionDetails, _asn_ctx), + asn_MAP_RICsubscriptionDetails_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDetails = { + "RICsubscriptionDetails", + "RICsubscriptionDetails", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDetails_tags_1, + sizeof(asn_DEF_RICsubscriptionDetails_tags_1) + /sizeof(asn_DEF_RICsubscriptionDetails_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionDetails_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDetails_tags_1) + /sizeof(asn_DEF_RICsubscriptionDetails_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionDetails_1, + 2, /* Elements count */ + &asn_SPC_RICsubscriptionDetails_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubscriptionFailure.c b/Bouncer/e2ap/lib/RICsubscriptionFailure.c new file mode 100644 index 0000000..f765319 --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubscriptionFailure.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubscriptionFailure.h" + +static asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionFailure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_specs_1 = { + sizeof(struct RICsubscriptionFailure), + offsetof(struct RICsubscriptionFailure, _asn_ctx), + asn_MAP_RICsubscriptionFailure_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure = { + "RICsubscriptionFailure", + "RICsubscriptionFailure", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionFailure_tags_1, + sizeof(asn_DEF_RICsubscriptionFailure_tags_1) + /sizeof(asn_DEF_RICsubscriptionFailure_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionFailure_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionFailure_tags_1) + /sizeof(asn_DEF_RICsubscriptionFailure_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionFailure_1, + 1, /* Elements count */ + &asn_SPC_RICsubscriptionFailure_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubscriptionRequest.c b/Bouncer/e2ap/lib/RICsubscriptionRequest.c new file mode 100644 index 0000000..46c4fe8 --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubscriptionRequest.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubscriptionRequest.h" + +static asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P0, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_specs_1 = { + sizeof(struct RICsubscriptionRequest), + offsetof(struct RICsubscriptionRequest, _asn_ctx), + asn_MAP_RICsubscriptionRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest = { + "RICsubscriptionRequest", + "RICsubscriptionRequest", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionRequest_tags_1, + sizeof(asn_DEF_RICsubscriptionRequest_tags_1) + /sizeof(asn_DEF_RICsubscriptionRequest_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionRequest_tags_1) + /sizeof(asn_DEF_RICsubscriptionRequest_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionRequest_1, + 1, /* Elements count */ + &asn_SPC_RICsubscriptionRequest_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubscriptionResponse.c b/Bouncer/e2ap/lib/RICsubscriptionResponse.c new file mode 100644 index 0000000..56c92ae --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubscriptionResponse.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubscriptionResponse.h" + +static asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_specs_1 = { + sizeof(struct RICsubscriptionResponse), + offsetof(struct RICsubscriptionResponse, _asn_ctx), + asn_MAP_RICsubscriptionResponse_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse = { + "RICsubscriptionResponse", + "RICsubscriptionResponse", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionResponse_tags_1, + sizeof(asn_DEF_RICsubscriptionResponse_tags_1) + /sizeof(asn_DEF_RICsubscriptionResponse_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionResponse_tags_1) + /sizeof(asn_DEF_RICsubscriptionResponse_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubscriptionResponse_1, + 1, /* Elements count */ + &asn_SPC_RICsubscriptionResponse_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubsequentAction.c b/Bouncer/e2ap/lib/RICsubsequentAction.c new file mode 100644 index 0000000..8b3248c --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubsequentAction.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubsequentAction.h" + +asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubsequentAction, ricSubsequentActionType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICsubsequentActionType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricSubsequentActionType" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubsequentAction, ricTimeToWait), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICtimeToWait, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ricTimeToWait" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubsequentAction_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubsequentAction_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricSubsequentActionType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ricTimeToWait */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubsequentAction_specs_1 = { + sizeof(struct RICsubsequentAction), + offsetof(struct RICsubsequentAction, _asn_ctx), + asn_MAP_RICsubsequentAction_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubsequentAction = { + "RICsubsequentAction", + "RICsubsequentAction", + &asn_OP_SEQUENCE, + asn_DEF_RICsubsequentAction_tags_1, + sizeof(asn_DEF_RICsubsequentAction_tags_1) + /sizeof(asn_DEF_RICsubsequentAction_tags_1[0]), /* 1 */ + asn_DEF_RICsubsequentAction_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubsequentAction_tags_1) + /sizeof(asn_DEF_RICsubsequentAction_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RICsubsequentAction_1, + 2, /* Elements count */ + &asn_SPC_RICsubsequentAction_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICsubsequentActionType.c b/Bouncer/e2ap/lib/RICsubsequentActionType.c new file mode 100644 index 0000000..f88a331 --- /dev/null +++ b/Bouncer/e2ap/lib/RICsubsequentActionType.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICsubsequentActionType.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICsubsequentActionType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RICsubsequentActionType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RICsubsequentActionType_value2enum_1[] = { + { 0, 8, "continue" }, + { 1, 4, "wait" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RICsubsequentActionType_enum2value_1[] = { + 0, /* continue(0) */ + 1 /* wait(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RICsubsequentActionType_specs_1 = { + asn_MAP_RICsubsequentActionType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RICsubsequentActionType_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RICsubsequentActionType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICsubsequentActionType = { + "RICsubsequentActionType", + "RICsubsequentActionType", + &asn_OP_NativeEnumerated, + asn_DEF_RICsubsequentActionType_tags_1, + sizeof(asn_DEF_RICsubsequentActionType_tags_1) + /sizeof(asn_DEF_RICsubsequentActionType_tags_1[0]), /* 1 */ + asn_DEF_RICsubsequentActionType_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubsequentActionType_tags_1) + /sizeof(asn_DEF_RICsubsequentActionType_tags_1[0]), /* 1 */ + { &asn_OER_type_RICsubsequentActionType_constr_1, &asn_PER_type_RICsubsequentActionType_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RICsubsequentActionType_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/RICtimeToWait.c b/Bouncer/e2ap/lib/RICtimeToWait.c new file mode 100644 index 0000000..94fc184 --- /dev/null +++ b/Bouncer/e2ap/lib/RICtimeToWait.c @@ -0,0 +1,90 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RICtimeToWait.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RICtimeToWait_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RICtimeToWait_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 5, 5, 0, 17 } /* (0..17,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RICtimeToWait_value2enum_1[] = { + { 0, 4, "zero" }, + { 1, 4, "w1ms" }, + { 2, 4, "w2ms" }, + { 3, 4, "w5ms" }, + { 4, 5, "w10ms" }, + { 5, 5, "w20ms" }, + { 6, 5, "w30ms" }, + { 7, 5, "w40ms" }, + { 8, 5, "w50ms" }, + { 9, 6, "w100ms" }, + { 10, 6, "w200ms" }, + { 11, 6, "w500ms" }, + { 12, 3, "w1s" }, + { 13, 3, "w2s" }, + { 14, 3, "w5s" }, + { 15, 4, "w10s" }, + { 16, 4, "w20s" }, + { 17, 4, "w60s" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RICtimeToWait_enum2value_1[] = { + 9, /* w100ms(9) */ + 4, /* w10ms(4) */ + 15, /* w10s(15) */ + 1, /* w1ms(1) */ + 12, /* w1s(12) */ + 10, /* w200ms(10) */ + 5, /* w20ms(5) */ + 16, /* w20s(16) */ + 2, /* w2ms(2) */ + 13, /* w2s(13) */ + 6, /* w30ms(6) */ + 7, /* w40ms(7) */ + 11, /* w500ms(11) */ + 8, /* w50ms(8) */ + 3, /* w5ms(3) */ + 14, /* w5s(14) */ + 17, /* w60s(17) */ + 0 /* zero(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RICtimeToWait_specs_1 = { + asn_MAP_RICtimeToWait_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RICtimeToWait_enum2value_1, /* N => "tag"; sorted by N */ + 18, /* Number of elements in the maps */ + 19, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RICtimeToWait_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RICtimeToWait = { + "RICtimeToWait", + "RICtimeToWait", + &asn_OP_NativeEnumerated, + asn_DEF_RICtimeToWait_tags_1, + sizeof(asn_DEF_RICtimeToWait_tags_1) + /sizeof(asn_DEF_RICtimeToWait_tags_1[0]), /* 1 */ + asn_DEF_RICtimeToWait_tags_1, /* Same as above */ + sizeof(asn_DEF_RICtimeToWait_tags_1) + /sizeof(asn_DEF_RICtimeToWait_tags_1[0]), /* 1 */ + { &asn_OER_type_RICtimeToWait_constr_1, &asn_PER_type_RICtimeToWait_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RICtimeToWait_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ResetRequest.c b/Bouncer/e2ap/lib/ResetRequest.c new file mode 100644 index 0000000..f40779f --- /dev/null +++ b/Bouncer/e2ap/lib/ResetRequest.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ResetRequest.h" + +static asn_TYPE_member_t asn_MBR_ResetRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetRequest, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P14, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_ResetRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ResetRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ResetRequest_specs_1 = { + sizeof(struct ResetRequest), + offsetof(struct ResetRequest, _asn_ctx), + asn_MAP_ResetRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ResetRequest = { + "ResetRequest", + "ResetRequest", + &asn_OP_SEQUENCE, + asn_DEF_ResetRequest_tags_1, + sizeof(asn_DEF_ResetRequest_tags_1) + /sizeof(asn_DEF_ResetRequest_tags_1[0]), /* 1 */ + asn_DEF_ResetRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_ResetRequest_tags_1) + /sizeof(asn_DEF_ResetRequest_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ResetRequest_1, + 1, /* Elements count */ + &asn_SPC_ResetRequest_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/ResetResponse.c b/Bouncer/e2ap/lib/ResetResponse.c new file mode 100644 index 0000000..47c433a --- /dev/null +++ b/Bouncer/e2ap/lib/ResetResponse.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "E2AP-PDU-Contents-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ResetResponse.h" + +static asn_TYPE_member_t asn_MBR_ResetResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetResponse, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_87P15, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_ResetResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ResetResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ResetResponse_specs_1 = { + sizeof(struct ResetResponse), + offsetof(struct ResetResponse, _asn_ctx), + asn_MAP_ResetResponse_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ResetResponse = { + "ResetResponse", + "ResetResponse", + &asn_OP_SEQUENCE, + asn_DEF_ResetResponse_tags_1, + sizeof(asn_DEF_ResetResponse_tags_1) + /sizeof(asn_DEF_ResetResponse_tags_1[0]), /* 1 */ + asn_DEF_ResetResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_ResetResponse_tags_1) + /sizeof(asn_DEF_ResetResponse_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ResetResponse_1, + 1, /* Elements count */ + &asn_SPC_ResetResponse_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/SuccessfulOutcome.c b/Bouncer/e2ap/lib/SuccessfulOutcome.c new file mode 100644 index 0000000..7328b32 --- /dev/null +++ b/Bouncer/e2ap/lib/SuccessfulOutcome.c @@ -0,0 +1,368 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "SuccessfulOutcome.h" + +static const long asn_VAL_1_id_RICsubscription = 8; +static const long asn_VAL_1_reject = 0; +static const long asn_VAL_2_id_RICsubscriptionDelete = 9; +static const long asn_VAL_2_reject = 0; +static const long asn_VAL_3_id_RICserviceUpdate = 7; +static const long asn_VAL_3_reject = 0; +static const long asn_VAL_4_id_RICcontrol = 4; +static const long asn_VAL_4_reject = 0; +static const long asn_VAL_5_id_E2setup = 1; +static const long asn_VAL_5_reject = 0; +static const long asn_VAL_6_id_Reset = 3; +static const long asn_VAL_6_reject = 0; +static const long asn_VAL_7_id_RICindication = 5; +static const long asn_VAL_7_ignore = 1; +static const long asn_VAL_8_id_RICserviceQuery = 6; +static const long asn_VAL_8_ignore = 1; +static const long asn_VAL_9_id_ErrorIndication = 2; +static const long asn_VAL_9_ignore = 1; +static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore } +}; +static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { + { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } +}; +static int +memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_SuccessfulOutcome_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; + size_t constraining_column = 3; /* &procedureCode */ + size_t for_column = 4; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SuccessfulOutcome, procedureCode)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_SuccessfulOutcome_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; + size_t constraining_column = 3; /* &procedureCode */ + size_t for_column = 1; /* &SuccessfulOutcome */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SuccessfulOutcome, procedureCode)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_oer_constraints_t asn_OER_memb_procedureCode_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_value_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICsubscriptionResponse), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionResponse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICsubscriptionResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICsubscriptionDeleteResponse), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteResponse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICsubscriptionDeleteResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICserviceUpdateAcknowledge), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceUpdateAcknowledge, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICserviceUpdateAcknowledge" + }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICcontrolAcknowledge), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICcontrolAcknowledge, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolAcknowledge" + }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.E2setupResponse), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2setupResponse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "E2setupResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.ResetResponse), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ResetResponse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ResetResponse" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 5 }, /* RICsubscriptionResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 4 }, /* RICsubscriptionDeleteResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 3 }, /* RICserviceUpdateAcknowledge */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 2 }, /* RICcontrolAcknowledge */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 1 }, /* E2setupResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 0 } /* ResetResponse */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { + sizeof(struct SuccessfulOutcome__value), + offsetof(struct SuccessfulOutcome__value, _asn_ctx), + offsetof(struct SuccessfulOutcome__value, present), + sizeof(((struct SuccessfulOutcome__value *)0)->present), + asn_MAP_value_tag2el_4, + 6, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_4 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_4, + 6, /* Elements count */ + &asn_SPC_value_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, procedureCode), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProcedureCode, + 0, + { &asn_OER_memb_procedureCode_constr_2, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 }, + 0, 0, /* No default value */ + "procedureCode" + }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, criticality), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Criticality, + select_SuccessfulOutcome_criticality_type, + { &asn_OER_memb_criticality_constr_3, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, value), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_value_4, + select_SuccessfulOutcome_value_type, + { &asn_OER_memb_value_constr_4, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_SuccessfulOutcome_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SuccessfulOutcome_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SuccessfulOutcome_specs_1 = { + sizeof(struct SuccessfulOutcome), + offsetof(struct SuccessfulOutcome, _asn_ctx), + asn_MAP_SuccessfulOutcome_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SuccessfulOutcome = { + "SuccessfulOutcome", + "SuccessfulOutcome", + &asn_OP_SEQUENCE, + asn_DEF_SuccessfulOutcome_tags_1, + sizeof(asn_DEF_SuccessfulOutcome_tags_1) + /sizeof(asn_DEF_SuccessfulOutcome_tags_1[0]), /* 1 */ + asn_DEF_SuccessfulOutcome_tags_1, /* Same as above */ + sizeof(asn_DEF_SuccessfulOutcome_tags_1) + /sizeof(asn_DEF_SuccessfulOutcome_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SuccessfulOutcome_1, + 3, /* Elements count */ + &asn_SPC_SuccessfulOutcome_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/TimeToWait.c b/Bouncer/e2ap/lib/TimeToWait.c new file mode 100644 index 0000000..a969d55 --- /dev/null +++ b/Bouncer/e2ap/lib/TimeToWait.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "TimeToWait.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_TimeToWait_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_TimeToWait_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_TimeToWait_value2enum_1[] = { + { 0, 3, "v1s" }, + { 1, 3, "v2s" }, + { 2, 3, "v5s" }, + { 3, 4, "v10s" }, + { 4, 4, "v20s" }, + { 5, 4, "v60s" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_TimeToWait_enum2value_1[] = { + 3, /* v10s(3) */ + 0, /* v1s(0) */ + 4, /* v20s(4) */ + 1, /* v2s(1) */ + 2, /* v5s(2) */ + 5 /* v60s(5) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_TimeToWait_specs_1 = { + asn_MAP_TimeToWait_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_TimeToWait_enum2value_1, /* N => "tag"; sorted by N */ + 6, /* Number of elements in the maps */ + 7, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_TimeToWait_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_TimeToWait = { + "TimeToWait", + "TimeToWait", + &asn_OP_NativeEnumerated, + asn_DEF_TimeToWait_tags_1, + sizeof(asn_DEF_TimeToWait_tags_1) + /sizeof(asn_DEF_TimeToWait_tags_1[0]), /* 1 */ + asn_DEF_TimeToWait_tags_1, /* Same as above */ + sizeof(asn_DEF_TimeToWait_tags_1) + /sizeof(asn_DEF_TimeToWait_tags_1[0]), /* 1 */ + { &asn_OER_type_TimeToWait_constr_1, &asn_PER_type_TimeToWait_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_TimeToWait_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/TriggeringMessage.c b/Bouncer/e2ap/lib/TriggeringMessage.c new file mode 100644 index 0000000..7d1dbe8 --- /dev/null +++ b/Bouncer/e2ap/lib/TriggeringMessage.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-CommonDataTypes" + * found in "E2AP-CommonDataTypes-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "TriggeringMessage.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_TriggeringMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_TriggeringMessage_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_TriggeringMessage_value2enum_1[] = { + { 0, 18, "initiating-message" }, + { 1, 18, "successful-outcome" }, + { 2, 21, "unsuccessfull-outcome" } +}; +static const unsigned int asn_MAP_TriggeringMessage_enum2value_1[] = { + 0, /* initiating-message(0) */ + 1, /* successful-outcome(1) */ + 2 /* unsuccessfull-outcome(2) */ +}; +const asn_INTEGER_specifics_t asn_SPC_TriggeringMessage_specs_1 = { + asn_MAP_TriggeringMessage_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_TriggeringMessage_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 0, /* Enumeration is not extensible */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_TriggeringMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_TriggeringMessage = { + "TriggeringMessage", + "TriggeringMessage", + &asn_OP_NativeEnumerated, + asn_DEF_TriggeringMessage_tags_1, + sizeof(asn_DEF_TriggeringMessage_tags_1) + /sizeof(asn_DEF_TriggeringMessage_tags_1[0]), /* 1 */ + asn_DEF_TriggeringMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_TriggeringMessage_tags_1) + /sizeof(asn_DEF_TriggeringMessage_tags_1[0]), /* 1 */ + { &asn_OER_type_TriggeringMessage_constr_1, &asn_PER_type_TriggeringMessage_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_TriggeringMessage_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/TypeOfError.c b/Bouncer/e2ap/lib/TypeOfError.c new file mode 100644 index 0000000..e37ab6b --- /dev/null +++ b/Bouncer/e2ap/lib/TypeOfError.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "E2AP-IEs-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "TypeOfError.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_TypeOfError_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_TypeOfError_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_TypeOfError_value2enum_1[] = { + { 0, 14, "not-understood" }, + { 1, 7, "missing" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_TypeOfError_enum2value_1[] = { + 1, /* missing(1) */ + 0 /* not-understood(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_TypeOfError_specs_1 = { + asn_MAP_TypeOfError_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_TypeOfError_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_TypeOfError_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_TypeOfError = { + "TypeOfError", + "TypeOfError", + &asn_OP_NativeEnumerated, + asn_DEF_TypeOfError_tags_1, + sizeof(asn_DEF_TypeOfError_tags_1) + /sizeof(asn_DEF_TypeOfError_tags_1[0]), /* 1 */ + asn_DEF_TypeOfError_tags_1, /* Same as above */ + sizeof(asn_DEF_TypeOfError_tags_1) + /sizeof(asn_DEF_TypeOfError_tags_1[0]), /* 1 */ + { &asn_OER_type_TypeOfError_constr_1, &asn_PER_type_TypeOfError_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_TypeOfError_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2ap/lib/UnsuccessfulOutcome.c b/Bouncer/e2ap/lib/UnsuccessfulOutcome.c new file mode 100644 index 0000000..5c85aa8 --- /dev/null +++ b/Bouncer/e2ap/lib/UnsuccessfulOutcome.c @@ -0,0 +1,358 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Descriptions" + * found in "E2AP-PDU-Descriptions-v01.00.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "UnsuccessfulOutcome.h" + +static const long asn_VAL_1_id_RICsubscription = 8; +static const long asn_VAL_1_reject = 0; +static const long asn_VAL_2_id_RICsubscriptionDelete = 9; +static const long asn_VAL_2_reject = 0; +static const long asn_VAL_3_id_RICserviceUpdate = 7; +static const long asn_VAL_3_reject = 0; +static const long asn_VAL_4_id_RICcontrol = 4; +static const long asn_VAL_4_reject = 0; +static const long asn_VAL_5_id_E2setup = 1; +static const long asn_VAL_5_reject = 0; +static const long asn_VAL_6_id_Reset = 3; +static const long asn_VAL_6_reject = 0; +static const long asn_VAL_7_id_RICindication = 5; +static const long asn_VAL_7_ignore = 1; +static const long asn_VAL_8_id_RICserviceQuery = 6; +static const long asn_VAL_8_ignore = 1; +static const long asn_VAL_9_id_ErrorIndication = 2; +static const long asn_VAL_9_ignore = 1; +static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore } +}; +static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { + { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } +}; +static int +memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_type_selector_result_t +select_UnsuccessfulOutcome_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; + size_t constraining_column = 3; /* &procedureCode */ + size_t for_column = 4; /* &criticality */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct UnsuccessfulOutcome, procedureCode)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_type_selector_result_t +select_UnsuccessfulOutcome_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1; + size_t constraining_column = 3; /* &procedureCode */ + size_t for_column = 2; /* &UnsuccessfulOutcome */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct UnsuccessfulOutcome, procedureCode)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +static asn_oer_constraints_t asn_OER_memb_procedureCode_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_value_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionFailure), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionFailure, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICsubscriptionFailure" + }, + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionDeleteFailure), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteFailure, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICsubscriptionDeleteFailure" + }, + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICserviceUpdateFailure), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICserviceUpdateFailure, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICserviceUpdateFailure" + }, + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICcontrolFailure), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICcontrolFailure, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "RICcontrolFailure" + }, + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2setupFailure), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2setupFailure, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "E2setupFailure" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 4 }, /* RICsubscriptionFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 3 }, /* RICsubscriptionDeleteFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 2 }, /* RICserviceUpdateFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 1 }, /* RICcontrolFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 0 } /* E2setupFailure */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { + sizeof(struct UnsuccessfulOutcome__value), + offsetof(struct UnsuccessfulOutcome__value, _asn_ctx), + offsetof(struct UnsuccessfulOutcome__value, present), + sizeof(((struct UnsuccessfulOutcome__value *)0)->present), + asn_MAP_value_tag2el_4, + 5, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_value_4 = { + "value", + "value", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, 0, OPEN_TYPE_constraint }, + asn_MBR_value_4, + 5, /* Elements count */ + &asn_SPC_value_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, procedureCode), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProcedureCode, + 0, + { &asn_OER_memb_procedureCode_constr_2, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 }, + 0, 0, /* No default value */ + "procedureCode" + }, + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, criticality), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Criticality, + select_UnsuccessfulOutcome_criticality_type, + { &asn_OER_memb_criticality_constr_3, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, value), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_value_4, + select_UnsuccessfulOutcome_value_type, + { &asn_OER_memb_value_constr_4, &asn_PER_memb_value_constr_4, memb_value_constraint_1 }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_UnsuccessfulOutcome_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UnsuccessfulOutcome_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UnsuccessfulOutcome_specs_1 = { + sizeof(struct UnsuccessfulOutcome), + offsetof(struct UnsuccessfulOutcome, _asn_ctx), + asn_MAP_UnsuccessfulOutcome_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UnsuccessfulOutcome = { + "UnsuccessfulOutcome", + "UnsuccessfulOutcome", + &asn_OP_SEQUENCE, + asn_DEF_UnsuccessfulOutcome_tags_1, + sizeof(asn_DEF_UnsuccessfulOutcome_tags_1) + /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */ + asn_DEF_UnsuccessfulOutcome_tags_1, /* Same as above */ + sizeof(asn_DEF_UnsuccessfulOutcome_tags_1) + /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UnsuccessfulOutcome_1, + 3, /* Elements count */ + &asn_SPC_UnsuccessfulOutcome_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/asn1c_defs/asn_SEQUENCE_OF.c b/Bouncer/e2ap/lib/asn_SEQUENCE_OF.c similarity index 100% rename from Bouncer/asn1c_defs/asn_SEQUENCE_OF.c rename to Bouncer/e2ap/lib/asn_SEQUENCE_OF.c diff --git a/Bouncer/asn1c_defs/asn_SET_OF.c b/Bouncer/e2ap/lib/asn_SET_OF.c similarity index 100% rename from Bouncer/asn1c_defs/asn_SET_OF.c rename to Bouncer/e2ap/lib/asn_SET_OF.c diff --git a/Bouncer/asn1c_defs/asn_application.c b/Bouncer/e2ap/lib/asn_application.c similarity index 100% rename from Bouncer/asn1c_defs/asn_application.c rename to Bouncer/e2ap/lib/asn_application.c diff --git a/Bouncer/asn1c_defs/asn_bit_data.c b/Bouncer/e2ap/lib/asn_bit_data.c similarity index 100% rename from Bouncer/asn1c_defs/asn_bit_data.c rename to Bouncer/e2ap/lib/asn_bit_data.c diff --git a/Bouncer/asn1c_defs/asn_codecs_prim.c b/Bouncer/e2ap/lib/asn_codecs_prim.c similarity index 100% rename from Bouncer/asn1c_defs/asn_codecs_prim.c rename to Bouncer/e2ap/lib/asn_codecs_prim.c diff --git a/Bouncer/asn1c_defs/asn_internal.c b/Bouncer/e2ap/lib/asn_internal.c similarity index 100% rename from Bouncer/asn1c_defs/asn_internal.c rename to Bouncer/e2ap/lib/asn_internal.c diff --git a/Bouncer/asn1c_defs/asn_random_fill.c b/Bouncer/e2ap/lib/asn_random_fill.c similarity index 100% rename from Bouncer/asn1c_defs/asn_random_fill.c rename to Bouncer/e2ap/lib/asn_random_fill.c diff --git a/Bouncer/asn1c_defs/ber_decoder.c b/Bouncer/e2ap/lib/ber_decoder.c similarity index 100% rename from Bouncer/asn1c_defs/ber_decoder.c rename to Bouncer/e2ap/lib/ber_decoder.c diff --git a/Bouncer/asn1c_defs/ber_tlv_length.c b/Bouncer/e2ap/lib/ber_tlv_length.c similarity index 100% rename from Bouncer/asn1c_defs/ber_tlv_length.c rename to Bouncer/e2ap/lib/ber_tlv_length.c diff --git a/Bouncer/asn1c_defs/ber_tlv_tag.c b/Bouncer/e2ap/lib/ber_tlv_tag.c similarity index 100% rename from Bouncer/asn1c_defs/ber_tlv_tag.c rename to Bouncer/e2ap/lib/ber_tlv_tag.c diff --git a/Bouncer/e2ap/lib/constr_CHOICE.c b/Bouncer/e2ap/lib/constr_CHOICE.c new file mode 100644 index 0000000..86dcbb0 --- /dev/null +++ b/Bouncer/e2ap/lib/constr_CHOICE.c @@ -0,0 +1,1533 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num;\ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * See the definitions. + */ +static unsigned _fetch_present_idx(const void *struct_ptr, unsigned off, + unsigned size); +static void _set_present_idx(void *sptr, unsigned offset, unsigned size, + unsigned pres); +static const void *_get_member_ptr(const asn_TYPE_descriptor_t *, + const void *sptr, asn_TYPE_member_t **elm, + unsigned *present); + +/* + * Tags are canonically sorted in the tag to member table. + */ +static int +_search4tag(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) + return 0; + else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + +/* + * The decoder of the CHOICE type. + */ +asn_dec_rval_t +CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + ssize_t tag_len; /* Length of TLV's T */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + ASN_DEBUG("Decoding %s as CHOICE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + if(tag_mode || td->tags_count) { + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, -1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) { + /* ?Substracted below! */ + ctx->left += rval.consumed; + } + ADVANCE(rval.consumed); + } else { + ctx->left = -1; + } + + NEXT_PHASE(ctx); + + ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", + (long)ctx->left, (long)size); + + /* Fall through */ + case 1: + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + ASN_DEBUG("In %s CHOICE tag length %d", td->name, (int)tag_len); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + do { + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key; + + key.el_tag = tlv_tag; + t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, + specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _search4tag); + if(t2m) { + /* + * Found the element corresponding to the tag. + */ + NEXT_PHASE(ctx); + ctx->step = t2m->el_no; + break; + } else if(specs->ext_start == -1) { + ASN_DEBUG("Unexpected tag %s " + "in non-extensible CHOICE %s", + ber_tlv_tag_string(tlv_tag), td->name); + RETURN(RC_FAIL); + } else { + /* Skip this tag */ + ssize_t skip; + + ASN_DEBUG("Skipping unknown tag %s", + ber_tlv_tag_string(tlv_tag)); + + skip = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tag_len, + LEFT - tag_len); + + switch(skip) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(skip + tag_len); + RETURN(RC_OK); + } + } while(0); + + case 2: + /* + * PHASE 2. + * Read in the element. + */ + do { + asn_TYPE_member_t *elm;/* CHOICE's element */ + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + elm = &elements[ctx->step]; + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + /* Set presence to be able to free it properly at any time */ + _set_present_idx(st, specs->pres_offset, + specs->pres_size, ctx->step + 1); + /* + * Invoke the member fetch routine according to member's type + */ + rval = elm->type->op->ber_decoder(opt_codec_ctx, elm->type, + memb_ptr2, ptr, LEFT, elm->tag_mode); + switch(rval.code) { + case RC_OK: + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + RETURN(RC_FAIL); + case RC_FAIL: /* Fatal error */ + RETURN(rval.code); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } while(0); + + NEXT_PHASE(ctx); + + /* Fall through */ + case 3: + ASN_DEBUG("CHOICE %s Leftover: %ld, size = %ld, tm=%d, tc=%d", + td->name, (long)ctx->left, (long)size, + tag_mode, td->tags_count); + + if(ctx->left > 0) { + /* + * The type must be fully decoded + * by the CHOICE member-specific decoder. + */ + RETURN(RC_FAIL); + } + + if(ctx->left == -1 + && !(tag_mode || td->tags_count)) { + /* + * This is an untagged CHOICE. + * It doesn't contain nothing + * except for the member itself, including all its tags. + * The decoding is completed. + */ + NEXT_PHASE(ctx); + break; + } + + /* + * Read in the "end of data chunks"'s. + */ + while(ctx->left < 0) { + ssize_t tl; + + tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tl) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + /* + * Expected <0><0>... + */ + if(((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Correctly finished with <0><0>. + */ + ADVANCE(2); + ctx->left++; + continue; + } + } else { + ASN_DEBUG("Unexpected continuation in %s", + td->name); + RETURN(RC_FAIL); + } + + /* UNREACHABLE */ + } + + NEXT_PHASE(ctx); + case 4: + /* No meaningful work here */ + break; + } + + RETURN(RC_OK); +} + +asn_enc_rval_t +CHOICE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE element */ + asn_enc_rval_t erval = {0,0,0}; + const void *memb_ptr; + size_t computed_size = 0; + unsigned present; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("%s %s as CHOICE", + cb?"Encoding":"Estimating", td->name); + + present = _fetch_present_idx(sptr, + specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present == 0 || present > td->elements_count) { + if(present == 0 && td->elements_count == 0) { + /* The CHOICE is empty?! */ + erval.encoded = 0; + ASN__ENCODED_OK(erval); + } + ASN__ENCODE_FAILED; + } + + /* + * Seek over the present member of the structure. + */ + elm = &td->elements[present-1]; + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(memb_ptr == 0) { + if(elm->optional) { + erval.encoded = 0; + ASN__ENCODED_OK(erval); + } + /* Mandatory element absent */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* + * If the CHOICE itself is tagged EXPLICIT: + * T ::= [2] EXPLICIT CHOICE { ... } + * Then emit the appropriate tags. + */ + if(tag_mode == 1 || td->tags_count) { + /* + * For this, we need to pre-compute the member. + */ + ssize_t ret; + + /* Encode member with its tag */ + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + elm->tag_mode, elm->tag, 0, 0); + if(erval.encoded == -1) + return erval; + + /* Encode CHOICE with parent or my own tag */ + ret = der_write_tags(td, erval.encoded, tag_mode, 1, tag, + cb, app_key); + if(ret == -1) + ASN__ENCODE_FAILED; + computed_size += ret; + } + + /* + * Encode the single underlying member. + */ + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + elm->tag_mode, elm->tag, cb, app_key); + if(erval.encoded == -1) + return erval; + + ASN_DEBUG("Encoded CHOICE member in %ld bytes (+%ld)", + (long)erval.encoded, (long)computed_size); + + erval.encoded += computed_size; + + return erval; +} + +ber_tlv_tag_t +CHOICE_outmost_tag(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + assert(tag_mode == 0); (void)tag_mode; + assert(tag == 0); (void)tag; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); + + if(present > 0 && present <= td->elements_count) { + const asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *) + ((const char *)ptr + elm->memb_offset); + } else { + memb_ptr = (const void *) + ((const char *)ptr + elm->memb_offset); + } + + return asn_TYPE_outmost_tag(elm->type, memb_ptr, + elm->tag_mode, elm->tag); + } else { + return (ber_tlv_tag_t)-1; + } +} + +int +CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) + return 0; + ASN__CTFAIL(app_key, td, sptr, + "%s: mandatory CHOICE element %s absent (%s:%d)", + td->name, elm->name, __FILE__, __LINE__); + return -1; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(elm->encoding_constraints.general_constraints) { + return elm->encoding_constraints.general_constraints(elm->type, memb_ptr, + ctfailcb, app_key); + } else { + return elm->type->encoding_constraints.general_constraints(elm->type, + memb_ptr, ctfailcb, app_key); + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: no CHOICE element given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + buf_ptr = (const void *)(((const char *)buf_ptr) + num); \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +CHOICE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval; /* Return value of a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* Element index */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + if(ctx->phase == 0 && !*xml_tag) + ctx->phase = 1; /* Skip the outer tag checking phase */ + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + * Phase 3: Only waiting for closing tag. + * Phase 4: Skipping unknown extensions. + * Phase 5: PHASED OUT + */ + for(edx = ctx->step; ctx->phase <= 4;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + asn_TYPE_member_t *elm; + + /* + * Go inside the member. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + unsigned old_present; + + elm = &td->elements[edx]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Start/Continue decoding the inner member */ + tmprval = elm->type->op->xer_decoder(opt_codec_ctx, + elm->type, memb_ptr2, elm->name, + buf_ptr, size); + XER_ADVANCE(tmprval.consumed); + ASN_DEBUG("XER/CHOICE: itdf: [%s] code=%d", + elm->type->name, tmprval.code); + old_present = _fetch_present_idx(st, + specs->pres_offset, specs->pres_size); + assert(old_present == 0 || old_present == edx + 1); + /* Record what we've got */ + _set_present_idx(st, + specs->pres_offset, specs->pres_size, edx + 1); + if(tmprval.code != RC_OK) + RETURN(tmprval.code); + ctx->phase = 3; + /* Fall through */ + } + + /* No need to wait for closing tag; special mode. */ + if(ctx->phase == 3 && !*xml_tag) { + ctx->phase = 5; /* Phase out */ + RETURN(RC_OK); + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, buf_ptr, size, &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + ASN_DEBUG("XER/CHOICE checked [%c%c%c%c] vs [%s], tcv=%d", + ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', + ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', + ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', + ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', + xml_tag, tcv); + + /* Skip the extensions section */ + if(ctx->phase == 4) { + ASN_DEBUG("skip_unknown(%d, %ld)", + tcv, (long)ctx->left); + switch(xer_skip_unknown(tcv, &ctx->left)) { + case -1: + ctx->phase = 5; + RETURN(RC_FAIL); + case 1: + ctx->phase = 3; + /* Fall through */ + case 0: + XER_ADVANCE(ch_size); + continue; + case 2: + ctx->phase = 3; + break; + } + } + + switch(tcv) { + case XCT_BOTH: + break; /* No CHOICE? */ + case XCT_CLOSING: + if(ctx->phase != 3) + break; + XER_ADVANCE(ch_size); + ctx->phase = 5; /* Phase out */ + RETURN(RC_OK); + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + if(ctx->phase != 1) + break; /* Really unexpected */ + + /* + * Search which inner member corresponds to this tag. + */ + for(edx = 0; edx < td->elements_count; edx++) { + elm = &td->elements[edx]; + tcv = xer_check_tag(buf_ptr,ch_size,elm->name); + switch(tcv) { + case XCT_BOTH: + case XCT_OPENING: + /* + * Process this member. + */ + ctx->step = edx; + ctx->phase = 2; + break; + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + continue; + default: + edx = td->elements_count; + break; /* Phase out */ + } + break; + } + if(edx != td->elements_count) + continue; + + /* It is expected extension */ + if(specs->ext_start != -1) { + ASN_DEBUG("Got anticipated extension"); + /* + * Check for (XCT_BOTH or XCT_UNKNOWN_BO) + * By using a mask. Only record a pure + * tags. + */ + if(tcv & XCT_CLOSING) { + /* Found without body */ + ctx->phase = 3; /* Terminating */ + } else { + ctx->left = 1; + ctx->phase = 4; /* Skip ...'s */ + } + XER_ADVANCE(ch_size); + continue; + } + + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag [%c%c%c%c] in CHOICE [%s]" + " (ph=%d, tag=%s)", + ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', + ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', + ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', + ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', + td->name, ctx->phase, xml_tag); + break; + } + + ctx->phase = 5; /* Phase out, just in case */ + RETURN(RC_FAIL); +} + + +asn_enc_rval_t +CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + unsigned present = 0; + + if(!sptr) + ASN__ENCODE_FAILED; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + + if(present == 0 || present > td->elements_count) { + ASN__ENCODE_FAILED; + } else { + asn_enc_rval_t tmper = {0,0,0}; + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr = NULL; + const char *mname = elm->name; + unsigned int mlen = strlen(mname); + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + er.encoded = 0; + + if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, + ilevel + 1, flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("", 1); + } + + if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +asn_dec_rval_t +CHOICE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_dec_rval_t rv; + const asn_per_constraint_t *ct; + asn_TYPE_member_t *elm; /* CHOICE's element */ + void *memb_ptr; + void **memb_ptr2; + void *st = *sptr; + int value; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) ct = 0; /* Not restricted */ + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + ASN_DEBUG("CHOICE %s got index %d in range %d", + td->name, value, ct->range_bits); + if(value > ct->upper_bound) + ASN__DECODE_FAILED; + } else { + if(specs->ext_start == -1) + ASN__DECODE_FAILED; + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->ext_start; + if((unsigned)value >= td->elements_count) + ASN__DECODE_FAILED; + } + + /* Adjust if canonical order is different from natural order */ + if(specs->from_canonical_order) { + ASN_DEBUG("CHOICE presence from wire %d", value); + value = specs->from_canonical_order[value]; + ASN_DEBUG("CHOICE presence index effective %d", value); + } + + /* Set presence to be able to free it later */ + _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); + + elm = &td->elements[value]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); + + if(ct && ct->range_bits >= 0) { + rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } else { + rv = uper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + + if(rv.code != RC_OK) + ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", + elm->name, td->name, rv.code); + return rv; +} + +asn_enc_rval_t +CHOICE_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE's element */ + const asn_per_constraint_t *ct; + const void *memb_ptr; + unsigned present; + int present_enc; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s as CHOICE", td->name); + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized properly, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present == 0 || present > td->elements_count) + ASN__ENCODE_FAILED; + else + present--; + + ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); + + /* Adjust if canonical order is different from natural order */ + if(specs->to_canonical_order) + present_enc = specs->to_canonical_order[present]; + else + present_enc = present; + + if(ct && ct->range_bits >= 0) { + if(present_enc < ct->lower_bound + || present_enc > ct->upper_bound) { + if(ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG( + "CHOICE member %d (enc %d) is an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + if(per_put_few_bits(po, 1, 1)) + ASN__ENCODE_FAILED; + } else { + ASN__ENCODE_FAILED; + } + ct = 0; + } + } + if(ct && ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + if(per_put_few_bits(po, 0, 1)) + ASN__ENCODE_FAILED; + } + + + elm = &td->elements[present]; + ASN_DEBUG("CHOICE member \"%s\" %d (as %d)", elm->name, present, + present_enc); + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, present_enc, ct->range_bits)) + ASN__ENCODE_FAILED; + + return elm->type->op->uper_encoder( + elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); + } else { + asn_enc_rval_t rval = {0,0,0}; + if(specs->ext_start == -1) ASN__ENCODE_FAILED; + if(uper_put_nsnnwn(po, present_enc - specs->ext_start)) + ASN__ENCODE_FAILED; + if(uper_open_type_put(elm->type, + elm->encoding_constraints.per_constraints, + memb_ptr, po)) + ASN__ENCODE_FAILED; + rval.encoded = 0; + ASN__ENCODED_OK(rval); + } +} + +asn_dec_rval_t +CHOICE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_dec_rval_t rv; + const asn_per_constraint_t *ct; + const asn_per_constraint_t *ext_ct = NULL; + asn_TYPE_member_t *elm; /* CHOICE's element */ + void *memb_ptr; + void **memb_ptr2; + void *st = *sptr; + int value; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) { + ext_ct = ct; + ct = 0; /* Not restricted */ + } + } + + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + ASN_DEBUG("CHOICE %s got index %d in range %d", + td->name, value, ct->range_bits); + if(value > ct->upper_bound) + ASN__DECODE_FAILED; + } else { + if(specs->ext_start == -1) + ASN__DECODE_FAILED; + value = aper_get_nsnnwn(pd, ext_ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + value += specs->ext_start; + if((unsigned)value >= td->elements_count) + ASN__DECODE_FAILED; + } + + /* Adjust if canonical order is different from natural order */ + if(specs->from_canonical_order) + value = specs->from_canonical_order[value]; + + /* Set presence to be able to free it later */ + _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); + + elm = &td->elements[value]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); + + if(ct && ct->range_bits >= 0) { + rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } else { + rv = aper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + + if(rv.code != RC_OK) + ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", + elm->name, td->name, rv.code); + return rv; +} + +asn_enc_rval_t +CHOICE_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm; /* CHOICE's element */ + const asn_per_constraint_t *ct = NULL; + const asn_per_constraint_t *ext_ct = NULL; + const void *memb_ptr; + unsigned present; + int present_enc; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s as CHOICE using ALIGNED PER", td->name); + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = NULL; + + present = _fetch_present_idx(sptr, + specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized properly, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present <= 0 || (unsigned)present > td->elements_count) + ASN__ENCODE_FAILED; + else + present--; + + /* Adjust if canonical order is different from natural order */ + if(specs->to_canonical_order) + present_enc = specs->to_canonical_order[present]; + else + present_enc = present; + + ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); + + if(ct && (ct->range_bits >= 0)) { + // Value is not within the range of the primary values ? + if(present < ct->lower_bound || present > ct->upper_bound) { + if(ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG("CHOICE member %d (enc %d) is an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + // X691/23.5 Extension marker = 1 + if(per_put_few_bits(po, 1, 1)) { + ASN__ENCODE_FAILED; + } + } else { + ASN__ENCODE_FAILED; + } + // no more need of constraint. + ext_ct = ct; + ct = NULL; + } + } + + if(ct && (ct->flags & APC_EXTENSIBLE)) { + ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", + present, present, ct->lower_bound, ct->upper_bound); + // X691.23.5 Extension marker = 0 + if(per_put_few_bits(po, 0, 1)) { + ASN__ENCODE_FAILED; + } + } + + elm = &td->elements[present]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(ct && (ct->range_bits >= 0)) { + // By construction (ct != 0), the alternative value is a non extended one. + // X691/23.7 X691/23.6 alternative value encoded as a range_bits bits value. + if(per_put_few_bits(po, present_enc, ct->range_bits)) + ASN__ENCODE_FAILED; + + return elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, + memb_ptr, po); + } else { + asn_enc_rval_t rval = {0,0,0}; + if(specs->ext_start == -1) + ASN__ENCODE_FAILED; + // X691/23.8 normally encoded as a small non negative whole number + + if(ext_ct && aper_put_nsnnwn(po, ext_ct->range_bits, present_enc - specs->ext_start)) + ASN__ENCODE_FAILED; + if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, + memb_ptr, po)) + ASN__ENCODE_FAILED; + rval.encoded = 0; + ASN__ENCODED_OK(rval); + } +} + +int +CHOICE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + + /* + * Print that element. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* Print member's name and stuff */ + if(0) { + if(cb(elm->name, strlen(elm->name), app_key) < 0 + || cb(": ", 2, app_key) < 0) + return -1; + } + + return elm->type->op->print_struct(elm->type, memb_ptr, ilevel, + cb, app_key); + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as CHOICE", td->name); + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); + + /* + * Free that element. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(void **)((char *)ptr + elm->memb_offset); + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } else { + memb_ptr = (void *)((char *)ptr + elm->memb_offset); + ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); + } + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, specs->struct_size); + break; + } +} + + +/* + * The following functions functions offer protection against -fshort-enums, + * compatible with little- and big-endian machines. + * If assertion is triggered, either disable -fshort-enums, or add an entry + * here with the ->pres_size of your target stracture. + * Unless the target structure is packed, the ".present" member + * is guaranteed to be aligned properly. ASN.1 compiler itself does not + * produce packed code. + */ +static unsigned +_fetch_present_idx(const void *struct_ptr, unsigned pres_offset, + unsigned pres_size) { + const void *present_ptr; + unsigned present; + + present_ptr = ((const char *)struct_ptr) + pres_offset; + + switch(pres_size) { + case sizeof(int): present = *(const unsigned int *)present_ptr; break; + case sizeof(short): present = *(const unsigned short *)present_ptr; break; + case sizeof(char): present = *(const unsigned char *)present_ptr; break; + default: + /* ANSI C mandates enum to be equivalent to integer */ + assert(pres_size != sizeof(int)); + return 0; /* If not aborted, pass back safe value */ + } + + return present; +} + +static void +_set_present_idx(void *struct_ptr, unsigned pres_offset, unsigned pres_size, + unsigned present) { + void *present_ptr; + present_ptr = ((char *)struct_ptr) + pres_offset; + + switch(pres_size) { + case sizeof(int): *(unsigned int *)present_ptr = present; break; + case sizeof(short): *(unsigned short *)present_ptr = present; break; + case sizeof(char): *(unsigned char *)present_ptr = present; break; + default: + /* ANSI C mandates enum to be equivalent to integer */ + assert(pres_size != sizeof(int)); + } +} + +static const void * +_get_member_ptr(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_TYPE_member_t **elm_ptr, unsigned *present_out) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) { + *elm_ptr = NULL; + *present_out = 0; + return NULL; + } + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + *present_out = present; + + /* + * The presence index is intentionally 1-based to avoid + * treating zeroed structure as a valid one. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *const elm = &td->elements[present - 1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + *elm_ptr = elm; + return memb_ptr; + } else { + *elm_ptr = NULL; + return NULL; + } + +} + +int +CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { + asn_TYPE_member_t *aelm; + asn_TYPE_member_t *belm; + unsigned apresent = 0; + unsigned bpresent = 0; + const void *amember = _get_member_ptr(td, aptr, &aelm, &apresent); + const void *bmember = _get_member_ptr(td, bptr, &belm, &bpresent); + + if(amember && bmember) { + if(apresent == bpresent) { + assert(aelm == belm); + return aelm->type->op->compare_struct(aelm->type, amember, bmember); + } else if(apresent < bpresent) { + return -1; + } else { + return 1; + } + } else if(!amember) { + return -1; + } else { + return 1; + } +} + +/* + * Return the 1-based choice variant presence index. + * Returns 0 in case of error. + */ +unsigned +CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, const void *sptr) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + return _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); +} + +/* + * Sets or resets the 1-based choice variant presence index. + * In case a previous index is not zero, the currently selected structure + * member is freed and zeroed-out first. + * Returns 0 on success and -1 on error. + */ +int +CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, + unsigned present) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned old_present; + + if(!sptr) { + return -1; + } + + if(present > td->elements_count) + return -1; + + old_present = + _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + if(present == old_present) + return 0; + + if(old_present != 0) { + assert(old_present <= td->elements_count); + ASN_STRUCT_RESET(*td, sptr); + } + + _set_present_idx(sptr, specs->pres_offset, specs->pres_size, present); + + return 0; +} + + +asn_random_fill_result_t +CHOICE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constr, + size_t max_length) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_random_fill_result_t res; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + const asn_TYPE_member_t *elm; + unsigned present; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *st = *sptr; + + if(max_length == 0) return result_skipped; + + (void)constr; + + if(st == NULL) { + st = CALLOC(1, specs->struct_size); + if(st == NULL) { + return result_failed; + } + } + + present = asn_random_between(1, td->elements_count); + elm = &td->elements[present - 1]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + res = elm->type->op->random_fill(elm->type, memb_ptr2, + &elm->encoding_constraints, max_length); + _set_present_idx(st, specs->pres_offset, specs->pres_size, present); + if(res.code == ARFILL_OK) { + *sptr = st; + } else { + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + } + + return res; +} + + +asn_TYPE_operation_t asn_OP_CHOICE = { + CHOICE_free, + CHOICE_print, + CHOICE_compare, + CHOICE_decode_ber, + CHOICE_encode_der, + CHOICE_decode_xer, + CHOICE_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + CHOICE_decode_oer, + CHOICE_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + CHOICE_decode_uper, + CHOICE_encode_uper, + CHOICE_decode_aper, + CHOICE_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + CHOICE_random_fill, + CHOICE_outmost_tag +}; diff --git a/Bouncer/e2ap/lib/constr_CHOICE_oer.c b/Bouncer/e2ap/lib/constr_CHOICE_oer.c new file mode 100644 index 0000000..a4c591c --- /dev/null +++ b/Bouncer/e2ap/lib/constr_CHOICE_oer.c @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#undef SET_PHASE +#define SET_PHASE(ctx, value) \ + do { \ + ctx->phase = value; \ + ctx->step = 0; \ + } while(0) + +/* + * Tags are canonically sorted in the tag to member table. + */ +static int +_search4tag(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) + return 0; + else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + +/* + * X.696 (08/2015) #8.7 Encoding of tags + */ +static ssize_t +oer_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { + ber_tlv_tag_t val; + ber_tlv_tag_t tclass; + size_t skipped; + + if(size == 0) + return 0; + + val = *(const uint8_t *)ptr; + tclass = (val >> 6); + if((val & 0x3F) != 0x3F) { + /* #8.7.1 */ + *tag_r = ((val & 0x3F) << 2) | tclass; + return 1; + } + + /* + * Each octet contains 7 bits of useful information. + * The MSB is 0 if it is the last octet of the tag. + */ + for(val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; skipped <= size; + ptr = ((const char *)ptr) + 1, skipped++) { + unsigned int oct = *(const uint8_t *)ptr; + if(oct & 0x80) { + val = (val << 7) | (oct & 0x7F); + /* + * Make sure there are at least 9 bits spare + * at the MS side of a value. + */ + if(val >> ((8 * sizeof(val)) - 9)) { + /* + * We would not be able to accomodate + * any more tag bits. + */ + return -1; + } + } else { + val = (val << 7) | oct; + *tag_r = (val << 2) | tclass; + return skipped; + } + } + + return 0; /* Want more */ +} + +asn_dec_rval_t +CHOICE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + (void)constraints; + + ASN_DEBUG("Decoding %s as CHOICE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + switch(ctx->phase) { + case 0: { + /* + * Discover the tag. + */ + ber_tlv_tag_t tlv_tag; /* T from TLV */ + ssize_t tag_len; /* Length of TLV's T */ + + tag_len = oer_fetch_tag(ptr, size, &tlv_tag); + switch(tag_len) { + case 0: + ASN__DECODE_STARVED; + case -1: + ASN__DECODE_FAILED; + } + + do { + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key = {0, 0, 0, 0}; + key.el_tag = tlv_tag; + + t2m = (const asn_TYPE_tag2member_t *)bsearch( + &key, specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _search4tag); + if(t2m) { + /* + * Found the element corresponding to the tag. + */ + NEXT_PHASE(ctx); + ctx->step = t2m->el_no; + break; + } else if(specs->ext_start == -1) { + ASN_DEBUG( + "Unexpected tag %s " + "in non-extensible CHOICE %s", + ber_tlv_tag_string(tlv_tag), td->name); + RETURN(RC_FAIL); + } else { + /* Skip open type extension */ + ASN_DEBUG( + "Not implemented skipping open type extension for tag %s", + ber_tlv_tag_string(tlv_tag)); + RETURN(RC_FAIL); + } + } while(0); + + + ADVANCE(tag_len); + } + /* Fall through */ + case 1: { + asn_TYPE_member_t *elm = &elements[ctx->step]; /* CHOICE's element */ + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + asn_dec_rval_t rval = {0,0}; + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Set presence to be able to free it properly at any time */ + (void)CHOICE_variant_set_presence(td, st, ctx->step + 1); + + if(specs->ext_start >= 0 && specs->ext_start <= ctx->step) { + ssize_t got = + oer_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr2, ptr, size); + if(got < 0) ASN__DECODE_FAILED; + if(got == 0) ASN__DECODE_STARVED; + rval.code = RC_OK; + rval.consumed = got; + } else { + rval = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, + size); + } + rval.consumed += consumed_myself; + switch(rval.code) { + case RC_OK: + NEXT_PHASE(ctx); + case RC_WMORE: + break; + case RC_FAIL: + SET_PHASE(ctx, 3); /* => 3 */ + } + return rval; + } + case 2: + /* Already decoded everything */ + RETURN(RC_OK); + case 3: + /* Failed to decode, after all */ + RETURN(RC_FAIL); + } + + RETURN(RC_FAIL); +} + +/* + * X.696 (08/2015) #8.7 Encoding of tags + */ +static ssize_t +oer_put_tag(ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { + uint8_t tclass = BER_TAG_CLASS(tag); + ber_tlv_tag_t tval = BER_TAG_VALUE(tag); + + if(tval < 0x3F) { + uint8_t b = (uint8_t)((tclass << 6) | tval); + if(cb(&b, 1, app_key) < 0) { + return -1; + } + return 1; + } else { + uint8_t buf[1 + 2 * sizeof(tval)]; + uint8_t *b = &buf[sizeof(buf)-1]; /* Last addressable */ + size_t encoded; + for(; ; tval >>= 7) { + if(tval >> 7) { + *b-- = 0x80 | (tval & 0x7f); + } else { + *b-- = tval & 0x7f; + break; + } + } + *b = (uint8_t)((tclass << 6) | 0x3F); + encoded = sizeof(buf) - (b - buf); + if(cb(b, encoded, app_key) < 0) { + return -1; + } + return encoded; + } + +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +CHOICE_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE element */ + unsigned present; + const void *memb_ptr; + ber_tlv_tag_t tag; + ssize_t tag_len; + asn_enc_rval_t er = {0, 0, 0}; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("OER %s encoding as CHOICE", td->name); + + present = CHOICE_variant_get_presence(td, sptr); + if(present == 0 || present > td->elements_count) { + ASN_DEBUG("CHOICE %s member is not selected", td->name); + ASN__ENCODE_FAILED; + } + + elm = &td->elements[present-1]; + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(memb_ptr == 0) { + /* Mandatory element absent */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + tag = asn_TYPE_outmost_tag(elm->type, memb_ptr, elm->tag_mode, elm->tag); + if(tag == 0) { + ASN__ENCODE_FAILED; + } + + tag_len = oer_put_tag(tag, cb, app_key); + if(tag_len < 0) { + ASN__ENCODE_FAILED; + } + + if(specs->ext_start >= 0 && (unsigned)specs->ext_start <= (present-1)) { + ssize_t encoded = oer_open_type_put(elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr, cb, app_key); + if(encoded < 0) ASN__ENCODE_FAILED; + er.encoded = tag_len + encoded; + } else { + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded >= 0) er.encoded += tag_len; + } + + return er; +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/asn1c_defs/constr_SEQUENCE.c b/Bouncer/e2ap/lib/constr_SEQUENCE.c similarity index 100% rename from Bouncer/asn1c_defs/constr_SEQUENCE.c rename to Bouncer/e2ap/lib/constr_SEQUENCE.c diff --git a/Bouncer/asn1c_defs/constr_SEQUENCE_OF.c b/Bouncer/e2ap/lib/constr_SEQUENCE_OF.c similarity index 100% rename from Bouncer/asn1c_defs/constr_SEQUENCE_OF.c rename to Bouncer/e2ap/lib/constr_SEQUENCE_OF.c diff --git a/Bouncer/e2ap/lib/constr_SEQUENCE_oer.c b/Bouncer/e2ap/lib/constr_SEQUENCE_oer.c new file mode 100644 index 0000000..ecb589c --- /dev/null +++ b/Bouncer/e2ap/lib/constr_SEQUENCE_oer.c @@ -0,0 +1,561 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include +#include + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#undef PHASE_OUT +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) + +/* + * Check whether we are inside the extensions group. + */ +#define IN_EXTENSION_GROUP(specs, memb_idx) \ + ((specs)->first_extension >= 0 \ + && (unsigned)(specs)->first_extension <= (memb_idx)) + +#define IN_ROOT_GROUP_PRED(edx) \ + edx < (specs->first_extension < 0 ? td->elements_count \ + : (size_t)specs->first_extension) + +#define FOR_IN_ROOT_GROUP(edx) for(edx = 0; IN_ROOT_GROUP_PRED(edx); edx++) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * Return pointer to a member. + */ +static void ** +element_ptrptr(void *struct_ptr, asn_TYPE_member_t *elm, void **tmp_save_ptr) { + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + return (void **)((char *)struct_ptr + elm->memb_offset); + } else { + assert(tmp_save_ptr); + *tmp_save_ptr = (void *)((char *)struct_ptr + elm->memb_offset); + return tmp_save_ptr; + } +} + +static const void * +element_ptr(const void *struct_ptr, const asn_TYPE_member_t *elm) { + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + return *(const void *const *)((const char *)struct_ptr + + elm->memb_offset); + } else { + return (const void *)((const char *)struct_ptr + elm->memb_offset); + } +} + +asn_dec_rval_t +SEQUENCE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + void *st = *struct_ptr; /* Target structure */ + asn_struct_ctx_t *ctx; /* Decoder context */ + size_t consumed_myself = 0; /* Consumed bytes from ptr. */ + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously. + */ + switch(ctx->phase) { + case 0: { + /* + * Fetch preamble. + */ + asn_bit_data_t *preamble; + int has_extensions_bit = (specs->first_extension >= 0); + size_t preamble_bits = (has_extensions_bit + specs->roms_count); + size_t preamble_bytes = ((7 + preamble_bits) >> 3); + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 0", td->name); + + ASN_DEBUG( + "Expecting preamble bits %" ASN_PRI_SIZE " for %s (including %d extension bits)", + preamble_bits, td->name, has_extensions_bit); + + if(preamble_bytes > size) { + ASN__DECODE_STARVED; + } + + preamble = asn_bit_data_new_contiguous(ptr, preamble_bits); + if(!preamble) { + RETURN(RC_FAIL); + } + preamble->nboff = has_extensions_bit; + ctx->ptr = preamble; + ADVANCE(preamble_bytes); + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 1: { + /* Decode components of the extension root */ + asn_bit_data_t *preamble = ctx->ptr; + size_t edx; + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 1 (Root)", td->name); + + assert(preamble); + + for(edx = (ctx->step >> 1); IN_ROOT_GROUP_PRED(edx); + edx++, ctx->step = (ctx->step & ~1) + 2) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + ASN_DEBUG("Decoding %s->%s", td->name, elm->name); + + assert(!IN_EXTENSION_GROUP(specs, edx)); + + if(ctx->step & 1) { + goto microphase2_decode_continues; + } + + + if(elm->optional) { + int32_t present = asn_get_few_bits(preamble, 1); + if(present < 0) { + ASN_DEBUG("Presence map ended prematurely: %d", present); + RETURN(RC_FAIL); + } else if(present == 0) { + if(elm->default_value_set) { + /* Fill-in DEFAULT */ + void *tmp; + if(elm->default_value_set( + element_ptrptr(st, elm, &tmp))) { + RETURN(RC_FAIL); + } + } + /* The member is not present. */ + continue; + } + /* Present OPTIONAL or DEFAULT component. */ + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + ctx->step |= 1; /* Confirm entering next microphase */ + microphase2_decode_continues: + if(elm->flags & ATF_OPEN_TYPE) { + rval = OPEN_TYPE_oer_get(opt_codec_ctx, td, st, elm, ptr, size); + } else { + void *save_memb_ptr; /* Temporary reference. */ + void **memb_ptr2; /* Pointer to a pointer to a memmber */ + + memb_ptr2 = element_ptrptr(st, elm, &save_memb_ptr); + + rval = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, + size); + } + switch(rval.code) { + case RC_OK: + ADVANCE(rval.consumed); + break; + case RC_WMORE: + ASN_DEBUG("More bytes needed at element %s \"%s\"", td->name, + elm->name); + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + case RC_FAIL: + ASN_DEBUG("Decoding failed at element %s \"%s\"", td->name, + elm->name); + RETURN(RC_FAIL); + } + } /* for(all root members) */ + + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 2: + assert(ctx->ptr); + { + /* Cleanup preamble. */ + asn_bit_data_t *preamble = ctx->ptr; + asn_bit_data_t *extadds; + int has_extensions_bit = (specs->first_extension >= 0); + int extensions_present = + has_extensions_bit + && (preamble->buffer == NULL + || (((const uint8_t *)preamble->buffer)[0] & 0x80)); + uint8_t unused_bits; + size_t len = 0; + ssize_t len_len; + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 2", td->name); + + preamble->buffer = 0; /* Will do extensions_present==1 next time. */ + + if(!extensions_present) { + ctx->phase = 10; + RETURN(RC_OK); + } + + /* + * X.696 (08/2015) #16.1 (c), #16.4 + * Read in the extension addition presence bitmap. + */ + + len_len = oer_fetch_length(ptr, size, &len); + if(len_len > 0) { + ADVANCE(len_len); + } else if(len_len < 0) { + RETURN(RC_FAIL); + } else { + RETURN(RC_WMORE); + } + + if(len == 0) { + /* 16.4.1-2 */ + RETURN(RC_FAIL); + } else if(len > size) { + RETURN(RC_WMORE); + } + + /* Account for unused bits */ + unused_bits = 0x7 & *(const uint8_t *)ptr; + ADVANCE(1); + len--; + if(unused_bits && len == 0) { + RETURN(RC_FAIL); + } + + /* Get the extensions map */ + extadds = asn_bit_data_new_contiguous(ptr, len * 8 - unused_bits); + if(!extadds) { + RETURN(RC_FAIL); + } + FREEMEM(preamble); + ctx->ptr = extadds; + ADVANCE(len); + } + NEXT_PHASE(ctx); + ctx->step = + (specs->first_extension < 0 ? td->elements_count + : (size_t)specs->first_extension); + /* Fall through */ + case 3: + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 3 (Extensions)", td->name); + for(; ctx->step < (signed)td->elements_count; ctx->step++) { + asn_bit_data_t *extadds = ctx->ptr; + size_t edx = ctx->step; + asn_TYPE_member_t *elm = &td->elements[edx]; + void *tmp_memb_ptr; + void **memb_ptr2 = element_ptrptr(st, elm, &tmp_memb_ptr); + + switch(asn_get_few_bits(extadds, 1)) { + case -1: + /* + * Not every one of our extensions is known to the remote side. + * Continue filling in their defaults though. + */ + /* Fall through */ + case 0: + /* Fill-in DEFAULT */ + if(elm->default_value_set + && elm->default_value_set(memb_ptr2)) { + RETURN(RC_FAIL); + } + continue; + case 1: { + /* Read OER open type */ + ssize_t ot_size = + oer_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr2, ptr, size); + assert(ot_size <= (ssize_t)size); + if(ot_size > 0) { + ADVANCE(ot_size); + } else if(ot_size < 0) { + RETURN(RC_FAIL); + } else { + /* Roll back open type parsing */ + asn_get_undo(extadds, 1); + RETURN(RC_WMORE); + } + break; + } + default: + RETURN(RC_FAIL); + } + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 4: + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 4", td->name); + /* Read in the rest of Open Types while ignoring them */ + for(;;) { + asn_bit_data_t *extadds = ctx->ptr; + switch(asn_get_few_bits(extadds, 1)) { + case 0: + continue; + case 1: { + ssize_t skipped = oer_open_type_skip(ptr, size); + if(skipped > 0) { + ADVANCE(skipped); + } else if(skipped < 0) { + RETURN(RC_FAIL); + } else { + asn_get_undo(extadds, 1); + RETURN(RC_WMORE); + } + continue; + } + case -1: + /* No more Open Type encoded components */ + break; + default: + RETURN(RC_FAIL); + } + break; + } + } + + RETURN(RC_OK); +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + size_t computed_size = 0; + int has_extensions_bit = (specs->first_extension >= 0); + size_t preamble_bits = (has_extensions_bit + specs->roms_count); + uint32_t has_extensions = 0; + size_t edx; + int ret; + + (void)constraints; + + if(preamble_bits) { + asn_bit_outp_t preamble; + + memset(&preamble, 0, sizeof(preamble)); + preamble.output = cb; + preamble.op_key = app_key; + + if(has_extensions_bit) { + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Do not encode default values in extensions */ + } else { + has_extensions = 1; + break; + } + } + } + ret = asn_put_few_bits(&preamble, has_extensions, 1); + assert(ret == 0); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + } + + /* + * Encode optional components bitmap. + */ + if(specs->roms_count) { + FOR_IN_ROOT_GROUP(edx) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + if(IN_EXTENSION_GROUP(specs, edx)) break; + + if(elm->optional) { + const void *memb_ptr = element_ptr(sptr, elm); + uint32_t has_component = memb_ptr != NULL; + if(has_component && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + has_component = 0; + } + ret = asn_put_few_bits(&preamble, has_component, 1); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + } + } + } + + asn_put_aligned_flush(&preamble); + computed_size += preamble.flushed_bytes; + } /* if(preamble_bits) */ + + /* + * Put root components and extensions root. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + asn_enc_rval_t er = {0,0,0}; + const void *memb_ptr; + + if(IN_EXTENSION_GROUP(specs, edx)) break; + + memb_ptr = element_ptr(sptr, elm); + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Skip default values in encoding */ + continue; + } + } else { + if(elm->optional) continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + if(!elm->type->op->oer_encoder) { + ASN_DEBUG("OER encoder is not defined for type %s", elm->type->name); + ASN__ENCODE_FAILED; + } + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded == -1) { + ASN_DEBUG("... while encoding %s member \"%s\"\n", td->name, + elm->name); + return er; + } + computed_size += er.encoded; + } + + /* + * Before encode extensions, encode extensions additions presense bitmap + # X.696 (08/2015) #16.4. + */ + if(has_extensions) { + asn_bit_outp_t extadds; + + /* Special case allowing us to use exactly one byte for #8.6 */ + size_t aoms_length_bits = specs->aoms_count; + size_t aoms_length_bytes = (7 + aoms_length_bits) >> 3; + uint8_t unused_bits = 0x07 & (8 - (aoms_length_bits & 0x07)); + + assert(1 + aoms_length_bytes <= 127); + + memset(&extadds, 0, sizeof(extadds)); + extadds.output = cb; + extadds.op_key = app_key; + + /* #8.6 length determinant */ + ret = asn_put_few_bits(&extadds, (1 + aoms_length_bytes), 8); + if(ret < 0) ASN__ENCODE_FAILED; + + /* Number of unused bytes, #16.4.2 */ + ret = asn_put_few_bits(&extadds, unused_bits, 8); + if(ret < 0) ASN__ENCODE_FAILED; + + /* Encode presence bitmap #16.4.3 */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + if(memb_ptr && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + memb_ptr = 0; /* Do not encode default value. */ + } + ret |= asn_put_few_bits(&extadds, memb_ptr ? 1 : 0, 1); + } + if(ret < 0) ASN__ENCODE_FAILED; + + asn_put_aligned_flush(&extadds); + computed_size += extadds.flushed_bytes; + + /* Now, encode extensions */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Do not encode default value. */ + } else { + ssize_t wrote = oer_open_type_put( + elm->type, elm->encoding_constraints.oer_constraints, + memb_ptr, cb, app_key); + if(wrote == -1) { + ASN__ENCODE_FAILED; + } + computed_size += wrote; + } + } else if(!elm->optional) { + ASN__ENCODE_FAILED; + } + } + } /* if(has_extensions) */ + + + { + asn_enc_rval_t er = {0, 0, 0}; + er.encoded = computed_size; + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/asn1c_defs/constr_SET_OF.c b/Bouncer/e2ap/lib/constr_SET_OF.c similarity index 100% rename from Bouncer/asn1c_defs/constr_SET_OF.c rename to Bouncer/e2ap/lib/constr_SET_OF.c diff --git a/Bouncer/e2ap/lib/constr_SET_OF_oer.c b/Bouncer/e2ap/lib/constr_SET_OF_oer.c new file mode 100644 index 0000000..5200518 --- /dev/null +++ b/Bouncer/e2ap/lib/constr_SET_OF_oer.c @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include +#include + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#undef SET_PHASE +#define SET_PHASE(ctx, value) \ + do { \ + ctx->phase = value; \ + ctx->step = 0; \ + } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +/* + * The SEQUENCE OF and SET OF values utilize a "quantity field". + * It is is a pointless combination of #8.6 (length determinant, capable + * of encoding tiny and huge numbers in the shortest possible number of octets) + * and the variable sized integer. What could have been encoded by #8.6 alone + * is required to be encoded by #8.6 followed by that number of unsigned octets. + * This doesn't make too much sense. It seems that the original version of OER + * standard have been using the unconstrained unsigned integer as a quantity + * field, and this legacy have gone through ISO/ITU-T standardization process. + */ +static ssize_t +oer_fetch_quantity(const void *ptr, size_t size, size_t *qty_r) { + const uint8_t *b; + const uint8_t *bend; + size_t len = 0; + size_t qty; + + ssize_t len_len = oer_fetch_length(ptr, size, &len); + if(len_len <= 0) { + *qty_r = 0; + return len_len; + } + + if((len_len + len) > size) { + *qty_r = 0; + return 0; + } + + b = (const uint8_t *)ptr + len_len; + bend = b + len; + + /* Skip the leading 0-bytes */ + for(; b < bend && *b == 0; b++) { + } + + if((bend - b) > (ssize_t)sizeof(size_t)) { + /* Length is not representable by the native size_t type */ + *qty_r = 0; + return -1; + } + + for(qty = 0; b < bend; b++) { + qty = (qty << 8) + *b; + } + + if(qty > RSIZE_MAX) { /* A bit of C11 validation */ + *qty_r = 0; + return -1; + } + + *qty_r = qty; + assert((size_t)len_len + len == (size_t)(bend - (const uint8_t *)ptr)); + return len_len + len; +} + +asn_dec_rval_t +SET_OF_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + void *st = *struct_ptr; /* Target structure */ + asn_struct_ctx_t *ctx; /* Decoder context */ + size_t consumed_myself = 0; /* Consumed bytes from ptr. */ + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously. + */ + switch(ctx->phase) { + case 0: { + /* + * Fetch number of elements to decode. + */ + size_t length = 0; + size_t len_size = oer_fetch_quantity(ptr, size, &length); + switch(len_size) { + case 0: + RETURN(RC_WMORE); + case -1: + RETURN(RC_FAIL); + default: + ADVANCE(len_size); + ctx->left = length; + } + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 1: { + /* Decode components of the extension root */ + asn_TYPE_member_t *elm = td->elements; + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + const void *base_ptr = ptr; + ber_tlv_len_t base_ctx_left = ctx->left; + + assert(td->elements_count == 1); + + ASN_DEBUG("OER SET OF %s Decoding PHASE 1", td->name); + + for(; ctx->left > 0; ctx->left--) { + asn_dec_rval_t rv = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, &ctx->ptr, ptr, + size); + ADVANCE(rv.consumed); + switch(rv.code) { + case RC_OK: + if(ASN_SET_ADD(list, ctx->ptr) != 0) { + RETURN(RC_FAIL); + } else { + ctx->ptr = 0; + /* + * This check is to avoid compression bomb with + * specs like SEQUENCE/SET OF NULL which don't + * consume data at all. + */ + if(rv.consumed == 0 && base_ptr == ptr + && (base_ctx_left - ctx->left) > 200) { + ASN__DECODE_FAILED; + } + break; + } + case RC_WMORE: + RETURN(RC_WMORE); + case RC_FAIL: + ASN_STRUCT_FREE(*elm->type, ctx->ptr); + ctx->ptr = 0; + SET_PHASE(ctx, 3); + RETURN(RC_FAIL); + } + } + /* Decoded decently. */ + NEXT_PHASE(ctx); + } + /* Fall through */ + case 2: + /* Ignore fully decoded */ + assert(ctx->left == 0); + RETURN(RC_OK); + case 3: + /* Failed to decode. */ + RETURN(RC_FAIL); + } + + return rval; +} + +static ssize_t +oer_put_quantity(size_t qty, asn_app_consume_bytes_f *cb, void *app_key) { + uint8_t buf[1 + sizeof(size_t)]; + uint8_t *b = &buf[sizeof(size_t)]; /* Last addressable */ + size_t encoded; + + do { + *b-- = qty; + qty >>= 8; + } while(qty); + + *b = sizeof(buf) - (b-buf) - 1; + encoded = sizeof(buf) - (b-buf); + if(cb(b, encoded, app_key) < 0) + return -1; + return encoded; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +SET_OF_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_TYPE_member_t *elm; + const asn_anonymous_set_ *list; + size_t computed_size = 0; + ssize_t qty_len; + int n; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + elm = td->elements; + list = _A_CSET_FROM_VOID(sptr); + + qty_len = oer_put_quantity(list->count, cb, app_key); + if(qty_len < 0) { + ASN__ENCODE_FAILED; + } + computed_size += qty_len; + + for(n = 0; n < list->count; n++) { + void *memb_ptr = list->array[n]; + asn_enc_rval_t er = {0,0,0}; + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded < 0) { + return er; + } else { + computed_size += er.encoded; + } + } + + { + asn_enc_rval_t erval = {0,0,0}; + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/asn1c_defs/constr_TYPE.c b/Bouncer/e2ap/lib/constr_TYPE.c similarity index 100% rename from Bouncer/asn1c_defs/constr_TYPE.c rename to Bouncer/e2ap/lib/constr_TYPE.c diff --git a/Bouncer/asn1c_defs/constraints.c b/Bouncer/e2ap/lib/constraints.c similarity index 100% rename from Bouncer/asn1c_defs/constraints.c rename to Bouncer/e2ap/lib/constraints.c diff --git a/Bouncer/asn1c_defs/der_encoder.c b/Bouncer/e2ap/lib/der_encoder.c similarity index 100% rename from Bouncer/asn1c_defs/der_encoder.c rename to Bouncer/e2ap/lib/der_encoder.c diff --git a/Bouncer/e2ap/lib/oer_decoder.c b/Bouncer/e2ap/lib/oer_decoder.c new file mode 100644 index 0000000..0701738 --- /dev/null +++ b/Bouncer/e2ap/lib/oer_decoder.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * The OER decoder of any type. + */ +asn_dec_rval_t +oer_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, + const void *ptr, size_t size) { + asn_codec_ctx_t s_codec_ctx; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* + * Invoke type-specific decoder. + */ + return type_descriptor->op->oer_decoder(opt_codec_ctx, type_descriptor, 0, + struct_ptr, /* Pointer to the destination structure */ + ptr, size /* Buffer and its size */ + ); +} + +/* + * Open Type is encoded as a length (#8.6) followed by that number of bytes. + * Since we're just skipping, reading the length would be enough. + */ +ssize_t +oer_open_type_skip(const void *bufptr, size_t size) { + size_t len = 0; + return oer_fetch_length(bufptr, size, &len); +} + +/* + * Read the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t +oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *bufptr, size_t size) { + asn_dec_rval_t dr; + size_t container_len = 0; + ssize_t len_len; + enum asn_struct_free_method dispose_method = + (*struct_ptr) ? ASFM_FREE_UNDERLYING_AND_RESET : ASFM_FREE_EVERYTHING; + + /* Get the size of a length determinant */ + len_len = oer_fetch_length(bufptr, size, &container_len); + if(len_len <= 0) { + return len_len; /* Error or more data expected */ + } + + /* + * len_len can't be bigger than size, but size without len_len + * should be bigger or equal to container length + */ + if(size - len_len < container_len) { + /* More data is expected */ + return 0; + } + + dr = td->op->oer_decoder(opt_codec_ctx, td, constraints, struct_ptr, + (const uint8_t *)bufptr + len_len, container_len); + if(dr.code == RC_OK) { + return len_len + container_len; + } else { + /* Even if RC_WMORE, we can't get more data into a closed container. */ + td->op->free_struct(td, *struct_ptr, dispose_method); + *struct_ptr = NULL; + return -1; + } +} + + +asn_dec_rval_t +oer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + ssize_t len_len; + + (void)td; + (void)opt_codec_ctx; + (void)constraints; + + if(!st) { + st = (ASN__PRIMITIVE_TYPE_t *)(*sptr = CALLOC( + 1, sizeof(ASN__PRIMITIVE_TYPE_t))); + if(!st) ASN__DECODE_FAILED; + } + + + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + rval.consumed = len_len; + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + + rval.consumed += expected_length; + return rval; + } +} diff --git a/Bouncer/e2ap/lib/oer_encoder.c b/Bouncer/e2ap/lib/oer_encoder.c new file mode 100644 index 0000000..a284cc2 --- /dev/null +++ b/Bouncer/e2ap/lib/oer_encoder.c @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * The OER encoder of any type. + */ +asn_enc_rval_t +oer_encode(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes, void *app_key) { + ASN_DEBUG("OER encoder invoked for %s", type_descriptor->name); + + /* + * Invoke type-specific encoder. + */ + return type_descriptor->op->oer_encoder( + type_descriptor, 0, + struct_ptr, /* Pointer to the destination structure */ + consume_bytes, app_key); +} + +/* + * Argument type and callback necessary for oer_encode_to_buffer(). + */ +typedef struct enc_to_buf_arg { + void *buffer; + size_t left; +} enc_to_buf_arg; +static int +encode_to_buffer_cb(const void *buffer, size_t size, void *key) { + enc_to_buf_arg *arg = (enc_to_buf_arg *)key; + + if(arg->left < size) return -1; /* Data exceeds the available buffer size */ + + memcpy(arg->buffer, buffer, size); + arg->buffer = ((char *)arg->buffer) + size; + arg->left -= size; + + return 0; +} + +/* + * A variant of the oer_encode() which encodes the data into the provided buffer + */ +asn_enc_rval_t +oer_encode_to_buffer(const asn_TYPE_descriptor_t *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +) { + enc_to_buf_arg arg; + asn_enc_rval_t ec; + + arg.buffer = buffer; + arg.left = buffer_size; + + if(type_descriptor->op->oer_encoder == NULL) { + ec.encoded = -1; + ec.failed_type = type_descriptor; + ec.structure_ptr = struct_ptr; + ASN_DEBUG("OER encoder is not defined for %s", + type_descriptor->name); + } else { + ec = type_descriptor->op->oer_encoder( + type_descriptor, constraints, + struct_ptr, /* Pointer to the destination structure */ + encode_to_buffer_cb, &arg); + if(ec.encoded != -1) { + assert(ec.encoded == (ssize_t)(buffer_size - arg.left)); + /* Return the encoded contents size */ + } + } + return ec; +} + +asn_enc_rval_t +oer_encode_primitive(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr; + asn_enc_rval_t er = {0, 0, 0}; + ssize_t ret; + + (void)constraints; + + if(!st) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s (%" ASN_PRI_SIZE " bytes)", td ? td->name : "", st->size); + + /* + * X.696 (08/2015) #27.2 + */ + ret = oer_serialize_length(st->size, cb, app_key); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += ret; + + er.encoded += st->size; + if(cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + ASN__ENCODED_OK(er); + } +} + +static int +oer__count_bytes(const void *buffer, size_t size, void *bytes_ptr) { + size_t *bytes = bytes_ptr; + (void)buffer; + *bytes += size; + return 0; +} + +ssize_t +oer_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t serialized_byte_count = 0; + asn_enc_rval_t er = {0,0,0}; + ssize_t len_len; + + er = td->op->oer_encoder(td, constraints, sptr, oer__count_bytes, + &serialized_byte_count); + if(er.encoded < 0) return -1; + assert(serialized_byte_count == (size_t)er.encoded); + + len_len = oer_serialize_length(serialized_byte_count, cb, app_key); + if(len_len == -1) return -1; + + er = td->op->oer_encoder(td, constraints, sptr, cb, app_key); + if(er.encoded < 0) return -1; + assert(serialized_byte_count == (size_t)er.encoded); + + return len_len + er.encoded; +} + diff --git a/Bouncer/e2ap/lib/oer_support.c b/Bouncer/e2ap/lib/oer_support.c new file mode 100644 index 0000000..b15a3bc --- /dev/null +++ b/Bouncer/e2ap/lib/oer_support.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +#include + +/* + * Fetch the length determinant (X.696 08/2015, #8.6) into *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t +oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) { + uint8_t first_byte; + size_t len_len; /* Length of the length determinant */ + const uint8_t *b; + const uint8_t *bend; + size_t len; + + if(size == 0) { + *len_r = 0; + return 0; + } + + first_byte = *(const uint8_t *)bufptr; + if((first_byte & 0x80) == 0) { /* Short form */ + *len_r = first_byte; /* 0..127 */ + return 1; + } + + len_len = (first_byte & 0x7f); + if((1 + len_len) > size) { + *len_r = 0; + return 0; + } + + b = (const uint8_t *)bufptr + 1; + bend = b + len_len; + + for(; b < bend && *b == 0; b++) { + /* Skip the leading 0-bytes */ + } + + if((bend - b) > (ssize_t)sizeof(size_t)) { + /* Length is not representable by the native size_t type */ + *len_r = 0; + return -1; + } + + for(len = 0; b < bend; b++) { + len = (len << 8) + *b; + } + + if(len > RSIZE_MAX) { /* A bit of C11 validation */ + *len_r = 0; + return -1; + } + + *len_r = len; + assert(len_len + 1 == (size_t)(bend - (const uint8_t *)bufptr)); + return len_len + 1; +} + + +/* + * Serialize OER length. Returns the number of bytes serialized + * or -1 if a given callback returned with negative result. + */ +ssize_t +oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, + void *app_key) { + uint8_t scratch[1 + sizeof(length)]; + uint8_t *sp = scratch; + int littleEndian = 1; /* Run-time detection */ + const uint8_t *pstart; + const uint8_t *pend; + const uint8_t *p; + int add; + + if(length <= 127) { + uint8_t b = length; + if(cb(&b, 1, app_key) < 0) { + return -1; + } + return 1; + } + + if(*(char *)&littleEndian) { + pstart = (const uint8_t *)&length + sizeof(length) - 1; + pend = (const uint8_t *)&length; + add = -1; + } else { + pstart = (const uint8_t *)&length; + pend = pstart + sizeof(length); + add = 1; + } + + for(p = pstart; p != pend; p += add) { + /* Skip leading zeros. */ + if(*p) break; + } + + for(sp = scratch + 1; ; p += add) { + *sp++ = *p; + if(p == pend) break; + } + assert((sp - scratch) - 1 <= 0x7f); + scratch[0] = 0x80 + ((sp - scratch) - 1); + + if(cb(scratch, sp - scratch, app_key) < 0) { + return -1; + } + + return sp - scratch; +} + diff --git a/Bouncer/asn1c_defs/per_decoder.c b/Bouncer/e2ap/lib/per_decoder.c similarity index 100% rename from Bouncer/asn1c_defs/per_decoder.c rename to Bouncer/e2ap/lib/per_decoder.c diff --git a/Bouncer/asn1c_defs/per_encoder.c b/Bouncer/e2ap/lib/per_encoder.c similarity index 100% rename from Bouncer/asn1c_defs/per_encoder.c rename to Bouncer/e2ap/lib/per_encoder.c diff --git a/Bouncer/asn1c_defs/per_opentype.c b/Bouncer/e2ap/lib/per_opentype.c similarity index 100% rename from Bouncer/asn1c_defs/per_opentype.c rename to Bouncer/e2ap/lib/per_opentype.c diff --git a/Bouncer/asn1c_defs/per_support.c b/Bouncer/e2ap/lib/per_support.c similarity index 100% rename from Bouncer/asn1c_defs/per_support.c rename to Bouncer/e2ap/lib/per_support.c diff --git a/Bouncer/asn1c_defs/xer_decoder.c b/Bouncer/e2ap/lib/xer_decoder.c similarity index 100% rename from Bouncer/asn1c_defs/xer_decoder.c rename to Bouncer/e2ap/lib/xer_decoder.c diff --git a/Bouncer/asn1c_defs/xer_encoder.c b/Bouncer/e2ap/lib/xer_encoder.c similarity index 100% rename from Bouncer/asn1c_defs/xer_encoder.c rename to Bouncer/e2ap/lib/xer_encoder.c diff --git a/Bouncer/asn1c_defs/xer_support.c b/Bouncer/e2ap/lib/xer_support.c similarity index 100% rename from Bouncer/asn1c_defs/xer_support.c rename to Bouncer/e2ap/lib/xer_support.c diff --git a/Bouncer/e2ap/wrapper.c b/Bouncer/e2ap/wrapper.c new file mode 100644 index 0000000..1ba1a8f --- /dev/null +++ b/Bouncer/e2ap/wrapper.c @@ -0,0 +1,1069 @@ +#include +#include "wrapper.h" + +size_t encode_E2AP_PDU(E2AP_PDU_t* pdu, void* buffer, size_t buf_size) +{ + asn_enc_rval_t encode_result; + encode_result = aper_encode_to_buffer(&asn_DEF_E2AP_PDU, NULL, pdu, buffer, buf_size); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + if(encode_result.encoded == -1) { + fprintf(stderr, "Cannot encode %s: %s\n", encode_result.failed_type->name, strerror(errno)); + return -1; + } else { + return encode_result.encoded; + } +} + +E2AP_PDU_t* decode_E2AP_PDU(const void* buffer, size_t buf_size) +{ + asn_dec_rval_t decode_result; + E2AP_PDU_t *pdu = 0; + decode_result = aper_decode_complete(NULL, &asn_DEF_E2AP_PDU, (void **)&pdu, buffer, buf_size); + //xer_fprint(stderr, &asn_DEF_E2AP_PDU,pdu); + if(decode_result.code == RC_OK) { + xer_fprint(stderr, &asn_DEF_E2AP_PDU,pdu); + return pdu; + } else { + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return 0; + } +} + +/* RICsubscriptionRequest */ +long e2ap_get_ric_subscription_request_sequence_number(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_initiatingMessage) + { + InitiatingMessage_t* initiatingMessage = pdu->choice.initiatingMessage; + if ( initiatingMessage->procedureCode == ProcedureCode_id_RICsubscription + && initiatingMessage->value.present == InitiatingMessage__value_PR_RICsubscriptionRequest) + { + RICsubscriptionRequest_t *ric_subscription_request = &(initiatingMessage->value.choice.RICsubscriptionRequest); + for (int i = 0; i < ric_subscription_request->protocolIEs.list.count; ++i ) + { + if ( ric_subscription_request->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + long sequenceNumber = ric_subscription_request->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return sequenceNumber; + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +ssize_t e2ap_set_ric_subscription_request_sequence_number(void *buffer, size_t buf_size, long sequence_number) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_initiatingMessage) + { + InitiatingMessage_t* initiatingMessage = pdu->choice.initiatingMessage; + if ( initiatingMessage->procedureCode == ProcedureCode_id_RICsubscription + && initiatingMessage->value.present == InitiatingMessage__value_PR_RICsubscriptionRequest) + { + RICsubscriptionRequest_t *ricSubscriptionRequest = &initiatingMessage->value.choice.RICsubscriptionRequest; + for (int i = 0; i < ricSubscriptionRequest->protocolIEs.list.count; ++i ) + { + if ( ricSubscriptionRequest->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + ricSubscriptionRequest->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID = sequence_number; + return encode_E2AP_PDU(pdu, buffer, buf_size); + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +ssize_t e2ap_encode_ric_subscription_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID, void *eventTriggerDefinition, size_t eventTriggerDefinitionSize, int actionCount, long *actionIds, long* actionTypes, RICactionDefinition *actionDefinitions, RICSubsequentAction *subsequentActionTypes) +{ + E2AP_PDU_t *init = (E2AP_PDU_t *)calloc(1, sizeof(E2AP_PDU_t)); + if(!init) { + fprintf(stderr, "alloc E2AP_PDU failed\n"); + return -1; + } + + InitiatingMessage_t *initiatingMsg = (InitiatingMessage_t *)calloc(1, sizeof(InitiatingMessage_t)); + if(!initiatingMsg) { + fprintf(stderr, "alloc InitiatingMessage failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + init->choice.initiatingMessage = initiatingMsg; + init->present = E2AP_PDU_PR_initiatingMessage; + + initiatingMsg->procedureCode = ProcedureCode_id_RICsubscription; + initiatingMsg->criticality = Criticality_reject; + initiatingMsg->value.present = InitiatingMessage__value_PR_RICsubscriptionRequest; + + RICsubscriptionRequest_t *subscription_request = &initiatingMsg->value.choice.RICsubscriptionRequest; + + // request contains 5 IEs + + // RICrequestID + RICsubscriptionRequest_IEs_t *ies_reqID = (RICsubscriptionRequest_IEs_t *)calloc(1, sizeof(RICsubscriptionRequest_IEs_t)); + if(!ies_reqID) { + fprintf(stderr, "alloc RICrequestID failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + ies_reqID->criticality = Criticality_reject; + ies_reqID->id = ProtocolIE_ID_id_RICrequestID; + ies_reqID->value.present = RICsubscriptionRequest_IEs__value_PR_RICrequestID; + RICrequestID_t *ricrequest_ie = &ies_reqID->value.choice.RICrequestID; + ricrequest_ie->ricRequestorID = ricRequestorID; + ricrequest_ie->ricInstanceID = ricRequestSequenceNumber; + ASN_SEQUENCE_ADD(&subscription_request->protocolIEs.list, ies_reqID); + + // RICfunctionID + RICsubscriptionRequest_IEs_t *ies_ranfunc = (RICsubscriptionRequest_IEs_t *)calloc(1, sizeof(RICsubscriptionRequest_IEs_t)); + if(!ies_ranfunc) { + fprintf(stderr, "alloc RICfunctionID failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + ies_ranfunc->criticality = Criticality_reject; + ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; + ies_ranfunc->value.present = RICsubscriptionRequest_IEs__value_PR_RANfunctionID; + RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; + *ranfunction_ie = ranFunctionID; + ASN_SEQUENCE_ADD(&subscription_request->protocolIEs.list, ies_ranfunc); + + // RICsubscription + RICsubscriptionRequest_IEs_t *ies_subscription = (RICsubscriptionRequest_IEs_t *)calloc(1, sizeof(RICsubscriptionRequest_IEs_t)); + if(!ies_subscription) { + fprintf(stderr, "alloc RICsubscription failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + ies_subscription->criticality = Criticality_reject; + ies_subscription->id = ProtocolIE_ID_id_RICsubscriptionDetails; + ies_subscription->value.present = RICsubscriptionRequest_IEs__value_PR_RICsubscriptionDetails; + RICsubscriptionDetails_t *ricsubscription_ie = &ies_subscription->value.choice.RICsubscriptionDetails; + + // RICeventTriggerDefinition + RICeventTriggerDefinition_t *eventTrigger = &ricsubscription_ie->ricEventTriggerDefinition; + eventTrigger->buf = (uint8_t *)calloc(1, eventTriggerDefinitionSize); + if(!eventTrigger->buf) { + fprintf(stderr, "alloc eventTrigger failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + memcpy(eventTrigger->buf, eventTriggerDefinition, eventTriggerDefinitionSize); + eventTrigger->size = eventTriggerDefinitionSize; + + // RICactions-ToBeSetup-List + RICactions_ToBeSetup_List_t *ricActions = &ricsubscription_ie->ricAction_ToBeSetup_List; + int index = 0; + while (index < actionCount) { + RICaction_ToBeSetup_ItemIEs_t *ies_action = (RICaction_ToBeSetup_ItemIEs_t *)calloc(1, sizeof(RICaction_ToBeSetup_ItemIEs_t)); + if(!ies_action) { + fprintf(stderr, "alloc RICaction failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + ies_action->criticality = Criticality_reject; + ies_action->id = ProtocolIE_ID_id_RICaction_ToBeSetup_Item; + ies_action->value.present = RICaction_ToBeSetup_ItemIEs__value_PR_RICaction_ToBeSetup_Item; + RICaction_ToBeSetup_Item_t *ricaction_ie = &ies_action->value.choice.RICaction_ToBeSetup_Item; + ricaction_ie->ricActionID = actionIds[index]; + ricaction_ie->ricActionType = actionTypes[index]; + + int actionDefinitionSize = actionDefinitions[index].size; + if(actionDefinitionSize != 0) { + RICactionDefinition_t *actionDefinition = ricaction_ie->ricActionDefinition; + + actionDefinition->buf = (uint8_t *)calloc(1, actionDefinitionSize); + if(!actionDefinition->buf) { + fprintf(stderr, "alloc actionDefinition[%d] failed\n", index); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + memcpy(actionDefinition->buf, actionDefinitions[index].actionDefinition, actionDefinitionSize); + actionDefinition->size = actionDefinitionSize; + } + + if(subsequentActionTypes[index].isValid != 0) { + RICsubsequentAction_t *subsequentAction = ricaction_ie->ricSubsequentAction; + subsequentAction->ricSubsequentActionType = subsequentActionTypes[index].subsequentActionType; + subsequentAction->ricTimeToWait = subsequentActionTypes[index].timeToWait; + } + + ASN_SEQUENCE_ADD(&ricActions->list, ies_action); + index++; + } + ASN_SEQUENCE_ADD(&subscription_request->protocolIEs.list, ies_subscription); + + return encode_E2AP_PDU(init, buffer, buf_size); +} + +/* RICsubscriptionResponse */ +long e2ap_get_ric_subscription_response_sequence_number(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_successfulOutcome ) + { + SuccessfulOutcome_t* successfulOutcome = pdu->choice.successfulOutcome; + if ( successfulOutcome->procedureCode == ProcedureCode_id_RICsubscription + && successfulOutcome->value.present == SuccessfulOutcome__value_PR_RICsubscriptionResponse) + { + RICsubscriptionResponse_t *ricSubscriptionResponse = &successfulOutcome->value.choice.RICsubscriptionResponse; + for (int i = 0; i < ricSubscriptionResponse->protocolIEs.list.count; ++i ) + { + if ( ricSubscriptionResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + long sequenceNumber = ricSubscriptionResponse->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return sequenceNumber; + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +ssize_t e2ap_set_ric_subscription_response_sequence_number(void *buffer, size_t buf_size, long sequence_number) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_successfulOutcome ) + { + SuccessfulOutcome_t* successfulOutcome = pdu->choice.successfulOutcome; + if ( successfulOutcome->procedureCode == ProcedureCode_id_RICsubscription + && successfulOutcome->value.present == SuccessfulOutcome__value_PR_RICsubscriptionResponse) + { + RICsubscriptionResponse_t *ricSubscriptionResponse = &successfulOutcome->value.choice.RICsubscriptionResponse; + for (int i = 0; i < ricSubscriptionResponse->protocolIEs.list.count; ++i ) + { + if ( ricSubscriptionResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + ricSubscriptionResponse->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID = sequence_number; + return encode_E2AP_PDU(pdu, buffer, buf_size); + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +RICsubscriptionResponseMsg* e2ap_decode_ric_subscription_response_message(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_successfulOutcome) + { + SuccessfulOutcome_t* successfulOutcome = pdu->choice.successfulOutcome; + if ( successfulOutcome->procedureCode == ProcedureCode_id_RICsubscription + && successfulOutcome->value.present == SuccessfulOutcome__value_PR_RICsubscriptionResponse) + { + RICsubscriptionResponse_t *subscriptionResponse = &(successfulOutcome->value.choice.RICsubscriptionResponse); + RICsubscriptionResponseMsg *msg = (RICsubscriptionResponseMsg *)calloc(1, sizeof(RICsubscriptionResponseMsg)); + for (int i = 0; i < subscriptionResponse->protocolIEs.list.count; ++i ) + { + if (subscriptionResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID) { + msg->requestorID = subscriptionResponse->protocolIEs.list.array[i]->value.choice.RICrequestID.ricRequestorID; + msg->requestSequenceNumber = subscriptionResponse->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + } + else if (subscriptionResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RANfunctionID) { + msg->ranfunctionID = subscriptionResponse->protocolIEs.list.array[i]->value.choice.RANfunctionID; + } + else if (subscriptionResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICactions_Admitted) { + RICaction_Admitted_List_t *ricActionAdmittedList = &(subscriptionResponse->protocolIEs.list.array[i]->value.choice.RICaction_Admitted_List); + int index = 0; + while (index < ricActionAdmittedList->list.count) { + RICaction_Admitted_ItemIEs_t *ricActionAdmittedItem = (RICaction_Admitted_ItemIEs_t *)ricActionAdmittedList->list.array[index]; + if (ricActionAdmittedItem->id == ProtocolIE_ID_id_RICaction_Admitted_Item) { + msg->ricActionAdmittedList.ricActionID[index] = ricActionAdmittedItem->value.choice.RICaction_Admitted_Item.ricActionID; + } + index++; + } + msg->ricActionAdmittedList.count = index; + } + else if (subscriptionResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICactions_NotAdmitted) { + RICaction_NotAdmitted_List_t *ricActionNotAdmittedList = &(subscriptionResponse->protocolIEs.list.array[i]->value.choice.RICaction_NotAdmitted_List); + int index = 0; + while (index < ricActionNotAdmittedList->list.count) { + RICaction_NotAdmitted_ItemIEs_t *ricActionNotAdmittedItem = (RICaction_NotAdmitted_ItemIEs_t *)ricActionNotAdmittedList->list.array[index]; + if (ricActionNotAdmittedItem->id == ProtocolIE_ID_id_RICaction_NotAdmitted_Item) { + msg->ricActionNotAdmittedList.ricActionID[index] = ricActionNotAdmittedItem->value.choice.RICaction_NotAdmitted_Item.ricActionID; + int RICcauseType = ricActionNotAdmittedItem->value.choice.RICaction_NotAdmitted_Item.cause.present; + switch(RICcauseType) { + case Cause_PR_ricRequest: + msg->ricActionNotAdmittedList.ricCause[index].ricCauseType = Cause_PR_ricRequest; + msg->ricActionNotAdmittedList.ricCause[index].ricCauseID = ricActionNotAdmittedItem->value.choice.RICaction_NotAdmitted_Item.cause.choice.ricRequest; + break; + case Cause_PR_ricService: + msg->ricActionNotAdmittedList.ricCause[index].ricCauseType = Cause_PR_ricService; + msg->ricActionNotAdmittedList.ricCause[index].ricCauseID = ricActionNotAdmittedItem->value.choice.RICaction_NotAdmitted_Item.cause.choice.ricService; + break; + case Cause_PR_transport: + msg->ricActionNotAdmittedList.ricCause[index].ricCauseType = Cause_PR_transport; + msg->ricActionNotAdmittedList.ricCause[index].ricCauseID = ricActionNotAdmittedItem->value.choice.RICaction_NotAdmitted_Item.cause.choice.transport; + break; + case Cause_PR_protocol: + msg->ricActionNotAdmittedList.ricCause[index].ricCauseType = Cause_PR_protocol; + msg->ricActionNotAdmittedList.ricCause[index].ricCauseID = ricActionNotAdmittedItem->value.choice.RICaction_NotAdmitted_Item.cause.choice.protocol; + break; + case Cause_PR_misc: + msg->ricActionNotAdmittedList.ricCause[index].ricCauseType = Cause_PR_misc; + msg->ricActionNotAdmittedList.ricCause[index].ricCauseID = ricActionNotAdmittedItem->value.choice.RICaction_NotAdmitted_Item.cause.choice.misc; + break; + } + } + index++; + } + msg->ricActionNotAdmittedList.count = index; + } + } + return msg; + } + } + return NULL; +} + +/* RICsubscriptionFailure */ +long e2ap_get_ric_subscription_failure_sequence_number(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_unsuccessfulOutcome ) + { + UnsuccessfulOutcome_t* unsuccessfulOutcome = pdu->choice.unsuccessfulOutcome; + if ( unsuccessfulOutcome->procedureCode == ProcedureCode_id_RICsubscription + && unsuccessfulOutcome->value.present == UnsuccessfulOutcome__value_PR_RICsubscriptionFailure) + { + RICsubscriptionFailure_t *ricSubscriptionFailure = &unsuccessfulOutcome->value.choice.RICsubscriptionFailure; + for (int i = 0; i < ricSubscriptionFailure->protocolIEs.list.count; ++i ) + { + if ( ricSubscriptionFailure->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + long sequenceNumber = ricSubscriptionFailure->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return sequenceNumber; + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +/* RICsubscriptionDeleteRequest */ +long e2ap_get_ric_subscription_delete_request_sequence_number(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_initiatingMessage ) + { + InitiatingMessage_t* initiatingMessage = pdu->choice.initiatingMessage; + if ( initiatingMessage->procedureCode == ProcedureCode_id_RICsubscriptionDelete + && initiatingMessage->value.present == InitiatingMessage__value_PR_RICsubscriptionDeleteRequest ) + { + RICsubscriptionDeleteRequest_t *subscriptionDeleteRequest = &initiatingMessage->value.choice.RICsubscriptionDeleteRequest; + for (int i = 0; i < subscriptionDeleteRequest->protocolIEs.list.count; ++i ) + { + if ( subscriptionDeleteRequest->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + long sequenceNumber = subscriptionDeleteRequest->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return sequenceNumber; + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +ssize_t e2ap_set_ric_subscription_delete_request_sequence_number(void *buffer, size_t buf_size, long sequence_number) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_initiatingMessage ) + { + InitiatingMessage_t* initiatingMessage = pdu->choice.initiatingMessage; + if ( initiatingMessage->procedureCode == ProcedureCode_id_RICsubscriptionDelete + && initiatingMessage->value.present == InitiatingMessage__value_PR_RICsubscriptionDeleteRequest ) + { + RICsubscriptionDeleteRequest_t* subscriptionDeleteRequest = &initiatingMessage->value.choice.RICsubscriptionDeleteRequest; + for (int i = 0; i < subscriptionDeleteRequest->protocolIEs.list.count; ++i ) + { + if ( subscriptionDeleteRequest->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + subscriptionDeleteRequest->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID = sequence_number; + return encode_E2AP_PDU(pdu, buffer, buf_size); + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +ssize_t e2ap_encode_ric_subscription_delete_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID) +{ + E2AP_PDU_t *init = (E2AP_PDU_t *)calloc(1, sizeof(E2AP_PDU_t)); + if(!init) { + fprintf(stderr, "alloc E2AP_PDU failed\n"); + return -1; + } + + InitiatingMessage_t *initiatingMsg = (InitiatingMessage_t *)calloc(1, sizeof(InitiatingMessage_t)); + if(!initiatingMsg) { + fprintf(stderr, "alloc InitiatingMessage failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + init->choice.initiatingMessage = initiatingMsg; + init->present = E2AP_PDU_PR_initiatingMessage; + + initiatingMsg->procedureCode = ProcedureCode_id_RICsubscriptionDelete; + initiatingMsg->criticality = Criticality_reject; + initiatingMsg->value.present = InitiatingMessage__value_PR_RICsubscriptionDeleteRequest; + + RICsubscriptionDeleteRequest_t *subscription_delete_request = &initiatingMsg->value.choice.RICsubscriptionDeleteRequest; + + // request contains 2 IEs + + // RICrequestID + RICsubscriptionDeleteRequest_IEs_t *ies_reqID = (RICsubscriptionDeleteRequest_IEs_t *)calloc(1, sizeof(RICsubscriptionDeleteRequest_IEs_t)); + if(!ies_reqID) { + fprintf(stderr, "alloc RICrequestID failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + ies_reqID->criticality = Criticality_reject; + ies_reqID->id = ProtocolIE_ID_id_RICrequestID; + ies_reqID->value.present = RICsubscriptionDeleteRequest_IEs__value_PR_RICrequestID; + RICrequestID_t *ricrequest_ie = &ies_reqID->value.choice.RICrequestID; + ricrequest_ie->ricRequestorID = ricRequestorID; + ricrequest_ie->ricInstanceID = ricRequestSequenceNumber; + ASN_SEQUENCE_ADD(&subscription_delete_request->protocolIEs.list, ies_reqID); + + // RICfunctionID + RICsubscriptionDeleteRequest_IEs_t *ies_ranfunc = (RICsubscriptionDeleteRequest_IEs_t *)calloc(1, sizeof(RICsubscriptionDeleteRequest_IEs_t)); + if(!ies_ranfunc) { + fprintf(stderr, "alloc RICfunctionID failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + ies_ranfunc->criticality = Criticality_reject; + ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; + ies_ranfunc->value.present = RICsubscriptionDeleteRequest_IEs__value_PR_RANfunctionID; + RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; + *ranfunction_ie = ranFunctionID; + ASN_SEQUENCE_ADD(&subscription_delete_request->protocolIEs.list, ies_ranfunc); + + return encode_E2AP_PDU(init, buffer, buf_size); +} + +/* RICsubscriptionDeleteResponse */ +long e2ap_get_ric_subscription_delete_response_sequence_number(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_successfulOutcome ) + { + SuccessfulOutcome_t* successfulOutcome = pdu->choice.successfulOutcome; + if ( successfulOutcome->procedureCode == ProcedureCode_id_RICsubscriptionDelete + && successfulOutcome->value.present == SuccessfulOutcome__value_PR_RICsubscriptionDeleteResponse ) + { + RICsubscriptionDeleteResponse_t* subscriptionDeleteResponse = &successfulOutcome->value.choice.RICsubscriptionDeleteResponse; + for (int i = 0; i < subscriptionDeleteResponse->protocolIEs.list.count; ++i ) + { + if ( subscriptionDeleteResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + long sequenceNumber = subscriptionDeleteResponse->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return sequenceNumber; + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +ssize_t e2ap_set_ric_subscription_delete_response_sequence_number(void *buffer, size_t buf_size, long sequence_number) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_successfulOutcome ) + { + SuccessfulOutcome_t* successfulOutcome = pdu->choice.successfulOutcome; + if ( successfulOutcome->procedureCode == ProcedureCode_id_RICsubscriptionDelete + && successfulOutcome->value.present == SuccessfulOutcome__value_PR_RICsubscriptionDeleteResponse ) + { + RICsubscriptionDeleteResponse_t* subscriptionDeleteResponse = &successfulOutcome->value.choice.RICsubscriptionDeleteResponse; + for (int i = 0; i < subscriptionDeleteResponse->protocolIEs.list.count; ++i ) + { + if ( subscriptionDeleteResponse->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + subscriptionDeleteResponse->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID = sequence_number; + return encode_E2AP_PDU(pdu, buffer, buf_size); + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +/* RICsubscriptionDeleteFailure */ +long e2ap_get_ric_subscription_delete_failure_sequence_number(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_unsuccessfulOutcome ) + { + UnsuccessfulOutcome_t* unsuccessfulOutcome = pdu->choice.unsuccessfulOutcome; + if ( unsuccessfulOutcome->procedureCode == ProcedureCode_id_RICsubscriptionDelete + && unsuccessfulOutcome->value.present == UnsuccessfulOutcome__value_PR_RICsubscriptionDeleteFailure) + { + RICsubscriptionDeleteFailure_t *ricSubscriptionDeleteFailure = &unsuccessfulOutcome->value.choice.RICsubscriptionDeleteFailure; + for (int i = 0; i < ricSubscriptionDeleteFailure->protocolIEs.list.count; ++i ) + { + if ( ricSubscriptionDeleteFailure->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID ) + { + long sequenceNumber = ricSubscriptionDeleteFailure->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return sequenceNumber; + } + } + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return -1; +} + +/* RICindication */ + +RICindicationMsg* e2ap_decode_ric_indication_message(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_initiatingMessage) + { + InitiatingMessage_t* initiatingMessage = pdu->choice.initiatingMessage; + if ( initiatingMessage->procedureCode == ProcedureCode_id_RICindication + && initiatingMessage->value.present == InitiatingMessage__value_PR_RICindication) + { + RICindication_t *indication = &(initiatingMessage->value.choice.RICindication); + RICindicationMsg *msg = (RICindicationMsg *)calloc(1, sizeof(RICindicationMsg)); + for (int i = 0; i < indication->protocolIEs.list.count; ++i ) + { + if (indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID) { + msg->requestorID = indication->protocolIEs.list.array[i]->value.choice.RICrequestID.ricRequestorID; + msg->requestSequenceNumber = indication->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + } + else if (indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RANfunctionID) { + msg->ranfunctionID = indication->protocolIEs.list.array[i]->value.choice.RANfunctionID; + } + else if (indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICactionID) { + msg->actionID = indication->protocolIEs.list.array[i]->value.choice.RICactionID; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationSN) { + msg->indicationSN = indication->protocolIEs.list.array[i]->value.choice.RICindicationSN; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationType) { + msg->indicationType = indication->protocolIEs.list.array[i]->value.choice.RICindicationType; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationHeader) { + size_t headerSize = indication->protocolIEs.list.array[i]->value.choice.RICindicationHeader.size; + msg->indicationHeader = calloc(1, headerSize); + if (!msg->indicationHeader) { + fprintf(stderr, "alloc RICindicationHeader failed\n"); + e2ap_free_decoded_ric_indication_message(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->indicationHeader, indication->protocolIEs.list.array[i]->value.choice.RICindicationHeader.buf, headerSize); + msg->indicationHeaderSize = headerSize; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationMessage) { + size_t messsageSize = indication->protocolIEs.list.array[i]->value.choice.RICindicationMessage.size; + msg->indicationMessage = calloc(1, messsageSize); + if (!msg->indicationMessage) { + fprintf(stderr, "alloc RICindicationMessage failed\n"); + e2ap_free_decoded_ric_indication_message(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->indicationMessage, indication->protocolIEs.list.array[i]->value.choice.RICindicationMessage.buf, messsageSize); + msg->indicationMessageSize = messsageSize; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICcallProcessID) { + size_t callProcessIDSize = indication->protocolIEs.list.array[i]->value.choice.RICcallProcessID.size; + msg->callProcessID = calloc(1, callProcessIDSize); + if (!msg->callProcessID) { + fprintf(stderr, "alloc RICcallProcessID failed\n"); + e2ap_free_decoded_ric_indication_message(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->callProcessID, indication->protocolIEs.list.array[i]->value.choice.RICcallProcessID.buf, callProcessIDSize); + msg->callProcessIDSize = callProcessIDSize; + } + } + return msg; + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; +} + + +RICindicationMsg* e2ap_decode_ric_indication_m() +{ + + + FILE *fp3 = fopen("sandy3.txt", "r"); + if (fp3==NULL) + { + printf("\nFAILED TO OPEN FILE SANDY3.TXT"); + return NULL; + } + fseek(fp3, 0L, SEEK_END); + long numbytes = ftell(fp3); + fseek(fp3, 0L, SEEK_SET); + char* text = (char*)calloc(numbytes, sizeof(char)); + fread(text, sizeof(char), numbytes, fp3); + fclose(fp3); + printf(text); + E2AP_PDU_t *pdu=0; + asn_dec_rval_t lol =xer_decode(0,&asn_DEF_E2AP_PDU, (void **)&pdu,text,numbytes); + printf("\nxer decode result =%d",lol.code); + FILE *fp4 = fopen("sandy4.txt", "w"); + int r2=asn_fprint(fp4,&asn_DEF_E2AP_PDU,pdu); + fclose(fp4); + if (r2==-1) + fprintf(stderr, "failed asn_fprint r2\n"); + else + fprintf(stderr, "successfull asn_fprint r2\n"); + + + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_initiatingMessage) + { + InitiatingMessage_t* initiatingMessage = pdu->choice.initiatingMessage; + if ( initiatingMessage->procedureCode == ProcedureCode_id_RICindication + && initiatingMessage->value.present == InitiatingMessage__value_PR_RICindication) + { + RICindication_t *indication = &(initiatingMessage->value.choice.RICindication); + RICindicationMsg *msg = (RICindicationMsg *)calloc(1, sizeof(RICindicationMsg)); + for (int i = 0; i < indication->protocolIEs.list.count; ++i ) + { + if (indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID) { + msg->requestorID = indication->protocolIEs.list.array[i]->value.choice.RICrequestID.ricRequestorID; + msg->requestSequenceNumber = indication->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + } + else if (indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RANfunctionID) { + msg->ranfunctionID = indication->protocolIEs.list.array[i]->value.choice.RANfunctionID; + } + else if (indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICactionID) { + msg->actionID = indication->protocolIEs.list.array[i]->value.choice.RICactionID; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationSN) { + msg->indicationSN = indication->protocolIEs.list.array[i]->value.choice.RICindicationSN; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationType) { + msg->indicationType = indication->protocolIEs.list.array[i]->value.choice.RICindicationType; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationHeader) { + size_t headerSize = indication->protocolIEs.list.array[i]->value.choice.RICindicationHeader.size; + msg->indicationHeader = calloc(1, headerSize); + if (!msg->indicationHeader) { + fprintf(stderr, "alloc RICindicationHeader failed\n"); + e2ap_free_decoded_ric_indication_message(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->indicationHeader, indication->protocolIEs.list.array[i]->value.choice.RICindicationHeader.buf, headerSize); + msg->indicationHeaderSize = headerSize; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICindicationMessage) { + size_t messsageSize = indication->protocolIEs.list.array[i]->value.choice.RICindicationMessage.size; + msg->indicationMessage = calloc(1, messsageSize); + if (!msg->indicationMessage) { + fprintf(stderr, "alloc RICindicationMessage failed\n"); + e2ap_free_decoded_ric_indication_message(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->indicationMessage, indication->protocolIEs.list.array[i]->value.choice.RICindicationMessage.buf, messsageSize); + msg->indicationMessageSize = messsageSize; + } + else if(indication->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICcallProcessID) { + size_t callProcessIDSize = indication->protocolIEs.list.array[i]->value.choice.RICcallProcessID.size; + msg->callProcessID = calloc(1, callProcessIDSize); + if (!msg->callProcessID) { + fprintf(stderr, "alloc RICcallProcessID failed\n"); + e2ap_free_decoded_ric_indication_message(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->callProcessID, indication->protocolIEs.list.array[i]->value.choice.RICcallProcessID.buf, callProcessIDSize); + msg->callProcessIDSize = callProcessIDSize; + } + } +/* + RICindicationHeader_t *hdr; + hdr=calloc(1, sizeof(RICindicationHeader_t)); + memcpy( hdr->buf,msg->indicationHeader,msg->indicationHeaderSize); + hdr->size=msg->indicationHeaderSize; + xer_fprint(stdout, &asn_DEF_RICindicationHeader,hdr); + RICindicationMessage_t *indm; + indm=calloc(1, sizeof(RICindicationMessage_t)); + memcpy(indm->buf, msg->indicationMessage,msg->indicationMessageSize); + indm->size=msg->indicationMessageSize; + xer_fprint(stdout, &asn_DEF_RICindicationMessage, indm); +*/ +// fprintf(stderr, "\nreturning msg\n"); + + return msg; + } + } + //fprintf(stderr, "\nreturning null"); + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; +} + +void e2ap_free_decoded_ric_indication_message(RICindicationMsg* msg) { + if(msg == NULL) { + return; + } + + if(msg->indicationHeader != NULL) { + free(msg->indicationHeader); + msg->indicationHeader = NULL; + } + if(msg->indicationMessage != NULL) { + free(msg->indicationMessage); + msg->indicationMessage = NULL; + } + if(msg->callProcessID != NULL) { + free(msg->callProcessID); + msg->callProcessID = NULL; + } + free(msg); + msg = NULL; +} + +ssize_t e2ap_encode_ric_control_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, + long ranFunctionID, void *ricControlHdr, size_t ricControlHdrSize, void *ricControlMsg, size_t ricControlMsgSize) +{ + + E2AP_PDU_t *init = (E2AP_PDU_t *)calloc(1, sizeof(E2AP_PDU_t)); + if(!init) { + fprintf(stderr, "alloc E2AP_PDU failed\n"); + return -1; + } + + + InitiatingMessage_t *initiatingMsg = (InitiatingMessage_t *)calloc(1, sizeof(InitiatingMessage_t)); + if(!initiatingMsg) { + fprintf(stderr, "alloc InitiatingMessage failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + init->choice.initiatingMessage = initiatingMsg; + init->present = E2AP_PDU_PR_initiatingMessage; + + initiatingMsg->procedureCode = ProcedureCode_id_RICcontrol; + initiatingMsg->criticality = Criticality_reject; + initiatingMsg->value.present = InitiatingMessage__value_PR_RICcontrolRequest; + + RICcontrolRequest_t *control_request = &initiatingMsg->value.choice.RICcontrolRequest; + + + //RICrequestID + RICcontrolRequest_IEs_t *controlReqID = (RICcontrolRequest_IEs_t *)calloc(1, sizeof(RICcontrolRequest_IEs_t)); + if(!controlReqID) { + fprintf(stderr, "alloc RICrequestID failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + controlReqID->criticality = Criticality_reject; + controlReqID->id = ProtocolIE_ID_id_RICrequestID; + + controlReqID->value.present = RICcontrolRequest_IEs__value_PR_RICrequestID; + RICrequestID_t *ricrequest_ie = &controlReqID->value.choice.RICrequestID; + ricrequest_ie->ricRequestorID = ricRequestorID; + ricrequest_ie->ricInstanceID = ricRequestSequenceNumber; + ASN_SEQUENCE_ADD(&control_request->protocolIEs.list, controlReqID); + + //RICfunctionID + RICcontrolRequest_IEs_t *controlReqFunID = (RICcontrolRequest_IEs_t *)calloc(1, sizeof(RICcontrolRequest_IEs_t)); + if(!controlReqFunID) { + fprintf(stderr, "alloc RICrequestID failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + controlReqFunID->criticality = Criticality_reject; + controlReqFunID->id = ProtocolIE_ID_id_RANfunctionID; + controlReqFunID->value.present = RICcontrolRequest_IEs__value_PR_RANfunctionID; + RANfunctionID_t *ranfunction_ie = &controlReqFunID->value.choice.RANfunctionID; + *ranfunction_ie = ranFunctionID; + ASN_SEQUENCE_ADD(&control_request->protocolIEs.list, controlReqFunID); + + // RICControlHdr + RICcontrolRequest_IEs_t *controlReqHdr = (RICcontrolRequest_IEs_t *)calloc(1, sizeof(RICcontrolRequest_IEs_t)); + if(!controlReqHdr) { + fprintf(stderr, "alloc RICcontrolRequest_IEs_t failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + controlReqHdr->criticality = Criticality_reject; + controlReqHdr->id = ProtocolIE_ID_id_RICcontrolHeader; + controlReqHdr->value.present = RICcontrolRequest_IEs__value_PR_RICcontrolHeader; + RICcontrolHeader_t *controlHdr = &controlReqHdr->value.choice.RICcontrolHeader; + controlHdr->buf = (uint8_t *)calloc(1, ricControlHdrSize); + if(!controlHdr->buf) { + fprintf(stderr, "alloc RICcontrolHeader_t buf failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + memcpy(controlHdr->buf, ricControlHdr, ricControlHdrSize); + controlHdr->size = ricControlHdrSize; + ASN_SEQUENCE_ADD(&control_request->protocolIEs.list, controlReqHdr); + + //Ric Control Message + RICcontrolRequest_IEs_t *controlReqMsg = (RICcontrolRequest_IEs_t *)calloc(1, sizeof(RICcontrolRequest_IEs_t)); + if(!controlReqMsg) { + fprintf(stderr, "alloc RICcontrolRequest_IEs_t failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + controlReqMsg->criticality = Criticality_reject; + controlReqMsg->id = ProtocolIE_ID_id_RICcontrolMessage; + controlReqMsg->value.present = RICcontrolRequest_IEs__value_PR_RICcontrolMessage; + RICcontrolMessage_t *controlMsg = &controlReqMsg->value.choice.RICcontrolMessage; + controlMsg->buf = (uint8_t *)calloc(1, ricControlMsgSize); + if(!controlMsg->buf) { + fprintf(stderr, "alloc RICcontrolMessage_t buf failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, init); + return -1; + } + + memcpy(controlMsg->buf, ricControlMsg, ricControlMsgSize); + controlMsg->size = ricControlMsgSize; + ASN_SEQUENCE_ADD(&control_request->protocolIEs.list, controlReqMsg); + + fprintf(stderr, "showing xer of asn_DEF_E2AP_PDU data\n"); + xer_fprint(stderr, &asn_DEF_E2AP_PDU, init); + fprintf(stderr, "\n"); + fprintf(stderr, "After xer of asn_DEF_E2AP_PDU data\n"); + + return encode_E2AP_PDU(init, buffer, buf_size); +} + +RICControlAcknowledge* e2ap_decode_ric_control_acknowledge_message(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_successfulOutcome) + { + SuccessfulOutcome_t* successfulOutcome = pdu->choice.successfulOutcome; + if ( successfulOutcome->procedureCode == ProcedureCode_id_RICcontrol + && successfulOutcome->value.present == SuccessfulOutcome__value_PR_RICcontrolAcknowledge) + { + RICcontrolAcknowledge_t *controlAck = &(successfulOutcome->value.choice.RICcontrolAcknowledge); + RICControlAcknowledge *msg = (RICControlAcknowledge *)calloc(1, sizeof(RICControlAcknowledge)); + int i = 0; + for (i; i < controlAck->protocolIEs.list.count; ++i ) + { + if(controlAck->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID) + { + msg->requestorID = controlAck->protocolIEs.list.array[i]->value.choice.RICrequestID.ricRequestorID; + msg->instanceID = controlAck->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + } + else if (controlAck->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RANfunctionID) { + msg->ranfunctionID = controlAck->protocolIEs.list.array[i]->value.choice.RANfunctionID; + } + else if(controlAck->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICcallProcessID) { + size_t callProcessIDSize = controlAck->protocolIEs.list.array[i]->value.choice.RICcallProcessID.size; + msg->callProcessID = calloc(1, callProcessIDSize); + if (!msg->callProcessID) { + fprintf(stderr, "alloc RICcallProcessID failed\n"); + e2ap_free_decoded_ric_control_ack(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->callProcessID, controlAck->protocolIEs.list.array[i]->value.choice.RICcallProcessID.buf, callProcessIDSize); + msg->callProcessIDSize = callProcessIDSize; + } + else if(controlAck->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICcontrolOutcome) { + size_t ricControlOutComeSize = controlAck->protocolIEs.list.array[i]->value.choice.RICcontrolOutcome.size; + msg->ricControlOutCome = calloc(1, ricControlOutComeSize); + if (!msg->ricControlOutCome) { + fprintf(stderr, "alloc ricControlOutCome failed\n"); + e2ap_free_decoded_ric_control_ack(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->ricControlOutCome, controlAck->protocolIEs.list.array[i]->value.choice.RICcontrolOutcome.buf, ricControlOutComeSize); + msg->ricControlOutComeSize = ricControlOutComeSize; + } + } + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return msg; + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; +} + +void e2ap_free_decoded_ric_control_ack(RICControlAcknowledge* msg) { + if(msg == NULL) { + return; + } + if(msg->callProcessID != NULL) { + free(msg->callProcessID); + msg->callProcessID = NULL; + } + if(msg->ricControlOutCome != NULL) { + free(msg->ricControlOutCome); + msg->ricControlOutCome = NULL; + } + free(msg); + msg = NULL; +} + +RICControlFailure* e2ap_decode_ric_control_failure_message(void *buffer, size_t buf_size) +{ + E2AP_PDU_t *pdu = decode_E2AP_PDU(buffer, buf_size); + if ( pdu != NULL && pdu->present == E2AP_PDU_PR_unsuccessfulOutcome) + { + UnsuccessfulOutcome_t* unSuccessfulOutcome = pdu->choice.unsuccessfulOutcome; + if ( unSuccessfulOutcome->procedureCode == ProcedureCode_id_RICcontrol + && unSuccessfulOutcome->value.present == UnsuccessfulOutcome__value_PR_RICcontrolFailure) + { + RICcontrolFailure_t *controlFailure = &(unSuccessfulOutcome->value.choice.RICcontrolFailure); + RICControlFailure *msg = (RICControlFailure *)calloc(1, sizeof(RICControlFailure)); + int i = 0; + for (i; i < controlFailure->protocolIEs.list.count; ++i ) + { + if(controlFailure->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICrequestID) + { + msg->requestorID = controlFailure->protocolIEs.list.array[i]->value.choice.RICrequestID.ricRequestorID; + msg->instanceID = controlFailure->protocolIEs.list.array[i]->value.choice.RICrequestID.ricInstanceID; + } + else if (controlFailure->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RANfunctionID) { + msg->ranfunctionID = controlFailure->protocolIEs.list.array[i]->value.choice.RANfunctionID; + } + else if(controlFailure->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICcallProcessID) { + size_t callProcessIDSize = controlFailure->protocolIEs.list.array[i]->value.choice.RICcallProcessID.size; + msg->callProcessID = calloc(1, callProcessIDSize); + if (!msg->callProcessID) { + fprintf(stderr, "alloc RICcallProcessID failed\n"); + e2ap_free_decoded_ric_control_failure(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->callProcessID, controlFailure->protocolIEs.list.array[i]->value.choice.RICcallProcessID.buf, callProcessIDSize); + msg->callProcessIDSize = callProcessIDSize; + } + else if(controlFailure->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICcontrolOutcome) { + msg->causeType = controlFailure->protocolIEs.list.array[i]->value.choice.Cause.present; + if (msg->causeType == Cause_PR_ricRequest) { + msg->causeValue = controlFailure->protocolIEs.list.array[i]->value.choice.Cause.choice.ricRequest; + } else if (msg->causeType == Cause_PR_ricService) { + msg->causeValue = controlFailure->protocolIEs.list.array[i]->value.choice.Cause.choice.ricService; + } else if (msg->causeType == Cause_PR_transport) { + msg->causeValue = controlFailure->protocolIEs.list.array[i]->value.choice.Cause.choice.transport; + } else if (msg->causeType == Cause_PR_protocol) { + msg->causeValue = controlFailure->protocolIEs.list.array[i]->value.choice.Cause.choice.protocol; + } else if (msg->causeType == Cause_PR_misc) { + msg->causeValue = controlFailure->protocolIEs.list.array[i]->value.choice.Cause.choice.misc; + }else { + msg->causeType == Cause_PR_NOTHING; + } + } + else if(controlFailure->protocolIEs.list.array[i]->id == ProtocolIE_ID_id_RICcontrolOutcome) { + size_t ricControlOutComeSize = controlFailure->protocolIEs.list.array[i]->value.choice.RICcontrolOutcome.size; + msg->ricControlOutCome = calloc(1, ricControlOutComeSize); + if (!msg->ricControlOutCome) { + fprintf(stderr, "alloc ricControlOutCome failed\n"); + e2ap_free_decoded_ric_control_failure(msg); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + return NULL; + } + + memcpy(msg->ricControlOutCome, controlFailure->protocolIEs.list.array[i]->value.choice.RICcontrolOutcome.buf, ricControlOutComeSize); + msg->ricControlOutComeSize = ricControlOutComeSize; + + } + } + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + + return msg; + } + } + + if(pdu != NULL) + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); + + return NULL; +} + +void e2ap_free_decoded_ric_control_failure(RICControlFailure* msg) { + if(msg == NULL) { + return; + } + if(msg->callProcessID != NULL) { + free(msg->callProcessID); + msg->callProcessID = NULL; + } + if(msg->ricControlOutCome != NULL) { + free(msg->ricControlOutCome); + msg->ricControlOutCome = NULL; + } + free(msg); + msg = NULL; +} + diff --git a/Bouncer/e2ap/wrapper.h b/Bouncer/e2ap/wrapper.h new file mode 100644 index 0000000..49e5e2e --- /dev/null +++ b/Bouncer/e2ap/wrapper.h @@ -0,0 +1,136 @@ +#ifndef _WRAPPER_E2AP_H_ +#define _WRAPPER_E2AP_H_ +#include +#include +#include "RICsubscriptionRequest.h" +#include "RICsubscriptionResponse.h" +#include "RICsubscriptionDeleteRequest.h" +#include "RICsubscriptionDeleteResponse.h" +#include "RICcontrolRequest.h" +#include "RICindication.h" +#include "E2AP-PDU.h" +#include "InitiatingMessage.h" +#include "SuccessfulOutcome.h" +#include "UnsuccessfulOutcome.h" +#include "ProtocolIE-Container.h" +#include "ProtocolIE-Field.h" +#include "RICactionDefinition.h" +#include "RICsubsequentAction.h" +#include "CauseRIC.h" + +typedef struct RICControlAcknowledgeMsg { + long requestorID; + long instanceID; + long ranfunctionID; + uint8_t *callProcessID; + size_t callProcessIDSize; + uint8_t *ricControlOutCome; + size_t ricControlOutComeSize; +}RICControlAcknowledge; + +typedef struct RICControlFailureMsg { + long requestorID; + long instanceID; + long ranfunctionID; + uint8_t *callProcessID; + size_t callProcessIDSize; + uint8_t *ricControlOutCome; + size_t ricControlOutComeSize; + int causeType; + long causeValue; + +}RICControlFailure; + +typedef struct RICindicationMessage { + long requestorID; + long requestSequenceNumber; + long ranfunctionID; + long actionID; + long indicationSN; + long indicationType; + uint8_t *indicationHeader; + size_t indicationHeaderSize; + uint8_t *indicationMessage; + size_t indicationMessageSize; + uint8_t *callProcessID; + size_t callProcessIDSize; +} RICindicationMsg; + +typedef struct RICcauseItem { + int ricCauseType; + long ricCauseID; +} RICcauseItem; + +typedef struct RICactionAdmittedList { + long ricActionID[16]; + int count; +} RICactionAdmittedList; + +typedef struct RICactionNotAdmittedList { + long ricActionID[16]; + RICcauseItem ricCause[16]; + int count; +} RICactionNotAdmittedList; + +typedef struct RICsubscriptionResponseMessage { + long requestorID; + long requestSequenceNumber; + long ranfunctionID; + RICactionAdmittedList ricActionAdmittedList; + RICactionNotAdmittedList ricActionNotAdmittedList; +} RICsubscriptionResponseMsg; + +typedef struct RICactionDefinition { + uint8_t *actionDefinition; + int size; +} RICactionDefinition; + +typedef struct RICSubsequentAction { + int isValid; + long subsequentActionType; + long timeToWait; +} RICSubsequentAction; + +size_t encode_E2AP_PDU(E2AP_PDU_t* pdu, void* buffer, size_t buf_size); +E2AP_PDU_t* decode_E2AP_PDU(const void* buffer, size_t buf_size); + +/* RICsubscriptionRequest */ +long e2ap_get_ric_subscription_request_sequence_number(void *buffer, size_t buf_size); +ssize_t e2ap_set_ric_subscription_request_sequence_number(void *buffer, size_t buf_size, long sequence_number); +ssize_t e2ap_encode_ric_subscription_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID, void *eventTriggerDefinition, size_t eventTriggerDefinitionSize, int actionCount, long *actionIds, long* actionTypes, RICactionDefinition *actionDefinitions, RICSubsequentAction *subsequentActionTypes); + +/* RICsubscriptionResponse */ +long e2ap_get_ric_subscription_response_sequence_number(void *buffer, size_t buf_size); +ssize_t e2ap_set_ric_subscription_response_sequence_number(void *buffer, size_t buf_size, long sequence_number); +RICsubscriptionResponseMsg* e2ap_decode_ric_subscription_response_message(void *buffer, size_t buf_size); + +/* RICsubscriptionFailure */ +long e2ap_get_ric_subscription_failure_sequence_number(void *buffer, size_t buf_size); + +/* RICsubscriptionDeleteRequest */ +long e2ap_get_ric_subscription_delete_request_sequence_number(void *buffer, size_t buf_size); +ssize_t e2ap_set_ric_subscription_delete_request_sequence_number(void *buffer, size_t buf_size, long sequence_number); +ssize_t e2ap_encode_ric_subscription_delete_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID); + +/* RICsubscriptionDeleteResponse */ +long e2ap_get_ric_subscription_delete_response_sequence_number(void *buffer, size_t buf_size); +ssize_t e2ap_set_ric_subscription_delete_response_sequence_number(void *buffer, size_t buf_size, long sequence_number); + +/* RICsubscriptionDeleteFailure */ +long e2ap_get_ric_subscription_delete_failure_sequence_number(void *buffer, size_t buf_size); + +/* RICindication */ +RICindicationMsg* e2ap_decode_ric_indication_message(void *buffer, size_t buf_size); +RICindicationMsg* e2ap_decode_ric_indication_m(); +void e2ap_free_decoded_ric_indication_message(RICindicationMsg* msg); + +/* RICcontrol */ +ssize_t e2ap_encode_ric_control_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID, void *ricControlHdr, size_t ricControlHdrSize, void *ricControlMsg, size_t ricControlMsgSize); + +RICControlAcknowledge* e2ap_decode_ric_control_acknowledge_message(void *buffer, size_t buf_size); +void e2ap_free_decoded_ric_control_ack(RICControlAcknowledge* msg); + +RICControlFailure* e2ap_decode_ric_control_failure_message(void *buffer, size_t buf_size); +void e2ap_free_decoded_ric_control_failure(RICControlFailure* msg); + +#endif /* _WRAPPER_E2AP_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/AMF-UE-NGAP-ID.h b/Bouncer/e2sm_kpm/headers/AMF-UE-NGAP-ID.h new file mode 100644 index 0000000..f7c3430 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/AMF-UE-NGAP-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _AMF_UE_NGAP_ID_H_ +#define _AMF_UE_NGAP_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "INTEGER.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMF-UE-NGAP-ID */ +typedef INTEGER_t AMF_UE_NGAP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMF_UE_NGAP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMF_UE_NGAP_ID; +asn_struct_free_f AMF_UE_NGAP_ID_free; +asn_struct_print_f AMF_UE_NGAP_ID_print; +asn_constr_check_f AMF_UE_NGAP_ID_constraint; +ber_type_decoder_f AMF_UE_NGAP_ID_decode_ber; +der_type_encoder_f AMF_UE_NGAP_ID_encode_der; +xer_type_decoder_f AMF_UE_NGAP_ID_decode_xer; +xer_type_encoder_f AMF_UE_NGAP_ID_encode_xer; +per_type_decoder_f AMF_UE_NGAP_ID_decode_uper; +per_type_encoder_f AMF_UE_NGAP_ID_encode_uper; +per_type_decoder_f AMF_UE_NGAP_ID_decode_aper; +per_type_encoder_f AMF_UE_NGAP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMF_UE_NGAP_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/AMFPointer.h b/Bouncer/e2sm_kpm/headers/AMFPointer.h new file mode 100644 index 0000000..18c18e2 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/AMFPointer.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _AMFPointer_H_ +#define _AMFPointer_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMFPointer */ +typedef BIT_STRING_t AMFPointer_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMFPointer_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMFPointer; +asn_struct_free_f AMFPointer_free; +asn_struct_print_f AMFPointer_print; +asn_constr_check_f AMFPointer_constraint; +ber_type_decoder_f AMFPointer_decode_ber; +der_type_encoder_f AMFPointer_encode_der; +xer_type_decoder_f AMFPointer_decode_xer; +xer_type_encoder_f AMFPointer_encode_xer; +per_type_decoder_f AMFPointer_decode_uper; +per_type_encoder_f AMFPointer_encode_uper; +per_type_decoder_f AMFPointer_decode_aper; +per_type_encoder_f AMFPointer_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMFPointer_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/AMFRegionID.h b/Bouncer/e2sm_kpm/headers/AMFRegionID.h new file mode 100644 index 0000000..eb94a4b --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/AMFRegionID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _AMFRegionID_H_ +#define _AMFRegionID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMFRegionID */ +typedef BIT_STRING_t AMFRegionID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMFRegionID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMFRegionID; +asn_struct_free_f AMFRegionID_free; +asn_struct_print_f AMFRegionID_print; +asn_constr_check_f AMFRegionID_constraint; +ber_type_decoder_f AMFRegionID_decode_ber; +der_type_encoder_f AMFRegionID_encode_der; +xer_type_decoder_f AMFRegionID_decode_xer; +xer_type_encoder_f AMFRegionID_encode_xer; +per_type_decoder_f AMFRegionID_decode_uper; +per_type_encoder_f AMFRegionID_encode_uper; +per_type_decoder_f AMFRegionID_decode_aper; +per_type_encoder_f AMFRegionID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMFRegionID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/AMFSetID.h b/Bouncer/e2sm_kpm/headers/AMFSetID.h new file mode 100644 index 0000000..6d8c6aa --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/AMFSetID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _AMFSetID_H_ +#define _AMFSetID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMFSetID */ +typedef BIT_STRING_t AMFSetID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMFSetID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMFSetID; +asn_struct_free_f AMFSetID_free; +asn_struct_print_f AMFSetID_print; +asn_constr_check_f AMFSetID_constraint; +ber_type_decoder_f AMFSetID_decode_ber; +der_type_encoder_f AMFSetID_encode_der; +xer_type_decoder_f AMFSetID_decode_xer; +xer_type_encoder_f AMFSetID_encode_xer; +per_type_decoder_f AMFSetID_decode_uper; +per_type_encoder_f AMFSetID_encode_uper; +per_type_decoder_f AMFSetID_decode_aper; +per_type_encoder_f AMFSetID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMFSetID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/ANY.h b/Bouncer/e2sm_kpm/headers/ANY.h new file mode 100644 index 0000000..b30381f --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ANY.h @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_TYPE_ANY_H +#define ASN_TYPE_ANY_H + +#include /* Implemented via OCTET STRING type */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct ANY { + uint8_t *buf; /* BER-encoded ANY contents */ + int size; /* Size of the above buffer */ + + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ +} ANY_t; + +extern asn_TYPE_descriptor_t asn_DEF_ANY; +extern asn_TYPE_operation_t asn_OP_ANY; +extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs; + +asn_struct_free_f ANY_free; +asn_struct_print_f ANY_print; +ber_type_decoder_f ANY_decode_ber; +der_type_encoder_f ANY_encode_der; +xer_type_encoder_f ANY_encode_xer; +per_type_decoder_f ANY_decode_uper; +per_type_encoder_f ANY_encode_uper; +per_type_decoder_f ANY_decode_aper; +per_type_encoder_f ANY_encode_aper; + +#define ANY_free OCTET_STRING_free +#define ANY_print OCTET_STRING_print +#define ANY_compare OCTET_STRING_compare +#define ANY_constraint asn_generic_no_constraint +#define ANY_decode_ber OCTET_STRING_decode_ber +#define ANY_encode_der OCTET_STRING_encode_der +#define ANY_decode_xer OCTET_STRING_decode_xer_hex + +/****************************** + * Handy conversion routines. * + ******************************/ + +/* Convert another ASN.1 type into the ANY. This implies DER encoding. */ +int ANY_fromType(ANY_t *, asn_TYPE_descriptor_t *td, void *struct_ptr); +int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr); +ANY_t *ANY_new_fromType(asn_TYPE_descriptor_t *td, void *struct_ptr); +ANY_t *ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr); + +/* Convert the contents of the ANY type into the specified type. */ +int ANY_to_type(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr); +int ANY_to_type_aper(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr); + +#define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size)) +#define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf( \ + &asn_DEF_ANY, (buf), (size)) + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_TYPE_ANY_H */ diff --git a/Bouncer/e2sm_kpm/headers/BIT_STRING.h b/Bouncer/e2sm_kpm/headers/BIT_STRING.h new file mode 100644 index 0000000..c1bdbbc --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/BIT_STRING.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BIT_STRING_H_ +#define _BIT_STRING_H_ + +#include /* Some help from OCTET STRING */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct BIT_STRING_s { + uint8_t *buf; /* BIT STRING body */ + size_t size; /* Size of the above buffer */ + + int bits_unused;/* Unused trailing bits in the last octet (0..7) */ + + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ +} BIT_STRING_t; + +extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; +extern asn_TYPE_operation_t asn_OP_BIT_STRING; +extern asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs; + +asn_struct_print_f BIT_STRING_print; /* Human-readable output */ +asn_struct_compare_f BIT_STRING_compare; +asn_constr_check_f BIT_STRING_constraint; +xer_type_encoder_f BIT_STRING_encode_xer; +oer_type_decoder_f BIT_STRING_decode_oer; +oer_type_encoder_f BIT_STRING_encode_oer; +per_type_decoder_f BIT_STRING_decode_uper; +per_type_encoder_f BIT_STRING_encode_uper; +asn_random_fill_f BIT_STRING_random_fill; + +#define BIT_STRING_free OCTET_STRING_free +#define BIT_STRING_decode_ber OCTET_STRING_decode_ber +#define BIT_STRING_encode_der OCTET_STRING_encode_der +#define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary +#define BIT_STRING_decode_aper OCTET_STRING_decode_aper +#define BIT_STRING_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _BIT_STRING_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/BMPString.h b/Bouncer/e2sm_kpm/headers/BMPString.h new file mode 100644 index 0000000..af14588 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/BMPString.h @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BMPString_H_ +#define _BMPString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t BMPString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_BMPString; +extern asn_TYPE_operation_t asn_OP_BMPString; +extern asn_OCTET_STRING_specifics_t asn_SPC_BMPString_specs; + +asn_struct_print_f BMPString_print; /* Human-readable output */ +asn_constr_check_f BMPString_constraint; +xer_type_decoder_f BMPString_decode_xer; +xer_type_encoder_f BMPString_encode_xer; + +#define BMPString_free OCTET_STRING_free +#define BMPString_print BMPString_print +#define BMPString_compare OCTET_STRING_compare +#define BMPString_decode_ber OCTET_STRING_decode_ber +#define BMPString_encode_der OCTET_STRING_encode_der +#define BMPString_decode_uper OCTET_STRING_decode_uper +#define BMPString_encode_uper OCTET_STRING_encode_uper +#define BMPString_decode_aper OCTET_STRING_decode_aper +#define BMPString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _BMPString_H_ */ diff --git a/Bouncer/asn1c_defs/BOOLEAN.h b/Bouncer/e2sm_kpm/headers/BOOLEAN.h similarity index 100% rename from Bouncer/asn1c_defs/BOOLEAN.h rename to Bouncer/e2sm_kpm/headers/BOOLEAN.h diff --git a/Bouncer/e2sm_kpm/headers/C-RNTI.h b/Bouncer/e2sm_kpm/headers/C-RNTI.h new file mode 100644 index 0000000..55f2595 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/C-RNTI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _C_RNTI_H_ +#define _C_RNTI_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* C-RNTI */ +typedef OCTET_STRING_t C_RNTI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_C_RNTI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_C_RNTI; +asn_struct_free_f C_RNTI_free; +asn_struct_print_f C_RNTI_print; +asn_constr_check_f C_RNTI_constraint; +ber_type_decoder_f C_RNTI_decode_ber; +der_type_encoder_f C_RNTI_encode_der; +xer_type_decoder_f C_RNTI_decode_xer; +xer_type_encoder_f C_RNTI_encode_xer; +oer_type_decoder_f C_RNTI_decode_oer; +oer_type_encoder_f C_RNTI_encode_oer; +per_type_decoder_f C_RNTI_decode_uper; +per_type_encoder_f C_RNTI_encode_uper; +per_type_decoder_f C_RNTI_decode_aper; +per_type_encoder_f C_RNTI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _C_RNTI_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CGI.h b/Bouncer/e2sm_kpm/headers/CGI.h new file mode 100644 index 0000000..521428d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CGI.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _CGI_H_ +#define _CGI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CGI_PR { + CGI_PR_NOTHING, /* No components present */ + CGI_PR_nR_CGI, + CGI_PR_eUTRA_CGI + /* Extensions may appear below */ + +} CGI_PR; + +/* Forward declarations */ +struct NR_CGI; +struct EUTRA_CGI; + +/* CGI */ +typedef struct CGI { + CGI_PR present; + union CGI_u { + struct NR_CGI *nR_CGI; + struct EUTRA_CGI *eUTRA_CGI; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CGI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CGI; +extern asn_CHOICE_specifics_t asn_SPC_CGI_specs_1; +extern asn_TYPE_member_t asn_MBR_CGI_1[2]; +extern asn_per_constraints_t asn_PER_type_CGI_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _CGI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-CellResourceReportItem.h b/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-CellResourceReportItem.h new file mode 100644 index 0000000..c0e619e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-CellResourceReportItem.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CU_CP_Usage_Report_CellResourceReportItem_H_ +#define _CU_CP_Usage_Report_CellResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "NRCGI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_CP_Usage_Report_UeResourceReportItem; + +/* CU-CP-Usage-Report-CellResourceReportItem */ +typedef struct CU_CP_Usage_Report_CellResourceReportItem { + NRCGI_t nRCGI; + struct CU_CP_Usage_Report_CellResourceReportItem__ueResourceReportList { + A_SEQUENCE_OF(struct CU_CP_Usage_Report_UeResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_CP_Usage_Report_CellResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_CellResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_CellResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_CellResourceReportItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_CP_Usage_Report_CellResourceReportItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-Per-UE.h b/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-Per-UE.h new file mode 100644 index 0000000..d32aab2 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-Per-UE.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CU_CP_Usage_Report_Per_UE_H_ +#define _CU_CP_Usage_Report_Per_UE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_CP_Usage_Report_CellResourceReportItem; + +/* CU-CP-Usage-Report-Per-UE */ +typedef struct CU_CP_Usage_Report_Per_UE { + struct CU_CP_Usage_Report_Per_UE__cellResourceReportList { + A_SEQUENCE_OF(struct CU_CP_Usage_Report_CellResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_CP_Usage_Report_Per_UE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_Per_UE; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_Per_UE_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_Per_UE_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_CP_Usage_Report_Per_UE_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-UeResourceReportItem.h b/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-UeResourceReportItem.h new file mode 100644 index 0000000..2b018da --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CU-CP-Usage-Report-UeResourceReportItem.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CU_CP_Usage_Report_UeResourceReportItem_H_ +#define _CU_CP_Usage_Report_UeResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "C-RNTI.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* CU-CP-Usage-Report-UeResourceReportItem */ +typedef struct CU_CP_Usage_Report_UeResourceReportItem { + C_RNTI_t c_RNTI; + OCTET_STRING_t *serving_Cell_RF_Type; /* OPTIONAL */ + OCTET_STRING_t *neighbor_Cell_RF; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_CP_Usage_Report_UeResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_UeResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_UeResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_UeResourceReportItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_CP_Usage_Report_UeResourceReportItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-CellResourceReportItem.h b/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-CellResourceReportItem.h new file mode 100644 index 0000000..ab4b7b8 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-CellResourceReportItem.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CU_UP_Usage_Report_CellResourceReportItem_H_ +#define _CU_UP_Usage_Report_CellResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "NRCGI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_UP_Usage_Report_UeResourceReportItem; + +/* CU-UP-Usage-Report-CellResourceReportItem */ +typedef struct CU_UP_Usage_Report_CellResourceReportItem { + NRCGI_t nRCGI; + struct CU_UP_Usage_Report_CellResourceReportItem__ueResourceReportList { + A_SEQUENCE_OF(struct CU_UP_Usage_Report_UeResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_UP_Usage_Report_CellResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_CellResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_CellResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_CellResourceReportItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_UP_Usage_Report_CellResourceReportItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-Per-UE.h b/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-Per-UE.h new file mode 100644 index 0000000..f944abf --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-Per-UE.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CU_UP_Usage_Report_Per_UE_H_ +#define _CU_UP_Usage_Report_Per_UE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CU_UP_Usage_Report_CellResourceReportItem; + +/* CU-UP-Usage-Report-Per-UE */ +typedef struct CU_UP_Usage_Report_Per_UE { + struct CU_UP_Usage_Report_Per_UE__cellResourceReportList { + A_SEQUENCE_OF(struct CU_UP_Usage_Report_CellResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_UP_Usage_Report_Per_UE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_Per_UE; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_Per_UE_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_Per_UE_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_UP_Usage_Report_Per_UE_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-UeResourceReportItem.h b/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-UeResourceReportItem.h new file mode 100644 index 0000000..07b5348 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CU-UP-Usage-Report-UeResourceReportItem.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CU_UP_Usage_Report_UeResourceReportItem_H_ +#define _CU_UP_Usage_Report_UeResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "C-RNTI.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* CU-UP-Usage-Report-UeResourceReportItem */ +typedef struct CU_UP_Usage_Report_UeResourceReportItem { + C_RNTI_t c_RNTI; + INTEGER_t *pDCPBytesDL; /* OPTIONAL */ + INTEGER_t *pDCPBytesUL; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CU_UP_Usage_Report_UeResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_UeResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_UeResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_UeResourceReportItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CU_UP_Usage_Report_UeResourceReportItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CUUPMeasurement-Container.h b/Bouncer/e2sm_kpm/headers/CUUPMeasurement-Container.h new file mode 100644 index 0000000..32d51b0 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CUUPMeasurement-Container.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CUUPMeasurement_Container_H_ +#define _CUUPMeasurement_Container_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PlmnID_List; + +/* CUUPMeasurement-Container */ +typedef struct CUUPMeasurement_Container { + struct CUUPMeasurement_Container__plmnList { + A_SEQUENCE_OF(struct PlmnID_List) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } plmnList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CUUPMeasurement_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CUUPMeasurement_Container; +extern asn_SEQUENCE_specifics_t asn_SPC_CUUPMeasurement_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_CUUPMeasurement_Container_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CUUPMeasurement_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CellResourceReportListItem.h b/Bouncer/e2sm_kpm/headers/CellResourceReportListItem.h new file mode 100644 index 0000000..8fa5613 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CellResourceReportListItem.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CellResourceReportListItem_H_ +#define _CellResourceReportListItem_H_ + + +#include + +/* Including external dependencies */ +#include "NRCGI.h" +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ServedPlmnPerCellListItem; + +/* CellResourceReportListItem */ +typedef struct CellResourceReportListItem { + NRCGI_t nRCGI; + long *dl_TotalofAvailablePRBs; /* OPTIONAL */ + long *ul_TotalofAvailablePRBs; /* OPTIONAL */ + struct CellResourceReportListItem__servedPlmnPerCellList { + A_SEQUENCE_OF(struct ServedPlmnPerCellListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } servedPlmnPerCellList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CellResourceReportListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CellResourceReportListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_CellResourceReportListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_CellResourceReportListItem_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CellResourceReportListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/CoreCPID.h b/Bouncer/e2sm_kpm/headers/CoreCPID.h new file mode 100644 index 0000000..64ff363 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/CoreCPID.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _CoreCPID_H_ +#define _CoreCPID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CoreCPID_PR { + CoreCPID_PR_NOTHING, /* No components present */ + CoreCPID_PR_fiveGC, + CoreCPID_PR_ePC + /* Extensions may appear below */ + +} CoreCPID_PR; + +/* Forward declarations */ +struct GUAMI; +struct GUMMEI; + +/* CoreCPID */ +typedef struct CoreCPID { + CoreCPID_PR present; + union CoreCPID_u { + struct GUAMI *fiveGC; + struct GUMMEI *ePC; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CoreCPID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CoreCPID; + +#ifdef __cplusplus +} +#endif + +#endif /* _CoreCPID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/DU-Usage-Report-CellResourceReportItem.h b/Bouncer/e2sm_kpm/headers/DU-Usage-Report-CellResourceReportItem.h new file mode 100644 index 0000000..bbf14c4 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/DU-Usage-Report-CellResourceReportItem.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _DU_Usage_Report_CellResourceReportItem_H_ +#define _DU_Usage_Report_CellResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "NRCGI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct DU_Usage_Report_UeResourceReportItem; + +/* DU-Usage-Report-CellResourceReportItem */ +typedef struct DU_Usage_Report_CellResourceReportItem { + NRCGI_t nRCGI; + struct DU_Usage_Report_CellResourceReportItem__ueResourceReportList { + A_SEQUENCE_OF(struct DU_Usage_Report_UeResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DU_Usage_Report_CellResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_CellResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_CellResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_DU_Usage_Report_CellResourceReportItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _DU_Usage_Report_CellResourceReportItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/DU-Usage-Report-Per-UE.h b/Bouncer/e2sm_kpm/headers/DU-Usage-Report-Per-UE.h new file mode 100644 index 0000000..01de53b --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/DU-Usage-Report-Per-UE.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _DU_Usage_Report_Per_UE_H_ +#define _DU_Usage_Report_Per_UE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct DU_Usage_Report_CellResourceReportItem; + +/* DU-Usage-Report-Per-UE */ +typedef struct DU_Usage_Report_Per_UE { + struct DU_Usage_Report_Per_UE__cellResourceReportList { + A_SEQUENCE_OF(struct DU_Usage_Report_CellResourceReportItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DU_Usage_Report_Per_UE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_Per_UE; +extern asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_Per_UE_specs_1; +extern asn_TYPE_member_t asn_MBR_DU_Usage_Report_Per_UE_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _DU_Usage_Report_Per_UE_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/DU-Usage-Report-UeResourceReportItem.h b/Bouncer/e2sm_kpm/headers/DU-Usage-Report-UeResourceReportItem.h new file mode 100644 index 0000000..6f0be01 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/DU-Usage-Report-UeResourceReportItem.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _DU_Usage_Report_UeResourceReportItem_H_ +#define _DU_Usage_Report_UeResourceReportItem_H_ + + +#include + +/* Including external dependencies */ +#include "C-RNTI.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* DU-Usage-Report-UeResourceReportItem */ +typedef struct DU_Usage_Report_UeResourceReportItem { + C_RNTI_t c_RNTI; + long *dl_PRBUsage; /* OPTIONAL */ + long *ul_PRBUsage; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DU_Usage_Report_UeResourceReportItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_UeResourceReportItem; +extern asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_UeResourceReportItem_specs_1; +extern asn_TYPE_member_t asn_MBR_DU_Usage_Report_UeResourceReportItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _DU_Usage_Report_UeResourceReportItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/E-UTRA-ARFCN.h b/Bouncer/e2sm_kpm/headers/E-UTRA-ARFCN.h new file mode 100644 index 0000000..2f281e9 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E-UTRA-ARFCN.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E_UTRA_ARFCN_H_ +#define _E_UTRA_ARFCN_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E-UTRA-ARFCN */ +typedef long E_UTRA_ARFCN_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_E_UTRA_ARFCN_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_E_UTRA_ARFCN; +asn_struct_free_f E_UTRA_ARFCN_free; +asn_struct_print_f E_UTRA_ARFCN_print; +asn_constr_check_f E_UTRA_ARFCN_constraint; +ber_type_decoder_f E_UTRA_ARFCN_decode_ber; +der_type_encoder_f E_UTRA_ARFCN_encode_der; +xer_type_decoder_f E_UTRA_ARFCN_decode_xer; +xer_type_encoder_f E_UTRA_ARFCN_encode_xer; +per_type_decoder_f E_UTRA_ARFCN_decode_uper; +per_type_encoder_f E_UTRA_ARFCN_encode_uper; +per_type_decoder_f E_UTRA_ARFCN_decode_aper; +per_type_encoder_f E_UTRA_ARFCN_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _E_UTRA_ARFCN_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E-UTRA-PCI.h b/Bouncer/e2sm_kpm/headers/E-UTRA-PCI.h new file mode 100644 index 0000000..5d09203 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E-UTRA-PCI.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E_UTRA_PCI_H_ +#define _E_UTRA_PCI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E-UTRA-PCI */ +typedef long E_UTRA_PCI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_E_UTRA_PCI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_E_UTRA_PCI; +asn_struct_free_f E_UTRA_PCI_free; +asn_struct_print_f E_UTRA_PCI_print; +asn_constr_check_f E_UTRA_PCI_constraint; +ber_type_decoder_f E_UTRA_PCI_decode_ber; +der_type_encoder_f E_UTRA_PCI_encode_der; +xer_type_decoder_f E_UTRA_PCI_decode_xer; +xer_type_encoder_f E_UTRA_PCI_encode_xer; +per_type_decoder_f E_UTRA_PCI_decode_uper; +per_type_encoder_f E_UTRA_PCI_encode_uper; +per_type_decoder_f E_UTRA_PCI_decode_aper; +per_type_encoder_f E_UTRA_PCI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _E_UTRA_PCI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E-UTRA-TAC.h b/Bouncer/e2sm_kpm/headers/E-UTRA-TAC.h new file mode 100644 index 0000000..d337742 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E-UTRA-TAC.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E_UTRA_TAC_H_ +#define _E_UTRA_TAC_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E-UTRA-TAC */ +typedef OCTET_STRING_t E_UTRA_TAC_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E_UTRA_TAC; +asn_struct_free_f E_UTRA_TAC_free; +asn_struct_print_f E_UTRA_TAC_print; +asn_constr_check_f E_UTRA_TAC_constraint; +ber_type_decoder_f E_UTRA_TAC_decode_ber; +der_type_encoder_f E_UTRA_TAC_encode_der; +xer_type_decoder_f E_UTRA_TAC_decode_xer; +xer_type_encoder_f E_UTRA_TAC_encode_xer; +per_type_decoder_f E_UTRA_TAC_decode_uper; +per_type_encoder_f E_UTRA_TAC_encode_uper; +per_type_decoder_f E_UTRA_TAC_decode_aper; +per_type_encoder_f E_UTRA_TAC_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _E_UTRA_TAC_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format1.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format1.h new file mode 100644 index 0000000..c4b7690 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format1.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_ActionDefinition_Format1_H_ +#define _E2SM_KPM_ActionDefinition_Format1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementInfoList.h" +#include "GranularityPeriod.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CGI; + +/* E2SM-KPM-ActionDefinition-Format1 */ +typedef struct E2SM_KPM_ActionDefinition_Format1 { + MeasurementInfoList_t measInfoList; + GranularityPeriod_t granulPeriod; + struct CGI *cellGlobalID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_ActionDefinition_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_ActionDefinition_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format1_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_ActionDefinition_Format1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format2.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format2.h new file mode 100644 index 0000000..e145db5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format2.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_ActionDefinition_Format2_H_ +#define _E2SM_KPM_ActionDefinition_Format2_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "UEID.h" +#include "E2SM-KPM-ActionDefinition-Format1.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-KPM-ActionDefinition-Format2 */ +typedef struct E2SM_KPM_ActionDefinition_Format2 { + UEID_t ueID; + E2SM_KPM_ActionDefinition_Format1_t subscriptInfo; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_ActionDefinition_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_ActionDefinition_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format2_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_ActionDefinition_Format2_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format3.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format3.h new file mode 100644 index 0000000..13b928c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition-Format3.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_ActionDefinition_Format3_H_ +#define _E2SM_KPM_ActionDefinition_Format3_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementCondList.h" +#include "GranularityPeriod.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CGI; + +/* E2SM-KPM-ActionDefinition-Format3 */ +typedef struct E2SM_KPM_ActionDefinition_Format3 { + MeasurementCondList_t measCondList; + GranularityPeriod_t granulPeriod; + struct CGI *cellGlobalID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_ActionDefinition_Format3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format3; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_ActionDefinition_Format3_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format3_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_ActionDefinition_Format3_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition.h new file mode 100644 index 0000000..0aaa3a8 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-ActionDefinition.h @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_ActionDefinition_H_ +#define _E2SM_KPM_ActionDefinition_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_KPM_ActionDefinition__actionDefinition_formats_PR { + E2SM_KPM_ActionDefinition__actionDefinition_formats_PR_NOTHING= 0 , /* No components present */ + E2SM_KPM_ActionDefinition__actionDefinition_formats_PR_actionDefinition_Format1, + E2SM_KPM_ActionDefinition__actionDefinition_formats_PR_actionDefinition_Format2, + E2SM_KPM_ActionDefinition__actionDefinition_formats_PR_actionDefinition_Format3 + /* Extensions may appear below */ + +} E2SM_KPM_ActionDefinition__actionDefinition_formats_PR; + +/* Forward declarations */ +struct E2SM_KPM_ActionDefinition_Format1; +struct E2SM_KPM_ActionDefinition_Format2; +struct E2SM_KPM_ActionDefinition_Format3; + +/* E2SM-KPM-ActionDefinition */ +typedef struct E2SM_KPM_ActionDefinition { + RIC_Style_Type_t ric_Style_Type; + struct E2SM_KPM_ActionDefinition__actionDefinition_formats { + E2SM_KPM_ActionDefinition__actionDefinition_formats_PR present; + union E2SM_KPM_ActionDefinition__actionDefinition_formats_u { + struct E2SM_KPM_ActionDefinition_Format1 *actionDefinition_Format1; + struct E2SM_KPM_ActionDefinition_Format2 *actionDefinition_Format2; + struct E2SM_KPM_ActionDefinition_Format3 *actionDefinition_Format3; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } actionDefinition_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_ActionDefinition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_ActionDefinition_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h new file mode 100644 index 0000000..b778335 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_EventTriggerDefinition_Format1_H_ +#define _E2SM_KPM_EventTriggerDefinition_Format1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-KPM-EventTriggerDefinition-Format1 */ +typedef struct E2SM_KPM_EventTriggerDefinition_Format1 { + unsigned long reportingPeriod; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_EventTriggerDefinition_Format1_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_reportingPeriod_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_EventTriggerDefinition_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_EventTriggerDefinition_Format1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_EventTriggerDefinition_Format1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition.h new file mode 100644 index 0000000..0ed6d68 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-EventTriggerDefinition.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_EventTriggerDefinition_H_ +#define _E2SM_KPM_EventTriggerDefinition_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_KPM_EventTriggerDefinition__eventDefinition_formats_PR { + E2SM_KPM_EventTriggerDefinition__eventDefinition_formats_PR_NOTHING, /* No components present */ + E2SM_KPM_EventTriggerDefinition__eventDefinition_formats_PR_eventDefinition_Format1 + /* Extensions may appear below */ + +} E2SM_KPM_EventTriggerDefinition__eventDefinition_formats_PR; + +/* Forward declarations */ +struct E2SM_KPM_EventTriggerDefinition_Format1; + +/* E2SM-KPM-EventTriggerDefinition */ +typedef struct E2SM_KPM_EventTriggerDefinition { + struct E2SM_KPM_EventTriggerDefinition__eventDefinition_formats { + E2SM_KPM_EventTriggerDefinition__eventDefinition_formats_PR present; + union E2SM_KPM_EventTriggerDefinition__eventDefinition_formats_u { + struct E2SM_KPM_EventTriggerDefinition_Format1 *eventDefinition_Format1; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } eventDefinition_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_EventTriggerDefinition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_EventTriggerDefinition; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_EventTriggerDefinition_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader-Format1.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader-Format1.h new file mode 100644 index 0000000..f2de5ef --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader-Format1.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_IndicationHeader_Format1_H_ +#define _E2SM_KPM_IndicationHeader_Format1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TimeStamp.h" +#include "PrintableString.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-KPM-IndicationHeader-Format1 */ +typedef struct E2SM_KPM_IndicationHeader_Format1 { + TimeStamp_t colletStartTime; + PrintableString_t *fileFormatversion; /* OPTIONAL */ + PrintableString_t *senderName; /* OPTIONAL */ + PrintableString_t *senderType; /* OPTIONAL */ + PrintableString_t *vendorName; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_IndicationHeader_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_IndicationHeader_Format1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader.h new file mode 100644 index 0000000..80e5094 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationHeader.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_IndicationHeader_H_ +#define _E2SM_KPM_IndicationHeader_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_KPM_IndicationHeader__indicationHeader_formats_PR { + E2SM_KPM_IndicationHeader__indicationHeader_formats_PR_NOTHING, /* No components present */ + E2SM_KPM_IndicationHeader__indicationHeader_formats_PR_indicationHeader_Format1 + /* Extensions may appear below */ + +} E2SM_KPM_IndicationHeader__indicationHeader_formats_PR; + +/* Forward declarations */ +struct E2SM_KPM_IndicationHeader_Format1; + +/* E2SM-KPM-IndicationHeader */ +typedef struct E2SM_KPM_IndicationHeader { + struct E2SM_KPM_IndicationHeader__indicationHeader_formats { + E2SM_KPM_IndicationHeader__indicationHeader_formats_PR present; + union E2SM_KPM_IndicationHeader__indicationHeader_formats_u { + struct E2SM_KPM_IndicationHeader_Format1 *indicationHeader_Format1; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } indicationHeader_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_IndicationHeader_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_IndicationHeader_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format1.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format1.h new file mode 100644 index 0000000..e909d8c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format1.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_IndicationMessage_Format1_H_ +#define _E2SM_KPM_IndicationMessage_Format1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementData.h" +#include "GranularityPeriod.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MeasurementInfoList; + +/* E2SM-KPM-IndicationMessage-Format1 */ +typedef struct E2SM_KPM_IndicationMessage_Format1 { + MeasurementData_t measData; + struct MeasurementInfoList *measInfoList; /* OPTIONAL */ + GranularityPeriod_t *granulPeriod; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_IndicationMessage_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationMessage_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format1_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_IndicationMessage_Format1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format2.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format2.h new file mode 100644 index 0000000..0f96d3a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage-Format2.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_IndicationMessage_Format2_H_ +#define _E2SM_KPM_IndicationMessage_Format2_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementData.h" +#include "MeasurementCondUEidList.h" +#include "GranularityPeriod.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-KPM-IndicationMessage-Format2 */ +typedef struct E2SM_KPM_IndicationMessage_Format2 { + MeasurementData_t measData; + MeasurementCondUEidList_t measCondUEidList; + GranularityPeriod_t *granulPeriod; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_IndicationMessage_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationMessage_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format2_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_IndicationMessage_Format2_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage.h new file mode 100644 index 0000000..d54d24b --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-IndicationMessage.h @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_IndicationMessage_H_ +#define _E2SM_KPM_IndicationMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_KPM_IndicationMessage__indicationMessage_formats_PR { + E2SM_KPM_IndicationMessage__indicationMessage_formats_PR_NOTHING, /* No components present */ + E2SM_KPM_IndicationMessage__indicationMessage_formats_PR_indicationMessage_Format1, + E2SM_KPM_IndicationMessage__indicationMessage_formats_PR_indicationMessage_Format2 + /* Extensions may appear below */ + +} E2SM_KPM_IndicationMessage__indicationMessage_formats_PR; + +/* Forward declarations */ +struct E2SM_KPM_IndicationMessage_Format1; +struct E2SM_KPM_IndicationMessage_Format2; + +/* E2SM-KPM-IndicationMessage */ +typedef struct E2SM_KPM_IndicationMessage { + struct E2SM_KPM_IndicationMessage__indicationMessage_formats { + E2SM_KPM_IndicationMessage__indicationMessage_formats_PR present; + union E2SM_KPM_IndicationMessage__indicationMessage_formats_u { + struct E2SM_KPM_IndicationMessage_Format1 *indicationMessage_Format1; + struct E2SM_KPM_IndicationMessage_Format2 *indicationMessage_Format2; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } indicationMessage_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_IndicationMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_IndicationMessage_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/E2SM-KPM-RANfunction-Description.h b/Bouncer/e2sm_kpm/headers/E2SM-KPM-RANfunction-Description.h new file mode 100644 index 0000000..afd378e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/E2SM-KPM-RANfunction-Description.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _E2SM_KPM_RANfunction_Description_H_ +#define _E2SM_KPM_RANfunction_Description_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RANfunction-Name.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RIC_EventTriggerStyle_Item; +struct RIC_ReportStyle_Item; + +/* E2SM-KPM-RANfunction-Description */ +typedef struct E2SM_KPM_RANfunction_Description { + RANfunction_Name_t ranFunction_Name; + struct E2SM_KPM_RANfunction_Description__ric_EventTriggerStyle_List { + A_SEQUENCE_OF(struct RIC_EventTriggerStyle_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ric_EventTriggerStyle_List; + struct E2SM_KPM_RANfunction_Description__ric_ReportStyle_List { + A_SEQUENCE_OF(struct RIC_ReportStyle_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ric_ReportStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_KPM_RANfunction_Description_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_RANfunction_Description; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_KPM_RANfunction_Description_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/EN-GNB-ID.h b/Bouncer/e2sm_kpm/headers/EN-GNB-ID.h new file mode 100644 index 0000000..34aff92 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/EN-GNB-ID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _EN_GNB_ID_H_ +#define _EN_GNB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EN_GNB_ID_PR { + EN_GNB_ID_PR_NOTHING, /* No components present */ + EN_GNB_ID_PR_en_gNB_ID + /* Extensions may appear below */ + +} EN_GNB_ID_PR; + +/* EN-GNB-ID */ +typedef struct EN_GNB_ID { + EN_GNB_ID_PR present; + union EN_GNB_ID_u { + BIT_STRING_t en_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EN_GNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EN_GNB_ID; +extern asn_CHOICE_specifics_t asn_SPC_EN_GNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_EN_GNB_ID_1[1]; +extern asn_per_constraints_t asn_PER_type_EN_GNB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _EN_GNB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/ENB-ID-Choice.h b/Bouncer/e2sm_kpm/headers/ENB-ID-Choice.h new file mode 100644 index 0000000..f1743a5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ENB-ID-Choice.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENB_ID_Choice_H_ +#define _ENB_ID_Choice_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ENB_ID_Choice_PR { + ENB_ID_Choice_PR_NOTHING, /* No components present */ + ENB_ID_Choice_PR_enb_ID_macro, + ENB_ID_Choice_PR_enb_ID_shortmacro, + ENB_ID_Choice_PR_enb_ID_longmacro + /* Extensions may appear below */ + +} ENB_ID_Choice_PR; + +/* ENB-ID-Choice */ +typedef struct ENB_ID_Choice { + ENB_ID_Choice_PR present; + union ENB_ID_Choice_u { + BIT_STRING_t enb_ID_macro; + BIT_STRING_t enb_ID_shortmacro; + BIT_STRING_t enb_ID_longmacro; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ENB_ID_Choice_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice; +extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1; +extern asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[3]; +extern asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_ID_Choice_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/ENB-ID.h b/Bouncer/e2sm_kpm/headers/ENB-ID.h new file mode 100644 index 0000000..4d96e8e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ENB-ID.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _ENB_ID_H_ +#define _ENB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ENB_ID_PR { + ENB_ID_PR_NOTHING, /* No components present */ + ENB_ID_PR_macro_eNB_ID, + ENB_ID_PR_home_eNB_ID, + /* Extensions may appear below */ + ENB_ID_PR_short_Macro_eNB_ID, + ENB_ID_PR_long_Macro_eNB_ID +} ENB_ID_PR; + +/* ENB-ID */ +typedef struct ENB_ID { + ENB_ID_PR present; + union ENB_ID_u { + BIT_STRING_t macro_eNB_ID; + BIT_STRING_t home_eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + BIT_STRING_t short_Macro_eNB_ID; + BIT_STRING_t long_Macro_eNB_ID; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ENB_ID; +extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_ENB_ID_1[4]; +extern asn_per_constraints_t asn_PER_type_ENB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID-Extension.h b/Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID-Extension.h new file mode 100644 index 0000000..aa64c4c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID-Extension.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _ENB_UE_X2AP_ID_Extension_H_ +#define _ENB_UE_X2AP_ID_Extension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* ENB-UE-X2AP-ID-Extension */ +typedef long ENB_UE_X2AP_ID_Extension_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_Extension_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID_Extension; +asn_struct_free_f ENB_UE_X2AP_ID_Extension_free; +asn_struct_print_f ENB_UE_X2AP_ID_Extension_print; +asn_constr_check_f ENB_UE_X2AP_ID_Extension_constraint; +ber_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_ber; +der_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_der; +xer_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_xer; +xer_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_xer; +per_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_uper; +per_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_uper; +per_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_aper; +per_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_UE_X2AP_ID_Extension_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID.h b/Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID.h new file mode 100644 index 0000000..7e5796b --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ENB-UE-X2AP-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _ENB_UE_X2AP_ID_H_ +#define _ENB_UE_X2AP_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* ENB-UE-X2AP-ID */ +typedef long ENB_UE_X2AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID; +asn_struct_free_f ENB_UE_X2AP_ID_free; +asn_struct_print_f ENB_UE_X2AP_ID_print; +asn_constr_check_f ENB_UE_X2AP_ID_constraint; +ber_type_decoder_f ENB_UE_X2AP_ID_decode_ber; +der_type_encoder_f ENB_UE_X2AP_ID_encode_der; +xer_type_decoder_f ENB_UE_X2AP_ID_decode_xer; +xer_type_encoder_f ENB_UE_X2AP_ID_encode_xer; +per_type_decoder_f ENB_UE_X2AP_ID_decode_uper; +per_type_encoder_f ENB_UE_X2AP_ID_encode_uper; +per_type_decoder_f ENB_UE_X2AP_ID_decode_aper; +per_type_encoder_f ENB_UE_X2AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_UE_X2AP_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/ENGNB-ID.h b/Bouncer/e2sm_kpm/headers/ENGNB-ID.h new file mode 100644 index 0000000..12fd929 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ENGNB-ID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENGNB_ID_H_ +#define _ENGNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ENGNB_ID_PR { + ENGNB_ID_PR_NOTHING, /* No components present */ + ENGNB_ID_PR_gNB_ID + /* Extensions may appear below */ + +} ENGNB_ID_PR; + +/* ENGNB-ID */ +typedef struct ENGNB_ID { + ENGNB_ID_PR present; + union ENGNB_ID_u { + BIT_STRING_t gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ENGNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ENGNB_ID; +extern asn_CHOICE_specifics_t asn_SPC_ENGNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_ENGNB_ID_1[1]; +extern asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENGNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/ENUMERATED.h b/Bouncer/e2sm_kpm/headers/ENUMERATED.h new file mode 100644 index 0000000..8fd04de --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ENUMERATED.h @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _ENUMERATED_H_ +#define _ENUMERATED_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */ + +extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED; +extern asn_TYPE_operation_t asn_OP_ENUMERATED; + +oer_type_decoder_f ENUMERATED_decode_oer; +oer_type_encoder_f ENUMERATED_encode_oer; +per_type_decoder_f ENUMERATED_decode_uper; +per_type_encoder_f ENUMERATED_encode_uper; +per_type_decoder_f ENUMERATED_decode_aper; +per_type_encoder_f ENUMERATED_encode_aper; + +#define ENUMERATED_free ASN__PRIMITIVE_TYPE_free +#define ENUMERATED_print INTEGER_print +#define ENUMERATED_compare INTEGER_compare +#define ENUMERATED_constraint asn_generic_no_constraint +#define ENUMERATED_decode_ber ber_decode_primitive +#define ENUMERATED_encode_der INTEGER_encode_der +#define ENUMERATED_decode_xer INTEGER_decode_xer +#define ENUMERATED_encode_xer INTEGER_encode_xer +#define ENUMERATED_random_fill INTEGER_random_fill + +#ifdef __cplusplus +} +#endif + +#endif /* _ENUMERATED_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/EPC-CUUP-PM-Format.h b/Bouncer/e2sm_kpm/headers/EPC-CUUP-PM-Format.h new file mode 100644 index 0000000..0c3d299 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/EPC-CUUP-PM-Format.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EPC_CUUP_PM_Format_H_ +#define _EPC_CUUP_PM_Format_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PerQCIReportListItemFormat; + +/* EPC-CUUP-PM-Format */ +typedef struct EPC_CUUP_PM_Format { + struct EPC_CUUP_PM_Format__perQCIReportList { + A_SEQUENCE_OF(struct PerQCIReportListItemFormat) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } perQCIReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EPC_CUUP_PM_Format_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EPC_CUUP_PM_Format; +extern asn_SEQUENCE_specifics_t asn_SPC_EPC_CUUP_PM_Format_specs_1; +extern asn_TYPE_member_t asn_MBR_EPC_CUUP_PM_Format_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EPC_CUUP_PM_Format_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/EPC-DU-PM-Container.h b/Bouncer/e2sm_kpm/headers/EPC-DU-PM-Container.h new file mode 100644 index 0000000..e0aeda2 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/EPC-DU-PM-Container.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EPC_DU_PM_Container_H_ +#define _EPC_DU_PM_Container_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PerQCIReportListItem; + +/* EPC-DU-PM-Container */ +typedef struct EPC_DU_PM_Container { + struct EPC_DU_PM_Container__perQCIReportList { + A_SEQUENCE_OF(struct PerQCIReportListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } perQCIReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EPC_DU_PM_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EPC_DU_PM_Container; +extern asn_SEQUENCE_specifics_t asn_SPC_EPC_DU_PM_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_EPC_DU_PM_Container_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EPC_DU_PM_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/EUTRA-CGI.h b/Bouncer/e2sm_kpm/headers/EUTRA-CGI.h new file mode 100644 index 0000000..7e89c31 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/EUTRA-CGI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _EUTRA_CGI_H_ +#define _EUTRA_CGI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "EUTRACellIdentity.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* EUTRA-CGI */ +typedef struct EUTRA_CGI { + PLMNIdentity_t pLMNIdentity; + EUTRACellIdentity_t eUTRACellIdentity; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EUTRA_CGI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EUTRA_CGI; +extern asn_SEQUENCE_specifics_t asn_SPC_EUTRA_CGI_specs_1; +extern asn_TYPE_member_t asn_MBR_EUTRA_CGI_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EUTRA_CGI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/EUTRACellIdentity.h b/Bouncer/e2sm_kpm/headers/EUTRACellIdentity.h new file mode 100644 index 0000000..fbdc8f5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/EUTRACellIdentity.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _EUTRACellIdentity_H_ +#define _EUTRACellIdentity_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* EUTRACellIdentity */ +typedef BIT_STRING_t EUTRACellIdentity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_EUTRACellIdentity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_EUTRACellIdentity; +asn_struct_free_f EUTRACellIdentity_free; +asn_struct_print_f EUTRACellIdentity_print; +asn_constr_check_f EUTRACellIdentity_constraint; +ber_type_decoder_f EUTRACellIdentity_decode_ber; +der_type_encoder_f EUTRACellIdentity_encode_der; +xer_type_decoder_f EUTRACellIdentity_decode_xer; +xer_type_encoder_f EUTRACellIdentity_encode_xer; +per_type_decoder_f EUTRACellIdentity_decode_uper; +per_type_encoder_f EUTRACellIdentity_encode_uper; +per_type_decoder_f EUTRACellIdentity_decode_aper; +per_type_encoder_f EUTRACellIdentity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _EUTRACellIdentity_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/FGC-CUUP-PM-Format.h b/Bouncer/e2sm_kpm/headers/FGC-CUUP-PM-Format.h new file mode 100644 index 0000000..b152e74 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/FGC-CUUP-PM-Format.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _FGC_CUUP_PM_Format_H_ +#define _FGC_CUUP_PM_Format_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct SliceToReportListItem; + +/* FGC-CUUP-PM-Format */ +typedef struct FGC_CUUP_PM_Format { + struct FGC_CUUP_PM_Format__sliceToReportList { + A_SEQUENCE_OF(struct SliceToReportListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } sliceToReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} FGC_CUUP_PM_Format_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_FGC_CUUP_PM_Format; +extern asn_SEQUENCE_specifics_t asn_SPC_FGC_CUUP_PM_Format_specs_1; +extern asn_TYPE_member_t asn_MBR_FGC_CUUP_PM_Format_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _FGC_CUUP_PM_Format_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/FGC-DU-PM-Container.h b/Bouncer/e2sm_kpm/headers/FGC-DU-PM-Container.h new file mode 100644 index 0000000..4af771f --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/FGC-DU-PM-Container.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _FGC_DU_PM_Container_H_ +#define _FGC_DU_PM_Container_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct SlicePerPlmnPerCellListItem; + +/* FGC-DU-PM-Container */ +typedef struct FGC_DU_PM_Container { + struct FGC_DU_PM_Container__slicePerPlmnPerCellList { + A_SEQUENCE_OF(struct SlicePerPlmnPerCellListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } slicePerPlmnPerCellList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} FGC_DU_PM_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_FGC_DU_PM_Container; +extern asn_SEQUENCE_specifics_t asn_SPC_FGC_DU_PM_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_FGC_DU_PM_Container_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _FGC_DU_PM_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnListItem.h b/Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnListItem.h new file mode 100644 index 0000000..e7960aa --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnListItem.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _FQIPERSlicesPerPlmnListItem_H_ +#define _FQIPERSlicesPerPlmnListItem_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* FQIPERSlicesPerPlmnListItem */ +typedef struct FQIPERSlicesPerPlmnListItem { + long fiveQI; + INTEGER_t *pDCPBytesDL; /* OPTIONAL */ + INTEGER_t *pDCPBytesUL; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} FQIPERSlicesPerPlmnListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_FQIPERSlicesPerPlmnListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_FQIPERSlicesPerPlmnListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_FQIPERSlicesPerPlmnListItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _FQIPERSlicesPerPlmnListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnPerCellListItem.h b/Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnPerCellListItem.h new file mode 100644 index 0000000..147ecfe --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/FQIPERSlicesPerPlmnPerCellListItem.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _FQIPERSlicesPerPlmnPerCellListItem_H_ +#define _FQIPERSlicesPerPlmnPerCellListItem_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* FQIPERSlicesPerPlmnPerCellListItem */ +typedef struct FQIPERSlicesPerPlmnPerCellListItem { + long fiveQI; + long *dl_PRBUsage; /* OPTIONAL */ + long *ul_PRBUsage; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} FQIPERSlicesPerPlmnPerCellListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_FQIPERSlicesPerPlmnPerCellListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_FQIPERSlicesPerPlmnPerCellListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_FQIPERSlicesPerPlmnPerCellListItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _FQIPERSlicesPerPlmnPerCellListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/FiveGS-TAC.h b/Bouncer/e2sm_kpm/headers/FiveGS-TAC.h new file mode 100644 index 0000000..80829ad --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/FiveGS-TAC.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _FiveGS_TAC_H_ +#define _FiveGS_TAC_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* FiveGS-TAC */ +typedef OCTET_STRING_t FiveGS_TAC_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_FiveGS_TAC; +asn_struct_free_f FiveGS_TAC_free; +asn_struct_print_f FiveGS_TAC_print; +asn_constr_check_f FiveGS_TAC_constraint; +ber_type_decoder_f FiveGS_TAC_decode_ber; +der_type_encoder_f FiveGS_TAC_encode_der; +xer_type_decoder_f FiveGS_TAC_decode_xer; +xer_type_encoder_f FiveGS_TAC_encode_xer; +per_type_decoder_f FiveGS_TAC_decode_uper; +per_type_encoder_f FiveGS_TAC_encode_uper; +per_type_decoder_f FiveGS_TAC_decode_aper; +per_type_encoder_f FiveGS_TAC_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _FiveGS_TAC_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/FiveQI.h b/Bouncer/e2sm_kpm/headers/FiveQI.h new file mode 100644 index 0000000..3f878c2 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/FiveQI.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _FiveQI_H_ +#define _FiveQI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* FiveQI */ +typedef long FiveQI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_FiveQI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_FiveQI; +asn_struct_free_f FiveQI_free; +asn_struct_print_f FiveQI_print; +asn_constr_check_f FiveQI_constraint; +ber_type_decoder_f FiveQI_decode_ber; +der_type_encoder_f FiveQI_encode_der; +xer_type_decoder_f FiveQI_decode_xer; +xer_type_encoder_f FiveQI_encode_xer; +per_type_decoder_f FiveQI_decode_uper; +per_type_encoder_f FiveQI_encode_uper; +per_type_decoder_f FiveQI_decode_aper; +per_type_encoder_f FiveQI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _FiveQI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/FreqBandNrItem.h b/Bouncer/e2sm_kpm/headers/FreqBandNrItem.h new file mode 100644 index 0000000..662b272 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/FreqBandNrItem.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _FreqBandNrItem_H_ +#define _FreqBandNrItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* FreqBandNrItem */ +typedef struct FreqBandNrItem { + long freqBandIndicatorNr; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} FreqBandNrItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_FreqBandNrItem; + +#ifdef __cplusplus +} +#endif + +#endif /* _FreqBandNrItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GNB-CU-CP-Name.h b/Bouncer/e2sm_kpm/headers/GNB-CU-CP-Name.h new file mode 100644 index 0000000..3458335 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-CU-CP-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_CP_Name_H_ +#define _GNB_CU_CP_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-CP-Name */ +typedef PrintableString_t GNB_CU_CP_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_CP_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_CP_Name; +asn_struct_free_f GNB_CU_CP_Name_free; +asn_struct_print_f GNB_CU_CP_Name_print; +asn_constr_check_f GNB_CU_CP_Name_constraint; +ber_type_decoder_f GNB_CU_CP_Name_decode_ber; +der_type_encoder_f GNB_CU_CP_Name_encode_der; +xer_type_decoder_f GNB_CU_CP_Name_decode_xer; +xer_type_encoder_f GNB_CU_CP_Name_encode_xer; +oer_type_decoder_f GNB_CU_CP_Name_decode_oer; +oer_type_encoder_f GNB_CU_CP_Name_encode_oer; +per_type_decoder_f GNB_CU_CP_Name_decode_uper; +per_type_encoder_f GNB_CU_CP_Name_encode_uper; +per_type_decoder_f GNB_CU_CP_Name_decode_aper; +per_type_encoder_f GNB_CU_CP_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_CP_Name_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GNB-CU-CP-UE-E1AP-ID.h b/Bouncer/e2sm_kpm/headers/GNB-CU-CP-UE-E1AP-ID.h new file mode 100644 index 0000000..1f6ae68 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-CU-CP-UE-E1AP-ID.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_CP_UE_E1AP_ID_H_ +#define _GNB_CU_CP_UE_E1AP_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-CP-UE-E1AP-ID */ +typedef unsigned long GNB_CU_CP_UE_E1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_CP_UE_E1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_CP_UE_E1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_GNB_CU_CP_UE_E1AP_ID_specs_1; +asn_struct_free_f GNB_CU_CP_UE_E1AP_ID_free; +asn_struct_print_f GNB_CU_CP_UE_E1AP_ID_print; +asn_constr_check_f GNB_CU_CP_UE_E1AP_ID_constraint; +ber_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_ber; +der_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_der; +xer_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_xer; +xer_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_xer; +per_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_uper; +per_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_uper; +per_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_aper; +per_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_CP_UE_E1AP_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GNB-CU-UE-F1AP-ID.h b/Bouncer/e2sm_kpm/headers/GNB-CU-UE-F1AP-ID.h new file mode 100644 index 0000000..0f92da8 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-CU-UE-F1AP-ID.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_UE_F1AP_ID_H_ +#define _GNB_CU_UE_F1AP_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-UE-F1AP-ID */ +typedef unsigned long GNB_CU_UE_F1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_UE_F1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UE_F1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_GNB_CU_UE_F1AP_ID_specs_1; +asn_struct_free_f GNB_CU_UE_F1AP_ID_free; +asn_struct_print_f GNB_CU_UE_F1AP_ID_print; +asn_constr_check_f GNB_CU_UE_F1AP_ID_constraint; +ber_type_decoder_f GNB_CU_UE_F1AP_ID_decode_ber; +der_type_encoder_f GNB_CU_UE_F1AP_ID_encode_der; +xer_type_decoder_f GNB_CU_UE_F1AP_ID_decode_xer; +xer_type_encoder_f GNB_CU_UE_F1AP_ID_encode_xer; +per_type_decoder_f GNB_CU_UE_F1AP_ID_decode_uper; +per_type_encoder_f GNB_CU_UE_F1AP_ID_encode_uper; +per_type_decoder_f GNB_CU_UE_F1AP_ID_decode_aper; +per_type_encoder_f GNB_CU_UE_F1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_UE_F1AP_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GNB-CU-UP-ID.h b/Bouncer/e2sm_kpm/headers/GNB-CU-UP-ID.h new file mode 100644 index 0000000..2ed4c33 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-CU-UP-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_UP_ID_H_ +#define _GNB_CU_UP_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "INTEGER.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-UP-ID */ +typedef INTEGER_t GNB_CU_UP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID; +asn_struct_free_f GNB_CU_UP_ID_free; +asn_struct_print_f GNB_CU_UP_ID_print; +asn_constr_check_f GNB_CU_UP_ID_constraint; +ber_type_decoder_f GNB_CU_UP_ID_decode_ber; +der_type_encoder_f GNB_CU_UP_ID_encode_der; +xer_type_decoder_f GNB_CU_UP_ID_decode_xer; +xer_type_encoder_f GNB_CU_UP_ID_encode_xer; +per_type_decoder_f GNB_CU_UP_ID_decode_uper; +per_type_encoder_f GNB_CU_UP_ID_encode_uper; +per_type_decoder_f GNB_CU_UP_ID_decode_aper; +per_type_encoder_f GNB_CU_UP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_UP_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GNB-CU-UP-Name.h b/Bouncer/e2sm_kpm/headers/GNB-CU-UP-Name.h new file mode 100644 index 0000000..a408dec --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-CU-UP-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_UP_Name_H_ +#define _GNB_CU_UP_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-UP-Name */ +typedef PrintableString_t GNB_CU_UP_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_UP_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_Name; +asn_struct_free_f GNB_CU_UP_Name_free; +asn_struct_print_f GNB_CU_UP_Name_print; +asn_constr_check_f GNB_CU_UP_Name_constraint; +ber_type_decoder_f GNB_CU_UP_Name_decode_ber; +der_type_encoder_f GNB_CU_UP_Name_encode_der; +xer_type_decoder_f GNB_CU_UP_Name_decode_xer; +xer_type_encoder_f GNB_CU_UP_Name_encode_xer; +oer_type_decoder_f GNB_CU_UP_Name_decode_oer; +oer_type_encoder_f GNB_CU_UP_Name_encode_oer; +per_type_decoder_f GNB_CU_UP_Name_decode_uper; +per_type_encoder_f GNB_CU_UP_Name_encode_uper; +per_type_decoder_f GNB_CU_UP_Name_decode_aper; +per_type_encoder_f GNB_CU_UP_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_UP_Name_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GNB-DU-ID.h b/Bouncer/e2sm_kpm/headers/GNB-DU-ID.h new file mode 100644 index 0000000..4901345 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-DU-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GNB_DU_ID_H_ +#define _GNB_DU_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "INTEGER.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-DU-ID */ +typedef INTEGER_t GNB_DU_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID; +asn_struct_free_f GNB_DU_ID_free; +asn_struct_print_f GNB_DU_ID_print; +asn_constr_check_f GNB_DU_ID_constraint; +ber_type_decoder_f GNB_DU_ID_decode_ber; +der_type_encoder_f GNB_DU_ID_encode_der; +xer_type_decoder_f GNB_DU_ID_decode_xer; +xer_type_encoder_f GNB_DU_ID_encode_xer; +per_type_decoder_f GNB_DU_ID_decode_uper; +per_type_encoder_f GNB_DU_ID_encode_uper; +per_type_decoder_f GNB_DU_ID_decode_aper; +per_type_encoder_f GNB_DU_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_DU_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GNB-DU-Name.h b/Bouncer/e2sm_kpm/headers/GNB-DU-Name.h new file mode 100644 index 0000000..e898011 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-DU-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_DU_Name_H_ +#define _GNB_DU_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-DU-Name */ +typedef PrintableString_t GNB_DU_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_DU_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_DU_Name; +asn_struct_free_f GNB_DU_Name_free; +asn_struct_print_f GNB_DU_Name_print; +asn_constr_check_f GNB_DU_Name_constraint; +ber_type_decoder_f GNB_DU_Name_decode_ber; +der_type_encoder_f GNB_DU_Name_encode_der; +xer_type_decoder_f GNB_DU_Name_decode_xer; +xer_type_encoder_f GNB_DU_Name_encode_xer; +oer_type_decoder_f GNB_DU_Name_decode_oer; +oer_type_encoder_f GNB_DU_Name_encode_oer; +per_type_decoder_f GNB_DU_Name_decode_uper; +per_type_encoder_f GNB_DU_Name_encode_uper; +per_type_decoder_f GNB_DU_Name_decode_aper; +per_type_encoder_f GNB_DU_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_DU_Name_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GNB-ID-Choice.h b/Bouncer/e2sm_kpm/headers/GNB-ID-Choice.h new file mode 100644 index 0000000..353d1b4 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-ID-Choice.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_ID_Choice_H_ +#define _GNB_ID_Choice_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GNB_ID_Choice_PR { + GNB_ID_Choice_PR_NOTHING, /* No components present */ + GNB_ID_Choice_PR_gnb_ID + /* Extensions may appear below */ + +} GNB_ID_Choice_PR; + +/* GNB-ID-Choice */ +typedef struct GNB_ID_Choice { + GNB_ID_Choice_PR present; + union GNB_ID_Choice_u { + BIT_STRING_t gnb_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GNB_ID_Choice_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice; +extern asn_CHOICE_specifics_t asn_SPC_GNB_ID_Choice_specs_1; +extern asn_TYPE_member_t asn_MBR_GNB_ID_Choice_1[1]; +extern asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_ID_Choice_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GNB-ID.h b/Bouncer/e2sm_kpm/headers/GNB-ID.h new file mode 100644 index 0000000..9ae9ee9 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-ID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GNB_ID_H_ +#define _GNB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GNB_ID_PR { + GNB_ID_PR_NOTHING, /* No components present */ + GNB_ID_PR_gNB_ID + /* Extensions may appear below */ + +} GNB_ID_PR; + +/* GNB-ID */ +typedef struct GNB_ID { + GNB_ID_PR present; + union GNB_ID_u { + BIT_STRING_t gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GNB_ID; +extern asn_CHOICE_specifics_t asn_SPC_GNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GNB_ID_1[1]; +extern asn_per_constraints_t asn_PER_type_GNB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GNB-Name.h b/Bouncer/e2sm_kpm/headers/GNB-Name.h new file mode 100644 index 0000000..51a2030 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GNB-Name.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_Name_H_ +#define _GNB_Name_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-DU-Name.h" +#include "GNB-CU-CP-Name.h" +#include "GNB-CU-UP-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GNB_Name_PR { + GNB_Name_PR_NOTHING, /* No components present */ + GNB_Name_PR_gNB_DU_Name, + GNB_Name_PR_gNB_CU_CP_Name, + GNB_Name_PR_gNB_CU_UP_Name + /* Extensions may appear below */ + +} GNB_Name_PR; + +/* GNB-Name */ +typedef struct GNB_Name { + GNB_Name_PR present; + union GNB_Name_u { + GNB_DU_Name_t gNB_DU_Name; + GNB_CU_CP_Name_t gNB_CU_CP_Name; + GNB_CU_UP_Name_t gNB_CU_UP_Name; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GNB_Name_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GNB_Name; +extern asn_CHOICE_specifics_t asn_SPC_GNB_Name_specs_1; +extern asn_TYPE_member_t asn_MBR_GNB_Name_1[3]; +extern asn_per_constraints_t asn_PER_type_GNB_Name_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_Name_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GUAMI.h b/Bouncer/e2sm_kpm/headers/GUAMI.h new file mode 100644 index 0000000..2c96d62 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GUAMI.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GUAMI_H_ +#define _GUAMI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "AMFRegionID.h" +#include "AMFSetID.h" +#include "AMFPointer.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GUAMI */ +typedef struct GUAMI { + PLMNIdentity_t pLMNIdentity; + AMFRegionID_t aMFRegionID; + AMFSetID_t aMFSetID; + AMFPointer_t aMFPointer; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GUAMI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GUAMI; +extern asn_SEQUENCE_specifics_t asn_SPC_GUAMI_specs_1; +extern asn_TYPE_member_t asn_MBR_GUAMI_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GUAMI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GUMMEI.h b/Bouncer/e2sm_kpm/headers/GUMMEI.h new file mode 100644 index 0000000..827a8c7 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GUMMEI.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GUMMEI_H_ +#define _GUMMEI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "MME-Group-ID.h" +#include "MME-Code.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GUMMEI */ +typedef struct GUMMEI { + PLMNIdentity_t pLMN_Identity; + MME_Group_ID_t mME_Group_ID; + MME_Code_t mME_Code; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GUMMEI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GUMMEI; +extern asn_SEQUENCE_specifics_t asn_SPC_GUMMEI_specs_1; +extern asn_TYPE_member_t asn_MBR_GUMMEI_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GUMMEI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GeneralString.h b/Bouncer/e2sm_kpm/headers/GeneralString.h new file mode 100644 index 0000000..fb5de1c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GeneralString.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _GeneralString_H_ +#define _GeneralString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t GeneralString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_GeneralString; +extern asn_TYPE_operation_t asn_OP_GeneralString; + +#define GeneralString_free OCTET_STRING_free +#define GeneralString_print OCTET_STRING_print +#define GeneralString_compare OCTET_STRING_compare +#define GeneralString_constraint asn_generic_unknown_constraint +#define GeneralString_decode_ber OCTET_STRING_decode_ber +#define GeneralString_encode_der OCTET_STRING_encode_der +#define GeneralString_decode_xer OCTET_STRING_decode_xer_hex +#define GeneralString_encode_xer OCTET_STRING_encode_xer +#define GeneralString_decode_uper OCTET_STRING_decode_uper +#define GeneralString_encode_uper OCTET_STRING_encode_uper +#define GeneralString_decode_aper OCTET_STRING_decode_aper +#define GeneralString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _GeneralString_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/GeneralizedTime.h b/Bouncer/e2sm_kpm/headers/GeneralizedTime.h new file mode 100644 index 0000000..02bffe0 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GeneralizedTime.h @@ -0,0 +1,80 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _GeneralizedTime_H_ +#define _GeneralizedTime_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime; +extern asn_TYPE_operation_t asn_OP_GeneralizedTime; + +asn_struct_print_f GeneralizedTime_print; +asn_struct_compare_f GeneralizedTime_compare; +asn_constr_check_f GeneralizedTime_constraint; +der_type_encoder_f GeneralizedTime_encode_der; +xer_type_encoder_f GeneralizedTime_encode_xer; +asn_random_fill_f GeneralizedTime_random_fill; + +#define GeneralizedTime_free OCTET_STRING_free +#define GeneralizedTime_decode_ber OCTET_STRING_decode_ber +#define GeneralizedTime_decode_xer OCTET_STRING_decode_xer_utf8 +#define GeneralizedTime_decode_uper OCTET_STRING_decode_uper +#define GeneralizedTime_encode_uper OCTET_STRING_encode_uper +#define GeneralizedTime_decode_aper OCTET_STRING_decode_aper +#define GeneralizedTime_encode_aper OCTET_STRING_encode_aper + +/*********************** + * Some handy helpers. * + ***********************/ + +struct tm; /* */ + +/* + * Convert a GeneralizedTime structure into time_t + * and optionally into struct tm. + * If as_gmt is given, the resulting _optional_tm4fill will have a GMT zone, + * instead of default local one. + * On error returns -1 and errno set to EINVAL + */ +time_t asn_GT2time(const GeneralizedTime_t *, struct tm *_optional_tm4fill, + int as_gmt); + +/* A version of the above function also returning the fractions of seconds */ +time_t asn_GT2time_frac(const GeneralizedTime_t *, + int *frac_value, int *frac_digits, /* (value / (10 ^ digits)) */ + struct tm *_optional_tm4fill, int as_gmt); + +/* + * Another version returning fractions with defined precision + * For example, parsing of the time ending with ".1" seconds + * with frac_digits=3 (msec) would yield frac_value = 100. + */ +time_t asn_GT2time_prec(const GeneralizedTime_t *, + int *frac_value, int frac_digits, + struct tm *_optional_tm4fill, int as_gmt); + +/* + * Convert a struct tm into GeneralizedTime. + * If _optional_gt is not given, this function will try to allocate one. + * If force_gmt is given, the resulting GeneralizedTime will be forced + * into a GMT time zone (encoding ends with a "Z"). + * On error, this function returns 0 and sets errno. + */ +GeneralizedTime_t *asn_time2GT(GeneralizedTime_t *_optional_gt, + const struct tm *, int force_gmt); +GeneralizedTime_t *asn_time2GT_frac(GeneralizedTime_t *_optional_gt, + const struct tm *, int frac_value, int frac_digits, int force_gmt); + +#ifdef __cplusplus +} +#endif + +#endif /* _GeneralizedTime_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/GlobalENB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalENB-ID.h new file mode 100644 index 0000000..01f6117 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalENB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GlobalENB_ID_H_ +#define _GlobalENB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "ENB-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalENB-ID */ +typedef struct GlobalENB_ID { + PLMNIdentity_t pLMNIdentity; + ENB_ID_t eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalENB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GlobalGNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalGNB-ID.h new file mode 100644 index 0000000..9b14f3a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalGNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GlobalGNB_ID_H_ +#define _GlobalGNB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "GNB-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalGNB-ID */ +typedef struct GlobalGNB_ID { + PLMNIdentity_t pLMNIdentity; + GNB_ID_t gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalGNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalGNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalGNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalGNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalGNB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GlobalKPMnode-ID.h b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-ID.h new file mode 100644 index 0000000..3661fd3 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-ID.h @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalKPMnode_ID_H_ +#define _GlobalKPMnode_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GlobalKPMnode_ID_PR { + GlobalKPMnode_ID_PR_NOTHING, /* No components present */ + GlobalKPMnode_ID_PR_gNB, + GlobalKPMnode_ID_PR_en_gNB, + GlobalKPMnode_ID_PR_ng_eNB, + GlobalKPMnode_ID_PR_eNB + /* Extensions may appear below */ + +} GlobalKPMnode_ID_PR; + +/* Forward declarations */ +struct GlobalKPMnode_gNB_ID; +struct GlobalKPMnode_en_gNB_ID; +struct GlobalKPMnode_ng_eNB_ID; +struct GlobalKPMnode_eNB_ID; + +/* GlobalKPMnode-ID */ +typedef struct GlobalKPMnode_ID { + GlobalKPMnode_ID_PR present; + union GlobalKPMnode_ID_u { + struct GlobalKPMnode_gNB_ID *gNB; + struct GlobalKPMnode_en_gNB_ID *en_gNB; + struct GlobalKPMnode_ng_eNB_ID *ng_eNB; + struct GlobalKPMnode_eNB_ID *eNB; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalKPMnode_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_ID; +extern asn_CHOICE_specifics_t asn_SPC_GlobalKPMnode_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalKPMnode_ID_1[4]; +extern asn_per_constraints_t asn_PER_type_GlobalKPMnode_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalKPMnode_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GlobalKPMnode-eNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-eNB-ID.h new file mode 100644 index 0000000..51a17cd --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-eNB-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalKPMnode_eNB_ID_H_ +#define _GlobalKPMnode_eNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalENB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalKPMnode-eNB-ID */ +typedef struct GlobalKPMnode_eNB_ID { + GlobalENB_ID_t global_eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalKPMnode_eNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_eNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_eNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalKPMnode_eNB_ID_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalKPMnode_eNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GlobalKPMnode-en-gNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-en-gNB-ID.h new file mode 100644 index 0000000..4c10fc3 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-en-gNB-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalKPMnode_en_gNB_ID_H_ +#define _GlobalKPMnode_en_gNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalenGNB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalKPMnode-en-gNB-ID */ +typedef struct GlobalKPMnode_en_gNB_ID { + GlobalenGNB_ID_t global_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalKPMnode_en_gNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_en_gNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_en_gNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalKPMnode_en_gNB_ID_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalKPMnode_en_gNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GlobalKPMnode-gNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-gNB-ID.h new file mode 100644 index 0000000..70e5f06 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-gNB-ID.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalKPMnode_gNB_ID_H_ +#define _GlobalKPMnode_gNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalgNB-ID.h" +#include "GNB-CU-UP-ID.h" +#include "GNB-DU-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalKPMnode-gNB-ID */ +typedef struct GlobalKPMnode_gNB_ID { + GlobalgNB_ID_t global_gNB_ID; + GNB_CU_UP_ID_t *gNB_CU_UP_ID; /* OPTIONAL */ + GNB_DU_ID_t *gNB_DU_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalKPMnode_gNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_gNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_gNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalKPMnode_gNB_ID_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalKPMnode_gNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GlobalKPMnode-ng-eNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-ng-eNB-ID.h new file mode 100644 index 0000000..bf2582a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalKPMnode-ng-eNB-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalKPMnode_ng_eNB_ID_H_ +#define _GlobalKPMnode_ng_eNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalngeNB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalKPMnode-ng-eNB-ID */ +typedef struct GlobalKPMnode_ng_eNB_ID { + GlobalngeNB_ID_t global_ng_eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalKPMnode_ng_eNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_ng_eNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_ng_eNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalKPMnode_ng_eNB_ID_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalKPMnode_ng_eNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GlobalNGRANNodeID.h b/Bouncer/e2sm_kpm/headers/GlobalNGRANNodeID.h new file mode 100644 index 0000000..bb34765 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalNGRANNodeID.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GlobalNGRANNodeID_H_ +#define _GlobalNGRANNodeID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GlobalNGRANNodeID_PR { + GlobalNGRANNodeID_PR_NOTHING, /* No components present */ + GlobalNGRANNodeID_PR_gNB, + GlobalNGRANNodeID_PR_ng_eNB + /* Extensions may appear below */ + +} GlobalNGRANNodeID_PR; + +/* Forward declarations */ +struct GlobalGNB_ID; +struct GlobalNgENB_ID; + +/* GlobalNGRANNodeID */ +typedef struct GlobalNGRANNodeID { + GlobalNGRANNodeID_PR present; + union GlobalNGRANNodeID_u { + struct GlobalGNB_ID *gNB; + struct GlobalNgENB_ID *ng_eNB; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalNGRANNodeID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalNGRANNodeID; +extern asn_CHOICE_specifics_t asn_SPC_GlobalNGRANNodeID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalNGRANNodeID_1[2]; +extern asn_per_constraints_t asn_PER_type_GlobalNGRANNodeID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalNGRANNodeID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GlobalNgENB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalNgENB-ID.h new file mode 100644 index 0000000..db01dd0 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalNgENB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GlobalNgENB_ID_H_ +#define _GlobalNgENB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "NgENB-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalNgENB-ID */ +typedef struct GlobalNgENB_ID { + PLMNIdentity_t pLMNIdentity; + NgENB_ID_t ngENB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalNgENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalNgENB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalNgENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalNgENB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalNgENB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GlobalenGNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalenGNB-ID.h new file mode 100644 index 0000000..61e4d4c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalenGNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GlobalenGNB_ID_H_ +#define _GlobalenGNB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "EN-GNB-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalenGNB-ID */ +typedef struct GlobalenGNB_ID { + PLMNIdentity_t pLMN_Identity; + EN_GNB_ID_t en_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalenGNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalenGNB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GlobalgNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalgNB-ID.h new file mode 100644 index 0000000..d2f8e6f --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalgNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalgNB_ID_H_ +#define _GlobalgNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include "GNB-ID-Choice.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalgNB-ID */ +typedef struct GlobalgNB_ID { + PLMN_Identity_t plmn_id; + GNB_ID_Choice_t gnb_id; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalgNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalgNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalgNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalgNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GlobalngeNB-ID.h b/Bouncer/e2sm_kpm/headers/GlobalngeNB-ID.h new file mode 100644 index 0000000..1cc69c8 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GlobalngeNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalngeNB_ID_H_ +#define _GlobalngeNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include "ENB-ID-Choice.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalngeNB-ID */ +typedef struct GlobalngeNB_ID { + PLMN_Identity_t plmn_id; + ENB_ID_Choice_t enb_id; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalngeNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalngeNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalngeNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalngeNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/GranularityPeriod.h b/Bouncer/e2sm_kpm/headers/GranularityPeriod.h new file mode 100644 index 0000000..0c3b090 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GranularityPeriod.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GranularityPeriod_H_ +#define _GranularityPeriod_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* GranularityPeriod */ +typedef unsigned long GranularityPeriod_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GranularityPeriod_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GranularityPeriod; +extern const asn_INTEGER_specifics_t asn_SPC_GranularityPeriod_specs_1; +asn_struct_free_f GranularityPeriod_free; +asn_struct_print_f GranularityPeriod_print; +asn_constr_check_f GranularityPeriod_constraint; +ber_type_decoder_f GranularityPeriod_decode_ber; +der_type_encoder_f GranularityPeriod_encode_der; +xer_type_decoder_f GranularityPeriod_decode_xer; +xer_type_encoder_f GranularityPeriod_encode_xer; +per_type_decoder_f GranularityPeriod_decode_uper; +per_type_encoder_f GranularityPeriod_encode_uper; +per_type_decoder_f GranularityPeriod_decode_aper; +per_type_encoder_f GranularityPeriod_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GranularityPeriod_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/GraphicString.h b/Bouncer/e2sm_kpm/headers/GraphicString.h new file mode 100644 index 0000000..19cac68 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GraphicString.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _GraphicString_H_ +#define _GraphicString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t GraphicString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_GraphicString; +extern asn_TYPE_operation_t asn_OP_GraphicString; + +#define GraphicString_free OCTET_STRING_free +#define GraphicString_print OCTET_STRING_print +#define GraphicString_compare OCTET_STRING_compare +#define GraphicString_constraint asn_generic_unknown_constraint +#define GraphicString_decode_ber OCTET_STRING_decode_ber +#define GraphicString_encode_der OCTET_STRING_encode_der +#define GraphicString_decode_xer OCTET_STRING_decode_xer_hex +#define GraphicString_encode_xer OCTET_STRING_encode_xer +#define GraphicString_decode_uper OCTET_STRING_decode_uper +#define GraphicString_encode_uper OCTET_STRING_encode_uper +#define GraphicString_decode_aper OCTET_STRING_decode_aper +#define GraphicString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _GraphicString_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/GroupID.h b/Bouncer/e2sm_kpm/headers/GroupID.h new file mode 100644 index 0000000..259d9cd --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/GroupID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _GroupID_H_ +#define _GroupID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "FiveQI.h" +#include "QCI.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GroupID_PR { + GroupID_PR_NOTHING, /* No components present */ + GroupID_PR_fiveGC, + GroupID_PR_ePC + /* Extensions may appear below */ + +} GroupID_PR; + +/* GroupID */ +typedef struct GroupID { + GroupID_PR present; + union GroupID_u { + FiveQI_t fiveGC; + QCI_t ePC; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GroupID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GroupID; + +#ifdef __cplusplus +} +#endif + +#endif /* _GroupID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/IA5String.h b/Bouncer/e2sm_kpm/headers/IA5String.h new file mode 100644 index 0000000..321f0c7 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/IA5String.h @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _IA5String_H_ +#define _IA5String_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t IA5String_t; /* Implemented via OCTET STRING */ + +/* + * IA5String ASN.1 type definition. + */ +extern asn_TYPE_descriptor_t asn_DEF_IA5String; +extern asn_TYPE_operation_t asn_OP_IA5String; + +asn_constr_check_f IA5String_constraint; + +#define IA5String_free OCTET_STRING_free +#define IA5String_print OCTET_STRING_print_utf8 +#define IA5String_compare OCTET_STRING_compare +#define IA5String_decode_ber OCTET_STRING_decode_ber +#define IA5String_encode_der OCTET_STRING_encode_der +#define IA5String_decode_xer OCTET_STRING_decode_xer_utf8 +#define IA5String_encode_xer OCTET_STRING_encode_xer_utf8 +#define IA5String_decode_uper OCTET_STRING_decode_uper +#define IA5String_encode_uper OCTET_STRING_encode_uper +#define IA5String_decode_aper OCTET_STRING_decode_aper +#define IA5String_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _IA5String_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/INTEGER.h b/Bouncer/e2sm_kpm/headers/INTEGER.h new file mode 100644 index 0000000..f776c07 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/INTEGER.h @@ -0,0 +1,108 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _INTEGER_H_ +#define _INTEGER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ASN__PRIMITIVE_TYPE_t INTEGER_t; + +extern asn_TYPE_descriptor_t asn_DEF_INTEGER; +extern asn_TYPE_operation_t asn_OP_INTEGER; + +/* Map with to integer value association */ +typedef struct asn_INTEGER_enum_map_s { + long nat_value; /* associated native integer value */ + size_t enum_len; /* strlen("tag") */ + const char *enum_name; /* "tag" */ +} asn_INTEGER_enum_map_t; + +/* This type describes an enumeration for INTEGER and ENUMERATED types */ +typedef struct asn_INTEGER_specifics_s { + const asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */ + const unsigned int *enum2value; /* "tag" => N; sorted by tag */ + int map_count; /* Elements in either map */ + int extension; /* This map is extensible */ + int strict_enumeration; /* Enumeration set is fixed */ + int field_width; /* Size of native integer */ + int field_unsigned; /* Signed=0, unsigned=1 */ +} asn_INTEGER_specifics_t; + +#define INTEGER_free ASN__PRIMITIVE_TYPE_free +#define INTEGER_decode_ber ber_decode_primitive +#define INTEGER_constraint asn_generic_no_constraint +asn_struct_print_f INTEGER_print; +asn_struct_compare_f INTEGER_compare; +der_type_encoder_f INTEGER_encode_der; +xer_type_decoder_f INTEGER_decode_xer; +xer_type_encoder_f INTEGER_encode_xer; +oer_type_decoder_f INTEGER_decode_oer; +oer_type_encoder_f INTEGER_encode_oer; +per_type_decoder_f INTEGER_decode_uper; +per_type_encoder_f INTEGER_encode_uper; +per_type_decoder_f INTEGER_decode_aper; +per_type_encoder_f INTEGER_encode_aper; +asn_random_fill_f INTEGER_random_fill; + +/*********************************** + * Some handy conversion routines. * + ***********************************/ + +/* + * Natiwe size-independent conversion of native integers to/from INTEGER. + * (l_size) is in bytes. + * Returns 0 if it was possible to convert, -1 otherwise. + * -1/EINVAL: Mandatory argument missing + * -1/ERANGE: Value encoded is out of range for long representation + * -1/ENOMEM: Memory allocation failed (in asn_*2INTEGER()). + */ +int asn_INTEGER2imax(const INTEGER_t *i, intmax_t *l); +int asn_INTEGER2umax(const INTEGER_t *i, uintmax_t *l); +int asn_imax2INTEGER(INTEGER_t *i, intmax_t l); +int asn_umax2INTEGER(INTEGER_t *i, uintmax_t l); + +/* + * Size-specific conversion helpers. + */ +int asn_INTEGER2long(const INTEGER_t *i, long *l); +int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l); +int asn_long2INTEGER(INTEGER_t *i, long l); +int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l); +int asn_int642INTEGER(INTEGER_t *i, int64_t l); +int asn_uint642INTEGER(INTEGER_t *i, uint64_t l); + +/* A version of strtol/strtoimax(3) with nicer error reporting. */ +enum asn_strtox_result_e { + ASN_STRTOX_ERROR_RANGE = -3, /* Input outside of supported numeric range */ + ASN_STRTOX_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */ + ASN_STRTOX_EXPECT_MORE = -1, /* More data expected (e.g. "+") */ + ASN_STRTOX_OK = 0, /* Conversion succeded, number ends at (*end) */ + ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeded, but the string has extra stuff */ +}; +enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end, + long *l); +enum asn_strtox_result_e asn_strtoul_lim(const char *str, const char **end, + unsigned long *l); +enum asn_strtox_result_e asn_strtoimax_lim(const char *str, const char **end, + intmax_t *l); +enum asn_strtox_result_e asn_strtoumax_lim(const char *str, const char **end, + uintmax_t *l); + +/* + * Convert the integer value into the corresponding enumeration map entry. + */ +const asn_INTEGER_enum_map_t *INTEGER_map_value2enum( + const asn_INTEGER_specifics_t *specs, long value); + +#ifdef __cplusplus +} +#endif + +#endif /* _INTEGER_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/ISO646String.h b/Bouncer/e2sm_kpm/headers/ISO646String.h new file mode 100644 index 0000000..cd24a68 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ISO646String.h @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _ISO646String_H_ +#define _ISO646String_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef VisibleString_t ISO646String_t; /* Implemented using VisibleString */ + +extern asn_TYPE_descriptor_t asn_DEF_ISO646String; +extern asn_TYPE_operation_t asn_OP_ISO646String; + +#define ISO646String_free OCTET_STRING_free +#define ISO646String_print OCTET_STRING_print_utf8 +#define ISO646String_compare OCTET_STRING_compare +#define ISO646String_constraint VisibleString_constraint +#define ISO646String_decode_ber OCTET_STRING_decode_ber +#define ISO646String_encode_der OCTET_STRING_encode_der +#define ISO646String_decode_xer OCTET_STRING_decode_xer_utf8 +#define ISO646String_encode_xer OCTET_STRING_encode_xer_utf8 +#define ISO646String_decode_uper OCTET_STRING_decode_uper +#define ISO646String_encode_uper OCTET_STRING_encode_uper +#define ISO646String_decode_aper OCTET_STRING_decode_aper +#define ISO646String_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _ISO646String_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/IndexToRFSP.h b/Bouncer/e2sm_kpm/headers/IndexToRFSP.h new file mode 100644 index 0000000..574825c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/IndexToRFSP.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _IndexToRFSP_H_ +#define _IndexToRFSP_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* IndexToRFSP */ +typedef long IndexToRFSP_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IndexToRFSP; +asn_struct_free_f IndexToRFSP_free; +asn_struct_print_f IndexToRFSP_print; +asn_constr_check_f IndexToRFSP_constraint; +ber_type_decoder_f IndexToRFSP_decode_ber; +der_type_encoder_f IndexToRFSP_encode_der; +xer_type_decoder_f IndexToRFSP_decode_xer; +xer_type_encoder_f IndexToRFSP_encode_xer; +per_type_decoder_f IndexToRFSP_decode_uper; +per_type_encoder_f IndexToRFSP_encode_uper; +per_type_decoder_f IndexToRFSP_decode_aper; +per_type_encoder_f IndexToRFSP_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _IndexToRFSP_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/Interface-MessageID.h b/Bouncer/e2sm_kpm/headers/Interface-MessageID.h new file mode 100644 index 0000000..2a31202 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/Interface-MessageID.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _Interface_MessageID_H_ +#define _Interface_MessageID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "NativeEnumerated.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Interface_MessageID__messageType { + Interface_MessageID__messageType_initiatingMessage = 0, + Interface_MessageID__messageType_successfulOutcome = 1, + Interface_MessageID__messageType_unsuccessfulOutcome = 2 + /* + * Enumeration is extensible + */ +} e_Interface_MessageID__messageType; + +/* Interface-MessageID */ +typedef struct Interface_MessageID { + long interfaceProcedureID; + long messageType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Interface_MessageID_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_messageType_3; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_Interface_MessageID; + +#ifdef __cplusplus +} +#endif + +#endif /* _Interface_MessageID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceID-E1.h b/Bouncer/e2sm_kpm/headers/InterfaceID-E1.h new file mode 100644 index 0000000..07e2dbd --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceID-E1.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_E1_H_ +#define _InterfaceID_E1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GlobalGNB-ID.h" +#include "GNB-CU-UP-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-E1 */ +typedef struct InterfaceID_E1 { + GlobalGNB_ID_t globalGNB_ID; + GNB_CU_UP_ID_t gNB_CU_UP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_E1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_E1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_E1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_E1_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_E1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceID-F1.h b/Bouncer/e2sm_kpm/headers/InterfaceID-F1.h new file mode 100644 index 0000000..3c751a9 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceID-F1.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_F1_H_ +#define _InterfaceID_F1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GlobalGNB-ID.h" +#include "GNB-DU-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-F1 */ +typedef struct InterfaceID_F1 { + GlobalGNB_ID_t globalGNB_ID; + GNB_DU_ID_t gNB_DU_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_F1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_F1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_F1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_F1_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_F1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceID-NG.h b/Bouncer/e2sm_kpm/headers/InterfaceID-NG.h new file mode 100644 index 0000000..714961e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceID-NG.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_NG_H_ +#define _InterfaceID_NG_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GUAMI.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-NG */ +typedef struct InterfaceID_NG { + GUAMI_t guami; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_NG_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_NG; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_NG_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_NG_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_NG_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceID-S1.h b/Bouncer/e2sm_kpm/headers/InterfaceID-S1.h new file mode 100644 index 0000000..75e8463 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceID-S1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_S1_H_ +#define _InterfaceID_S1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GUMMEI.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-S1 */ +typedef struct InterfaceID_S1 { + GUMMEI_t gUMMEI; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_S1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_S1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_S1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_S1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_S1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceID-W1.h b/Bouncer/e2sm_kpm/headers/InterfaceID-W1.h new file mode 100644 index 0000000..7309df3 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceID-W1.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_W1_H_ +#define _InterfaceID_W1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GlobalNgENB-ID.h" +#include "NGENB-DU-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-W1 */ +typedef struct InterfaceID_W1 { + GlobalNgENB_ID_t global_ng_eNB_ID; + NGENB_DU_ID_t ng_eNB_DU_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_W1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_W1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_W1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_W1_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_W1_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceID-X2.h b/Bouncer/e2sm_kpm/headers/InterfaceID-X2.h new file mode 100644 index 0000000..8c86ef4 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceID-X2.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_X2_H_ +#define _InterfaceID_X2_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum InterfaceID_X2__nodeType_PR { + InterfaceID_X2__nodeType_PR_NOTHING, /* No components present */ + InterfaceID_X2__nodeType_PR_global_eNB_ID, + InterfaceID_X2__nodeType_PR_global_en_gNB_ID + /* Extensions may appear below */ + +} InterfaceID_X2__nodeType_PR; + +/* Forward declarations */ +struct GlobalENB_ID; +struct GlobalenGNB_ID; + +/* InterfaceID-X2 */ +typedef struct InterfaceID_X2 { + struct InterfaceID_X2__nodeType { + InterfaceID_X2__nodeType_PR present; + union InterfaceID_X2__nodeType_u { + struct GlobalENB_ID *global_eNB_ID; + struct GlobalenGNB_ID *global_en_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } nodeType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_X2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_X2; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_X2_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_X2_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_X2_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceID-Xn.h b/Bouncer/e2sm_kpm/headers/InterfaceID-Xn.h new file mode 100644 index 0000000..976e504 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceID-Xn.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_Xn_H_ +#define _InterfaceID_Xn_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GlobalNGRANNodeID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-Xn */ +typedef struct InterfaceID_Xn { + GlobalNGRANNodeID_t global_NG_RAN_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_Xn_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_Xn; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_Xn_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_Xn_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_Xn_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceIdentifier.h b/Bouncer/e2sm_kpm/headers/InterfaceIdentifier.h new file mode 100644 index 0000000..5bcf1e4 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceIdentifier.h @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceIdentifier_H_ +#define _InterfaceIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum InterfaceIdentifier_PR { + InterfaceIdentifier_PR_NOTHING, /* No components present */ + InterfaceIdentifier_PR_nG, + InterfaceIdentifier_PR_xN, + InterfaceIdentifier_PR_f1, + InterfaceIdentifier_PR_e1, + InterfaceIdentifier_PR_s1, + InterfaceIdentifier_PR_x2, + InterfaceIdentifier_PR_w1 + /* Extensions may appear below */ + +} InterfaceIdentifier_PR; + +/* Forward declarations */ +struct InterfaceID_NG; +struct InterfaceID_Xn; +struct InterfaceID_F1; +struct InterfaceID_E1; +struct InterfaceID_S1; +struct InterfaceID_X2; +struct InterfaceID_W1; + +/* InterfaceIdentifier */ +typedef struct InterfaceIdentifier { + InterfaceIdentifier_PR present; + union InterfaceIdentifier_u { + struct InterfaceID_NG *nG; + struct InterfaceID_Xn *xN; + struct InterfaceID_F1 *f1; + struct InterfaceID_E1 *e1; + struct InterfaceID_S1 *s1; + struct InterfaceID_X2 *x2; + struct InterfaceID_W1 *w1; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceIdentifier; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceIdentifier_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/InterfaceType.h b/Bouncer/e2sm_kpm/headers/InterfaceType.h new file mode 100644 index 0000000..2c3679d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/InterfaceType.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _InterfaceType_H_ +#define _InterfaceType_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum InterfaceType { + InterfaceType_nG = 0, + InterfaceType_xn = 1, + InterfaceType_f1 = 2, + InterfaceType_e1 = 3, + InterfaceType_s1 = 4, + InterfaceType_x2 = 5, + InterfaceType_w1 = 6 + /* + * Enumeration is extensible + */ +} e_InterfaceType; + +/* InterfaceType */ +typedef long InterfaceType_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceType; +asn_struct_free_f InterfaceType_free; +asn_struct_print_f InterfaceType_print; +asn_constr_check_f InterfaceType_constraint; +ber_type_decoder_f InterfaceType_decode_ber; +der_type_encoder_f InterfaceType_encode_der; +xer_type_decoder_f InterfaceType_decode_xer; +xer_type_encoder_f InterfaceType_encode_xer; +per_type_decoder_f InterfaceType_decode_uper; +per_type_encoder_f InterfaceType_encode_uper; +per_type_decoder_f InterfaceType_decode_aper; +per_type_encoder_f InterfaceType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceType_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/LabelInfoItem.h b/Bouncer/e2sm_kpm/headers/LabelInfoItem.h new file mode 100644 index 0000000..3761f10 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/LabelInfoItem.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _LabelInfoItem_H_ +#define _LabelInfoItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementLabel.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* LabelInfoItem */ +typedef struct LabelInfoItem { + MeasurementLabel_t measLabel; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} LabelInfoItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_LabelInfoItem; +extern asn_SEQUENCE_specifics_t asn_SPC_LabelInfoItem_specs_1; +extern asn_TYPE_member_t asn_MBR_LabelInfoItem_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _LabelInfoItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/LabelInfoList.h b/Bouncer/e2sm_kpm/headers/LabelInfoList.h new file mode 100644 index 0000000..5473fbd --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/LabelInfoList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _LabelInfoList_H_ +#define _LabelInfoList_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct LabelInfoItem; + +/* LabelInfoList */ +typedef struct LabelInfoList { + A_SEQUENCE_OF(struct LabelInfoItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} LabelInfoList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_LabelInfoList; +extern asn_SET_OF_specifics_t asn_SPC_LabelInfoList_specs_1; +extern asn_TYPE_member_t asn_MBR_LabelInfoList_1[1]; +extern asn_per_constraints_t asn_PER_type_LabelInfoList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _LabelInfoList_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MME-Code.h b/Bouncer/e2sm_kpm/headers/MME-Code.h new file mode 100644 index 0000000..7a1c912 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MME-Code.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MME_Code_H_ +#define _MME_Code_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MME-Code */ +typedef OCTET_STRING_t MME_Code_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MME_Code_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MME_Code; +asn_struct_free_f MME_Code_free; +asn_struct_print_f MME_Code_print; +asn_constr_check_f MME_Code_constraint; +ber_type_decoder_f MME_Code_decode_ber; +der_type_encoder_f MME_Code_encode_der; +xer_type_decoder_f MME_Code_decode_xer; +xer_type_encoder_f MME_Code_encode_xer; +per_type_decoder_f MME_Code_decode_uper; +per_type_encoder_f MME_Code_encode_uper; +per_type_decoder_f MME_Code_decode_aper; +per_type_encoder_f MME_Code_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MME_Code_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MME-Group-ID.h b/Bouncer/e2sm_kpm/headers/MME-Group-ID.h new file mode 100644 index 0000000..84eb3bf --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MME-Group-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MME_Group_ID_H_ +#define _MME_Group_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MME-Group-ID */ +typedef OCTET_STRING_t MME_Group_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MME_Group_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MME_Group_ID; +asn_struct_free_f MME_Group_ID_free; +asn_struct_print_f MME_Group_ID_print; +asn_constr_check_f MME_Group_ID_constraint; +ber_type_decoder_f MME_Group_ID_decode_ber; +der_type_encoder_f MME_Group_ID_encode_der; +xer_type_decoder_f MME_Group_ID_decode_xer; +xer_type_encoder_f MME_Group_ID_encode_xer; +per_type_decoder_f MME_Group_ID_decode_uper; +per_type_encoder_f MME_Group_ID_encode_uper; +per_type_decoder_f MME_Group_ID_decode_aper; +per_type_encoder_f MME_Group_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MME_Group_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MME-UE-S1AP-ID.h b/Bouncer/e2sm_kpm/headers/MME-UE-S1AP-ID.h new file mode 100644 index 0000000..4b18e19 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MME-UE-S1AP-ID.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MME_UE_S1AP_ID_H_ +#define _MME_UE_S1AP_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MME-UE-S1AP-ID */ +typedef unsigned long MME_UE_S1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MME_UE_S1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MME_UE_S1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_MME_UE_S1AP_ID_specs_1; +asn_struct_free_f MME_UE_S1AP_ID_free; +asn_struct_print_f MME_UE_S1AP_ID_print; +asn_constr_check_f MME_UE_S1AP_ID_constraint; +ber_type_decoder_f MME_UE_S1AP_ID_decode_ber; +der_type_encoder_f MME_UE_S1AP_ID_encode_der; +xer_type_decoder_f MME_UE_S1AP_ID_decode_xer; +xer_type_encoder_f MME_UE_S1AP_ID_encode_xer; +per_type_decoder_f MME_UE_S1AP_ID_decode_uper; +per_type_encoder_f MME_UE_S1AP_ID_encode_uper; +per_type_decoder_f MME_UE_S1AP_ID_decode_aper; +per_type_encoder_f MME_UE_S1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MME_UE_S1AP_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MatchingCondItem.h b/Bouncer/e2sm_kpm/headers/MatchingCondItem.h new file mode 100644 index 0000000..2391f42 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MatchingCondItem.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MatchingCondItem_H_ +#define _MatchingCondItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum MatchingCondItem_PR { + MatchingCondItem_PR_NOTHING, /* No components present */ + MatchingCondItem_PR_measLabel, + MatchingCondItem_PR_testCondInfo + /* Extensions may appear below */ + +} MatchingCondItem_PR; + +/* Forward declarations */ +struct MeasurementLabel; +struct TestCondInfo; + +/* MatchingCondItem */ +typedef struct MatchingCondItem { + MatchingCondItem_PR present; + union MatchingCondItem_u { + struct MeasurementLabel *measLabel; + struct TestCondInfo *testCondInfo; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MatchingCondItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MatchingCondItem; +extern asn_CHOICE_specifics_t asn_SPC_MatchingCondItem_specs_1; +extern asn_TYPE_member_t asn_MBR_MatchingCondItem_1[2]; +extern asn_per_constraints_t asn_PER_type_MatchingCondItem_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MatchingCondItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MatchingCondList.h b/Bouncer/e2sm_kpm/headers/MatchingCondList.h new file mode 100644 index 0000000..4f42cc2 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MatchingCondList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MatchingCondList_H_ +#define _MatchingCondList_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MatchingCondItem; + +/* MatchingCondList */ +typedef struct MatchingCondList { + A_SEQUENCE_OF(struct MatchingCondItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MatchingCondList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MatchingCondList; +extern asn_SET_OF_specifics_t asn_SPC_MatchingCondList_specs_1; +extern asn_TYPE_member_t asn_MBR_MatchingCondList_1[1]; +extern asn_per_constraints_t asn_PER_type_MatchingCondList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MatchingCondList_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MatchingUEidItem.h b/Bouncer/e2sm_kpm/headers/MatchingUEidItem.h new file mode 100644 index 0000000..b3e304c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MatchingUEidItem.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MatchingUEidItem_H_ +#define _MatchingUEidItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "UEID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MatchingUEidItem */ +typedef struct MatchingUEidItem { + UEID_t ueID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MatchingUEidItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MatchingUEidItem; +extern asn_SEQUENCE_specifics_t asn_SPC_MatchingUEidItem_specs_1; +extern asn_TYPE_member_t asn_MBR_MatchingUEidItem_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MatchingUEidItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MatchingUEidList.h b/Bouncer/e2sm_kpm/headers/MatchingUEidList.h new file mode 100644 index 0000000..4965f7d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MatchingUEidList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MatchingUEidList_H_ +#define _MatchingUEidList_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MatchingUEidItem; + +/* MatchingUEidList */ +typedef struct MatchingUEidList { + A_SEQUENCE_OF(struct MatchingUEidItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MatchingUEidList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MatchingUEidList; +extern asn_SET_OF_specifics_t asn_SPC_MatchingUEidList_specs_1; +extern asn_TYPE_member_t asn_MBR_MatchingUEidList_1[1]; +extern asn_per_constraints_t asn_PER_type_MatchingUEidList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MatchingUEidList_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementCondItem.h b/Bouncer/e2sm_kpm/headers/MeasurementCondItem.h new file mode 100644 index 0000000..8f664aa --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementCondItem.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementCondItem_H_ +#define _MeasurementCondItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementType.h" +#include "MatchingCondList.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MeasurementCondItem */ +typedef struct MeasurementCondItem { + MeasurementType_t measType; + MatchingCondList_t matchingCond; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementCondItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementCondItem; +extern asn_SEQUENCE_specifics_t asn_SPC_MeasurementCondItem_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementCondItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementCondItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementCondList.h b/Bouncer/e2sm_kpm/headers/MeasurementCondList.h new file mode 100644 index 0000000..cccc4b8 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementCondList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementCondList_H_ +#define _MeasurementCondList_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MeasurementCondItem; + +/* MeasurementCondList */ +typedef struct MeasurementCondList { + A_SEQUENCE_OF(struct MeasurementCondItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementCondList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementCondList; +extern asn_SET_OF_specifics_t asn_SPC_MeasurementCondList_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementCondList_1[1]; +extern asn_per_constraints_t asn_PER_type_MeasurementCondList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementCondList_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementCondUEidItem.h b/Bouncer/e2sm_kpm/headers/MeasurementCondUEidItem.h new file mode 100644 index 0000000..2ea31d3 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementCondUEidItem.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementCondUEidItem_H_ +#define _MeasurementCondUEidItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementType.h" +#include "MatchingCondList.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MatchingUEidList; + +/* MeasurementCondUEidItem */ +typedef struct MeasurementCondUEidItem { + MeasurementType_t measType; + MatchingCondList_t matchingCond; + struct MatchingUEidList *matchingUEidList; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementCondUEidItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementCondUEidItem; +extern asn_SEQUENCE_specifics_t asn_SPC_MeasurementCondUEidItem_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementCondUEidItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementCondUEidItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementCondUEidList.h b/Bouncer/e2sm_kpm/headers/MeasurementCondUEidList.h new file mode 100644 index 0000000..0480f92 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementCondUEidList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementCondUEidList_H_ +#define _MeasurementCondUEidList_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MeasurementCondUEidItem; + +/* MeasurementCondUEidList */ +typedef struct MeasurementCondUEidList { + A_SEQUENCE_OF(struct MeasurementCondUEidItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementCondUEidList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementCondUEidList; +extern asn_SET_OF_specifics_t asn_SPC_MeasurementCondUEidList_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementCondUEidList_1[1]; +extern asn_per_constraints_t asn_PER_type_MeasurementCondUEidList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementCondUEidList_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementData.h b/Bouncer/e2sm_kpm/headers/MeasurementData.h new file mode 100644 index 0000000..e6c050d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementData.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementData_H_ +#define _MeasurementData_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MeasurementDataItem; + +/* MeasurementData */ +typedef struct MeasurementData { + A_SEQUENCE_OF(struct MeasurementDataItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementData; +extern asn_SET_OF_specifics_t asn_SPC_MeasurementData_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementData_1[1]; +extern asn_per_constraints_t asn_PER_type_MeasurementData_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementData_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementDataItem.h b/Bouncer/e2sm_kpm/headers/MeasurementDataItem.h new file mode 100644 index 0000000..b9d1b21 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementDataItem.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementDataItem_H_ +#define _MeasurementDataItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementRecord.h" +#include "NativeEnumerated.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum MeasurementDataItem__incompleteFlag { + MeasurementDataItem__incompleteFlag_true = 0 + /* + * Enumeration is extensible + */ +} e_MeasurementDataItem__incompleteFlag; + +/* MeasurementDataItem */ +typedef struct MeasurementDataItem { + MeasurementRecord_t measRecord; + long *incompleteFlag; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementDataItem_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_incompleteFlag_3; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementDataItem; +extern asn_SEQUENCE_specifics_t asn_SPC_MeasurementDataItem_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementDataItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementDataItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-Item.h b/Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-Item.h new file mode 100644 index 0000000..ef69a19 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementInfo_Action_Item_H_ +#define _MeasurementInfo_Action_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementTypeName.h" +#include "MeasurementTypeID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MeasurementInfo-Action-Item */ +typedef struct MeasurementInfo_Action_Item { + MeasurementTypeName_t measName; + MeasurementTypeID_t *measID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementInfo_Action_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementInfo_Action_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_MeasurementInfo_Action_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementInfo_Action_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementInfo_Action_Item_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-List.h b/Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-List.h new file mode 100644 index 0000000..3faba93 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementInfo-Action-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementInfo_Action_List_H_ +#define _MeasurementInfo_Action_List_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MeasurementInfo_Action_Item; + +/* MeasurementInfo-Action-List */ +typedef struct MeasurementInfo_Action_List { + A_SEQUENCE_OF(struct MeasurementInfo_Action_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementInfo_Action_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementInfo_Action_List; +extern asn_SET_OF_specifics_t asn_SPC_MeasurementInfo_Action_List_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementInfo_Action_List_1[1]; +extern asn_per_constraints_t asn_PER_type_MeasurementInfo_Action_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementInfo_Action_List_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementInfoItem.h b/Bouncer/e2sm_kpm/headers/MeasurementInfoItem.h new file mode 100644 index 0000000..a9afa60 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementInfoItem.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementInfoItem_H_ +#define _MeasurementInfoItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementType.h" +#include "LabelInfoList.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MeasurementInfoItem */ +typedef struct MeasurementInfoItem { + MeasurementType_t measType; + LabelInfoList_t labelInfoList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementInfoItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementInfoItem; +extern asn_SEQUENCE_specifics_t asn_SPC_MeasurementInfoItem_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementInfoItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementInfoItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementInfoList.h b/Bouncer/e2sm_kpm/headers/MeasurementInfoList.h new file mode 100644 index 0000000..a7adc44 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementInfoList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementInfoList_H_ +#define _MeasurementInfoList_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MeasurementInfoItem; + +/* MeasurementInfoList */ +typedef struct MeasurementInfoList { + A_SEQUENCE_OF(struct MeasurementInfoItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementInfoList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementInfoList; +extern asn_SET_OF_specifics_t asn_SPC_MeasurementInfoList_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementInfoList_1[1]; +extern asn_per_constraints_t asn_PER_type_MeasurementInfoList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementInfoList_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementLabel.h b/Bouncer/e2sm_kpm/headers/MeasurementLabel.h new file mode 100644 index 0000000..7fc3e5a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementLabel.h @@ -0,0 +1,124 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementLabel_H_ +#define _MeasurementLabel_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" +#include "PLMNIdentity.h" +#include "FiveQI.h" +#include "QosFlowIdentifier.h" +#include "QCI.h" +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum MeasurementLabel__noLabel { + MeasurementLabel__noLabel_true = 0 + /* + * Enumeration is extensible + */ +} e_MeasurementLabel__noLabel; +typedef enum MeasurementLabel__sUM { + MeasurementLabel__sUM_true = 0 + /* + * Enumeration is extensible + */ +} e_MeasurementLabel__sUM; +typedef enum MeasurementLabel__preLabelOverride { + MeasurementLabel__preLabelOverride_true = 0 + /* + * Enumeration is extensible + */ +} e_MeasurementLabel__preLabelOverride; +typedef enum MeasurementLabel__startEndInd { + MeasurementLabel__startEndInd_start = 0, + MeasurementLabel__startEndInd_end = 1 + /* + * Enumeration is extensible + */ +} e_MeasurementLabel__startEndInd; +typedef enum MeasurementLabel__min { + MeasurementLabel__min_true = 0 + /* + * Enumeration is extensible + */ +} e_MeasurementLabel__min; +typedef enum MeasurementLabel__max { + MeasurementLabel__max_true = 0 + /* + * Enumeration is extensible + */ +} e_MeasurementLabel__max; +typedef enum MeasurementLabel__avg { + MeasurementLabel__avg_true = 0 + /* + * Enumeration is extensible + */ +} e_MeasurementLabel__avg; + +/* Forward declarations */ +struct S_NSSAI; + +/* MeasurementLabel */ +typedef struct MeasurementLabel { + long *noLabel; /* OPTIONAL */ + PLMNIdentity_t *plmnID; /* OPTIONAL */ + struct S_NSSAI *sliceID; /* OPTIONAL */ + FiveQI_t *fiveQI; /* OPTIONAL */ + QosFlowIdentifier_t *qFI; /* OPTIONAL */ + QCI_t *qCI; /* OPTIONAL */ + QCI_t *qCImax; /* OPTIONAL */ + QCI_t *qCImin; /* OPTIONAL */ + long *aRPmax; /* OPTIONAL */ + long *aRPmin; /* OPTIONAL */ + long *bitrateRange; /* OPTIONAL */ + long *layerMU_MIMO; /* OPTIONAL */ + long *sUM; /* OPTIONAL */ + long *distBinX; /* OPTIONAL */ + long *distBinY; /* OPTIONAL */ + long *distBinZ; /* OPTIONAL */ + long *preLabelOverride; /* OPTIONAL */ + long *startEndInd; /* OPTIONAL */ + long *min; /* OPTIONAL */ + long *max; /* OPTIONAL */ + long *avg; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementLabel_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_noLabel_2; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_sUM_16; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_preLabelOverride_22; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_startEndInd_25; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_min_29; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_max_32; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_avg_35; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementLabel; +extern asn_SEQUENCE_specifics_t asn_SPC_MeasurementLabel_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementLabel_1[21]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementLabel_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementRecord.h b/Bouncer/e2sm_kpm/headers/MeasurementRecord.h new file mode 100644 index 0000000..59505c6 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementRecord.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementRecord_H_ +#define _MeasurementRecord_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct MeasurementRecordItem; + +/* MeasurementRecord */ +typedef struct MeasurementRecord { + A_SEQUENCE_OF(struct MeasurementRecordItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementRecord_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementRecord; +extern asn_SET_OF_specifics_t asn_SPC_MeasurementRecord_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementRecord_1[1]; +extern asn_per_constraints_t asn_PER_type_MeasurementRecord_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementRecord_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementRecordItem.h b/Bouncer/e2sm_kpm/headers/MeasurementRecordItem.h new file mode 100644 index 0000000..cb06392 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementRecordItem.h @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementRecordItem_H_ +#define _MeasurementRecordItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "NativeReal.h" +#include "NULL.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum MeasurementRecordItem_PR { + MeasurementRecordItem_PR_NOTHING, /* No components present */ + MeasurementRecordItem_PR_integer, + MeasurementRecordItem_PR_real, + MeasurementRecordItem_PR_noValue + /* Extensions may appear below */ + +} MeasurementRecordItem_PR; + +/* MeasurementRecordItem */ +typedef struct MeasurementRecordItem { + MeasurementRecordItem_PR present; + union MeasurementRecordItem_u { + unsigned long integer; + double real; + NULL_t noValue; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementRecordItem_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_integer_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementRecordItem; +extern asn_CHOICE_specifics_t asn_SPC_MeasurementRecordItem_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementRecordItem_1[3]; +extern asn_per_constraints_t asn_PER_type_MeasurementRecordItem_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementRecordItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementType.h b/Bouncer/e2sm_kpm/headers/MeasurementType.h new file mode 100644 index 0000000..9220004 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementType.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementType_H_ +#define _MeasurementType_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MeasurementTypeName.h" +#include "MeasurementTypeID.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum MeasurementType_PR { + MeasurementType_PR_NOTHING, /* No components present */ + MeasurementType_PR_measName, + MeasurementType_PR_measID + /* Extensions may appear below */ + +} MeasurementType_PR; + +/* MeasurementType */ +typedef struct MeasurementType { + MeasurementType_PR present; + union MeasurementType_u { + MeasurementTypeName_t measName; + MeasurementTypeID_t measID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MeasurementType_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MeasurementType; +extern asn_CHOICE_specifics_t asn_SPC_MeasurementType_specs_1; +extern asn_TYPE_member_t asn_MBR_MeasurementType_1[2]; +extern asn_per_constraints_t asn_PER_type_MeasurementType_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementType_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementTypeID.h b/Bouncer/e2sm_kpm/headers/MeasurementTypeID.h new file mode 100644 index 0000000..ed3384a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementTypeID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementTypeID_H_ +#define _MeasurementTypeID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MeasurementTypeID */ +typedef long MeasurementTypeID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MeasurementTypeID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MeasurementTypeID; +asn_struct_free_f MeasurementTypeID_free; +asn_struct_print_f MeasurementTypeID_print; +asn_constr_check_f MeasurementTypeID_constraint; +ber_type_decoder_f MeasurementTypeID_decode_ber; +der_type_encoder_f MeasurementTypeID_encode_der; +xer_type_decoder_f MeasurementTypeID_decode_xer; +xer_type_encoder_f MeasurementTypeID_encode_xer; +per_type_decoder_f MeasurementTypeID_decode_uper; +per_type_encoder_f MeasurementTypeID_encode_uper; +per_type_decoder_f MeasurementTypeID_decode_aper; +per_type_encoder_f MeasurementTypeID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementTypeID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/MeasurementTypeName.h b/Bouncer/e2sm_kpm/headers/MeasurementTypeName.h new file mode 100644 index 0000000..4f3b826 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/MeasurementTypeName.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _MeasurementTypeName_H_ +#define _MeasurementTypeName_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PrintableString.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MeasurementTypeName */ +typedef PrintableString_t MeasurementTypeName_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MeasurementTypeName_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MeasurementTypeName; +asn_struct_free_f MeasurementTypeName_free; +asn_struct_print_f MeasurementTypeName_print; +asn_constr_check_f MeasurementTypeName_constraint; +ber_type_decoder_f MeasurementTypeName_decode_ber; +der_type_encoder_f MeasurementTypeName_encode_der; +xer_type_decoder_f MeasurementTypeName_decode_xer; +xer_type_encoder_f MeasurementTypeName_encode_xer; +per_type_decoder_f MeasurementTypeName_decode_uper; +per_type_encoder_f MeasurementTypeName_encode_uper; +per_type_decoder_f MeasurementTypeName_decode_aper; +per_type_encoder_f MeasurementTypeName_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MeasurementTypeName_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NG-RANnodeUEXnAPID.h b/Bouncer/e2sm_kpm/headers/NG-RANnodeUEXnAPID.h new file mode 100644 index 0000000..aedd06e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NG-RANnodeUEXnAPID.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NG_RANnodeUEXnAPID_H_ +#define _NG_RANnodeUEXnAPID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NG-RANnodeUEXnAPID */ +typedef unsigned long NG_RANnodeUEXnAPID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NG_RANnodeUEXnAPID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NG_RANnodeUEXnAPID; +extern const asn_INTEGER_specifics_t asn_SPC_NG_RANnodeUEXnAPID_specs_1; +asn_struct_free_f NG_RANnodeUEXnAPID_free; +asn_struct_print_f NG_RANnodeUEXnAPID_print; +asn_constr_check_f NG_RANnodeUEXnAPID_constraint; +ber_type_decoder_f NG_RANnodeUEXnAPID_decode_ber; +der_type_encoder_f NG_RANnodeUEXnAPID_encode_der; +xer_type_decoder_f NG_RANnodeUEXnAPID_decode_xer; +xer_type_encoder_f NG_RANnodeUEXnAPID_encode_xer; +per_type_decoder_f NG_RANnodeUEXnAPID_decode_uper; +per_type_encoder_f NG_RANnodeUEXnAPID_encode_uper; +per_type_decoder_f NG_RANnodeUEXnAPID_decode_aper; +per_type_encoder_f NG_RANnodeUEXnAPID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NG_RANnodeUEXnAPID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NGENB-CU-UE-W1AP-ID.h b/Bouncer/e2sm_kpm/headers/NGENB-CU-UE-W1AP-ID.h new file mode 100644 index 0000000..d8f0110 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NGENB-CU-UE-W1AP-ID.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NGENB_CU_UE_W1AP_ID_H_ +#define _NGENB_CU_UE_W1AP_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NGENB-CU-UE-W1AP-ID */ +typedef unsigned long NGENB_CU_UE_W1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NGENB_CU_UE_W1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NGENB_CU_UE_W1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1; +asn_struct_free_f NGENB_CU_UE_W1AP_ID_free; +asn_struct_print_f NGENB_CU_UE_W1AP_ID_print; +asn_constr_check_f NGENB_CU_UE_W1AP_ID_constraint; +ber_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_ber; +der_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_der; +xer_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_xer; +xer_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_xer; +per_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_uper; +per_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_uper; +per_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_aper; +per_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NGENB_CU_UE_W1AP_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NGENB-DU-ID.h b/Bouncer/e2sm_kpm/headers/NGENB-DU-ID.h new file mode 100644 index 0000000..8620e6a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NGENB-DU-ID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NGENB_DU_ID_H_ +#define _NGENB_DU_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "INTEGER.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NGENB-DU-ID */ +typedef INTEGER_t NGENB_DU_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NGENB_DU_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NGENB_DU_ID; +asn_struct_free_f NGENB_DU_ID_free; +asn_struct_print_f NGENB_DU_ID_print; +asn_constr_check_f NGENB_DU_ID_constraint; +ber_type_decoder_f NGENB_DU_ID_decode_ber; +der_type_encoder_f NGENB_DU_ID_encode_der; +xer_type_decoder_f NGENB_DU_ID_decode_xer; +xer_type_encoder_f NGENB_DU_ID_encode_xer; +per_type_decoder_f NGENB_DU_ID_decode_uper; +per_type_encoder_f NGENB_DU_ID_encode_uper; +per_type_decoder_f NGENB_DU_ID_decode_aper; +per_type_encoder_f NGENB_DU_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NGENB_DU_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NI-Type.h b/Bouncer/e2sm_kpm/headers/NI-Type.h new file mode 100644 index 0000000..c9df7da --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NI-Type.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NI_Type_H_ +#define _NI_Type_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NI_Type { + NI_Type_x2_u = 0, + NI_Type_xn_u = 1, + NI_Type_f1_u = 2 + /* + * Enumeration is extensible + */ +} e_NI_Type; + +/* NI-Type */ +typedef long NI_Type_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NI_Type_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NI_Type; +extern const asn_INTEGER_specifics_t asn_SPC_NI_Type_specs_1; +asn_struct_free_f NI_Type_free; +asn_struct_print_f NI_Type_print; +asn_constr_check_f NI_Type_constraint; +ber_type_decoder_f NI_Type_decode_ber; +der_type_encoder_f NI_Type_encode_der; +xer_type_decoder_f NI_Type_decode_xer; +xer_type_encoder_f NI_Type_encode_xer; +oer_type_decoder_f NI_Type_decode_oer; +oer_type_encoder_f NI_Type_encode_oer; +per_type_decoder_f NI_Type_decode_uper; +per_type_encoder_f NI_Type_encode_uper; +per_type_decoder_f NI_Type_decode_aper; +per_type_encoder_f NI_Type_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NI_Type_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/NR-ARFCN.h b/Bouncer/e2sm_kpm/headers/NR-ARFCN.h new file mode 100644 index 0000000..53b6e94 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NR-ARFCN.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NR_ARFCN_H_ +#define _NR_ARFCN_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NR-ARFCN */ +typedef struct NR_ARFCN { + long nRARFCN; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NR_ARFCN_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NR_ARFCN; +extern asn_SEQUENCE_specifics_t asn_SPC_NR_ARFCN_specs_1; +extern asn_TYPE_member_t asn_MBR_NR_ARFCN_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NR_ARFCN_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NR-CGI.h b/Bouncer/e2sm_kpm/headers/NR-CGI.h new file mode 100644 index 0000000..79dac62 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NR-CGI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NR_CGI_H_ +#define _NR_CGI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "NRCellIdentity.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NR-CGI */ +typedef struct NR_CGI { + PLMNIdentity_t pLMNIdentity; + NRCellIdentity_t nRCellIdentity; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NR_CGI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NR_CGI; +extern asn_SEQUENCE_specifics_t asn_SPC_NR_CGI_specs_1; +extern asn_TYPE_member_t asn_MBR_NR_CGI_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NR_CGI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NR-PCI.h b/Bouncer/e2sm_kpm/headers/NR-PCI.h new file mode 100644 index 0000000..14da2df --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NR-PCI.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NR_PCI_H_ +#define _NR_PCI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NR-PCI */ +typedef long NR_PCI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NR_PCI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NR_PCI; +asn_struct_free_f NR_PCI_free; +asn_struct_print_f NR_PCI_print; +asn_constr_check_f NR_PCI_constraint; +ber_type_decoder_f NR_PCI_decode_ber; +der_type_encoder_f NR_PCI_encode_der; +xer_type_decoder_f NR_PCI_decode_xer; +xer_type_encoder_f NR_PCI_encode_xer; +per_type_decoder_f NR_PCI_decode_uper; +per_type_encoder_f NR_PCI_encode_uper; +per_type_decoder_f NR_PCI_decode_aper; +per_type_encoder_f NR_PCI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NR_PCI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NRCGI.h b/Bouncer/e2sm_kpm/headers/NRCGI.h new file mode 100644 index 0000000..2f80a5a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NRCGI.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NRCGI_H_ +#define _NRCGI_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include "NRCellIdentity.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NRCGI */ +typedef struct NRCGI { + PLMN_Identity_t pLMN_Identity; + NRCellIdentity_t nRCellIdentity; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NRCGI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NRCGI; +extern asn_SEQUENCE_specifics_t asn_SPC_NRCGI_specs_1; +extern asn_TYPE_member_t asn_MBR_NRCGI_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRCGI_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/NRCellIdentity.h b/Bouncer/e2sm_kpm/headers/NRCellIdentity.h new file mode 100644 index 0000000..5e140d5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NRCellIdentity.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NRCellIdentity_H_ +#define _NRCellIdentity_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NRCellIdentity */ +typedef BIT_STRING_t NRCellIdentity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NRCellIdentity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NRCellIdentity; +asn_struct_free_f NRCellIdentity_free; +asn_struct_print_f NRCellIdentity_print; +asn_constr_check_f NRCellIdentity_constraint; +ber_type_decoder_f NRCellIdentity_decode_ber; +der_type_encoder_f NRCellIdentity_encode_der; +xer_type_decoder_f NRCellIdentity_decode_xer; +xer_type_encoder_f NRCellIdentity_encode_xer; +per_type_decoder_f NRCellIdentity_decode_uper; +per_type_encoder_f NRCellIdentity_encode_uper; +per_type_decoder_f NRCellIdentity_decode_aper; +per_type_encoder_f NRCellIdentity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRCellIdentity_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NRFrequencyBand-List.h b/Bouncer/e2sm_kpm/headers/NRFrequencyBand-List.h new file mode 100644 index 0000000..9bee34d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NRFrequencyBand-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyBand_List_H_ +#define _NRFrequencyBand_List_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct NRFrequencyBandItem; + +/* NRFrequencyBand-List */ +typedef struct NRFrequencyBand_List { + A_SEQUENCE_OF(struct NRFrequencyBandItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NRFrequencyBand_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyBand_List; +extern asn_SET_OF_specifics_t asn_SPC_NRFrequencyBand_List_specs_1; +extern asn_TYPE_member_t asn_MBR_NRFrequencyBand_List_1[1]; +extern asn_per_constraints_t asn_PER_type_NRFrequencyBand_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyBand_List_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NRFrequencyBandItem.h b/Bouncer/e2sm_kpm/headers/NRFrequencyBandItem.h new file mode 100644 index 0000000..0970b9b --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NRFrequencyBandItem.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyBandItem_H_ +#define _NRFrequencyBandItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "SupportedSULBandList.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NRFrequencyBandItem */ +typedef struct NRFrequencyBandItem { + long freqBandIndicatorNr; + SupportedSULBandList_t supportedSULBandList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NRFrequencyBandItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyBandItem; +extern asn_SEQUENCE_specifics_t asn_SPC_NRFrequencyBandItem_specs_1; +extern asn_TYPE_member_t asn_MBR_NRFrequencyBandItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyBandItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NRFrequencyInfo.h b/Bouncer/e2sm_kpm/headers/NRFrequencyInfo.h new file mode 100644 index 0000000..80a8af5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NRFrequencyInfo.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyInfo_H_ +#define _NRFrequencyInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NR-ARFCN.h" +#include "NRFrequencyBand-List.h" +#include "NRFrequencyShift7p5khz.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* NRFrequencyInfo */ +typedef struct NRFrequencyInfo { + NR_ARFCN_t nrARFCN; + NRFrequencyBand_List_t frequencyBand_List; + NRFrequencyShift7p5khz_t *frequencyShift7p5khz; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NRFrequencyInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyInfo; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyInfo_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NRFrequencyShift7p5khz.h b/Bouncer/e2sm_kpm/headers/NRFrequencyShift7p5khz.h new file mode 100644 index 0000000..a881515 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NRFrequencyShift7p5khz.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyShift7p5khz_H_ +#define _NRFrequencyShift7p5khz_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NRFrequencyShift7p5khz { + NRFrequencyShift7p5khz_false = 0, + NRFrequencyShift7p5khz_true = 1 + /* + * Enumeration is extensible + */ +} e_NRFrequencyShift7p5khz; + +/* NRFrequencyShift7p5khz */ +typedef long NRFrequencyShift7p5khz_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NRFrequencyShift7p5khz_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyShift7p5khz; +extern const asn_INTEGER_specifics_t asn_SPC_NRFrequencyShift7p5khz_specs_1; +asn_struct_free_f NRFrequencyShift7p5khz_free; +asn_struct_print_f NRFrequencyShift7p5khz_print; +asn_constr_check_f NRFrequencyShift7p5khz_constraint; +ber_type_decoder_f NRFrequencyShift7p5khz_decode_ber; +der_type_encoder_f NRFrequencyShift7p5khz_encode_der; +xer_type_decoder_f NRFrequencyShift7p5khz_decode_xer; +xer_type_encoder_f NRFrequencyShift7p5khz_encode_xer; +per_type_decoder_f NRFrequencyShift7p5khz_decode_uper; +per_type_encoder_f NRFrequencyShift7p5khz_encode_uper; +per_type_decoder_f NRFrequencyShift7p5khz_decode_aper; +per_type_encoder_f NRFrequencyShift7p5khz_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyShift7p5khz_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/asn1c_defs/NULL.h b/Bouncer/e2sm_kpm/headers/NULL.h similarity index 100% rename from Bouncer/asn1c_defs/NULL.h rename to Bouncer/e2sm_kpm/headers/NULL.h diff --git a/Bouncer/e2sm_kpm/headers/NativeEnumerated.h b/Bouncer/e2sm_kpm/headers/NativeEnumerated.h new file mode 100644 index 0000000..459f0e6 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NativeEnumerated.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This type differs from the standard ENUMERATED in that it is modelled using + * the fixed machine type (long, int, short), so it can hold only values of + * limited length. There is no type (i.e., NativeEnumerated_t, any integer type + * will do). + * This type may be used when integer range is limited by subtype constraints. + */ +#ifndef _NativeEnumerated_H_ +#define _NativeEnumerated_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; +extern asn_TYPE_operation_t asn_OP_NativeEnumerated; + +xer_type_encoder_f NativeEnumerated_encode_xer; +oer_type_decoder_f NativeEnumerated_decode_oer; +oer_type_encoder_f NativeEnumerated_encode_oer; +per_type_decoder_f NativeEnumerated_decode_uper; +per_type_encoder_f NativeEnumerated_encode_uper; +per_type_decoder_f NativeEnumerated_decode_aper; +per_type_encoder_f NativeEnumerated_encode_aper; + +#define NativeEnumerated_free NativeInteger_free +#define NativeEnumerated_print NativeInteger_print +#define NativeEnumerated_compare NativeInteger_compare +#define NativeEnumerated_random_fill NativeInteger_random_fill +#define NativeEnumerated_constraint asn_generic_no_constraint +#define NativeEnumerated_decode_ber NativeInteger_decode_ber +#define NativeEnumerated_encode_der NativeInteger_encode_der +#define NativeEnumerated_decode_xer NativeInteger_decode_xer + +#ifdef __cplusplus +} +#endif + +#endif /* _NativeEnumerated_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/NativeInteger.h b/Bouncer/e2sm_kpm/headers/NativeInteger.h new file mode 100644 index 0000000..c74406a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NativeInteger.h @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This type differs from the standard INTEGER in that it is modelled using + * the fixed machine type (long, int, short), so it can hold only values of + * limited length. There is no type (i.e., NativeInteger_t, any integer type + * will do). + * This type may be used when integer range is limited by subtype constraints. + */ +#ifndef _NativeInteger_H_ +#define _NativeInteger_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; +extern asn_TYPE_operation_t asn_OP_NativeInteger; + +asn_struct_free_f NativeInteger_free; +asn_struct_print_f NativeInteger_print; +asn_struct_compare_f NativeInteger_compare; +ber_type_decoder_f NativeInteger_decode_ber; +der_type_encoder_f NativeInteger_encode_der; +xer_type_decoder_f NativeInteger_decode_xer; +xer_type_encoder_f NativeInteger_encode_xer; +oer_type_decoder_f NativeInteger_decode_oer; +oer_type_encoder_f NativeInteger_encode_oer; +per_type_decoder_f NativeInteger_decode_uper; +per_type_encoder_f NativeInteger_encode_uper; +per_type_decoder_f NativeInteger_decode_aper; +per_type_encoder_f NativeInteger_encode_aper; +asn_random_fill_f NativeInteger_random_fill; + +#define NativeInteger_constraint asn_generic_no_constraint + +#ifdef __cplusplus +} +#endif + +#endif /* _NativeInteger_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/NativeReal.h b/Bouncer/e2sm_kpm/headers/NativeReal.h new file mode 100644 index 0000000..1bfdc96 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NativeReal.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This type differs from the standard REAL in that it is modelled using + * the fixed machine type (double), so it can hold only values of + * limited precision. There is no explicit type (i.e., NativeReal_t). + * Use of this type is normally enabled by -fnative-types. + */ +#ifndef ASN_TYPE_NativeReal_H +#define ASN_TYPE_NativeReal_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_NativeReal_specifics_s { + unsigned float_size; /* sizeof(float) or sizeof(double) */ +} asn_NativeReal_specifics_t; + +extern asn_TYPE_descriptor_t asn_DEF_NativeReal; +extern asn_TYPE_operation_t asn_OP_NativeReal; + +asn_struct_free_f NativeReal_free; +asn_struct_print_f NativeReal_print; +asn_struct_compare_f NativeReal_compare; +ber_type_decoder_f NativeReal_decode_ber; +der_type_encoder_f NativeReal_encode_der; +per_type_decoder_f NativeReal_decode_uper; +per_type_encoder_f NativeReal_encode_uper; +per_type_decoder_f NativeReal_decode_aper; +per_type_encoder_f NativeReal_encode_aper; +oer_type_decoder_f NativeReal_decode_oer; +oer_type_encoder_f NativeReal_encode_oer; +xer_type_decoder_f NativeReal_decode_xer; +xer_type_encoder_f NativeReal_encode_xer; +asn_random_fill_f NativeReal_random_fill; + +#define NativeReal_constraint asn_generic_no_constraint + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_TYPE_NativeReal_H */ diff --git a/Bouncer/e2sm_kpm/headers/NgENB-ID.h b/Bouncer/e2sm_kpm/headers/NgENB-ID.h new file mode 100644 index 0000000..5c9af18 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NgENB-ID.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _NgENB_ID_H_ +#define _NgENB_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NgENB_ID_PR { + NgENB_ID_PR_NOTHING, /* No components present */ + NgENB_ID_PR_macroNgENB_ID, + NgENB_ID_PR_shortMacroNgENB_ID, + NgENB_ID_PR_longMacroNgENB_ID + /* Extensions may appear below */ + +} NgENB_ID_PR; + +/* NgENB-ID */ +typedef struct NgENB_ID { + NgENB_ID_PR present; + union NgENB_ID_u { + BIT_STRING_t macroNgENB_ID; + BIT_STRING_t shortMacroNgENB_ID; + BIT_STRING_t longMacroNgENB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NgENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NgENB_ID; +extern asn_CHOICE_specifics_t asn_SPC_NgENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_NgENB_ID_1[3]; +extern asn_per_constraints_t asn_PER_type_NgENB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _NgENB_ID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/NumericString.h b/Bouncer/e2sm_kpm/headers/NumericString.h new file mode 100644 index 0000000..5f33484 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/NumericString.h @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _NumericString_H_ +#define _NumericString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t NumericString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_NumericString; +extern asn_TYPE_operation_t asn_OP_NumericString; + +asn_constr_check_f NumericString_constraint; + +#define NumericString_free OCTET_STRING_free +#define NumericString_print OCTET_STRING_print_utf8 +#define NumericString_compare OCTET_STRING_compare +#define NumericString_decode_ber OCTET_STRING_decode_ber +#define NumericString_encode_der OCTET_STRING_encode_der +#define NumericString_decode_xer OCTET_STRING_decode_xer_utf8 +#define NumericString_encode_xer OCTET_STRING_encode_xer_utf8 +#define NumericString_decode_uper OCTET_STRING_decode_uper +#define NumericString_encode_uper OCTET_STRING_encode_uper +#define NumericString_decode_aper OCTET_STRING_decode_aper +#define NumericString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _NumericString_H_ */ diff --git a/Bouncer/asn1c_defs/OBJECT_IDENTIFIER.h b/Bouncer/e2sm_kpm/headers/OBJECT_IDENTIFIER.h similarity index 100% rename from Bouncer/asn1c_defs/OBJECT_IDENTIFIER.h rename to Bouncer/e2sm_kpm/headers/OBJECT_IDENTIFIER.h diff --git a/Bouncer/e2sm_kpm/headers/OCTET_STRING.h b/Bouncer/e2sm_kpm/headers/OCTET_STRING.h new file mode 100644 index 0000000..c2f8bae --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/OCTET_STRING.h @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _OCTET_STRING_H_ +#define _OCTET_STRING_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct OCTET_STRING { + uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ + size_t size; /* Size of the buffer */ + + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ +} OCTET_STRING_t; + +extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; +extern asn_TYPE_operation_t asn_OP_OCTET_STRING; + +asn_struct_free_f OCTET_STRING_free; +asn_struct_print_f OCTET_STRING_print; +asn_struct_print_f OCTET_STRING_print_utf8; +asn_struct_compare_f OCTET_STRING_compare; +ber_type_decoder_f OCTET_STRING_decode_ber; +der_type_encoder_f OCTET_STRING_encode_der; +xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ +xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ +xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ +xer_type_encoder_f OCTET_STRING_encode_xer; +xer_type_encoder_f OCTET_STRING_encode_xer_utf8; +oer_type_decoder_f OCTET_STRING_decode_oer; +oer_type_encoder_f OCTET_STRING_encode_oer; +per_type_decoder_f OCTET_STRING_decode_uper; +per_type_encoder_f OCTET_STRING_encode_uper; +per_type_decoder_f OCTET_STRING_decode_aper; +per_type_encoder_f OCTET_STRING_encode_aper; +asn_random_fill_f OCTET_STRING_random_fill; + +#define OCTET_STRING_constraint asn_generic_no_constraint +#define OCTET_STRING_decode_xer OCTET_STRING_decode_xer_hex + +/****************************** + * Handy conversion routines. * + ******************************/ + +/* + * This function clears the previous value of the OCTET STRING (if any) + * and then allocates a new memory with the specified content (str/size). + * If size = -1, the size of the original string will be determined + * using strlen(str). + * If str equals to NULL, the function will silently clear the + * current contents of the OCTET STRING. + * Returns 0 if it was possible to perform operation, -1 otherwise. + */ +int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); + +/* Handy conversion from the C string into the OCTET STRING. */ +#define OCTET_STRING_fromString(s, str) OCTET_STRING_fromBuf(s, str, -1) + +/* + * Allocate and fill the new OCTET STRING and return a pointer to the newly + * allocated object. NULL is permitted in str: the function will just allocate + * empty OCTET STRING. + */ +OCTET_STRING_t *OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, + const char *str, int size); + +/**************************** + * Internally useful stuff. * + ****************************/ + +typedef struct asn_OCTET_STRING_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the structure */ + unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ + + enum asn_OS_Subvariant { + ASN_OSUBV_ANY, /* The open type (ANY) */ + ASN_OSUBV_BIT, /* BIT STRING */ + ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */ + ASN_OSUBV_U16, /* 16-bit character (BMPString) */ + ASN_OSUBV_U32 /* 32-bit character (UniversalString) */ + } subvariant; +} asn_OCTET_STRING_specifics_t; + +extern asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs; + +size_t OCTET_STRING_random_length_constrained( + const asn_TYPE_descriptor_t *, const asn_encoding_constraints_t *, + size_t max_length); + +#ifdef __cplusplus +} +#endif + +#endif /* _OCTET_STRING_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/OCUCP-PF-Container.h b/Bouncer/e2sm_kpm/headers/OCUCP-PF-Container.h new file mode 100644 index 0000000..d292be8 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/OCUCP-PF-Container.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _OCUCP_PF_Container_H_ +#define _OCUCP_PF_Container_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-CU-CP-Name.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* OCUCP-PF-Container */ +typedef struct OCUCP_PF_Container { + GNB_CU_CP_Name_t *gNB_CU_CP_Name; /* OPTIONAL */ + struct OCUCP_PF_Container__cu_CP_Resource_Status { + long *numberOfActive_UEs; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cu_CP_Resource_Status; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} OCUCP_PF_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_OCUCP_PF_Container; +extern asn_SEQUENCE_specifics_t asn_SPC_OCUCP_PF_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_OCUCP_PF_Container_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _OCUCP_PF_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/OCUUP-PF-Container.h b/Bouncer/e2sm_kpm/headers/OCUUP-PF-Container.h new file mode 100644 index 0000000..8c4ee06 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/OCUUP-PF-Container.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _OCUUP_PF_Container_H_ +#define _OCUUP_PF_Container_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-CU-UP-Name.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PF_ContainerListItem; + +/* OCUUP-PF-Container */ +typedef struct OCUUP_PF_Container { + GNB_CU_UP_Name_t *gNB_CU_UP_Name; /* OPTIONAL */ + struct OCUUP_PF_Container__pf_ContainerList { + A_SEQUENCE_OF(struct PF_ContainerListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } pf_ContainerList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} OCUUP_PF_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_OCUUP_PF_Container; +extern asn_SEQUENCE_specifics_t asn_SPC_OCUUP_PF_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_OCUUP_PF_Container_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _OCUUP_PF_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/ODU-PF-Container.h b/Bouncer/e2sm_kpm/headers/ODU-PF-Container.h new file mode 100644 index 0000000..f6c1529 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ODU-PF-Container.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ODU_PF_Container_H_ +#define _ODU_PF_Container_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CellResourceReportListItem; + +/* ODU-PF-Container */ +typedef struct ODU_PF_Container { + struct ODU_PF_Container__cellResourceReportList { + A_SEQUENCE_OF(struct CellResourceReportListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellResourceReportList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ODU_PF_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ODU_PF_Container; +extern asn_SEQUENCE_specifics_t asn_SPC_ODU_PF_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_ODU_PF_Container_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _ODU_PF_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/OPEN_TYPE.h b/Bouncer/e2sm_kpm/headers/OPEN_TYPE.h new file mode 100644 index 0000000..b0d023c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/OPEN_TYPE.h @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2017-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_OPEN_TYPE_H +#define ASN_OPEN_TYPE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define OPEN_TYPE_free CHOICE_free +#define OPEN_TYPE_print CHOICE_print +#define OPEN_TYPE_compare CHOICE_compare +#define OPEN_TYPE_constraint CHOICE_constraint +#define OPEN_TYPE_decode_ber NULL +#define OPEN_TYPE_encode_der CHOICE_encode_der +#define OPEN_TYPE_decode_xer NULL +#define OPEN_TYPE_encode_xer CHOICE_encode_xer +#define OPEN_TYPE_decode_oer NULL +#define OPEN_TYPE_encode_oer CHOICE_encode_oer +#define OPEN_TYPE_decode_uper NULL +#define OPEN_TYPE_decode_aper NULL + +extern asn_TYPE_operation_t asn_OP_OPEN_TYPE; + +/* + * Decode an Open Type which is potentially constraiend + * by the other members of the parent structure. + */ +asn_dec_rval_t OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + const void *ptr, size_t size); + +asn_dec_rval_t OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + const void *ptr, size_t size); + +asn_dec_rval_t OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + asn_TYPE_member_t *element, const void *ptr, + size_t size); + +asn_dec_rval_t OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + asn_per_data_t *pd); + +asn_dec_rval_t OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + asn_per_data_t *pd); + +asn_enc_rval_t OPEN_TYPE_encode_uper( + const asn_TYPE_descriptor_t *type_descriptor, + const asn_per_constraints_t *constraints, const void *struct_ptr, + asn_per_outp_t *per_output); + +asn_enc_rval_t OPEN_TYPE_encode_aper( + const asn_TYPE_descriptor_t *type_descriptor, + const asn_per_constraints_t *constraints, const void *struct_ptr, + asn_per_outp_t *per_output); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_OPEN_TYPE_H */ diff --git a/Bouncer/e2sm_kpm/headers/ObjectDescriptor.h b/Bouncer/e2sm_kpm/headers/ObjectDescriptor.h new file mode 100644 index 0000000..fa1c1fc --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ObjectDescriptor.h @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _ObjectDescriptor_H_ +#define _ObjectDescriptor_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef GraphicString_t ObjectDescriptor_t; /* Implemented via GraphicString */ + +extern asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor; +extern asn_TYPE_operation_t asn_OP_ObjectDescriptor; + +#define ObjectDescriptor_free OCTET_STRING_free +#define ObjectDescriptor_print OCTET_STRING_print_utf8 +#define ObjectDescriptor_constraint asn_generic_unknown_constraint +#define ObjectDescriptor_decode_ber OCTET_STRING_decode_ber +#define ObjectDescriptor_encode_der OCTET_STRING_encode_der +#define ObjectDescriptor_decode_xer OCTET_STRING_decode_xer_utf8 +#define ObjectDescriptor_encode_xer OCTET_STRING_encode_xer_utf8 +#define ObjectDescriptor_decode_uper OCTET_STRING_decode_uper +#define ObjectDescriptor_encode_uper OCTET_STRING_encode_uper +#define ObjectDescriptor_decode_aper OCTET_STRING_decode_aper +#define ObjectDescriptor_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _ObjectDescriptor_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/PF-Container.h b/Bouncer/e2sm_kpm/headers/PF-Container.h new file mode 100644 index 0000000..aa59c71 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PF-Container.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PF_Container_H_ +#define _PF_Container_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum PF_Container_PR { + PF_Container_PR_NOTHING, /* No components present */ + PF_Container_PR_oDU, + PF_Container_PR_oCU_CP, + PF_Container_PR_oCU_UP + /* Extensions may appear below */ + +} PF_Container_PR; + +/* Forward declarations */ +struct ODU_PF_Container; +struct OCUCP_PF_Container; +struct OCUUP_PF_Container; + +/* PF-Container */ +typedef struct PF_Container { + PF_Container_PR present; + union PF_Container_u { + struct ODU_PF_Container *oDU; + struct OCUCP_PF_Container *oCU_CP; + struct OCUUP_PF_Container *oCU_UP; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PF_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PF_Container; +extern asn_CHOICE_specifics_t asn_SPC_PF_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_PF_Container_1[3]; +extern asn_per_constraints_t asn_PER_type_PF_Container_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _PF_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/PF-ContainerListItem.h b/Bouncer/e2sm_kpm/headers/PF-ContainerListItem.h new file mode 100644 index 0000000..b22eac2 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PF-ContainerListItem.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PF_ContainerListItem_H_ +#define _PF_ContainerListItem_H_ + + +#include + +/* Including external dependencies */ +#include "NI-Type.h" +#include "CUUPMeasurement-Container.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PF-ContainerListItem */ +typedef struct PF_ContainerListItem { + NI_Type_t interface_type; + CUUPMeasurement_Container_t o_CU_UP_PM_Container; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PF_ContainerListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PF_ContainerListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_PF_ContainerListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_PF_ContainerListItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _PF_ContainerListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/PLMN-Identity.h b/Bouncer/e2sm_kpm/headers/PLMN-Identity.h new file mode 100644 index 0000000..cca2d19 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PLMN-Identity.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PLMN_Identity_H_ +#define _PLMN_Identity_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PLMN-Identity */ +typedef OCTET_STRING_t PLMN_Identity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_PLMN_Identity; +asn_struct_free_f PLMN_Identity_free; +asn_struct_print_f PLMN_Identity_print; +asn_constr_check_f PLMN_Identity_constraint; +ber_type_decoder_f PLMN_Identity_decode_ber; +der_type_encoder_f PLMN_Identity_encode_der; +xer_type_decoder_f PLMN_Identity_decode_xer; +xer_type_encoder_f PLMN_Identity_encode_xer; +oer_type_decoder_f PLMN_Identity_decode_oer; +oer_type_encoder_f PLMN_Identity_encode_oer; +per_type_decoder_f PLMN_Identity_decode_uper; +per_type_encoder_f PLMN_Identity_encode_uper; +per_type_decoder_f PLMN_Identity_decode_aper; +per_type_encoder_f PLMN_Identity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _PLMN_Identity_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/PLMNIdentity.h b/Bouncer/e2sm_kpm/headers/PLMNIdentity.h new file mode 100644 index 0000000..b1950c6 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PLMNIdentity.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _PLMNIdentity_H_ +#define _PLMNIdentity_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* PLMNIdentity */ +typedef OCTET_STRING_t PLMNIdentity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_PLMNIdentity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_PLMNIdentity; +asn_struct_free_f PLMNIdentity_free; +asn_struct_print_f PLMNIdentity_print; +asn_constr_check_f PLMNIdentity_constraint; +ber_type_decoder_f PLMNIdentity_decode_ber; +der_type_encoder_f PLMNIdentity_encode_der; +xer_type_decoder_f PLMNIdentity_decode_xer; +xer_type_encoder_f PLMNIdentity_encode_xer; +per_type_decoder_f PLMNIdentity_decode_uper; +per_type_encoder_f PLMNIdentity_encode_uper; +per_type_decoder_f PLMNIdentity_decode_aper; +per_type_encoder_f PLMNIdentity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _PLMNIdentity_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/PM-Containers-List.h b/Bouncer/e2sm_kpm/headers/PM-Containers-List.h new file mode 100644 index 0000000..9b392a5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PM-Containers-List.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PM_Containers_List_H_ +#define _PM_Containers_List_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PF_Container; +struct RAN_Container; + +/* PM-Containers-List */ +typedef struct PM_Containers_List { + struct PF_Container *performanceContainer; /* OPTIONAL */ + struct RAN_Container *theRANContainer; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PM_Containers_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PM_Containers_List; +extern asn_SEQUENCE_specifics_t asn_SPC_PM_Containers_List_specs_1; +extern asn_TYPE_member_t asn_MBR_PM_Containers_List_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _PM_Containers_List_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/PerQCIReportListItem.h b/Bouncer/e2sm_kpm/headers/PerQCIReportListItem.h new file mode 100644 index 0000000..3d135ca --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PerQCIReportListItem.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PerQCIReportListItem_H_ +#define _PerQCIReportListItem_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PerQCIReportListItem */ +typedef struct PerQCIReportListItem { + long qci; + long *dl_PRBUsage; /* OPTIONAL */ + long *ul_PRBUsage; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PerQCIReportListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PerQCIReportListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_PerQCIReportListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_PerQCIReportListItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _PerQCIReportListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/PerQCIReportListItemFormat.h b/Bouncer/e2sm_kpm/headers/PerQCIReportListItemFormat.h new file mode 100644 index 0000000..b5c3481 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PerQCIReportListItemFormat.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PerQCIReportListItemFormat_H_ +#define _PerQCIReportListItemFormat_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PerQCIReportListItemFormat */ +typedef struct PerQCIReportListItemFormat { + long qci; + INTEGER_t *pDCPBytesDL; /* OPTIONAL */ + INTEGER_t *pDCPBytesUL; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PerQCIReportListItemFormat_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PerQCIReportListItemFormat; +extern asn_SEQUENCE_specifics_t asn_SPC_PerQCIReportListItemFormat_specs_1; +extern asn_TYPE_member_t asn_MBR_PerQCIReportListItemFormat_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _PerQCIReportListItemFormat_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/PlmnID-List.h b/Bouncer/e2sm_kpm/headers/PlmnID-List.h new file mode 100644 index 0000000..cba26f7 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/PlmnID-List.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PlmnID_List_H_ +#define _PlmnID_List_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct FGC_CUUP_PM_Format; +struct EPC_CUUP_PM_Format; + +/* PlmnID-List */ +typedef struct PlmnID_List { + PLMN_Identity_t pLMN_Identity; + struct FGC_CUUP_PM_Format *cu_UP_PM_5GC; /* OPTIONAL */ + struct EPC_CUUP_PM_Format *cu_UP_PM_EPC; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PlmnID_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PlmnID_List; +extern asn_SEQUENCE_specifics_t asn_SPC_PlmnID_List_specs_1; +extern asn_TYPE_member_t asn_MBR_PlmnID_List_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _PlmnID_List_H_ */ +#include diff --git a/Bouncer/asn1c_defs/PrintableString.h b/Bouncer/e2sm_kpm/headers/PrintableString.h similarity index 100% rename from Bouncer/asn1c_defs/PrintableString.h rename to Bouncer/e2sm_kpm/headers/PrintableString.h diff --git a/Bouncer/e2sm_kpm/headers/QCI.h b/Bouncer/e2sm_kpm/headers/QCI.h new file mode 100644 index 0000000..4738a97 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/QCI.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _QCI_H_ +#define _QCI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* QCI */ +typedef long QCI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_QCI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_QCI; +asn_struct_free_f QCI_free; +asn_struct_print_f QCI_print; +asn_constr_check_f QCI_constraint; +ber_type_decoder_f QCI_decode_ber; +der_type_encoder_f QCI_encode_der; +xer_type_decoder_f QCI_decode_xer; +xer_type_encoder_f QCI_encode_xer; +per_type_decoder_f QCI_decode_uper; +per_type_encoder_f QCI_encode_uper; +per_type_decoder_f QCI_decode_aper; +per_type_encoder_f QCI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _QCI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/QoSID.h b/Bouncer/e2sm_kpm/headers/QoSID.h new file mode 100644 index 0000000..4ec28a4 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/QoSID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _QoSID_H_ +#define _QoSID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "FiveQI.h" +#include "QCI.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum QoSID_PR { + QoSID_PR_NOTHING, /* No components present */ + QoSID_PR_fiveGC, + QoSID_PR_ePC + /* Extensions may appear below */ + +} QoSID_PR; + +/* QoSID */ +typedef struct QoSID { + QoSID_PR present; + union QoSID_u { + FiveQI_t fiveGC; + QCI_t ePC; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} QoSID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_QoSID; + +#ifdef __cplusplus +} +#endif + +#endif /* _QoSID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/QosFlowIdentifier.h b/Bouncer/e2sm_kpm/headers/QosFlowIdentifier.h new file mode 100644 index 0000000..8e8c709 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/QosFlowIdentifier.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _QosFlowIdentifier_H_ +#define _QosFlowIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* QosFlowIdentifier */ +typedef long QosFlowIdentifier_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_QosFlowIdentifier_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_QosFlowIdentifier; +asn_struct_free_f QosFlowIdentifier_free; +asn_struct_print_f QosFlowIdentifier_print; +asn_constr_check_f QosFlowIdentifier_constraint; +ber_type_decoder_f QosFlowIdentifier_decode_ber; +der_type_encoder_f QosFlowIdentifier_encode_der; +xer_type_decoder_f QosFlowIdentifier_decode_xer; +xer_type_encoder_f QosFlowIdentifier_encode_xer; +per_type_decoder_f QosFlowIdentifier_decode_uper; +per_type_encoder_f QosFlowIdentifier_encode_uper; +per_type_decoder_f QosFlowIdentifier_decode_aper; +per_type_encoder_f QosFlowIdentifier_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _QosFlowIdentifier_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RAN-Container.h b/Bouncer/e2sm_kpm/headers/RAN-Container.h new file mode 100644 index 0000000..259c2d5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RAN-Container.h @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RAN_Container_H_ +#define _RAN_Container_H_ + + +#include + +/* Including external dependencies */ +#include "Timestamp.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RAN_Container__reportContainer_PR { + RAN_Container__reportContainer_PR_NOTHING, /* No components present */ + RAN_Container__reportContainer_PR_oDU_UE, + RAN_Container__reportContainer_PR_oCU_CP_UE, + RAN_Container__reportContainer_PR_oCU_UP_UE + /* Extensions may appear below */ + +} RAN_Container__reportContainer_PR; + +/* Forward declarations */ +struct DU_Usage_Report_Per_UE; +struct CU_CP_Usage_Report_Per_UE; +struct CU_UP_Usage_Report_Per_UE; + +/* RAN-Container */ +typedef struct RAN_Container { + Timestamp_t timestamp; + struct RAN_Container__reportContainer { + RAN_Container__reportContainer_PR present; + union RAN_Container__reportContainer_u { + struct DU_Usage_Report_Per_UE *oDU_UE; + struct CU_CP_Usage_Report_Per_UE *oCU_CP_UE; + struct CU_UP_Usage_Report_Per_UE *oCU_UP_UE; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } reportContainer; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RAN_Container_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RAN_Container; +extern asn_SEQUENCE_specifics_t asn_SPC_RAN_Container_specs_1; +extern asn_TYPE_member_t asn_MBR_RAN_Container_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RAN_Container_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/RANUEID.h b/Bouncer/e2sm_kpm/headers/RANUEID.h new file mode 100644 index 0000000..1ef8b24 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RANUEID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RANUEID_H_ +#define _RANUEID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANUEID */ +typedef OCTET_STRING_t RANUEID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RANUEID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RANUEID; +asn_struct_free_f RANUEID_free; +asn_struct_print_f RANUEID_print; +asn_constr_check_f RANUEID_constraint; +ber_type_decoder_f RANUEID_decode_ber; +der_type_encoder_f RANUEID_encode_der; +xer_type_decoder_f RANUEID_decode_xer; +xer_type_encoder_f RANUEID_encode_xer; +per_type_decoder_f RANUEID_decode_uper; +per_type_encoder_f RANUEID_encode_uper; +per_type_decoder_f RANUEID_decode_aper; +per_type_encoder_f RANUEID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANUEID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RANcallProcess-ID-string.h b/Bouncer/e2sm_kpm/headers/RANcallProcess-ID-string.h new file mode 100644 index 0000000..1a8aad0 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RANcallProcess-ID-string.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANcallProcess_ID_string_H_ +#define _RANcallProcess_ID_string_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANcallProcess-ID-string */ +typedef PrintableString_t RANcallProcess_ID_string_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANcallProcess_ID_string; +asn_struct_free_f RANcallProcess_ID_string_free; +asn_struct_print_f RANcallProcess_ID_string_print; +asn_constr_check_f RANcallProcess_ID_string_constraint; +ber_type_decoder_f RANcallProcess_ID_string_decode_ber; +der_type_encoder_f RANcallProcess_ID_string_encode_der; +xer_type_decoder_f RANcallProcess_ID_string_decode_xer; +xer_type_encoder_f RANcallProcess_ID_string_encode_xer; +oer_type_decoder_f RANcallProcess_ID_string_decode_oer; +oer_type_encoder_f RANcallProcess_ID_string_encode_oer; +per_type_decoder_f RANcallProcess_ID_string_decode_uper; +per_type_encoder_f RANcallProcess_ID_string_encode_uper; +per_type_decoder_f RANcallProcess_ID_string_decode_aper; +per_type_encoder_f RANcallProcess_ID_string_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANcallProcess_ID_string_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/RANfunction-Name.h b/Bouncer/e2sm_kpm/headers/RANfunction-Name.h new file mode 100644 index 0000000..970d4fb --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RANfunction-Name.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RANfunction_Name_H_ +#define _RANfunction_Name_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PrintableString.h" +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunction-Name */ +typedef struct RANfunction_Name { + PrintableString_t ranFunction_ShortName; + PrintableString_t ranFunction_E2SM_OID; + PrintableString_t ranFunction_Description; + long *ranFunction_Instance; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunction_Name_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunction_Name; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Name_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunction_Name_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunction_Name_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/REAL.h b/Bouncer/e2sm_kpm/headers/REAL.h new file mode 100644 index 0000000..fce6714 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/REAL.h @@ -0,0 +1,67 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_TYPE_REAL_H +#define ASN_TYPE_REAL_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ASN__PRIMITIVE_TYPE_t REAL_t; + +extern asn_TYPE_descriptor_t asn_DEF_REAL; +extern asn_TYPE_operation_t asn_OP_REAL; + +asn_struct_print_f REAL_print; +asn_struct_compare_f REAL_compare; +oer_type_decoder_f REAL_decode_oer; +oer_type_encoder_f REAL_encode_oer; +per_type_decoder_f REAL_decode_uper; +per_type_encoder_f REAL_encode_uper; +per_type_decoder_f REAL_decode_aper; +per_type_encoder_f REAL_encode_aper; +xer_type_decoder_f REAL_decode_xer; +xer_type_encoder_f REAL_encode_xer; +asn_random_fill_f REAL_random_fill; + +#define REAL_free ASN__PRIMITIVE_TYPE_free, +#define REAL_constraint asn_generic_no_constraint +#define REAL_decode_ber ber_decode_primitive +#define REAL_encode_der der_encode_primitive + +/*********************************** + * Some handy conversion routines. * + ***********************************/ + +ssize_t REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key); + +/* + * Convert between native double type and REAL representation (DER). + * RETURN VALUES: + * 0: Value converted successfully + * -1: An error occured while converting the value: invalid format. + */ +int asn_REAL2double(const REAL_t *real_ptr, double *d); +int asn_double2REAL(REAL_t *real_ptr, double d); + +/* + * Downcast double to float while checking that no overflow occurs. + * This allows stricter control of the input data. + * RETURN VALUES: + * 0: The conversion was successful (perhaps with a loss of precision) + * -1: The conversion created overflow into infinities. + * The (outcome) is ALWAYS set to a value you'd expect from the + * standard silent float to double conversion behavior. + */ +int asn_double2float(double d, float *outcome); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_TYPE_REAL_H */ diff --git a/Bouncer/e2sm_kpm/headers/RELATIVE-OID.h b/Bouncer/e2sm_kpm/headers/RELATIVE-OID.h new file mode 100644 index 0000000..a51bf51 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RELATIVE-OID.h @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _RELATIVE_OID_H_ +#define _RELATIVE_OID_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Implemented via OBJECT IDENTIFIER */ +typedef OBJECT_IDENTIFIER_t RELATIVE_OID_t; + +extern asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID; +extern asn_TYPE_operation_t asn_OP_RELATIVE_OID; + +asn_struct_print_f RELATIVE_OID_print; +xer_type_decoder_f RELATIVE_OID_decode_xer; +xer_type_encoder_f RELATIVE_OID_encode_xer; +asn_random_fill_f RELATIVE_OID_random_fill; + +#define RELATIVE_OID_free ASN__PRIMITIVE_TYPE_free +#define RELATIVE_OID_compare OCTET_STRING_compare +#define RELATIVE_OID_constraint asn_generic_no_constraint +#define RELATIVE_OID_decode_ber ber_decode_primitive +#define RELATIVE_OID_encode_der der_encode_primitive +#define RELATIVE_OID_decode_oer oer_decode_primitive +#define RELATIVE_OID_encode_oer oer_encode_primitive +#define RELATIVE_OID_decode_uper OCTET_STRING_decode_uper +#define RELATIVE_OID_encode_uper OCTET_STRING_encode_uper +#define RELATIVE_OID_decode_aper OCTET_STRING_decode_aper +#define RELATIVE_OID_encode_aper OCTET_STRING_encode_aper + +/********************************** + * Some handy conversion routines * + **********************************/ + +/* See OBJECT_IDENTIFIER_get_arcs() function in OBJECT_IDENTIFIER.h */ +ssize_t RELATIVE_OID_get_arcs(const RELATIVE_OID_t *, asn_oid_arc_t *arcs, + size_t arcs_count); + +/* See OBJECT_IDENTIFIER_set_arcs() function in OBJECT_IDENTIFIER.h */ +int RELATIVE_OID_set_arcs(RELATIVE_OID_t *, const asn_oid_arc_t *arcs, + size_t arcs_count); + +#ifdef __cplusplus +} +#endif + +#endif /* _RELATIVE_OID_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-Item.h b/Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-Item.h new file mode 100644 index 0000000..25b20cd --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RIC_EventTriggerStyle_Item_H_ +#define _RIC_EventTriggerStyle_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-EventTriggerStyle-Item */ +typedef struct RIC_EventTriggerStyle_Item { + RIC_Style_Type_t ric_EventTriggerStyle_Type; + RIC_Style_Name_t ric_EventTriggerStyle_Name; + RIC_Format_Type_t ric_EventTriggerFormat_Type; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RIC_EventTriggerStyle_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_EventTriggerStyle_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RIC_EventTriggerStyle_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RIC_EventTriggerStyle_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_EventTriggerStyle_Item_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-List.h b/Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-List.h new file mode 100644 index 0000000..543edfb --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RIC-EventTriggerStyle-List.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_EventTriggerStyle_List_H_ +#define _RIC_EventTriggerStyle_List_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-EventTriggerStyle-List */ +typedef struct RIC_EventTriggerStyle_List { + RIC_Style_Type_t ric_EventTriggerStyle_Type; + RIC_Style_Name_t ric_EventTriggerStyle_Name; + RIC_Format_Type_t ric_EventTriggerFormat_Type; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RIC_EventTriggerStyle_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_EventTriggerStyle_List; +extern asn_SEQUENCE_specifics_t asn_SPC_RIC_EventTriggerStyle_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RIC_EventTriggerStyle_List_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_EventTriggerStyle_List_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/RIC-Format-Type.h b/Bouncer/e2sm_kpm/headers/RIC-Format-Type.h new file mode 100644 index 0000000..d145ebf --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RIC-Format-Type.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RIC_Format_Type_H_ +#define _RIC_Format_Type_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-Format-Type */ +typedef long RIC_Format_Type_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_Format_Type; +asn_struct_free_f RIC_Format_Type_free; +asn_struct_print_f RIC_Format_Type_print; +asn_constr_check_f RIC_Format_Type_constraint; +ber_type_decoder_f RIC_Format_Type_decode_ber; +der_type_encoder_f RIC_Format_Type_encode_der; +xer_type_decoder_f RIC_Format_Type_decode_xer; +xer_type_encoder_f RIC_Format_Type_encode_xer; +per_type_decoder_f RIC_Format_Type_decode_uper; +per_type_encoder_f RIC_Format_Type_encode_uper; +per_type_decoder_f RIC_Format_Type_decode_aper; +per_type_encoder_f RIC_Format_Type_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_Format_Type_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RIC-ReportStyle-Item.h b/Bouncer/e2sm_kpm/headers/RIC-ReportStyle-Item.h new file mode 100644 index 0000000..80194fb --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RIC-ReportStyle-Item.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RIC_ReportStyle_Item_H_ +#define _RIC_ReportStyle_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include "MeasurementInfo-Action-List.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-ReportStyle-Item */ +typedef struct RIC_ReportStyle_Item { + RIC_Style_Type_t ric_ReportStyle_Type; + RIC_Style_Name_t ric_ReportStyle_Name; + RIC_Format_Type_t ric_ActionFormat_Type; + MeasurementInfo_Action_List_t measInfo_Action_List; + RIC_Format_Type_t ric_IndicationHeaderFormat_Type; + RIC_Format_Type_t ric_IndicationMessageFormat_Type; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RIC_ReportStyle_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_ReportStyle_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RIC_ReportStyle_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_ReportStyle_Item_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RIC-ReportStyle-List.h b/Bouncer/e2sm_kpm/headers/RIC-ReportStyle-List.h new file mode 100644 index 0000000..accc531 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RIC-ReportStyle-List.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_ReportStyle_List_H_ +#define _RIC_ReportStyle_List_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-ReportStyle-List */ +typedef struct RIC_ReportStyle_List { + RIC_Style_Type_t ric_ReportStyle_Type; + RIC_Style_Name_t ric_ReportStyle_Name; + RIC_Format_Type_t ric_IndicationHeaderFormat_Type; + RIC_Format_Type_t ric_IndicationMessageFormat_Type; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RIC_ReportStyle_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_ReportStyle_List; +extern asn_SEQUENCE_specifics_t asn_SPC_RIC_ReportStyle_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RIC_ReportStyle_List_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_ReportStyle_List_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/RIC-Style-Name.h b/Bouncer/e2sm_kpm/headers/RIC-Style-Name.h new file mode 100644 index 0000000..351a9db --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RIC-Style-Name.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RIC_Style_Name_H_ +#define _RIC_Style_Name_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PrintableString.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-Style-Name */ +typedef PrintableString_t RIC_Style_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_Style_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_Style_Name; +asn_struct_free_f RIC_Style_Name_free; +asn_struct_print_f RIC_Style_Name_print; +asn_constr_check_f RIC_Style_Name_constraint; +ber_type_decoder_f RIC_Style_Name_decode_ber; +der_type_encoder_f RIC_Style_Name_encode_der; +xer_type_decoder_f RIC_Style_Name_decode_xer; +xer_type_encoder_f RIC_Style_Name_encode_xer; +per_type_decoder_f RIC_Style_Name_decode_uper; +per_type_encoder_f RIC_Style_Name_encode_uper; +per_type_decoder_f RIC_Style_Name_decode_aper; +per_type_encoder_f RIC_Style_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_Style_Name_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RIC-Style-Type.h b/Bouncer/e2sm_kpm/headers/RIC-Style-Type.h new file mode 100644 index 0000000..66835d5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RIC-Style-Type.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RIC_Style_Type_H_ +#define _RIC_Style_Type_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-Style-Type */ +typedef long RIC_Style_Type_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_Style_Type; +asn_struct_free_f RIC_Style_Type_free; +asn_struct_print_f RIC_Style_Type_print; +asn_constr_check_f RIC_Style_Type_constraint; +ber_type_decoder_f RIC_Style_Type_decode_ber; +der_type_encoder_f RIC_Style_Type_encode_der; +xer_type_decoder_f RIC_Style_Type_decode_xer; +xer_type_encoder_f RIC_Style_Type_encode_xer; +per_type_decoder_f RIC_Style_Type_decode_uper; +per_type_encoder_f RIC_Style_Type_encode_uper; +per_type_decoder_f RIC_Style_Type_decode_aper; +per_type_encoder_f RIC_Style_Type_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_Style_Type_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RRC-MessageID.h b/Bouncer/e2sm_kpm/headers/RRC-MessageID.h new file mode 100644 index 0000000..ca236a1 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RRC-MessageID.h @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RRC_MessageID_H_ +#define _RRC_MessageID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "RRCclass-LTE.h" +#include "RRCclass-NR.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RRC_MessageID__rrcType_PR { + RRC_MessageID__rrcType_PR_NOTHING, /* No components present */ + RRC_MessageID__rrcType_PR_lTE, + RRC_MessageID__rrcType_PR_nR + /* Extensions may appear below */ + +} RRC_MessageID__rrcType_PR; + +/* RRC-MessageID */ +typedef struct RRC_MessageID { + struct RRC_MessageID__rrcType { + RRC_MessageID__rrcType_PR present; + union RRC_MessageID__rrcType_u { + RRCclass_LTE_t lTE; + RRCclass_NR_t nR; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } rrcType; + long messageID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RRC_MessageID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RRC_MessageID; + +#ifdef __cplusplus +} +#endif + +#endif /* _RRC_MessageID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RRCclass-LTE.h b/Bouncer/e2sm_kpm/headers/RRCclass-LTE.h new file mode 100644 index 0000000..bad6ee7 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RRCclass-LTE.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RRCclass_LTE_H_ +#define _RRCclass_LTE_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RRCclass_LTE { + RRCclass_LTE_bCCH_BCH = 0, + RRCclass_LTE_bCCH_BCH_MBMS = 1, + RRCclass_LTE_bCCH_DL_SCH = 2, + RRCclass_LTE_bCCH_DL_SCH_BR = 3, + RRCclass_LTE_bCCH_DL_SCH_MBMS = 4, + RRCclass_LTE_mCCH = 5, + RRCclass_LTE_pCCH = 6, + RRCclass_LTE_dL_CCCH = 7, + RRCclass_LTE_dL_DCCH = 8, + RRCclass_LTE_uL_CCCH = 9, + RRCclass_LTE_uL_DCCH = 10, + RRCclass_LTE_sC_MCCH = 11 + /* + * Enumeration is extensible + */ +} e_RRCclass_LTE; + +/* RRCclass-LTE */ +typedef long RRCclass_LTE_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RRCclass_LTE_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RRCclass_LTE; +extern const asn_INTEGER_specifics_t asn_SPC_RRCclass_LTE_specs_1; +asn_struct_free_f RRCclass_LTE_free; +asn_struct_print_f RRCclass_LTE_print; +asn_constr_check_f RRCclass_LTE_constraint; +ber_type_decoder_f RRCclass_LTE_decode_ber; +der_type_encoder_f RRCclass_LTE_encode_der; +xer_type_decoder_f RRCclass_LTE_decode_xer; +xer_type_encoder_f RRCclass_LTE_encode_xer; +per_type_decoder_f RRCclass_LTE_decode_uper; +per_type_encoder_f RRCclass_LTE_encode_uper; +per_type_decoder_f RRCclass_LTE_decode_aper; +per_type_encoder_f RRCclass_LTE_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RRCclass_LTE_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RRCclass-NR.h b/Bouncer/e2sm_kpm/headers/RRCclass-NR.h new file mode 100644 index 0000000..5af8e62 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RRCclass-NR.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _RRCclass_NR_H_ +#define _RRCclass_NR_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RRCclass_NR { + RRCclass_NR_bCCH_BCH = 0, + RRCclass_NR_bCCH_DL_SCH = 1, + RRCclass_NR_dL_CCCH = 2, + RRCclass_NR_dL_DCCH = 3, + RRCclass_NR_pCCH = 4, + RRCclass_NR_uL_CCCH = 5, + RRCclass_NR_uL_CCCH1 = 6, + RRCclass_NR_uL_DCCH = 7 + /* + * Enumeration is extensible + */ +} e_RRCclass_NR; + +/* RRCclass-NR */ +typedef long RRCclass_NR_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RRCclass_NR_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RRCclass_NR; +extern const asn_INTEGER_specifics_t asn_SPC_RRCclass_NR_specs_1; +asn_struct_free_f RRCclass_NR_free; +asn_struct_print_f RRCclass_NR_print; +asn_constr_check_f RRCclass_NR_constraint; +ber_type_decoder_f RRCclass_NR_decode_ber; +der_type_encoder_f RRCclass_NR_encode_der; +xer_type_decoder_f RRCclass_NR_decode_xer; +xer_type_encoder_f RRCclass_NR_encode_xer; +per_type_decoder_f RRCclass_NR_decode_uper; +per_type_encoder_f RRCclass_NR_encode_uper; +per_type_decoder_f RRCclass_NR_decode_aper; +per_type_encoder_f RRCclass_NR_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RRCclass_NR_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/RT-Period-IE.h b/Bouncer/e2sm_kpm/headers/RT-Period-IE.h new file mode 100644 index 0000000..a52a304 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/RT-Period-IE.h @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RT_Period_IE_H_ +#define _RT_Period_IE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RT_Period_IE { + RT_Period_IE_ms10 = 0, + RT_Period_IE_ms20 = 1, + RT_Period_IE_ms32 = 2, + RT_Period_IE_ms40 = 3, + RT_Period_IE_ms60 = 4, + RT_Period_IE_ms64 = 5, + RT_Period_IE_ms70 = 6, + RT_Period_IE_ms80 = 7, + RT_Period_IE_ms128 = 8, + RT_Period_IE_ms160 = 9, + RT_Period_IE_ms256 = 10, + RT_Period_IE_ms320 = 11, + RT_Period_IE_ms512 = 12, + RT_Period_IE_ms640 = 13, + RT_Period_IE_ms1024 = 14, + RT_Period_IE_ms1280 = 15, + RT_Period_IE_ms2048 = 16, + RT_Period_IE_ms2560 = 17, + RT_Period_IE_ms5120 = 18, + RT_Period_IE_ms10240 = 19 + /* + * Enumeration is extensible + */ +} e_RT_Period_IE; + +/* RT-Period-IE */ +typedef long RT_Period_IE_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RT_Period_IE_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RT_Period_IE; +extern const asn_INTEGER_specifics_t asn_SPC_RT_Period_IE_specs_1; +asn_struct_free_f RT_Period_IE_free; +asn_struct_print_f RT_Period_IE_print; +asn_constr_check_f RT_Period_IE_constraint; +ber_type_decoder_f RT_Period_IE_decode_ber; +der_type_encoder_f RT_Period_IE_encode_der; +xer_type_decoder_f RT_Period_IE_decode_xer; +xer_type_encoder_f RT_Period_IE_encode_xer; +oer_type_decoder_f RT_Period_IE_decode_oer; +oer_type_encoder_f RT_Period_IE_encode_oer; +per_type_decoder_f RT_Period_IE_decode_uper; +per_type_encoder_f RT_Period_IE_encode_uper; +per_type_decoder_f RT_Period_IE_decode_aper; +per_type_encoder_f RT_Period_IE_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RT_Period_IE_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/S-NSSAI.h b/Bouncer/e2sm_kpm/headers/S-NSSAI.h new file mode 100644 index 0000000..70caa55 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/S-NSSAI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _S_NSSAI_H_ +#define _S_NSSAI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SST.h" +#include "SD.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* S-NSSAI */ +typedef struct S_NSSAI { + SST_t sST; + SD_t *sD; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} S_NSSAI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_S_NSSAI; +extern asn_SEQUENCE_specifics_t asn_SPC_S_NSSAI_specs_1; +extern asn_TYPE_member_t asn_MBR_S_NSSAI_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _S_NSSAI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/SD.h b/Bouncer/e2sm_kpm/headers/SD.h new file mode 100644 index 0000000..93603db --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SD.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _SD_H_ +#define _SD_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* SD */ +typedef OCTET_STRING_t SD_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_SD_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_SD; +asn_struct_free_f SD_free; +asn_struct_print_f SD_print; +asn_constr_check_f SD_constraint; +ber_type_decoder_f SD_decode_ber; +der_type_encoder_f SD_encode_der; +xer_type_decoder_f SD_decode_xer; +xer_type_encoder_f SD_encode_xer; +per_type_decoder_f SD_decode_uper; +per_type_encoder_f SD_encode_uper; +per_type_decoder_f SD_decode_aper; +per_type_encoder_f SD_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _SD_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/SNSSAI.h b/Bouncer/e2sm_kpm/headers/SNSSAI.h new file mode 100644 index 0000000..7a99e03 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SNSSAI.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SNSSAI_H_ +#define _SNSSAI_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* SNSSAI */ +typedef struct SNSSAI { + OCTET_STRING_t sST; + OCTET_STRING_t *sD; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SNSSAI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SNSSAI; +extern asn_SEQUENCE_specifics_t asn_SPC_SNSSAI_specs_1; +extern asn_TYPE_member_t asn_MBR_SNSSAI_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _SNSSAI_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/SST.h b/Bouncer/e2sm_kpm/headers/SST.h new file mode 100644 index 0000000..28ee41d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SST.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _SST_H_ +#define _SST_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* SST */ +typedef OCTET_STRING_t SST_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_SST_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_SST; +asn_struct_free_f SST_free; +asn_struct_print_f SST_print; +asn_constr_check_f SST_constraint; +ber_type_decoder_f SST_decode_ber; +der_type_encoder_f SST_encode_der; +xer_type_decoder_f SST_decode_xer; +xer_type_encoder_f SST_encode_xer; +per_type_decoder_f SST_decode_uper; +per_type_encoder_f SST_encode_uper; +per_type_decoder_f SST_decode_aper; +per_type_encoder_f SST_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _SST_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/ServedPlmnPerCellListItem.h b/Bouncer/e2sm_kpm/headers/ServedPlmnPerCellListItem.h new file mode 100644 index 0000000..a435cc8 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ServedPlmnPerCellListItem.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ServedPlmnPerCellListItem_H_ +#define _ServedPlmnPerCellListItem_H_ + + +#include + +/* Including external dependencies */ +#include "PLMN-Identity.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct FGC_DU_PM_Container; +struct EPC_DU_PM_Container; + +/* ServedPlmnPerCellListItem */ +typedef struct ServedPlmnPerCellListItem { + PLMN_Identity_t pLMN_Identity; + struct FGC_DU_PM_Container *du_PM_5GC; /* OPTIONAL */ + struct EPC_DU_PM_Container *du_PM_EPC; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ServedPlmnPerCellListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ServedPlmnPerCellListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_ServedPlmnPerCellListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_ServedPlmnPerCellListItem_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _ServedPlmnPerCellListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/ServingCell-ARFCN.h b/Bouncer/e2sm_kpm/headers/ServingCell-ARFCN.h new file mode 100644 index 0000000..7071ddb --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ServingCell-ARFCN.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _ServingCell_ARFCN_H_ +#define _ServingCell_ARFCN_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "E-UTRA-ARFCN.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ServingCell_ARFCN_PR { + ServingCell_ARFCN_PR_NOTHING, /* No components present */ + ServingCell_ARFCN_PR_nR, + ServingCell_ARFCN_PR_eUTRA + /* Extensions may appear below */ + +} ServingCell_ARFCN_PR; + +/* Forward declarations */ +struct NR_ARFCN; + +/* ServingCell-ARFCN */ +typedef struct ServingCell_ARFCN { + ServingCell_ARFCN_PR present; + union ServingCell_ARFCN_u { + struct NR_ARFCN *nR; + E_UTRA_ARFCN_t eUTRA; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ServingCell_ARFCN_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ServingCell_ARFCN; + +#ifdef __cplusplus +} +#endif + +#endif /* _ServingCell_ARFCN_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/ServingCell-PCI.h b/Bouncer/e2sm_kpm/headers/ServingCell-PCI.h new file mode 100644 index 0000000..46ef093 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ServingCell-PCI.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _ServingCell_PCI_H_ +#define _ServingCell_PCI_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NR-PCI.h" +#include "E-UTRA-PCI.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ServingCell_PCI_PR { + ServingCell_PCI_PR_NOTHING, /* No components present */ + ServingCell_PCI_PR_nR, + ServingCell_PCI_PR_eUTRA + /* Extensions may appear below */ + +} ServingCell_PCI_PR; + +/* ServingCell-PCI */ +typedef struct ServingCell_PCI { + ServingCell_PCI_PR present; + union ServingCell_PCI_u { + NR_PCI_t nR; + E_UTRA_PCI_t eUTRA; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ServingCell_PCI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ServingCell_PCI; + +#ifdef __cplusplus +} +#endif + +#endif /* _ServingCell_PCI_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/SlicePerPlmnPerCellListItem.h b/Bouncer/e2sm_kpm/headers/SlicePerPlmnPerCellListItem.h new file mode 100644 index 0000000..abe34bb --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SlicePerPlmnPerCellListItem.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SlicePerPlmnPerCellListItem_H_ +#define _SlicePerPlmnPerCellListItem_H_ + + +#include + +/* Including external dependencies */ +#include "SNSSAI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct FQIPERSlicesPerPlmnPerCellListItem; + +/* SlicePerPlmnPerCellListItem */ +typedef struct SlicePerPlmnPerCellListItem { + SNSSAI_t sliceID; + struct SlicePerPlmnPerCellListItem__fQIPERSlicesPerPlmnPerCellList { + A_SEQUENCE_OF(struct FQIPERSlicesPerPlmnPerCellListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } fQIPERSlicesPerPlmnPerCellList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SlicePerPlmnPerCellListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SlicePerPlmnPerCellListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_SlicePerPlmnPerCellListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_SlicePerPlmnPerCellListItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _SlicePerPlmnPerCellListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/SliceToReportListItem.h b/Bouncer/e2sm_kpm/headers/SliceToReportListItem.h new file mode 100644 index 0000000..74a2a1d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SliceToReportListItem.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SliceToReportListItem_H_ +#define _SliceToReportListItem_H_ + + +#include + +/* Including external dependencies */ +#include "SNSSAI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct FQIPERSlicesPerPlmnListItem; + +/* SliceToReportListItem */ +typedef struct SliceToReportListItem { + SNSSAI_t sliceID; + struct SliceToReportListItem__fQIPERSlicesPerPlmnList { + A_SEQUENCE_OF(struct FQIPERSlicesPerPlmnListItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } fQIPERSlicesPerPlmnList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SliceToReportListItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SliceToReportListItem; +extern asn_SEQUENCE_specifics_t asn_SPC_SliceToReportListItem_specs_1; +extern asn_TYPE_member_t asn_MBR_SliceToReportListItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _SliceToReportListItem_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/SubscriberProfileIDforRFP.h b/Bouncer/e2sm_kpm/headers/SubscriberProfileIDforRFP.h new file mode 100644 index 0000000..edc5595 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SubscriberProfileIDforRFP.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _SubscriberProfileIDforRFP_H_ +#define _SubscriberProfileIDforRFP_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* SubscriberProfileIDforRFP */ +typedef long SubscriberProfileIDforRFP_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SubscriberProfileIDforRFP; +asn_struct_free_f SubscriberProfileIDforRFP_free; +asn_struct_print_f SubscriberProfileIDforRFP_print; +asn_constr_check_f SubscriberProfileIDforRFP_constraint; +ber_type_decoder_f SubscriberProfileIDforRFP_decode_ber; +der_type_encoder_f SubscriberProfileIDforRFP_encode_der; +xer_type_decoder_f SubscriberProfileIDforRFP_decode_xer; +xer_type_encoder_f SubscriberProfileIDforRFP_encode_xer; +per_type_decoder_f SubscriberProfileIDforRFP_decode_uper; +per_type_encoder_f SubscriberProfileIDforRFP_encode_uper; +per_type_decoder_f SubscriberProfileIDforRFP_decode_aper; +per_type_encoder_f SubscriberProfileIDforRFP_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _SubscriberProfileIDforRFP_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/SupportedSULBandList.h b/Bouncer/e2sm_kpm/headers/SupportedSULBandList.h new file mode 100644 index 0000000..df4763d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SupportedSULBandList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _SupportedSULBandList_H_ +#define _SupportedSULBandList_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct SupportedSULFreqBandItem; + +/* SupportedSULBandList */ +typedef struct SupportedSULBandList { + A_SEQUENCE_OF(struct SupportedSULFreqBandItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SupportedSULBandList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SupportedSULBandList; +extern asn_SET_OF_specifics_t asn_SPC_SupportedSULBandList_specs_1; +extern asn_TYPE_member_t asn_MBR_SupportedSULBandList_1[1]; +extern asn_per_constraints_t asn_PER_type_SupportedSULBandList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _SupportedSULBandList_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/SupportedSULFreqBandItem.h b/Bouncer/e2sm_kpm/headers/SupportedSULFreqBandItem.h new file mode 100644 index 0000000..e550541 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/SupportedSULFreqBandItem.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _SupportedSULFreqBandItem_H_ +#define _SupportedSULFreqBandItem_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* SupportedSULFreqBandItem */ +typedef struct SupportedSULFreqBandItem { + long freqBandIndicatorNr; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SupportedSULFreqBandItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SupportedSULFreqBandItem; +extern asn_SEQUENCE_specifics_t asn_SPC_SupportedSULFreqBandItem_specs_1; +extern asn_TYPE_member_t asn_MBR_SupportedSULFreqBandItem_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _SupportedSULFreqBandItem_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/T61String.h b/Bouncer/e2sm_kpm/headers/T61String.h new file mode 100644 index 0000000..9e9e380 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/T61String.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _T61String_H_ +#define _T61String_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t T61String_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_T61String; +extern asn_TYPE_operation_t asn_OP_T61String; + +#define T61String_free OCTET_STRING_free +#define T61String_print OCTET_STRING_print +#define T61String_compare OCTET_STRING_compare +#define T61String_constraint asn_generic_unknown_constraint +#define T61String_decode_ber OCTET_STRING_decode_ber +#define T61String_encode_der OCTET_STRING_encode_der +#define T61String_decode_xer OCTET_STRING_decode_xer_hex +#define T61String_encode_xer OCTET_STRING_encode_xer +#define T61String_decode_uper OCTET_STRING_decode_uper +#define T61String_encode_uper OCTET_STRING_encode_uper +#define T61String_decode_aper OCTET_STRING_decode_aper +#define T61String_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _T61String_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/TeletexString.h b/Bouncer/e2sm_kpm/headers/TeletexString.h new file mode 100644 index 0000000..9f04aef --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/TeletexString.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _TeletexString_H_ +#define _TeletexString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t TeletexString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_TeletexString; +extern asn_TYPE_operation_t asn_OP_TeletexString; + +#define TeletexString_free OCTET_STRING_free +#define TeletexString_print OCTET_STRING_print +#define TeletexString_compare OCTET_STRING_compare +#define TeletexString_constraint asn_generic_unknown_constraint +#define TeletexString_decode_ber OCTET_STRING_decode_ber +#define TeletexString_encode_der OCTET_STRING_encode_der +#define TeletexString_decode_xer OCTET_STRING_decode_xer_hex +#define TeletexString_encode_xer OCTET_STRING_encode_xer +#define TeletexString_decode_uper OCTET_STRING_decode_uper +#define TeletexString_encode_uper OCTET_STRING_encode_uper +#define TeletexString_decode_aper OCTET_STRING_decode_aper +#define TeletexString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _TeletexString_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/TestCond-Expression.h b/Bouncer/e2sm_kpm/headers/TestCond-Expression.h new file mode 100644 index 0000000..fa4d2e5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/TestCond-Expression.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _TestCond_Expression_H_ +#define _TestCond_Expression_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TestCond_Expression { + TestCond_Expression_equal = 0, + TestCond_Expression_greaterthan = 1, + TestCond_Expression_lessthan = 2, + TestCond_Expression_contains = 3, + TestCond_Expression_present = 4 + /* + * Enumeration is extensible + */ +} e_TestCond_Expression; + +/* TestCond-Expression */ +typedef long TestCond_Expression_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_TestCond_Expression_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_TestCond_Expression; +extern const asn_INTEGER_specifics_t asn_SPC_TestCond_Expression_specs_1; +asn_struct_free_f TestCond_Expression_free; +asn_struct_print_f TestCond_Expression_print; +asn_constr_check_f TestCond_Expression_constraint; +ber_type_decoder_f TestCond_Expression_decode_ber; +der_type_encoder_f TestCond_Expression_encode_der; +xer_type_decoder_f TestCond_Expression_decode_xer; +xer_type_encoder_f TestCond_Expression_encode_xer; +per_type_decoder_f TestCond_Expression_decode_uper; +per_type_encoder_f TestCond_Expression_encode_uper; +per_type_decoder_f TestCond_Expression_decode_aper; +per_type_encoder_f TestCond_Expression_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _TestCond_Expression_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/TestCond-Type.h b/Bouncer/e2sm_kpm/headers/TestCond-Type.h new file mode 100644 index 0000000..028d211 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/TestCond-Type.h @@ -0,0 +1,108 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _TestCond_Type_H_ +#define _TestCond_Type_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TestCond_Type_PR { + TestCond_Type_PR_NOTHING, /* No components present */ + TestCond_Type_PR_gBR, + TestCond_Type_PR_aMBR, + TestCond_Type_PR_isStat, + TestCond_Type_PR_isCatM, + TestCond_Type_PR_rSRP, + TestCond_Type_PR_rSRQ + /* Extensions may appear below */ + +} TestCond_Type_PR; +typedef enum TestCond_Type__gBR { + TestCond_Type__gBR_true = 0 + /* + * Enumeration is extensible + */ +} e_TestCond_Type__gBR; +typedef enum TestCond_Type__aMBR { + TestCond_Type__aMBR_true = 0 + /* + * Enumeration is extensible + */ +} e_TestCond_Type__aMBR; +typedef enum TestCond_Type__isStat { + TestCond_Type__isStat_true = 0 + /* + * Enumeration is extensible + */ +} e_TestCond_Type__isStat; +typedef enum TestCond_Type__isCatM { + TestCond_Type__isCatM_true = 0 + /* + * Enumeration is extensible + */ +} e_TestCond_Type__isCatM; +typedef enum TestCond_Type__rSRP { + TestCond_Type__rSRP_true = 0 + /* + * Enumeration is extensible + */ +} e_TestCond_Type__rSRP; +typedef enum TestCond_Type__rSRQ { + TestCond_Type__rSRQ_true = 0 + /* + * Enumeration is extensible + */ +} e_TestCond_Type__rSRQ; + +/* TestCond-Type */ +typedef struct TestCond_Type { + TestCond_Type_PR present; + union TestCond_Type_u { + long gBR; + long aMBR; + long isStat; + long isCatM; + long rSRP; + long rSRQ; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TestCond_Type_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_gBR_2; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_aMBR_5; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_isStat_8; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_isCatM_11; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_rSRP_14; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_rSRQ_17; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_TestCond_Type; +extern asn_CHOICE_specifics_t asn_SPC_TestCond_Type_specs_1; +extern asn_TYPE_member_t asn_MBR_TestCond_Type_1[6]; +extern asn_per_constraints_t asn_PER_type_TestCond_Type_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _TestCond_Type_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/TestCond-Value.h b/Bouncer/e2sm_kpm/headers/TestCond-Value.h new file mode 100644 index 0000000..8c41320 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/TestCond-Value.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _TestCond_Value_H_ +#define _TestCond_Value_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" +#include "BOOLEAN.h" +#include "BIT_STRING.h" +#include "OCTET_STRING.h" +#include "PrintableString.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TestCond_Value_PR { + TestCond_Value_PR_NOTHING, /* No components present */ + TestCond_Value_PR_valueInt, + TestCond_Value_PR_valueEnum, + TestCond_Value_PR_valueBool, + TestCond_Value_PR_valueBitS, + TestCond_Value_PR_valueOctS, + TestCond_Value_PR_valuePrtS + /* Extensions may appear below */ + +} TestCond_Value_PR; + +/* TestCond-Value */ +typedef struct TestCond_Value { + TestCond_Value_PR present; + union TestCond_Value_u { + long valueInt; + long valueEnum; + BOOLEAN_t valueBool; + BIT_STRING_t valueBitS; + OCTET_STRING_t valueOctS; + PrintableString_t valuePrtS; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TestCond_Value_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TestCond_Value; +extern asn_CHOICE_specifics_t asn_SPC_TestCond_Value_specs_1; +extern asn_TYPE_member_t asn_MBR_TestCond_Value_1[6]; +extern asn_per_constraints_t asn_PER_type_TestCond_Value_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _TestCond_Value_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/TestCondInfo.h b/Bouncer/e2sm_kpm/headers/TestCondInfo.h new file mode 100644 index 0000000..0262e20 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/TestCondInfo.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _TestCondInfo_H_ +#define _TestCondInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TestCond-Type.h" +#include "TestCond-Expression.h" +#include "TestCond-Value.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* TestCondInfo */ +typedef struct TestCondInfo { + TestCond_Type_t testType; + TestCond_Expression_t testExpr; + TestCond_Value_t testValue; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TestCondInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TestCondInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_TestCondInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_TestCondInfo_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _TestCondInfo_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/TimeStamp.h b/Bouncer/e2sm_kpm/headers/TimeStamp.h new file mode 100644 index 0000000..e2d3c57 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/TimeStamp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _TimeStamp_H_ +#define _TimeStamp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* TimeStamp */ +typedef OCTET_STRING_t TimeStamp_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_TimeStamp_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_TimeStamp; +asn_struct_free_f TimeStamp_free; +asn_struct_print_f TimeStamp_print; +asn_constr_check_f TimeStamp_constraint; +ber_type_decoder_f TimeStamp_decode_ber; +der_type_encoder_f TimeStamp_encode_der; +xer_type_decoder_f TimeStamp_decode_xer; +xer_type_encoder_f TimeStamp_encode_xer; +per_type_decoder_f TimeStamp_decode_uper; +per_type_encoder_f TimeStamp_encode_uper; +per_type_decoder_f TimeStamp_decode_aper; +per_type_encoder_f TimeStamp_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _TimeStamp_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/Timestamp.h b/Bouncer/e2sm_kpm/headers/Timestamp.h new file mode 100644 index 0000000..dafc566 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/Timestamp.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _Timestamp_H_ +#define _Timestamp_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Timestamp */ +typedef OCTET_STRING_t Timestamp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Timestamp; +asn_struct_free_f Timestamp_free; +asn_struct_print_f Timestamp_print; +asn_constr_check_f Timestamp_constraint; +ber_type_decoder_f Timestamp_decode_ber; +der_type_encoder_f Timestamp_encode_der; +xer_type_decoder_f Timestamp_decode_xer; +xer_type_encoder_f Timestamp_encode_xer; +oer_type_decoder_f Timestamp_decode_oer; +oer_type_encoder_f Timestamp_encode_oer; +per_type_decoder_f Timestamp_decode_uper; +per_type_encoder_f Timestamp_encode_uper; +per_type_decoder_f Timestamp_decode_aper; +per_type_encoder_f Timestamp_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Timestamp_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/Trigger-ConditionIE-Item.h b/Bouncer/e2sm_kpm/headers/Trigger-ConditionIE-Item.h new file mode 100644 index 0000000..fc43153 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/Trigger-ConditionIE-Item.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _Trigger_ConditionIE_Item_H_ +#define _Trigger_ConditionIE_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RT-Period-IE.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Trigger-ConditionIE-Item */ +typedef struct Trigger_ConditionIE_Item { + RT_Period_IE_t report_Period_IE; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Trigger_ConditionIE_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Trigger_ConditionIE_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_Trigger_ConditionIE_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_Trigger_ConditionIE_Item_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Trigger_ConditionIE_Item_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/UE-Report-Type.h b/Bouncer/e2sm_kpm/headers/UE-Report-Type.h new file mode 100644 index 0000000..25a76d5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UE-Report-Type.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UE_Report_Type_H_ +#define _UE_Report_Type_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum UE_Report_Type { + UE_Report_Type_oDU_Report_Per_UE = 0, + UE_Report_Type_oCU_CP_Report_Per_UE = 1, + UE_Report_Type_oCU_UP_Report_Per_UE = 2 + /* + * Enumeration is extensible + */ +} e_UE_Report_Type; + +/* UE-Report-Type */ +typedef long UE_Report_Type_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_UE_Report_Type_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_UE_Report_Type; +extern const asn_INTEGER_specifics_t asn_SPC_UE_Report_Type_specs_1; +asn_struct_free_f UE_Report_Type_free; +asn_struct_print_f UE_Report_Type_print; +asn_constr_check_f UE_Report_Type_constraint; +ber_type_decoder_f UE_Report_Type_decode_ber; +der_type_encoder_f UE_Report_Type_encode_der; +xer_type_decoder_f UE_Report_Type_decode_xer; +xer_type_encoder_f UE_Report_Type_encode_xer; +oer_type_decoder_f UE_Report_Type_decode_oer; +oer_type_encoder_f UE_Report_Type_encode_oer; +per_type_decoder_f UE_Report_Type_decode_uper; +per_type_encoder_f UE_Report_Type_encode_uper; +per_type_decoder_f UE_Report_Type_decode_aper; +per_type_encoder_f UE_Report_Type_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _UE_Report_Type_H_ */ +#include diff --git a/Bouncer/e2sm_kpm/headers/UEID-EN-GNB.h b/Bouncer/e2sm_kpm/headers/UEID-EN-GNB.h new file mode 100644 index 0000000..c0c4760 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-EN-GNB.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_EN_GNB_H_ +#define _UEID_EN_GNB_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ENB-UE-X2AP-ID.h" +#include "ENB-UE-X2AP-ID-Extension.h" +#include "GlobalENB-ID.h" +#include "GNB-CU-UE-F1AP-ID.h" +#include "RANUEID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_CP_E1AP_ID_List; + +/* UEID-EN-GNB */ +typedef struct UEID_EN_GNB { + ENB_UE_X2AP_ID_t m_eNB_UE_X2AP_ID; + ENB_UE_X2AP_ID_Extension_t *m_eNB_UE_X2AP_ID_Extension; /* OPTIONAL */ + GlobalENB_ID_t globalENB_ID; + GNB_CU_UE_F1AP_ID_t *gNB_CU_UE_F1AP_ID; /* OPTIONAL */ + struct UEID_GNB_CU_CP_E1AP_ID_List *gNB_CU_CP_UE_E1AP_ID_List; /* OPTIONAL */ + RANUEID_t *ran_UEID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_EN_GNB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_EN_GNB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_EN_GNB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_EN_GNB_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-ENB.h b/Bouncer/e2sm_kpm/headers/UEID-ENB.h new file mode 100644 index 0000000..ac06374 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-ENB.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_ENB_H_ +#define _UEID_ENB_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MME-UE-S1AP-ID.h" +#include "GUMMEI.h" +#include "ENB-UE-X2AP-ID.h" +#include "ENB-UE-X2AP-ID-Extension.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct GlobalENB_ID; + +/* UEID-ENB */ +typedef struct UEID_ENB { + MME_UE_S1AP_ID_t mME_UE_S1AP_ID; + GUMMEI_t gUMMEI; + ENB_UE_X2AP_ID_t *m_eNB_UE_X2AP_ID; /* OPTIONAL */ + ENB_UE_X2AP_ID_Extension_t *m_eNB_UE_X2AP_ID_Extension; /* OPTIONAL */ + struct GlobalENB_ID *globalENB_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_ENB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_ENB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_ENB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_ENB_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_ENB_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h new file mode 100644 index 0000000..2e7abac --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_CP_E1AP_ID_Item_H_ +#define _UEID_GNB_CU_CP_E1AP_ID_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GNB-CU-CP-UE-E1AP-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-CU-CP-E1AP-ID-Item */ +typedef struct UEID_GNB_CU_CP_E1AP_ID_Item { + GNB_CU_CP_UE_E1AP_ID_t gNB_CU_CP_UE_E1AP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_CP_E1AP_ID_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_Item_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_CP_E1AP_ID_Item_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h new file mode 100644 index 0000000..234a586 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_CP_E1AP_ID_List_H_ +#define _UEID_GNB_CU_CP_E1AP_ID_List_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_CP_E1AP_ID_Item; + +/* UEID-GNB-CU-CP-E1AP-ID-List */ +typedef struct UEID_GNB_CU_CP_E1AP_ID_List { + A_SEQUENCE_OF(struct UEID_GNB_CU_CP_E1AP_ID_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_CP_E1AP_ID_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List; +extern asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_List_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_List_1[1]; +extern asn_per_constraints_t asn_PER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_CP_E1AP_ID_List_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h new file mode 100644 index 0000000..d5760cd --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_CP_F1AP_ID_Item_H_ +#define _UEID_GNB_CU_CP_F1AP_ID_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GNB-CU-UE-F1AP-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-CU-CP-F1AP-ID-Item */ +typedef struct UEID_GNB_CU_CP_F1AP_ID_Item { + GNB_CU_UE_F1AP_ID_t gNB_CU_UE_F1AP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_CP_F1AP_ID_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_F1AP_ID_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_F1AP_ID_Item_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_CP_F1AP_ID_Item_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-F1AP-ID-List.h b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-F1AP-ID-List.h new file mode 100644 index 0000000..7c1da53 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-F1AP-ID-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_F1AP_ID_List_H_ +#define _UEID_GNB_CU_F1AP_ID_List_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_CP_F1AP_ID_Item; + +/* UEID-GNB-CU-F1AP-ID-List */ +typedef struct UEID_GNB_CU_F1AP_ID_List { + A_SEQUENCE_OF(struct UEID_GNB_CU_CP_F1AP_ID_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_F1AP_ID_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_F1AP_ID_List; +extern asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_F1AP_ID_List_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_F1AP_ID_List_1[1]; +extern asn_per_constraints_t asn_PER_type_UEID_GNB_CU_F1AP_ID_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_F1AP_ID_List_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-UP.h b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-UP.h new file mode 100644 index 0000000..8d7ee50 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-GNB-CU-UP.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_UP_H_ +#define _UEID_GNB_CU_UP_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GNB-CU-CP-UE-E1AP-ID.h" +#include "RANUEID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-CU-UP */ +typedef struct UEID_GNB_CU_UP { + GNB_CU_CP_UE_E1AP_ID_t gNB_CU_CP_UE_E1AP_ID; + RANUEID_t *ran_UEID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_UP_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_UP; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_UP_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_UP_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_UP_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-GNB-DU.h b/Bouncer/e2sm_kpm/headers/UEID-GNB-DU.h new file mode 100644 index 0000000..e82d119 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-GNB-DU.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_DU_H_ +#define _UEID_GNB_DU_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GNB-CU-UE-F1AP-ID.h" +#include "RANUEID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-DU */ +typedef struct UEID_GNB_DU { + GNB_CU_UE_F1AP_ID_t gNB_CU_UE_F1AP_ID; + RANUEID_t *ran_UEID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_DU_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_DU; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_DU_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_DU_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_DU_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-GNB.h b/Bouncer/e2sm_kpm/headers/UEID-GNB.h new file mode 100644 index 0000000..e2bfcf1 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-GNB.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_H_ +#define _UEID_GNB_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "AMF-UE-NGAP-ID.h" +#include "GUAMI.h" +#include "RANUEID.h" +#include "NG-RANnodeUEXnAPID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_F1AP_ID_List; +struct UEID_GNB_CU_CP_E1AP_ID_List; +struct GlobalGNB_ID; +struct GlobalNGRANNodeID; + +/* UEID-GNB */ +typedef struct UEID_GNB { + AMF_UE_NGAP_ID_t amf_UE_NGAP_ID; + GUAMI_t guami; + struct UEID_GNB_CU_F1AP_ID_List *gNB_CU_UE_F1AP_ID_List; /* OPTIONAL */ + struct UEID_GNB_CU_CP_E1AP_ID_List *gNB_CU_CP_UE_E1AP_ID_List; /* OPTIONAL */ + RANUEID_t *ran_UEID; /* OPTIONAL */ + NG_RANnodeUEXnAPID_t *m_NG_RAN_UE_XnAP_ID; /* OPTIONAL */ + struct GlobalGNB_ID *globalGNB_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + struct GlobalNGRANNodeID *globalNG_RANNode_ID; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_1[8]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-NG-ENB-DU.h b/Bouncer/e2sm_kpm/headers/UEID-NG-ENB-DU.h new file mode 100644 index 0000000..549513d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-NG-ENB-DU.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_NG_ENB_DU_H_ +#define _UEID_NG_ENB_DU_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NGENB-CU-UE-W1AP-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-NG-ENB-DU */ +typedef struct UEID_NG_ENB_DU { + NGENB_CU_UE_W1AP_ID_t ng_eNB_CU_UE_W1AP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_NG_ENB_DU_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB_DU; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_DU_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_NG_ENB_DU_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_NG_ENB_DU_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID-NG-ENB.h b/Bouncer/e2sm_kpm/headers/UEID-NG-ENB.h new file mode 100644 index 0000000..fda548b --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID-NG-ENB.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_NG_ENB_H_ +#define _UEID_NG_ENB_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "AMF-UE-NGAP-ID.h" +#include "GUAMI.h" +#include "NGENB-CU-UE-W1AP-ID.h" +#include "NG-RANnodeUEXnAPID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct GlobalNgENB_ID; +struct GlobalNGRANNodeID; + +/* UEID-NG-ENB */ +typedef struct UEID_NG_ENB { + AMF_UE_NGAP_ID_t amf_UE_NGAP_ID; + GUAMI_t guami; + NGENB_CU_UE_W1AP_ID_t *ng_eNB_CU_UE_W1AP_ID; /* OPTIONAL */ + NG_RANnodeUEXnAPID_t *m_NG_RAN_UE_XnAP_ID; /* OPTIONAL */ + struct GlobalNgENB_ID *globalNgENB_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + struct GlobalNGRANNodeID *globalNG_RANNode_ID; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_NG_ENB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_NG_ENB_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_NG_ENB_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UEID.h b/Bouncer/e2sm_kpm/headers/UEID.h new file mode 100644 index 0000000..8e4714c --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UEID.h @@ -0,0 +1,76 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#ifndef _UEID_H_ +#define _UEID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum UEID_PR { + UEID_PR_NOTHING, /* No components present */ + UEID_PR_gNB_UEID, + UEID_PR_gNB_DU_UEID, + UEID_PR_gNB_CU_UP_UEID, + UEID_PR_ng_eNB_UEID, + UEID_PR_ng_eNB_DU_UEID, + UEID_PR_en_gNB_UEID, + UEID_PR_eNB_UEID + /* Extensions may appear below */ + +} UEID_PR; + +/* Forward declarations */ +struct UEID_GNB; +struct UEID_GNB_DU; +struct UEID_GNB_CU_UP; +struct UEID_NG_ENB; +struct UEID_NG_ENB_DU; +struct UEID_EN_GNB; +struct UEID_ENB; + +/* UEID */ +typedef struct UEID { + UEID_PR present; + union UEID_u { + struct UEID_GNB *gNB_UEID; + struct UEID_GNB_DU *gNB_DU_UEID; + struct UEID_GNB_CU_UP *gNB_CU_UP_UEID; + struct UEID_NG_ENB *ng_eNB_UEID; + struct UEID_NG_ENB_DU *ng_eNB_DU_UEID; + struct UEID_EN_GNB *en_gNB_UEID; + struct UEID_ENB *eNB_UEID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID; +extern asn_CHOICE_specifics_t asn_SPC_UEID_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_1[7]; +extern asn_per_constraints_t asn_PER_type_UEID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_H_ */ +#include "asn_internal.h" diff --git a/Bouncer/e2sm_kpm/headers/UTCTime.h b/Bouncer/e2sm_kpm/headers/UTCTime.h new file mode 100644 index 0000000..295f156 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UTCTime.h @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UTCTime_H_ +#define _UTCTime_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t UTCTime_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_UTCTime; +extern asn_TYPE_operation_t asn_OP_UTCTime; + +asn_struct_print_f UTCTime_print; +asn_struct_compare_f UTCTime_compare; +asn_constr_check_f UTCTime_constraint; +xer_type_encoder_f UTCTime_encode_xer; +asn_random_fill_f UTCTime_random_fill; + +#define UTCTime_free OCTET_STRING_free +#define UTCTime_decode_ber OCTET_STRING_decode_ber +#define UTCTime_encode_der OCTET_STRING_encode_der +#define UTCTime_decode_xer OCTET_STRING_decode_xer_utf8 +#define UTCTime_decode_uper OCTET_STRING_decode_uper +#define UTCTime_encode_uper OCTET_STRING_encode_uper +#define UTCTime_decode_aper OCTET_STRING_decode_aper +#define UTCTime_encode_aper OCTET_STRING_encode_aper + +/*********************** + * Some handy helpers. * + ***********************/ + +struct tm; /* */ + +/* See asn_GT2time() in GeneralizedTime.h */ +time_t asn_UT2time(const UTCTime_t *, struct tm *_optional_tm4fill, int as_gmt); + +/* See asn_time2GT() in GeneralizedTime.h */ +UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm *, int force_gmt); + +#ifdef __cplusplus +} +#endif + +#endif /* _UTCTime_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/UTF8String.h b/Bouncer/e2sm_kpm/headers/UTF8String.h new file mode 100644 index 0000000..7ad9c82 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UTF8String.h @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UTF8String_H_ +#define _UTF8String_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t UTF8String_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_UTF8String; +extern asn_TYPE_operation_t asn_OP_UTF8String; + +asn_struct_print_f UTF8String_print; +asn_constr_check_f UTF8String_constraint; +asn_random_fill_f UTF8String_random_fill; + +#define UTF8String_free OCTET_STRING_free +#define UTF8String_compare OCTET_STRING_compare +#define UTF8String_constraint UTF8String_constraint +#define UTF8String_decode_ber OCTET_STRING_decode_ber +#define UTF8String_encode_der OCTET_STRING_encode_der +#define UTF8String_decode_xer OCTET_STRING_decode_xer_utf8 +#define UTF8String_encode_xer OCTET_STRING_encode_xer_utf8 +#define UTF8String_decode_uper OCTET_STRING_decode_uper +#define UTF8String_encode_uper OCTET_STRING_encode_uper +#define UTF8String_decode_aper OCTET_STRING_decode_aper +#define UTF8String_encode_aper OCTET_STRING_encode_aper + +/* + * Returns length of the given UTF-8 string in characters, + * or a negative error code: + * -1: UTF-8 sequence truncated + * -2: Illegal UTF-8 sequence start + * -3: Continuation expectation failed + * -4: Not minimal length encoding + * -5: Invalid arguments + */ +ssize_t UTF8String_length(const UTF8String_t *st); + +/* + * Convert the UTF-8 string into a sequence of wide characters. + * Returns the number of characters necessary. + * Returned value might be greater than dstlen. + * In case of conversion error, 0 is returned. + * + * If st points to a valid UTF-8 string, calling + * UTF8String_to_wcs(st, 0, 0); + * is equivalent to + * UTF8String_length(const UTF8String_t *st); + */ +size_t UTF8String_to_wcs(const UTF8String_t *st, uint32_t *dst, size_t dstlen); + +#ifdef __cplusplus +} +#endif + +#endif /* _UTF8String_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/UniversalString.h b/Bouncer/e2sm_kpm/headers/UniversalString.h new file mode 100644 index 0000000..510807a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/UniversalString.h @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UniversalString_H_ +#define _UniversalString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t UniversalString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_UniversalString; +extern asn_TYPE_operation_t asn_OP_UniversalString; +extern asn_OCTET_STRING_specifics_t asn_SPC_UniversalString_specs; + +asn_struct_print_f UniversalString_print; /* Human-readable output */ +asn_constr_check_f UniversalString_constraint; +xer_type_decoder_f UniversalString_decode_xer; +xer_type_encoder_f UniversalString_encode_xer; + +#define UniversalString_free OCTET_STRING_free +#define UniversalString_compare OCTET_STRING_compare +#define UniversalString_decode_ber OCTET_STRING_decode_ber +#define UniversalString_encode_der OCTET_STRING_encode_der +#define UniversalString_decode_uper OCTET_STRING_decode_uper +#define UniversalString_encode_uper OCTET_STRING_encode_uper +#define UniversalString_decode_aper OCTET_STRING_decode_aper +#define UniversalString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _UniversalString_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/VideotexString.h b/Bouncer/e2sm_kpm/headers/VideotexString.h new file mode 100644 index 0000000..b535389 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/VideotexString.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _VideotexString_H_ +#define _VideotexString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t VideotexString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_VideotexString; +extern asn_TYPE_operation_t asn_OP_VideotexString; + +#define VideotexString_free OCTET_STRING_free +#define VideotexString_print OCTET_STRING_print +#define VideotexString_compare OCTET_STRING_compare +#define VideotexString_constraint asn_generic_unknown_constraint +#define VideotexString_decode_ber OCTET_STRING_decode_ber +#define VideotexString_encode_der OCTET_STRING_encode_der +#define VideotexString_decode_xer OCTET_STRING_decode_xer_hex +#define VideotexString_encode_xer OCTET_STRING_encode_xer +#define VideotexString_decode_uper OCTET_STRING_decode_uper +#define VideotexString_encode_uper OCTET_STRING_encode_uper +#define VideotexString_decode_aper OCTET_STRING_decode_aper +#define VideotexString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _VideotexString_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/VisibleString.h b/Bouncer/e2sm_kpm/headers/VisibleString.h new file mode 100644 index 0000000..ad5f713 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/VisibleString.h @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _VisibleString_H_ +#define _VisibleString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_VisibleString; +extern asn_TYPE_operation_t asn_OP_VisibleString; + +asn_constr_check_f VisibleString_constraint; + +#define VisibleString_free OCTET_STRING_free +#define VisibleString_print OCTET_STRING_print +#define VisibleString_compare OCTET_STRING_compare +#define VisibleString_constraint VisibleString_constraint +#define VisibleString_decode_ber OCTET_STRING_decode_ber +#define VisibleString_encode_der OCTET_STRING_encode_der +#define VisibleString_decode_xer OCTET_STRING_decode_xer_hex +#define VisibleString_encode_xer OCTET_STRING_encode_xer +#define VisibleString_decode_uper OCTET_STRING_decode_uper +#define VisibleString_encode_uper OCTET_STRING_encode_uper +#define VisibleString_decode_aper OCTET_STRING_decode_aper +#define VisibleString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _VisibleString_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/asn_SEQUENCE_OF.h b/Bouncer/e2sm_kpm/headers/asn_SEQUENCE_OF.h new file mode 100644 index 0000000..e35bc44 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_SEQUENCE_OF.h @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_SEQUENCE_OF_H +#define ASN_SEQUENCE_OF_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * SEQUENCE OF is the same as SET OF with a tiny difference: + * the delete operation preserves the initial order of elements + * and thus MAY operate in non-constant time. + */ +#define A_SEQUENCE_OF(type) A_SET_OF(type) + +#define ASN_SEQUENCE_ADD(headptr, ptr) \ + asn_sequence_add((headptr), (ptr)) + +/*********************************************** + * Implementation of the SEQUENCE OF structure. + */ + +#define asn_sequence_add asn_set_add +#define asn_sequence_empty asn_set_empty + +/* + * Delete the element from the set by its number (base 0). + * This is NOT a constant-time operation. + * The order of elements is preserved. + * If _do_free is given AND the (*free) is initialized, the element + * will be freed using the custom (*free) function as well. + */ +void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); + +/* + * Cope with different conversions requirements to/from void in C and C++. + * This is mostly useful for support library. + */ +typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; +#define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr)) +#define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr)) + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_SEQUENCE_OF_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_SET_OF.h b/Bouncer/e2sm_kpm/headers/asn_SET_OF.h new file mode 100644 index 0000000..882e1a4 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_SET_OF.h @@ -0,0 +1,72 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_SET_OF_H +#define ASN_SET_OF_H + +#ifdef __cplusplus +#define A_SET_OF(type) \ + struct { \ + type **array; \ + int count; /* Meaningful size */ \ + int size; /* Allocated size */ \ + void (*free)(decltype(*array)); \ + } +#else /* C */ +#define A_SET_OF(type) \ + struct { \ + type **array; \ + int count; /* Meaningful size */ \ + int size; /* Allocated size */ \ + void (*free)(type *); \ + } +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define ASN_SET_ADD(headptr, ptr) \ + asn_set_add((headptr), (ptr)) + +/******************************************* + * Implementation of the SET OF structure. + */ + +/* + * Add another structure into the set by its pointer. + * RETURN VALUES: + * 0 for success and -1/errno for failure. + */ +int asn_set_add(void *asn_set_of_x, void *ptr); + +/* + * Delete the element from the set by its number (base 0). + * This is a constant-time operation. The order of elements before the + * deleted ones is guaranteed, the order of elements after the deleted + * one is NOT guaranteed. + * If _do_free is given AND the (*free) is initialized, the element + * will be freed using the custom (*free) function as well. + */ +void asn_set_del(void *asn_set_of_x, int number, int _do_free); + +/* + * Empty the contents of the set. Will free the elements, if (*free) is given. + * Will NOT free the set itself. + */ +void asn_set_empty(void *asn_set_of_x); + +/* + * Cope with different conversions requirements to/from void in C and C++. + * This is mostly useful for support library. + */ +typedef A_SET_OF(void) asn_anonymous_set_; +#define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr)) +#define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr)) + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_SET_OF_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_application.h b/Bouncer/e2sm_kpm/headers/asn_application.h new file mode 100644 index 0000000..034f646 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_application.h @@ -0,0 +1,171 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Application-level ASN.1 callbacks. + */ +#ifndef ASN_APPLICATION_H +#define ASN_APPLICATION_H + +#include "asn_system.h" /* for platform-dependent types */ +#include "asn_codecs.h" /* for ASN.1 codecs specifics */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * A selection of ASN.1 Transfer Syntaxes to use with generalized + * encoders and decoders declared further in this .h file. + */ +enum asn_transfer_syntax { + /* Avoid appearance of a default transfer syntax. */ + ATS_INVALID = 0, + /* Plaintext output (not conforming to any standard), for debugging. */ + ATS_NONSTANDARD_PLAINTEXT, + /* Returns a randomly generated structure. */ + ATS_RANDOM, + /* + * X.690: + * BER: Basic Encoding Rules. + * DER: Distinguished Encoding Rules. + * CER: Canonical Encoding Rules. + * DER and CER are more strict variants of BER. + */ + ATS_BER, + ATS_DER, + ATS_CER, /* Only decoding is supported */ + /* + * X.696: + * OER: Octet Encoding Rules. + * CANONICAL-OER is a more strict variant of BASIC-OER. + */ + ATS_BASIC_OER, + ATS_CANONICAL_OER, + /* + * X.691: + * PER: Packed Encoding Rules. + * CANONICAL-PER is a more strict variant of BASIC-PER. + * NOTE: Produces or consumes a complete encoding (X.691 (08/2015) #11.1). + */ + ATS_UNALIGNED_BASIC_PER, + ATS_UNALIGNED_CANONICAL_PER, + ATS_ALIGNED_BASIC_PER, + ATS_ALIGNED_CANONICAL_PER, + /* + * X.693: + * XER: XML Encoding Rules. + * CANONICAL-XER is a more strict variant of BASIC-XER. + */ + ATS_BASIC_XER, + ATS_CANONICAL_XER +}; + +/* + * A generic encoder for any supported transfer syntax. + * RETURN VALUES: + * The (.encoded) field of the return value is REDEFINED to mean the following: + * >=0: The computed size of the encoded data. Can exceed the (buffer_size). + * -1: Error encoding the structure. See the error code in (errno): + * EINVAL: Incorrect parameters to the function, such as NULLs. + * ENOENT: Encoding transfer syntax is not defined (for this type). + * EBADF: The structure has invalid form or content constraint failed. + * The (.failed_type) and (.structure_ptr) MIGHT be set to the appropriate + * values at the place of failure, if at all possible. + * WARNING: The (.encoded) field of the return value can exceed the buffer_size. + * This is similar to snprintf(3) contract which might return values + * greater than the buffer size. + */ +asn_enc_rval_t asn_encode_to_buffer( + const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ + enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_encode, + const void *structure_to_encode, void *buffer, size_t buffer_size); + +/* + * A variant of asn_encode_to_buffer() with automatically allocated buffer. + * RETURN VALUES: + * On success, returns a newly allocated (.buffer) containing the whole message. + * The message size is returned in (.result.encoded). + * On failure: + * (.buffer) is NULL, + * (.result.encoded) as in asn_encode_to_buffer(), + * The errno codes as in asn_encode_to_buffer(), plus the following: + * ENOMEM: Memory allocation failed due to system or internal limits. + * The user is responsible for freeing the (.buffer). + */ +typedef struct asn_encode_to_new_buffer_result_s { + void *buffer; /* NULL if failed to encode. */ + asn_enc_rval_t result; +} asn_encode_to_new_buffer_result_t; +asn_encode_to_new_buffer_result_t asn_encode_to_new_buffer( + const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ + enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_encode, + const void *structure_to_encode); + + +/* + * Generic type of an application-defined callback to return various + * types of data to the application. + * EXPECTED RETURN VALUES: + * -1: Failed to consume bytes. Abort the mission. + * Non-negative return values indicate success, and ignored. + */ +typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, + void *application_specific_key); + + +/* + * A generic encoder for any supported transfer syntax. + * Returns the comprehensive encoding result descriptor (see asn_codecs.h). + * RETURN VALUES: + * The negative (.encoded) field of the return values is accompanied with the + * following error codes (errno): + * EINVAL: Incorrect parameters to the function, such as NULLs. + * ENOENT: Encoding transfer syntax is not defined (for this type). + * EBADF: The structure has invalid form or content constraint failed. + * EIO: The (callback) has returned negative value during encoding. + */ +asn_enc_rval_t asn_encode( + const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ + enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_encode, + const void *structure_to_encode, + asn_app_consume_bytes_f *callback, void *callback_key); + + +/* + * A generic decoder for any supported transfer syntax. + */ +asn_dec_rval_t asn_decode( + const asn_codec_ctx_t *opt_codec_parameters, enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_decode, + void **structure_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ +); + + +/* + * A callback of this type is called whenever constraint validation fails + * on some ASN.1 type. See "constraints.h" for more details on constraint + * validation. + * This callback specifies a descriptor of the ASN.1 type which failed + * the constraint check, as well as human readable message on what + * particular constraint has failed. + */ +typedef void (asn_app_constraint_failed_f)(void *application_specific_key, + const struct asn_TYPE_descriptor_s *type_descriptor_which_failed, + const void *structure_which_failed_ptr, + const char *error_message_format, ...) CC_PRINTFLIKE(4, 5); + + +#ifdef __cplusplus +} +#endif + +#include "constr_TYPE.h" /* for asn_TYPE_descriptor_t */ + +#endif /* ASN_APPLICATION_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_bit_data.h b/Bouncer/e2sm_kpm/headers/asn_bit_data.h new file mode 100644 index 0000000..59de7af --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_bit_data.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_BIT_DATA +#define ASN_BIT_DATA + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This structure describes a position inside an incoming PER bit stream. + */ +typedef struct asn_bit_data_s { + const uint8_t *buffer; /* Pointer to the octet stream */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits in the stream */ + size_t moved; /* Number of bits moved through this bit stream */ + int (*refill)(struct asn_bit_data_s *); + void *refill_key; +} asn_bit_data_t; + +/* + * Create a contiguous non-refillable bit data structure. + * Can be freed by FREEMEM(). + */ +asn_bit_data_t *asn_bit_data_new_contiguous(const void *data, size_t size_bits); + +/* + * Extract a small number of bits (<= 31) from the specified PER data pointer. + * This function returns -1 if the specified number of bits could not be + * extracted due to EOD or other conditions. + */ +int32_t asn_get_few_bits(asn_bit_data_t *, int get_nbits); + +/* Undo the immediately preceeding "get_few_bits" operation */ +void asn_get_undo(asn_bit_data_t *, int get_nbits); + +/* + * Extract a large number of bits from the specified PER data pointer. + * This function returns -1 if the specified number of bits could not be + * extracted due to EOD or other conditions. + */ +int asn_get_many_bits(asn_bit_data_t *, uint8_t *dst, int right_align, + int get_nbits); + +/* Non-thread-safe debugging function, don't use it */ +char *asn_bit_data_string(asn_bit_data_t *); + +/* + * This structure supports forming bit output. + */ +typedef struct asn_bit_outp_s { + uint8_t *buffer; /* Pointer into the (tmpspace) */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits left in (tmpspace) */ + uint8_t tmpspace[32]; /* Preliminary storage to hold data */ + int (*output)(const void *data, size_t size, void *op_key); + void *op_key; /* Key for (output) data callback */ + size_t flushed_bytes; /* Bytes already flushed through (output) */ +} asn_bit_outp_t; + +/* Output a small number of bits (<= 31) */ +int asn_put_few_bits(asn_bit_outp_t *, uint32_t bits, int obits); + +/* Output a large number of bits */ +int asn_put_many_bits(asn_bit_outp_t *, const uint8_t *src, int put_nbits); + +/* + * Flush whole bytes (0 or more) through (outper) member. + * The least significant bits which are not used are guaranteed to be set to 0. + * Returns -1 if callback returns -1. Otherwise, 0. + */ +int asn_put_aligned_flush(asn_bit_outp_t *); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_BIT_DATA */ diff --git a/Bouncer/e2sm_kpm/headers/asn_codecs.h b/Bouncer/e2sm_kpm/headers/asn_codecs.h new file mode 100644 index 0000000..e75c270 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_codecs.h @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_CODECS_H +#define ASN_CODECS_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * This structure defines a set of parameters that may be passed + * to every ASN.1 encoder or decoder function. + * WARNING: if max_stack_size member is set, and you are calling the + * function pointers of the asn_TYPE_descriptor_t directly, + * this structure must be ALLOCATED ON THE STACK! + * If you can't always satisfy this requirement, use ber_decode(), + * xer_decode() and uper_decode() functions instead. + */ +typedef struct asn_codec_ctx_s { + /* + * Limit the decoder routines to use no (much) more stack than a given + * number of bytes. Most of decoders are stack-based, and this + * would protect against stack overflows if the number of nested + * encodings is high. + * The OCTET STRING, BIT STRING and ANY BER decoders are heap-based, + * and are safe from this kind of overflow. + * A value from getrlimit(RLIMIT_STACK) may be used to initialize + * this variable. Be careful in multithreaded environments, as the + * stack size is rather limited. + */ + size_t max_stack_size; /* 0 disables stack bounds checking */ +} asn_codec_ctx_t; + +/* + * Type of the return value of the encoding functions (der_encode, xer_encode). + */ +typedef struct asn_enc_rval_s { + /* + * Number of bytes encoded. + * -1 indicates failure to encode the structure. + * In this case, the members below this one are meaningful. + */ + ssize_t encoded; + + /* + * Members meaningful when (encoded == -1), for post mortem analysis. + */ + + /* Type which cannot be encoded */ + const struct asn_TYPE_descriptor_s *failed_type; + + /* Pointer to the structure of that type */ + const void *structure_ptr; +} asn_enc_rval_t; +#define ASN__ENCODE_FAILED do { \ + asn_enc_rval_t tmp_error; \ + tmp_error.encoded = -1; \ + tmp_error.failed_type = td; \ + tmp_error.structure_ptr = sptr; \ + ASN_DEBUG("Failed to encode element %s", td ? td->name : ""); \ + return tmp_error; \ +} while(0) +#define ASN__ENCODED_OK(rval) do { \ + rval.structure_ptr = 0; \ + rval.failed_type = 0; \ + return rval; \ +} while(0) + +/* + * Type of the return value of the decoding functions (ber_decode, xer_decode) + * + * Please note that the number of consumed bytes is ALWAYS meaningful, + * even if code==RC_FAIL. This is to indicate the number of successfully + * decoded bytes, hence providing a possibility to fail with more diagnostics + * (i.e., print the offending remainder of the buffer). + */ +enum asn_dec_rval_code_e { + RC_OK, /* Decoded successfully */ + RC_WMORE, /* More data expected, call again */ + RC_FAIL /* Failure to decode data */ +}; +typedef struct asn_dec_rval_s { + enum asn_dec_rval_code_e code; /* Result code */ + size_t consumed; /* Number of bytes consumed */ +} asn_dec_rval_t; +#define ASN__DECODE_FAILED do { \ + asn_dec_rval_t tmp_error; \ + tmp_error.code = RC_FAIL; \ + tmp_error.consumed = 0; \ + ASN_DEBUG("Failed to decode element %s", td ? td->name : ""); \ + return tmp_error; \ +} while(0) +#define ASN__DECODE_STARVED do { \ + asn_dec_rval_t tmp_error; \ + tmp_error.code = RC_WMORE; \ + tmp_error.consumed = 0; \ + return tmp_error; \ +} while(0) + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_CODECS_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_codecs_prim.h b/Bouncer/e2sm_kpm/headers/asn_codecs_prim.h new file mode 100644 index 0000000..fbc5576 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_codecs_prim.h @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_CODECS_PRIM_H +#define ASN_CODECS_PRIM_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct ASN__PRIMITIVE_TYPE_s { + uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */ + size_t size; /* Size of the buffer */ +} ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ + +asn_struct_free_f ASN__PRIMITIVE_TYPE_free; +ber_type_decoder_f ber_decode_primitive; +der_type_encoder_f der_encode_primitive; + +/* + * A callback specification for the xer_decode_primitive() function below. + */ +enum xer_pbd_rval { + XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */ + XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */ + XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */ + XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */ + XPBD_BODY_CONSUMED /* Body is recognized and consumed */ +}; +typedef enum xer_pbd_rval(xer_primitive_body_decoder_f)( + const asn_TYPE_descriptor_t *td, void *struct_ptr, const void *chunk_buf, + size_t chunk_size); + +/* + * Specific function to decode simple primitive types. + * Also see xer_decode_general() in xer_decoder.h + */ +asn_dec_rval_t xer_decode_primitive( + const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, + size_t struct_size, const char *opt_mname, const void *buf_ptr, size_t size, + xer_primitive_body_decoder_f *prim_body_decoder); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_CODECS_PRIM_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_constant.h b/Bouncer/e2sm_kpm/headers/asn_constant.h new file mode 100644 index 0000000..1a26b7a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_constant.h @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + */ + +#ifndef _ASN_CONSTANT_H +#define _ASN_CONSTANT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define maxE1APid (65535) +#define maxF1APid (4) +#define maxEARFCN (65535) +#define maxNRARFCN (3279165) +#define maxnoofNrCellBands (32) +#define maxnoofCells (16384) +#define maxnoofRICStyles (63) +#define maxnoofMeasurementInfo (65535) +#define maxnoofLabelInfo (2147483647) +#define maxnoofMeasurementRecord (65535) +#define maxnoofMeasurementValue (2147483647) +#define maxnoofConditionInfo (32768) +#define maxnoofUEID (65535) + + +#ifdef __cplusplus +} +#endif + +#endif /* _ASN_CONSTANT_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_internal.h b/Bouncer/e2sm_kpm/headers/asn_internal.h new file mode 100644 index 0000000..c4105ad --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_internal.h @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Declarations internally useful for the ASN.1 support code. + */ +#ifndef ASN_INTERNAL_H +#define ASN_INTERNAL_H +#define __EXTENSIONS__ /* for Sun */ + +#include "asn_application.h" /* Application-visible API */ + +#ifndef __NO_ASSERT_H__ /* Include assert.h only for internal use. */ +#include /* for assert() macro */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Environment version might be used to avoid running with the old library */ +#define ASN1C_ENVIRONMENT_VERSION 923 /* Compile-time version */ +int get_asn1c_environment_version(void); /* Run-time version */ + +#define CALLOC(nmemb, size) calloc(nmemb, size) +#define MALLOC(size) malloc(size) +#define REALLOC(oldptr, size) realloc(oldptr, size) +#define FREEMEM(ptr) free(ptr) + +#define asn_debug_indent 0 +#define ASN_DEBUG_INDENT_ADD(i) do{}while(0) + +#ifdef EMIT_ASN_DEBUG +#warning "Use ASN_EMIT_DEBUG instead of EMIT_ASN_DEBUG" +#define ASN_EMIT_DEBUG EMIT_ASN_DEBUG +#endif + +/* + * A macro for debugging the ASN.1 internals. + * You may enable or override it. + */ +#ifndef ASN_DEBUG /* If debugging code is not defined elsewhere... */ +#if ASN_EMIT_DEBUG == 1 /* And it was asked to emit this code... */ +#if !defined(BELL_LABS) /* Bell Labs */ + //#if __STDC_VERSION__ >= 199901L +#ifdef ASN_THREAD_SAFE +/* Thread safety requires sacrifice in output indentation: + * Retain empty definition of ASN_DEBUG_INDENT_ADD. */ +#else /* !ASN_THREAD_SAFE */ +#undef ASN_DEBUG_INDENT_ADD +#undef asn_debug_indent +int asn_debug_indent; +#define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += i; } while(0) +#endif /* ASN_THREAD_SAFE */ +#if defined(BELL_LABS) /* Bell Labs version */ +extern int logAsn1c(const char *filename, int linenumber, const char *format, ...); +#define ASN_DEBUG(fmt, args...) do { \ + (void) logAsn1c(__FILE__, __LINE__, fmt, ##args); \ + } while(0) +#else +#define ASN_DEBUG(fmt, args...) do { \ + int adi = asn_debug_indent; \ + while(adi--) fprintf(stderr, " "); \ + fprintf(stderr, fmt, ##args); \ + fprintf(stderr, " (%s:%d)\n", \ + __FILE__, __LINE__); \ + } while(0) +#endif /* BELL_LABS */ +#else /* !C99 */ +void CC_PRINTFLIKE(1, 2) ASN_DEBUG_f(const char *fmt, ...); +#define ASN_DEBUG ASN_DEBUG_f +#endif /* C99 */ +#else /* ASN_EMIT_DEBUG != 1 */ +#if __STDC_VERSION__ >= 199901L +#define ASN_DEBUG(...) do{}while(0) +#else /* not C99 */ +static void CC_PRINTFLIKE(1, 2) ASN_DEBUG(const char *fmt, ...) { (void)fmt; } +#endif /* C99 or better */ +#endif /* ASN_EMIT_DEBUG */ +#endif /* ASN_DEBUG */ + +/* + * Print to a callback. + * The callback is expected to return negative values on error. + * 0 and positive values are treated as success. + * RETURN VALUES: + * -1: Failed to format or invoke the callback. + * >0: Size of the data that got delivered to the callback. + */ +ssize_t CC_PRINTFLIKE(3, 4) +asn__format_to_callback( + int (*callback)(const void *, size_t, void *key), void *key, + const char *fmt, ...); + +/* + * Invoke the application-supplied callback and fail, if something is wrong. + */ +#define ASN__E_cbc(buf, size) (cb((buf), (size), app_key) < 0) +#define ASN__E_CALLBACK(size, foo) \ + do { \ + if(foo) goto cb_failed; \ + er.encoded += (size); \ + } while(0) +#define ASN__CALLBACK(buf, size) ASN__E_CALLBACK(size, ASN__E_cbc(buf, size)) +#define ASN__CALLBACK2(buf1, size1, buf2, size2) \ + ASN__E_CALLBACK((size1) + (size2), \ + ASN__E_cbc(buf1, size1) || ASN__E_cbc(buf2, size2)) +#define ASN__CALLBACK3(buf1, size1, buf2, size2, buf3, size3) \ + ASN__E_CALLBACK((size1) + (size2) + (size3), \ + ASN__E_cbc(buf1, size1) || ASN__E_cbc(buf2, size2) \ + || ASN__E_cbc(buf3, size3)) + +#define ASN__TEXT_INDENT(nl, level) \ + do { \ + int tmp_level = (level); \ + int tmp_nl = ((nl) != 0); \ + int tmp_i; \ + if(tmp_nl) ASN__CALLBACK("\n", 1); \ + if(tmp_level < 0) tmp_level = 0; \ + for(tmp_i = 0; tmp_i < tmp_level; tmp_i++) ASN__CALLBACK(" ", 4); \ + } while(0) + +#define _i_INDENT(nl) do { \ + int tmp_i; \ + if((nl) && cb("\n", 1, app_key) < 0) \ + return -1; \ + for(tmp_i = 0; tmp_i < ilevel; tmp_i++) \ + if(cb(" ", 4, app_key) < 0) \ + return -1; \ + } while(0) + +/* + * Check stack against overflow, if limit is set. + */ +#define ASN__DEFAULT_STACK_MAX (30000) +static int CC_NOTUSED +ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { + if(ctx && ctx->max_stack_size) { + + /* ctx MUST be allocated on the stack */ + ptrdiff_t usedstack = ((const char *)ctx - (const char *)&ctx); + if(usedstack > 0) usedstack = -usedstack; /* grows up! */ + + /* double negative required to avoid int wrap-around */ + if(usedstack < -(ptrdiff_t)ctx->max_stack_size) { + ASN_DEBUG("Stack limit %ld reached", + (long)ctx->max_stack_size); + return -1; + } + } + return 0; +} + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_INTERNAL_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_ioc.h b/Bouncer/e2sm_kpm/headers/asn_ioc.h new file mode 100644 index 0000000..7de210e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_ioc.h @@ -0,0 +1,51 @@ +/* + * Run-time support for Information Object Classes. + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_IOC_H +#define ASN_IOC_H + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; +struct asn_ioc_cell_s; + +/* + * X.681, #13 + */ +typedef struct asn_ioc_set_s { + size_t rows_count; + size_t columns_count; + const struct asn_ioc_cell_s *rows; +} asn_ioc_set_t; + + +typedef struct asn_ioc_cell_s { + const char *field_name; /* Is equal to corresponding column_name */ + enum { + aioc__undefined = 0, + aioc__value, + aioc__type, + aioc__open_type, + } cell_kind; + struct asn_TYPE_descriptor_s *type_descriptor; + const void *value_sptr; + struct { + size_t types_count; + struct { + unsigned choice_position; + } *types; + } open_type; +} asn_ioc_cell_t; + + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_IOC_H */ diff --git a/Bouncer/e2sm_kpm/headers/asn_random_fill.h b/Bouncer/e2sm_kpm/headers/asn_random_fill.h new file mode 100644 index 0000000..47f9b8a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_random_fill.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_RANDOM_FILL +#define ASN_RANDOM_FILL + +/* Forward declarations */ +struct asn_TYPE_descriptor_s; +struct asn_encoding_constraints_s; + +/* + * Initialize a structure with random data according to the type specification + * and optional member constraints. + * ARGUMENTS: + * (max_length) - See (approx_max_length_limit). + * (memb_constraints) - Member constraints, if exist. + * The type can be constrained differently according + * to PER and OER specifications, so we find a value + * at the intersection of these constraints. + * In case the return differs from ARFILL_OK, the (struct_ptr) contents + * and (current_length) value remain in their original state. + */ +typedef struct asn_random_fill_result_s { + enum { + ARFILL_FAILED = -1, /* System error (memory?) */ + ARFILL_OK = 0, /* Initialization succeeded */ + ARFILL_SKIPPED = 1 /* Not done due to (length?) constraint */ + } code; + size_t length; /* Approximate number of bytes created. */ +} asn_random_fill_result_t; +typedef asn_random_fill_result_t(asn_random_fill_f)( + const struct asn_TYPE_descriptor_s *td, void **struct_ptr, + const struct asn_encoding_constraints_s *memb_constraints, + size_t max_length); + +/* + * Returns 0 if the structure was properly initialized, -1 otherwise. + * The (approx_max_length_limit) specifies the approximate limit of the + * resulting structure in units closely resembling bytes. The actual result + * might be several times larger or smaller than the length limit. + */ +int asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr, + size_t approx_max_length_limit); + +/* + * Returns a random number between min and max. + */ +intmax_t asn_random_between(intmax_t min, intmax_t max); + +#endif /* ASN_RANDOM_FILL */ diff --git a/Bouncer/e2sm_kpm/headers/asn_system.h b/Bouncer/e2sm_kpm/headers/asn_system.h new file mode 100644 index 0000000..fa8cf11 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/asn_system.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Miscellaneous system-dependent types. + */ +#ifndef ASN_SYSTEM_H +#define ASN_SYSTEM_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE 1 +#endif + +#ifndef _BSD_SOURCE +#define _BSD_SOURCE /* for snprintf() on some linux systems */ +#endif + +#include /* For snprintf(3) */ +#include /* For *alloc(3) */ +#include /* For memcpy(3) */ +#include /* For size_t */ +#include /* For LONG_MAX */ +#include /* For va_start */ +#include /* for offsetof and ptrdiff_t */ + +#ifdef _WIN32 + +#include +#define snprintf _snprintf +#define vsnprintf _vsnprintf + +/* To avoid linking with ws2_32.lib, here's the definition of ntohl() */ +#define sys_ntohl(l) ((((l) << 24) & 0xff000000) \ + | (((l) << 8) & 0xff0000) \ + | (((l) >> 8) & 0xff00) \ + | ((l >> 24) & 0xff)) + +#ifdef _MSC_VER /* MSVS.Net */ +#ifndef __cplusplus +#define inline __inline +#endif +#ifndef ASSUMESTDTYPES /* Standard types have been defined elsewhere */ +#define ssize_t SSIZE_T +#if _MSC_VER < 1600 +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#else /* _MSC_VER >= 1600 */ +#include +#endif /* _MSC_VER < 1600 */ +#endif /* ASSUMESTDTYPES */ +#define WIN32_LEAN_AND_MEAN +#include +#include +#define isnan _isnan +#define finite _finite +#define copysign _copysign +#define ilogb _logb +#else /* !_MSC_VER */ +#include +#endif /* _MSC_VER */ + +#else /* !_WIN32 */ + +#if defined(__vxworks) +#include +#else /* !defined(__vxworks) */ + +#include /* C99 specifies this file */ +#include /* for ntohl() */ +#define sys_ntohl(foo) ntohl(foo) +#endif /* defined(__vxworks) */ + +#endif /* _WIN32 */ + +#if __GNUC__ >= 3 || defined(__clang__) +#define CC_ATTRIBUTE(attr) __attribute__((attr)) +#else +#define CC_ATTRIBUTE(attr) +#endif +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(printf, fmt, var)) +#define CC_NOTUSED CC_ATTRIBUTE(unused) +#ifndef CC_ATTR_NO_SANITIZE +#define CC_ATTR_NO_SANITIZE(what) CC_ATTRIBUTE(no_sanitize(what)) +#endif + +/* Figure out if thread safety is requested */ +#if !defined(ASN_THREAD_SAFE) && (defined(THREAD_SAFE) || defined(_REENTRANT)) +#define ASN_THREAD_SAFE +#endif /* Thread safety */ + +#ifndef offsetof /* If not defined by */ +#define offsetof(s, m) ((ptrdiff_t)&(((s *)0)->m) - (ptrdiff_t)((s *)0)) +#endif /* offsetof */ + +#ifndef MIN /* Suitable for comparing primitive types (integers) */ +#if defined(__GNUC__) +#define MIN(a,b) ({ __typeof a _a = a; __typeof b _b = b; \ + ((_a)<(_b)?(_a):(_b)); }) +#else /* !__GNUC__ */ +#define MIN(a,b) ((a)<(b)?(a):(b)) /* Unsafe variant */ +#endif /* __GNUC__ */ +#endif /* MIN */ + +#if __STDC_VERSION__ >= 199901L +#ifndef SIZE_MAX +#define SIZE_MAX ((~((size_t)0)) >> 1) +#endif + +#ifndef RSIZE_MAX /* C11, Annex K */ +#define RSIZE_MAX (SIZE_MAX >> 1) +#endif +#ifndef RSSIZE_MAX /* Halve signed size even further than unsigned */ +#define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1)) +#endif +#else /* Old compiler */ +#undef SIZE_MAX +#undef RSIZE_MAX +#undef RSSIZE_MAX +#define SIZE_MAX ((~((size_t)0)) >> 1) +#define RSIZE_MAX (SIZE_MAX >> 1) +#define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1)) +#endif + +#if __STDC_VERSION__ >= 199901L +#define ASN_PRI_SIZE "zu" +#define ASN_PRI_SSIZE "zd" +#define ASN_PRIuMAX PRIuMAX +#define ASN_PRIdMAX PRIdMAX +#else +#define ASN_PRI_SIZE "lu" +#define ASN_PRI_SSIZE "ld" +#if LLONG_MAX > LONG_MAX +#define ASN_PRIuMAX "llu" +#define ASN_PRIdMAX "lld" +#else +#define ASN_PRIuMAX "lu" +#define ASN_PRIdMAX "ld" +#endif +#endif + +#endif /* ASN_SYSTEM_H */ diff --git a/Bouncer/e2sm_kpm/headers/ber_decoder.h b/Bouncer/e2sm_kpm/headers/ber_decoder.h new file mode 100644 index 0000000..1ac2a5e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ber_decoder.h @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BER_DECODER_H_ +#define _BER_DECODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ +struct asn_codec_ctx_s; /* Forward declaration */ + +/* + * The BER decoder of any type. + * This function may be invoked directly from the application. + * Decodes BER, DER and CER data (DER and CER are different subsets of BER). + * + * NOTE: Use the der_encode() function (der_encoder.h) to produce encoding + * which is compliant with ber_decode(). + */ +asn_dec_rval_t ber_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ +); + +/* + * Type of generic function which decodes the byte stream into the structure. + */ +typedef asn_dec_rval_t(ber_type_decoder_f)( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, + const void *buf_ptr, size_t size, int tag_mode); + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +/* + * Check that all tags correspond to the type definition (as given in head). + * On return, last_length would contain either a non-negative length of the + * value part of the last TLV, or the negative number of expected + * "end of content" sequences. The number may only be negative if the + * head->last_tag_form is non-zero. + */ +asn_dec_rval_t ber_check_tags( + const struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ + const struct asn_TYPE_descriptor_s *type_descriptor, + asn_struct_ctx_t *opt_ctx, /* saved decoding context */ + const void *ptr, size_t size, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {-1,0:1}: any, primitive, constr */ + ber_tlv_len_t *last_length, int *opt_tlv_form /* optional tag form */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _BER_DECODER_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/ber_tlv_length.h b/Bouncer/e2sm_kpm/headers/ber_tlv_length.h new file mode 100644 index 0000000..d1e4d48 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ber_tlv_length.h @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BER_TLV_LENGTH_H_ +#define _BER_TLV_LENGTH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ssize_t ber_tlv_len_t; + +/* + * This function tries to fetch the length of the BER TLV value and place it + * in *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + * On return with >0, len_r is constrained as -1..MAX, where -1 mean + * that the value is of indefinite length. + */ +ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, + ber_tlv_len_t *len_r); + +/* + * This function expects bufptr to be positioned over L in TLV. + * It returns number of bytes occupied by L and V together, suitable + * for skipping. The function properly handles indefinite length. + * RETURN VALUES: + * Standard {-1,0,>0} convention. + */ +ssize_t ber_skip_length( + const struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ + int _is_constructed, const void *bufptr, size_t size); + +/* + * This function serializes the length (L from TLV) in DER format. + * It always returns number of bytes necessary to represent the length, + * it is a caller's responsibility to check the return value + * against the supplied buffer's size. + */ +size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); + +#ifdef __cplusplus +} +#endif + +#endif /* _BER_TLV_LENGTH_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/ber_tlv_tag.h b/Bouncer/e2sm_kpm/headers/ber_tlv_tag.h new file mode 100644 index 0000000..ce227ad --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/ber_tlv_tag.h @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BER_TLV_TAG_H_ +#define _BER_TLV_TAG_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum asn_tag_class { + ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ + ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ + ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ + ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ +}; +typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ + +/* + * Tag class is encoded together with tag value for optimization purposes. + */ +#define BER_TAG_CLASS(tag) ((tag) & 0x3) +#define BER_TAG_VALUE(tag) ((tag) >> 2) +#define BER_TLV_CONSTRUCTED(tagptr) (((*(const uint8_t *)tagptr)&0x20)?1:0) + +#define BER_TAGS_EQUAL(tag1, tag2) ((tag1) == (tag2)) + +/* + * Several functions for printing the TAG in the canonical form + * (i.e. "[PRIVATE 0]"). + * Return values correspond to their libc counterparts (if any). + */ +ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); +ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); +char *ber_tlv_tag_string(ber_tlv_tag_t tag); + + +/* + * This function tries to fetch the tag from the input stream. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering tag. + * >0: Number of bytes used from bufptr. tag_r will contain the tag. + */ +ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); + +/* + * This function serializes the tag (T from TLV) in BER format. + * It always returns number of bytes necessary to represent the tag, + * it is a caller's responsibility to check the return value + * against the supplied buffer's size. + */ +size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); + +#ifdef __cplusplus +} +#endif + +#endif /* _BER_TLV_TAG_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/constr_CHOICE.h b/Bouncer/e2sm_kpm/headers/constr_CHOICE.h new file mode 100644 index 0000000..a1999ed --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/constr_CHOICE.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _CONSTR_CHOICE_H_ +#define _CONSTR_CHOICE_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_CHOICE_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the target structure. */ + unsigned ctx_offset; /* Offset of the asn_codec_ctx_t member */ + unsigned pres_offset; /* Identifier of the present member */ + unsigned pres_size; /* Size of the identifier (enum) */ + + /* + * Tags to members mapping table. + */ + const asn_TYPE_tag2member_t *tag2el; + unsigned tag2el_count; + + /* Canonical ordering of CHOICE elements, for PER */ + const unsigned *to_canonical_order; + const unsigned *from_canonical_order; + + /* + * Extensions-related stuff. + */ + signed ext_start; /* First member of extensions, or -1 */ +} asn_CHOICE_specifics_t; + +/* + * A set specialized functions dealing with the CHOICE type. + */ +asn_struct_free_f CHOICE_free; +asn_struct_print_f CHOICE_print; +asn_struct_compare_f CHOICE_compare; +asn_constr_check_f CHOICE_constraint; +ber_type_decoder_f CHOICE_decode_ber; +der_type_encoder_f CHOICE_encode_der; +xer_type_decoder_f CHOICE_decode_xer; +xer_type_encoder_f CHOICE_encode_xer; +oer_type_decoder_f CHOICE_decode_oer; +oer_type_encoder_f CHOICE_encode_oer; +per_type_decoder_f CHOICE_decode_uper; +per_type_encoder_f CHOICE_encode_uper; +per_type_decoder_f CHOICE_decode_aper; +per_type_encoder_f CHOICE_encode_aper; +asn_outmost_tag_f CHOICE_outmost_tag; +asn_random_fill_f CHOICE_random_fill; +extern asn_TYPE_operation_t asn_OP_CHOICE; + +/* + * Return the 1-based choice variant presence index. + * Returns 0 in case of error. + */ +unsigned CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, + const void *structure_ptr); + +/* + * Sets or resets the 1-based choice variant presence index. + * In case a previous index is not zero, the currently selected structure + * member is freed and zeroed-out first. + * Returns 0 on success and -1 on error. + */ +int CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, + void *structure_ptr, unsigned present); + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_CHOICE_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/constr_SEQUENCE.h b/Bouncer/e2sm_kpm/headers/constr_SEQUENCE.h new file mode 100644 index 0000000..a22ed3a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/constr_SEQUENCE.h @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _CONSTR_SEQUENCE_H_ +#define _CONSTR_SEQUENCE_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_SEQUENCE_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the target structure. */ + unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ + + /* + * Tags to members mapping table (sorted). + */ + const asn_TYPE_tag2member_t *tag2el; + unsigned tag2el_count; + + /* + * Optional members of the extensions root (roms) or additions (aoms). + * Meaningful for PER. + */ + const int *oms; /* Optional MemberS */ + unsigned roms_count; /* Root optional members count */ + unsigned aoms_count; /* Additions optional members count */ + + /* + * Description of an extensions group. + * Root components are clustered at the beginning of the structure, + * whereas extensions are clustered at the end. -1 means not extensible. + */ + signed first_extension; /* First extension addition */ +} asn_SEQUENCE_specifics_t; + + +/* + * A set specialized functions dealing with the SEQUENCE type. + */ +asn_struct_free_f SEQUENCE_free; +asn_struct_print_f SEQUENCE_print; +asn_struct_compare_f SEQUENCE_compare; +asn_constr_check_f SEQUENCE_constraint; +ber_type_decoder_f SEQUENCE_decode_ber; +der_type_encoder_f SEQUENCE_encode_der; +xer_type_decoder_f SEQUENCE_decode_xer; +xer_type_encoder_f SEQUENCE_encode_xer; +oer_type_decoder_f SEQUENCE_decode_oer; +oer_type_encoder_f SEQUENCE_encode_oer; +per_type_decoder_f SEQUENCE_decode_uper; +per_type_encoder_f SEQUENCE_encode_uper; +per_type_decoder_f SEQUENCE_decode_aper; +per_type_encoder_f SEQUENCE_encode_aper; +asn_random_fill_f SEQUENCE_random_fill; +extern asn_TYPE_operation_t asn_OP_SEQUENCE; + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_SEQUENCE_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/constr_SEQUENCE_OF.h b/Bouncer/e2sm_kpm/headers/constr_SEQUENCE_OF.h new file mode 100644 index 0000000..6857f0f --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/constr_SEQUENCE_OF.h @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _CONSTR_SEQUENCE_OF_H_ +#define _CONSTR_SEQUENCE_OF_H_ + +#include +#include /* Implemented using SET OF */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * A set specialized functions dealing with the SEQUENCE OF type. + * Generally implemented using SET OF. + */ +asn_struct_compare_f SEQUENCE_OF_compare; +der_type_encoder_f SEQUENCE_OF_encode_der; +xer_type_encoder_f SEQUENCE_OF_encode_xer; +per_type_encoder_f SEQUENCE_OF_encode_uper; +per_type_encoder_f SEQUENCE_OF_encode_aper; +extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF; + +#define SEQUENCE_OF_free SET_OF_free +#define SEQUENCE_OF_print SET_OF_print +#define SEQUENCE_OF_constraint SET_OF_constraint +#define SEQUENCE_OF_decode_ber SET_OF_decode_ber +#define SEQUENCE_OF_decode_xer SET_OF_decode_xer +#define SEQUENCE_OF_decode_oer SET_OF_decode_oer +#define SEQUENCE_OF_encode_oer SET_OF_encode_oer +#define SEQUENCE_OF_decode_uper SET_OF_decode_uper +#define SEQUENCE_OF_decode_aper SET_OF_decode_aper +#define SEQUENCE_OF_random_fill SET_OF_random_fill + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_SET_OF_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/constr_SET.h b/Bouncer/e2sm_kpm/headers/constr_SET.h new file mode 100644 index 0000000..d64a00f --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/constr_SET.h @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _CONSTR_SET_H_ +#define _CONSTR_SET_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct asn_SET_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the target structure. */ + unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ + unsigned pres_offset; /* Offset of _presence_map member */ + + /* + * Tags to members mapping table (sorted). + * Sometimes suitable for DER encoding (untagged CHOICE is present); + * if so, tag2el_count will be greater than td->elements_count. + */ + const asn_TYPE_tag2member_t *tag2el; + unsigned tag2el_count; + + /* + * Tags to members mapping table, second edition. + * Suitable for CANONICAL-XER encoding. + */ + const asn_TYPE_tag2member_t *tag2el_cxer; + unsigned tag2el_cxer_count; + + /* + * Extensions-related stuff. + */ + int extensible; /* Whether SET is extensible */ + const unsigned int *_mandatory_elements; /* Bitmask of mandatory ones */ +} asn_SET_specifics_t; + +/* + * A set specialized functions dealing with the SET type. + */ +asn_struct_free_f SET_free; +asn_struct_print_f SET_print; +asn_struct_compare_f SET_compare; +asn_constr_check_f SET_constraint; +ber_type_decoder_f SET_decode_ber; +der_type_encoder_f SET_encode_der; +xer_type_decoder_f SET_decode_xer; +xer_type_encoder_f SET_encode_xer; +per_type_decoder_f SET_decode_uper; +per_type_encoder_f SET_encode_uper; +asn_random_fill_f SET_random_fill; +extern asn_TYPE_operation_t asn_OP_SET; + +/*********************** + * Some handy helpers. * + ***********************/ + +/* + * Figure out whether the SET member indicated by PR_x has already been decoded. + * It is very simple bitfield test, despite its visual complexity. + */ +#define ASN_SET_ISPRESENT(set_ptr, PR_x) \ + ASN_SET_ISPRESENT2(&((set_ptr)->_presence_map), PR_x) +#define ASN_SET_ISPRESENT2(map_ptr, PR_x) \ + (((unsigned int *)(map_ptr)) \ + [(PR_x) / (8 * sizeof(unsigned int))] \ + & (1u << ((8 * sizeof(unsigned int)) - 1 \ + - ((PR_x) % (8 * sizeof(unsigned int)))))) + +#define ASN_SET_MKPRESENT(map_ptr, PR_x) \ + (((unsigned int *)(map_ptr)) \ + [(PR_x) / (8 * sizeof(unsigned int))] \ + |= (1u << ((8 * sizeof(unsigned int)) - 1 \ + - ((PR_x) % (8 * sizeof(unsigned int)))))) + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_SET_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/constr_SET_OF.h b/Bouncer/e2sm_kpm/headers/constr_SET_OF.h new file mode 100644 index 0000000..7681062 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/constr_SET_OF.h @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef CONSTR_SET_OF_H +#define CONSTR_SET_OF_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_SET_OF_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the target structure. */ + unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ + + /* XER-specific stuff */ + int as_XMLValueList; /* The member type must be encoded like this */ +} asn_SET_OF_specifics_t; + +/* + * A set specialized functions dealing with the SET OF type. + */ +asn_struct_free_f SET_OF_free; +asn_struct_print_f SET_OF_print; +asn_struct_compare_f SET_OF_compare; +asn_constr_check_f SET_OF_constraint; +ber_type_decoder_f SET_OF_decode_ber; +der_type_encoder_f SET_OF_encode_der; +xer_type_decoder_f SET_OF_decode_xer; +xer_type_encoder_f SET_OF_encode_xer; +oer_type_decoder_f SET_OF_decode_oer; +oer_type_encoder_f SET_OF_encode_oer; +per_type_decoder_f SET_OF_decode_uper; +per_type_encoder_f SET_OF_encode_uper; +per_type_decoder_f SET_OF_decode_aper; +per_type_encoder_f SET_OF_encode_aper; +asn_random_fill_f SET_OF_random_fill; +extern asn_TYPE_operation_t asn_OP_SET_OF; + +#ifdef __cplusplus +} +#endif + +#endif /* CONSTR_SET_OF_H */ diff --git a/Bouncer/e2sm_kpm/headers/constr_TYPE.h b/Bouncer/e2sm_kpm/headers/constr_TYPE.h new file mode 100644 index 0000000..d80dea5 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/constr_TYPE.h @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This file contains the declaration structure called "ASN.1 Type Definition", + * which holds all information necessary for encoding and decoding routines. + * This structure even contains pointer to these encoding and decoding routines + * for each defined ASN.1 type. + */ +#ifndef _CONSTR_TYPE_H_ +#define _CONSTR_TYPE_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ +struct asn_TYPE_member_s; /* Forward declaration */ + +/* + * This type provides the context information for various ASN.1 routines, + * primarily ones doing decoding. A member _asn_ctx of this type must be + * included into certain target language's structures, such as compound types. + */ +typedef struct asn_struct_ctx_s { + short phase; /* Decoding phase */ + short step; /* Elementary step of a phase */ + int context; /* Other context information */ + void *ptr; /* Decoder-specific stuff (stack elements) */ + ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ +} asn_struct_ctx_t; + +#include /* Basic Encoding Rules decoder */ +#include /* Distinguished Encoding Rules encoder */ +#include /* Decoder of XER (XML, text) */ +#include /* Encoder into XER (XML, text) */ +#include /* Packet Encoding Rules decoder */ +#include /* Packet Encoding Rules encoder */ +#include /* Subtype constraints support */ +#include /* Random structures support */ + +#ifdef ASN_DISABLE_OER_SUPPORT +typedef void (oer_type_decoder_f)(void); +typedef void (oer_type_encoder_f)(void); +typedef void asn_oer_constraints_t; +#else +#include /* Octet Encoding Rules encoder */ +#include /* Octet Encoding Rules encoder */ +#endif + +/* + * Free the structure according to its specification. + * Use one of ASN_STRUCT_{FREE,RESET,CONTENTS_ONLY} macros instead. + * Do not use directly. + */ +enum asn_struct_free_method { + ASFM_FREE_EVERYTHING, /* free(struct_ptr) and underlying members */ + ASFM_FREE_UNDERLYING, /* free underlying members */ + ASFM_FREE_UNDERLYING_AND_RESET /* FREE_UNDERLYING + memset(0) */ +}; +typedef void (asn_struct_free_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, enum asn_struct_free_method); + +/* + * Free the structure including freeing the memory pointed to by ptr itself. + */ +#define ASN_STRUCT_FREE(asn_DEF, ptr) \ + (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_EVERYTHING) + +/* + * Free the memory used by the members of the structure without freeing the + * the structure pointer itself. + * ZERO-OUT the structure to the safe clean state. + * (Retaining the pointer may be useful in case the structure is allocated + * statically or arranged on the stack, yet its elements are dynamic.) + */ +#define ASN_STRUCT_RESET(asn_DEF, ptr) \ + (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_UNDERLYING_AND_RESET) + +/* + * Free memory used by the members of the structure without freeing + * the structure pointer itself. + * (Retaining the pointer may be useful in case the structure is allocated + * statically or arranged on the stack, yet its elements are dynamic.) + * AVOID using it in the application code; + * Use a safer ASN_STRUCT_RESET() instead. + */ +#define ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF, ptr) \ + (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_UNDERLYING) + +/* + * Print the structure according to its specification. + */ +typedef int(asn_struct_print_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, + int level, /* Indentation level */ + asn_app_consume_bytes_f *callback, void *app_key); + +/* + * Compare two structs between each other. + * Returns <0 if struct_A is "smaller" than struct_B, >0 if "greater", + * and =0 if "equal to", for some type-specific, stable definition of + * "smaller", "greater" and "equal to". + */ +typedef int (asn_struct_compare_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_A, + const void *struct_B); + +/* + * Return the outmost tag of the type. + * If the type is untagged CHOICE, the dynamic operation is performed. + * NOTE: This function pointer type is only useful internally. + * Do not use it in your application. + */ +typedef ber_tlv_tag_t (asn_outmost_tag_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag); +/* The instance of the above function type; used internally. */ +asn_outmost_tag_f asn_TYPE_outmost_tag; + +/* + * Fetch the desired type of the Open Type based on the + * Information Object Set driven constraints. + */ +typedef struct asn_type_selector_result_s { + const struct asn_TYPE_descriptor_s *type_descriptor; /* Type encoded. */ + unsigned presence_index; /* Associated choice variant. */ +} asn_type_selector_result_t; +typedef asn_type_selector_result_t(asn_type_selector_f)( + const struct asn_TYPE_descriptor_s *parent_type_descriptor, + const void *parent_structure_ptr); + +/* + * Generalized functions for dealing with the speciic type. + * May be directly invoked by applications. + */ +typedef struct asn_TYPE_operation_s { + asn_struct_free_f *free_struct; /* Free the structure */ + asn_struct_print_f *print_struct; /* Human readable output */ + asn_struct_compare_f *compare_struct; /* Compare two structures */ + ber_type_decoder_f *ber_decoder; /* Generic BER decoder */ + der_type_encoder_f *der_encoder; /* Canonical DER encoder */ + xer_type_decoder_f *xer_decoder; /* Generic XER decoder */ + xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */ + oer_type_decoder_f *oer_decoder; /* Generic OER decoder */ + oer_type_encoder_f *oer_encoder; /* Canonical OER encoder */ + per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */ + per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */ + per_type_decoder_f *aper_decoder; /* Aligned PER decoder */ + per_type_encoder_f *aper_encoder; /* Aligned PER encoder */ + asn_random_fill_f *random_fill; /* Initialize with a random value */ + asn_outmost_tag_f *outmost_tag; /* */ +} asn_TYPE_operation_t; + +/* + * A constraints tuple specifying both the OER and PER constraints. + */ +typedef struct asn_encoding_constraints_s { + const struct asn_oer_constraints_s *oer_constraints; + const struct asn_per_constraints_s *per_constraints; + asn_constr_check_f *general_constraints; +} asn_encoding_constraints_t; + +/* + * The definitive description of the destination language's structure. + */ +typedef struct asn_TYPE_descriptor_s { + const char *name; /* A name of the ASN.1 type. "" in some cases. */ + const char *xml_tag; /* Name used in XML tag */ + + /* + * Generalized functions for dealing with the specific type. + * May be directly invoked by applications. + */ + asn_TYPE_operation_t *op; + + /*********************************************************************** + * Internally useful members. Not to be used by applications directly. * + **********************************************************************/ + + /* + * Tags that are expected to occur. + */ + const ber_tlv_tag_t *tags; /* Effective tags sequence for this type */ + unsigned tags_count; /* Number of tags which are expected */ + const ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */ + unsigned all_tags_count; /* Number of tags */ + + /* OER, PER, and general constraints */ + asn_encoding_constraints_t encoding_constraints; + + /* + * An ASN.1 production type members (members of SEQUENCE, SET, CHOICE). + */ + struct asn_TYPE_member_s *elements; + unsigned elements_count; + + /* + * Additional information describing the type, used by appropriate + * functions above. + */ + const void *specifics; +} asn_TYPE_descriptor_t; + +/* + * This type describes an element of the constructed type, + * i.e. SEQUENCE, SET, CHOICE, etc. + */ + enum asn_TYPE_flags_e { + ATF_NOFLAGS, + ATF_POINTER = 0x01, /* Represented by the pointer */ + ATF_OPEN_TYPE = 0x02, /* Open Type */ + ATF_ANY_TYPE = 0x04 /* ANY type (deprecated!) */ + }; +typedef struct asn_TYPE_member_s { + enum asn_TYPE_flags_e flags; /* Element's presentation flags */ + unsigned optional; /* Following optional members, including current */ + unsigned memb_offset; /* Offset of the element */ + ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ + int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ + asn_TYPE_descriptor_t *type; /* Member type descriptor */ + asn_type_selector_f *type_selector; /* IoS runtime type selector */ + asn_encoding_constraints_t encoding_constraints; + int (*default_value_cmp)(const void *sptr); /* Compare DEFAULT */ + int (*default_value_set)(void **sptr); /* Set DEFAULT */ + const char *name; /* ASN.1 identifier of the element */ +} asn_TYPE_member_t; + +/* + * BER tag to element number mapping. + */ +typedef struct asn_TYPE_tag2member_s { + ber_tlv_tag_t el_tag; /* Outmost tag of the member */ + unsigned el_no; /* Index of the associated member, base 0 */ + int toff_first; /* First occurence of the el_tag, relative */ + int toff_last; /* Last occurence of the el_tag, relative */ +} asn_TYPE_tag2member_t; + +/* + * This function prints out the contents of the target language's structure + * (struct_ptr) into the file pointer (stream) in human readable form. + * RETURN VALUES: + * 0: The structure is printed. + * -1: Problem dumping the structure. + * (See also xer_fprint() in xer_encoder.h) + */ +int asn_fprint(FILE *stream, /* Destination stream descriptor */ + const asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ + const void *struct_ptr); /* Structure to be printed */ + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_TYPE_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/constraints.h b/Bouncer/e2sm_kpm/headers/constraints.h new file mode 100644 index 0000000..0bd86a9 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/constraints.h @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN1_CONSTRAINTS_VALIDATOR_H +#define ASN1_CONSTRAINTS_VALIDATOR_H + +#include /* Platform-dependent types */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Validate the structure according to the ASN.1 constraints. + * If errbuf and errlen are given, they shall be pointing to the appropriate + * buffer space and its length before calling this function. Alternatively, + * they could be passed as NULL's. If constraints validation fails, + * errlen will contain the actual number of bytes taken from the errbuf + * to encode an error message (properly 0-terminated). + * + * RETURN VALUES: + * This function returns 0 in case all ASN.1 constraints are met + * and -1 if one or more constraints were failed. + */ +int asn_check_constraints( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Target language's structure */ + char *errbuf, /* Returned error description */ + size_t *errlen /* Length of the error description */ +); + + +/* + * Generic type for constraint checking callback, + * associated with every type descriptor. + */ +typedef int(asn_constr_check_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, + asn_app_constraint_failed_f *optional_callback, /* Log the error */ + void *optional_app_key /* Opaque key passed to a callback */ +); + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ +asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ + +/* + * Invoke the callback with a complete error message. + */ +#define ASN__CTFAIL if(ctfailcb) ctfailcb + +#ifdef __cplusplus +} +#endif + +#endif /* ASN1_CONSTRAINTS_VALIDATOR_H */ diff --git a/Bouncer/e2sm_kpm/headers/der_encoder.h b/Bouncer/e2sm_kpm/headers/der_encoder.h new file mode 100644 index 0000000..e93944e --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/der_encoder.h @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _DER_ENCODER_H_ +#define _DER_ENCODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * The DER encoder of any type. May be invoked by the application. + * Produces DER- and BER-compliant encoding. (DER is a subset of BER). + * + * NOTE: Use the ber_decode() function (ber_decoder.h) to decode data + * produced by der_encode(). + */ +asn_enc_rval_t der_encode(const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ +); + +/* A variant of der_encode() which encodes data into the pre-allocated buffer */ +asn_enc_rval_t der_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +); + +/* + * Type of the generic DER encoder. + */ +typedef asn_enc_rval_t(der_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + ber_tlv_tag_t tag, asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +/* + * Write out leading TL[v] sequence according to the type definition. + */ +ssize_t der_write_tags(const struct asn_TYPE_descriptor_s *type_descriptor, + size_t struct_length, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {0,!0}: prim, constructed */ + ber_tlv_tag_t tag, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key); + +#ifdef __cplusplus +} +#endif + +#endif /* _DER_ENCODER_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/oer_decoder.h b/Bouncer/e2sm_kpm/headers/oer_decoder.h new file mode 100644 index 0000000..40992e9 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/oer_decoder.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_DECODER_H +#define OER_DECODER_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ +struct asn_codec_ctx_s; /* Forward declaration */ + +/* + * The Octet Encoding Rules (OER, X.696 08/2015) decoder for any given type. + * This function may be invoked directly by the application. + * Parses CANONICAL-OER and BASIC-OER. + */ +asn_dec_rval_t oer_decode(const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ + ); + +/* + * Type of generic function which decodes the byte stream into the structure. + */ +typedef asn_dec_rval_t(oer_type_decoder_f)( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + void **struct_ptr, + const void *buf_ptr, + size_t size); + +/* + * Swallow the Open Type (X.696 (08/2015), #30) into /dev/null. + * RETURN VALUES: + * -1: Fatal error deciphering length. + * 0: More data expected than bufptr contains. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_open_type_skip(const void *bufptr, size_t size); + +/* + * Read the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, + void **struct_ptr, const void *bufptr, size_t size); + +/* + * Length-prefixed buffer decoding for primitive types. + */ +oer_type_decoder_f oer_decode_primitive; + + +#ifdef __cplusplus +} +#endif + +#endif /* OER_DECODER_H */ diff --git a/Bouncer/e2sm_kpm/headers/oer_encoder.h b/Bouncer/e2sm_kpm/headers/oer_encoder.h new file mode 100644 index 0000000..6a7b681 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/oer_encoder.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_ENCODER_H +#define OER_ENCODER_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * The Octet Encoding Rules (OER, X.696 08/2015) encoder for any type. + * This function may be invoked directly by the application. + * Produces CANONICAL-OER output compatible with CANONICAL-OER + * and BASIC-OER decoders. + */ +asn_enc_rval_t oer_encode(const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ +); + +/* A variant of oer_encode() which encodes data into the pre-allocated buffer */ +asn_enc_rval_t oer_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +); + +/* + * Type of the generic OER encoder. + */ +typedef asn_enc_rval_t(oer_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + +/* + * Write out the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * -1: Fatal error encoding the type. + * >0: Number of bytes serialized. + */ +ssize_t oer_open_type_put(const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key); + + +/* + * Length-prefixed buffer encoding for primitive types. + */ +oer_type_encoder_f oer_encode_primitive; + +#ifdef __cplusplus +} +#endif + +#endif /* OER_ENCODER_H */ diff --git a/Bouncer/e2sm_kpm/headers/oer_support.h b/Bouncer/e2sm_kpm/headers/oer_support.h new file mode 100644 index 0000000..dbc9b5f --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/oer_support.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_SUPPORT_H +#define OER_SUPPORT_H + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Pre-computed OER constraints. + */ +typedef struct asn_oer_constraint_number_s { + unsigned width; /* ±8,4,2,1 fixed bytes */ + unsigned positive; /* 1 for unsigned number, 0 for signed */ +} asn_oer_constraint_number_t; +typedef struct asn_oer_constraints_s { + asn_oer_constraint_number_t value; + ssize_t size; /* -1 (no constraint) or >= 0 */ +} asn_oer_constraints_t; + + +/* + * Fetch the length determinant (X.696 (08/2015), #8.6) into *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_fetch_length(const void *bufptr, size_t size, size_t *len_r); + +/* + * Serialize OER length. Returns the number of bytes serialized + * or -1 if a given callback returned with negative result. + */ +ssize_t oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, void *app_key); + + +#ifdef __cplusplus +} +#endif + +#endif /* OER_SUPPORT_H */ diff --git a/Bouncer/e2sm_kpm/headers/per_decoder.h b/Bouncer/e2sm_kpm/headers/per_decoder.h new file mode 100644 index 0000000..eea474a --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/per_decoder.h @@ -0,0 +1,82 @@ +/*- + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_DECODER_H_ +#define _PER_DECODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Unaligned PER decoder of a "complete encoding" as per X.691 (08/2015) #11.1. + * On success, this call always returns (.consumed >= 1), as per #11.1.3. + */ +asn_dec_rval_t uper_decode_complete( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ +); + +/* + * Unaligned PER decoder of any ASN.1 type. May be invoked by the application. + * WARNING: This call returns the number of BITS read from the stream. Beware. + */ +asn_dec_rval_t uper_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size, /* Size of the input data buffer, in bytes */ + int skip_bits, /* Number of unused leading bits, 0..7 */ + int unused_bits /* Number of unused tailing bits, 0..7 */ +); + +/* + * Aligned PER decoder of a "complete encoding" as per X.691#10.1. + * On success, this call always returns (.consumed >= 1), in BITS, as per X.691#10.1.3. + */ +asn_dec_rval_t aper_decode_complete( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ + ); + +/* + * Aligned PER decoder of any ASN.1 type. May be invoked by the application. + * WARNING: This call returns the number of BITS read from the stream. Beware. + */ +asn_dec_rval_t aper_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size, /* Size of data buffer */ + int skip_bits, /* Number of unused leading bits, 0..7 */ + int unused_bits /* Number of unused tailing bits, 0..7 */ + ); + +/* + * Type of the type-specific PER decoder function. + */ +typedef asn_dec_rval_t(per_type_decoder_f)( + const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, void **struct_ptr, + asn_per_data_t *per_data); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_DECODER_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/per_encoder.h b/Bouncer/e2sm_kpm/headers/per_encoder.h new file mode 100644 index 0000000..b615ef0 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/per_encoder.h @@ -0,0 +1,93 @@ +/*- + * Copyright (c) 2006-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_ENCODER_H_ +#define _PER_ENCODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Unaligned PER encoder of any ASN.1 type. May be invoked by the application. + * WARNING: This function returns the number of encoded bits in the .encoded + * field of the return value. Use the following formula to convert to bytes: + * bytes = ((.encoded + 7) / 8) + */ +asn_enc_rval_t uper_encode( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ + void *app_key /* Arbitrary callback argument */ +); + +asn_enc_rval_t aper_encode( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ + void *app_key /* Arbitrary callback argument */ +); + +/* + * A variant of uper_encode() which encodes data into the existing buffer + * WARNING: This function returns the number of encoded bits in the .encoded + * field of the return value. + */ +asn_enc_rval_t uper_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (max) */ +); + +asn_enc_rval_t aper_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (max) */ +); +/* + * A variant of uper_encode_to_buffer() which allocates buffer itself. + * Returns the number of bytes in the buffer or -1 in case of failure. + * WARNING: This function produces a "Production of the complete encoding", + * with length of at least one octet. Contrast this to precise bit-packing + * encoding of uper_encode() and uper_encode_to_buffer(). + */ +ssize_t uper_encode_to_new_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void **buffer_r /* Buffer allocated and returned */ +); + +ssize_t +aper_encode_to_new_buffer( + const struct asn_TYPE_descriptor_s *td, + const asn_per_constraints_t *constraints, + const void *sptr, + void **buffer_r +); + +/* + * Type of the generic PER encoder function. + */ +typedef asn_enc_rval_t(per_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, const void *struct_ptr, + asn_per_outp_t *per_output); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_ENCODER_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/per_opentype.h b/Bouncer/e2sm_kpm/headers/per_opentype.h new file mode 100644 index 0000000..1493b2d --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/per_opentype.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2007-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_OPENTYPE_H_ +#define _PER_OPENTYPE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +asn_dec_rval_t uper_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd); + +int uper_open_type_skip(const asn_codec_ctx_t *opt_codec_ctx, + asn_per_data_t *pd); + +/* + * X.691 (2015/08), #11.2 + * Returns -1 if error is encountered. 0 if all OK. + */ +int uper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po); + +asn_dec_rval_t aper_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd); + + +int aper_open_type_skip(const asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); + +int aper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_OPENTYPE_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/per_support.h b/Bouncer/e2sm_kpm/headers/per_support.h new file mode 100644 index 0000000..23079c9 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/per_support.h @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_SUPPORT_H_ +#define _PER_SUPPORT_H_ + +#include /* Platform-specific types */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Pre-computed PER constraints. + */ +typedef struct asn_per_constraint_s { + enum asn_per_constraint_flags { + APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */ + APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */ + APC_CONSTRAINED = 0x2, /* Fully constrained */ + APC_EXTENSIBLE = 0x4 /* May have extension */ + } flags; + int range_bits; /* Full number of bits in the range */ + int effective_bits; /* Effective bits */ + long lower_bound; /* "lb" value */ + long upper_bound; /* "ub" value */ +} asn_per_constraint_t; +typedef struct asn_per_constraints_s { + asn_per_constraint_t value; + asn_per_constraint_t size; + int (*value2code)(unsigned int value); + int (*code2value)(unsigned int code); +} asn_per_constraints_t; + +/* Temporary compatibility layer. Will get removed. */ +typedef struct asn_bit_data_s asn_per_data_t; +#define per_get_few_bits(data, bits) asn_get_few_bits(data, bits) +#define per_get_undo(data, bits) asn_get_undo(data, bits) +#define per_get_many_bits(data, dst, align, bits) \ + asn_get_many_bits(data, dst, align, bits) + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Get the length "n" from the Unaligned PER stream. + */ +ssize_t uper_get_length(asn_per_data_t *pd, int effective_bound_bits, + size_t lower_bound, int *repeat); + +ssize_t aper_get_length(asn_per_data_t *pd, int range, + int effective_bound_bits, int *repeat); + +/* + * Get the normally small length "n". + */ +ssize_t uper_get_nslength(asn_per_data_t *pd); +ssize_t aper_get_nslength(asn_per_data_t *pd); + +/* + * Get the normally small non-negative whole number. + */ +ssize_t uper_get_nsnnwn(asn_per_data_t *pd); +ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range); + +/* X.691-2008/11, #11.5.6 */ +int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *v, int nbits); + + +/* Temporary compatibility layer. Will get removed. */ +typedef struct asn_bit_outp_s asn_per_outp_t; +#define per_put_few_bits(out, bits, obits) asn_put_few_bits(out, bits, obits) +#define per_put_many_bits(out, src, nbits) asn_put_many_bits(out, src, nbits) +#define per_put_aligned_flush(out) asn_put_aligned_flush(out) + + +/* + * Rebase the given value as an offset into the range specified by the + * lower bound (lb) and upper bound (ub). + * RETURN VALUES: + * -1: Conversion failed due to range problems. + * 0: Conversion was successful. + */ +int per_long_range_rebase(long v, long lb, long ub, unsigned long *output); +/* The inverse operation: restores the value by the offset and its bounds. */ +int per_long_range_unrebase(unsigned long inp, long lb, long ub, long *outp); + +/* X.691-2008/11, #11.5 */ +int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits); + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Put the length "whole_length" to the Unaligned PER stream. + * If (opt_need_eom) is given, it will be set to 1 if final 0-length is needed. + * In that case, invoke uper_put_length(po, 0, 0) after encoding the last block. + * This function returns the number of units which may be flushed + * in the next units saving iteration. + */ +ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length, + int *opt_need_eom); + +ssize_t aper_put_length(asn_per_outp_t *po, int range, size_t length); + +/* Align the current bit position to octet bundary */ +int aper_put_align(asn_per_outp_t *po); +int32_t aper_get_align(asn_per_data_t *pd); + +/* + * Put the normally small length "n" to the Unaligned PER stream. + * Returns 0 or -1. + */ +int uper_put_nslength(asn_per_outp_t *po, size_t length); + +int aper_put_nslength(asn_per_outp_t *po, size_t length); + +/* + * Put the normally small non-negative whole number. + */ +int uper_put_nsnnwn(asn_per_outp_t *po, int n); + +int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_SUPPORT_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/xer_decoder.h b/Bouncer/e2sm_kpm/headers/xer_decoder.h new file mode 100644 index 0000000..b951c41 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/xer_decoder.h @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _XER_DECODER_H_ +#define _XER_DECODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * The XER decoder of any ASN.1 type. May be invoked by the application. + * Decodes CANONICAL-XER and BASIC-XER. + */ +asn_dec_rval_t xer_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ +); + +/* + * Type of the type-specific XER decoder function. + */ +typedef asn_dec_rval_t(xer_type_decoder_f)( + const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, + const char *opt_mname, /* Member name */ + const void *buf_ptr, size_t size); + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +/* + * Generalized function for decoding the primitive values. + * Used by more specialized functions, such as OCTET_STRING_decode_xer_utf8 + * and others. This function should not be used by applications, as its API + * is subject to changes. + */ +asn_dec_rval_t xer_decode_general( + const asn_codec_ctx_t *opt_codec_ctx, + asn_struct_ctx_t *ctx, /* Type decoder context */ + void *struct_key, /* Treated as opaque pointer */ + const char *xml_tag, /* Expected XML tag name */ + const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder)(void *struct_key, const void *chunk_buf, + size_t chunk_size), + ssize_t (*body_receiver)(void *struct_key, const void *chunk_buf, + size_t chunk_size, int have_more)); + + +/* + * Fetch the next XER (XML) token from the stream. + * The function returns the number of bytes occupied by the chunk type, + * returned in the _ch_type. The _ch_type is only set (and valid) when + * the return value is >= 0. + */ + typedef enum pxer_chunk_type { + PXER_WMORE, /* Chunk type is not clear, more data expected. */ + PXER_TAG, /* Complete XER tag */ + PXER_TEXT, /* Plain text between XER tags */ + PXER_COMMENT /* A comment, may be part of */ + } pxer_chunk_type_e; +ssize_t xer_next_token(int *stateContext, + const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); + +/* + * This function checks the buffer against the tag name is expected to occur. + */ + typedef enum xer_check_tag { + XCT_BROKEN = 0, /* The tag is broken */ + XCT_OPENING = 1, /* This is the tag */ + XCT_CLOSING = 2, /* This is the tag */ + XCT_BOTH = 3, /* This is the tag */ + XCT__UNK__MASK = 4, /* Mask of everything unexpected */ + XCT_UNKNOWN_OP = 5, /* Unexpected tag */ + XCT_UNKNOWN_CL = 6, /* Unexpected tag */ + XCT_UNKNOWN_BO = 7 /* Unexpected tag */ + } xer_check_tag_e; +xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, + const char *need_tag); + +/* + * Get the number of bytes consisting entirely of XER whitespace characters. + * RETURN VALUES: + * >=0: Number of whitespace characters in the string. + */ +size_t xer_whitespace_span(const void *chunk_buf, size_t chunk_size); + +/* + * Skip the series of anticipated extensions. + */ +int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); + +#ifdef __cplusplus +} +#endif + +#endif /* _XER_DECODER_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/xer_encoder.h b/Bouncer/e2sm_kpm/headers/xer_encoder.h new file mode 100644 index 0000000..9d75922 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/xer_encoder.h @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _XER_ENCODER_H_ +#define _XER_ENCODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ +enum xer_encoder_flags_e { + /* Mode of encoding */ + XER_F_BASIC = 0x01, /* BASIC-XER (pretty-printing) */ + XER_F_CANONICAL = 0x02 /* Canonical XER (strict rules) */ +}; + +/* + * The XER encoder of any type. May be invoked by the application. + * Produces CANONICAL-XER and BASIC-XER depending on the (xer_flags). + */ +asn_enc_rval_t xer_encode(const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ +); + +/* + * The variant of the above function which dumps the BASIC-XER (XER_F_BASIC) + * output into the chosen file pointer. + * RETURN VALUES: + * 0: The structure is printed. + * -1: Problem printing the structure. + * WARNING: No sensible errno value is returned. + */ +int xer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td, + const void *struct_ptr); + +/* + * A helper function that uses XER encoding/decoding to verify that: + * - Both structures encode into the same BASIC XER. + * - Both resulting XER byte streams can be decoded back. + * - Both decoded structures encode into the same BASIC XER (round-trip). + * All of this verifies equivalence between structures and a round-trip. + * ARGUMENTS: + * (opt_debug_stream) - If specified, prints ongoing details. + */ +enum xer_equivalence_e { + XEQ_SUCCESS, /* The only completely positive return value */ + XEQ_FAILURE, /* General failure */ + XEQ_ENCODE1_FAILED, /* First sructure XER encoding failed */ + XEQ_ENCODE2_FAILED, /* Second structure XER encoding failed */ + XEQ_DIFFERENT, /* Structures encoded into different XER */ + XEQ_DECODE_FAILED, /* Decode of the XER data failed */ + XEQ_ROUND_TRIP_FAILED /* Bad round-trip */ +}; +enum xer_equivalence_e xer_equivalent( + const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct1, + const void *struct2, FILE *opt_debug_stream); + +/* + * Type of the generic XER encoder. + */ +typedef asn_enc_rval_t(xer_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + int ilevel, /* Level of indentation */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _XER_ENCODER_H_ */ diff --git a/Bouncer/e2sm_kpm/headers/xer_support.h b/Bouncer/e2sm_kpm/headers/xer_support.h new file mode 100644 index 0000000..c3a36e7 --- /dev/null +++ b/Bouncer/e2sm_kpm/headers/xer_support.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2003, 2004 X/IO Labs, xiolabs.com. + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _XER_SUPPORT_H_ +#define _XER_SUPPORT_H_ + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Types of data transferred to the application. + */ +typedef enum { + PXML_TEXT, /* Plain text between XML tags. */ + PXML_TAG, /* A tag, starting with '<'. */ + PXML_COMMENT, /* An XML comment, including "". */ + /* + * The following chunk types are reported if the chunk + * terminates the specified XML element. + */ + PXML_TAG_END, /* Tag ended */ + PXML_COMMENT_END /* Comment ended */ +} pxml_chunk_type_e; + +/* + * Callback function that is called by the parser when parsed data is + * available. The _opaque is the pointer to a field containing opaque user + * data specified in pxml_create() call. The chunk type is _type and the text + * data is the piece of buffer identified by _bufid (as supplied to + * pxml_feed() call) starting at offset _offset and of _size bytes size. + * The chunk is NOT '\0'-terminated. + */ +typedef int (pxml_callback_f)(pxml_chunk_type_e _type, + const void *_chunk_data, size_t _chunk_size, void *_key); + +/* + * Parse the given buffer as it were a chunk of XML data. + * Invoke the specified callback each time the meaninful data is found. + * This function returns number of bytes consumed from the bufer. + * It will always be lesser than or equal to the specified _size. + * The next invocation of this function must account the difference. + */ +ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, + pxml_callback_f *cb, void *_key); + +#ifdef __cplusplus +} +#endif + +#endif /* _XER_SUPPORT_H_ */ diff --git a/Bouncer/e2sm_kpm/lib/AMF-UE-NGAP-ID.c b/Bouncer/e2sm_kpm/lib/AMF-UE-NGAP-ID.c new file mode 100644 index 0000000..13fe8aa --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/AMF-UE-NGAP-ID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "AMF-UE-NGAP-ID.h" + +int +AMF_UE_NGAP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 1099511627775)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_AMF_UE_NGAP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 40, -1, 0, 1099511627775 } /* (0..1099511627775) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMF_UE_NGAP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMF_UE_NGAP_ID = { + "AMF-UE-NGAP-ID", + "AMF-UE-NGAP-ID", + &asn_OP_INTEGER, + asn_DEF_AMF_UE_NGAP_ID_tags_1, + sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1) + /sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1[0]), /* 1 */ + asn_DEF_AMF_UE_NGAP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1) + /sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_AMF_UE_NGAP_ID_constr_1, AMF_UE_NGAP_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/AMFPointer.c b/Bouncer/e2sm_kpm/lib/AMFPointer.c new file mode 100644 index 0000000..99212c4 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/AMFPointer.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "AMFPointer.h" + +int +AMFPointer_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 6)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_AMFPointer_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 6, 6 } /* (SIZE(6..6)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMFPointer_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMFPointer = { + "AMFPointer", + "AMFPointer", + &asn_OP_BIT_STRING, + asn_DEF_AMFPointer_tags_1, + sizeof(asn_DEF_AMFPointer_tags_1) + /sizeof(asn_DEF_AMFPointer_tags_1[0]), /* 1 */ + asn_DEF_AMFPointer_tags_1, /* Same as above */ + sizeof(asn_DEF_AMFPointer_tags_1) + /sizeof(asn_DEF_AMFPointer_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_AMFPointer_constr_1, AMFPointer_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/AMFRegionID.c b/Bouncer/e2sm_kpm/lib/AMFRegionID.c new file mode 100644 index 0000000..94e19ba --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/AMFRegionID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "AMFRegionID.h" + +int +AMFRegionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 8)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_AMFRegionID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMFRegionID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMFRegionID = { + "AMFRegionID", + "AMFRegionID", + &asn_OP_BIT_STRING, + asn_DEF_AMFRegionID_tags_1, + sizeof(asn_DEF_AMFRegionID_tags_1) + /sizeof(asn_DEF_AMFRegionID_tags_1[0]), /* 1 */ + asn_DEF_AMFRegionID_tags_1, /* Same as above */ + sizeof(asn_DEF_AMFRegionID_tags_1) + /sizeof(asn_DEF_AMFRegionID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_AMFRegionID_constr_1, AMFRegionID_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/AMFSetID.c b/Bouncer/e2sm_kpm/lib/AMFSetID.c new file mode 100644 index 0000000..f56a4c5 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/AMFSetID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "AMFSetID.h" + +int +AMFSetID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 10)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_AMFSetID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 10, 10 } /* (SIZE(10..10)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMFSetID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMFSetID = { + "AMFSetID", + "AMFSetID", + &asn_OP_BIT_STRING, + asn_DEF_AMFSetID_tags_1, + sizeof(asn_DEF_AMFSetID_tags_1) + /sizeof(asn_DEF_AMFSetID_tags_1[0]), /* 1 */ + asn_DEF_AMFSetID_tags_1, /* Same as above */ + sizeof(asn_DEF_AMFSetID_tags_1) + /sizeof(asn_DEF_AMFSetID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_AMFSetID_constr_1, AMFSetID_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ANY.c b/Bouncer/e2sm_kpm/lib/ANY.c new file mode 100644 index 0000000..0b81557 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ANY.c @@ -0,0 +1,450 @@ +/* + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = { + sizeof(ANY_t), + offsetof(ANY_t, _asn_ctx), + ASN_OSUBV_ANY +}; +asn_TYPE_operation_t asn_OP_ANY = { + OCTET_STRING_free, + OCTET_STRING_print, + OCTET_STRING_compare, + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + ANY_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + 0, + 0, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, 0, 0, 0, +#else + ANY_decode_uper, + ANY_encode_uper, + ANY_decode_aper, + ANY_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + 0, /* Random fill is not defined for ANY type */ + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_ANY = { + "ANY", + "ANY", + &asn_OP_ANY, + 0, 0, 0, 0, + { 0, 0, asn_generic_no_constraint }, /* No constraints */ + 0, 0, /* No members */ + &asn_SPC_ANY_specs, +}; + +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +asn_enc_rval_t +ANY_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + if(flags & XER_F_CANONICAL) { + /* + * Canonical XER-encoding of ANY type is not supported. + */ + ASN__ENCODE_FAILED; + } + + /* Dump as binary */ + return OCTET_STRING_encode_xer(td, sptr, ilevel, flags, cb, app_key); +} + +struct _callback_arg { + uint8_t *buffer; + size_t offset; + size_t size; +}; + +static int ANY__consume_bytes(const void *buffer, size_t size, void *key); + +int +ANY_fromType(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) { + struct _callback_arg arg; + asn_enc_rval_t erval = {0,0,0}; + + if(!st || !td) { + errno = EINVAL; + return -1; + } + + if(!sptr) { + if(st->buf) FREEMEM(st->buf); + st->size = 0; + return 0; + } + + arg.offset = arg.size = 0; + arg.buffer = 0; + + erval = der_encode(td, sptr, ANY__consume_bytes, &arg); + if(erval.encoded == -1) { + if(arg.buffer) FREEMEM(arg.buffer); + return -1; + } + assert((size_t)erval.encoded == arg.offset); + + if(st->buf) FREEMEM(st->buf); + st->buf = arg.buffer; + st->size = arg.offset; + + return 0; +} + +int +ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) { + uint8_t *buffer = NULL; + ssize_t erval; + + if(!st || !td) { + errno = EINVAL; + return -1; + } + + if(!sptr) { + if(st->buf) FREEMEM(st->buf); + st->size = 0; + return 0; + } + + erval = aper_encode_to_new_buffer(td, td->encoding_constraints.per_constraints, sptr, (void**)&buffer); + + if(erval == -1) { + if(buffer) FREEMEM(buffer); + return -1; + } + assert((size_t)erval > 0); + + if(st->buf) FREEMEM(st->buf); + st->buf = buffer; + st->size = erval; + + return 0; +} + +ANY_t * +ANY_new_fromType(asn_TYPE_descriptor_t *td, void *sptr) { + ANY_t tmp; + ANY_t *st; + + if(!td || !sptr) { + errno = EINVAL; + return 0; + } + + memset(&tmp, 0, sizeof(tmp)); + + if(ANY_fromType(&tmp, td, sptr)) return 0; + + st = (ANY_t *)CALLOC(1, sizeof(ANY_t)); + if(st) { + *st = tmp; + return st; + } else { + FREEMEM(tmp.buf); + return 0; + } +} + +ANY_t * +ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr) { + ANY_t tmp; + ANY_t *st; + + if(!td || !sptr) { + errno = EINVAL; + return 0; + } + + memset(&tmp, 0, sizeof(tmp)); + + if(ANY_fromType_aper(&tmp, td, sptr)) return 0; + + st = (ANY_t *)CALLOC(1, sizeof(ANY_t)); + if(st) { + *st = tmp; + return st; + } else { + FREEMEM(tmp.buf); + return 0; + } +} + +int +ANY_to_type(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) { + asn_dec_rval_t rval; + void *newst = 0; + + if(!st || !td || !struct_ptr) { + errno = EINVAL; + return -1; + } + + if(st->buf == 0) { + /* Nothing to convert, make it empty. */ + *struct_ptr = (void *)0; + return 0; + } + + rval = ber_decode(0, td, (void **)&newst, st->buf, st->size); + if(rval.code == RC_OK) { + *struct_ptr = newst; + return 0; + } else { + /* Remove possibly partially decoded data. */ + ASN_STRUCT_FREE(*td, newst); + return -1; + } +} + +int +ANY_to_type_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) { + asn_dec_rval_t rval; + void *newst = 0; + + if(!st || !td || !struct_ptr) { + errno = EINVAL; + return -1; + } + + if(st->buf == 0) { + /* Nothing to convert, make it empty. */ + *struct_ptr = (void *)0; + return 0; + } + + rval = aper_decode(0, td, (void **)&newst, st->buf, st->size, 0, 0); + if(rval.code == RC_OK) { + *struct_ptr = newst; + return 0; + } else { + /* Remove possibly partially decoded data. */ + ASN_STRUCT_FREE(*td, newst); + return -1; + } +} + +static int ANY__consume_bytes(const void *buffer, size_t size, void *key) { + struct _callback_arg *arg = (struct _callback_arg *)key; + + if((arg->offset + size) >= arg->size) { + size_t nsize = (arg->size ? arg->size << 2 : 16) + size; + void *p = REALLOC(arg->buffer, nsize); + if(!p) return -1; + arg->buffer = (uint8_t *)p; + arg->size = nsize; + } + + memcpy(arg->buffer + arg->offset, buffer, size); + arg->offset += size; + assert(arg->offset < arg->size); + + return 0; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +ANY_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_ANY_specs; + size_t consumed_myself = 0; + int repeat; + ANY_t *st = (ANY_t *)*sptr; + + (void)opt_codec_ctx; + (void)constraints; + + /* + * Allocate the structure. + */ + if(!st) { + st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("UPER Decoding ANY type"); + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + ssize_t len_bits; + void *p; + int ret; + + /* Get the PER length */ + raw_len = uper_get_length(pd, -1, 0, &repeat); + if(raw_len < 0) RETURN(RC_WMORE); + if(raw_len == 0 && st->buf) break; + + ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len, + repeat ? "repeat" : "once", td->name); + len_bytes = raw_len; + len_bits = len_bytes * 8; + + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += len_bits; + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + RETURN(RC_OK); +} + +asn_enc_rval_t +ANY_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const ANY_t *st = (const ANY_t *)sptr; + asn_enc_rval_t er = {0, 0, 0}; + const uint8_t *buf; + size_t size; + int ret; + + (void)constraints; + + if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; + + buf = st->buf; + size = st->size; + do { + int need_eom = 0; + ssize_t may_save = uper_put_length(po, size, &need_eom); + if(may_save < 0) ASN__ENCODE_FAILED; + + ret = per_put_many_bits(po, buf, may_save * 8); + if(ret) ASN__ENCODE_FAILED; + + buf += may_save; + size -= may_save; + assert(!(may_save & 0x07) || !size); + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size); + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +ANY_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_ANY_specs; + size_t consumed_myself = 0; + int repeat; + ANY_t *st = (ANY_t *)*sptr; + + (void)opt_codec_ctx; + (void)constraints; + + /* + * Allocate the structure. + */ + if(!st) { + st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("APER Decoding ANY type"); + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + ssize_t len_bits; + void *p; + int ret; + + /* Get the PER length */ + raw_len = aper_get_length(pd, -1, 0, &repeat); + if(raw_len < 0) RETURN(RC_WMORE); + if(raw_len == 0 && st->buf) break; + + ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len, + repeat ? "repeat" : "once", td->name); + len_bytes = raw_len; + len_bits = len_bytes * 8; + + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += len_bits; + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + RETURN(RC_OK); +} + +asn_enc_rval_t +ANY_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const ANY_t *st = (const ANY_t *)sptr; + asn_enc_rval_t er = {0, 0, 0}; + const uint8_t *buf; + size_t size; + int ret; + + (void)constraints; + + if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; + + buf = st->buf; + size = st->size; + do { + int need_eom = 0; + ssize_t may_save = uper_put_length(po, size, &need_eom); + if(may_save < 0) ASN__ENCODE_FAILED; + + ret = per_put_many_bits(po, buf, may_save * 8); + if(ret) ASN__ENCODE_FAILED; + + buf += may_save; + size -= may_save; + assert(!(may_save & 0x07) || !size); + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size); + + ASN__ENCODED_OK(er); +} +#endif /* ASN_DISABLE_PER_SUPPORT */ + diff --git a/Bouncer/e2sm_kpm/lib/BIT_STRING.c b/Bouncer/e2sm_kpm/lib/BIT_STRING.c new file mode 100644 index 0000000..e8d7354 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/BIT_STRING.c @@ -0,0 +1,656 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * BIT STRING basic type description. + */ +static const ber_tlv_tag_t asn_DEF_BIT_STRING_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs = { + sizeof(BIT_STRING_t), + offsetof(BIT_STRING_t, _asn_ctx), + ASN_OSUBV_BIT +}; +asn_TYPE_operation_t asn_OP_BIT_STRING = { + OCTET_STRING_free, /* Implemented in terms of OCTET STRING */ + BIT_STRING_print, + BIT_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_decode_xer_binary, + BIT_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + BIT_STRING_decode_oer, + BIT_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + BIT_STRING_decode_uper, /* Unaligned PER decoder */ + BIT_STRING_encode_uper, /* Unaligned PER encoder */ + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + BIT_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_BIT_STRING = { + "BIT STRING", + "BIT_STRING", + &asn_OP_BIT_STRING, + asn_DEF_BIT_STRING_tags, + sizeof(asn_DEF_BIT_STRING_tags) + / sizeof(asn_DEF_BIT_STRING_tags[0]), + asn_DEF_BIT_STRING_tags, /* Same as above */ + sizeof(asn_DEF_BIT_STRING_tags) + / sizeof(asn_DEF_BIT_STRING_tags[0]), + { 0, 0, BIT_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs +}; + +/* + * BIT STRING generic constraint. + */ +int +BIT_STRING_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + + if(st && st->buf) { + if((st->size == 0 && st->bits_unused) + || st->bits_unused < 0 || st->bits_unused > 7) { + ASN__CTFAIL(app_key, td, sptr, + "%s: invalid padding byte (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + return 0; +} + +static const char *_bit_pattern[16] = { + "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", + "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" +}; + +asn_enc_rval_t +BIT_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + char scratch[128]; + char *p = scratch; + char *scend = scratch + (sizeof(scratch) - 10); + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + int xcan = (flags & XER_F_CANONICAL); + uint8_t *buf; + uint8_t *end; + + if(!st || !st->buf) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + buf = st->buf; + end = buf + st->size - 1; /* Last byte is special */ + + /* + * Binary dump + */ + for(; buf < end; buf++) { + int v = *buf; + int nline = xcan?0:(((buf - st->buf) % 8) == 0); + if(p >= scend || nline) { + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + if(nline) ASN__TEXT_INDENT(1, ilevel); + } + memcpy(p + 0, _bit_pattern[v >> 4], 4); + memcpy(p + 4, _bit_pattern[v & 0x0f], 4); + p += 8; + } + + if(!xcan && ((buf - st->buf) % 8) == 0) + ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + + if(buf == end) { + int v = *buf; + int ubits = st->bits_unused; + int i; + for(i = 7; i >= ubits; i--) + *p++ = (v & (1 << i)) ? 0x31 : 0x30; + ASN__CALLBACK(scratch, p - scratch); + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + + +/* + * BIT STRING specific contents printer. + */ +int +BIT_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + char scratch[64]; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + uint8_t *buf; + uint8_t *end; + char *p = scratch; + + (void)td; /* Unused argument */ + + if(!st || !st->buf) + return (cb("", 8, app_key) < 0) ? -1 : 0; + + ilevel++; + buf = st->buf; + end = buf + st->size; + + /* + * Hexadecimal dump. + */ + for(; buf < end; buf++) { + if((buf - st->buf) % 16 == 0 && (st->size > 16) + && buf != st->buf) { + _i_INDENT(1); + /* Dump the string */ + if(cb(scratch, p - scratch, app_key) < 0) return -1; + p = scratch; + } + *p++ = h2c[*buf >> 4]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + + if(p > scratch) { + p--; /* Eat the tailing space */ + + if((st->size > 16)) { + _i_INDENT(1); + } + + /* Dump the incomplete 16-bytes row */ + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + } + + if(st->bits_unused) { + int ret = snprintf(scratch, sizeof(scratch), " (%d bit%s unused)", + st->bits_unused, st->bits_unused == 1 ? "" : "s"); + assert(ret > 0 && ret < (ssize_t)sizeof(scratch)); + if(ret > 0 && ret < (ssize_t)sizeof(scratch) + && cb(scratch, ret, app_key) < 0) + return -1; + } + + return 0; +} + +/* + * Non-destructively remove the trailing 0-bits from the given bit string. + */ +static const BIT_STRING_t * +BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp) { + const uint8_t *b; + union { + const uint8_t *c_buf; + uint8_t *nc_buf; + } unconst; + + if(st->size == 0) { + assert(st->bits_unused == 0); + return st; + } else { + for(b = &st->buf[st->size - 1]; b > st->buf && *b == 0; b--) { + ; + } + /* b points to the last byte which may contain data */ + if(*b) { + int unused = 7; + uint8_t v = *b; + v &= -(int8_t)v; + if(v & 0x0F) unused -= 4; + if(v & 0x33) unused -= 2; + if(v & 0x55) unused -= 1; + tmp->size = b-st->buf + 1; + tmp->bits_unused = unused; + } else { + tmp->size = b-st->buf; + tmp->bits_unused = 0; + } + + assert(b >= st->buf); + } + + unconst.c_buf = st->buf; + tmp->buf = unconst.nc_buf; + return tmp; +} + +/* + * Lexicographically compare the common prefix of both strings, + * and if it is the same return -1 for the smallest string. + */ +int +BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + /* + * Remove information about trailing bits, since + * X.680 (08/2015) #22.7 "ensure that different semantics are not" + * "associated with [values that differ only in] the trailing 0 bits." + */ + BIT_STRING_t compact_a, compact_b; + const BIT_STRING_t *a = BIT_STRING__compactify(aptr, &compact_a); + const BIT_STRING_t *b = BIT_STRING__compactify(bptr, &compact_b); + const asn_OCTET_STRING_specifics_t *specs = td->specifics; + + assert(specs && specs->subvariant == ASN_OSUBV_BIT); + + if(a && b) { + size_t common_prefix_size = a->size <= b->size ? a->size : b->size; + int ret = memcmp(a->buf, b->buf, common_prefix_size); + if(ret == 0) { + /* Figure out which string with equal prefixes is longer. */ + if(a->size < b->size) { + return -1; + } else if(a->size > b->size) { + return 1; + } else { + /* Figure out how many unused bits */ + if(a->bits_unused > b->bits_unused) { + return -1; + } else if(a->bits_unused < b->bits_unused) { + return 1; + } else { + return 0; + } + } + } else { + return ret; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +static asn_per_constraint_t asn_DEF_BIT_STRING_constraint_size = { + APC_SEMI_CONSTRAINED, -1, -1, 0, 0}; + +asn_dec_rval_t +BIT_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_BIT_STRING_specs; + const asn_per_constraints_t *pc = + constraints ? constraints : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + + (void)opt_codec_ctx; + + if(pc) { + csiz = &pc->size; + } else { + csiz = &asn_DEF_BIT_STRING_constraint_size; + } + + if(specs->subvariant != ASN_OSUBV_BIT) { + ASN_DEBUG("Subvariant %d is not BIT OSUBV_BIT", specs->subvariant); + RETURN(RC_FAIL); + } + + /* + * Allocate the string. + */ + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_BIT_STRING_constraint_size; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + st->size = (csiz->upper_bound + 7) >> 3; + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + ASN_DEBUG("Encoding BIT STRING size %ld", csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, csiz->upper_bound); + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += csiz->upper_bound; + st->buf[st->size] = 0; + st->bits_unused = (8 - (csiz->upper_bound & 0x7)) & 0x7; + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + ssize_t len_bits; + void *p; + int ret; + + /* Get the PER length */ + raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, + &repeat); + if(raw_len < 0) RETURN(RC_WMORE); + if(raw_len == 0 && st->buf) break; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + len_bits = raw_len; + len_bytes = (len_bits + 7) >> 3; + if(len_bits & 0x7) st->bits_unused = 8 - (len_bits & 0x7); + /* len_bits be multiple of 16K if repeat is set */ + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +BIT_STRING_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_BIT_STRING_specs; + const asn_per_constraints_t *pc = + constraints ? constraints : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *csiz; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + BIT_STRING_t compact_bstr; /* Do not modify this directly! */ + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + size_t size_in_bits; + const uint8_t *buf; + int ret; + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(specs->subvariant == ASN_OSUBV_BIT) { + if((st->size == 0 && st->bits_unused) || (st->bits_unused & ~7)) + ASN__ENCODE_FAILED; + } else { + ASN__ENCODE_FAILED; + } + + if(pc) { + csiz = &pc->size; + } else { + csiz = &asn_DEF_BIT_STRING_constraint_size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + /* Figure out the size without the trailing bits */ + st = BIT_STRING__compactify(st, &compact_bstr); + size_in_bits = 8 * st->size - st->bits_unused; + + ASN_DEBUG( + "Encoding %s into %" ASN_PRI_SIZE " bits" + " (%ld..%ld, effective %d)%s", + td->name, size_in_bits, csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out whether size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((ssize_t)size_in_bits > csiz->upper_bound) { + if(ct_extensible) { + csiz = &asn_DEF_BIT_STRING_constraint_size; + inext = 1; + } else { + ASN__ENCODE_FAILED; + } + } + } else { + inext = 0; + } + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + if(csiz->effective_bits >= 0 && !inext) { + int add_trailer = (ssize_t)size_in_bits < csiz->lower_bound; + ASN_DEBUG( + "Encoding %" ASN_PRI_SIZE " bytes (%ld), length (in %d bits) trailer %d; actual " + "value %" ASN_PRI_SSIZE "", + st->size, size_in_bits - csiz->lower_bound, csiz->effective_bits, + add_trailer, + add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound); + ret = per_put_few_bits( + po, add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound, + csiz->effective_bits); + if(ret) ASN__ENCODE_FAILED; + ret = per_put_many_bits(po, st->buf, size_in_bits); + if(ret) ASN__ENCODE_FAILED; + if(add_trailer) { + static const uint8_t zeros[16]; + size_t trailing_zero_bits = csiz->lower_bound - size_in_bits; + while(trailing_zero_bits > 0) { + if(trailing_zero_bits > 8 * sizeof(zeros)) { + ret = per_put_many_bits(po, zeros, 8 * sizeof(zeros)); + trailing_zero_bits -= 8 * sizeof(zeros); + } else { + ret = per_put_many_bits(po, zeros, trailing_zero_bits); + trailing_zero_bits = 0; + } + if(ret) ASN__ENCODE_FAILED; + } + } + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); + + buf = st->buf; + do { + int need_eom = 0; + ssize_t maySave = uper_put_length(po, size_in_bits, &need_eom); + if(maySave < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "", maySave, size_in_bits); + + ret = per_put_many_bits(po, buf, maySave); + if(ret) ASN__ENCODE_FAILED; + + buf += maySave >> 3; + size_in_bits -= maySave; + assert(!(maySave & 0x07) || !size_in_bits); + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size_in_bits); + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +asn_random_fill_result_t +BIT_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_BIT_STRING_specs; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + static unsigned lengths[] = {0, 1, 2, 3, 4, 8, + 126, 127, 128, 16383, 16384, 16385, + 65534, 65535, 65536, 65537}; + uint8_t *buf; + uint8_t *bend; + uint8_t *b; + size_t rnd_bits, rnd_len; + BIT_STRING_t *st; + + if(max_length == 0) return result_skipped; + + switch(specs->subvariant) { + case ASN_OSUBV_ANY: + return result_failed; + case ASN_OSUBV_BIT: + break; + default: + break; + } + + /* Figure out how far we should go */ + rnd_bits = lengths[asn_random_between( + 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->size; + if(pc->flags & APC_CONSTRAINED) { + long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length + ? pc->upper_bound + : (ssize_t)max_length; + if(max_length < (size_t)pc->lower_bound) { + return result_skipped; + } + if(pc->flags & APC_EXTENSIBLE) { + switch(asn_random_between(0, 5)) { + case 0: + if(pc->lower_bound > 0) { + rnd_bits = pc->lower_bound - 1; + break; + } + /* Fall through */ + case 1: + rnd_bits = pc->upper_bound + 1; + break; + case 2: + /* Keep rnd_bits from the table */ + if(rnd_bits < max_length) { + break; + } + /* Fall through */ + default: + rnd_bits = asn_random_between(pc->lower_bound, + suggested_upper_bound); + } + } else { + rnd_bits = + asn_random_between(pc->lower_bound, suggested_upper_bound); + } + } else { + rnd_bits = asn_random_between(0, max_length - 1); + } + } else if(rnd_bits >= max_length) { + rnd_bits = asn_random_between(0, max_length - 1); + } + + rnd_len = (rnd_bits + 7) / 8; + buf = CALLOC(1, rnd_len + 1); + if(!buf) return result_failed; + + bend = &buf[rnd_len]; + + for(b = buf; b < bend; b++) { + *(uint8_t *)b = asn_random_between(0, 255); + } + *b = 0; /* Zero-terminate just in case. */ + + if(*sptr) { + st = *sptr; + FREEMEM(st->buf); + } else { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) { + FREEMEM(buf); + return result_failed; + } + } + + st->buf = buf; + st->size = rnd_len; + st->bits_unused = (8 - (rnd_bits & 0x7)) & 0x7; + if(st->bits_unused) { + assert(st->size > 0); + st->buf[st->size-1] &= 0xff << st->bits_unused; + } + + result_ok.length = st->size; + return result_ok; +} diff --git a/Bouncer/e2sm_kpm/lib/BIT_STRING_oer.c b/Bouncer/e2sm_kpm/lib/BIT_STRING_oer.c new file mode 100644 index 0000000..aff5075 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/BIT_STRING_oer.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +BIT_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + + (void)opt_codec_ctx; + + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + if(ct_size >= 0) { + expected_length = (ct_size + 7) >> 3; + st->bits_unused = (8 - (ct_size & 7)) & 7; + } else { + /* + * X.696 (08/2015) #13.3.1 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(expected_length < 1) { + ASN__DECODE_FAILED; + } else if(expected_length > size) { + ASN__DECODE_STARVED; + } + + st->bits_unused = ((const uint8_t *)ptr)[0]; + if(st->bits_unused & ~7) { + ASN_DEBUG("%s: unused bits outside of 0..7 range", td->name); + ASN__DECODE_FAILED; + } + ptr = (const char *)ptr + 1; + size--; + expected_length--; + rval.consumed = len_len + 1; + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + if(expected_length > 0) { + buf[expected_length - 1] &= (0xff << st->bits_unused); + } + + rval.consumed += expected_length; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +BIT_STRING_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + asn_enc_rval_t erval = {0, 0, 0}; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + size_t trailing_zeros = 0; + int fix_last_byte = 0; + + if(!st) ASN__ENCODE_FAILED; + + if(st->bits_unused & ~7) { + ASN_DEBUG("BIT STRING unused bits %d out of 0..7 range", + st->bits_unused); + ASN__ENCODE_FAILED; + } + if(st->bits_unused && !(st->size && st->buf)) { + ASN_DEBUG("BIT STRING %s size 0 can't support unused bits %d", td->name, + st->bits_unused); + ASN__ENCODE_FAILED; + } + + if(ct_size >= 0) { + size_t ct_bytes = (ct_size + 7) >> 3; + if(st->size > ct_bytes) { + ASN_DEBUG("More bits in BIT STRING %s (%" ASN_PRI_SSIZE ") than constrained %" ASN_PRI_SSIZE "", + td->name, 8 * st->size - st->bits_unused, ct_size); + ASN__ENCODE_FAILED; + } + trailing_zeros = ct_bytes - st->size; /* Allow larger constraint */ + } else { + uint8_t ub = st->bits_unused & 7; + ssize_t len_len = oer_serialize_length(1 + st->size, cb, app_key); + if(len_len < 0) ASN__ENCODE_FAILED; + if(cb(&ub, 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + erval.encoded += len_len + 1; + } + + if(st->bits_unused) { + if(st->buf[st->size - 1] & (0xff << st->bits_unused)) { + fix_last_byte = 1; + } + } + + if(cb(st->buf, st->size - fix_last_byte, app_key) < 0) { + ASN__ENCODE_FAILED; + } + + if(fix_last_byte) { + uint8_t b = st->buf[st->size - 1] & (0xff << st->bits_unused); + if(cb(&b, 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + } + + erval.encoded += st->size; + + if(trailing_zeros) { + static uint8_t zeros[16]; + while(trailing_zeros > 0) { + int ret; + if(trailing_zeros < sizeof(zeros)) { + ret = cb(zeros, trailing_zeros, app_key); + erval.encoded += trailing_zeros; + } else { + ret = cb(zeros, sizeof(zeros), app_key); + erval.encoded += sizeof(zeros); + } + if(ret < 0) ASN__ENCODE_FAILED; + } + } + + return erval; +} + + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/BMPString.c b/Bouncer/e2sm_kpm/lib/BMPString.c new file mode 100644 index 0000000..6b80ae7 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/BMPString.c @@ -0,0 +1,233 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * BMPString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_BMPString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (30 << 2)), /* [UNIVERSAL 30] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +asn_OCTET_STRING_specifics_t asn_SPC_BMPString_specs = { + sizeof(BMPString_t), + offsetof(BMPString_t, _asn_ctx), + ASN_OSUBV_U16 /* 16-bits character */ +}; +static asn_per_constraints_t asn_DEF_BMPString_per_constraints = { + { APC_CONSTRAINED, 16, 16, 0, 65535 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, + 0, 0 +}; +asn_TYPE_operation_t asn_OP_BMPString = { + OCTET_STRING_free, /* Implemented in terms of OCTET STRING */ + BMPString_print, + OCTET_STRING_compare, + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, + BMPString_decode_xer, /* Convert from UTF-8 */ + BMPString_encode_xer, /* Convert to UTF-8 */ +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_BMPString = { + "BMPString", + "BMPString", + &asn_OP_BMPString, + asn_DEF_BMPString_tags, + sizeof(asn_DEF_BMPString_tags) + / sizeof(asn_DEF_BMPString_tags[0]) - 1, + asn_DEF_BMPString_tags, + sizeof(asn_DEF_BMPString_tags) + / sizeof(asn_DEF_BMPString_tags[0]), + { 0, &asn_DEF_BMPString_per_constraints, BMPString_constraint }, + 0, 0, /* No members */ + &asn_SPC_BMPString_specs +}; + +int +BMPString_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BMPString_t *st = (const BMPString_t *)sptr; + + if(st && st->buf) { + if(st->size & 1) { + ASN__CTFAIL(app_key, td, sptr, + "%s: invalid size %" ASN_PRI_SIZE " not divisible by 2 (%s:%d)", + td->name, st->size, __FILE__, __LINE__); + return -1; + } + } else { + ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, + __FILE__, __LINE__); + return -1; + } + + return 0; +} + +/* + * BMPString specific contents printer. + */ +static ssize_t +BMPString__dump(const BMPString_t *st, + asn_app_consume_bytes_f *cb, void *app_key) { + char scratch[128]; /* Scratchpad buffer */ + char *p = scratch; + ssize_t wrote = 0; + uint8_t *ch; + uint8_t *end; + + ch = st->buf; + end = (st->buf + st->size); + for(end--; ch < end; ch += 2) { + uint16_t wc = (ch[0] << 8) | ch[1]; /* 2 bytes */ + if(sizeof(scratch) - (p - scratch) < 3) { + wrote += p - scratch; + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + p = scratch; + } + if(wc < 0x80) { + *p++ = (char)wc; + } else if(wc < 0x800) { + *p++ = 0xc0 | ((wc >> 6)); + *p++ = 0x80 | ((wc & 0x3f)); + } else { + *p++ = 0xe0 | ((wc >> 12)); + *p++ = 0x80 | ((wc >> 6) & 0x3f); + *p++ = 0x80 | ((wc & 0x3f)); + } + } + + wrote += p - scratch; + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + + return wrote; +} + +asn_dec_rval_t +BMPString_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + asn_dec_rval_t rc; + + rc = OCTET_STRING_decode_xer_utf8(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size); + if(rc.code == RC_OK) { + /* + * Now we have a whole string in UTF-8 format. + * Convert it into UCS-2. + */ + uint32_t *wcs; + size_t wcs_len; + UTF8String_t *st; + + assert(*sptr); + st = (UTF8String_t *)*sptr; + assert(st->buf); + wcs_len = UTF8String_to_wcs(st, 0, 0); + + wcs = (uint32_t *)MALLOC(4 * (wcs_len + 1)); + if(wcs == 0 || UTF8String_to_wcs(st, wcs, wcs_len) != wcs_len) { + rc.code = RC_FAIL; + rc.consumed = 0; + return rc; + } else { + wcs[wcs_len] = 0; /* nul-terminate */ + } + + if(1) { + /* Swap byte order and trim encoding to 2 bytes */ + uint32_t *wc = wcs; + uint32_t *wc_end = wcs + wcs_len; + uint16_t *dstwc = (uint16_t *)wcs; + for(; wc < wc_end; wc++, dstwc++) { + uint32_t wch = *wc; + if(wch > 0xffff) { + FREEMEM(wcs); + rc.code = RC_FAIL; + rc.consumed = 0; + return rc; + } + *((uint8_t *)dstwc + 0) = wch >> 8; + *((uint8_t *)dstwc + 1) = wch; + } + dstwc = (uint16_t *)REALLOC(wcs, 2 * (wcs_len + 1)); + if(!dstwc) { + FREEMEM(wcs); + rc.code = RC_FAIL; + rc.consumed = 0; + return rc; + } else { + dstwc[wcs_len] = 0; /* nul-terminate */ + wcs = (uint32_t *)(void *)dstwc; /* Alignment OK */ + } + } + + FREEMEM(st->buf); + st->buf = (uint8_t *)wcs; + st->size = 2 * wcs_len; + } + return rc; +} + +asn_enc_rval_t +BMPString_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const BMPString_t *st = (const BMPString_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) + ASN__ENCODE_FAILED; + + er.encoded = BMPString__dump(st, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +int +BMPString_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const BMPString_t *st = (const BMPString_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(!st || !st->buf) + return (cb("", 8, app_key) < 0) ? -1 : 0; + + if(BMPString__dump(st, cb, app_key) < 0) + return -1; + + return 0; +} + diff --git a/Bouncer/asn1c_defs/BOOLEAN.c b/Bouncer/e2sm_kpm/lib/BOOLEAN.c similarity index 100% rename from Bouncer/asn1c_defs/BOOLEAN.c rename to Bouncer/e2sm_kpm/lib/BOOLEAN.c diff --git a/Bouncer/e2sm_kpm/lib/C-RNTI.c b/Bouncer/e2sm_kpm/lib/C-RNTI.c new file mode 100644 index 0000000..f56a789 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/C-RNTI.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "C-RNTI.h" + +int +C_RNTI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 2)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_C_RNTI_constr_1 CC_NOTUSED = { + { 0, 0 }, + 2 /* (SIZE(2..2)) */}; +asn_per_constraints_t asn_PER_type_C_RNTI_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_C_RNTI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_C_RNTI = { + "C-RNTI", + "C-RNTI", + &asn_OP_OCTET_STRING, + asn_DEF_C_RNTI_tags_1, + sizeof(asn_DEF_C_RNTI_tags_1) + /sizeof(asn_DEF_C_RNTI_tags_1[0]), /* 1 */ + asn_DEF_C_RNTI_tags_1, /* Same as above */ + sizeof(asn_DEF_C_RNTI_tags_1) + /sizeof(asn_DEF_C_RNTI_tags_1[0]), /* 1 */ + { &asn_OER_type_C_RNTI_constr_1, &asn_PER_type_C_RNTI_constr_1, C_RNTI_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CGI.c b/Bouncer/e2sm_kpm/lib/CGI.c new file mode 100644 index 0000000..06e7420 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CGI.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "CGI.h" + +#include "NR-CGI.h" +#include "EUTRA-CGI.h" +asn_per_constraints_t asn_PER_type_CGI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_CGI_1[] = { + { ATF_POINTER, 0, offsetof(struct CGI, choice.nR_CGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR-CGI" + }, + { ATF_POINTER, 0, offsetof(struct CGI, choice.eUTRA_CGI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EUTRA_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA-CGI" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_CGI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nR-CGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRA-CGI */ +}; +asn_CHOICE_specifics_t asn_SPC_CGI_specs_1 = { + sizeof(struct CGI), + offsetof(struct CGI, _asn_ctx), + offsetof(struct CGI, present), + sizeof(((struct CGI *)0)->present), + asn_MAP_CGI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_CGI = { + "CGI", + "CGI", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_CGI_constr_1, CHOICE_constraint }, + asn_MBR_CGI_1, + 2, /* Elements count */ + &asn_SPC_CGI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-CellResourceReportItem.c b/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-CellResourceReportItem.c new file mode 100644 index 0000000..99bee0a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-CellResourceReportItem.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CU-CP-Usage-Report-CellResourceReportItem.h" + +#include "CU-CP-Usage-Report-UeResourceReportItem.h" +static int +memb_ueResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 32)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueResourceReportList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_CP_Usage_Report_UeResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueResourceReportList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueResourceReportList_specs_3 = { + sizeof(struct CU_CP_Usage_Report_CellResourceReportItem__ueResourceReportList), + offsetof(struct CU_CP_Usage_Report_CellResourceReportItem__ueResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueResourceReportList_3 = { + "ueResourceReportList", + "ueResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueResourceReportList_tags_3, + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]) - 1, /* 1 */ + asn_DEF_ueResourceReportList_tags_3, /* Same as above */ + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]), /* 2 */ + { &asn_OER_type_ueResourceReportList_constr_3, &asn_PER_type_ueResourceReportList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ueResourceReportList_3, + 1, /* Single element */ + &asn_SPC_ueResourceReportList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_CellResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_CellResourceReportItem, nRCGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_CellResourceReportItem, ueResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ueResourceReportList_3, + 0, + { &asn_OER_memb_ueResourceReportList_constr_3, &asn_PER_memb_ueResourceReportList_constr_3, memb_ueResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "ueResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_CP_Usage_Report_CellResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_CellResourceReportItem_specs_1 = { + sizeof(struct CU_CP_Usage_Report_CellResourceReportItem), + offsetof(struct CU_CP_Usage_Report_CellResourceReportItem, _asn_ctx), + asn_MAP_CU_CP_Usage_Report_CellResourceReportItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_CellResourceReportItem = { + "CU-CP-Usage-Report-CellResourceReportItem", + "CU-CP-Usage-Report-CellResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1, + sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_CP_Usage_Report_CellResourceReportItem_1, + 2, /* Elements count */ + &asn_SPC_CU_CP_Usage_Report_CellResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-Per-UE.c b/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-Per-UE.c new file mode 100644 index 0000000..54ef1d6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-Per-UE.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CU-CP-Usage-Report-Per-UE.h" + +#include "CU-CP-Usage-Report-CellResourceReportItem.h" +static int +memb_cellResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 16384)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..16384)) */}; +static asn_per_constraints_t asn_PER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 14, 14, 1, 16384 } /* (SIZE(1..16384)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..16384)) */}; +static asn_per_constraints_t asn_PER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 14, 14, 1, 16384 } /* (SIZE(1..16384)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellResourceReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_CP_Usage_Report_CellResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellResourceReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellResourceReportList_specs_2 = { + sizeof(struct CU_CP_Usage_Report_Per_UE__cellResourceReportList), + offsetof(struct CU_CP_Usage_Report_Per_UE__cellResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellResourceReportList_2 = { + "cellResourceReportList", + "cellResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellResourceReportList_tags_2, + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellResourceReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_cellResourceReportList_constr_2, &asn_PER_type_cellResourceReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellResourceReportList_2, + 1, /* Single element */ + &asn_SPC_cellResourceReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_Per_UE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_Per_UE, cellResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellResourceReportList_2, + 0, + { &asn_OER_memb_cellResourceReportList_constr_2, &asn_PER_memb_cellResourceReportList_constr_2, memb_cellResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "cellResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_CP_Usage_Report_Per_UE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_Per_UE_specs_1 = { + sizeof(struct CU_CP_Usage_Report_Per_UE), + offsetof(struct CU_CP_Usage_Report_Per_UE, _asn_ctx), + asn_MAP_CU_CP_Usage_Report_Per_UE_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_Per_UE = { + "CU-CP-Usage-Report-Per-UE", + "CU-CP-Usage-Report-Per-UE", + &asn_OP_SEQUENCE, + asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1, + sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_CP_Usage_Report_Per_UE_1, + 1, /* Elements count */ + &asn_SPC_CU_CP_Usage_Report_Per_UE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-UeResourceReportItem.c b/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-UeResourceReportItem.c new file mode 100644 index 0000000..c78f44a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CU-CP-Usage-Report-UeResourceReportItem.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CU-CP-Usage-Report-UeResourceReportItem.h" + +asn_TYPE_member_t asn_MBR_CU_CP_Usage_Report_UeResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, c_RNTI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_C_RNTI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "c-RNTI" + }, + { ATF_POINTER, 2, offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, serving_Cell_RF_Type), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "serving-Cell-RF-Type" + }, + { ATF_POINTER, 1, offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, neighbor_Cell_RF), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "neighbor-Cell-RF" + }, +}; +static const int asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* c-RNTI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* serving-Cell-RF-Type */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* neighbor-Cell-RF */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_CP_Usage_Report_UeResourceReportItem_specs_1 = { + sizeof(struct CU_CP_Usage_Report_UeResourceReportItem), + offsetof(struct CU_CP_Usage_Report_UeResourceReportItem, _asn_ctx), + asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_CU_CP_Usage_Report_UeResourceReportItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_CP_Usage_Report_UeResourceReportItem = { + "CU-CP-Usage-Report-UeResourceReportItem", + "CU-CP-Usage-Report-UeResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1, + sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_CP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_CP_Usage_Report_UeResourceReportItem_1, + 3, /* Elements count */ + &asn_SPC_CU_CP_Usage_Report_UeResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-CellResourceReportItem.c b/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-CellResourceReportItem.c new file mode 100644 index 0000000..c5175c7 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-CellResourceReportItem.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CU-UP-Usage-Report-CellResourceReportItem.h" + +#include "CU-UP-Usage-Report-UeResourceReportItem.h" +static int +memb_ueResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 32)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueResourceReportList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_UP_Usage_Report_UeResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueResourceReportList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueResourceReportList_specs_3 = { + sizeof(struct CU_UP_Usage_Report_CellResourceReportItem__ueResourceReportList), + offsetof(struct CU_UP_Usage_Report_CellResourceReportItem__ueResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueResourceReportList_3 = { + "ueResourceReportList", + "ueResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueResourceReportList_tags_3, + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]) - 1, /* 1 */ + asn_DEF_ueResourceReportList_tags_3, /* Same as above */ + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]), /* 2 */ + { &asn_OER_type_ueResourceReportList_constr_3, &asn_PER_type_ueResourceReportList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ueResourceReportList_3, + 1, /* Single element */ + &asn_SPC_ueResourceReportList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_CellResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_CellResourceReportItem, nRCGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_CellResourceReportItem, ueResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ueResourceReportList_3, + 0, + { &asn_OER_memb_ueResourceReportList_constr_3, &asn_PER_memb_ueResourceReportList_constr_3, memb_ueResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "ueResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_UP_Usage_Report_CellResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_CellResourceReportItem_specs_1 = { + sizeof(struct CU_UP_Usage_Report_CellResourceReportItem), + offsetof(struct CU_UP_Usage_Report_CellResourceReportItem, _asn_ctx), + asn_MAP_CU_UP_Usage_Report_CellResourceReportItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_CellResourceReportItem = { + "CU-UP-Usage-Report-CellResourceReportItem", + "CU-UP-Usage-Report-CellResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1, + sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_UP_Usage_Report_CellResourceReportItem_1, + 2, /* Elements count */ + &asn_SPC_CU_UP_Usage_Report_CellResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-Per-UE.c b/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-Per-UE.c new file mode 100644 index 0000000..9a6b24b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-Per-UE.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CU-UP-Usage-Report-Per-UE.h" + +#include "CU-UP-Usage-Report-CellResourceReportItem.h" +static int +memb_cellResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 512)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellResourceReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CU_UP_Usage_Report_CellResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellResourceReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellResourceReportList_specs_2 = { + sizeof(struct CU_UP_Usage_Report_Per_UE__cellResourceReportList), + offsetof(struct CU_UP_Usage_Report_Per_UE__cellResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellResourceReportList_2 = { + "cellResourceReportList", + "cellResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellResourceReportList_tags_2, + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellResourceReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_cellResourceReportList_constr_2, &asn_PER_type_cellResourceReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellResourceReportList_2, + 1, /* Single element */ + &asn_SPC_cellResourceReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_Per_UE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_Per_UE, cellResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellResourceReportList_2, + 0, + { &asn_OER_memb_cellResourceReportList_constr_2, &asn_PER_memb_cellResourceReportList_constr_2, memb_cellResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "cellResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_UP_Usage_Report_Per_UE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_Per_UE_specs_1 = { + sizeof(struct CU_UP_Usage_Report_Per_UE), + offsetof(struct CU_UP_Usage_Report_Per_UE, _asn_ctx), + asn_MAP_CU_UP_Usage_Report_Per_UE_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_Per_UE = { + "CU-UP-Usage-Report-Per-UE", + "CU-UP-Usage-Report-Per-UE", + &asn_OP_SEQUENCE, + asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1, + sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_UP_Usage_Report_Per_UE_1, + 1, /* Elements count */ + &asn_SPC_CU_UP_Usage_Report_Per_UE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-UeResourceReportItem.c b/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-UeResourceReportItem.c new file mode 100644 index 0000000..f03bddf --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CU-UP-Usage-Report-UeResourceReportItem.c @@ -0,0 +1,150 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CU-UP-Usage-Report-UeResourceReportItem.h" + +static int +memb_pDCPBytesDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_pDCPBytesUL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_CU_UP_Usage_Report_UeResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, c_RNTI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_C_RNTI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "c-RNTI" + }, + { ATF_POINTER, 2, offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, pDCPBytesDL), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesDL_constr_3, &asn_PER_memb_pDCPBytesDL_constr_3, memb_pDCPBytesDL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesDL" + }, + { ATF_POINTER, 1, offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, pDCPBytesUL), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesUL_constr_4, &asn_PER_memb_pDCPBytesUL_constr_4, memb_pDCPBytesUL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesUL" + }, +}; +static const int asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* c-RNTI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pDCPBytesDL */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* pDCPBytesUL */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CU_UP_Usage_Report_UeResourceReportItem_specs_1 = { + sizeof(struct CU_UP_Usage_Report_UeResourceReportItem), + offsetof(struct CU_UP_Usage_Report_UeResourceReportItem, _asn_ctx), + asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_CU_UP_Usage_Report_UeResourceReportItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CU_UP_Usage_Report_UeResourceReportItem = { + "CU-UP-Usage-Report-UeResourceReportItem", + "CU-UP-Usage-Report-UeResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1, + sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_CU_UP_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CU_UP_Usage_Report_UeResourceReportItem_1, + 3, /* Elements count */ + &asn_SPC_CU_UP_Usage_Report_UeResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CUUPMeasurement-Container.c b/Bouncer/e2sm_kpm/lib/CUUPMeasurement-Container.c new file mode 100644 index 0000000..116631e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CUUPMeasurement-Container.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CUUPMeasurement-Container.h" + +#include "PlmnID-List.h" +static int +memb_plmnList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 12)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_plmnList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..12)) */}; +static asn_per_constraints_t asn_PER_type_plmnList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 1, 12 } /* (SIZE(1..12)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_plmnList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..12)) */}; +static asn_per_constraints_t asn_PER_memb_plmnList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 1, 12 } /* (SIZE(1..12)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_plmnList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PlmnID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_plmnList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_plmnList_specs_2 = { + sizeof(struct CUUPMeasurement_Container__plmnList), + offsetof(struct CUUPMeasurement_Container__plmnList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_plmnList_2 = { + "plmnList", + "plmnList", + &asn_OP_SEQUENCE_OF, + asn_DEF_plmnList_tags_2, + sizeof(asn_DEF_plmnList_tags_2) + /sizeof(asn_DEF_plmnList_tags_2[0]) - 1, /* 1 */ + asn_DEF_plmnList_tags_2, /* Same as above */ + sizeof(asn_DEF_plmnList_tags_2) + /sizeof(asn_DEF_plmnList_tags_2[0]), /* 2 */ + { &asn_OER_type_plmnList_constr_2, &asn_PER_type_plmnList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_plmnList_2, + 1, /* Single element */ + &asn_SPC_plmnList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CUUPMeasurement_Container_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CUUPMeasurement_Container, plmnList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_plmnList_2, + 0, + { &asn_OER_memb_plmnList_constr_2, &asn_PER_memb_plmnList_constr_2, memb_plmnList_constraint_1 }, + 0, 0, /* No default value */ + "plmnList" + }, +}; +static const ber_tlv_tag_t asn_DEF_CUUPMeasurement_Container_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CUUPMeasurement_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* plmnList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CUUPMeasurement_Container_specs_1 = { + sizeof(struct CUUPMeasurement_Container), + offsetof(struct CUUPMeasurement_Container, _asn_ctx), + asn_MAP_CUUPMeasurement_Container_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CUUPMeasurement_Container = { + "CUUPMeasurement-Container", + "CUUPMeasurement-Container", + &asn_OP_SEQUENCE, + asn_DEF_CUUPMeasurement_Container_tags_1, + sizeof(asn_DEF_CUUPMeasurement_Container_tags_1) + /sizeof(asn_DEF_CUUPMeasurement_Container_tags_1[0]), /* 1 */ + asn_DEF_CUUPMeasurement_Container_tags_1, /* Same as above */ + sizeof(asn_DEF_CUUPMeasurement_Container_tags_1) + /sizeof(asn_DEF_CUUPMeasurement_Container_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CUUPMeasurement_Container_1, + 1, /* Elements count */ + &asn_SPC_CUUPMeasurement_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CellResourceReportListItem.c b/Bouncer/e2sm_kpm/lib/CellResourceReportListItem.c new file mode 100644 index 0000000..ce16175 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CellResourceReportListItem.c @@ -0,0 +1,228 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "CellResourceReportListItem.h" + +#include "ServedPlmnPerCellListItem.h" +static int +memb_dl_TotalofAvailablePRBs_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 273)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ul_TotalofAvailablePRBs_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 273)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_servedPlmnPerCellList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 12)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_servedPlmnPerCellList_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..12)) */}; +static asn_per_constraints_t asn_PER_type_servedPlmnPerCellList_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 1, 12 } /* (SIZE(1..12)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_dl_TotalofAvailablePRBs_constr_3 CC_NOTUSED = { + { 2, 1 } /* (0..273) */, + -1}; +static asn_per_constraints_t asn_PER_memb_dl_TotalofAvailablePRBs_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 9, 9, 0, 273 } /* (0..273) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ul_TotalofAvailablePRBs_constr_4 CC_NOTUSED = { + { 2, 1 } /* (0..273) */, + -1}; +static asn_per_constraints_t asn_PER_memb_ul_TotalofAvailablePRBs_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED, 9, 9, 0, 273 } /* (0..273) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_servedPlmnPerCellList_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..12)) */}; +static asn_per_constraints_t asn_PER_memb_servedPlmnPerCellList_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 1, 12 } /* (SIZE(1..12)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_servedPlmnPerCellList_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ServedPlmnPerCellListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_servedPlmnPerCellList_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_servedPlmnPerCellList_specs_5 = { + sizeof(struct CellResourceReportListItem__servedPlmnPerCellList), + offsetof(struct CellResourceReportListItem__servedPlmnPerCellList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_servedPlmnPerCellList_5 = { + "servedPlmnPerCellList", + "servedPlmnPerCellList", + &asn_OP_SEQUENCE_OF, + asn_DEF_servedPlmnPerCellList_tags_5, + sizeof(asn_DEF_servedPlmnPerCellList_tags_5) + /sizeof(asn_DEF_servedPlmnPerCellList_tags_5[0]) - 1, /* 1 */ + asn_DEF_servedPlmnPerCellList_tags_5, /* Same as above */ + sizeof(asn_DEF_servedPlmnPerCellList_tags_5) + /sizeof(asn_DEF_servedPlmnPerCellList_tags_5[0]), /* 2 */ + { &asn_OER_type_servedPlmnPerCellList_constr_5, &asn_PER_type_servedPlmnPerCellList_constr_5, SEQUENCE_OF_constraint }, + asn_MBR_servedPlmnPerCellList_5, + 1, /* Single element */ + &asn_SPC_servedPlmnPerCellList_specs_5 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_CellResourceReportListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CellResourceReportListItem, nRCGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCGI" + }, + { ATF_POINTER, 2, offsetof(struct CellResourceReportListItem, dl_TotalofAvailablePRBs), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_dl_TotalofAvailablePRBs_constr_3, &asn_PER_memb_dl_TotalofAvailablePRBs_constr_3, memb_dl_TotalofAvailablePRBs_constraint_1 }, + 0, 0, /* No default value */ + "dl-TotalofAvailablePRBs" + }, + { ATF_POINTER, 1, offsetof(struct CellResourceReportListItem, ul_TotalofAvailablePRBs), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ul_TotalofAvailablePRBs_constr_4, &asn_PER_memb_ul_TotalofAvailablePRBs_constr_4, memb_ul_TotalofAvailablePRBs_constraint_1 }, + 0, 0, /* No default value */ + "ul-TotalofAvailablePRBs" + }, + { ATF_NOFLAGS, 0, offsetof(struct CellResourceReportListItem, servedPlmnPerCellList), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + 0, + &asn_DEF_servedPlmnPerCellList_5, + 0, + { &asn_OER_memb_servedPlmnPerCellList_constr_5, &asn_PER_memb_servedPlmnPerCellList_constr_5, memb_servedPlmnPerCellList_constraint_1 }, + 0, 0, /* No default value */ + "servedPlmnPerCellList" + }, +}; +static const int asn_MAP_CellResourceReportListItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_CellResourceReportListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CellResourceReportListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dl-TotalofAvailablePRBs */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ul-TotalofAvailablePRBs */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* servedPlmnPerCellList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CellResourceReportListItem_specs_1 = { + sizeof(struct CellResourceReportListItem), + offsetof(struct CellResourceReportListItem, _asn_ctx), + asn_MAP_CellResourceReportListItem_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_CellResourceReportListItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CellResourceReportListItem = { + "CellResourceReportListItem", + "CellResourceReportListItem", + &asn_OP_SEQUENCE, + asn_DEF_CellResourceReportListItem_tags_1, + sizeof(asn_DEF_CellResourceReportListItem_tags_1) + /sizeof(asn_DEF_CellResourceReportListItem_tags_1[0]), /* 1 */ + asn_DEF_CellResourceReportListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_CellResourceReportListItem_tags_1) + /sizeof(asn_DEF_CellResourceReportListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CellResourceReportListItem_1, + 4, /* Elements count */ + &asn_SPC_CellResourceReportListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/CoreCPID.c b/Bouncer/e2sm_kpm/lib/CoreCPID.c new file mode 100644 index 0000000..b1ff013 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/CoreCPID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "CoreCPID.h" + +#include "GUAMI.h" +#include "GUMMEI.h" +static asn_per_constraints_t asn_PER_type_CoreCPID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_CoreCPID_1[] = { + { ATF_POINTER, 0, offsetof(struct CoreCPID, choice.fiveGC), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveGC" + }, + { ATF_POINTER, 0, offsetof(struct CoreCPID, choice.ePC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUMMEI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ePC" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_CoreCPID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveGC */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ePC */ +}; +static asn_CHOICE_specifics_t asn_SPC_CoreCPID_specs_1 = { + sizeof(struct CoreCPID), + offsetof(struct CoreCPID, _asn_ctx), + offsetof(struct CoreCPID, present), + sizeof(((struct CoreCPID *)0)->present), + asn_MAP_CoreCPID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_CoreCPID = { + "CoreCPID", + "CoreCPID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_CoreCPID_constr_1, CHOICE_constraint }, + asn_MBR_CoreCPID_1, + 2, /* Elements count */ + &asn_SPC_CoreCPID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/DU-Usage-Report-CellResourceReportItem.c b/Bouncer/e2sm_kpm/lib/DU-Usage-Report-CellResourceReportItem.c new file mode 100644 index 0000000..fec3873 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/DU-Usage-Report-CellResourceReportItem.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "DU-Usage-Report-CellResourceReportItem.h" + +#include "DU-Usage-Report-UeResourceReportItem.h" +static int +memb_ueResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 32)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_type_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +static asn_per_constraints_t asn_PER_memb_ueResourceReportList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueResourceReportList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_DU_Usage_Report_UeResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueResourceReportList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueResourceReportList_specs_3 = { + sizeof(struct DU_Usage_Report_CellResourceReportItem__ueResourceReportList), + offsetof(struct DU_Usage_Report_CellResourceReportItem__ueResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueResourceReportList_3 = { + "ueResourceReportList", + "ueResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueResourceReportList_tags_3, + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]) - 1, /* 1 */ + asn_DEF_ueResourceReportList_tags_3, /* Same as above */ + sizeof(asn_DEF_ueResourceReportList_tags_3) + /sizeof(asn_DEF_ueResourceReportList_tags_3[0]), /* 2 */ + { &asn_OER_type_ueResourceReportList_constr_3, &asn_PER_type_ueResourceReportList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ueResourceReportList_3, + 1, /* Single element */ + &asn_SPC_ueResourceReportList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_DU_Usage_Report_CellResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_CellResourceReportItem, nRCGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_CellResourceReportItem, ueResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ueResourceReportList_3, + 0, + { &asn_OER_memb_ueResourceReportList_constr_3, &asn_PER_memb_ueResourceReportList_constr_3, memb_ueResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "ueResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DU_Usage_Report_CellResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_CellResourceReportItem_specs_1 = { + sizeof(struct DU_Usage_Report_CellResourceReportItem), + offsetof(struct DU_Usage_Report_CellResourceReportItem, _asn_ctx), + asn_MAP_DU_Usage_Report_CellResourceReportItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_CellResourceReportItem = { + "DU-Usage-Report-CellResourceReportItem", + "DU-Usage-Report-CellResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1, + sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_CellResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DU_Usage_Report_CellResourceReportItem_1, + 2, /* Elements count */ + &asn_SPC_DU_Usage_Report_CellResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/DU-Usage-Report-Per-UE.c b/Bouncer/e2sm_kpm/lib/DU-Usage-Report-Per-UE.c new file mode 100644 index 0000000..550592a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/DU-Usage-Report-Per-UE.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "DU-Usage-Report-Per-UE.h" + +#include "DU-Usage-Report-CellResourceReportItem.h" +static int +memb_cellResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 512)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellResourceReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_DU_Usage_Report_CellResourceReportItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellResourceReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellResourceReportList_specs_2 = { + sizeof(struct DU_Usage_Report_Per_UE__cellResourceReportList), + offsetof(struct DU_Usage_Report_Per_UE__cellResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellResourceReportList_2 = { + "cellResourceReportList", + "cellResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellResourceReportList_tags_2, + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellResourceReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_cellResourceReportList_constr_2, &asn_PER_type_cellResourceReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellResourceReportList_2, + 1, /* Single element */ + &asn_SPC_cellResourceReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_DU_Usage_Report_Per_UE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_Per_UE, cellResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellResourceReportList_2, + 0, + { &asn_OER_memb_cellResourceReportList_constr_2, &asn_PER_memb_cellResourceReportList_constr_2, memb_cellResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "cellResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_DU_Usage_Report_Per_UE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DU_Usage_Report_Per_UE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_Per_UE_specs_1 = { + sizeof(struct DU_Usage_Report_Per_UE), + offsetof(struct DU_Usage_Report_Per_UE, _asn_ctx), + asn_MAP_DU_Usage_Report_Per_UE_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_Per_UE = { + "DU-Usage-Report-Per-UE", + "DU-Usage-Report-Per-UE", + &asn_OP_SEQUENCE, + asn_DEF_DU_Usage_Report_Per_UE_tags_1, + sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + asn_DEF_DU_Usage_Report_Per_UE_tags_1, /* Same as above */ + sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_Per_UE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DU_Usage_Report_Per_UE_1, + 1, /* Elements count */ + &asn_SPC_DU_Usage_Report_Per_UE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/DU-Usage-Report-UeResourceReportItem.c b/Bouncer/e2sm_kpm/lib/DU-Usage-Report-UeResourceReportItem.c new file mode 100644 index 0000000..8809094 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/DU-Usage-Report-UeResourceReportItem.c @@ -0,0 +1,138 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "DU-Usage-Report-UeResourceReportItem.h" + +static int +memb_dl_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 1000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ul_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 1000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 30, -1, 0, 1000000000 } /* (0..1000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 30, -1, 0, 1000000000 } /* (0..1000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_DU_Usage_Report_UeResourceReportItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DU_Usage_Report_UeResourceReportItem, c_RNTI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_C_RNTI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "c-RNTI" + }, + { ATF_POINTER, 2, offsetof(struct DU_Usage_Report_UeResourceReportItem, dl_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_dl_PRBUsage_constr_3, &asn_PER_memb_dl_PRBUsage_constr_3, memb_dl_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "dl-PRBUsage" + }, + { ATF_POINTER, 1, offsetof(struct DU_Usage_Report_UeResourceReportItem, ul_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ul_PRBUsage_constr_4, &asn_PER_memb_ul_PRBUsage_constr_4, memb_ul_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "ul-PRBUsage" + }, +}; +static const int asn_MAP_DU_Usage_Report_UeResourceReportItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DU_Usage_Report_UeResourceReportItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* c-RNTI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dl-PRBUsage */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ul-PRBUsage */ +}; +asn_SEQUENCE_specifics_t asn_SPC_DU_Usage_Report_UeResourceReportItem_specs_1 = { + sizeof(struct DU_Usage_Report_UeResourceReportItem), + offsetof(struct DU_Usage_Report_UeResourceReportItem, _asn_ctx), + asn_MAP_DU_Usage_Report_UeResourceReportItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_DU_Usage_Report_UeResourceReportItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_DU_Usage_Report_UeResourceReportItem = { + "DU-Usage-Report-UeResourceReportItem", + "DU-Usage-Report-UeResourceReportItem", + &asn_OP_SEQUENCE, + asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1, + sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1, /* Same as above */ + sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1) + /sizeof(asn_DEF_DU_Usage_Report_UeResourceReportItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DU_Usage_Report_UeResourceReportItem_1, + 3, /* Elements count */ + &asn_SPC_DU_Usage_Report_UeResourceReportItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E-UTRA-ARFCN.c b/Bouncer/e2sm_kpm/lib/E-UTRA-ARFCN.c new file mode 100644 index 0000000..d1c0711 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E-UTRA-ARFCN.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E-UTRA-ARFCN.h" + +int +E_UTRA_ARFCN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_E_UTRA_ARFCN_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_E_UTRA_ARFCN_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_E_UTRA_ARFCN = { + "E-UTRA-ARFCN", + "E-UTRA-ARFCN", + &asn_OP_NativeInteger, + asn_DEF_E_UTRA_ARFCN_tags_1, + sizeof(asn_DEF_E_UTRA_ARFCN_tags_1) + /sizeof(asn_DEF_E_UTRA_ARFCN_tags_1[0]), /* 1 */ + asn_DEF_E_UTRA_ARFCN_tags_1, /* Same as above */ + sizeof(asn_DEF_E_UTRA_ARFCN_tags_1) + /sizeof(asn_DEF_E_UTRA_ARFCN_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_E_UTRA_ARFCN_constr_1, E_UTRA_ARFCN_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E-UTRA-PCI.c b/Bouncer/e2sm_kpm/lib/E-UTRA-PCI.c new file mode 100644 index 0000000..e84f147 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E-UTRA-PCI.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E-UTRA-PCI.h" + +int +E_UTRA_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 503)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_E_UTRA_PCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 9, 9, 0, 503 } /* (0..503,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_E_UTRA_PCI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_E_UTRA_PCI = { + "E-UTRA-PCI", + "E-UTRA-PCI", + &asn_OP_NativeInteger, + asn_DEF_E_UTRA_PCI_tags_1, + sizeof(asn_DEF_E_UTRA_PCI_tags_1) + /sizeof(asn_DEF_E_UTRA_PCI_tags_1[0]), /* 1 */ + asn_DEF_E_UTRA_PCI_tags_1, /* Same as above */ + sizeof(asn_DEF_E_UTRA_PCI_tags_1) + /sizeof(asn_DEF_E_UTRA_PCI_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_E_UTRA_PCI_constr_1, E_UTRA_PCI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E-UTRA-TAC.c b/Bouncer/e2sm_kpm/lib/E-UTRA-TAC.c new file mode 100644 index 0000000..2c90250 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E-UTRA-TAC.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E-UTRA-TAC.h" + +int +E_UTRA_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 2)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_E_UTRA_TAC_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_E_UTRA_TAC_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_E_UTRA_TAC = { + "E-UTRA-TAC", + "E-UTRA-TAC", + &asn_OP_OCTET_STRING, + asn_DEF_E_UTRA_TAC_tags_1, + sizeof(asn_DEF_E_UTRA_TAC_tags_1) + /sizeof(asn_DEF_E_UTRA_TAC_tags_1[0]), /* 1 */ + asn_DEF_E_UTRA_TAC_tags_1, /* Same as above */ + sizeof(asn_DEF_E_UTRA_TAC_tags_1) + /sizeof(asn_DEF_E_UTRA_TAC_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_E_UTRA_TAC_constr_1, E_UTRA_TAC_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format1.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format1.c new file mode 100644 index 0000000..4975a24 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format1.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-ActionDefinition-Format1.h" + +#include "CGI.h" +asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition_Format1, measInfoList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementInfoList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measInfoList" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition_Format1, granulPeriod), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GranularityPeriod, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "granulPeriod" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_KPM_ActionDefinition_Format1, cellGlobalID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellGlobalID" + }, +}; +static const int asn_MAP_E2SM_KPM_ActionDefinition_Format1_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_ActionDefinition_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_ActionDefinition_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measInfoList */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* granulPeriod */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cellGlobalID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_ActionDefinition_Format1_specs_1 = { + sizeof(struct E2SM_KPM_ActionDefinition_Format1), + offsetof(struct E2SM_KPM_ActionDefinition_Format1, _asn_ctx), + asn_MAP_E2SM_KPM_ActionDefinition_Format1_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_KPM_ActionDefinition_Format1_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format1 = { + "E2SM-KPM-ActionDefinition-Format1", + "E2SM-KPM-ActionDefinition-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_ActionDefinition_Format1_tags_1, + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_ActionDefinition_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_ActionDefinition_Format1_1, + 3, /* Elements count */ + &asn_SPC_E2SM_KPM_ActionDefinition_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format2.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format2.c new file mode 100644 index 0000000..3768a39 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format2.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-ActionDefinition-Format2.h" + +asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition_Format2, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition_Format2, subscriptInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_ActionDefinition_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "subscriptInfo" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_ActionDefinition_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_ActionDefinition_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* subscriptInfo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_ActionDefinition_Format2_specs_1 = { + sizeof(struct E2SM_KPM_ActionDefinition_Format2), + offsetof(struct E2SM_KPM_ActionDefinition_Format2, _asn_ctx), + asn_MAP_E2SM_KPM_ActionDefinition_Format2_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format2 = { + "E2SM-KPM-ActionDefinition-Format2", + "E2SM-KPM-ActionDefinition-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_ActionDefinition_Format2_tags_1, + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format2_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_ActionDefinition_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format2_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_ActionDefinition_Format2_1, + 2, /* Elements count */ + &asn_SPC_E2SM_KPM_ActionDefinition_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format3.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format3.c new file mode 100644 index 0000000..3851720 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition-Format3.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-ActionDefinition-Format3.h" + +#include "CGI.h" +asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format3_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition_Format3, measCondList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementCondList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measCondList" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition_Format3, granulPeriod), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GranularityPeriod, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "granulPeriod" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_KPM_ActionDefinition_Format3, cellGlobalID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellGlobalID" + }, +}; +static const int asn_MAP_E2SM_KPM_ActionDefinition_Format3_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_ActionDefinition_Format3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_ActionDefinition_Format3_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measCondList */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* granulPeriod */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cellGlobalID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_ActionDefinition_Format3_specs_1 = { + sizeof(struct E2SM_KPM_ActionDefinition_Format3), + offsetof(struct E2SM_KPM_ActionDefinition_Format3, _asn_ctx), + asn_MAP_E2SM_KPM_ActionDefinition_Format3_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_KPM_ActionDefinition_Format3_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format3 = { + "E2SM-KPM-ActionDefinition-Format3", + "E2SM-KPM-ActionDefinition-Format3", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_ActionDefinition_Format3_tags_1, + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format3_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format3_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_ActionDefinition_Format3_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format3_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_Format3_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_ActionDefinition_Format3_1, + 3, /* Elements count */ + &asn_SPC_E2SM_KPM_ActionDefinition_Format3_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition.c new file mode 100644 index 0000000..4b22a6c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-ActionDefinition.c @@ -0,0 +1,127 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-ActionDefinition.h" + +#include "E2SM-KPM-ActionDefinition-Format1.h" +#include "E2SM-KPM-ActionDefinition-Format2.h" +#include "E2SM-KPM-ActionDefinition-Format3.h" +static asn_per_constraints_t asn_PER_type_actionDefinition_formats_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_actionDefinition_formats_3[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_KPM_ActionDefinition__actionDefinition_formats, choice.actionDefinition_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_ActionDefinition_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_KPM_ActionDefinition__actionDefinition_formats, choice.actionDefinition_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_ActionDefinition_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-Format2" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_KPM_ActionDefinition__actionDefinition_formats, choice.actionDefinition_Format3), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_ActionDefinition_Format3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-Format3" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_actionDefinition_formats_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* actionDefinition-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* actionDefinition-Format2 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* actionDefinition-Format3 */ +}; +static asn_CHOICE_specifics_t asn_SPC_actionDefinition_formats_specs_3 = { + sizeof(struct E2SM_KPM_ActionDefinition__actionDefinition_formats), + offsetof(struct E2SM_KPM_ActionDefinition__actionDefinition_formats, _asn_ctx), + offsetof(struct E2SM_KPM_ActionDefinition__actionDefinition_formats, present), + sizeof(((struct E2SM_KPM_ActionDefinition__actionDefinition_formats *)0)->present), + asn_MAP_actionDefinition_formats_tag2el_3, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_actionDefinition_formats_3 = { + "actionDefinition-formats", + "actionDefinition-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_actionDefinition_formats_constr_3, CHOICE_constraint }, + asn_MBR_actionDefinition_formats_3, + 3, /* Elements count */ + &asn_SPC_actionDefinition_formats_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition, ric_Style_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-Style-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_ActionDefinition, actionDefinition_formats), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_actionDefinition_formats_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_ActionDefinition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_ActionDefinition_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-Style-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* actionDefinition-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_ActionDefinition_specs_1 = { + sizeof(struct E2SM_KPM_ActionDefinition), + offsetof(struct E2SM_KPM_ActionDefinition, _asn_ctx), + asn_MAP_E2SM_KPM_ActionDefinition_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition = { + "E2SM-KPM-ActionDefinition", + "E2SM-KPM-ActionDefinition", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_ActionDefinition_tags_1, + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_ActionDefinition_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_ActionDefinition_tags_1) + /sizeof(asn_DEF_E2SM_KPM_ActionDefinition_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_ActionDefinition_1, + 2, /* Elements count */ + &asn_SPC_E2SM_KPM_ActionDefinition_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c new file mode 100644 index 0000000..27ea6c1 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c @@ -0,0 +1,139 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-EventTriggerDefinition-Format1.h" + +static int +reportingPeriod_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value >= 1 && value <= 4294967295)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static int +memb_reportingPeriod_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value >= 1 && value <= 4294967295)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_type_reportingPeriod_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 1, 4294967295 } /* (1..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_reportingPeriod_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 1, 4294967295 } /* (1..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_specifics_t asn_SPC_reportingPeriod_specs_2 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_reportingPeriod_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_reportingPeriod_2 = { + "reportingPeriod", + "reportingPeriod", + &asn_OP_NativeInteger, + asn_DEF_reportingPeriod_tags_2, + sizeof(asn_DEF_reportingPeriod_tags_2) + /sizeof(asn_DEF_reportingPeriod_tags_2[0]) - 1, /* 1 */ + asn_DEF_reportingPeriod_tags_2, /* Same as above */ + sizeof(asn_DEF_reportingPeriod_tags_2) + /sizeof(asn_DEF_reportingPeriod_tags_2[0]), /* 2 */ + { 0, &asn_PER_type_reportingPeriod_constr_2, reportingPeriod_2_constraint }, + 0, 0, /* No members */ + &asn_SPC_reportingPeriod_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_KPM_EventTriggerDefinition_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_EventTriggerDefinition_Format1, reportingPeriod), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_reportingPeriod_2, + 0, + { 0, &asn_PER_memb_reportingPeriod_constr_2, memb_reportingPeriod_constraint_1 }, + 0, 0, /* No default value */ + "reportingPeriod" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_EventTriggerDefinition_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* reportingPeriod */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_EventTriggerDefinition_Format1_specs_1 = { + sizeof(struct E2SM_KPM_EventTriggerDefinition_Format1), + offsetof(struct E2SM_KPM_EventTriggerDefinition_Format1, _asn_ctx), + asn_MAP_E2SM_KPM_EventTriggerDefinition_Format1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1 = { + "E2SM-KPM-EventTriggerDefinition-Format1", + "E2SM-KPM-EventTriggerDefinition-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1, + sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_EventTriggerDefinition_Format1_1, + 1, /* Elements count */ + &asn_SPC_E2SM_KPM_EventTriggerDefinition_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition.c new file mode 100644 index 0000000..0b12ca9 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-EventTriggerDefinition.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-EventTriggerDefinition.h" + +#include "E2SM-KPM-EventTriggerDefinition-Format1.h" +static asn_per_constraints_t asn_PER_type_eventDefinition_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_eventDefinition_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_KPM_EventTriggerDefinition__eventDefinition_formats, choice.eventDefinition_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventDefinition-Format1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_eventDefinition_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* eventDefinition-Format1 */ +}; +static asn_CHOICE_specifics_t asn_SPC_eventDefinition_formats_specs_2 = { + sizeof(struct E2SM_KPM_EventTriggerDefinition__eventDefinition_formats), + offsetof(struct E2SM_KPM_EventTriggerDefinition__eventDefinition_formats, _asn_ctx), + offsetof(struct E2SM_KPM_EventTriggerDefinition__eventDefinition_formats, present), + sizeof(((struct E2SM_KPM_EventTriggerDefinition__eventDefinition_formats *)0)->present), + asn_MAP_eventDefinition_formats_tag2el_2, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_eventDefinition_formats_2 = { + "eventDefinition-formats", + "eventDefinition-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_eventDefinition_formats_constr_2, CHOICE_constraint }, + asn_MBR_eventDefinition_formats_2, + 1, /* Elements count */ + &asn_SPC_eventDefinition_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_KPM_EventTriggerDefinition_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_EventTriggerDefinition, eventDefinition_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_eventDefinition_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventDefinition-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_EventTriggerDefinition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_EventTriggerDefinition_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* eventDefinition-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_EventTriggerDefinition_specs_1 = { + sizeof(struct E2SM_KPM_EventTriggerDefinition), + offsetof(struct E2SM_KPM_EventTriggerDefinition, _asn_ctx), + asn_MAP_E2SM_KPM_EventTriggerDefinition_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_EventTriggerDefinition = { + "E2SM-KPM-EventTriggerDefinition", + "E2SM-KPM-EventTriggerDefinition", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_EventTriggerDefinition_tags_1, + sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_tags_1) + /sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_EventTriggerDefinition_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_tags_1) + /sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_EventTriggerDefinition_1, + 1, /* Elements count */ + &asn_SPC_E2SM_KPM_EventTriggerDefinition_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader-Format1.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader-Format1.c new file mode 100644 index 0000000..21e5ae3 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader-Format1.c @@ -0,0 +1,392 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-IndicationHeader-Format1.h" + +static const int permitted_alphabet_table_3[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_3[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_3(const void *sptr) { + const int *table = permitted_alphabet_table_3; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static const int permitted_alphabet_table_4[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_4[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_4(const void *sptr) { + const int *table = permitted_alphabet_table_4; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static const int permitted_alphabet_table_5[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_5[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_5(const void *sptr) { + const int *table = permitted_alphabet_table_5; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static const int permitted_alphabet_table_6[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_6[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_6(const void *sptr) { + const int *table = permitted_alphabet_table_6; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static int +memb_fileFormatversion_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size <= 15) + && !check_permitted_alphabet_3(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_fileFormatversion_3_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_3)/sizeof(permitted_alphabet_table_3[0])) + return -1; + return permitted_alphabet_table_3[value] - 1; +} +static int asn_PER_MAP_fileFormatversion_3_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_3)/sizeof(permitted_alphabet_code2value_3[0])) + return -1; + return permitted_alphabet_code2value_3[code]; +} +static int +memb_senderName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size <= 400) + && !check_permitted_alphabet_4(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_senderName_4_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_4)/sizeof(permitted_alphabet_table_4[0])) + return -1; + return permitted_alphabet_table_4[value] - 1; +} +static int asn_PER_MAP_senderName_4_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_4)/sizeof(permitted_alphabet_code2value_4[0])) + return -1; + return permitted_alphabet_code2value_4[code]; +} +static int +memb_senderType_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size <= 8) + && !check_permitted_alphabet_5(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_senderType_5_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_5)/sizeof(permitted_alphabet_table_5[0])) + return -1; + return permitted_alphabet_table_5[value] - 1; +} +static int asn_PER_MAP_senderType_5_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_5)/sizeof(permitted_alphabet_code2value_5[0])) + return -1; + return permitted_alphabet_code2value_5[code]; +} +static int +memb_vendorName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size <= 32) + && !check_permitted_alphabet_6(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_vendorName_6_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_6)/sizeof(permitted_alphabet_table_6[0])) + return -1; + return permitted_alphabet_table_6[value] - 1; +} +static int asn_PER_MAP_vendorName_6_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_6)/sizeof(permitted_alphabet_code2value_6[0])) + return -1; + return permitted_alphabet_code2value_6[code]; +} +static asn_per_constraints_t asn_PER_memb_fileFormatversion_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 15 } /* (SIZE(0..15,...)) */, + asn_PER_MAP_fileFormatversion_3_v2c, /* Value to PER code map */ + asn_PER_MAP_fileFormatversion_3_c2v /* PER code to value map */ +}; +static asn_per_constraints_t asn_PER_memb_senderName_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 9, 9, 0, 400 } /* (SIZE(0..400,...)) */, + asn_PER_MAP_senderName_4_v2c, /* Value to PER code map */ + asn_PER_MAP_senderName_4_c2v /* PER code to value map */ +}; +static asn_per_constraints_t asn_PER_memb_senderType_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 8 } /* (SIZE(0..8,...)) */, + asn_PER_MAP_senderType_5_v2c, /* Value to PER code map */ + asn_PER_MAP_senderType_5_c2v /* PER code to value map */ +}; +static asn_per_constraints_t asn_PER_memb_vendorName_constr_6 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 6, 6, 0, 32 } /* (SIZE(0..32,...)) */, + asn_PER_MAP_vendorName_6_v2c, /* Value to PER code map */ + asn_PER_MAP_vendorName_6_c2v /* PER code to value map */ +}; +asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationHeader_Format1, colletStartTime), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TimeStamp, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "colletStartTime" + }, + { ATF_POINTER, 4, offsetof(struct E2SM_KPM_IndicationHeader_Format1, fileFormatversion), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, &asn_PER_memb_fileFormatversion_constr_3, memb_fileFormatversion_constraint_1 }, + 0, 0, /* No default value */ + "fileFormatversion" + }, + { ATF_POINTER, 3, offsetof(struct E2SM_KPM_IndicationHeader_Format1, senderName), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, &asn_PER_memb_senderName_constr_4, memb_senderName_constraint_1 }, + 0, 0, /* No default value */ + "senderName" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_KPM_IndicationHeader_Format1, senderType), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, &asn_PER_memb_senderType_constr_5, memb_senderType_constraint_1 }, + 0, 0, /* No default value */ + "senderType" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_KPM_IndicationHeader_Format1, vendorName), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, &asn_PER_memb_vendorName_constr_6, memb_vendorName_constraint_1 }, + 0, 0, /* No default value */ + "vendorName" + }, +}; +static const int asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1[] = { 1, 2, 3, 4 }; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* colletStartTime */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* fileFormatversion */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* senderName */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* senderType */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* vendorName */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1 = { + sizeof(struct E2SM_KPM_IndicationHeader_Format1), + offsetof(struct E2SM_KPM_IndicationHeader_Format1, _asn_ctx), + asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1, /* Optional members */ + 4, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1 = { + "E2SM-KPM-IndicationHeader-Format1", + "E2SM-KPM-IndicationHeader-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1, + sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_IndicationHeader_Format1_1, + 5, /* Elements count */ + &asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader.c new file mode 100644 index 0000000..b2999ad --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationHeader.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-IndicationHeader.h" + +#include "E2SM-KPM-IndicationHeader-Format1.h" +static asn_per_constraints_t asn_PER_type_indicationHeader_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_indicationHeader_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_KPM_IndicationHeader__indicationHeader_formats, choice.indicationHeader_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_IndicationHeader_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationHeader-Format1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_indicationHeader_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationHeader-Format1 */ +}; +static asn_CHOICE_specifics_t asn_SPC_indicationHeader_formats_specs_2 = { + sizeof(struct E2SM_KPM_IndicationHeader__indicationHeader_formats), + offsetof(struct E2SM_KPM_IndicationHeader__indicationHeader_formats, _asn_ctx), + offsetof(struct E2SM_KPM_IndicationHeader__indicationHeader_formats, present), + sizeof(((struct E2SM_KPM_IndicationHeader__indicationHeader_formats *)0)->present), + asn_MAP_indicationHeader_formats_tag2el_2, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_indicationHeader_formats_2 = { + "indicationHeader-formats", + "indicationHeader-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_indicationHeader_formats_constr_2, CHOICE_constraint }, + asn_MBR_indicationHeader_formats_2, + 1, /* Elements count */ + &asn_SPC_indicationHeader_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationHeader, indicationHeader_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_indicationHeader_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationHeader-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationHeader_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationHeader_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationHeader-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationHeader_specs_1 = { + sizeof(struct E2SM_KPM_IndicationHeader), + offsetof(struct E2SM_KPM_IndicationHeader, _asn_ctx), + asn_MAP_E2SM_KPM_IndicationHeader_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader = { + "E2SM-KPM-IndicationHeader", + "E2SM-KPM-IndicationHeader", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_IndicationHeader_tags_1, + sizeof(asn_DEF_E2SM_KPM_IndicationHeader_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_IndicationHeader_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_IndicationHeader_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_IndicationHeader_1, + 1, /* Elements count */ + &asn_SPC_E2SM_KPM_IndicationHeader_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format1.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format1.c new file mode 100644 index 0000000..c20ffca --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format1.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-IndicationMessage-Format1.h" + +#include "MeasurementInfoList.h" +asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage_Format1, measData), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementData, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measData" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_KPM_IndicationMessage_Format1, measInfoList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementInfoList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measInfoList" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_KPM_IndicationMessage_Format1, granulPeriod), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GranularityPeriod, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "granulPeriod" + }, +}; +static const int asn_MAP_E2SM_KPM_IndicationMessage_Format1_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationMessage_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationMessage_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measData */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* measInfoList */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* granulPeriod */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationMessage_Format1_specs_1 = { + sizeof(struct E2SM_KPM_IndicationMessage_Format1), + offsetof(struct E2SM_KPM_IndicationMessage_Format1, _asn_ctx), + asn_MAP_E2SM_KPM_IndicationMessage_Format1_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_KPM_IndicationMessage_Format1_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage_Format1 = { + "E2SM-KPM-IndicationMessage-Format1", + "E2SM-KPM-IndicationMessage-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_IndicationMessage_Format1_tags_1, + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_IndicationMessage_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format1_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_IndicationMessage_Format1_1, + 3, /* Elements count */ + &asn_SPC_E2SM_KPM_IndicationMessage_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format2.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format2.c new file mode 100644 index 0000000..8e00e8c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage-Format2.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-IndicationMessage-Format2.h" + +asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage_Format2, measData), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementData, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measData" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage_Format2, measCondUEidList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementCondUEidList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measCondUEidList" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_KPM_IndicationMessage_Format2, granulPeriod), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GranularityPeriod, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "granulPeriod" + }, +}; +static const int asn_MAP_E2SM_KPM_IndicationMessage_Format2_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationMessage_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationMessage_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measData */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* measCondUEidList */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* granulPeriod */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationMessage_Format2_specs_1 = { + sizeof(struct E2SM_KPM_IndicationMessage_Format2), + offsetof(struct E2SM_KPM_IndicationMessage_Format2, _asn_ctx), + asn_MAP_E2SM_KPM_IndicationMessage_Format2_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_KPM_IndicationMessage_Format2_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage_Format2 = { + "E2SM-KPM-IndicationMessage-Format2", + "E2SM-KPM-IndicationMessage-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_IndicationMessage_Format2_tags_1, + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format2_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_IndicationMessage_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format2_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_IndicationMessage_Format2_1, + 3, /* Elements count */ + &asn_SPC_E2SM_KPM_IndicationMessage_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage.c new file mode 100644 index 0000000..120c1db --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-IndicationMessage.c @@ -0,0 +1,106 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-IndicationMessage.h" + +#include "E2SM-KPM-IndicationMessage-Format1.h" +#include "E2SM-KPM-IndicationMessage-Format2.h" +static asn_per_constraints_t asn_PER_type_indicationMessage_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_indicationMessage_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_KPM_IndicationMessage__indicationMessage_formats, choice.indicationMessage_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_IndicationMessage_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_KPM_IndicationMessage__indicationMessage_formats, choice.indicationMessage_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_KPM_IndicationMessage_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format2" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_indicationMessage_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* indicationMessage-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* indicationMessage-Format2 */ +}; +static asn_CHOICE_specifics_t asn_SPC_indicationMessage_formats_specs_2 = { + sizeof(struct E2SM_KPM_IndicationMessage__indicationMessage_formats), + offsetof(struct E2SM_KPM_IndicationMessage__indicationMessage_formats, _asn_ctx), + offsetof(struct E2SM_KPM_IndicationMessage__indicationMessage_formats, present), + sizeof(((struct E2SM_KPM_IndicationMessage__indicationMessage_formats *)0)->present), + asn_MAP_indicationMessage_formats_tag2el_2, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_indicationMessage_formats_2 = { + "indicationMessage-formats", + "indicationMessage-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_indicationMessage_formats_constr_2, CHOICE_constraint }, + asn_MBR_indicationMessage_formats_2, + 2, /* Elements count */ + &asn_SPC_indicationMessage_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_IndicationMessage, indicationMessage_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_indicationMessage_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* indicationMessage-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationMessage_specs_1 = { + sizeof(struct E2SM_KPM_IndicationMessage), + offsetof(struct E2SM_KPM_IndicationMessage, _asn_ctx), + asn_MAP_E2SM_KPM_IndicationMessage_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage = { + "E2SM-KPM-IndicationMessage", + "E2SM-KPM-IndicationMessage", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_IndicationMessage_tags_1, + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_IndicationMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1) + /sizeof(asn_DEF_E2SM_KPM_IndicationMessage_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_IndicationMessage_1, + 1, /* Elements count */ + &asn_SPC_E2SM_KPM_IndicationMessage_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/E2SM-KPM-RANfunction-Description.c b/Bouncer/e2sm_kpm/lib/E2SM-KPM-RANfunction-Description.c new file mode 100644 index 0000000..005840b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/E2SM-KPM-RANfunction-Description.c @@ -0,0 +1,220 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "E2SM-KPM-RANfunction-Description.h" + +#include "RIC-EventTriggerStyle-Item.h" +#include "RIC-ReportStyle-Item.h" +static int +memb_ric_EventTriggerStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ric_ReportStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_type_ric_EventTriggerStyle_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_ric_ReportStyle_List_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_ric_EventTriggerStyle_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_ric_ReportStyle_List_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_EventTriggerStyle_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RIC_EventTriggerStyle_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_EventTriggerStyle_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_EventTriggerStyle_List_specs_3 = { + sizeof(struct E2SM_KPM_RANfunction_Description__ric_EventTriggerStyle_List), + offsetof(struct E2SM_KPM_RANfunction_Description__ric_EventTriggerStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_EventTriggerStyle_List_3 = { + "ric-EventTriggerStyle-List", + "ric-EventTriggerStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_EventTriggerStyle_List_tags_3, + sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_3) + /sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ric_EventTriggerStyle_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_3) + /sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_3[0]), /* 2 */ + { 0, &asn_PER_type_ric_EventTriggerStyle_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ric_EventTriggerStyle_List_3, + 1, /* Single element */ + &asn_SPC_ric_EventTriggerStyle_List_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ric_ReportStyle_List_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RIC_ReportStyle_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ReportStyle_List_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ReportStyle_List_specs_5 = { + sizeof(struct E2SM_KPM_RANfunction_Description__ric_ReportStyle_List), + offsetof(struct E2SM_KPM_RANfunction_Description__ric_ReportStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ReportStyle_List_5 = { + "ric-ReportStyle-List", + "ric-ReportStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ReportStyle_List_tags_5, + sizeof(asn_DEF_ric_ReportStyle_List_tags_5) + /sizeof(asn_DEF_ric_ReportStyle_List_tags_5[0]) - 1, /* 1 */ + asn_DEF_ric_ReportStyle_List_tags_5, /* Same as above */ + sizeof(asn_DEF_ric_ReportStyle_List_tags_5) + /sizeof(asn_DEF_ric_ReportStyle_List_tags_5[0]), /* 2 */ + { 0, &asn_PER_type_ric_ReportStyle_List_constr_5, SEQUENCE_OF_constraint }, + asn_MBR_ric_ReportStyle_List_5, + 1, /* Single element */ + &asn_SPC_ric_ReportStyle_List_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_KPM_RANfunction_Description_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_RANfunction_Description, ranFunction_Name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunction_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunction-Name" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_KPM_RANfunction_Description, ric_EventTriggerStyle_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ric_EventTriggerStyle_List_3, + 0, + { 0, &asn_PER_memb_ric_EventTriggerStyle_List_constr_3, memb_ric_EventTriggerStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-List" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_KPM_RANfunction_Description, ric_ReportStyle_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_ric_ReportStyle_List_5, + 0, + { 0, &asn_PER_memb_ric_ReportStyle_List_constr_5, memb_ric_ReportStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ReportStyle-List" + }, +}; +static const int asn_MAP_E2SM_KPM_RANfunction_Description_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_KPM_RANfunction_Description_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_RANfunction_Description_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunction-Name */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-EventTriggerStyle-List */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ric-ReportStyle-List */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_RANfunction_Description_specs_1 = { + sizeof(struct E2SM_KPM_RANfunction_Description), + offsetof(struct E2SM_KPM_RANfunction_Description, _asn_ctx), + asn_MAP_E2SM_KPM_RANfunction_Description_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_KPM_RANfunction_Description_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_RANfunction_Description = { + "E2SM-KPM-RANfunction-Description", + "E2SM-KPM-RANfunction-Description", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_KPM_RANfunction_Description_tags_1, + sizeof(asn_DEF_E2SM_KPM_RANfunction_Description_tags_1) + /sizeof(asn_DEF_E2SM_KPM_RANfunction_Description_tags_1[0]), /* 1 */ + asn_DEF_E2SM_KPM_RANfunction_Description_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_KPM_RANfunction_Description_tags_1) + /sizeof(asn_DEF_E2SM_KPM_RANfunction_Description_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_KPM_RANfunction_Description_1, + 3, /* Elements count */ + &asn_SPC_E2SM_KPM_RANfunction_Description_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/EN-GNB-ID.c b/Bouncer/e2sm_kpm/lib/EN-GNB-ID.c new file mode 100644 index 0000000..1b2986b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/EN-GNB-ID.c @@ -0,0 +1,88 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "EN-GNB-ID.h" + +static int +memb_en_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_en_gNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +asn_per_constraints_t asn_PER_type_EN_GNB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_EN_GNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EN_GNB_ID, choice.en_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_en_gNB_ID_constr_2, memb_en_gNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "en-gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_EN_GNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* en-gNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_EN_GNB_ID_specs_1 = { + sizeof(struct EN_GNB_ID), + offsetof(struct EN_GNB_ID, _asn_ctx), + offsetof(struct EN_GNB_ID, present), + sizeof(((struct EN_GNB_ID *)0)->present), + asn_MAP_EN_GNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_EN_GNB_ID = { + "EN-GNB-ID", + "EN-GNB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_EN_GNB_ID_constr_1, CHOICE_constraint }, + asn_MBR_EN_GNB_ID_1, + 1, /* Elements count */ + &asn_SPC_EN_GNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ENB-ID-Choice.c b/Bouncer/e2sm_kpm/lib/ENB-ID-Choice.c new file mode 100644 index 0000000..1f60450 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ENB-ID-Choice.c @@ -0,0 +1,192 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENB-ID-Choice.h" + +static int +memb_enb_ID_macro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_enb_ID_shortmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 18)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_enb_ID_longmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 21)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_enb_ID_macro_constr_2 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +static asn_per_constraints_t asn_PER_memb_enb_ID_macro_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = { + { 0, 0 }, + 18 /* (SIZE(18..18)) */}; +static asn_per_constraints_t asn_PER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = { + { 0, 0 }, + 21 /* (SIZE(21..21)) */}; +static asn_per_constraints_t asn_PER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_macro), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_enb_ID_macro_constr_2, &asn_PER_memb_enb_ID_macro_constr_2, memb_enb_ID_macro_constraint_1 }, + 0, 0, /* No default value */ + "enb-ID-macro" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_shortmacro), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_enb_ID_shortmacro_constr_3, &asn_PER_memb_enb_ID_shortmacro_constr_3, memb_enb_ID_shortmacro_constraint_1 }, + 0, 0, /* No default value */ + "enb-ID-shortmacro" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_longmacro), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_enb_ID_longmacro_constr_4, &asn_PER_memb_enb_ID_longmacro_constr_4, memb_enb_ID_longmacro_constraint_1 }, + 0, 0, /* No default value */ + "enb-ID-longmacro" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_Choice_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enb-ID-macro */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enb-ID-shortmacro */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* enb-ID-longmacro */ +}; +asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1 = { + sizeof(struct ENB_ID_Choice), + offsetof(struct ENB_ID_Choice, _asn_ctx), + offsetof(struct ENB_ID_Choice, present), + sizeof(((struct ENB_ID_Choice *)0)->present), + asn_MAP_ENB_ID_Choice_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice = { + "ENB-ID-Choice", + "ENB-ID-Choice", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ENB_ID_Choice_constr_1, &asn_PER_type_ENB_ID_Choice_constr_1, CHOICE_constraint }, + asn_MBR_ENB_ID_Choice_1, + 3, /* Elements count */ + &asn_SPC_ENB_ID_Choice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ENB-ID.c b/Bouncer/e2sm_kpm/lib/ENB-ID.c new file mode 100644 index 0000000..8f6aeb0 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ENB-ID.c @@ -0,0 +1,226 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "ENB-ID.h" + +static int +memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 28)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 18)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 21)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, + 0, 0 /* No PER value map */ +}; +asn_per_constraints_t asn_PER_type_ENB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_macro_eNB_ID_constr_2, memb_macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "macro-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.home_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_home_eNB_ID_constr_3, memb_home_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "home-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.short_Macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_short_Macro_eNB_ID_constr_5, memb_short_Macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "short-Macro-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.long_Macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_long_Macro_eNB_ID_constr_6, memb_long_Macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "long-Macro-eNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macro-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* home-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-Macro-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-Macro-eNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1 = { + sizeof(struct ENB_ID), + offsetof(struct ENB_ID, _asn_ctx), + offsetof(struct ENB_ID, present), + sizeof(((struct ENB_ID *)0)->present), + asn_MAP_ENB_ID_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ENB_ID = { + "ENB-ID", + "ENB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_ENB_ID_constr_1, CHOICE_constraint }, + asn_MBR_ENB_ID_1, + 4, /* Elements count */ + &asn_SPC_ENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID-Extension.c b/Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID-Extension.c new file mode 100644 index 0000000..2509d5e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID-Extension.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "ENB-UE-X2AP-ID-Extension.h" + +int +ENB_UE_X2AP_ID_Extension_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 4095)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_Extension_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 12, 12, 0, 4095 } /* (0..4095,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID_Extension = { + "ENB-UE-X2AP-ID-Extension", + "ENB-UE-X2AP-ID-Extension", + &asn_OP_NativeInteger, + asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1, + sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1[0]), /* 1 */ + asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1, /* Same as above */ + sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_ENB_UE_X2AP_ID_Extension_constr_1, ENB_UE_X2AP_ID_Extension_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID.c b/Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID.c new file mode 100644 index 0000000..81446fe --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ENB-UE-X2AP-ID.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "ENB-UE-X2AP-ID.h" + +int +ENB_UE_X2AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 4095)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_ENB_UE_X2AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID = { + "ENB-UE-X2AP-ID", + "ENB-UE-X2AP-ID", + &asn_OP_NativeInteger, + asn_DEF_ENB_UE_X2AP_ID_tags_1, + sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1[0]), /* 1 */ + asn_DEF_ENB_UE_X2AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_ENB_UE_X2AP_ID_constr_1, ENB_UE_X2AP_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ENGNB-ID.c b/Bouncer/e2sm_kpm/lib/ENGNB-ID.c new file mode 100644 index 0000000..09371ad --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ENGNB-ID.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENGNB-ID.h" + +static int +memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +static asn_per_constraints_t asn_PER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ENGNB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ENGNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ENGNB_ID, choice.gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_gNB_ID_constr_2, &asn_PER_memb_gNB_ID_constr_2, memb_gNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ENGNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_ENGNB_ID_specs_1 = { + sizeof(struct ENGNB_ID), + offsetof(struct ENGNB_ID, _asn_ctx), + offsetof(struct ENGNB_ID, present), + sizeof(((struct ENGNB_ID *)0)->present), + asn_MAP_ENGNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ENGNB_ID = { + "ENGNB-ID", + "ENGNB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ENGNB_ID_constr_1, &asn_PER_type_ENGNB_ID_constr_1, CHOICE_constraint }, + asn_MBR_ENGNB_ID_1, + 1, /* Elements count */ + &asn_SPC_ENGNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ENUMERATED.c b/Bouncer/e2sm_kpm/lib/ENUMERATED.c new file mode 100644 index 0000000..e16cdd9 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ENUMERATED.c @@ -0,0 +1,180 @@ +/*- + * Copyright (c) 2003, 2005, 2006 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include /* Encoder and decoder of a primitive type */ + +/* + * ENUMERATED basic type description. + */ +static const ber_tlv_tag_t asn_DEF_ENUMERATED_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_operation_t asn_OP_ENUMERATED = { + ASN__PRIMITIVE_TYPE_free, + INTEGER_print, /* Implemented in terms of INTEGER */ + INTEGER_compare, /* Implemented in terms of INTEGER */ + ber_decode_primitive, + INTEGER_encode_der, /* Implemented in terms of INTEGER */ + INTEGER_decode_xer, /* This is temporary! */ + INTEGER_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + ENUMERATED_decode_oer, + ENUMERATED_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + ENUMERATED_decode_uper, /* Unaligned PER decoder */ + ENUMERATED_encode_uper, /* Unaligned PER encoder */ + ENUMERATED_decode_aper, /* Aligned PER decoder */ + ENUMERATED_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + ENUMERATED_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_ENUMERATED = { + "ENUMERATED", + "ENUMERATED", + &asn_OP_ENUMERATED, + asn_DEF_ENUMERATED_tags, + sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]), + asn_DEF_ENUMERATED_tags, /* Same as above */ + sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +#ifndef ASN_DISABLE_OER_SUPPORT + +asn_dec_rval_t +ENUMERATED_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + asn_dec_rval_t rval; + ENUMERATED_t *st = (ENUMERATED_t *)*sptr; + long value; + void *vptr = &value; + + if(!st) { + st = (ENUMERATED_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + rval = NativeEnumerated_decode_oer(opt_codec_ctx, td, constraints, + (void **)&vptr, ptr, size); + if(rval.code == RC_OK) { + if(asn_long2INTEGER(st, value)) { + rval.code = RC_FAIL; + } + } + return rval; +} + +asn_enc_rval_t +ENUMERATED_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const ENUMERATED_t *st = sptr; + long value; + + if(asn_INTEGER2long(st, &value)) { + ASN__ENCODE_FAILED; + } + + return NativeEnumerated_encode_oer(td, constraints, &value, cb, app_key); +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +ENUMERATED_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rval; + ENUMERATED_t *st = (ENUMERATED_t *)*sptr; + long value; + void *vptr = &value; + + if(!st) { + st = (ENUMERATED_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + rval = NativeEnumerated_decode_uper(opt_codec_ctx, td, constraints, + (void **)&vptr, pd); + if(rval.code == RC_OK) { + if(asn_long2INTEGER(st, value)) { + rval.code = RC_FAIL; + } + } + return rval; +} + +asn_enc_rval_t +ENUMERATED_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const ENUMERATED_t *st = (const ENUMERATED_t *)sptr; + long value; + + if(asn_INTEGER2long(st, &value)) { + ASN__ENCODE_FAILED; + } + + return NativeEnumerated_encode_uper(td, constraints, &value, po); +} + +asn_dec_rval_t +ENUMERATED_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + asn_dec_rval_t rval; + ENUMERATED_t *st = (ENUMERATED_t *)*sptr; + long value; + void *vptr = &value; + + if(!st) { + st = (ENUMERATED_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + rval = NativeEnumerated_decode_aper(opt_codec_ctx, td, constraints, + (void **)&vptr, pd); + if(rval.code == RC_OK) + if(asn_long2INTEGER(st, value)) + rval.code = RC_FAIL; + return rval; +} + +asn_enc_rval_t +ENUMERATED_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const ENUMERATED_t *st = (const ENUMERATED_t *)sptr; + long value; + + if(asn_INTEGER2long(st, &value)) + ASN__ENCODE_FAILED; + + return NativeEnumerated_encode_aper(td, constraints, &value, po); +} +#endif /* ASN_DISABLE_PER_SUPPORT */ + diff --git a/Bouncer/e2sm_kpm/lib/EPC-CUUP-PM-Format.c b/Bouncer/e2sm_kpm/lib/EPC-CUUP-PM-Format.c new file mode 100644 index 0000000..5576886 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/EPC-CUUP-PM-Format.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "EPC-CUUP-PM-Format.h" + +#include "PerQCIReportListItemFormat.h" +static int +memb_perQCIReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 256)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_perQCIReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..256)) */}; +static asn_per_constraints_t asn_PER_type_perQCIReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_perQCIReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..256)) */}; +static asn_per_constraints_t asn_PER_memb_perQCIReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_perQCIReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PerQCIReportListItemFormat, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_perQCIReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_perQCIReportList_specs_2 = { + sizeof(struct EPC_CUUP_PM_Format__perQCIReportList), + offsetof(struct EPC_CUUP_PM_Format__perQCIReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_perQCIReportList_2 = { + "perQCIReportList", + "perQCIReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_perQCIReportList_tags_2, + sizeof(asn_DEF_perQCIReportList_tags_2) + /sizeof(asn_DEF_perQCIReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_perQCIReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_perQCIReportList_tags_2) + /sizeof(asn_DEF_perQCIReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_perQCIReportList_constr_2, &asn_PER_type_perQCIReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_perQCIReportList_2, + 1, /* Single element */ + &asn_SPC_perQCIReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EPC_CUUP_PM_Format_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EPC_CUUP_PM_Format, perQCIReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_perQCIReportList_2, + 0, + { &asn_OER_memb_perQCIReportList_constr_2, &asn_PER_memb_perQCIReportList_constr_2, memb_perQCIReportList_constraint_1 }, + 0, 0, /* No default value */ + "perQCIReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_EPC_CUUP_PM_Format_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EPC_CUUP_PM_Format_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* perQCIReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EPC_CUUP_PM_Format_specs_1 = { + sizeof(struct EPC_CUUP_PM_Format), + offsetof(struct EPC_CUUP_PM_Format, _asn_ctx), + asn_MAP_EPC_CUUP_PM_Format_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EPC_CUUP_PM_Format = { + "EPC-CUUP-PM-Format", + "EPC-CUUP-PM-Format", + &asn_OP_SEQUENCE, + asn_DEF_EPC_CUUP_PM_Format_tags_1, + sizeof(asn_DEF_EPC_CUUP_PM_Format_tags_1) + /sizeof(asn_DEF_EPC_CUUP_PM_Format_tags_1[0]), /* 1 */ + asn_DEF_EPC_CUUP_PM_Format_tags_1, /* Same as above */ + sizeof(asn_DEF_EPC_CUUP_PM_Format_tags_1) + /sizeof(asn_DEF_EPC_CUUP_PM_Format_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EPC_CUUP_PM_Format_1, + 1, /* Elements count */ + &asn_SPC_EPC_CUUP_PM_Format_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/EPC-DU-PM-Container.c b/Bouncer/e2sm_kpm/lib/EPC-DU-PM-Container.c new file mode 100644 index 0000000..db3f093 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/EPC-DU-PM-Container.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "EPC-DU-PM-Container.h" + +#include "PerQCIReportListItem.h" +static int +memb_perQCIReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 256)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_perQCIReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..256)) */}; +static asn_per_constraints_t asn_PER_type_perQCIReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_perQCIReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..256)) */}; +static asn_per_constraints_t asn_PER_memb_perQCIReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_perQCIReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PerQCIReportListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_perQCIReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_perQCIReportList_specs_2 = { + sizeof(struct EPC_DU_PM_Container__perQCIReportList), + offsetof(struct EPC_DU_PM_Container__perQCIReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_perQCIReportList_2 = { + "perQCIReportList", + "perQCIReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_perQCIReportList_tags_2, + sizeof(asn_DEF_perQCIReportList_tags_2) + /sizeof(asn_DEF_perQCIReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_perQCIReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_perQCIReportList_tags_2) + /sizeof(asn_DEF_perQCIReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_perQCIReportList_constr_2, &asn_PER_type_perQCIReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_perQCIReportList_2, + 1, /* Single element */ + &asn_SPC_perQCIReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EPC_DU_PM_Container_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EPC_DU_PM_Container, perQCIReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_perQCIReportList_2, + 0, + { &asn_OER_memb_perQCIReportList_constr_2, &asn_PER_memb_perQCIReportList_constr_2, memb_perQCIReportList_constraint_1 }, + 0, 0, /* No default value */ + "perQCIReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_EPC_DU_PM_Container_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EPC_DU_PM_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* perQCIReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EPC_DU_PM_Container_specs_1 = { + sizeof(struct EPC_DU_PM_Container), + offsetof(struct EPC_DU_PM_Container, _asn_ctx), + asn_MAP_EPC_DU_PM_Container_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EPC_DU_PM_Container = { + "EPC-DU-PM-Container", + "EPC-DU-PM-Container", + &asn_OP_SEQUENCE, + asn_DEF_EPC_DU_PM_Container_tags_1, + sizeof(asn_DEF_EPC_DU_PM_Container_tags_1) + /sizeof(asn_DEF_EPC_DU_PM_Container_tags_1[0]), /* 1 */ + asn_DEF_EPC_DU_PM_Container_tags_1, /* Same as above */ + sizeof(asn_DEF_EPC_DU_PM_Container_tags_1) + /sizeof(asn_DEF_EPC_DU_PM_Container_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EPC_DU_PM_Container_1, + 1, /* Elements count */ + &asn_SPC_EPC_DU_PM_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/EUTRA-CGI.c b/Bouncer/e2sm_kpm/lib/EUTRA-CGI.c new file mode 100644 index 0000000..4b28cac --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/EUTRA-CGI.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "EUTRA-CGI.h" + +asn_TYPE_member_t asn_MBR_EUTRA_CGI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EUTRA_CGI, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct EUTRA_CGI, eUTRACellIdentity), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EUTRACellIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRACellIdentity" + }, +}; +static const ber_tlv_tag_t asn_DEF_EUTRA_CGI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EUTRA_CGI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRACellIdentity */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EUTRA_CGI_specs_1 = { + sizeof(struct EUTRA_CGI), + offsetof(struct EUTRA_CGI, _asn_ctx), + asn_MAP_EUTRA_CGI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EUTRA_CGI = { + "EUTRA-CGI", + "EUTRA-CGI", + &asn_OP_SEQUENCE, + asn_DEF_EUTRA_CGI_tags_1, + sizeof(asn_DEF_EUTRA_CGI_tags_1) + /sizeof(asn_DEF_EUTRA_CGI_tags_1[0]), /* 1 */ + asn_DEF_EUTRA_CGI_tags_1, /* Same as above */ + sizeof(asn_DEF_EUTRA_CGI_tags_1) + /sizeof(asn_DEF_EUTRA_CGI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EUTRA_CGI_1, + 2, /* Elements count */ + &asn_SPC_EUTRA_CGI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/EUTRACellIdentity.c b/Bouncer/e2sm_kpm/lib/EUTRACellIdentity.c new file mode 100644 index 0000000..570f5fd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/EUTRACellIdentity.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "EUTRACellIdentity.h" + +int +EUTRACellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 28)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_EUTRACellIdentity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_EUTRACellIdentity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_EUTRACellIdentity = { + "EUTRACellIdentity", + "EUTRACellIdentity", + &asn_OP_BIT_STRING, + asn_DEF_EUTRACellIdentity_tags_1, + sizeof(asn_DEF_EUTRACellIdentity_tags_1) + /sizeof(asn_DEF_EUTRACellIdentity_tags_1[0]), /* 1 */ + asn_DEF_EUTRACellIdentity_tags_1, /* Same as above */ + sizeof(asn_DEF_EUTRACellIdentity_tags_1) + /sizeof(asn_DEF_EUTRACellIdentity_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_EUTRACellIdentity_constr_1, EUTRACellIdentity_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/FGC-CUUP-PM-Format.c b/Bouncer/e2sm_kpm/lib/FGC-CUUP-PM-Format.c new file mode 100644 index 0000000..7482379 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/FGC-CUUP-PM-Format.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "FGC-CUUP-PM-Format.h" + +#include "SliceToReportListItem.h" +static int +memb_sliceToReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 1024)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_sliceToReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +static asn_per_constraints_t asn_PER_type_sliceToReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_sliceToReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +static asn_per_constraints_t asn_PER_memb_sliceToReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_sliceToReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_SliceToReportListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_sliceToReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_sliceToReportList_specs_2 = { + sizeof(struct FGC_CUUP_PM_Format__sliceToReportList), + offsetof(struct FGC_CUUP_PM_Format__sliceToReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_sliceToReportList_2 = { + "sliceToReportList", + "sliceToReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_sliceToReportList_tags_2, + sizeof(asn_DEF_sliceToReportList_tags_2) + /sizeof(asn_DEF_sliceToReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_sliceToReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_sliceToReportList_tags_2) + /sizeof(asn_DEF_sliceToReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_sliceToReportList_constr_2, &asn_PER_type_sliceToReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_sliceToReportList_2, + 1, /* Single element */ + &asn_SPC_sliceToReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_FGC_CUUP_PM_Format_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct FGC_CUUP_PM_Format, sliceToReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_sliceToReportList_2, + 0, + { &asn_OER_memb_sliceToReportList_constr_2, &asn_PER_memb_sliceToReportList_constr_2, memb_sliceToReportList_constraint_1 }, + 0, 0, /* No default value */ + "sliceToReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_FGC_CUUP_PM_Format_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_FGC_CUUP_PM_Format_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* sliceToReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_FGC_CUUP_PM_Format_specs_1 = { + sizeof(struct FGC_CUUP_PM_Format), + offsetof(struct FGC_CUUP_PM_Format, _asn_ctx), + asn_MAP_FGC_CUUP_PM_Format_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_FGC_CUUP_PM_Format = { + "FGC-CUUP-PM-Format", + "FGC-CUUP-PM-Format", + &asn_OP_SEQUENCE, + asn_DEF_FGC_CUUP_PM_Format_tags_1, + sizeof(asn_DEF_FGC_CUUP_PM_Format_tags_1) + /sizeof(asn_DEF_FGC_CUUP_PM_Format_tags_1[0]), /* 1 */ + asn_DEF_FGC_CUUP_PM_Format_tags_1, /* Same as above */ + sizeof(asn_DEF_FGC_CUUP_PM_Format_tags_1) + /sizeof(asn_DEF_FGC_CUUP_PM_Format_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_FGC_CUUP_PM_Format_1, + 1, /* Elements count */ + &asn_SPC_FGC_CUUP_PM_Format_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/FGC-DU-PM-Container.c b/Bouncer/e2sm_kpm/lib/FGC-DU-PM-Container.c new file mode 100644 index 0000000..e81a6d5 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/FGC-DU-PM-Container.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "FGC-DU-PM-Container.h" + +#include "SlicePerPlmnPerCellListItem.h" +static int +memb_slicePerPlmnPerCellList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 1024)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_slicePerPlmnPerCellList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +static asn_per_constraints_t asn_PER_type_slicePerPlmnPerCellList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_slicePerPlmnPerCellList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +static asn_per_constraints_t asn_PER_memb_slicePerPlmnPerCellList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_slicePerPlmnPerCellList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_SlicePerPlmnPerCellListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_slicePerPlmnPerCellList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_slicePerPlmnPerCellList_specs_2 = { + sizeof(struct FGC_DU_PM_Container__slicePerPlmnPerCellList), + offsetof(struct FGC_DU_PM_Container__slicePerPlmnPerCellList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_slicePerPlmnPerCellList_2 = { + "slicePerPlmnPerCellList", + "slicePerPlmnPerCellList", + &asn_OP_SEQUENCE_OF, + asn_DEF_slicePerPlmnPerCellList_tags_2, + sizeof(asn_DEF_slicePerPlmnPerCellList_tags_2) + /sizeof(asn_DEF_slicePerPlmnPerCellList_tags_2[0]) - 1, /* 1 */ + asn_DEF_slicePerPlmnPerCellList_tags_2, /* Same as above */ + sizeof(asn_DEF_slicePerPlmnPerCellList_tags_2) + /sizeof(asn_DEF_slicePerPlmnPerCellList_tags_2[0]), /* 2 */ + { &asn_OER_type_slicePerPlmnPerCellList_constr_2, &asn_PER_type_slicePerPlmnPerCellList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_slicePerPlmnPerCellList_2, + 1, /* Single element */ + &asn_SPC_slicePerPlmnPerCellList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_FGC_DU_PM_Container_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct FGC_DU_PM_Container, slicePerPlmnPerCellList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_slicePerPlmnPerCellList_2, + 0, + { &asn_OER_memb_slicePerPlmnPerCellList_constr_2, &asn_PER_memb_slicePerPlmnPerCellList_constr_2, memb_slicePerPlmnPerCellList_constraint_1 }, + 0, 0, /* No default value */ + "slicePerPlmnPerCellList" + }, +}; +static const ber_tlv_tag_t asn_DEF_FGC_DU_PM_Container_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_FGC_DU_PM_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* slicePerPlmnPerCellList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_FGC_DU_PM_Container_specs_1 = { + sizeof(struct FGC_DU_PM_Container), + offsetof(struct FGC_DU_PM_Container, _asn_ctx), + asn_MAP_FGC_DU_PM_Container_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_FGC_DU_PM_Container = { + "FGC-DU-PM-Container", + "FGC-DU-PM-Container", + &asn_OP_SEQUENCE, + asn_DEF_FGC_DU_PM_Container_tags_1, + sizeof(asn_DEF_FGC_DU_PM_Container_tags_1) + /sizeof(asn_DEF_FGC_DU_PM_Container_tags_1[0]), /* 1 */ + asn_DEF_FGC_DU_PM_Container_tags_1, /* Same as above */ + sizeof(asn_DEF_FGC_DU_PM_Container_tags_1) + /sizeof(asn_DEF_FGC_DU_PM_Container_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_FGC_DU_PM_Container_1, + 1, /* Elements count */ + &asn_SPC_FGC_DU_PM_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnListItem.c b/Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnListItem.c new file mode 100644 index 0000000..13958bd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnListItem.c @@ -0,0 +1,183 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "FQIPERSlicesPerPlmnListItem.h" + +static int +memb_fiveQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_pDCPBytesDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_pDCPBytesUL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_fiveQI_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +static asn_per_constraints_t asn_PER_memb_fiveQI_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_FQIPERSlicesPerPlmnListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct FQIPERSlicesPerPlmnListItem, fiveQI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_fiveQI_constr_2, &asn_PER_memb_fiveQI_constr_2, memb_fiveQI_constraint_1 }, + 0, 0, /* No default value */ + "fiveQI" + }, + { ATF_POINTER, 2, offsetof(struct FQIPERSlicesPerPlmnListItem, pDCPBytesDL), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesDL_constr_3, &asn_PER_memb_pDCPBytesDL_constr_3, memb_pDCPBytesDL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesDL" + }, + { ATF_POINTER, 1, offsetof(struct FQIPERSlicesPerPlmnListItem, pDCPBytesUL), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesUL_constr_4, &asn_PER_memb_pDCPBytesUL_constr_4, memb_pDCPBytesUL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesUL" + }, +}; +static const int asn_MAP_FQIPERSlicesPerPlmnListItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_FQIPERSlicesPerPlmnListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveQI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pDCPBytesDL */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* pDCPBytesUL */ +}; +asn_SEQUENCE_specifics_t asn_SPC_FQIPERSlicesPerPlmnListItem_specs_1 = { + sizeof(struct FQIPERSlicesPerPlmnListItem), + offsetof(struct FQIPERSlicesPerPlmnListItem, _asn_ctx), + asn_MAP_FQIPERSlicesPerPlmnListItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_FQIPERSlicesPerPlmnListItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_FQIPERSlicesPerPlmnListItem = { + "FQIPERSlicesPerPlmnListItem", + "FQIPERSlicesPerPlmnListItem", + &asn_OP_SEQUENCE, + asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1, + sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1) + /sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1[0]), /* 1 */ + asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1) + /sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_FQIPERSlicesPerPlmnListItem_1, + 3, /* Elements count */ + &asn_SPC_FQIPERSlicesPerPlmnListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnPerCellListItem.c b/Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnPerCellListItem.c new file mode 100644 index 0000000..8a070c8 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/FQIPERSlicesPerPlmnPerCellListItem.c @@ -0,0 +1,171 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "FQIPERSlicesPerPlmnPerCellListItem.h" + +static int +memb_fiveQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_dl_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 273)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ul_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 273)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_fiveQI_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +static asn_per_constraints_t asn_PER_memb_fiveQI_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { 2, 1 } /* (0..273) */, + -1}; +static asn_per_constraints_t asn_PER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 9, 9, 0, 273 } /* (0..273) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { 2, 1 } /* (0..273) */, + -1}; +static asn_per_constraints_t asn_PER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED, 9, 9, 0, 273 } /* (0..273) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_FQIPERSlicesPerPlmnPerCellListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct FQIPERSlicesPerPlmnPerCellListItem, fiveQI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_fiveQI_constr_2, &asn_PER_memb_fiveQI_constr_2, memb_fiveQI_constraint_1 }, + 0, 0, /* No default value */ + "fiveQI" + }, + { ATF_POINTER, 2, offsetof(struct FQIPERSlicesPerPlmnPerCellListItem, dl_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_dl_PRBUsage_constr_3, &asn_PER_memb_dl_PRBUsage_constr_3, memb_dl_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "dl-PRBUsage" + }, + { ATF_POINTER, 1, offsetof(struct FQIPERSlicesPerPlmnPerCellListItem, ul_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ul_PRBUsage_constr_4, &asn_PER_memb_ul_PRBUsage_constr_4, memb_ul_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "ul-PRBUsage" + }, +}; +static const int asn_MAP_FQIPERSlicesPerPlmnPerCellListItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_FQIPERSlicesPerPlmnPerCellListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_FQIPERSlicesPerPlmnPerCellListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveQI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dl-PRBUsage */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ul-PRBUsage */ +}; +asn_SEQUENCE_specifics_t asn_SPC_FQIPERSlicesPerPlmnPerCellListItem_specs_1 = { + sizeof(struct FQIPERSlicesPerPlmnPerCellListItem), + offsetof(struct FQIPERSlicesPerPlmnPerCellListItem, _asn_ctx), + asn_MAP_FQIPERSlicesPerPlmnPerCellListItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_FQIPERSlicesPerPlmnPerCellListItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_FQIPERSlicesPerPlmnPerCellListItem = { + "FQIPERSlicesPerPlmnPerCellListItem", + "FQIPERSlicesPerPlmnPerCellListItem", + &asn_OP_SEQUENCE, + asn_DEF_FQIPERSlicesPerPlmnPerCellListItem_tags_1, + sizeof(asn_DEF_FQIPERSlicesPerPlmnPerCellListItem_tags_1) + /sizeof(asn_DEF_FQIPERSlicesPerPlmnPerCellListItem_tags_1[0]), /* 1 */ + asn_DEF_FQIPERSlicesPerPlmnPerCellListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_FQIPERSlicesPerPlmnPerCellListItem_tags_1) + /sizeof(asn_DEF_FQIPERSlicesPerPlmnPerCellListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_FQIPERSlicesPerPlmnPerCellListItem_1, + 3, /* Elements count */ + &asn_SPC_FQIPERSlicesPerPlmnPerCellListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/FiveGS-TAC.c b/Bouncer/e2sm_kpm/lib/FiveGS-TAC.c new file mode 100644 index 0000000..5388efe --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/FiveGS-TAC.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "FiveGS-TAC.h" + +int +FiveGS_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_FiveGS_TAC_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_FiveGS_TAC_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_FiveGS_TAC = { + "FiveGS-TAC", + "FiveGS-TAC", + &asn_OP_OCTET_STRING, + asn_DEF_FiveGS_TAC_tags_1, + sizeof(asn_DEF_FiveGS_TAC_tags_1) + /sizeof(asn_DEF_FiveGS_TAC_tags_1[0]), /* 1 */ + asn_DEF_FiveGS_TAC_tags_1, /* Same as above */ + sizeof(asn_DEF_FiveGS_TAC_tags_1) + /sizeof(asn_DEF_FiveGS_TAC_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_FiveGS_TAC_constr_1, FiveGS_TAC_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/FiveQI.c b/Bouncer/e2sm_kpm/lib/FiveQI.c new file mode 100644 index 0000000..498f1e5 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/FiveQI.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "FiveQI.h" + +int +FiveQI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_FiveQI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 0, 255 } /* (0..255,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_FiveQI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_FiveQI = { + "FiveQI", + "FiveQI", + &asn_OP_NativeInteger, + asn_DEF_FiveQI_tags_1, + sizeof(asn_DEF_FiveQI_tags_1) + /sizeof(asn_DEF_FiveQI_tags_1[0]), /* 1 */ + asn_DEF_FiveQI_tags_1, /* Same as above */ + sizeof(asn_DEF_FiveQI_tags_1) + /sizeof(asn_DEF_FiveQI_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_FiveQI_constr_1, FiveQI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/FreqBandNrItem.c b/Bouncer/e2sm_kpm/lib/FreqBandNrItem.c new file mode 100644 index 0000000..6f0d675 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/FreqBandNrItem.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "FreqBandNrItem.h" + +static int +memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1024 } /* (1..1024,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_FreqBandNrItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct FreqBandNrItem, freqBandIndicatorNr), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_freqBandIndicatorNr_constr_2, memb_freqBandIndicatorNr_constraint_1 }, + 0, 0, /* No default value */ + "freqBandIndicatorNr" + }, +}; +static const ber_tlv_tag_t asn_DEF_FreqBandNrItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_FreqBandNrItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* freqBandIndicatorNr */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_FreqBandNrItem_specs_1 = { + sizeof(struct FreqBandNrItem), + offsetof(struct FreqBandNrItem, _asn_ctx), + asn_MAP_FreqBandNrItem_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_FreqBandNrItem = { + "FreqBandNrItem", + "FreqBandNrItem", + &asn_OP_SEQUENCE, + asn_DEF_FreqBandNrItem_tags_1, + sizeof(asn_DEF_FreqBandNrItem_tags_1) + /sizeof(asn_DEF_FreqBandNrItem_tags_1[0]), /* 1 */ + asn_DEF_FreqBandNrItem_tags_1, /* Same as above */ + sizeof(asn_DEF_FreqBandNrItem_tags_1) + /sizeof(asn_DEF_FreqBandNrItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_FreqBandNrItem_1, + 1, /* Elements count */ + &asn_SPC_FreqBandNrItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-CU-CP-Name.c b/Bouncer/e2sm_kpm/lib/GNB-CU-CP-Name.c new file mode 100644 index 0000000..bfc4771 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-CU-CP-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-CU-CP-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +GNB_CU_CP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_GNB_CU_CP_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_GNB_CU_CP_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_CU_CP_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_GNB_CU_CP_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_GNB_CU_CP_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_GNB_CU_CP_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_CP_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_CP_Name = { + "GNB-CU-CP-Name", + "GNB-CU-CP-Name", + &asn_OP_PrintableString, + asn_DEF_GNB_CU_CP_Name_tags_1, + sizeof(asn_DEF_GNB_CU_CP_Name_tags_1) + /sizeof(asn_DEF_GNB_CU_CP_Name_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_CP_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_CP_Name_tags_1) + /sizeof(asn_DEF_GNB_CU_CP_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_CU_CP_Name_constr_1, &asn_PER_type_GNB_CU_CP_Name_constr_1, GNB_CU_CP_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-CU-CP-UE-E1AP-ID.c b/Bouncer/e2sm_kpm/lib/GNB-CU-CP-UE-E1AP-ID.c new file mode 100644 index 0000000..613b901 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-CU-CP-UE-E1AP-ID.c @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GNB-CU-CP-UE-E1AP-ID.h" + +int +GNB_CU_CP_UE_E1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_GNB_CU_CP_UE_E1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_GNB_CU_CP_UE_E1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_CP_UE_E1AP_ID = { + "GNB-CU-CP-UE-E1AP-ID", + "GNB-CU-CP-UE-E1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1, + sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_GNB_CU_CP_UE_E1AP_ID_constr_1, GNB_CU_CP_UE_E1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_GNB_CU_CP_UE_E1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-CU-UE-F1AP-ID.c b/Bouncer/e2sm_kpm/lib/GNB-CU-UE-F1AP-ID.c new file mode 100644 index 0000000..df994e9 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-CU-UE-F1AP-ID.c @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GNB-CU-UE-F1AP-ID.h" + +int +GNB_CU_UE_F1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_GNB_CU_UE_F1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_GNB_CU_UE_F1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_UE_F1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_UE_F1AP_ID = { + "GNB-CU-UE-F1AP-ID", + "GNB-CU-UE-F1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_GNB_CU_UE_F1AP_ID_tags_1, + sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_UE_F1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_GNB_CU_UE_F1AP_ID_constr_1, GNB_CU_UE_F1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_GNB_CU_UE_F1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-CU-UP-ID.c b/Bouncer/e2sm_kpm/lib/GNB-CU-UP-ID.c new file mode 100644 index 0000000..648f822 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-CU-UP-ID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GNB-CU-UP-ID.h" + +int +GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID = { + "GNB-CU-UP-ID", + "GNB-CU-UP-ID", + &asn_OP_INTEGER, + asn_DEF_GNB_CU_UP_ID_tags_1, + sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_UP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_GNB_CU_UP_ID_constr_1, GNB_CU_UP_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-CU-UP-Name.c b/Bouncer/e2sm_kpm/lib/GNB-CU-UP-Name.c new file mode 100644 index 0000000..59dd641 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-CU-UP-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-CU-UP-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +GNB_CU_UP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_GNB_CU_UP_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_GNB_CU_UP_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_CU_UP_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_GNB_CU_UP_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_GNB_CU_UP_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_GNB_CU_UP_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_Name = { + "GNB-CU-UP-Name", + "GNB-CU-UP-Name", + &asn_OP_PrintableString, + asn_DEF_GNB_CU_UP_Name_tags_1, + sizeof(asn_DEF_GNB_CU_UP_Name_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_Name_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_UP_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_UP_Name_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_CU_UP_Name_constr_1, &asn_PER_type_GNB_CU_UP_Name_constr_1, GNB_CU_UP_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-DU-ID.c b/Bouncer/e2sm_kpm/lib/GNB-DU-ID.c new file mode 100644 index 0000000..820ae0b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-DU-ID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GNB-DU-ID.h" + +int +GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_DU_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID = { + "GNB-DU-ID", + "GNB-DU-ID", + &asn_OP_INTEGER, + asn_DEF_GNB_DU_ID_tags_1, + sizeof(asn_DEF_GNB_DU_ID_tags_1) + /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_DU_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_DU_ID_tags_1) + /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_GNB_DU_ID_constr_1, GNB_DU_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-DU-Name.c b/Bouncer/e2sm_kpm/lib/GNB-DU-Name.c new file mode 100644 index 0000000..a84d899 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-DU-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-DU-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +GNB_DU_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_GNB_DU_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_GNB_DU_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_DU_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_GNB_DU_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_GNB_DU_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_GNB_DU_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_DU_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_DU_Name = { + "GNB-DU-Name", + "GNB-DU-Name", + &asn_OP_PrintableString, + asn_DEF_GNB_DU_Name_tags_1, + sizeof(asn_DEF_GNB_DU_Name_tags_1) + /sizeof(asn_DEF_GNB_DU_Name_tags_1[0]), /* 1 */ + asn_DEF_GNB_DU_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_DU_Name_tags_1) + /sizeof(asn_DEF_GNB_DU_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_DU_Name_constr_1, &asn_PER_type_GNB_DU_Name_constr_1, GNB_DU_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-ID-Choice.c b/Bouncer/e2sm_kpm/lib/GNB-ID-Choice.c new file mode 100644 index 0000000..42c0272 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-ID-Choice.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-ID-Choice.h" + +static int +memb_gnb_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_gnb_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +static asn_per_constraints_t asn_PER_memb_gnb_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_GNB_ID_Choice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GNB_ID_Choice_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GNB_ID_Choice, choice.gnb_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_gnb_ID_constr_2, &asn_PER_memb_gnb_ID_constr_2, memb_gnb_ID_constraint_1 }, + 0, 0, /* No default value */ + "gnb-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GNB_ID_Choice_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gnb-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_GNB_ID_Choice_specs_1 = { + sizeof(struct GNB_ID_Choice), + offsetof(struct GNB_ID_Choice, _asn_ctx), + offsetof(struct GNB_ID_Choice, present), + sizeof(((struct GNB_ID_Choice *)0)->present), + asn_MAP_GNB_ID_Choice_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice = { + "GNB-ID-Choice", + "GNB-ID-Choice", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GNB_ID_Choice_constr_1, &asn_PER_type_GNB_ID_Choice_constr_1, CHOICE_constraint }, + asn_MBR_GNB_ID_Choice_1, + 1, /* Elements count */ + &asn_SPC_GNB_ID_Choice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-ID.c b/Bouncer/e2sm_kpm/lib/GNB-ID.c new file mode 100644 index 0000000..3e67e92 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-ID.c @@ -0,0 +1,88 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GNB-ID.h" + +static int +memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +asn_per_constraints_t asn_PER_type_GNB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GNB_ID, choice.gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_gNB_ID_constr_2, memb_gNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_GNB_ID_specs_1 = { + sizeof(struct GNB_ID), + offsetof(struct GNB_ID, _asn_ctx), + offsetof(struct GNB_ID, present), + sizeof(((struct GNB_ID *)0)->present), + asn_MAP_GNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GNB_ID = { + "GNB-ID", + "GNB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_GNB_ID_constr_1, CHOICE_constraint }, + asn_MBR_GNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GNB-Name.c b/Bouncer/e2sm_kpm/lib/GNB-Name.c new file mode 100644 index 0000000..f80dae1 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GNB-Name.c @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-Name.h" + +static asn_oer_constraints_t asn_OER_type_GNB_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GNB_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GNB_Name_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GNB_Name, choice.gNB_DU_Name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct GNB_Name, choice.gNB_CU_CP_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_CP_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct GNB_Name, choice.gNB_CU_UP_Name), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-Name" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GNB_Name_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-DU-Name */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-CU-CP-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gNB-CU-UP-Name */ +}; +asn_CHOICE_specifics_t asn_SPC_GNB_Name_specs_1 = { + sizeof(struct GNB_Name), + offsetof(struct GNB_Name, _asn_ctx), + offsetof(struct GNB_Name, present), + sizeof(((struct GNB_Name *)0)->present), + asn_MAP_GNB_Name_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GNB_Name = { + "GNB-Name", + "GNB-Name", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GNB_Name_constr_1, &asn_PER_type_GNB_Name_constr_1, CHOICE_constraint }, + asn_MBR_GNB_Name_1, + 3, /* Elements count */ + &asn_SPC_GNB_Name_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GUAMI.c b/Bouncer/e2sm_kpm/lib/GUAMI.c new file mode 100644 index 0000000..ccfe50f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GUAMI.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GUAMI.h" + +asn_TYPE_member_t asn_MBR_GUAMI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, aMFRegionID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMFRegionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "aMFRegionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, aMFSetID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMFSetID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "aMFSetID" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, aMFPointer), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMFPointer, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "aMFPointer" + }, +}; +static const ber_tlv_tag_t asn_DEF_GUAMI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GUAMI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aMFRegionID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* aMFSetID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* aMFPointer */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GUAMI_specs_1 = { + sizeof(struct GUAMI), + offsetof(struct GUAMI, _asn_ctx), + asn_MAP_GUAMI_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GUAMI = { + "GUAMI", + "GUAMI", + &asn_OP_SEQUENCE, + asn_DEF_GUAMI_tags_1, + sizeof(asn_DEF_GUAMI_tags_1) + /sizeof(asn_DEF_GUAMI_tags_1[0]), /* 1 */ + asn_DEF_GUAMI_tags_1, /* Same as above */ + sizeof(asn_DEF_GUAMI_tags_1) + /sizeof(asn_DEF_GUAMI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GUAMI_1, + 4, /* Elements count */ + &asn_SPC_GUAMI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GUMMEI.c b/Bouncer/e2sm_kpm/lib/GUMMEI.c new file mode 100644 index 0000000..82d507b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GUMMEI.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GUMMEI.h" + +asn_TYPE_member_t asn_MBR_GUMMEI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GUMMEI, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUMMEI, mME_Group_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MME_Group_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "mME-Group-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUMMEI, mME_Code), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MME_Code, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "mME-Code" + }, +}; +static const ber_tlv_tag_t asn_DEF_GUMMEI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GUMMEI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* mME-Group-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* mME-Code */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GUMMEI_specs_1 = { + sizeof(struct GUMMEI), + offsetof(struct GUMMEI, _asn_ctx), + asn_MAP_GUMMEI_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GUMMEI = { + "GUMMEI", + "GUMMEI", + &asn_OP_SEQUENCE, + asn_DEF_GUMMEI_tags_1, + sizeof(asn_DEF_GUMMEI_tags_1) + /sizeof(asn_DEF_GUMMEI_tags_1[0]), /* 1 */ + asn_DEF_GUMMEI_tags_1, /* Same as above */ + sizeof(asn_DEF_GUMMEI_tags_1) + /sizeof(asn_DEF_GUMMEI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GUMMEI_1, + 3, /* Elements count */ + &asn_SPC_GUMMEI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GeneralString.c b/Bouncer/e2sm_kpm/lib/GeneralString.c new file mode 100644 index 0000000..cc35a3a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GeneralString.c @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2003 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * GeneralString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_GeneralString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (27 << 2)), /* [UNIVERSAL 27] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +asn_TYPE_operation_t asn_OP_GeneralString = { + OCTET_STRING_free, + OCTET_STRING_print, /* non-ascii string */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_GeneralString = { + "GeneralString", + "GeneralString", + &asn_OP_GeneralString, + asn_DEF_GeneralString_tags, + sizeof(asn_DEF_GeneralString_tags) + / sizeof(asn_DEF_GeneralString_tags[0]) - 1, + asn_DEF_GeneralString_tags, + sizeof(asn_DEF_GeneralString_tags) + / sizeof(asn_DEF_GeneralString_tags[0]), + { 0, 0, asn_generic_unknown_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GeneralizedTime.c b/Bouncer/e2sm_kpm/lib/GeneralizedTime.c new file mode 100644 index 0000000..f1095a2 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GeneralizedTime.c @@ -0,0 +1,833 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#define _POSIX_PTHREAD_SEMANTICS /* for Sun */ +#define _REENTRANT /* for Sun */ +#define __EXTENSIONS__ /* for Sun */ +#ifndef _BSD_SOURCE +#define _BSD_SOURCE /* for timegm(3) */ +#endif +#include +#include + +#ifdef __CYGWIN__ +#include "/usr/include/time.h" +#else +#include +#endif /* __CYGWIN__ */ + +#include +#include + +#if defined(_WIN32) +#pragma message( "PLEASE STOP AND READ!") +#pragma message( " localtime_r is implemented via localtime(), which may be not thread-safe.") +#pragma message( " gmtime_r is implemented via gmtime(), which may be not thread-safe.") +#pragma message( " ") +#pragma message( " You must fix the code by inserting appropriate locking") +#pragma message( " if you want to use asn_GT2time() or asn_UT2time().") +#pragma message( "PLEASE STOP AND READ!") + +static struct tm *localtime_r(const time_t *tloc, struct tm *result) { + struct tm *tm; + if((tm = localtime(tloc))) + return memcpy(result, tm, sizeof(struct tm)); + return 0; +} + +static struct tm *gmtime_r(const time_t *tloc, struct tm *result) { + struct tm *tm; + if((tm = gmtime(tloc))) + return memcpy(result, tm, sizeof(struct tm)); + return 0; +} + +#define tzset() _tzset() +#define putenv(c) _putenv(c) +#define _EMULATE_TIMEGM + +#endif /* _WIN32 */ + +#if defined(sun) || defined(__sun) || defined(__solaris__) +#define _EMULATE_TIMEGM +#endif + +/* + * Where to look for offset from GMT, Phase I. + * Several platforms are known. + */ +#if defined(__FreeBSD__) \ + || (defined(__GNUC__) && defined(__APPLE_CC__)) \ + || (defined __GLIBC__ && __GLIBC__ >= 2) +#undef HAVE_TM_GMTOFF +#define HAVE_TM_GMTOFF +#endif /* BSDs and newer glibc */ + +/* + * Where to look for offset from GMT, Phase II. + */ +#ifdef HAVE_TM_GMTOFF +#define GMTOFF(tm) ((tm).tm_gmtoff) +#else /* HAVE_TM_GMTOFF */ +#define GMTOFF(tm) (-timezone) +#endif /* HAVE_TM_GMTOFF */ + +#if defined(_WIN32) +#pragma message( "PLEASE STOP AND READ!") +#pragma message( " timegm() is implemented via getenv(\"TZ\")/setenv(\"TZ\"), which may be not thread-safe.") +#pragma message( " ") +#pragma message( " You must fix the code by inserting appropriate locking") +#pragma message( " if you want to use asn_GT2time() or asn_UT2time().") +#pragma message( "PLEASE STOP AND READ!") +#else +#if (defined(_EMULATE_TIMEGM) || !defined(HAVE_TM_GMTOFF)) +#warning "PLEASE STOP AND READ!" +#warning " timegm() is implemented via getenv(\"TZ\")/setenv(\"TZ\"), which may be not thread-safe." +#warning " " +#warning " You must fix the code by inserting appropriate locking" +#warning " if you want to use asn_GT2time() or asn_UT2time()." +#warning "PLEASE STOP AND READ!" +#endif /* _EMULATE_TIMEGM */ +#endif + +/* + * Override our GMTOFF decision for other known platforms. + */ +#ifdef __CYGWIN__ +#undef GMTOFF +static long GMTOFF(struct tm a){ + struct tm *lt; + time_t local_time, gmt_time; + long zone; + + tzset(); + gmt_time = time (NULL); + + lt = gmtime(&gmt_time); + + local_time = mktime(lt); + return (gmt_time - local_time); +} +#define _EMULATE_TIMEGM + +#endif /* __CYGWIN__ */ + +#define ATZVARS do { \ + char tzoldbuf[64]; \ + char *tzold +#define ATZSAVETZ do { \ + tzold = getenv("TZ"); \ + if(tzold) { \ + size_t tzlen = strlen(tzold); \ + if(tzlen < sizeof(tzoldbuf)) { \ + tzold = memcpy(tzoldbuf, tzold, tzlen + 1); \ + } else { \ + char *dupptr = tzold; \ + tzold = MALLOC(tzlen + 1); \ + if(tzold) memcpy(tzold, dupptr, tzlen + 1); \ + } \ + setenv("TZ", "UTC", 1); \ + } \ + tzset(); \ +} while(0) +#define ATZOLDTZ do { \ + if (tzold) { \ + setenv("TZ", tzold, 1); \ + *tzoldbuf = 0; \ + if(tzold != tzoldbuf) \ + FREEMEM(tzold); \ + } else { \ + unsetenv("TZ"); \ + } \ + tzset(); \ +} while(0); } while(0); + +#ifndef HAVE_TIMEGM +#ifdef _EMULATE_TIMEGM +#include +static time_t timegm(struct tm *tm) { + time_t tloc; + ATZVARS; + ATZSAVETZ; + tloc = mktime(tm); + ATZOLDTZ; + return tloc; +} +#endif /* _EMULATE_TIMEGM */ +#endif + + +#ifndef ASN___INTERNAL_TEST_MODE + +/* + * GeneralizedTime basic type description. + */ +static const ber_tlv_tag_t asn_DEF_GeneralizedTime_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (24 << 2)), /* [UNIVERSAL 24] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), /* [UNIVERSAL 26] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +static asn_per_constraints_t asn_DEF_GeneralizedTime_per_constraints = { + { APC_CONSTRAINED, 7, 7, 0x20, 0x7e }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + 0, 0 +}; +asn_TYPE_operation_t asn_OP_GeneralizedTime = { + OCTET_STRING_free, + GeneralizedTime_print, + GeneralizedTime_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + GeneralizedTime_encode_der, + OCTET_STRING_decode_xer_utf8, + GeneralizedTime_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + GeneralizedTime_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = { + "GeneralizedTime", + "GeneralizedTime", + &asn_OP_GeneralizedTime, + asn_DEF_GeneralizedTime_tags, + sizeof(asn_DEF_GeneralizedTime_tags) + / sizeof(asn_DEF_GeneralizedTime_tags[0]) - 2, + asn_DEF_GeneralizedTime_tags, + sizeof(asn_DEF_GeneralizedTime_tags) + / sizeof(asn_DEF_GeneralizedTime_tags[0]), + { 0, &asn_DEF_GeneralizedTime_per_constraints, GeneralizedTime_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +#endif /* ASN___INTERNAL_TEST_MODE */ + +/* + * Check that the time looks like the time. + */ +int +GeneralizedTime_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, + void *app_key) { + const GeneralizedTime_t *st = (const GeneralizedTime_t *)sptr; + time_t tloc; + + errno = EPERM; /* Just an unlikely error code */ + tloc = asn_GT2time(st, 0, 0); + if(tloc == -1 && errno != EPERM) { + ASN__CTFAIL(app_key, td, sptr, + "%s: Invalid time format: %s (%s:%d)", + td->name, strerror(errno), __FILE__, __LINE__); + return -1; + } + + return 0; +} + +asn_enc_rval_t +GeneralizedTime_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + GeneralizedTime_t *st; + asn_enc_rval_t erval = {0,0,0}; + int fv, fd; /* seconds fraction value and number of digits */ + struct tm tm; + time_t tloc; + + /* + * Encode as a canonical DER. + */ + errno = EPERM; + tloc = asn_GT2time_frac((const GeneralizedTime_t *)sptr, &fv, &fd, &tm, + 1); /* Recognize time */ + if(tloc == -1 && errno != EPERM) { + /* Failed to recognize time. Fail completely. */ + ASN__ENCODE_FAILED; + } + + st = asn_time2GT_frac(0, &tm, fv, fd, 1); /* Save time canonically */ + if(!st) ASN__ENCODE_FAILED; /* Memory allocation failure. */ + + erval = OCTET_STRING_encode_der(td, st, tag_mode, tag, cb, app_key); + + ASN_STRUCT_FREE(*td, st); + + return erval; +} + +#ifndef ASN___INTERNAL_TEST_MODE + +asn_enc_rval_t +GeneralizedTime_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + if(flags & XER_F_CANONICAL) { + GeneralizedTime_t *gt; + asn_enc_rval_t rv; + int fv, fd; /* fractional parts */ + struct tm tm; + + errno = EPERM; + if(asn_GT2time_frac((const GeneralizedTime_t *)sptr, + &fv, &fd, &tm, 1) == -1 + && errno != EPERM) + ASN__ENCODE_FAILED; + + gt = asn_time2GT_frac(0, &tm, fv, fd, 1); + if(!gt) ASN__ENCODE_FAILED; + + rv = OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags, + cb, app_key); + ASN_STRUCT_FREE(asn_DEF_GeneralizedTime, gt); + return rv; + } else { + return OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags, + cb, app_key); + } +} + +#endif /* ASN___INTERNAL_TEST_MODE */ + +int +GeneralizedTime_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const GeneralizedTime_t *st = (const GeneralizedTime_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(st && st->buf) { + char buf[32]; + struct tm tm; + int ret; + + errno = EPERM; + if(asn_GT2time(st, &tm, 1) == -1 && errno != EPERM) + return (cb("", 11, app_key) < 0) ? -1 : 0; + + ret = snprintf(buf, sizeof(buf), + "%04d-%02d-%02d %02d:%02d:%02d (GMT)", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec); + assert(ret > 0 && ret < (int)sizeof(buf)); + return (cb(buf, ret, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +time_t +asn_GT2time(const GeneralizedTime_t *st, struct tm *ret_tm, int as_gmt) { + return asn_GT2time_frac(st, 0, 0, ret_tm, as_gmt); +} + +time_t +asn_GT2time_prec(const GeneralizedTime_t *st, int *frac_value, int frac_digits, struct tm *ret_tm, int as_gmt) { + time_t tloc; + int fv, fd = 0; + + if(frac_value) + tloc = asn_GT2time_frac(st, &fv, &fd, ret_tm, as_gmt); + else + return asn_GT2time_frac(st, 0, 0, ret_tm, as_gmt); + if(fd == 0 || frac_digits <= 0) { + *frac_value = 0; + } else { + while(fd > frac_digits) + fv /= 10, fd--; + while(fd < frac_digits) { + if(fv < INT_MAX / 10) { + fv *= 10; + fd++; + } else { + /* Too long precision request */ + fv = 0; + break; + } + } + + *frac_value = fv; + } + + return tloc; +} + +time_t +asn_GT2time_frac(const GeneralizedTime_t *st, int *frac_value, int *frac_digits, struct tm *ret_tm, int as_gmt) { + struct tm tm_s; + uint8_t *buf; + uint8_t *end; + int gmtoff_h = 0; + int gmtoff_m = 0; + int gmtoff = 0; /* h + m */ + int offset_specified = 0; + int fvalue = 0; + int fdigits = 0; + time_t tloc; + + if(!st || !st->buf) { + errno = EINVAL; + return -1; + } else { + buf = st->buf; + end = buf + st->size; + } + + if(st->size < 10) { + errno = EINVAL; + return -1; + } + + /* + * Decode first 10 bytes: "AAAAMMJJhh" + */ + memset(&tm_s, 0, sizeof(tm_s)); +#undef B2F +#undef B2T +#define B2F(var) do { \ + unsigned ch = *buf; \ + if(ch < 0x30 || ch > 0x39) { \ + errno = EINVAL; \ + return -1; \ + } else { \ + var = var * 10 + (ch - 0x30); \ + buf++; \ + } \ + } while(0) +#define B2T(var) B2F(tm_s.var) + + B2T(tm_year); /* 1: A */ + B2T(tm_year); /* 2: A */ + B2T(tm_year); /* 3: A */ + B2T(tm_year); /* 4: A */ + B2T(tm_mon); /* 5: M */ + B2T(tm_mon); /* 6: M */ + B2T(tm_mday); /* 7: J */ + B2T(tm_mday); /* 8: J */ + B2T(tm_hour); /* 9: h */ + B2T(tm_hour); /* 0: h */ + + if(buf == end) goto local_finish; + + /* + * Parse [mm[ss[(.|,)ffff]]] + * ^^ + */ + switch(*buf) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + tm_s.tm_min = (*buf++) - 0x30; + if(buf == end) { errno = EINVAL; return -1; } + B2T(tm_min); + break; + case 0x2B: case 0x2D: /* +, - */ + goto offset; + case 0x5A: /* Z */ + goto utc_finish; + default: + errno = EINVAL; + return -1; + } + + if(buf == end) goto local_finish; + + /* + * Parse [mm[ss[(.|,)ffff]]] + * ^^ + */ + switch(*buf) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + tm_s.tm_sec = (*buf++) - 0x30; + if(buf == end) { errno = EINVAL; return -1; } + B2T(tm_sec); + break; + case 0x2B: case 0x2D: /* +, - */ + goto offset; + case 0x5A: /* Z */ + goto utc_finish; + default: + errno = EINVAL; + return -1; + } + + if(buf == end) goto local_finish; + + /* + * Parse [mm[ss[(.|,)ffff]]] + * ^ ^ + */ + switch(*buf) { + case 0x2C: case 0x2E: /* (.|,) */ + /* + * Process fractions of seconds. + */ + for(buf++; buf < end; buf++) { + int v = *buf; + /* GCC 4.x is being too smart without volatile */ + switch(v) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + if(fvalue < INT_MAX/10) { + fvalue = fvalue * 10 + (v - 0x30); + fdigits++; + } else { + /* Not enough precision, ignore */ + } + continue; + default: + break; + } + break; + } + } + + if(buf == end) goto local_finish; + + switch(*buf) { + case 0x2B: case 0x2D: /* +, - */ + goto offset; + case 0x5A: /* Z */ + goto utc_finish; + default: + errno = EINVAL; + return -1; + } + + +offset: + + if(end - buf < 3) { + errno = EINVAL; + return -1; + } + buf++; + B2F(gmtoff_h); + B2F(gmtoff_h); + if(buf[-3] == 0x2D) /* Negative */ + gmtoff = -1; + else + gmtoff = 1; + + if((end - buf) == 2) { + B2F(gmtoff_m); + B2F(gmtoff_m); + } else if(end != buf) { + errno = EINVAL; + return -1; + } + + gmtoff = gmtoff * (3600 * gmtoff_h + 60 * gmtoff_m); + + /* Fall through */ +utc_finish: + + offset_specified = 1; + + /* Fall through */ +local_finish: + + /* + * Validation. + */ + if((tm_s.tm_mon > 12 || tm_s.tm_mon < 1) + || (tm_s.tm_mday > 31 || tm_s.tm_mday < 1) + || (tm_s.tm_hour > 23) + || (tm_s.tm_sec > 60) + ) { + errno = EINVAL; + return -1; + } + + /* Canonicalize */ + tm_s.tm_mon -= 1; /* 0 - 11 */ + tm_s.tm_year -= 1900; + tm_s.tm_isdst = -1; + + tm_s.tm_sec -= gmtoff; + + /*** AT THIS POINT tm_s is either GMT or local (unknown) ****/ + + if(offset_specified) { + tloc = timegm(&tm_s); + } else { + /* + * Without an offset (or "Z"), + * we can only guess that it is a local zone. + * Interpret it in this fashion. + */ + tloc = mktime(&tm_s); + } + if(tloc == -1) { + errno = EINVAL; + return -1; + } + + if(ret_tm) { + if(as_gmt) { + if(offset_specified) { + *ret_tm = tm_s; + } else { + if(gmtime_r(&tloc, ret_tm) == 0) { + errno = EINVAL; + return -1; + } + } + } else { + if(localtime_r(&tloc, ret_tm) == 0) { + errno = EINVAL; + return -1; + } + } + } + + /* Fractions of seconds */ + if(frac_value) *frac_value = fvalue; + if(frac_digits) *frac_digits = fdigits; + + return tloc; +} + +GeneralizedTime_t * +asn_time2GT(GeneralizedTime_t *opt_gt, const struct tm *tm, int force_gmt) { + return asn_time2GT_frac(opt_gt, tm, 0, 0, force_gmt); +} + +GeneralizedTime_t * +asn_time2GT_frac(GeneralizedTime_t *opt_gt, const struct tm *tm, int frac_value, int frac_digits, int force_gmt) { + struct tm tm_s; + long gmtoff = 0; + const unsigned int buf_size = + 4 + 2 + 2 /* yyyymmdd */ + + 2 + 2 + 2 /* hhmmss */ + + 1 + 9 /* .fffffffff */ + + 1 + 4 /* +hhmm */ + + 1 /* '\0' */ + ; + char *buf = NULL; + char *p = NULL; + int size = 0; + + /* Check arguments */ + if(!tm) { + errno = EINVAL; + return 0; + } + + /* Pre-allocate a buffer of sufficient yet small length */ + buf = (char *)MALLOC(buf_size); + if(!buf) return 0; + + gmtoff = GMTOFF(*tm); + + if(force_gmt && gmtoff) { + tm_s = *tm; + tm_s.tm_sec -= gmtoff; + timegm(&tm_s); /* Fix the time */ + tm = &tm_s; +#ifdef HAVE_TM_GMTOFF + assert(!GMTOFF(tm_s)); /* Will fix itself */ +#else /* !HAVE_TM_GMTOFF */ + gmtoff = 0; +#endif + } + + size = snprintf(buf, buf_size, "%04d%02d%02d%02d%02d%02d", + tm->tm_year + 1900, + tm->tm_mon + 1, + tm->tm_mday, + tm->tm_hour, + tm->tm_min, + tm->tm_sec + ); + if(size != 14) { + /* Could be assert(size == 14); */ + FREEMEM(buf); + errno = EINVAL; + return 0; + } + + p = buf + size; + + /* + * Deal with fractions. + */ + if(frac_value > 0 && frac_digits > 0) { + char *end = p + 1 + 9; /* '.' + maximum 9 digits */ + char *z = p; + long fbase; + *z++ = '.'; + + /* Place bounds on precision */ + while(frac_digits-- > 9) + frac_value /= 10; + + /* emulate fbase = pow(10, frac_digits) */ + for(fbase = 1; frac_digits--;) + fbase *= 10; + + do { + int digit = frac_value / fbase; + if(digit > 9) { z = 0; break; } + *z++ = digit + 0x30; + frac_value %= fbase; + fbase /= 10; + } while(fbase > 0 && frac_value > 0 && z < end); + if(z) { + for(--z; *z == 0x30; --z); /* Strip zeroes */ + p = z + (*z != '.'); + size = p - buf; + } + } + + if(force_gmt) { + *p++ = 0x5a; /* "Z" */ + *p++ = 0; + size++; + } else { + int ret; + gmtoff %= 86400; + ret = snprintf(p, buf_size - size, "%+03ld%02ld", + gmtoff / 3600, labs(gmtoff % 3600) / 60); + if(ret != 5) { + FREEMEM(buf); + errno = EINVAL; + return 0; + } + size += ret; + } + + if(opt_gt) { + if(opt_gt->buf) + FREEMEM(opt_gt->buf); + } else { + opt_gt = (GeneralizedTime_t *)CALLOC(1, sizeof *opt_gt); + if(!opt_gt) { FREEMEM(buf); return 0; } + } + + opt_gt->buf = (unsigned char *)buf; + opt_gt->size = size; + + return opt_gt; +} + +asn_random_fill_result_t +GeneralizedTime_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + static const char *values[] = { + "19700101000000", "19700101000000-0000", "19700101000000+0000", + "19700101000000Z", "19700101000000.3Z", "19821106210623.3", + "19821106210629.3Z", "19691106210827.3-0500", "19821106210629.456", + }; + size_t rnd = asn_random_between(0, sizeof(values)/sizeof(values[0])-1); + + (void)constraints; + + if(max_length < sizeof("yyyymmddhhmmss") && !*sptr) { + return result_skipped; + } + + if(*sptr) { + if(OCTET_STRING_fromBuf(*sptr, values[rnd], -1) != 0) { + if(!sptr) return result_failed; + } + } else { + *sptr = OCTET_STRING_new_fromBuf(td, values[rnd], -1); + if(!sptr) return result_failed; + } + + return result_ok; +} + +int +GeneralizedTime_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const GeneralizedTime_t *a = aptr; + const GeneralizedTime_t *b = bptr; + + (void)td; + + if(a && b) { + int afrac_value, afrac_digits; + int bfrac_value, bfrac_digits; + int aerr, berr; + time_t at, bt; + + errno = EPERM; + at = asn_GT2time_frac(a, &afrac_value, &afrac_digits, 0, 0); + aerr = errno; + errno = EPERM; + bt = asn_GT2time_frac(b, &bfrac_value, &bfrac_digits, 0, 0); + berr = errno; + + if(at == -1 && aerr != EPERM) { + if(bt == -1 && berr != EPERM) { + return OCTET_STRING_compare(td, aptr, bptr); + } else { + return -1; + } + } else if(bt == -1 && berr != EPERM) { + return 1; + } else { + /* Both values are valid. */ + } + + if(at < bt) { + return -1; + } else if(at > bt) { + return 1; + } else if(afrac_digits == bfrac_digits) { + if(afrac_value == bfrac_value) { + return 0; + } + if(afrac_value < bfrac_value) { + return -1; + } else { + return 1; + } + } else if(afrac_digits == 0) { + return -1; + } else if(bfrac_digits == 0) { + return 1; + } else { + double afrac = (double)afrac_value / afrac_digits; + double bfrac = (double)bfrac_value / bfrac_digits; + if(afrac < bfrac) { + return -1; + } else if(afrac > bfrac) { + return 1; + } else { + return 0; + } + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } + +} + diff --git a/Bouncer/e2sm_kpm/lib/GlobalENB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalENB-ID.c new file mode 100644 index 0000000..db6e497 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalENB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GlobalENB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalENB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1 = { + sizeof(struct GlobalENB_ID), + offsetof(struct GlobalENB_ID, _asn_ctx), + asn_MAP_GlobalENB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID = { + "GlobalENB-ID", + "GlobalENB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalENB_ID_tags_1, + sizeof(asn_DEF_GlobalENB_ID_tags_1) + /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalENB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalENB_ID_tags_1) + /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalENB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalGNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalGNB-ID.c new file mode 100644 index 0000000..8576ec7 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalGNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GlobalGNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalGNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalGNB_ID, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalGNB_ID, gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalGNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalGNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalGNB_ID_specs_1 = { + sizeof(struct GlobalGNB_ID), + offsetof(struct GlobalGNB_ID, _asn_ctx), + asn_MAP_GlobalGNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalGNB_ID = { + "GlobalGNB-ID", + "GlobalGNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalGNB_ID_tags_1, + sizeof(asn_DEF_GlobalGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalGNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalGNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalGNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalGNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalGNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalKPMnode-ID.c b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-ID.c new file mode 100644 index 0000000..b16ba1d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-ID.c @@ -0,0 +1,89 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalKPMnode-ID.h" + +#include "GlobalKPMnode-gNB-ID.h" +#include "GlobalKPMnode-en-gNB-ID.h" +#include "GlobalKPMnode-ng-eNB-ID.h" +#include "GlobalKPMnode-eNB-ID.h" +static asn_oer_constraints_t asn_OER_type_GlobalKPMnode_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GlobalKPMnode_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GlobalKPMnode_ID_1[] = { + { ATF_POINTER, 0, offsetof(struct GlobalKPMnode_ID, choice.gNB), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalKPMnode_gNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalKPMnode_ID, choice.en_gNB), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalKPMnode_en_gNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "en-gNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalKPMnode_ID, choice.ng_eNB), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalKPMnode_ng_eNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalKPMnode_ID, choice.eNB), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalKPMnode_eNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eNB" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalKPMnode_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* en-gNB */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ng-eNB */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eNB */ +}; +asn_CHOICE_specifics_t asn_SPC_GlobalKPMnode_ID_specs_1 = { + sizeof(struct GlobalKPMnode_ID), + offsetof(struct GlobalKPMnode_ID, _asn_ctx), + offsetof(struct GlobalKPMnode_ID, present), + sizeof(((struct GlobalKPMnode_ID *)0)->present), + asn_MAP_GlobalKPMnode_ID_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_ID = { + "GlobalKPMnode-ID", + "GlobalKPMnode-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GlobalKPMnode_ID_constr_1, &asn_PER_type_GlobalKPMnode_ID_constr_1, CHOICE_constraint }, + asn_MBR_GlobalKPMnode_ID_1, + 4, /* Elements count */ + &asn_SPC_GlobalKPMnode_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalKPMnode-eNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-eNB-ID.c new file mode 100644 index 0000000..ae65253 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-eNB-ID.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalKPMnode-eNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalKPMnode_eNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalKPMnode_eNB_ID, global_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-eNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalKPMnode_eNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalKPMnode_eNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-eNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_eNB_ID_specs_1 = { + sizeof(struct GlobalKPMnode_eNB_ID), + offsetof(struct GlobalKPMnode_eNB_ID, _asn_ctx), + asn_MAP_GlobalKPMnode_eNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_eNB_ID = { + "GlobalKPMnode-eNB-ID", + "GlobalKPMnode-eNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalKPMnode_eNB_ID_tags_1, + sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalKPMnode_eNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalKPMnode_eNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GlobalKPMnode_eNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalKPMnode-en-gNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-en-gNB-ID.c new file mode 100644 index 0000000..0ad39cb --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-en-gNB-ID.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalKPMnode-en-gNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalKPMnode_en_gNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalKPMnode_en_gNB_ID, global_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalenGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-gNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalKPMnode_en_gNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalKPMnode_en_gNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-gNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_en_gNB_ID_specs_1 = { + sizeof(struct GlobalKPMnode_en_gNB_ID), + offsetof(struct GlobalKPMnode_en_gNB_ID, _asn_ctx), + asn_MAP_GlobalKPMnode_en_gNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_en_gNB_ID = { + "GlobalKPMnode-en-gNB-ID", + "GlobalKPMnode-en-gNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalKPMnode_en_gNB_ID_tags_1, + sizeof(asn_DEF_GlobalKPMnode_en_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_en_gNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalKPMnode_en_gNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalKPMnode_en_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_en_gNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalKPMnode_en_gNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GlobalKPMnode_en_gNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalKPMnode-gNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-gNB-ID.c new file mode 100644 index 0000000..1765922 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-gNB-ID.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalKPMnode-gNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalKPMnode_gNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalKPMnode_gNB_ID, global_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalgNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-gNB-ID" + }, + { ATF_POINTER, 2, offsetof(struct GlobalKPMnode_gNB_ID, gNB_CU_UP_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-ID" + }, + { ATF_POINTER, 1, offsetof(struct GlobalKPMnode_gNB_ID, gNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-ID" + }, +}; +static const int asn_MAP_GlobalKPMnode_gNB_ID_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_GlobalKPMnode_gNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalKPMnode_gNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-gNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-CU-UP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_gNB_ID_specs_1 = { + sizeof(struct GlobalKPMnode_gNB_ID), + offsetof(struct GlobalKPMnode_gNB_ID, _asn_ctx), + asn_MAP_GlobalKPMnode_gNB_ID_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_GlobalKPMnode_gNB_ID_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_gNB_ID = { + "GlobalKPMnode-gNB-ID", + "GlobalKPMnode-gNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalKPMnode_gNB_ID_tags_1, + sizeof(asn_DEF_GlobalKPMnode_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_gNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalKPMnode_gNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalKPMnode_gNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_gNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalKPMnode_gNB_ID_1, + 3, /* Elements count */ + &asn_SPC_GlobalKPMnode_gNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalKPMnode-ng-eNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-ng-eNB-ID.c new file mode 100644 index 0000000..aeaf7ab --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalKPMnode-ng-eNB-ID.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalKPMnode-ng-eNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalKPMnode_ng_eNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalKPMnode_ng_eNB_ID, global_ng_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalngeNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-ng-eNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalKPMnode_ng_eNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalKPMnode_ng_eNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-ng-eNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_ng_eNB_ID_specs_1 = { + sizeof(struct GlobalKPMnode_ng_eNB_ID), + offsetof(struct GlobalKPMnode_ng_eNB_ID, _asn_ctx), + asn_MAP_GlobalKPMnode_ng_eNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalKPMnode_ng_eNB_ID = { + "GlobalKPMnode-ng-eNB-ID", + "GlobalKPMnode-ng-eNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalKPMnode_ng_eNB_ID_tags_1, + sizeof(asn_DEF_GlobalKPMnode_ng_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_ng_eNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalKPMnode_ng_eNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalKPMnode_ng_eNB_ID_tags_1) + /sizeof(asn_DEF_GlobalKPMnode_ng_eNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalKPMnode_ng_eNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GlobalKPMnode_ng_eNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalNGRANNodeID.c b/Bouncer/e2sm_kpm/lib/GlobalNGRANNodeID.c new file mode 100644 index 0000000..53fc9fe --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalNGRANNodeID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GlobalNGRANNodeID.h" + +#include "GlobalGNB-ID.h" +#include "GlobalNgENB-ID.h" +asn_per_constraints_t asn_PER_type_GlobalNGRANNodeID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GlobalNGRANNodeID_1[] = { + { ATF_POINTER, 0, offsetof(struct GlobalNGRANNodeID, choice.gNB), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalNGRANNodeID, choice.ng_eNB), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalNgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalNGRANNodeID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ng-eNB */ +}; +asn_CHOICE_specifics_t asn_SPC_GlobalNGRANNodeID_specs_1 = { + sizeof(struct GlobalNGRANNodeID), + offsetof(struct GlobalNGRANNodeID, _asn_ctx), + offsetof(struct GlobalNGRANNodeID, present), + sizeof(((struct GlobalNGRANNodeID *)0)->present), + asn_MAP_GlobalNGRANNodeID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalNGRANNodeID = { + "GlobalNGRANNodeID", + "GlobalNGRANNodeID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_GlobalNGRANNodeID_constr_1, CHOICE_constraint }, + asn_MBR_GlobalNGRANNodeID_1, + 2, /* Elements count */ + &asn_SPC_GlobalNGRANNodeID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalNgENB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalNgENB-ID.c new file mode 100644 index 0000000..e0c693d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalNgENB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GlobalNgENB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalNgENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalNgENB_ID, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalNgENB_ID, ngENB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_NgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ngENB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalNgENB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalNgENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ngENB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalNgENB_ID_specs_1 = { + sizeof(struct GlobalNgENB_ID), + offsetof(struct GlobalNgENB_ID, _asn_ctx), + asn_MAP_GlobalNgENB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalNgENB_ID = { + "GlobalNgENB-ID", + "GlobalNgENB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalNgENB_ID_tags_1, + sizeof(asn_DEF_GlobalNgENB_ID_tags_1) + /sizeof(asn_DEF_GlobalNgENB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalNgENB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalNgENB_ID_tags_1) + /sizeof(asn_DEF_GlobalNgENB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalNgENB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalNgENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalenGNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalenGNB-ID.c new file mode 100644 index 0000000..aca7a85 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalenGNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GlobalenGNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, en_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_EN_GNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "en-gNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalenGNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalenGNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* en-gNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1 = { + sizeof(struct GlobalenGNB_ID), + offsetof(struct GlobalenGNB_ID, _asn_ctx), + asn_MAP_GlobalenGNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID = { + "GlobalenGNB-ID", + "GlobalenGNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalenGNB_ID_tags_1, + sizeof(asn_DEF_GlobalenGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalenGNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalenGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalenGNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalenGNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalgNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalgNB-ID.c new file mode 100644 index 0000000..746fb2c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalgNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalgNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalgNB_ID, plmn_id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "plmn-id" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalgNB_ID, gnb_id), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GNB_ID_Choice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gnb-id" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalgNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalgNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gnb-id */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalgNB_ID_specs_1 = { + sizeof(struct GlobalgNB_ID), + offsetof(struct GlobalgNB_ID, _asn_ctx), + asn_MAP_GlobalgNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalgNB_ID = { + "GlobalgNB-ID", + "GlobalgNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalgNB_ID_tags_1, + sizeof(asn_DEF_GlobalgNB_ID_tags_1) + /sizeof(asn_DEF_GlobalgNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalgNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalgNB_ID_tags_1) + /sizeof(asn_DEF_GlobalgNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalgNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalgNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GlobalngeNB-ID.c b/Bouncer/e2sm_kpm/lib/GlobalngeNB-ID.c new file mode 100644 index 0000000..878484a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GlobalngeNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalngeNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalngeNB_ID, plmn_id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "plmn-id" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalngeNB_ID, enb_id), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ENB_ID_Choice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "enb-id" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalngeNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalngeNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enb-id */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalngeNB_ID_specs_1 = { + sizeof(struct GlobalngeNB_ID), + offsetof(struct GlobalngeNB_ID, _asn_ctx), + asn_MAP_GlobalngeNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalngeNB_ID = { + "GlobalngeNB-ID", + "GlobalngeNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalngeNB_ID_tags_1, + sizeof(asn_DEF_GlobalngeNB_ID_tags_1) + /sizeof(asn_DEF_GlobalngeNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalngeNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalngeNB_ID_tags_1) + /sizeof(asn_DEF_GlobalngeNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalngeNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalngeNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GranularityPeriod.c b/Bouncer/e2sm_kpm/lib/GranularityPeriod.c new file mode 100644 index 0000000..1cf3c62 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GranularityPeriod.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GranularityPeriod.h" + +int +GranularityPeriod_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value >= 1 && value <= 4294967295)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_GranularityPeriod_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 1, 4294967295 } /* (1..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_GranularityPeriod_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_GranularityPeriod_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GranularityPeriod = { + "GranularityPeriod", + "GranularityPeriod", + &asn_OP_NativeInteger, + asn_DEF_GranularityPeriod_tags_1, + sizeof(asn_DEF_GranularityPeriod_tags_1) + /sizeof(asn_DEF_GranularityPeriod_tags_1[0]), /* 1 */ + asn_DEF_GranularityPeriod_tags_1, /* Same as above */ + sizeof(asn_DEF_GranularityPeriod_tags_1) + /sizeof(asn_DEF_GranularityPeriod_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_GranularityPeriod_constr_1, GranularityPeriod_constraint }, + 0, 0, /* No members */ + &asn_SPC_GranularityPeriod_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GraphicString.c b/Bouncer/e2sm_kpm/lib/GraphicString.c new file mode 100644 index 0000000..e6642c9 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GraphicString.c @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2003 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * GraphicString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_GraphicString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (25 << 2)), /* [UNIVERSAL 25] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +asn_TYPE_operation_t asn_OP_GraphicString = { + OCTET_STRING_free, + OCTET_STRING_print, /* non-ascii string */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, /* Can't expect it to be ASCII/UTF8 */ +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_GraphicString = { + "GraphicString", + "GraphicString", + &asn_OP_GraphicString, + asn_DEF_GraphicString_tags, + sizeof(asn_DEF_GraphicString_tags) + / sizeof(asn_DEF_GraphicString_tags[0]) - 1, + asn_DEF_GraphicString_tags, + sizeof(asn_DEF_GraphicString_tags) + / sizeof(asn_DEF_GraphicString_tags[0]), + { 0, 0, asn_generic_unknown_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/GroupID.c b/Bouncer/e2sm_kpm/lib/GroupID.c new file mode 100644 index 0000000..8eaff0e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/GroupID.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "GroupID.h" + +static asn_per_constraints_t asn_PER_type_GroupID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_GroupID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GroupID, choice.fiveGC), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FiveQI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveGC" + }, + { ATF_NOFLAGS, 0, offsetof(struct GroupID, choice.ePC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ePC" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GroupID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveGC */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ePC */ +}; +static asn_CHOICE_specifics_t asn_SPC_GroupID_specs_1 = { + sizeof(struct GroupID), + offsetof(struct GroupID, _asn_ctx), + offsetof(struct GroupID, present), + sizeof(((struct GroupID *)0)->present), + asn_MAP_GroupID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GroupID = { + "GroupID", + "GroupID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_GroupID_constr_1, CHOICE_constraint }, + asn_MBR_GroupID_1, + 2, /* Elements count */ + &asn_SPC_GroupID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/IA5String.c b/Bouncer/e2sm_kpm/lib/IA5String.c new file mode 100644 index 0000000..1aeebf4 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/IA5String.c @@ -0,0 +1,97 @@ +/*- + * Copyright (c) 2003 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * IA5String basic type description. + */ +static const ber_tlv_tag_t asn_DEF_IA5String_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), /* [UNIVERSAL 22] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +static asn_per_constraints_t asn_DEF_IA5String_per_constraints = { + { APC_CONSTRAINED, 7, 7, 0, 0x7f }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + 0, 0 +}; +asn_TYPE_operation_t asn_OP_IA5String = { + OCTET_STRING_free, + OCTET_STRING_print_utf8, /* ASCII subset */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_IA5String = { + "IA5String", + "IA5String", + &asn_OP_IA5String, + asn_DEF_IA5String_tags, + sizeof(asn_DEF_IA5String_tags) + / sizeof(asn_DEF_IA5String_tags[0]) - 1, + asn_DEF_IA5String_tags, + sizeof(asn_DEF_IA5String_tags) + / sizeof(asn_DEF_IA5String_tags[0]), + { 0, &asn_DEF_IA5String_per_constraints, IA5String_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +int +IA5String_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const IA5String_t *st = (const IA5String_t *)sptr; + + if(st && st->buf) { + uint8_t *buf = st->buf; + uint8_t *end = buf + st->size; + /* + * IA5String is generally equivalent to 7bit ASCII. + * ISO/ITU-T T.50, 1963. + */ + for(; buf < end; buf++) { + if(*buf > 0x7F) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value byte %ld out of range: " + "%d > 127 (%s:%d)", + td->name, + (long)((buf - st->buf) + 1), + *buf, + __FILE__, __LINE__); + return -1; + } + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + return 0; +} + diff --git a/Bouncer/e2sm_kpm/lib/INTEGER.c b/Bouncer/e2sm_kpm/lib/INTEGER.c new file mode 100644 index 0000000..2a2f4d7 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/INTEGER.c @@ -0,0 +1,1735 @@ +/*- + * Copyright (c) 2003-2014 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* Encoder and decoder of a primitive type */ +#include + +/* + * INTEGER basic type description. + */ +static const ber_tlv_tag_t asn_DEF_INTEGER_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_operation_t asn_OP_INTEGER = { + INTEGER_free, + INTEGER_print, + INTEGER_compare, + ber_decode_primitive, + INTEGER_encode_der, + INTEGER_decode_xer, + INTEGER_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + INTEGER_decode_oer, /* OER decoder */ + INTEGER_encode_oer, /* Canonical OER encoder */ +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + INTEGER_decode_uper, /* Unaligned PER decoder */ + INTEGER_encode_uper, /* Unaligned PER encoder */ + INTEGER_decode_aper, /* Aligned PER decoder */ + INTEGER_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + INTEGER_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_INTEGER = { + "INTEGER", + "INTEGER", + &asn_OP_INTEGER, + asn_DEF_INTEGER_tags, + sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), + asn_DEF_INTEGER_tags, /* Same as above */ + sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +/* + * Encode INTEGER type using DER. + */ +asn_enc_rval_t +INTEGER_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + asn_enc_rval_t rval; + INTEGER_t effective_integer; + + ASN_DEBUG("%s %s as INTEGER (tm=%d)", + cb?"Encoding":"Estimating", td->name, tag_mode); + + /* + * Canonicalize integer in the buffer. + * (Remove too long sign extension, remove some first 0x00 bytes) + */ + if(st->buf) { + uint8_t *buf = st->buf; + uint8_t *end1 = buf + st->size - 1; + int shift; + + /* Compute the number of superfluous leading bytes */ + for(; buf < end1; buf++) { + /* + * If the contents octets of an integer value encoding + * consist of more than one octet, then the bits of the + * first octet and bit 8 of the second octet: + * a) shall not all be ones; and + * b) shall not all be zero. + */ + switch(*buf) { + case 0x00: if((buf[1] & 0x80) == 0) + continue; + break; + case 0xff: if((buf[1] & 0x80)) + continue; + break; + } + break; + } + + /* Remove leading superfluous bytes from the integer */ + shift = buf - st->buf; + if(shift) { + union { + const uint8_t *c_buf; + uint8_t *nc_buf; + } unconst; + unconst.c_buf = st->buf; + effective_integer.buf = unconst.nc_buf + shift; + effective_integer.size = st->size - shift; + + st = &effective_integer; + } + } + + rval = der_encode_primitive(td, st, tag_mode, tag, cb, app_key); + if(rval.structure_ptr == &effective_integer) { + rval.structure_ptr = sptr; + } + return rval; +} + +static const asn_INTEGER_enum_map_t *INTEGER_map_enum2value( + const asn_INTEGER_specifics_t *specs, const char *lstart, + const char *lstop); + +/* + * INTEGER specific human-readable output. + */ +static ssize_t +INTEGER__dump(const asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + char scratch[32]; + uint8_t *buf = st->buf; + uint8_t *buf_end = st->buf + st->size; + intmax_t value; + ssize_t wrote = 0; + char *p; + int ret; + + if(specs && specs->field_unsigned) + ret = asn_INTEGER2umax(st, (uintmax_t *)&value); + else + ret = asn_INTEGER2imax(st, &value); + + /* Simple case: the integer size is small */ + if(ret == 0) { + const asn_INTEGER_enum_map_t *el; + el = (value >= 0 || !specs || !specs->field_unsigned) + ? INTEGER_map_value2enum(specs, value) : 0; + if(el) { + if(plainOrXER == 0) + return asn__format_to_callback(cb, app_key, + "%" ASN_PRIdMAX " (%s)", value, el->enum_name); + else + return asn__format_to_callback(cb, app_key, + "<%s/>", el->enum_name); + } else if(plainOrXER && specs && specs->strict_enumeration) { + ASN_DEBUG("ASN.1 forbids dealing with " + "unknown value of ENUMERATED type"); + errno = EPERM; + return -1; + } else { + return asn__format_to_callback(cb, app_key, + (specs && specs->field_unsigned) + ? "%" ASN_PRIuMAX + : "%" ASN_PRIdMAX, + value); + } + } else if(plainOrXER && specs && specs->strict_enumeration) { + /* + * Here and earlier, we cannot encode the ENUMERATED values + * if there is no corresponding identifier. + */ + ASN_DEBUG("ASN.1 forbids dealing with " + "unknown value of ENUMERATED type"); + errno = EPERM; + return -1; + } + + /* Output in the long xx:yy:zz... format */ + /* TODO: replace with generic algorithm (Knuth TAOCP Vol 2, 4.3.1) */ + for(p = scratch; buf < buf_end; buf++) { + const char * const h2c = "0123456789ABCDEF"; + if((p - scratch) >= (ssize_t)(sizeof(scratch) - 4)) { + /* Flush buffer */ + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + wrote += p - scratch; + p = scratch; + } + *p++ = h2c[*buf >> 4]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x3a; /* ":" */ + } + if(p != scratch) + p--; /* Remove the last ":" */ + + wrote += p - scratch; + return (cb(scratch, p - scratch, app_key) < 0) ? -1 : wrote; +} + +/* + * INTEGER specific human-readable output. + */ +int +INTEGER_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + ssize_t ret; + + (void)ilevel; + + if(!st || !st->buf) + ret = cb("", 8, app_key); + else + ret = INTEGER__dump(td, st, cb, app_key, 0); + + return (ret < 0) ? -1 : 0; +} + +struct e2v_key { + const char *start; + const char *stop; + const asn_INTEGER_enum_map_t *vemap; + const unsigned int *evmap; +}; +static int +INTEGER__compar_enum2value(const void *kp, const void *am) { + const struct e2v_key *key = (const struct e2v_key *)kp; + const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am; + const char *ptr, *end, *name; + + /* Remap the element (sort by different criterion) */ + el = key->vemap + key->evmap[el - key->vemap]; + + /* Compare strings */ + for(ptr = key->start, end = key->stop, name = el->enum_name; + ptr < end; ptr++, name++) { + if(*ptr != *name || !*name) + return *(const unsigned char *)ptr + - *(const unsigned char *)name; + } + return name[0] ? -1 : 0; +} + +static const asn_INTEGER_enum_map_t * +INTEGER_map_enum2value(const asn_INTEGER_specifics_t *specs, const char *lstart, + const char *lstop) { + const asn_INTEGER_enum_map_t *el_found; + int count = specs ? specs->map_count : 0; + struct e2v_key key; + const char *lp; + + if(!count) return NULL; + + /* Guaranteed: assert(lstart < lstop); */ + /* Figure out the tag name */ + for(lstart++, lp = lstart; lp < lstop; lp++) { + switch(*lp) { + case 9: case 10: case 11: case 12: case 13: case 32: /* WSP */ + case 0x2f: /* '/' */ case 0x3e: /* '>' */ + break; + default: + continue; + } + break; + } + if(lp == lstop) return NULL; /* No tag found */ + lstop = lp; + + key.start = lstart; + key.stop = lstop; + key.vemap = specs->value2enum; + key.evmap = specs->enum2value; + el_found = (asn_INTEGER_enum_map_t *)bsearch(&key, + specs->value2enum, count, sizeof(specs->value2enum[0]), + INTEGER__compar_enum2value); + if(el_found) { + /* Remap enum2value into value2enum */ + el_found = key.vemap + key.evmap[el_found - key.vemap]; + } + return el_found; +} + +static int +INTEGER__compar_value2enum(const void *kp, const void *am) { + long a = *(const long *)kp; + const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am; + long b = el->nat_value; + if(a < b) return -1; + else if(a == b) return 0; + else return 1; +} + +const asn_INTEGER_enum_map_t * +INTEGER_map_value2enum(const asn_INTEGER_specifics_t *specs, long value) { + int count = specs ? specs->map_count : 0; + if(!count) return 0; + return (asn_INTEGER_enum_map_t *)bsearch(&value, specs->value2enum, + count, sizeof(specs->value2enum[0]), + INTEGER__compar_value2enum); +} + +static int +INTEGER_st_prealloc(INTEGER_t *st, int min_size) { + void *p = MALLOC(min_size + 1); + if(p) { + void *b = st->buf; + st->size = 0; + st->buf = p; + FREEMEM(b); + return 0; + } else { + return -1; + } +} + +/* + * Decode the chunk of XML text encoding INTEGER. + */ +static enum xer_pbd_rval +INTEGER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + INTEGER_t *st = (INTEGER_t *)sptr; + intmax_t dec_value; + intmax_t hex_value = 0; + const char *lp; + const char *lstart = (const char *)chunk_buf; + const char *lstop = lstart + chunk_size; + enum { + ST_LEADSPACE, + ST_SKIPSPHEX, + ST_WAITDIGITS, + ST_DIGITS, + ST_DIGITS_TRAILSPACE, + ST_HEXDIGIT1, + ST_HEXDIGIT2, + ST_HEXDIGITS_TRAILSPACE, + ST_HEXCOLON, + ST_END_ENUM, + ST_UNEXPECTED + } state = ST_LEADSPACE; + const char *dec_value_start = 0; /* INVARIANT: always !0 in ST_DIGITS */ + const char *dec_value_end = 0; + + if(chunk_size) + ASN_DEBUG("INTEGER body %ld 0x%2x..0x%2x", + (long)chunk_size, *lstart, lstop[-1]); + + if(INTEGER_st_prealloc(st, (chunk_size/3) + 1)) + return XPBD_SYSTEM_FAILURE; + + /* + * We may have received a tag here. It will be processed inline. + * Use strtoul()-like code and serialize the result. + */ + for(lp = lstart; lp < lstop; lp++) { + int lv = *lp; + switch(lv) { + case 0x09: case 0x0a: case 0x0d: case 0x20: + switch(state) { + case ST_LEADSPACE: + case ST_DIGITS_TRAILSPACE: + case ST_HEXDIGITS_TRAILSPACE: + case ST_SKIPSPHEX: + continue; + case ST_DIGITS: + dec_value_end = lp; + state = ST_DIGITS_TRAILSPACE; + continue; + case ST_HEXCOLON: + state = ST_HEXDIGITS_TRAILSPACE; + continue; + default: + break; + } + break; + case 0x2d: /* '-' */ + if(state == ST_LEADSPACE) { + dec_value = 0; + dec_value_start = lp; + state = ST_WAITDIGITS; + continue; + } + break; + case 0x2b: /* '+' */ + if(state == ST_LEADSPACE) { + dec_value = 0; + dec_value_start = lp; + state = ST_WAITDIGITS; + continue; + } + break; + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + switch(state) { + case ST_DIGITS: continue; + case ST_SKIPSPHEX: /* Fall through */ + case ST_HEXDIGIT1: + hex_value = (lv - 0x30) << 4; + state = ST_HEXDIGIT2; + continue; + case ST_HEXDIGIT2: + hex_value += (lv - 0x30); + state = ST_HEXCOLON; + st->buf[st->size++] = (uint8_t)hex_value; + continue; + case ST_HEXCOLON: + return XPBD_BROKEN_ENCODING; + case ST_LEADSPACE: + dec_value = 0; + dec_value_start = lp; + /* FALL THROUGH */ + case ST_WAITDIGITS: + state = ST_DIGITS; + continue; + default: + break; + } + break; + case 0x3c: /* '<', start of XML encoded enumeration */ + if(state == ST_LEADSPACE) { + const asn_INTEGER_enum_map_t *el; + el = INTEGER_map_enum2value( + (const asn_INTEGER_specifics_t *) + td->specifics, lstart, lstop); + if(el) { + ASN_DEBUG("Found \"%s\" => %ld", + el->enum_name, el->nat_value); + dec_value = el->nat_value; + state = ST_END_ENUM; + lp = lstop - 1; + continue; + } + ASN_DEBUG("Unknown identifier for INTEGER"); + } + return XPBD_BROKEN_ENCODING; + case 0x3a: /* ':' */ + if(state == ST_HEXCOLON) { + /* This colon is expected */ + state = ST_HEXDIGIT1; + continue; + } else if(state == ST_DIGITS) { + /* The colon here means that we have + * decoded the first two hexadecimal + * places as a decimal value. + * Switch decoding mode. */ + ASN_DEBUG("INTEGER re-evaluate as hex form"); + state = ST_SKIPSPHEX; + dec_value_start = 0; + lp = lstart - 1; + continue; + } else { + ASN_DEBUG("state %d at %ld", state, (long)(lp - lstart)); + break; + } + /* [A-Fa-f] */ + case 0x41:case 0x42:case 0x43:case 0x44:case 0x45:case 0x46: + case 0x61:case 0x62:case 0x63:case 0x64:case 0x65:case 0x66: + switch(state) { + case ST_SKIPSPHEX: + case ST_LEADSPACE: /* Fall through */ + case ST_HEXDIGIT1: + hex_value = lv - ((lv < 0x61) ? 0x41 : 0x61); + hex_value += 10; + hex_value <<= 4; + state = ST_HEXDIGIT2; + continue; + case ST_HEXDIGIT2: + hex_value += lv - ((lv < 0x61) ? 0x41 : 0x61); + hex_value += 10; + st->buf[st->size++] = (uint8_t)hex_value; + state = ST_HEXCOLON; + continue; + case ST_DIGITS: + ASN_DEBUG("INTEGER re-evaluate as hex form"); + state = ST_SKIPSPHEX; + dec_value_start = 0; + lp = lstart - 1; + continue; + default: + break; + } + break; + } + + /* Found extra non-numeric stuff */ + ASN_DEBUG("INTEGER :: Found non-numeric 0x%2x at %ld", + lv, (long)(lp - lstart)); + state = ST_UNEXPECTED; + break; + } + + switch(state) { + case ST_END_ENUM: + /* Got a complete and valid enumeration encoded as a tag. */ + break; + case ST_DIGITS: + dec_value_end = lstop; + /* FALL THROUGH */ + case ST_DIGITS_TRAILSPACE: + /* The last symbol encountered was a digit. */ + switch(asn_strtoimax_lim(dec_value_start, &dec_value_end, &dec_value)) { + case ASN_STRTOX_OK: + if(specs && specs->field_unsigned && (uintmax_t) dec_value <= ULONG_MAX) { + break; + } else if(dec_value >= LONG_MIN && dec_value <= LONG_MAX) { + break; + } else { + /* + * We model INTEGER on long for XER, + * to avoid rewriting all the tests at once. + */ + ASN_DEBUG("INTEGER exceeds long range"); + } + /* Fall through */ + case ASN_STRTOX_ERROR_RANGE: + ASN_DEBUG("INTEGER decode %s hit range limit", td->name); + return XPBD_DECODER_LIMIT; + case ASN_STRTOX_ERROR_INVAL: + case ASN_STRTOX_EXPECT_MORE: + case ASN_STRTOX_EXTRA_DATA: + return XPBD_BROKEN_ENCODING; + } + break; + case ST_HEXCOLON: + case ST_HEXDIGITS_TRAILSPACE: + st->buf[st->size] = 0; /* Just in case termination */ + return XPBD_BODY_CONSUMED; + case ST_HEXDIGIT1: + case ST_HEXDIGIT2: + case ST_SKIPSPHEX: + return XPBD_BROKEN_ENCODING; + case ST_LEADSPACE: + /* Content not found */ + return XPBD_NOT_BODY_IGNORE; + case ST_WAITDIGITS: + case ST_UNEXPECTED: + ASN_DEBUG("INTEGER: No useful digits (state %d)", state); + return XPBD_BROKEN_ENCODING; /* No digits */ + } + + /* + * Convert the result of parsing of enumeration or a straight + * decimal value into a BER representation. + */ + if(asn_imax2INTEGER(st, dec_value)) { + ASN_DEBUG("INTEGER decode %s conversion failed", td->name); + return XPBD_SYSTEM_FAILURE; + } + + return XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +INTEGER_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + return xer_decode_primitive(opt_codec_ctx, td, + sptr, sizeof(INTEGER_t), opt_mname, + buf_ptr, size, INTEGER__xer_body_decode); +} + +asn_enc_rval_t +INTEGER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) + ASN__ENCODE_FAILED; + + er.encoded = INTEGER__dump(td, st, cb, app_key, 1); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + INTEGER_t *st = (INTEGER_t *)*sptr; + const asn_per_constraint_t *ct; + int repeat; + + (void)opt_codec_ctx; + + if(!st) { + st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + if(ct) { + if(ct->flags & APC_SEMI_CONSTRAINED) { + st->buf = (uint8_t *)CALLOC(1, 2); + if(!st->buf) ASN__DECODE_FAILED; + st->size = 1; + } else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) { + size_t size = (ct->range_bits + 7) >> 3; + st->buf = (uint8_t *)MALLOC(1 + size + 1); + if(!st->buf) ASN__DECODE_FAILED; + st->size = size; + } + } + + /* X.691-2008/11, #13.2.2, constrained whole number */ + if(ct && ct->flags != APC_UNCONSTRAINED) { + /* #11.5.6 */ + ASN_DEBUG("Integer with range %d bits", ct->range_bits); + if(ct->range_bits >= 0) { + if((size_t)ct->range_bits > 8 * sizeof(unsigned long)) + ASN__DECODE_FAILED; + + if(specs && specs->field_unsigned) { + unsigned long uvalue = 0; + if(uper_get_constrained_whole_number(pd, + &uvalue, ct->range_bits)) + ASN__DECODE_STARVED; + ASN_DEBUG("Got value %lu + low %ld", + uvalue, ct->lower_bound); + uvalue += ct->lower_bound; + if(asn_ulong2INTEGER(st, uvalue)) + ASN__DECODE_FAILED; + } else { + unsigned long uvalue = 0; + long svalue; + if(uper_get_constrained_whole_number(pd, + &uvalue, ct->range_bits)) + ASN__DECODE_STARVED; + ASN_DEBUG("Got value %lu + low %ld", + uvalue, ct->lower_bound); + if(per_long_range_unrebase(uvalue, ct->lower_bound, + ct->upper_bound, &svalue) + || asn_long2INTEGER(st, svalue)) { + ASN__DECODE_FAILED; + } + } + return rval; + } + } else { + ASN_DEBUG("Decoding unconstrained integer %s", td->name); + } + + /* X.691, #12.2.3, #12.2.4 */ + do { + ssize_t len = 0; + void *p = NULL; + int ret = 0; + + /* Get the PER length */ + len = uper_get_length(pd, -1, 0, &repeat); + if(len < 0) ASN__DECODE_STARVED; + + p = REALLOC(st->buf, st->size + len + 1); + if(!p) ASN__DECODE_FAILED; + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len); + if(ret < 0) ASN__DECODE_STARVED; + st->size += len; + } while(repeat); + st->buf[st->size] = 0; /* JIC */ + + /* #12.2.3 */ + if(ct && ct->lower_bound) { + /* + * TODO: replace by in-place arithmetics. + */ + long value = 0; + if(asn_INTEGER2long(st, &value)) + ASN__DECODE_FAILED; + if(asn_imax2INTEGER(st, value + ct->lower_bound)) + ASN__DECODE_FAILED; + } + + return rval; +} + +asn_enc_rval_t +INTEGER_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + const INTEGER_t *st = (const INTEGER_t *)sptr; + const uint8_t *buf; + const uint8_t *end; + const asn_per_constraint_t *ct; + long value = 0; + + if(!st || st->size == 0) ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + er.encoded = 0; + + if(ct) { + int inext = 0; + if(specs && specs->field_unsigned) { + unsigned long uval; + if(asn_INTEGER2ulong(st, &uval)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(uval < (unsigned long)ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(uval < (unsigned long)ct->lower_bound + || uval > (unsigned long)ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%" ASN_PRI_SIZE ") lb %lu ub %lu %s", + uval, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + value = uval; + } else { + if(asn_INTEGER2long(st, &value)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value < ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value < ct->lower_bound + || value > ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %ld (%02x/%" ASN_PRI_SIZE ") lb %ld ub %ld %s", + value, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + } + if(ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + } + + + /* X.691-11/2008, #13.2.2, test if constrained whole number */ + if(ct && ct->range_bits >= 0) { + unsigned long v; + /* #11.5.6 -> #11.3 */ + ASN_DEBUG("Encoding integer %ld (%lu) with range %d bits", + value, value - ct->lower_bound, ct->range_bits); + if(specs && specs->field_unsigned) { + if ( ((unsigned long)ct->lower_bound > (unsigned long)(ct->upper_bound) + || ((unsigned long)value < (unsigned long)ct->lower_bound)) + || ((unsigned long)value > (unsigned long)ct->upper_bound) + ) { + ASN_DEBUG("Value %lu to-be-encoded is outside the bounds [%lu, %lu]!", + value, ct->lower_bound, ct->upper_bound); + ASN__ENCODE_FAILED; + } + v = (unsigned long)value - (unsigned long)ct->lower_bound; + } else { + if(per_long_range_rebase(value, ct->lower_bound, ct->upper_bound, &v)) { + ASN__ENCODE_FAILED; + } + } + if(uper_put_constrained_whole_number_u(po, v, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(ct && ct->lower_bound) { + ASN_DEBUG("Adjust lower bound to %ld", ct->lower_bound); + /* TODO: adjust lower bound */ + ASN__ENCODE_FAILED; + } + + for(buf = st->buf, end = st->buf + st->size; buf < end;) { + int need_eom = 0; + ssize_t mayEncode = uper_put_length(po, end - buf, &need_eom); + if(mayEncode < 0) + ASN__ENCODE_FAILED; + if(per_put_many_bits(po, buf, 8 * mayEncode)) + ASN__ENCODE_FAILED; + buf += mayEncode; + if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; + } + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + INTEGER_t *st = (INTEGER_t *)*sptr; + const asn_per_constraint_t *ct; + int repeat; + + (void)opt_codec_ctx; + + if(!st) { + st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + if(ct) { + if(ct->flags & APC_SEMI_CONSTRAINED) { + st->buf = (uint8_t *)CALLOC(1, 2); + if(!st->buf) ASN__DECODE_FAILED; + st->size = 1; + } else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) { + size_t size = (ct->range_bits + 7) >> 3; + st->buf = (uint8_t *)MALLOC(1 + size + 1); + if(!st->buf) ASN__DECODE_FAILED; + st->size = size; + } + } + + /* X.691, #12.2.2 */ + if(ct && ct->flags != APC_UNCONSTRAINED) { + /* #10.5.6 */ + ASN_DEBUG("Integer with range %d bits", ct->range_bits); + if(ct->range_bits >= 0) { + if (ct->range_bits > 16) { + int max_range_bytes = (ct->range_bits >> 3) + + (((ct->range_bits % 8) > 0) ? 1 : 0); + int length = 0, i; + long value = 0; + + for (i = 1; ; i++) { + int upper = 1 << i; + if (upper >= max_range_bytes) + break; + } + ASN_DEBUG("Can encode %d (%d bytes) in %d bits", ct->range_bits, + max_range_bytes, i); + + if ((length = per_get_few_bits(pd, i)) < 0) + ASN__DECODE_FAILED; + + /* X.691 #12.2.6 length determinant + lb (1) */ + length += 1; + ASN_DEBUG("Got length %d", length); + if (aper_get_align(pd) != 0) + ASN__DECODE_FAILED; + while (length--) { + int buf = per_get_few_bits(pd, 8); + if (buf < 0) + ASN__DECODE_FAILED; + value += (((long)buf) << (8 * length)); + } + + value += ct->lower_bound; + if((specs && specs->field_unsigned) + ? asn_uint642INTEGER(st, (unsigned long)value) + : asn_int642INTEGER(st, value)) + ASN__DECODE_FAILED; + ASN_DEBUG("Got value %ld + low %ld", + value, ct->lower_bound); + } else { + long value = 0; + if (ct->range_bits < 8) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + } else if (ct->range_bits == 8) { + if (aper_get_align(pd) < 0) + ASN__DECODE_FAILED; + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + } else { + /* Align */ + if (aper_get_align(pd) < 0) + ASN__DECODE_FAILED; + value = per_get_few_bits(pd, 16); + if(value < 0) ASN__DECODE_STARVED; + } + value += ct->lower_bound; + if((specs && specs->field_unsigned) + ? asn_ulong2INTEGER(st, value) + : asn_long2INTEGER(st, value)) + ASN__DECODE_FAILED; + ASN_DEBUG("Got value %ld + low %ld", + value, ct->lower_bound); + } + return rval; + } else { + ASN__DECODE_FAILED; + } + } else { + ASN_DEBUG("Decoding unconstrained integer %s", td->name); + } + + /* X.691, #12.2.3, #12.2.4 */ + do { + ssize_t len; + void *p; + int ret; + + /* Get the PER length */ + len = aper_get_length(pd, -1, -1, &repeat); + if(len < 0) ASN__DECODE_STARVED; + + p = REALLOC(st->buf, st->size + len + 1); + if(!p) ASN__DECODE_FAILED; + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len); + if(ret < 0) ASN__DECODE_STARVED; + st->size += len; + } while(repeat); + st->buf[st->size] = 0; /* JIC */ + + /* #12.2.3 */ + if(ct && ct->lower_bound) { + /* + * TODO: replace by in-place arithmetics. + */ + long value; + if(asn_INTEGER2long(st, &value)) + ASN__DECODE_FAILED; + if(asn_long2INTEGER(st, value + ct->lower_bound)) + ASN__DECODE_FAILED; + } + + return rval; +} + +asn_enc_rval_t +INTEGER_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + const INTEGER_t *st = (const INTEGER_t *)sptr; + const uint8_t *buf; + const uint8_t *end; + const asn_per_constraint_t *ct; + long value = 0; + + if(!st || st->size == 0) ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + er.encoded = 0; + + if(ct) { + int inext = 0; + if(specs && specs->field_unsigned) { + unsigned long uval; + if(asn_INTEGER2ulong(st, &uval)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(uval < (unsigned long)ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(uval < (unsigned long)ct->lower_bound + || uval > (unsigned long)ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%lu) lb %ld ub %ld %s", + uval, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + value = uval; + } else { + if(asn_INTEGER2long(st, &value)) ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value < ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value < ct->lower_bound + || value > ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%lu) lb %ld ub %ld %s", + value, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + } + if(ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + } + + /* X.691, #12.2.2 */ + if(ct && ct->range_bits >= 0) { + unsigned long v; + + /* #10.5.6 */ + ASN_DEBUG("Encoding integer %ld (%lu) with range %d bits", + value, value - ct->lower_bound, ct->range_bits); + + v = value - ct->lower_bound; + + /* #12 <= 8 -> alignment ? */ + if (ct->range_bits < 8) { + if(per_put_few_bits(po, 0x00 | v, ct->range_bits)) + ASN__ENCODE_FAILED; + } else if (ct->range_bits == 8) { + if(aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + if(per_put_few_bits(po, 0x00 | v, ct->range_bits)) + ASN__ENCODE_FAILED; + } else if (ct->range_bits <= 16) { + /* Consume the bytes to align on octet */ + if(aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + if(per_put_few_bits(po, 0x0000 | v, + 16)) + ASN__ENCODE_FAILED; + } else { + /* TODO: extend to >64 bits */ + int64_t v64 = v; + int i, j; + int max_range_bytes = (ct->range_bits >> 3) + + (((ct->range_bits % 8) > 0) ? 1 : 0); + + for (i = 1; ; i++) { + int upper = 1 << i; + if (upper >= max_range_bytes) + break; + } + + for (j = sizeof(int64_t) -1; j != 0; j--) { + int64_t val; + val = v64 >> (j * 8); + if (val != 0) + break; + } + + /* Putting length in the minimum number of bits ex: 5 = 3bits */ + if (per_put_few_bits(po, j, i)) + ASN__ENCODE_FAILED; + + /* Consume the bits to align on octet */ + if (aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + /* Put the value */ + for (i = 0; i <= j; i++) { + if(per_put_few_bits(po, (v64 >> (8 * (j - i))) & 0xff, 8)) + ASN__ENCODE_FAILED; + } + } + ASN__ENCODED_OK(er); + } + + if(ct && ct->lower_bound) { + ASN_DEBUG("Adjust lower bound to %ld", ct->lower_bound); + /* TODO: adjust lower bound */ + ASN__ENCODE_FAILED; + } + + for(buf = st->buf, end = st->buf + st->size; buf < end;) { + ssize_t mayEncode = aper_put_length(po, -1, end - buf); + if(mayEncode < 0) + ASN__ENCODE_FAILED; + if(per_put_many_bits(po, buf, 8 * mayEncode)) + ASN__ENCODE_FAILED; + buf += mayEncode; + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +static intmax_t +asn__integer_convert(const uint8_t *b, const uint8_t *end) { + uintmax_t value; + + /* Perform the sign initialization */ + /* Actually value = -(*b >> 7); gains nothing, yet unreadable! */ + if((*b >> 7)) { + value = (uintmax_t)(-1); + } else { + value = 0; + } + + /* Conversion engine */ + for(; b < end; b++) { + value = (value << 8) | *b; + } + + return value; +} + +int +asn_INTEGER2imax(const INTEGER_t *iptr, intmax_t *lptr) { + uint8_t *b, *end; + size_t size; + + /* Sanity checking */ + if(!iptr || !iptr->buf || !lptr) { + errno = EINVAL; + return -1; + } + + /* Cache the begin/end of the buffer */ + b = iptr->buf; /* Start of the INTEGER buffer */ + size = iptr->size; + end = b + size; /* Where to stop */ + + if(size > sizeof(intmax_t)) { + uint8_t *end1 = end - 1; + /* + * Slightly more advanced processing, + * able to process INTEGERs with >sizeof(intmax_t) bytes + * when the actual value is small, e.g. for intmax_t == int32_t + * (0x0000000000abcdef INTEGER would yield a fine 0x00abcdef int32_t) + */ + /* Skip out the insignificant leading bytes */ + for(; b < end1; b++) { + switch(*b) { + case 0x00: if((b[1] & 0x80) == 0) continue; break; + case 0xff: if((b[1] & 0x80) != 0) continue; break; + } + break; + } + + size = end - b; + if(size > sizeof(intmax_t)) { + /* Still cannot fit the sizeof(intmax_t) */ + errno = ERANGE; + return -1; + } + } + + /* Shortcut processing of a corner case */ + if(end == b) { + *lptr = 0; + return 0; + } + + *lptr = asn__integer_convert(b, end); + return 0; +} + +/* FIXME: negative INTEGER values are silently interpreted as large unsigned ones. */ +int +asn_INTEGER2umax(const INTEGER_t *iptr, uintmax_t *lptr) { + uint8_t *b, *end; + uintmax_t value; + size_t size; + + if(!iptr || !iptr->buf || !lptr) { + errno = EINVAL; + return -1; + } + + b = iptr->buf; + size = iptr->size; + end = b + size; + + /* If all extra leading bytes are zeroes, ignore them */ + for(; size > sizeof(value); b++, size--) { + if(*b) { + /* Value won't fit into uintmax_t */ + errno = ERANGE; + return -1; + } + } + + /* Conversion engine */ + for(value = 0; b < end; b++) + value = (value << 8) | *b; + + *lptr = value; + return 0; +} + +int +asn_umax2INTEGER(INTEGER_t *st, uintmax_t value) { + uint8_t *buf; + uint8_t *end; + uint8_t *b; + int shr; + + if(value <= ((~(uintmax_t)0) >> 1)) { + return asn_imax2INTEGER(st, value); + } + + buf = (uint8_t *)MALLOC(1 + sizeof(value)); + if(!buf) return -1; + + end = buf + (sizeof(value) + 1); + buf[0] = 0; /* INTEGERs are signed. 0-byte indicates positive. */ + for(b = buf + 1, shr = (sizeof(value) - 1) * 8; b < end; shr -= 8, b++) + *b = (uint8_t)(value >> shr); + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = 1 + sizeof(value); + + return 0; +} + +int +asn_imax2INTEGER(INTEGER_t *st, intmax_t value) { + uint8_t *buf, *bp; + uint8_t *p; + uint8_t *pstart; + uint8_t *pend1; + int littleEndian = 1; /* Run-time detection */ + int add; + + if(!st) { + errno = EINVAL; + return -1; + } + + buf = (uint8_t *)(long *)MALLOC(sizeof(value)); + if(!buf) return -1; + + if(*(char *)&littleEndian) { + pstart = (uint8_t *)&value + sizeof(value) - 1; + pend1 = (uint8_t *)&value; + add = -1; + } else { + pstart = (uint8_t *)&value; + pend1 = pstart + sizeof(value) - 1; + add = 1; + } + + /* + * If the contents octet consists of more than one octet, + * then bits of the first octet and bit 8 of the second octet: + * a) shall not all be ones; and + * b) shall not all be zero. + */ + for(p = pstart; p != pend1; p += add) { + switch(*p) { + case 0x00: if((*(p+add) & 0x80) == 0) + continue; + break; + case 0xff: if((*(p+add) & 0x80)) + continue; + break; + } + break; + } + /* Copy the integer body */ + for(bp = buf, pend1 += add; p != pend1; p += add) + *bp++ = *p; + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = bp - buf; + + return 0; +} + +int +asn_INTEGER2long(const INTEGER_t *iptr, long *l) { + intmax_t v; + if(asn_INTEGER2imax(iptr, &v) == 0) { + if(v < LONG_MIN || v > LONG_MAX) { + errno = ERANGE; + return -1; + } + *l = v; + return 0; + } else { + return -1; + } +} + +int +asn_INTEGER2ulong(const INTEGER_t *iptr, unsigned long *l) { + uintmax_t v; + if(asn_INTEGER2umax(iptr, &v) == 0) { + if(v > ULONG_MAX) { + errno = ERANGE; + return -1; + } + *l = v; + return 0; + } else { + return -1; + } +} + +int +asn_long2INTEGER(INTEGER_t *st, long value) { + return asn_imax2INTEGER(st, value); +} + +int +asn_ulong2INTEGER(INTEGER_t *st, unsigned long value) { + return asn_imax2INTEGER(st, value); +} + + +int +asn_uint642INTEGER(INTEGER_t *st, uint64_t value) { + uint8_t *buf; + uint8_t *end; + uint8_t *b; + int shr; + + if(value <= INT64_MAX) + return asn_int642INTEGER(st, value); + + buf = (uint8_t *)MALLOC(1 + sizeof(value)); + if(!buf) return -1; + + end = buf + (sizeof(value) + 1); + buf[0] = 0; + for(b = buf + 1, shr = (sizeof(value)-1)*8; b < end; shr -= 8, b++) + *b = (uint8_t)(value >> shr); + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = 1 + sizeof(value); + + return 0; +} + +int +asn_int642INTEGER(INTEGER_t *st, int64_t value) { + uint8_t *buf, *bp; + uint8_t *p; + uint8_t *pstart; + uint8_t *pend1; + int littleEndian = 1; /* Run-time detection */ + int add; + + if(!st) { + errno = EINVAL; + return -1; + } + + buf = (uint8_t *)MALLOC(sizeof(value)); + if(!buf) return -1; + + if(*(char *)&littleEndian) { + pstart = (uint8_t *)&value + sizeof(value) - 1; + pend1 = (uint8_t *)&value; + add = -1; + } else { + pstart = (uint8_t *)&value; + pend1 = pstart + sizeof(value) - 1; + add = 1; + } + + /* + * If the contents octet consists of more than one octet, + * then bits of the first octet and bit 8 of the second octet: + * a) shall not all be ones; and + * b) shall not all be zero. + */ + for(p = pstart; p != pend1; p += add) { + switch(*p) { + case 0x00: if((*(p+add) & 0x80) == 0) + continue; + break; + case 0xff: if((*(p+add) & 0x80)) + continue; + break; + } + break; + } + /* Copy the integer body */ + for(pstart = p, bp = buf, pend1 += add; p != pend1; p += add) + *bp++ = *p; + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = bp - buf; + + return 0; +} + +/* + * Parse the number in the given string until the given *end position, + * returning the position after the last parsed character back using the + * same (*end) pointer. + * WARNING: This behavior is different from the standard strtol/strtoimax(3). + */ +enum asn_strtox_result_e +asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) { + int sign = 1; + intmax_t value; + +#define ASN1_INTMAX_MAX ((~(uintmax_t)0) >> 1) + const intmax_t upper_boundary = ASN1_INTMAX_MAX / 10; + intmax_t last_digit_max = ASN1_INTMAX_MAX % 10; +#undef ASN1_INTMAX_MAX + + if(str >= *end) return ASN_STRTOX_ERROR_INVAL; + + switch(*str) { + case '-': + last_digit_max++; + sign = -1; + /* FALL THROUGH */ + case '+': + str++; + if(str >= *end) { + *end = str; + return ASN_STRTOX_EXPECT_MORE; + } + } + + for(value = 0; str < (*end); str++) { + switch(*str) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: { + int d = *str - '0'; + if(value < upper_boundary) { + value = value * 10 + d; + } else if(value == upper_boundary) { + if(d <= last_digit_max) { + if(sign > 0) { + value = value * 10 + d; + } else { + sign = 1; + value = -value * 10 - d; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } + continue; + default: + *end = str; + *intp = sign * value; + return ASN_STRTOX_EXTRA_DATA; + } + } + + *end = str; + *intp = sign * value; + return ASN_STRTOX_OK; +} + +/* + * Parse the number in the given string until the given *end position, + * returning the position after the last parsed character back using the + * same (*end) pointer. + * WARNING: This behavior is different from the standard strtoul/strtoumax(3). + */ +enum asn_strtox_result_e +asn_strtoumax_lim(const char *str, const char **end, uintmax_t *uintp) { + uintmax_t value; + +#define ASN1_UINTMAX_MAX ((~(uintmax_t)0)) + const uintmax_t upper_boundary = ASN1_UINTMAX_MAX / 10; + uintmax_t last_digit_max = ASN1_UINTMAX_MAX % 10; +#undef ASN1_UINTMAX_MAX + + if(str >= *end) return ASN_STRTOX_ERROR_INVAL; + + switch(*str) { + case '-': + return ASN_STRTOX_ERROR_INVAL; + case '+': + str++; + if(str >= *end) { + *end = str; + return ASN_STRTOX_EXPECT_MORE; + } + } + + for(value = 0; str < (*end); str++) { + switch(*str) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: { + unsigned int d = *str - '0'; + if(value < upper_boundary) { + value = value * 10 + d; + } else if(value == upper_boundary) { + if(d <= last_digit_max) { + value = value * 10 + d; + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } + continue; + default: + *end = str; + *uintp = value; + return ASN_STRTOX_EXTRA_DATA; + } + } + + *end = str; + *uintp = value; + return ASN_STRTOX_OK; +} + +enum asn_strtox_result_e +asn_strtol_lim(const char *str, const char **end, long *lp) { + intmax_t value; + switch(asn_strtoimax_lim(str, end, &value)) { + case ASN_STRTOX_ERROR_RANGE: + return ASN_STRTOX_ERROR_RANGE; + case ASN_STRTOX_ERROR_INVAL: + return ASN_STRTOX_ERROR_INVAL; + case ASN_STRTOX_EXPECT_MORE: + return ASN_STRTOX_EXPECT_MORE; + case ASN_STRTOX_OK: + if(value >= LONG_MIN && value <= LONG_MAX) { + *lp = value; + return ASN_STRTOX_OK; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + case ASN_STRTOX_EXTRA_DATA: + if(value >= LONG_MIN && value <= LONG_MAX) { + *lp = value; + return ASN_STRTOX_EXTRA_DATA; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + } + + assert(!"Unreachable"); + return ASN_STRTOX_ERROR_INVAL; +} + +enum asn_strtox_result_e +asn_strtoul_lim(const char *str, const char **end, unsigned long *ulp) { + uintmax_t value; + switch(asn_strtoumax_lim(str, end, &value)) { + case ASN_STRTOX_ERROR_RANGE: + return ASN_STRTOX_ERROR_RANGE; + case ASN_STRTOX_ERROR_INVAL: + return ASN_STRTOX_ERROR_INVAL; + case ASN_STRTOX_EXPECT_MORE: + return ASN_STRTOX_EXPECT_MORE; + case ASN_STRTOX_OK: + if(value <= ULONG_MAX) { + *ulp = value; + return ASN_STRTOX_OK; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + case ASN_STRTOX_EXTRA_DATA: + if(value <= ULONG_MAX) { + *ulp = value; + return ASN_STRTOX_EXTRA_DATA; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + } + + assert(!"Unreachable"); + return ASN_STRTOX_ERROR_INVAL; +} + +int +INTEGER_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const INTEGER_t *a = aptr; + const INTEGER_t *b = bptr; + + (void)td; + + if(a && b) { + if(a->size && b->size) { + int sign_a = (a->buf[0] & 0x80) ? -1 : 1; + int sign_b = (b->buf[0] & 0x80) ? -1 : 1; + + if(sign_a < sign_b) return -1; + if(sign_a > sign_b) return 1; + + /* The shortest integer wins, unless comparing negatives */ + if(a->size < b->size) { + return -1 * sign_a; + } else if(a->size > b->size) { + return 1 * sign_b; + } + + return sign_a * memcmp(a->buf, b->buf, a->size); + } else if(a->size) { + int sign = (a->buf[0] & 0x80) ? -1 : 1; + return (1) * sign; + } else if(b->size) { + int sign = (a->buf[0] & 0x80) ? -1 : 1; + return (-1) * sign; + } else { + return 0; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } + +} + +asn_random_fill_result_t +INTEGER_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + INTEGER_t *st = *sptr; + const asn_INTEGER_enum_map_t *emap; + size_t emap_len; + intmax_t value; + int find_inside_map; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (INTEGER_t *)CALLOC(1, sizeof(*st)); + if(st == NULL) { + return result_failed; + } + } + + if(specs) { + emap = specs->value2enum; + emap_len = specs->map_count; + if(specs->strict_enumeration) { + find_inside_map = emap_len > 0; + } else { + find_inside_map = emap_len ? asn_random_between(0, 1) : 0; + } + } else { + emap = 0; + emap_len = 0; + find_inside_map = 0; + } + + if(find_inside_map) { + assert(emap_len > 0); + value = emap[asn_random_between(0, emap_len - 1)].nat_value; + } else { + const asn_per_constraints_t *ct; + + static const long variants[] = { + -65536, -65535, -65534, -32769, -32768, -32767, -16385, -16384, + -16383, -257, -256, -255, -254, -129, -128, -127, + -126, -1, 0, 1, 126, 127, 128, 129, + 254, 255, 256, 257, 16383, 16384, 16385, 32767, + 32768, 32769, 65534, 65535, 65536, 65537}; + if(specs && specs->field_unsigned) { + assert(variants[18] == 0); + value = variants[asn_random_between( + 18, sizeof(variants) / sizeof(variants[0]) - 1)]; + } else { + value = variants[asn_random_between( + 0, sizeof(variants) / sizeof(variants[0]) - 1)]; + } + + if(!constraints) constraints = &td->encoding_constraints; + ct = constraints ? constraints->per_constraints : 0; + if(ct && (ct->value.flags & APC_CONSTRAINED)) { + if(value < ct->value.lower_bound || value > ct->value.upper_bound) { + value = asn_random_between(ct->value.lower_bound, + ct->value.upper_bound); + } + } + } + + if(asn_imax2INTEGER(st, value)) { + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + return result_failed; + } else { + *sptr = st; + result_ok.length = st->size; + return result_ok; + } +} diff --git a/Bouncer/e2sm_kpm/lib/INTEGER_oer.c b/Bouncer/e2sm_kpm/lib/INTEGER_oer.c new file mode 100644 index 0000000..110689b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/INTEGER_oer.c @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +INTEGER_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + INTEGER_t *st = (INTEGER_t *)*sptr; + struct asn_oer_constraint_number_s ct = {0, 0}; + size_t req_bytes; + + (void)opt_codec_ctx; + (void)specs; + + if(!st) { + st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints) ct = constraints->value; + + if(ct.width) { + req_bytes = ct.width; + } else { + /* No lower bound and no upper bound, effectively */ + + ssize_t consumed = oer_fetch_length(ptr, size, &req_bytes); + if(consumed == 0) { + ASN__DECODE_STARVED; + } else if(consumed == -1) { + ASN__DECODE_FAILED; + } + rval.consumed += consumed; + ptr = (const char *)ptr + consumed; + size -= consumed; + } + + if(req_bytes > size) { + ASN__DECODE_STARVED; + } + + if(ct.positive) { + /* X.969 08/2015 10.2(a) */ + unsigned msb; /* Most significant bit */ + size_t useful_size; + + /* Check most significant bit */ + msb = *(const uint8_t *)ptr >> 7; /* yields 0 or 1 */ + useful_size = msb + req_bytes; + st->buf = (uint8_t *)MALLOC(useful_size + 1); + if(!st->buf) { + ASN__DECODE_FAILED; + } + + /* + * Record a large unsigned in a way not to confuse it + * with signed value. + */ + st->buf[0] = '\0'; + memcpy(st->buf + msb, ptr, req_bytes); + st->buf[useful_size] = '\0'; /* Just in case, 0-terminate */ + st->size = useful_size; + + rval.consumed += req_bytes; + return rval; + } else { + /* X.969 08/2015 10.2(b) */ + st->buf = (uint8_t *)MALLOC(req_bytes + 1); + if(!st->buf) { + ASN__DECODE_FAILED; + } + + memcpy(st->buf, ptr, req_bytes); + st->buf[req_bytes] = '\0'; /* Just in case, 0-terminate */ + st->size = req_bytes; + + rval.consumed += req_bytes; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +INTEGER_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const INTEGER_t *st = sptr; + asn_enc_rval_t er = {0,0,0}; + struct asn_oer_constraint_number_s ct = {0, 0}; + const uint8_t *buf; + const uint8_t *end; + size_t useful_bytes; + size_t req_bytes = 0; + int sign = 0; + + if(!st || st->size == 0) ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints) ct = constraints->value; + + er.encoded = 0; + + buf = st->buf; + end = buf + st->size; + + sign = (buf && buf < end) ? buf[0] & 0x80 : 0; + + /* Ignore 9 leading zeroes or ones */ + if(ct.positive) { + if(sign) { + /* The value given is a signed value. Can't proceed. */ + ASN__ENCODE_FAILED; + } + /* Remove leading zeros. */ + for(; buf + 1 < end; buf++) { + if(buf[0] != 0x0) break; + } + } else { + for(; buf + 1 < end; buf++) { + if(buf[0] == 0x0 && (buf[1] & 0x80) == 0) { + continue; + } else if(buf[0] == 0xff && (buf[1] & 0x80) != 0) { + continue; + } + break; + } + } + + useful_bytes = end - buf; + if(ct.width) { + req_bytes = ct.width; + } else { + ssize_t r = oer_serialize_length(useful_bytes, cb, app_key); + if(r < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += r; + req_bytes = useful_bytes; + } + + if(req_bytes < useful_bytes) { + ASN__ENCODE_FAILED; + } + + er.encoded += req_bytes; + + for(; req_bytes > useful_bytes; req_bytes--) { + if(cb(sign?"\xff":"\0", 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + } + + if(cb(buf, useful_bytes, app_key) < 0) { + ASN__ENCODE_FAILED; + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/ISO646String.c b/Bouncer/e2sm_kpm/lib/ISO646String.c new file mode 100644 index 0000000..f5fc69e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ISO646String.c @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * ISO646String basic type description. + */ +static const ber_tlv_tag_t asn_DEF_ISO646String_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), /* [UNIVERSAL 26] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +static asn_per_constraints_t asn_DEF_ISO646String_per_constraints = { + { APC_CONSTRAINED, 7, 7, 0x20, 0x7e }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + 0, 0 +}; +asn_TYPE_operation_t asn_OP_ISO646String = { + OCTET_STRING_free, + OCTET_STRING_print_utf8, /* ASCII subset */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_ISO646String = { + "ISO646String", + "ISO646String", + &asn_OP_ISO646String, + asn_DEF_ISO646String_tags, + sizeof(asn_DEF_ISO646String_tags) + / sizeof(asn_DEF_ISO646String_tags[0]) - 1, + asn_DEF_ISO646String_tags, + sizeof(asn_DEF_ISO646String_tags) + / sizeof(asn_DEF_ISO646String_tags[0]), + { 0, &asn_DEF_ISO646String_per_constraints, ISO646String_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; diff --git a/Bouncer/e2sm_kpm/lib/IndexToRFSP.c b/Bouncer/e2sm_kpm/lib/IndexToRFSP.c new file mode 100644 index 0000000..36829da --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/IndexToRFSP.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "IndexToRFSP.h" + +int +IndexToRFSP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 256)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_IndexToRFSP_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 256 } /* (1..256,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_IndexToRFSP_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_IndexToRFSP = { + "IndexToRFSP", + "IndexToRFSP", + &asn_OP_NativeInteger, + asn_DEF_IndexToRFSP_tags_1, + sizeof(asn_DEF_IndexToRFSP_tags_1) + /sizeof(asn_DEF_IndexToRFSP_tags_1[0]), /* 1 */ + asn_DEF_IndexToRFSP_tags_1, /* Same as above */ + sizeof(asn_DEF_IndexToRFSP_tags_1) + /sizeof(asn_DEF_IndexToRFSP_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_IndexToRFSP_constr_1, IndexToRFSP_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/Interface-MessageID.c b/Bouncer/e2sm_kpm/lib/Interface-MessageID.c new file mode 100644 index 0000000..da967de --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/Interface-MessageID.c @@ -0,0 +1,110 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "Interface-MessageID.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_messageType_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_messageType_value2enum_3[] = { + { 0, 17, "initiatingMessage" }, + { 1, 17, "successfulOutcome" }, + { 2, 19, "unsuccessfulOutcome" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_messageType_enum2value_3[] = { + 0, /* initiatingMessage(0) */ + 1, /* successfulOutcome(1) */ + 2 /* unsuccessfulOutcome(2) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_messageType_specs_3 = { + asn_MAP_messageType_value2enum_3, /* "tag" => N; sorted by tag */ + asn_MAP_messageType_enum2value_3, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_messageType_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_messageType_3 = { + "messageType", + "messageType", + &asn_OP_NativeEnumerated, + asn_DEF_messageType_tags_3, + sizeof(asn_DEF_messageType_tags_3) + /sizeof(asn_DEF_messageType_tags_3[0]) - 1, /* 1 */ + asn_DEF_messageType_tags_3, /* Same as above */ + sizeof(asn_DEF_messageType_tags_3) + /sizeof(asn_DEF_messageType_tags_3[0]), /* 2 */ + { 0, &asn_PER_type_messageType_constr_3, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_messageType_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_Interface_MessageID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Interface_MessageID, interfaceProcedureID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "interfaceProcedureID" + }, + { ATF_NOFLAGS, 0, offsetof(struct Interface_MessageID, messageType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_messageType_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageType" + }, +}; +static const ber_tlv_tag_t asn_DEF_Interface_MessageID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Interface_MessageID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* interfaceProcedureID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* messageType */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Interface_MessageID_specs_1 = { + sizeof(struct Interface_MessageID), + offsetof(struct Interface_MessageID, _asn_ctx), + asn_MAP_Interface_MessageID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Interface_MessageID = { + "Interface-MessageID", + "Interface-MessageID", + &asn_OP_SEQUENCE, + asn_DEF_Interface_MessageID_tags_1, + sizeof(asn_DEF_Interface_MessageID_tags_1) + /sizeof(asn_DEF_Interface_MessageID_tags_1[0]), /* 1 */ + asn_DEF_Interface_MessageID_tags_1, /* Same as above */ + sizeof(asn_DEF_Interface_MessageID_tags_1) + /sizeof(asn_DEF_Interface_MessageID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_Interface_MessageID_1, + 2, /* Elements count */ + &asn_SPC_Interface_MessageID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceID-E1.c b/Bouncer/e2sm_kpm/lib/InterfaceID-E1.c new file mode 100644 index 0000000..a98f85b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceID-E1.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceID-E1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_E1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_E1, globalGNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalGNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_E1, gNB_CU_UP_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_E1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_E1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* globalGNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-CU-UP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_E1_specs_1 = { + sizeof(struct InterfaceID_E1), + offsetof(struct InterfaceID_E1, _asn_ctx), + asn_MAP_InterfaceID_E1_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_E1 = { + "InterfaceID-E1", + "InterfaceID-E1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_E1_tags_1, + sizeof(asn_DEF_InterfaceID_E1_tags_1) + /sizeof(asn_DEF_InterfaceID_E1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_E1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_E1_tags_1) + /sizeof(asn_DEF_InterfaceID_E1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_E1_1, + 2, /* Elements count */ + &asn_SPC_InterfaceID_E1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceID-F1.c b/Bouncer/e2sm_kpm/lib/InterfaceID-F1.c new file mode 100644 index 0000000..4900cb7 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceID-F1.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceID-F1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_F1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_F1, globalGNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalGNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_F1, gNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_F1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_F1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* globalGNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_F1_specs_1 = { + sizeof(struct InterfaceID_F1), + offsetof(struct InterfaceID_F1, _asn_ctx), + asn_MAP_InterfaceID_F1_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_F1 = { + "InterfaceID-F1", + "InterfaceID-F1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_F1_tags_1, + sizeof(asn_DEF_InterfaceID_F1_tags_1) + /sizeof(asn_DEF_InterfaceID_F1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_F1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_F1_tags_1) + /sizeof(asn_DEF_InterfaceID_F1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_F1_1, + 2, /* Elements count */ + &asn_SPC_InterfaceID_F1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceID-NG.c b/Bouncer/e2sm_kpm/lib/InterfaceID-NG.c new file mode 100644 index 0000000..2083c0f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceID-NG.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceID-NG.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_NG_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_NG, guami), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "guami" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_NG_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_NG_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* guami */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_NG_specs_1 = { + sizeof(struct InterfaceID_NG), + offsetof(struct InterfaceID_NG, _asn_ctx), + asn_MAP_InterfaceID_NG_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_NG = { + "InterfaceID-NG", + "InterfaceID-NG", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_NG_tags_1, + sizeof(asn_DEF_InterfaceID_NG_tags_1) + /sizeof(asn_DEF_InterfaceID_NG_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_NG_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_NG_tags_1) + /sizeof(asn_DEF_InterfaceID_NG_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_NG_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_NG_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceID-S1.c b/Bouncer/e2sm_kpm/lib/InterfaceID-S1.c new file mode 100644 index 0000000..e8e728f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceID-S1.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceID-S1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_S1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_S1, gUMMEI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUMMEI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gUMMEI" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_S1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_S1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gUMMEI */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_S1_specs_1 = { + sizeof(struct InterfaceID_S1), + offsetof(struct InterfaceID_S1, _asn_ctx), + asn_MAP_InterfaceID_S1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_S1 = { + "InterfaceID-S1", + "InterfaceID-S1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_S1_tags_1, + sizeof(asn_DEF_InterfaceID_S1_tags_1) + /sizeof(asn_DEF_InterfaceID_S1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_S1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_S1_tags_1) + /sizeof(asn_DEF_InterfaceID_S1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_S1_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_S1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceID-W1.c b/Bouncer/e2sm_kpm/lib/InterfaceID-W1.c new file mode 100644 index 0000000..37033aa --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceID-W1.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceID-W1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_W1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_W1, global_ng_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalNgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-ng-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_W1, ng_eNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_DU_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-DU-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_W1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_W1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-ng-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ng-eNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_W1_specs_1 = { + sizeof(struct InterfaceID_W1), + offsetof(struct InterfaceID_W1, _asn_ctx), + asn_MAP_InterfaceID_W1_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_W1 = { + "InterfaceID-W1", + "InterfaceID-W1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_W1_tags_1, + sizeof(asn_DEF_InterfaceID_W1_tags_1) + /sizeof(asn_DEF_InterfaceID_W1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_W1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_W1_tags_1) + /sizeof(asn_DEF_InterfaceID_W1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_W1_1, + 2, /* Elements count */ + &asn_SPC_InterfaceID_W1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceID-X2.c b/Bouncer/e2sm_kpm/lib/InterfaceID-X2.c new file mode 100644 index 0000000..d191871 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceID-X2.c @@ -0,0 +1,106 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceID-X2.h" + +#include "GlobalENB-ID.h" +#include "GlobalenGNB-ID.h" +static asn_per_constraints_t asn_PER_type_nodeType_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_nodeType_2[] = { + { ATF_POINTER, 0, offsetof(struct InterfaceID_X2__nodeType, choice.global_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-eNB-ID" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceID_X2__nodeType, choice.global_en_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalenGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-en-gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_nodeType_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* global-en-gNB-ID */ +}; +static asn_CHOICE_specifics_t asn_SPC_nodeType_specs_2 = { + sizeof(struct InterfaceID_X2__nodeType), + offsetof(struct InterfaceID_X2__nodeType, _asn_ctx), + offsetof(struct InterfaceID_X2__nodeType, present), + sizeof(((struct InterfaceID_X2__nodeType *)0)->present), + asn_MAP_nodeType_tag2el_2, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_nodeType_2 = { + "nodeType", + "nodeType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_nodeType_constr_2, CHOICE_constraint }, + asn_MBR_nodeType_2, + 2, /* Elements count */ + &asn_SPC_nodeType_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_InterfaceID_X2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_X2, nodeType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_nodeType_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nodeType" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_X2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_X2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* nodeType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_X2_specs_1 = { + sizeof(struct InterfaceID_X2), + offsetof(struct InterfaceID_X2, _asn_ctx), + asn_MAP_InterfaceID_X2_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_X2 = { + "InterfaceID-X2", + "InterfaceID-X2", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_X2_tags_1, + sizeof(asn_DEF_InterfaceID_X2_tags_1) + /sizeof(asn_DEF_InterfaceID_X2_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_X2_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_X2_tags_1) + /sizeof(asn_DEF_InterfaceID_X2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_X2_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_X2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceID-Xn.c b/Bouncer/e2sm_kpm/lib/InterfaceID-Xn.c new file mode 100644 index 0000000..a78a67e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceID-Xn.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceID-Xn.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_Xn_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_Xn, global_NG_RAN_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalNGRANNodeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-NG-RAN-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_Xn_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_Xn_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-NG-RAN-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_Xn_specs_1 = { + sizeof(struct InterfaceID_Xn), + offsetof(struct InterfaceID_Xn, _asn_ctx), + asn_MAP_InterfaceID_Xn_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_Xn = { + "InterfaceID-Xn", + "InterfaceID-Xn", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_Xn_tags_1, + sizeof(asn_DEF_InterfaceID_Xn_tags_1) + /sizeof(asn_DEF_InterfaceID_Xn_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_Xn_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_Xn_tags_1) + /sizeof(asn_DEF_InterfaceID_Xn_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_Xn_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_Xn_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceIdentifier.c b/Bouncer/e2sm_kpm/lib/InterfaceIdentifier.c new file mode 100644 index 0000000..bc596a5 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceIdentifier.c @@ -0,0 +1,119 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceIdentifier.h" + +#include "InterfaceID-NG.h" +#include "InterfaceID-Xn.h" +#include "InterfaceID-F1.h" +#include "InterfaceID-E1.h" +#include "InterfaceID-S1.h" +#include "InterfaceID-X2.h" +#include "InterfaceID-W1.h" +static asn_per_constraints_t asn_PER_type_InterfaceIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.nG), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_NG, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nG" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.xN), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_Xn, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "xN" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.f1), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_F1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "f1" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.e1), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_E1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "e1" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.s1), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_S1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "s1" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.x2), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_X2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "x2" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.w1), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_W1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "w1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceIdentifier_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nG */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* xN */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* f1 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* e1 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* s1 */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* x2 */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* w1 */ +}; +static asn_CHOICE_specifics_t asn_SPC_InterfaceIdentifier_specs_1 = { + sizeof(struct InterfaceIdentifier), + offsetof(struct InterfaceIdentifier, _asn_ctx), + offsetof(struct InterfaceIdentifier, present), + sizeof(((struct InterfaceIdentifier *)0)->present), + asn_MAP_InterfaceIdentifier_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, + 7 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceIdentifier = { + "InterfaceIdentifier", + "InterfaceIdentifier", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_InterfaceIdentifier_constr_1, CHOICE_constraint }, + asn_MBR_InterfaceIdentifier_1, + 7, /* Elements count */ + &asn_SPC_InterfaceIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/InterfaceType.c b/Bouncer/e2sm_kpm/lib/InterfaceType.c new file mode 100644 index 0000000..17f3635 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/InterfaceType.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "InterfaceType.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_InterfaceType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_InterfaceType_value2enum_1[] = { + { 0, 2, "nG" }, + { 1, 2, "xn" }, + { 2, 2, "f1" }, + { 3, 2, "e1" }, + { 4, 2, "s1" }, + { 5, 2, "x2" }, + { 6, 2, "w1" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_InterfaceType_enum2value_1[] = { + 3, /* e1(3) */ + 2, /* f1(2) */ + 0, /* nG(0) */ + 4, /* s1(4) */ + 6, /* w1(6) */ + 5, /* x2(5) */ + 1 /* xn(1) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_InterfaceType_specs_1 = { + asn_MAP_InterfaceType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_InterfaceType_enum2value_1, /* N => "tag"; sorted by N */ + 7, /* Number of elements in the maps */ + 8, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_InterfaceType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceType = { + "InterfaceType", + "InterfaceType", + &asn_OP_NativeEnumerated, + asn_DEF_InterfaceType_tags_1, + sizeof(asn_DEF_InterfaceType_tags_1) + /sizeof(asn_DEF_InterfaceType_tags_1[0]), /* 1 */ + asn_DEF_InterfaceType_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceType_tags_1) + /sizeof(asn_DEF_InterfaceType_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_InterfaceType_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_InterfaceType_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/LabelInfoItem.c b/Bouncer/e2sm_kpm/lib/LabelInfoItem.c new file mode 100644 index 0000000..dafa081 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/LabelInfoItem.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "LabelInfoItem.h" + +asn_TYPE_member_t asn_MBR_LabelInfoItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct LabelInfoItem, measLabel), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementLabel, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measLabel" + }, +}; +static const ber_tlv_tag_t asn_DEF_LabelInfoItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_LabelInfoItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* measLabel */ +}; +asn_SEQUENCE_specifics_t asn_SPC_LabelInfoItem_specs_1 = { + sizeof(struct LabelInfoItem), + offsetof(struct LabelInfoItem, _asn_ctx), + asn_MAP_LabelInfoItem_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_LabelInfoItem = { + "LabelInfoItem", + "LabelInfoItem", + &asn_OP_SEQUENCE, + asn_DEF_LabelInfoItem_tags_1, + sizeof(asn_DEF_LabelInfoItem_tags_1) + /sizeof(asn_DEF_LabelInfoItem_tags_1[0]), /* 1 */ + asn_DEF_LabelInfoItem_tags_1, /* Same as above */ + sizeof(asn_DEF_LabelInfoItem_tags_1) + /sizeof(asn_DEF_LabelInfoItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_LabelInfoItem_1, + 1, /* Elements count */ + &asn_SPC_LabelInfoItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/LabelInfoList.c b/Bouncer/e2sm_kpm/lib/LabelInfoList.c new file mode 100644 index 0000000..9d7e620 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/LabelInfoList.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "LabelInfoList.h" + +#include "LabelInfoItem.h" +asn_per_constraints_t asn_PER_type_LabelInfoList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 31, -1, 1, 2147483647 } /* (SIZE(1..2147483647)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_LabelInfoList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_LabelInfoItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_LabelInfoList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_LabelInfoList_specs_1 = { + sizeof(struct LabelInfoList), + offsetof(struct LabelInfoList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_LabelInfoList = { + "LabelInfoList", + "LabelInfoList", + &asn_OP_SEQUENCE_OF, + asn_DEF_LabelInfoList_tags_1, + sizeof(asn_DEF_LabelInfoList_tags_1) + /sizeof(asn_DEF_LabelInfoList_tags_1[0]), /* 1 */ + asn_DEF_LabelInfoList_tags_1, /* Same as above */ + sizeof(asn_DEF_LabelInfoList_tags_1) + /sizeof(asn_DEF_LabelInfoList_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_LabelInfoList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_LabelInfoList_1, + 1, /* Single element */ + &asn_SPC_LabelInfoList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MME-Code.c b/Bouncer/e2sm_kpm/lib/MME-Code.c new file mode 100644 index 0000000..d110616 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MME-Code.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MME-Code.h" + +int +MME_Code_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 1)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_MME_Code_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_MME_Code_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MME_Code = { + "MME-Code", + "MME-Code", + &asn_OP_OCTET_STRING, + asn_DEF_MME_Code_tags_1, + sizeof(asn_DEF_MME_Code_tags_1) + /sizeof(asn_DEF_MME_Code_tags_1[0]), /* 1 */ + asn_DEF_MME_Code_tags_1, /* Same as above */ + sizeof(asn_DEF_MME_Code_tags_1) + /sizeof(asn_DEF_MME_Code_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MME_Code_constr_1, MME_Code_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MME-Group-ID.c b/Bouncer/e2sm_kpm/lib/MME-Group-ID.c new file mode 100644 index 0000000..1136961 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MME-Group-ID.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MME-Group-ID.h" + +int +MME_Group_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 2)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_MME_Group_ID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_MME_Group_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MME_Group_ID = { + "MME-Group-ID", + "MME-Group-ID", + &asn_OP_OCTET_STRING, + asn_DEF_MME_Group_ID_tags_1, + sizeof(asn_DEF_MME_Group_ID_tags_1) + /sizeof(asn_DEF_MME_Group_ID_tags_1[0]), /* 1 */ + asn_DEF_MME_Group_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_MME_Group_ID_tags_1) + /sizeof(asn_DEF_MME_Group_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MME_Group_ID_constr_1, MME_Group_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MME-UE-S1AP-ID.c b/Bouncer/e2sm_kpm/lib/MME-UE-S1AP-ID.c new file mode 100644 index 0000000..7677024 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MME-UE-S1AP-ID.c @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MME-UE-S1AP-ID.h" + +int +MME_UE_S1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_MME_UE_S1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_MME_UE_S1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_MME_UE_S1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MME_UE_S1AP_ID = { + "MME-UE-S1AP-ID", + "MME-UE-S1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_MME_UE_S1AP_ID_tags_1, + sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1) + /sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_MME_UE_S1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1) + /sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MME_UE_S1AP_ID_constr_1, MME_UE_S1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_MME_UE_S1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MatchingCondItem.c b/Bouncer/e2sm_kpm/lib/MatchingCondItem.c new file mode 100644 index 0000000..89f4378 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MatchingCondItem.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MatchingCondItem.h" + +#include "MeasurementLabel.h" +#include "TestCondInfo.h" +asn_per_constraints_t asn_PER_type_MatchingCondItem_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MatchingCondItem_1[] = { + { ATF_POINTER, 0, offsetof(struct MatchingCondItem, choice.measLabel), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementLabel, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measLabel" + }, + { ATF_POINTER, 0, offsetof(struct MatchingCondItem, choice.testCondInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TestCondInfo, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "testCondInfo" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_MatchingCondItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measLabel */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* testCondInfo */ +}; +asn_CHOICE_specifics_t asn_SPC_MatchingCondItem_specs_1 = { + sizeof(struct MatchingCondItem), + offsetof(struct MatchingCondItem, _asn_ctx), + offsetof(struct MatchingCondItem, present), + sizeof(((struct MatchingCondItem *)0)->present), + asn_MAP_MatchingCondItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_MatchingCondItem = { + "MatchingCondItem", + "MatchingCondItem", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_MatchingCondItem_constr_1, CHOICE_constraint }, + asn_MBR_MatchingCondItem_1, + 2, /* Elements count */ + &asn_SPC_MatchingCondItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MatchingCondList.c b/Bouncer/e2sm_kpm/lib/MatchingCondList.c new file mode 100644 index 0000000..7ccd78f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MatchingCondList.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MatchingCondList.h" + +#include "MatchingCondItem.h" +asn_per_constraints_t asn_PER_type_MatchingCondList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 15, 15, 1, 32768 } /* (SIZE(1..32768)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MatchingCondList_1[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_MatchingCondItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MatchingCondList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MatchingCondList_specs_1 = { + sizeof(struct MatchingCondList), + offsetof(struct MatchingCondList, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_MatchingCondList = { + "MatchingCondList", + "MatchingCondList", + &asn_OP_SEQUENCE_OF, + asn_DEF_MatchingCondList_tags_1, + sizeof(asn_DEF_MatchingCondList_tags_1) + /sizeof(asn_DEF_MatchingCondList_tags_1[0]), /* 1 */ + asn_DEF_MatchingCondList_tags_1, /* Same as above */ + sizeof(asn_DEF_MatchingCondList_tags_1) + /sizeof(asn_DEF_MatchingCondList_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MatchingCondList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MatchingCondList_1, + 1, /* Single element */ + &asn_SPC_MatchingCondList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MatchingUEidItem.c b/Bouncer/e2sm_kpm/lib/MatchingUEidItem.c new file mode 100644 index 0000000..361848c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MatchingUEidItem.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MatchingUEidItem.h" + +asn_TYPE_member_t asn_MBR_MatchingUEidItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MatchingUEidItem, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, +}; +static const ber_tlv_tag_t asn_DEF_MatchingUEidItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MatchingUEidItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ueID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MatchingUEidItem_specs_1 = { + sizeof(struct MatchingUEidItem), + offsetof(struct MatchingUEidItem, _asn_ctx), + asn_MAP_MatchingUEidItem_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MatchingUEidItem = { + "MatchingUEidItem", + "MatchingUEidItem", + &asn_OP_SEQUENCE, + asn_DEF_MatchingUEidItem_tags_1, + sizeof(asn_DEF_MatchingUEidItem_tags_1) + /sizeof(asn_DEF_MatchingUEidItem_tags_1[0]), /* 1 */ + asn_DEF_MatchingUEidItem_tags_1, /* Same as above */ + sizeof(asn_DEF_MatchingUEidItem_tags_1) + /sizeof(asn_DEF_MatchingUEidItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MatchingUEidItem_1, + 1, /* Elements count */ + &asn_SPC_MatchingUEidItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MatchingUEidList.c b/Bouncer/e2sm_kpm/lib/MatchingUEidList.c new file mode 100644 index 0000000..d01eaa2 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MatchingUEidList.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MatchingUEidList.h" + +#include "MatchingUEidItem.h" +asn_per_constraints_t asn_PER_type_MatchingUEidList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MatchingUEidList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_MatchingUEidItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MatchingUEidList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MatchingUEidList_specs_1 = { + sizeof(struct MatchingUEidList), + offsetof(struct MatchingUEidList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_MatchingUEidList = { + "MatchingUEidList", + "MatchingUEidList", + &asn_OP_SEQUENCE_OF, + asn_DEF_MatchingUEidList_tags_1, + sizeof(asn_DEF_MatchingUEidList_tags_1) + /sizeof(asn_DEF_MatchingUEidList_tags_1[0]), /* 1 */ + asn_DEF_MatchingUEidList_tags_1, /* Same as above */ + sizeof(asn_DEF_MatchingUEidList_tags_1) + /sizeof(asn_DEF_MatchingUEidList_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MatchingUEidList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MatchingUEidList_1, + 1, /* Single element */ + &asn_SPC_MatchingUEidList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementCondItem.c b/Bouncer/e2sm_kpm/lib/MeasurementCondItem.c new file mode 100644 index 0000000..3d63e9d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementCondItem.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementCondItem.h" + +asn_TYPE_member_t asn_MBR_MeasurementCondItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MeasurementCondItem, measType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_MeasurementType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measType" + }, + { ATF_NOFLAGS, 0, offsetof(struct MeasurementCondItem, matchingCond), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MatchingCondList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "matchingCond" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementCondItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementCondItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* matchingCond */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MeasurementCondItem_specs_1 = { + sizeof(struct MeasurementCondItem), + offsetof(struct MeasurementCondItem, _asn_ctx), + asn_MAP_MeasurementCondItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementCondItem = { + "MeasurementCondItem", + "MeasurementCondItem", + &asn_OP_SEQUENCE, + asn_DEF_MeasurementCondItem_tags_1, + sizeof(asn_DEF_MeasurementCondItem_tags_1) + /sizeof(asn_DEF_MeasurementCondItem_tags_1[0]), /* 1 */ + asn_DEF_MeasurementCondItem_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementCondItem_tags_1) + /sizeof(asn_DEF_MeasurementCondItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MeasurementCondItem_1, + 2, /* Elements count */ + &asn_SPC_MeasurementCondItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementCondList.c b/Bouncer/e2sm_kpm/lib/MeasurementCondList.c new file mode 100644 index 0000000..981bc8f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementCondList.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementCondList.h" + +#include "MeasurementCondItem.h" +asn_per_constraints_t asn_PER_type_MeasurementCondList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MeasurementCondList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_MeasurementCondItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementCondList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MeasurementCondList_specs_1 = { + sizeof(struct MeasurementCondList), + offsetof(struct MeasurementCondList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementCondList = { + "MeasurementCondList", + "MeasurementCondList", + &asn_OP_SEQUENCE_OF, + asn_DEF_MeasurementCondList_tags_1, + sizeof(asn_DEF_MeasurementCondList_tags_1) + /sizeof(asn_DEF_MeasurementCondList_tags_1[0]), /* 1 */ + asn_DEF_MeasurementCondList_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementCondList_tags_1) + /sizeof(asn_DEF_MeasurementCondList_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementCondList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MeasurementCondList_1, + 1, /* Single element */ + &asn_SPC_MeasurementCondList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementCondUEidItem.c b/Bouncer/e2sm_kpm/lib/MeasurementCondUEidItem.c new file mode 100644 index 0000000..e3a6fca --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementCondUEidItem.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementCondUEidItem.h" + +#include "MatchingUEidList.h" +asn_TYPE_member_t asn_MBR_MeasurementCondUEidItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MeasurementCondUEidItem, measType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_MeasurementType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measType" + }, + { ATF_NOFLAGS, 0, offsetof(struct MeasurementCondUEidItem, matchingCond), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MatchingCondList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "matchingCond" + }, + { ATF_POINTER, 1, offsetof(struct MeasurementCondUEidItem, matchingUEidList), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MatchingUEidList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "matchingUEidList" + }, +}; +static const int asn_MAP_MeasurementCondUEidItem_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_MeasurementCondUEidItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementCondUEidItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* matchingCond */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* matchingUEidList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MeasurementCondUEidItem_specs_1 = { + sizeof(struct MeasurementCondUEidItem), + offsetof(struct MeasurementCondUEidItem, _asn_ctx), + asn_MAP_MeasurementCondUEidItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_MeasurementCondUEidItem_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementCondUEidItem = { + "MeasurementCondUEidItem", + "MeasurementCondUEidItem", + &asn_OP_SEQUENCE, + asn_DEF_MeasurementCondUEidItem_tags_1, + sizeof(asn_DEF_MeasurementCondUEidItem_tags_1) + /sizeof(asn_DEF_MeasurementCondUEidItem_tags_1[0]), /* 1 */ + asn_DEF_MeasurementCondUEidItem_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementCondUEidItem_tags_1) + /sizeof(asn_DEF_MeasurementCondUEidItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MeasurementCondUEidItem_1, + 3, /* Elements count */ + &asn_SPC_MeasurementCondUEidItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementCondUEidList.c b/Bouncer/e2sm_kpm/lib/MeasurementCondUEidList.c new file mode 100644 index 0000000..8f9c71c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementCondUEidList.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementCondUEidList.h" + +#include "MeasurementCondUEidItem.h" +asn_per_constraints_t asn_PER_type_MeasurementCondUEidList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MeasurementCondUEidList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_MeasurementCondUEidItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementCondUEidList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MeasurementCondUEidList_specs_1 = { + sizeof(struct MeasurementCondUEidList), + offsetof(struct MeasurementCondUEidList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementCondUEidList = { + "MeasurementCondUEidList", + "MeasurementCondUEidList", + &asn_OP_SEQUENCE_OF, + asn_DEF_MeasurementCondUEidList_tags_1, + sizeof(asn_DEF_MeasurementCondUEidList_tags_1) + /sizeof(asn_DEF_MeasurementCondUEidList_tags_1[0]), /* 1 */ + asn_DEF_MeasurementCondUEidList_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementCondUEidList_tags_1) + /sizeof(asn_DEF_MeasurementCondUEidList_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementCondUEidList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MeasurementCondUEidList_1, + 1, /* Single element */ + &asn_SPC_MeasurementCondUEidList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementData.c b/Bouncer/e2sm_kpm/lib/MeasurementData.c new file mode 100644 index 0000000..0a6cb94 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementData.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementData.h" + +#include "MeasurementDataItem.h" +asn_per_constraints_t asn_PER_type_MeasurementData_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MeasurementData_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_MeasurementDataItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementData_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MeasurementData_specs_1 = { + sizeof(struct MeasurementData), + offsetof(struct MeasurementData, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementData = { + "MeasurementData", + "MeasurementData", + &asn_OP_SEQUENCE_OF, + asn_DEF_MeasurementData_tags_1, + sizeof(asn_DEF_MeasurementData_tags_1) + /sizeof(asn_DEF_MeasurementData_tags_1[0]), /* 1 */ + asn_DEF_MeasurementData_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementData_tags_1) + /sizeof(asn_DEF_MeasurementData_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementData_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MeasurementData_1, + 1, /* Single element */ + &asn_SPC_MeasurementData_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementDataItem.c b/Bouncer/e2sm_kpm/lib/MeasurementDataItem.c new file mode 100644 index 0000000..4c3ad22 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementDataItem.c @@ -0,0 +1,108 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementDataItem.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_incompleteFlag_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_incompleteFlag_value2enum_3[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_incompleteFlag_enum2value_3[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_incompleteFlag_specs_3 = { + asn_MAP_incompleteFlag_value2enum_3, /* "tag" => N; sorted by tag */ + asn_MAP_incompleteFlag_enum2value_3, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_incompleteFlag_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_incompleteFlag_3 = { + "incompleteFlag", + "incompleteFlag", + &asn_OP_NativeEnumerated, + asn_DEF_incompleteFlag_tags_3, + sizeof(asn_DEF_incompleteFlag_tags_3) + /sizeof(asn_DEF_incompleteFlag_tags_3[0]) - 1, /* 1 */ + asn_DEF_incompleteFlag_tags_3, /* Same as above */ + sizeof(asn_DEF_incompleteFlag_tags_3) + /sizeof(asn_DEF_incompleteFlag_tags_3[0]), /* 2 */ + { 0, &asn_PER_type_incompleteFlag_constr_3, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_incompleteFlag_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_MeasurementDataItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MeasurementDataItem, measRecord), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementRecord, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measRecord" + }, + { ATF_POINTER, 1, offsetof(struct MeasurementDataItem, incompleteFlag), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_incompleteFlag_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "incompleteFlag" + }, +}; +static const int asn_MAP_MeasurementDataItem_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_MeasurementDataItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementDataItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measRecord */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* incompleteFlag */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MeasurementDataItem_specs_1 = { + sizeof(struct MeasurementDataItem), + offsetof(struct MeasurementDataItem, _asn_ctx), + asn_MAP_MeasurementDataItem_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_MeasurementDataItem_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementDataItem = { + "MeasurementDataItem", + "MeasurementDataItem", + &asn_OP_SEQUENCE, + asn_DEF_MeasurementDataItem_tags_1, + sizeof(asn_DEF_MeasurementDataItem_tags_1) + /sizeof(asn_DEF_MeasurementDataItem_tags_1[0]), /* 1 */ + asn_DEF_MeasurementDataItem_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementDataItem_tags_1) + /sizeof(asn_DEF_MeasurementDataItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MeasurementDataItem_1, + 2, /* Elements count */ + &asn_SPC_MeasurementDataItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-Item.c b/Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-Item.c new file mode 100644 index 0000000..76f69bd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-Item.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementInfo-Action-Item.h" + +asn_TYPE_member_t asn_MBR_MeasurementInfo_Action_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MeasurementInfo_Action_Item, measName), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementTypeName, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measName" + }, + { ATF_POINTER, 1, offsetof(struct MeasurementInfo_Action_Item, measID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementTypeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measID" + }, +}; +static const int asn_MAP_MeasurementInfo_Action_Item_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_MeasurementInfo_Action_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementInfo_Action_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measName */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* measID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MeasurementInfo_Action_Item_specs_1 = { + sizeof(struct MeasurementInfo_Action_Item), + offsetof(struct MeasurementInfo_Action_Item, _asn_ctx), + asn_MAP_MeasurementInfo_Action_Item_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_MeasurementInfo_Action_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementInfo_Action_Item = { + "MeasurementInfo-Action-Item", + "MeasurementInfo-Action-Item", + &asn_OP_SEQUENCE, + asn_DEF_MeasurementInfo_Action_Item_tags_1, + sizeof(asn_DEF_MeasurementInfo_Action_Item_tags_1) + /sizeof(asn_DEF_MeasurementInfo_Action_Item_tags_1[0]), /* 1 */ + asn_DEF_MeasurementInfo_Action_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementInfo_Action_Item_tags_1) + /sizeof(asn_DEF_MeasurementInfo_Action_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MeasurementInfo_Action_Item_1, + 2, /* Elements count */ + &asn_SPC_MeasurementInfo_Action_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-List.c b/Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-List.c new file mode 100644 index 0000000..19eb2cb --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementInfo-Action-List.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementInfo-Action-List.h" + +#include "MeasurementInfo-Action-Item.h" +asn_per_constraints_t asn_PER_type_MeasurementInfo_Action_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MeasurementInfo_Action_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_MeasurementInfo_Action_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementInfo_Action_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MeasurementInfo_Action_List_specs_1 = { + sizeof(struct MeasurementInfo_Action_List), + offsetof(struct MeasurementInfo_Action_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementInfo_Action_List = { + "MeasurementInfo-Action-List", + "MeasurementInfo-Action-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_MeasurementInfo_Action_List_tags_1, + sizeof(asn_DEF_MeasurementInfo_Action_List_tags_1) + /sizeof(asn_DEF_MeasurementInfo_Action_List_tags_1[0]), /* 1 */ + asn_DEF_MeasurementInfo_Action_List_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementInfo_Action_List_tags_1) + /sizeof(asn_DEF_MeasurementInfo_Action_List_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementInfo_Action_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MeasurementInfo_Action_List_1, + 1, /* Single element */ + &asn_SPC_MeasurementInfo_Action_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementInfoItem.c b/Bouncer/e2sm_kpm/lib/MeasurementInfoItem.c new file mode 100644 index 0000000..a3f9433 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementInfoItem.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementInfoItem.h" + +asn_TYPE_member_t asn_MBR_MeasurementInfoItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MeasurementInfoItem, measType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_MeasurementType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measType" + }, + { ATF_NOFLAGS, 0, offsetof(struct MeasurementInfoItem, labelInfoList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LabelInfoList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "labelInfoList" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementInfoItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementInfoItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* labelInfoList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MeasurementInfoItem_specs_1 = { + sizeof(struct MeasurementInfoItem), + offsetof(struct MeasurementInfoItem, _asn_ctx), + asn_MAP_MeasurementInfoItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementInfoItem = { + "MeasurementInfoItem", + "MeasurementInfoItem", + &asn_OP_SEQUENCE, + asn_DEF_MeasurementInfoItem_tags_1, + sizeof(asn_DEF_MeasurementInfoItem_tags_1) + /sizeof(asn_DEF_MeasurementInfoItem_tags_1[0]), /* 1 */ + asn_DEF_MeasurementInfoItem_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementInfoItem_tags_1) + /sizeof(asn_DEF_MeasurementInfoItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MeasurementInfoItem_1, + 2, /* Elements count */ + &asn_SPC_MeasurementInfoItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementInfoList.c b/Bouncer/e2sm_kpm/lib/MeasurementInfoList.c new file mode 100644 index 0000000..c3861f2 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementInfoList.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementInfoList.h" + +#include "MeasurementInfoItem.h" +asn_per_constraints_t asn_PER_type_MeasurementInfoList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MeasurementInfoList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_MeasurementInfoItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementInfoList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MeasurementInfoList_specs_1 = { + sizeof(struct MeasurementInfoList), + offsetof(struct MeasurementInfoList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementInfoList = { + "MeasurementInfoList", + "MeasurementInfoList", + &asn_OP_SEQUENCE_OF, + asn_DEF_MeasurementInfoList_tags_1, + sizeof(asn_DEF_MeasurementInfoList_tags_1) + /sizeof(asn_DEF_MeasurementInfoList_tags_1[0]), /* 1 */ + asn_DEF_MeasurementInfoList_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementInfoList_tags_1) + /sizeof(asn_DEF_MeasurementInfoList_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementInfoList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MeasurementInfoList_1, + 1, /* Single element */ + &asn_SPC_MeasurementInfoList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementLabel.c b/Bouncer/e2sm_kpm/lib/MeasurementLabel.c new file mode 100644 index 0000000..6283b1c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementLabel.c @@ -0,0 +1,787 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementLabel.h" + +#include "S-NSSAI.h" +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static int +memb_aRPmax_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 15)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_aRPmin_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 15)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_bitrateRange_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_layerMU_MIMO_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_distBinX_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_distBinY_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_distBinZ_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_type_noLabel_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_sUM_constr_16 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_preLabelOverride_constr_22 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_startEndInd_constr_25 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_min_constr_29 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_max_constr_32 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_avg_constr_35 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_aRPmax_constr_12 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 15 } /* (1..15,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_aRPmin_constr_13 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 15 } /* (1..15,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_bitrateRange_constr_14 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_layerMU_MIMO_constr_15 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_distBinX_constr_19 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_distBinY_constr_20 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_distBinZ_constr_21 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_noLabel_value2enum_2[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_noLabel_enum2value_2[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_noLabel_specs_2 = { + asn_MAP_noLabel_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_noLabel_enum2value_2, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_noLabel_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_noLabel_2 = { + "noLabel", + "noLabel", + &asn_OP_NativeEnumerated, + asn_DEF_noLabel_tags_2, + sizeof(asn_DEF_noLabel_tags_2) + /sizeof(asn_DEF_noLabel_tags_2[0]) - 1, /* 1 */ + asn_DEF_noLabel_tags_2, /* Same as above */ + sizeof(asn_DEF_noLabel_tags_2) + /sizeof(asn_DEF_noLabel_tags_2[0]), /* 2 */ + { 0, &asn_PER_type_noLabel_constr_2, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_noLabel_specs_2 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_sUM_value2enum_16[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_sUM_enum2value_16[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_sUM_specs_16 = { + asn_MAP_sUM_value2enum_16, /* "tag" => N; sorted by tag */ + asn_MAP_sUM_enum2value_16, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_sUM_tags_16[] = { + (ASN_TAG_CLASS_CONTEXT | (12 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_sUM_16 = { + "sUM", + "sUM", + &asn_OP_NativeEnumerated, + asn_DEF_sUM_tags_16, + sizeof(asn_DEF_sUM_tags_16) + /sizeof(asn_DEF_sUM_tags_16[0]) - 1, /* 1 */ + asn_DEF_sUM_tags_16, /* Same as above */ + sizeof(asn_DEF_sUM_tags_16) + /sizeof(asn_DEF_sUM_tags_16[0]), /* 2 */ + { 0, &asn_PER_type_sUM_constr_16, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_sUM_specs_16 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_preLabelOverride_value2enum_22[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_preLabelOverride_enum2value_22[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_preLabelOverride_specs_22 = { + asn_MAP_preLabelOverride_value2enum_22, /* "tag" => N; sorted by tag */ + asn_MAP_preLabelOverride_enum2value_22, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_preLabelOverride_tags_22[] = { + (ASN_TAG_CLASS_CONTEXT | (16 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_preLabelOverride_22 = { + "preLabelOverride", + "preLabelOverride", + &asn_OP_NativeEnumerated, + asn_DEF_preLabelOverride_tags_22, + sizeof(asn_DEF_preLabelOverride_tags_22) + /sizeof(asn_DEF_preLabelOverride_tags_22[0]) - 1, /* 1 */ + asn_DEF_preLabelOverride_tags_22, /* Same as above */ + sizeof(asn_DEF_preLabelOverride_tags_22) + /sizeof(asn_DEF_preLabelOverride_tags_22[0]), /* 2 */ + { 0, &asn_PER_type_preLabelOverride_constr_22, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_preLabelOverride_specs_22 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_startEndInd_value2enum_25[] = { + { 0, 5, "start" }, + { 1, 3, "end" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_startEndInd_enum2value_25[] = { + 1, /* end(1) */ + 0 /* start(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_startEndInd_specs_25 = { + asn_MAP_startEndInd_value2enum_25, /* "tag" => N; sorted by tag */ + asn_MAP_startEndInd_enum2value_25, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_startEndInd_tags_25[] = { + (ASN_TAG_CLASS_CONTEXT | (17 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_startEndInd_25 = { + "startEndInd", + "startEndInd", + &asn_OP_NativeEnumerated, + asn_DEF_startEndInd_tags_25, + sizeof(asn_DEF_startEndInd_tags_25) + /sizeof(asn_DEF_startEndInd_tags_25[0]) - 1, /* 1 */ + asn_DEF_startEndInd_tags_25, /* Same as above */ + sizeof(asn_DEF_startEndInd_tags_25) + /sizeof(asn_DEF_startEndInd_tags_25[0]), /* 2 */ + { 0, &asn_PER_type_startEndInd_constr_25, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_startEndInd_specs_25 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_min_value2enum_29[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_min_enum2value_29[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_min_specs_29 = { + asn_MAP_min_value2enum_29, /* "tag" => N; sorted by tag */ + asn_MAP_min_enum2value_29, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_min_tags_29[] = { + (ASN_TAG_CLASS_CONTEXT | (18 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_min_29 = { + "min", + "min", + &asn_OP_NativeEnumerated, + asn_DEF_min_tags_29, + sizeof(asn_DEF_min_tags_29) + /sizeof(asn_DEF_min_tags_29[0]) - 1, /* 1 */ + asn_DEF_min_tags_29, /* Same as above */ + sizeof(asn_DEF_min_tags_29) + /sizeof(asn_DEF_min_tags_29[0]), /* 2 */ + { 0, &asn_PER_type_min_constr_29, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_min_specs_29 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_max_value2enum_32[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_max_enum2value_32[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_max_specs_32 = { + asn_MAP_max_value2enum_32, /* "tag" => N; sorted by tag */ + asn_MAP_max_enum2value_32, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_max_tags_32[] = { + (ASN_TAG_CLASS_CONTEXT | (19 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_max_32 = { + "max", + "max", + &asn_OP_NativeEnumerated, + asn_DEF_max_tags_32, + sizeof(asn_DEF_max_tags_32) + /sizeof(asn_DEF_max_tags_32[0]) - 1, /* 1 */ + asn_DEF_max_tags_32, /* Same as above */ + sizeof(asn_DEF_max_tags_32) + /sizeof(asn_DEF_max_tags_32[0]), /* 2 */ + { 0, &asn_PER_type_max_constr_32, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_max_specs_32 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_avg_value2enum_35[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_avg_enum2value_35[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_avg_specs_35 = { + asn_MAP_avg_value2enum_35, /* "tag" => N; sorted by tag */ + asn_MAP_avg_enum2value_35, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_avg_tags_35[] = { + (ASN_TAG_CLASS_CONTEXT | (20 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_avg_35 = { + "avg", + "avg", + &asn_OP_NativeEnumerated, + asn_DEF_avg_tags_35, + sizeof(asn_DEF_avg_tags_35) + /sizeof(asn_DEF_avg_tags_35[0]) - 1, /* 1 */ + asn_DEF_avg_tags_35, /* Same as above */ + sizeof(asn_DEF_avg_tags_35) + /sizeof(asn_DEF_avg_tags_35[0]), /* 2 */ + { 0, &asn_PER_type_avg_constr_35, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_avg_specs_35 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { + { ATF_POINTER, 21, offsetof(struct MeasurementLabel, noLabel), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_noLabel_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "noLabel" + }, + { ATF_POINTER, 20, offsetof(struct MeasurementLabel, plmnID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "plmnID" + }, + { ATF_POINTER, 19, offsetof(struct MeasurementLabel, sliceID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_S_NSSAI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sliceID" + }, + { ATF_POINTER, 18, offsetof(struct MeasurementLabel, fiveQI), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FiveQI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveQI" + }, + { ATF_POINTER, 17, offsetof(struct MeasurementLabel, qFI), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QosFlowIdentifier, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "qFI" + }, + { ATF_POINTER, 16, offsetof(struct MeasurementLabel, qCI), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "qCI" + }, + { ATF_POINTER, 15, offsetof(struct MeasurementLabel, qCImax), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "qCImax" + }, + { ATF_POINTER, 14, offsetof(struct MeasurementLabel, qCImin), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "qCImin" + }, + { ATF_POINTER, 13, offsetof(struct MeasurementLabel, aRPmax), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_aRPmax_constr_12, memb_aRPmax_constraint_1 }, + 0, 0, /* No default value */ + "aRPmax" + }, + { ATF_POINTER, 12, offsetof(struct MeasurementLabel, aRPmin), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_aRPmin_constr_13, memb_aRPmin_constraint_1 }, + 0, 0, /* No default value */ + "aRPmin" + }, + { ATF_POINTER, 11, offsetof(struct MeasurementLabel, bitrateRange), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_bitrateRange_constr_14, memb_bitrateRange_constraint_1 }, + 0, 0, /* No default value */ + "bitrateRange" + }, + { ATF_POINTER, 10, offsetof(struct MeasurementLabel, layerMU_MIMO), + (ASN_TAG_CLASS_CONTEXT | (11 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_layerMU_MIMO_constr_15, memb_layerMU_MIMO_constraint_1 }, + 0, 0, /* No default value */ + "layerMU-MIMO" + }, + { ATF_POINTER, 9, offsetof(struct MeasurementLabel, sUM), + (ASN_TAG_CLASS_CONTEXT | (12 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_sUM_16, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sUM" + }, + { ATF_POINTER, 8, offsetof(struct MeasurementLabel, distBinX), + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_distBinX_constr_19, memb_distBinX_constraint_1 }, + 0, 0, /* No default value */ + "distBinX" + }, + { ATF_POINTER, 7, offsetof(struct MeasurementLabel, distBinY), + (ASN_TAG_CLASS_CONTEXT | (14 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_distBinY_constr_20, memb_distBinY_constraint_1 }, + 0, 0, /* No default value */ + "distBinY" + }, + { ATF_POINTER, 6, offsetof(struct MeasurementLabel, distBinZ), + (ASN_TAG_CLASS_CONTEXT | (15 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_distBinZ_constr_21, memb_distBinZ_constraint_1 }, + 0, 0, /* No default value */ + "distBinZ" + }, + { ATF_POINTER, 5, offsetof(struct MeasurementLabel, preLabelOverride), + (ASN_TAG_CLASS_CONTEXT | (16 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_preLabelOverride_22, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "preLabelOverride" + }, + { ATF_POINTER, 4, offsetof(struct MeasurementLabel, startEndInd), + (ASN_TAG_CLASS_CONTEXT | (17 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_startEndInd_25, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "startEndInd" + }, + { ATF_POINTER, 3, offsetof(struct MeasurementLabel, min), + (ASN_TAG_CLASS_CONTEXT | (18 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_min_29, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "min" + }, + { ATF_POINTER, 2, offsetof(struct MeasurementLabel, max), + (ASN_TAG_CLASS_CONTEXT | (19 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_max_32, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "max" + }, + { ATF_POINTER, 1, offsetof(struct MeasurementLabel, avg), + (ASN_TAG_CLASS_CONTEXT | (20 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_avg_35, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "avg" + }, +}; +static const int asn_MAP_MeasurementLabel_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }; +static const ber_tlv_tag_t asn_DEF_MeasurementLabel_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementLabel_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* noLabel */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* plmnID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sliceID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* fiveQI */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* qFI */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* qCI */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* qCImax */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* qCImin */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* aRPmax */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* aRPmin */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* bitrateRange */ + { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* layerMU-MIMO */ + { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* sUM */ + { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* distBinX */ + { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 }, /* distBinY */ + { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 15, 0, 0 }, /* distBinZ */ + { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 16, 0, 0 }, /* preLabelOverride */ + { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 17, 0, 0 }, /* startEndInd */ + { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 18, 0, 0 }, /* min */ + { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 19, 0, 0 }, /* max */ + { (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 20, 0, 0 } /* avg */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MeasurementLabel_specs_1 = { + sizeof(struct MeasurementLabel), + offsetof(struct MeasurementLabel, _asn_ctx), + asn_MAP_MeasurementLabel_tag2el_1, + 21, /* Count of tags in the map */ + asn_MAP_MeasurementLabel_oms_1, /* Optional members */ + 21, 0, /* Root/Additions */ + 21, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementLabel = { + "MeasurementLabel", + "MeasurementLabel", + &asn_OP_SEQUENCE, + asn_DEF_MeasurementLabel_tags_1, + sizeof(asn_DEF_MeasurementLabel_tags_1) + /sizeof(asn_DEF_MeasurementLabel_tags_1[0]), /* 1 */ + asn_DEF_MeasurementLabel_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementLabel_tags_1) + /sizeof(asn_DEF_MeasurementLabel_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MeasurementLabel_1, + 21, /* Elements count */ + &asn_SPC_MeasurementLabel_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementRecord.c b/Bouncer/e2sm_kpm/lib/MeasurementRecord.c new file mode 100644 index 0000000..e8bdb53 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementRecord.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementRecord.h" + +#include "MeasurementRecordItem.h" +asn_per_constraints_t asn_PER_type_MeasurementRecord_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 31, -1, 1, 2147483647 } /* (SIZE(1..2147483647)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MeasurementRecord_1[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_MeasurementRecordItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_MeasurementRecord_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_MeasurementRecord_specs_1 = { + sizeof(struct MeasurementRecord), + offsetof(struct MeasurementRecord, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementRecord = { + "MeasurementRecord", + "MeasurementRecord", + &asn_OP_SEQUENCE_OF, + asn_DEF_MeasurementRecord_tags_1, + sizeof(asn_DEF_MeasurementRecord_tags_1) + /sizeof(asn_DEF_MeasurementRecord_tags_1[0]), /* 1 */ + asn_DEF_MeasurementRecord_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementRecord_tags_1) + /sizeof(asn_DEF_MeasurementRecord_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementRecord_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_MeasurementRecord_1, + 1, /* Single element */ + &asn_SPC_MeasurementRecord_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementRecordItem.c b/Bouncer/e2sm_kpm/lib/MeasurementRecordItem.c new file mode 100644 index 0000000..d415c59 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementRecordItem.c @@ -0,0 +1,143 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementRecordItem.h" + +static int +integer_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static int +memb_integer_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +static asn_per_constraints_t asn_PER_type_integer_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_integer_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_per_constraints_t asn_PER_type_MeasurementRecordItem_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_specifics_t asn_SPC_integer_specs_2 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_integer_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_integer_2 = { + "integer", + "integer", + &asn_OP_NativeInteger, + asn_DEF_integer_tags_2, + sizeof(asn_DEF_integer_tags_2) + /sizeof(asn_DEF_integer_tags_2[0]) - 1, /* 1 */ + asn_DEF_integer_tags_2, /* Same as above */ + sizeof(asn_DEF_integer_tags_2) + /sizeof(asn_DEF_integer_tags_2[0]), /* 2 */ + { 0, &asn_PER_type_integer_constr_2, integer_2_constraint }, + 0, 0, /* No members */ + &asn_SPC_integer_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_MeasurementRecordItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.integer), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_integer_2, + 0, + { 0, &asn_PER_memb_integer_constr_2, memb_integer_constraint_1 }, + 0, 0, /* No default value */ + "integer" + }, + { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.real), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeReal, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "real" + }, + { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.noValue), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "noValue" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementRecordItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* real */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* noValue */ +}; +asn_CHOICE_specifics_t asn_SPC_MeasurementRecordItem_specs_1 = { + sizeof(struct MeasurementRecordItem), + offsetof(struct MeasurementRecordItem, _asn_ctx), + offsetof(struct MeasurementRecordItem, present), + sizeof(((struct MeasurementRecordItem *)0)->present), + asn_MAP_MeasurementRecordItem_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementRecordItem = { + "MeasurementRecordItem", + "MeasurementRecordItem", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_MeasurementRecordItem_constr_1, CHOICE_constraint }, + asn_MBR_MeasurementRecordItem_1, + 3, /* Elements count */ + &asn_SPC_MeasurementRecordItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementType.c b/Bouncer/e2sm_kpm/lib/MeasurementType.c new file mode 100644 index 0000000..e3f65c9 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementType.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementType.h" + +asn_per_constraints_t asn_PER_type_MeasurementType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MeasurementType_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MeasurementType, choice.measName), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementTypeName, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measName" + }, + { ATF_NOFLAGS, 0, offsetof(struct MeasurementType, choice.measID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementTypeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_MeasurementType_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measName */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* measID */ +}; +asn_CHOICE_specifics_t asn_SPC_MeasurementType_specs_1 = { + sizeof(struct MeasurementType), + offsetof(struct MeasurementType, _asn_ctx), + offsetof(struct MeasurementType, present), + sizeof(((struct MeasurementType *)0)->present), + asn_MAP_MeasurementType_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementType = { + "MeasurementType", + "MeasurementType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_MeasurementType_constr_1, CHOICE_constraint }, + asn_MBR_MeasurementType_1, + 2, /* Elements count */ + &asn_SPC_MeasurementType_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementTypeID.c b/Bouncer/e2sm_kpm/lib/MeasurementTypeID.c new file mode 100644 index 0000000..9efb8ec --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementTypeID.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementTypeID.h" + +int +MeasurementTypeID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65536)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_MeasurementTypeID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, -1, 1, 65536 } /* (1..65536,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_MeasurementTypeID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementTypeID = { + "MeasurementTypeID", + "MeasurementTypeID", + &asn_OP_NativeInteger, + asn_DEF_MeasurementTypeID_tags_1, + sizeof(asn_DEF_MeasurementTypeID_tags_1) + /sizeof(asn_DEF_MeasurementTypeID_tags_1[0]), /* 1 */ + asn_DEF_MeasurementTypeID_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementTypeID_tags_1) + /sizeof(asn_DEF_MeasurementTypeID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementTypeID_constr_1, MeasurementTypeID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/MeasurementTypeName.c b/Bouncer/e2sm_kpm/lib/MeasurementTypeName.c new file mode 100644 index 0000000..978f59c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/MeasurementTypeName.c @@ -0,0 +1,106 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "MeasurementTypeName.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +MeasurementTypeName_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_MeasurementTypeName_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_MeasurementTypeName_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_MeasurementTypeName_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_MeasurementTypeName_1_v2c, /* Value to PER code map */ + asn_PER_MAP_MeasurementTypeName_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_MeasurementTypeName_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MeasurementTypeName = { + "MeasurementTypeName", + "MeasurementTypeName", + &asn_OP_PrintableString, + asn_DEF_MeasurementTypeName_tags_1, + sizeof(asn_DEF_MeasurementTypeName_tags_1) + /sizeof(asn_DEF_MeasurementTypeName_tags_1[0]), /* 1 */ + asn_DEF_MeasurementTypeName_tags_1, /* Same as above */ + sizeof(asn_DEF_MeasurementTypeName_tags_1) + /sizeof(asn_DEF_MeasurementTypeName_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_MeasurementTypeName_constr_1, MeasurementTypeName_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NG-RANnodeUEXnAPID.c b/Bouncer/e2sm_kpm/lib/NG-RANnodeUEXnAPID.c new file mode 100644 index 0000000..1541b4e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NG-RANnodeUEXnAPID.c @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NG-RANnodeUEXnAPID.h" + +int +NG_RANnodeUEXnAPID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_NG_RANnodeUEXnAPID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_NG_RANnodeUEXnAPID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_NG_RANnodeUEXnAPID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NG_RANnodeUEXnAPID = { + "NG-RANnodeUEXnAPID", + "NG-RANnodeUEXnAPID", + &asn_OP_NativeInteger, + asn_DEF_NG_RANnodeUEXnAPID_tags_1, + sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1) + /sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1[0]), /* 1 */ + asn_DEF_NG_RANnodeUEXnAPID_tags_1, /* Same as above */ + sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1) + /sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_NG_RANnodeUEXnAPID_constr_1, NG_RANnodeUEXnAPID_constraint }, + 0, 0, /* No members */ + &asn_SPC_NG_RANnodeUEXnAPID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NGENB-CU-UE-W1AP-ID.c b/Bouncer/e2sm_kpm/lib/NGENB-CU-UE-W1AP-ID.c new file mode 100644 index 0000000..2859907 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NGENB-CU-UE-W1AP-ID.c @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NGENB-CU-UE-W1AP-ID.h" + +int +NGENB_CU_UE_W1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_NGENB_CU_UE_W1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NGENB_CU_UE_W1AP_ID = { + "NGENB-CU-UE-W1AP-ID", + "NGENB-CU-UE-W1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1, + sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1) + /sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1) + /sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_NGENB_CU_UE_W1AP_ID_constr_1, NGENB_CU_UE_W1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NGENB-DU-ID.c b/Bouncer/e2sm_kpm/lib/NGENB-DU-ID.c new file mode 100644 index 0000000..5bfea48 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NGENB-DU-ID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NGENB-DU-ID.h" + +int +NGENB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_NGENB_DU_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_NGENB_DU_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NGENB_DU_ID = { + "NGENB-DU-ID", + "NGENB-DU-ID", + &asn_OP_INTEGER, + asn_DEF_NGENB_DU_ID_tags_1, + sizeof(asn_DEF_NGENB_DU_ID_tags_1) + /sizeof(asn_DEF_NGENB_DU_ID_tags_1[0]), /* 1 */ + asn_DEF_NGENB_DU_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_NGENB_DU_ID_tags_1) + /sizeof(asn_DEF_NGENB_DU_ID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_NGENB_DU_ID_constr_1, NGENB_DU_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NI-Type.c b/Bouncer/e2sm_kpm/lib/NI-Type.c new file mode 100644 index 0000000..7045c05 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NI-Type.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "NI-Type.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_NI_Type_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_NI_Type_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_NI_Type_value2enum_1[] = { + { 0, 4, "x2-u" }, + { 1, 4, "xn-u" }, + { 2, 4, "f1-u" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_NI_Type_enum2value_1[] = { + 2, /* f1-u(2) */ + 0, /* x2-u(0) */ + 1 /* xn-u(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_NI_Type_specs_1 = { + asn_MAP_NI_Type_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_NI_Type_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_NI_Type_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NI_Type = { + "NI-Type", + "NI-Type", + &asn_OP_NativeEnumerated, + asn_DEF_NI_Type_tags_1, + sizeof(asn_DEF_NI_Type_tags_1) + /sizeof(asn_DEF_NI_Type_tags_1[0]), /* 1 */ + asn_DEF_NI_Type_tags_1, /* Same as above */ + sizeof(asn_DEF_NI_Type_tags_1) + /sizeof(asn_DEF_NI_Type_tags_1[0]), /* 1 */ + { &asn_OER_type_NI_Type_constr_1, &asn_PER_type_NI_Type_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_NI_Type_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NR-ARFCN.c b/Bouncer/e2sm_kpm/lib/NR-ARFCN.c new file mode 100644 index 0000000..166f4f6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NR-ARFCN.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NR-ARFCN.h" + +static int +memb_nRARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 3279165)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_nRARFCN_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 22, -1, 0, 3279165 } /* (0..3279165) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NR_ARFCN_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NR_ARFCN, nRARFCN), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_nRARFCN_constr_2, memb_nRARFCN_constraint_1 }, + 0, 0, /* No default value */ + "nRARFCN" + }, +}; +static const ber_tlv_tag_t asn_DEF_NR_ARFCN_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NR_ARFCN_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* nRARFCN */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NR_ARFCN_specs_1 = { + sizeof(struct NR_ARFCN), + offsetof(struct NR_ARFCN, _asn_ctx), + asn_MAP_NR_ARFCN_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NR_ARFCN = { + "NR-ARFCN", + "NR-ARFCN", + &asn_OP_SEQUENCE, + asn_DEF_NR_ARFCN_tags_1, + sizeof(asn_DEF_NR_ARFCN_tags_1) + /sizeof(asn_DEF_NR_ARFCN_tags_1[0]), /* 1 */ + asn_DEF_NR_ARFCN_tags_1, /* Same as above */ + sizeof(asn_DEF_NR_ARFCN_tags_1) + /sizeof(asn_DEF_NR_ARFCN_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NR_ARFCN_1, + 1, /* Elements count */ + &asn_SPC_NR_ARFCN_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NR-CGI.c b/Bouncer/e2sm_kpm/lib/NR-CGI.c new file mode 100644 index 0000000..d5cb1c4 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NR-CGI.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NR-CGI.h" + +asn_TYPE_member_t asn_MBR_NR_CGI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NR_CGI, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct NR_CGI, nRCellIdentity), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCellIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCellIdentity" + }, +}; +static const ber_tlv_tag_t asn_DEF_NR_CGI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NR_CGI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* nRCellIdentity */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NR_CGI_specs_1 = { + sizeof(struct NR_CGI), + offsetof(struct NR_CGI, _asn_ctx), + asn_MAP_NR_CGI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NR_CGI = { + "NR-CGI", + "NR-CGI", + &asn_OP_SEQUENCE, + asn_DEF_NR_CGI_tags_1, + sizeof(asn_DEF_NR_CGI_tags_1) + /sizeof(asn_DEF_NR_CGI_tags_1[0]), /* 1 */ + asn_DEF_NR_CGI_tags_1, /* Same as above */ + sizeof(asn_DEF_NR_CGI_tags_1) + /sizeof(asn_DEF_NR_CGI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NR_CGI_1, + 2, /* Elements count */ + &asn_SPC_NR_CGI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NR-PCI.c b/Bouncer/e2sm_kpm/lib/NR-PCI.c new file mode 100644 index 0000000..8a0f74a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NR-PCI.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NR-PCI.h" + +int +NR_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 1007)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_NR_PCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 10, 10, 0, 1007 } /* (0..1007) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_NR_PCI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NR_PCI = { + "NR-PCI", + "NR-PCI", + &asn_OP_NativeInteger, + asn_DEF_NR_PCI_tags_1, + sizeof(asn_DEF_NR_PCI_tags_1) + /sizeof(asn_DEF_NR_PCI_tags_1[0]), /* 1 */ + asn_DEF_NR_PCI_tags_1, /* Same as above */ + sizeof(asn_DEF_NR_PCI_tags_1) + /sizeof(asn_DEF_NR_PCI_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_NR_PCI_constr_1, NR_PCI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NRCGI.c b/Bouncer/e2sm_kpm/lib/NRCGI.c new file mode 100644 index 0000000..74780d4 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NRCGI.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "NRCGI.h" + +asn_TYPE_member_t asn_MBR_NRCGI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NRCGI, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct NRCGI, nRCellIdentity), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCellIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCellIdentity" + }, +}; +static const ber_tlv_tag_t asn_DEF_NRCGI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NRCGI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* nRCellIdentity */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NRCGI_specs_1 = { + sizeof(struct NRCGI), + offsetof(struct NRCGI, _asn_ctx), + asn_MAP_NRCGI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NRCGI = { + "NRCGI", + "NRCGI", + &asn_OP_SEQUENCE, + asn_DEF_NRCGI_tags_1, + sizeof(asn_DEF_NRCGI_tags_1) + /sizeof(asn_DEF_NRCGI_tags_1[0]), /* 1 */ + asn_DEF_NRCGI_tags_1, /* Same as above */ + sizeof(asn_DEF_NRCGI_tags_1) + /sizeof(asn_DEF_NRCGI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NRCGI_1, + 2, /* Elements count */ + &asn_SPC_NRCGI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NRCellIdentity.c b/Bouncer/e2sm_kpm/lib/NRCellIdentity.c new file mode 100644 index 0000000..601fd16 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NRCellIdentity.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NRCellIdentity.h" + +int +NRCellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 36)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_NRCellIdentity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 36, 36 } /* (SIZE(36..36)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_NRCellIdentity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NRCellIdentity = { + "NRCellIdentity", + "NRCellIdentity", + &asn_OP_BIT_STRING, + asn_DEF_NRCellIdentity_tags_1, + sizeof(asn_DEF_NRCellIdentity_tags_1) + /sizeof(asn_DEF_NRCellIdentity_tags_1[0]), /* 1 */ + asn_DEF_NRCellIdentity_tags_1, /* Same as above */ + sizeof(asn_DEF_NRCellIdentity_tags_1) + /sizeof(asn_DEF_NRCellIdentity_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_NRCellIdentity_constr_1, NRCellIdentity_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NRFrequencyBand-List.c b/Bouncer/e2sm_kpm/lib/NRFrequencyBand-List.c new file mode 100644 index 0000000..3245541 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NRFrequencyBand-List.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NRFrequencyBand-List.h" + +#include "NRFrequencyBandItem.h" +asn_per_constraints_t asn_PER_type_NRFrequencyBand_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NRFrequencyBand_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_NRFrequencyBandItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_NRFrequencyBand_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_NRFrequencyBand_List_specs_1 = { + sizeof(struct NRFrequencyBand_List), + offsetof(struct NRFrequencyBand_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyBand_List = { + "NRFrequencyBand-List", + "NRFrequencyBand-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_NRFrequencyBand_List_tags_1, + sizeof(asn_DEF_NRFrequencyBand_List_tags_1) + /sizeof(asn_DEF_NRFrequencyBand_List_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyBand_List_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyBand_List_tags_1) + /sizeof(asn_DEF_NRFrequencyBand_List_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_NRFrequencyBand_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_NRFrequencyBand_List_1, + 1, /* Single element */ + &asn_SPC_NRFrequencyBand_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NRFrequencyBandItem.c b/Bouncer/e2sm_kpm/lib/NRFrequencyBandItem.c new file mode 100644 index 0000000..1d2f2bc --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NRFrequencyBandItem.c @@ -0,0 +1,90 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NRFrequencyBandItem.h" + +static int +memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1024 } /* (1..1024,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NRFrequencyBandItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyBandItem, freqBandIndicatorNr), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_freqBandIndicatorNr_constr_2, memb_freqBandIndicatorNr_constraint_1 }, + 0, 0, /* No default value */ + "freqBandIndicatorNr" + }, + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyBandItem, supportedSULBandList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SupportedSULBandList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "supportedSULBandList" + }, +}; +static const ber_tlv_tag_t asn_DEF_NRFrequencyBandItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NRFrequencyBandItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* freqBandIndicatorNr */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* supportedSULBandList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NRFrequencyBandItem_specs_1 = { + sizeof(struct NRFrequencyBandItem), + offsetof(struct NRFrequencyBandItem, _asn_ctx), + asn_MAP_NRFrequencyBandItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyBandItem = { + "NRFrequencyBandItem", + "NRFrequencyBandItem", + &asn_OP_SEQUENCE, + asn_DEF_NRFrequencyBandItem_tags_1, + sizeof(asn_DEF_NRFrequencyBandItem_tags_1) + /sizeof(asn_DEF_NRFrequencyBandItem_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyBandItem_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyBandItem_tags_1) + /sizeof(asn_DEF_NRFrequencyBandItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NRFrequencyBandItem_1, + 2, /* Elements count */ + &asn_SPC_NRFrequencyBandItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NRFrequencyInfo.c b/Bouncer/e2sm_kpm/lib/NRFrequencyInfo.c new file mode 100644 index 0000000..dfc4dbb --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NRFrequencyInfo.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NRFrequencyInfo.h" + +static asn_TYPE_member_t asn_MBR_NRFrequencyInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyInfo, nrARFCN), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nrARFCN" + }, + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyInfo, frequencyBand_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRFrequencyBand_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "frequencyBand-List" + }, + { ATF_POINTER, 1, offsetof(struct NRFrequencyInfo, frequencyShift7p5khz), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRFrequencyShift7p5khz, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "frequencyShift7p5khz" + }, +}; +static const int asn_MAP_NRFrequencyInfo_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_NRFrequencyInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NRFrequencyInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nrARFCN */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* frequencyBand-List */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* frequencyShift7p5khz */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_NRFrequencyInfo_specs_1 = { + sizeof(struct NRFrequencyInfo), + offsetof(struct NRFrequencyInfo, _asn_ctx), + asn_MAP_NRFrequencyInfo_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_NRFrequencyInfo_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyInfo = { + "NRFrequencyInfo", + "NRFrequencyInfo", + &asn_OP_SEQUENCE, + asn_DEF_NRFrequencyInfo_tags_1, + sizeof(asn_DEF_NRFrequencyInfo_tags_1) + /sizeof(asn_DEF_NRFrequencyInfo_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyInfo_tags_1) + /sizeof(asn_DEF_NRFrequencyInfo_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NRFrequencyInfo_1, + 3, /* Elements count */ + &asn_SPC_NRFrequencyInfo_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NRFrequencyShift7p5khz.c b/Bouncer/e2sm_kpm/lib/NRFrequencyShift7p5khz.c new file mode 100644 index 0000000..d79fbfd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NRFrequencyShift7p5khz.c @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NRFrequencyShift7p5khz.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_NRFrequencyShift7p5khz_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_NRFrequencyShift7p5khz_value2enum_1[] = { + { 0, 5, "false" }, + { 1, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_NRFrequencyShift7p5khz_enum2value_1[] = { + 0, /* false(0) */ + 1 /* true(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_NRFrequencyShift7p5khz_specs_1 = { + asn_MAP_NRFrequencyShift7p5khz_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_NRFrequencyShift7p5khz_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_NRFrequencyShift7p5khz_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyShift7p5khz = { + "NRFrequencyShift7p5khz", + "NRFrequencyShift7p5khz", + &asn_OP_NativeEnumerated, + asn_DEF_NRFrequencyShift7p5khz_tags_1, + sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1) + /sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyShift7p5khz_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1) + /sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_NRFrequencyShift7p5khz_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_NRFrequencyShift7p5khz_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/asn1c_defs/NULL.c b/Bouncer/e2sm_kpm/lib/NULL.c similarity index 100% rename from Bouncer/asn1c_defs/NULL.c rename to Bouncer/e2sm_kpm/lib/NULL.c diff --git a/Bouncer/e2sm_kpm/lib/NativeEnumerated.c b/Bouncer/e2sm_kpm/lib/NativeEnumerated.c new file mode 100644 index 0000000..50ffb1d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NativeEnumerated.c @@ -0,0 +1,367 @@ +/*- + * Copyright (c) 2004, 2007 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Read the NativeInteger.h for the explanation wrt. differences between + * INTEGER and NativeInteger. + * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this + * implementation deals with the standard (machine-specific) representation + * of them instead of using the platform-independent buffer. + */ +#include +#include + +/* + * NativeEnumerated basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_operation_t asn_OP_NativeEnumerated = { + NativeInteger_free, + NativeInteger_print, + NativeInteger_compare, + NativeInteger_decode_ber, + NativeInteger_encode_der, + NativeInteger_decode_xer, + NativeEnumerated_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + NativeEnumerated_decode_oer, + NativeEnumerated_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + NativeEnumerated_decode_uper, + NativeEnumerated_encode_uper, + NativeEnumerated_decode_aper, + NativeEnumerated_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + NativeEnumerated_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = { + "ENUMERATED", /* The ASN.1 type is still ENUMERATED */ + "ENUMERATED", + &asn_OP_NativeEnumerated, + asn_DEF_NativeEnumerated_tags, + sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), + asn_DEF_NativeEnumerated_tags, /* Same as above */ + sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +asn_enc_rval_t +NativeEnumerated_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + const long *native = (const long *)sptr; + const asn_INTEGER_enum_map_t *el; + + (void)ilevel; + (void)flags; + + if(!native) ASN__ENCODE_FAILED; + + el = INTEGER_map_value2enum(specs, *native); + if(el) { + er.encoded = + asn__format_to_callback(cb, app_key, "<%s/>", el->enum_name); + if(er.encoded < 0) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } else { + ASN_DEBUG( + "ASN.1 forbids dealing with " + "unknown value of ENUMERATED type"); + ASN__ENCODE_FAILED; + } +} + +asn_dec_rval_t +NativeEnumerated_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + long *native = (long *)*sptr; + const asn_per_constraint_t *ct = NULL; + long value; + + (void)opt_codec_ctx; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__DECODE_FAILED; /* Mandatory! */ + if(!specs) ASN__DECODE_FAILED; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + if(value >= (specs->extension + ? specs->extension - 1 : specs->map_count)) + ASN__DECODE_FAILED; + } else { + if(!specs->extension) + ASN__DECODE_FAILED; + /* + * X.691, #10.6: normally small non-negative whole number; + */ + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + if(value >= specs->map_count) + ASN__DECODE_FAILED; + } + + *native = specs->value2enum[value].nat_value; + ASN_DEBUG("Decoded %s = %ld", td->name, *native); + + return rval; +} + +static int +NativeEnumerated__compar_value2enum(const void *ap, const void *bp) { + const asn_INTEGER_enum_map_t *a = ap; + const asn_INTEGER_enum_map_t *b = bp; + if(a->nat_value == b->nat_value) + return 0; + if(a->nat_value < b->nat_value) + return -1; + return 1; +} + +asn_enc_rval_t +NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native, value; + const asn_per_constraint_t *ct = NULL; + int inext = 0; + asn_INTEGER_enum_map_t key; + const asn_INTEGER_enum_map_t *kf; + + if(!sptr) ASN__ENCODE_FAILED; + if(!specs) ASN__ENCODE_FAILED; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__ENCODE_FAILED; /* Mandatory! */ + + ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); + + er.encoded = 0; + + native = *(const long *)sptr; + + key.nat_value = native; + kf = bsearch(&key, specs->value2enum, specs->map_count, + sizeof(key), NativeEnumerated__compar_value2enum); + if(!kf) { + ASN_DEBUG("No element corresponds to %ld", native); + ASN__ENCODE_FAILED; + } + value = kf - specs->value2enum; + + if(ct && ct->range_bits >= 0) { + int cmpWith = specs->extension + ? specs->extension - 1 : specs->map_count; + if(value >= cmpWith) + inext = 1; + } + if(ct && ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, value, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(!specs->extension) + ASN__ENCODE_FAILED; + + /* + * X.691, #10.6: normally small non-negative whole number; + */ + ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", + value, specs->extension, inext, + value - (inext ? (specs->extension - 1) : 0)); + if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + long *native = (long *)*sptr; + const asn_per_constraint_t *ct = NULL; + long value; + + (void)opt_codec_ctx; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__DECODE_FAILED; /* Mandatory! */ + if(!specs) ASN__DECODE_FAILED; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + /* Deal with APER padding */ + if(ct && ct->upper_bound >= 255) { + int padding = 0; + padding = (8 - (pd->moved % 8)) % 8; + ASN_DEBUG("For NativeEnumerated %s,offset= %lu Padding bits = %d", td->name, pd->moved, padding); + ASN_DEBUG("For NativeEnumerated %s, upper bound = %lu", td->name, ct->upper_bound); + if(padding > 0) + per_get_few_bits(pd, padding); + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + if(value >= (specs->extension + ? specs->extension - 1 : specs->map_count)) + ASN__DECODE_FAILED; + } else { + if(!specs->extension) + ASN__DECODE_FAILED; + /* + * X.691, #10.6: normally small non-negative whole number; + */ + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + if(value >= specs->map_count) + ASN__DECODE_FAILED; + } + + *native = specs->value2enum[value].nat_value; + ASN_DEBUG("Decoded %s = %ld", td->name, *native); + + return rval; +} + +asn_enc_rval_t +NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native, value; + const asn_per_constraint_t *ct = NULL; + int inext = 0; + asn_INTEGER_enum_map_t key; + asn_INTEGER_enum_map_t *kf; + + if(!sptr) ASN__ENCODE_FAILED; + if(!specs) ASN__ENCODE_FAILED; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__ENCODE_FAILED; /* Mandatory! */ + + ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); + + er.encoded = 0; + + native = *(const long *)sptr; + if(native < 0) ASN__ENCODE_FAILED; + + key.nat_value = native; + kf = bsearch(&key, specs->value2enum, specs->map_count, + sizeof(key), NativeEnumerated__compar_value2enum); + if(!kf) { + ASN_DEBUG("No element corresponds to %ld", native); + ASN__ENCODE_FAILED; + } + value = kf - specs->value2enum; + + if(ct && ct->range_bits >= 0) { + int cmpWith = specs->extension + ? specs->extension - 1 : specs->map_count; + if(value >= cmpWith) + inext = 1; + } + if(ct && ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, value, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(!specs->extension) + ASN__ENCODE_FAILED; + + /* + * X.691, #10.6: normally small non-negative whole number; + */ + ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", + value, specs->extension, inext, + value - (inext ? (specs->extension - 1) : 0)); + if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/Bouncer/e2sm_kpm/lib/NativeEnumerated_oer.c b/Bouncer/e2sm_kpm/lib/NativeEnumerated_oer.c new file mode 100644 index 0000000..ee3c189 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NativeEnumerated_oer.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +static long +asn__nativeenumerated_convert(const uint8_t *b, const uint8_t *end) { + unsigned long value; + + /* Perform the sign initialization */ + /* Actually value = -(*b >> 7); gains nothing, yet unreadable! */ + if((*b >> 7)) { + value = (unsigned long)(-1); + } else { + value = 0; + } + + /* Conversion engine */ + for(; b < end; b++) { + value = (value << 8) | *b; + } + + return value; +} + +asn_dec_rval_t +NativeEnumerated_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + void **nint_ptr, const void *ptr, size_t size) { + asn_dec_rval_t rval = {RC_OK, 0}; + long *native = (long *)*nint_ptr; + const uint8_t *b = ptr; + + (void)opt_codec_ctx; + (void)constraints; + + if(size < 1) { + ASN__DECODE_STARVED; + } + + if((*b & 0x80) == 0) { + /* + * X.696 (08/2015) #11.2 Short form for Enumerated. + */ + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + *native = *b; + rval.consumed = 1; + } else { + /* + * X.696 (08/2015) #11.4 Long form for Enumerated. + */ + size_t length = *b & 0x7f; + const uint8_t *bend; + long value; + + if(length < 1 || length > sizeof(*native)) { + ASN__DECODE_FAILED; + } + if((1 + length) > size) { + ASN__DECODE_STARVED; + } + b++; + bend = b + length; + + value = asn__nativeenumerated_convert(b, bend); + if(value < 0) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + if(specs && specs->field_unsigned) { + ASN__DECODE_FAILED; + } + } + + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + *native = value; + + rval.consumed = (1 + length); + } + + return rval; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeEnumerated_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0,0,0}; + long native; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + + if(native >= 0 && native <= 127) { + /* #11.2 Short form */ + uint8_t b = native; + er.encoded = 1; + if(cb(&b, er.encoded, app_key) < 0) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } else { + /* #11.2 Long form */ + uint8_t buf[1 + sizeof(native)]; + uint8_t *b = &buf[sizeof(native)]; /* Last addressable */ + long final_pattern = -1 * (native < 0); + + for(;;) { + *b-- = native; + native >>= 8; + if(native == final_pattern) { + if(final_pattern) { + if((b[1] & 0x80)) break; + } else { + if(!(b[1] & 0x80)) break; + } + } + } + *b = 0x80 | (&buf[sizeof(native)] - b); + er.encoded = 1 + (&buf[sizeof(native)] - b); + if(cb(b, er.encoded, app_key) < 0) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/NativeInteger.c b/Bouncer/e2sm_kpm/lib/NativeInteger.c new file mode 100644 index 0000000..316e872 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NativeInteger.c @@ -0,0 +1,550 @@ +/*- + * Copyright (c) 2004, 2005, 2006 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Read the NativeInteger.h for the explanation wrt. differences between + * INTEGER and NativeInteger. + * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this + * implementation deals with the standard (machine-specific) representation + * of them instead of using the platform-independent buffer. + */ +#include +#include + +/* + * NativeInteger basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_operation_t asn_OP_NativeInteger = { + NativeInteger_free, + NativeInteger_print, + NativeInteger_compare, + NativeInteger_decode_ber, + NativeInteger_encode_der, + NativeInteger_decode_xer, + NativeInteger_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + NativeInteger_decode_oer, /* OER decoder */ + NativeInteger_encode_oer, /* Canonical OER encoder */ +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + NativeInteger_decode_uper, /* Unaligned PER decoder */ + NativeInteger_encode_uper, /* Unaligned PER encoder */ + NativeInteger_decode_aper, /* Aligned PER decoder */ + NativeInteger_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + NativeInteger_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NativeInteger = { + "INTEGER", /* The ASN.1 type is still INTEGER */ + "INTEGER", + &asn_OP_NativeInteger, + asn_DEF_NativeInteger_tags, + sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]), + asn_DEF_NativeInteger_tags, /* Same as above */ + sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +/* + * Decode INTEGER type. + */ +asn_dec_rval_t +NativeInteger_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **nint_ptr, + const void *buf_ptr, size_t size, int tag_mode) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + long *native = (long *)*nint_ptr; + asn_dec_rval_t rval; + ber_tlv_len_t length; + + /* + * If the structure is not there, allocate it. + */ + if(native == NULL) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(native == NULL) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + } + + ASN_DEBUG("Decoding %s as INTEGER (tm=%d)", + td->name, tag_mode); + + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, + tag_mode, 0, &length, 0); + if(rval.code != RC_OK) + return rval; + + ASN_DEBUG("%s length is %d bytes", td->name, (int)length); + + /* + * Make sure we have this length. + */ + buf_ptr = ((const char *)buf_ptr) + rval.consumed; + size -= rval.consumed; + if(length > (ber_tlv_len_t)size) { + rval.code = RC_WMORE; + rval.consumed = 0; + return rval; + } + + /* + * ASN.1 encoded INTEGER: buf_ptr, length + * Fill the native, at the same time checking for overflow. + * If overflow occured, return with RC_FAIL. + */ + { + INTEGER_t tmp; + union { + const void *constbuf; + void *nonconstbuf; + } unconst_buf; + long l; + + unconst_buf.constbuf = buf_ptr; + tmp.buf = (uint8_t *)unconst_buf.nonconstbuf; + tmp.size = length; + + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&tmp, (unsigned long *)&l) /* sic */ + : asn_INTEGER2long(&tmp, &l)) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + + *native = l; + } + + rval.code = RC_OK; + rval.consumed += length; + + ASN_DEBUG("Took %ld/%ld bytes to encode %s (%ld)", + (long)rval.consumed, (long)length, td->name, (long)*native); + + return rval; +} + +/* + * Encode the NativeInteger using the standard INTEGER type DER encoder. + */ +asn_enc_rval_t +NativeInteger_encode_der(const asn_TYPE_descriptor_t *sd, const void *ptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + unsigned long native = *(const unsigned long *)ptr; /* Disable sign ext. */ + asn_enc_rval_t erval = {0,0,0}; + INTEGER_t tmp; + +#ifdef WORDS_BIGENDIAN /* Opportunistic optimization */ + + tmp.buf = (uint8_t *)&native; + tmp.size = sizeof(native); + +#else /* Works even if WORDS_BIGENDIAN is not set where should've been */ + uint8_t buf[sizeof(native)]; + uint8_t *p; + + /* Prepare a fake INTEGER */ + for(p = buf + sizeof(buf) - 1; p >= buf; p--, native >>= 8) + *p = (uint8_t)native; + + tmp.buf = buf; + tmp.size = sizeof(buf); +#endif /* WORDS_BIGENDIAN */ + + /* Encode fake INTEGER */ + erval = INTEGER_encode_der(sd, &tmp, tag_mode, tag, cb, app_key); + if(erval.structure_ptr == &tmp) { + erval.structure_ptr = ptr; + } + return erval; +} + +/* + * Decode the chunk of XML text encoding INTEGER. + */ +asn_dec_rval_t +NativeInteger_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval; + INTEGER_t st; + void *st_ptr = (void *)&st; + long *native = (long *)*sptr; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + memset(&st, 0, sizeof(st)); + rval = INTEGER_decode_xer(opt_codec_ctx, td, &st_ptr, + opt_mname, buf_ptr, size); + if(rval.code == RC_OK) { + long l; + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&st, (unsigned long *)&l) /* sic */ + : asn_INTEGER2long(&st, &l)) { + rval.code = RC_FAIL; + rval.consumed = 0; + } else { + *native = l; + } + } else { + /* + * Cannot restart from the middle; + * there is no place to save state in the native type. + * Request a continuation from the very beginning. + */ + rval.consumed = 0; + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &st); + return rval; +} + + +asn_enc_rval_t +NativeInteger_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + char scratch[32]; /* Enough for 64-bit int */ + asn_enc_rval_t er = {0,0,0}; + const long *native = (const long *)sptr; + + (void)ilevel; + (void)flags; + + if(!native) ASN__ENCODE_FAILED; + + er.encoded = snprintf(scratch, sizeof(scratch), + (specs && specs->field_unsigned) + ? "%lu" : "%ld", *native); + if(er.encoded <= 0 || (size_t)er.encoded >= sizeof(scratch) + || cb(scratch, er.encoded, app_key) < 0) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +NativeInteger_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval; + long *native = (long *)*sptr; + INTEGER_t tmpint; + void *tmpintptr = &tmpint; + + (void)opt_codec_ctx; + ASN_DEBUG("Decoding NativeInteger %s (UPER)", td->name); + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + memset(&tmpint, 0, sizeof tmpint); + rval = INTEGER_decode_uper(opt_codec_ctx, td, constraints, + &tmpintptr, pd); + if(rval.code == RC_OK) { + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&tmpint, (unsigned long *)native) + : asn_INTEGER2long(&tmpint, native)) + rval.code = RC_FAIL; + else + ASN_DEBUG("NativeInteger %s got value %ld", + td->name, *native); + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + + return rval; +} + +asn_enc_rval_t +NativeInteger_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native; + INTEGER_t tmpint; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + + ASN_DEBUG("Encoding NativeInteger %s %ld (UPER)", td->name, native); + + memset(&tmpint, 0, sizeof(tmpint)); + if((specs&&specs->field_unsigned) + ? asn_ulong2INTEGER(&tmpint, native) + : asn_long2INTEGER(&tmpint, native)) + ASN__ENCODE_FAILED; + er = INTEGER_encode_uper(td, constraints, &tmpint, po); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return er; +} + +asn_dec_rval_t +NativeInteger_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval; + long *native = (long *)*sptr; + INTEGER_t tmpint; + void *tmpintptr = &tmpint; + + (void)opt_codec_ctx; + ASN_DEBUG("Decoding NativeInteger %s (APER)", td->name); + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + memset(&tmpint, 0, sizeof tmpint); + rval = INTEGER_decode_aper(opt_codec_ctx, td, constraints, + &tmpintptr, pd); + if(rval.code == RC_OK) { + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&tmpint, (unsigned long *)native) + : asn_INTEGER2long(&tmpint, native)) + rval.code = RC_FAIL; + else + ASN_DEBUG("NativeInteger %s got value %ld", + td->name, *native); + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + + return rval; +} + +asn_enc_rval_t +NativeInteger_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native; + INTEGER_t tmpint; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + + ASN_DEBUG("Encoding NativeInteger %s %ld (APER)", td->name, native); + + memset(&tmpint, 0, sizeof(tmpint)); + if((specs&&specs->field_unsigned) + ? asn_ulong2INTEGER(&tmpint, (unsigned long)native) + : asn_long2INTEGER(&tmpint, native)) + ASN__ENCODE_FAILED; + er = INTEGER_encode_aper(td, constraints, &tmpint, po); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return er; +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +/* + * INTEGER specific human-readable output. + */ +int +NativeInteger_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + const long *native = (const long *)sptr; + char scratch[32]; /* Enough for 64-bit int */ + int ret; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(native) { + long value = *native; + ret = snprintf(scratch, sizeof(scratch), + (specs && specs->field_unsigned) ? "%lu" : "%ld", value); + assert(ret > 0 && (size_t)ret < sizeof(scratch)); + if(cb(scratch, ret, app_key) < 0) return -1; + if(specs && (value >= 0 || !specs->field_unsigned)) { + const asn_INTEGER_enum_map_t *el = + INTEGER_map_value2enum(specs, value); + if(el) { + if(cb(" (", 2, app_key) < 0) return -1; + if(cb(el->enum_name, el->enum_len, app_key) < 0) return -1; + if(cb(")", 1, app_key) < 0) return -1; + } + } + return 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +NativeInteger_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as INTEGER (%d, %p, Native)", + td->name, method, ptr); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, sizeof(long)); + break; + } +} + +int +NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { + (void)td; + + if(aptr && bptr) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + if(specs && specs->field_unsigned) { + const unsigned long *a = aptr; + const unsigned long *b = bptr; + if(*a < *b) { + return -1; + } else if(*a > *b) { + return 1; + } else { + return 0; + } + } else { + const long *a = aptr; + const long *b = bptr; + if(*a < *b) { + return -1; + } else if(*a > *b) { + return 1; + } else { + return 0; + } + } + } else if(!aptr) { + return -1; + } else { + return 1; + } +} + +asn_random_fill_result_t +NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + long *st = *sptr; + const asn_INTEGER_enum_map_t *emap; + size_t emap_len; + intmax_t value; + int find_inside_map; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (long *)CALLOC(1, sizeof(*st)); + if(st == NULL) { + return result_failed; + } + } + + if(specs) { + emap = specs->value2enum; + emap_len = specs->map_count; + if(specs->strict_enumeration) { + find_inside_map = emap_len > 0; + } else { + find_inside_map = emap_len ? asn_random_between(0, 1) : 0; + } + } else { + emap = 0; + emap_len = 0; + find_inside_map = 0; + } + + if(find_inside_map) { + assert(emap_len > 0); + value = emap[asn_random_between(0, emap_len - 1)].nat_value; + } else { + const asn_per_constraints_t *ct; + + static const long variants[] = { + -65536, -65535, -65534, -32769, -32768, -32767, -16385, -16384, + -16383, -257, -256, -255, -254, -129, -128, -127, + -126, -1, 0, 1, 126, 127, 128, 129, + 254, 255, 256, 257, 16383, 16384, 16385, 32767, + 32768, 32769, 65534, 65535, 65536, 65537}; + if(specs && specs->field_unsigned) { + assert(variants[18] == 0); + value = variants[asn_random_between( + 18, sizeof(variants) / sizeof(variants[0]) - 1)]; + } else { + value = variants[asn_random_between( + 0, sizeof(variants) / sizeof(variants[0]) - 1)]; + } + + if(!constraints) constraints = &td->encoding_constraints; + ct = constraints ? constraints->per_constraints : 0; + if(ct && (ct->value.flags & APC_CONSTRAINED)) { + if(value < ct->value.lower_bound || value > ct->value.upper_bound) { + value = asn_random_between(ct->value.lower_bound, + ct->value.upper_bound); + } + } + } + + *sptr = st; + *st = value; + return result_ok; +} diff --git a/Bouncer/e2sm_kpm/lib/NativeInteger_oer.c b/Bouncer/e2sm_kpm/lib/NativeInteger_oer.c new file mode 100644 index 0000000..411413a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NativeInteger_oer.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +NativeInteger_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + void **nint_ptr, const void *ptr, size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + long *native = (long *)*nint_ptr; + INTEGER_t tmpint; + INTEGER_t *tmpintptr = &tmpint; + + memset(&tmpint, 0, sizeof(tmpint)); + + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + /* + * OPTIMIZATION: Encode directly rather than passing through INTEGER. + * Saves a memory allocation. + */ + rval = INTEGER_decode_oer(opt_codec_ctx, td, constraints, + (void **)&tmpintptr, ptr, size); + if(rval.code != RC_OK) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return rval; + } + + if(specs && specs->field_unsigned) { + unsigned long ul; + int ok = asn_INTEGER2ulong(&tmpint, &ul) == 0; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + if(ok) { + *native = ul; + } else { + rval.code = RC_FAIL; + return rval; + } + } else { + long l; + int ok = asn_INTEGER2long(&tmpint, &l) == 0; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + if(ok) { + *native = l; + } else { + rval.code = RC_FAIL; + return rval; + } + } + + return rval; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeInteger_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + INTEGER_t tmpint; + long native; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + memset(&tmpint, 0, sizeof(tmpint)); + + ASN_DEBUG("Encoding %s %ld as NativeInteger", td ? td->name : "", native); + + if((specs && specs->field_unsigned) ? asn_ulong2INTEGER(&tmpint, native) + : asn_long2INTEGER(&tmpint, native)) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + ASN__ENCODE_FAILED; + } else { + asn_enc_rval_t er = + INTEGER_encode_oer(td, constraints, &tmpint, cb, app_key); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return er; + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/NativeReal.c b/Bouncer/e2sm_kpm/lib/NativeReal.c new file mode 100644 index 0000000..160a471 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NativeReal.c @@ -0,0 +1,781 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Read the NativeReal.h for the explanation wrt. differences between + * REAL and NativeReal. + * Basically, both are decoders and encoders of ASN.1 REAL type, but this + * implementation deals with the standard (machine-specific) representation + * of them instead of using the platform-independent buffer. + */ +#include +#include +#include +#include +#include +#include + +#if defined(__clang__) +/* + * isnan() is defined using generic selections and won't compile in + * strict C89 mode because of too fancy system's standard library. + * However, prior to C11 the math had a perfectly working isnan() + * in the math library. + * Disable generic selection warning so we can test C89 mode with newer libc. + */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc11-extensions" +static int asn_isnan(double d) { + return isnan(d); +} +#pragma clang diagnostic pop +#else +#define asn_isnan(v) isnan(v) +#endif /* generic selections */ + +/* + * NativeReal basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NativeReal_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) +}; +asn_TYPE_operation_t asn_OP_NativeReal = { + NativeReal_free, + NativeReal_print, + NativeReal_compare, + NativeReal_decode_ber, + NativeReal_encode_der, + NativeReal_decode_xer, + NativeReal_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + NativeReal_decode_oer, + NativeReal_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + NativeReal_decode_uper, + NativeReal_encode_uper, + NativeReal_decode_aper, + NativeReal_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + NativeReal_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NativeReal = { + "REAL", /* The ASN.1 type is still REAL */ + "REAL", + &asn_OP_NativeReal, + asn_DEF_NativeReal_tags, + sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]), + asn_DEF_NativeReal_tags, /* Same as above */ + sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +static size_t NativeReal__float_size(const asn_TYPE_descriptor_t *td); +static double NativeReal__get_double(const asn_TYPE_descriptor_t *td, + const void *ptr); +static ssize_t NativeReal__set(const asn_TYPE_descriptor_t *td, void **sptr, + double d); + +/* + * Decode REAL type. + */ +asn_dec_rval_t +NativeReal_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buf_ptr, size_t size, int tag_mode) { + asn_dec_rval_t rval; + ber_tlv_len_t length; + + ASN_DEBUG("Decoding %s as REAL (tm=%d)", td->name, tag_mode); + + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0, + &length, 0); + if(rval.code != RC_OK) return rval; + assert(length >= 0); /* Ensured by ber_check_tags */ + + ASN_DEBUG("%s length is %d bytes", td->name, (int)length); + + /* + * Make sure we have this length. + */ + buf_ptr = ((const char *)buf_ptr) + rval.consumed; + size -= rval.consumed; + if(length > (ber_tlv_len_t)size) { + rval.code = RC_WMORE; + rval.consumed = 0; + return rval; + } + + /* + * ASN.1 encoded REAL: buf_ptr, length + * Fill the Dbl, at the same time checking for overflow. + * If overflow occured, return with RC_FAIL. + */ + { + uint8_t scratch[24]; /* Longer than %.16f in decimal */ + REAL_t tmp; + double d; + int ret; + + if((size_t)length < sizeof(scratch)) { + tmp.buf = scratch; + tmp.size = length; + } else { + /* This rarely happens: impractically long value */ + tmp.buf = CALLOC(1, length + 1); + tmp.size = length; + if(!tmp.buf) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + } + + memcpy(tmp.buf, buf_ptr, length); + tmp.buf[length] = '\0'; + + ret = asn_REAL2double(&tmp, &d); + if(tmp.buf != scratch) FREEMEM(tmp.buf); + if(ret) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + + if(NativeReal__set(td, sptr, d) < 0) + ASN__DECODE_FAILED; + } + + rval.code = RC_OK; + rval.consumed += length; + + ASN_DEBUG("Took %ld/%ld bytes to encode %s", (long)rval.consumed, + (long)length, td->name); + + return rval; +} + +/* + * Encode the NativeReal using the standard REAL type DER encoder. + */ +asn_enc_rval_t +NativeReal_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + double d = NativeReal__get_double(td, sptr); + asn_enc_rval_t erval = {0,0,0}; + REAL_t tmp; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, d)) + ASN__ENCODE_FAILED; + + /* Encode a fake REAL */ + erval = der_encode_primitive(td, &tmp, tag_mode, tag, cb, app_key); + if(erval.encoded == -1) { + assert(erval.structure_ptr == &tmp); + erval.structure_ptr = sptr; + } + + /* Free possibly allocated members of the temporary structure */ + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + + return erval; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +/* + * Decode REAL type using PER. + */ +asn_dec_rval_t +NativeReal_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rval; + double d; + REAL_t tmp; + void *ptmp = &tmp; + int ret; + + (void)constraints; + + memset(&tmp, 0, sizeof(tmp)); + rval = OCTET_STRING_decode_uper(opt_codec_ctx, &asn_DEF_REAL, + NULL, &ptmp, pd); + if(rval.code != RC_OK) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + return rval; + } + + ret = asn_REAL2double(&tmp, &d); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + if(ret) ASN__DECODE_FAILED; + + if(NativeReal__set(td, sptr, d) < 0 ) + ASN__DECODE_FAILED; + + return rval; +} + +/* + * Encode the NativeReal using the OCTET STRING PER encoder. + */ +asn_enc_rval_t +NativeReal_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + double d = NativeReal__get_double(td, sptr); + asn_enc_rval_t erval = {0,0,0}; + REAL_t tmp; + + (void)constraints; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, d)) + ASN__ENCODE_FAILED; + + /* Encode a DER REAL */ + erval = OCTET_STRING_encode_uper(&asn_DEF_REAL, NULL, &tmp, po); + if(erval.encoded == -1) + erval.structure_ptr = sptr; + + /* Free possibly allocated members of the temporary structure */ + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + + return erval; +} + + +asn_dec_rval_t +NativeReal_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **dbl_ptr, asn_per_data_t *pd) { + double *Dbl = (double *)*dbl_ptr; + asn_dec_rval_t rval; + REAL_t tmp; + void *ptmp = &tmp; + int ret; + + (void)constraints; + + /* + * If the structure is not there, allocate it. + */ + if(Dbl == NULL) { + *dbl_ptr = CALLOC(1, sizeof(*Dbl)); + Dbl = (double *)*dbl_ptr; + if(Dbl == NULL) + ASN__DECODE_FAILED; + } + + memset(&tmp, 0, sizeof(tmp)); + rval = OCTET_STRING_decode_aper(opt_codec_ctx, td, NULL, + &ptmp, pd); + if(rval.code != RC_OK) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + return rval; + } + + ret = asn_REAL2double(&tmp, Dbl); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + if(ret) ASN__DECODE_FAILED; + + return rval; +} + +asn_enc_rval_t +NativeReal_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + double Dbl = *(const double *)sptr; + asn_enc_rval_t erval = {0,0,0}; + REAL_t tmp; + + (void)constraints; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, Dbl)) + ASN__ENCODE_FAILED; + + /* Encode a DER REAL */ + erval = OCTET_STRING_encode_aper(td, NULL, &tmp, po); + if(erval.encoded == -1) + erval.structure_ptr = sptr; + + /* Free possibly allocated members of the temporary structure */ + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + + return erval; +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +#ifndef ASN_DISABLE_OER_SUPPORT + +/* + * Swap bytes from/to network, if local is little-endian. + * Unused endianness sections are likely removed at compile phase. + */ +static void +NativeReal__network_swap(size_t float_size, const void *srcp, uint8_t *dst) { + const uint8_t *src = srcp; + double test = -0.0; + int float_big_endian = *(const char *)&test != 0; + /* In lieu of static_assert(sizeof(double) == 8) */ + static const char sizeof_double_is_8_a[sizeof(double)-7] CC_NOTUSED; + static const char sizeof_double_is_8_b[9-sizeof(double)] CC_NOTUSED; + /* In lieu of static_assert(sizeof(sizeof) == 4) */ + static const char sizeof_float_is_4_a[sizeof(float)-3] CC_NOTUSED; + static const char sizeof_float_is_4_b[5-sizeof(float)] CC_NOTUSED; + + switch(float_size) { + case sizeof(double): + assert(sizeof(double) == 8); + if(float_big_endian) { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = src[3]; + dst[4] = src[4]; + dst[5] = src[5]; + dst[6] = src[6]; + dst[7] = src[7]; + } else { + dst[0] = src[7]; + dst[1] = src[6]; + dst[2] = src[5]; + dst[3] = src[4]; + dst[4] = src[3]; + dst[5] = src[2]; + dst[6] = src[1]; + dst[7] = src[0]; + } + return; + case sizeof(float): + assert(sizeof(float) == 4); + if(float_big_endian) { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = src[3]; + } else { + dst[0] = src[3]; + dst[1] = src[2]; + dst[2] = src[1]; + dst[3] = src[0]; + } + return; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeReal_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* X.696 IEEE 754 binary32 and binary64 encoding */ + uint8_t scratch[sizeof(double)]; + const asn_NativeReal_specifics_t *specs = + (const asn_NativeReal_specifics_t *)td->specifics; + size_t wire_size = constraints->value.width; + + if(specs ? (wire_size == specs->float_size) + : (wire_size == sizeof(double))) { + /* + * Our representation matches the wire, modulo endianness. + * That was the whole point of compact encoding! + */ + } else { + assert((wire_size == sizeof(double)) + || (specs && specs->float_size == wire_size)); + ASN__ENCODE_FAILED; + } + + /* + * The X.696 standard doesn't specify endianness, neither is IEEE 754. + * So we assume the network format is big endian. + */ + NativeReal__network_swap(wire_size, sptr, scratch); + if(cb(scratch, wire_size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + er.encoded = wire_size; + ASN__ENCODED_OK(er); + } + } else { + double d = NativeReal__get_double(td, sptr); + ssize_t len_len; + REAL_t tmp; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, d)) { + ASN__ENCODE_FAILED; + } + + /* Encode a fake REAL */ + len_len = oer_serialize_length(tmp.size, cb, app_key); + if(len_len < 0 || cb(tmp.buf, tmp.size, app_key) < 0) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + ASN__ENCODE_FAILED; + } else { + er.encoded = len_len + tmp.size; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + ASN__ENCODED_OK(er); + } + } +} + +asn_dec_rval_t +NativeReal_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + asn_dec_rval_t ok = {RC_OK, 0}; + double d; + ssize_t len_len; + size_t real_body_len; + + (void)opt_codec_ctx; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* X.696 IEEE 754 binary32 and binary64 encoding */ + uint8_t scratch[sizeof(double)]; + size_t wire_size = constraints->value.width; + + if(size < wire_size) + ASN__DECODE_STARVED; + + /* + * The X.696 standard doesn't specify endianness, neither is IEEE 754. + * So we assume the network format is big endian. + */ + NativeReal__network_swap(wire_size, ptr, scratch); + + + switch(wire_size) { + case sizeof(double): + { + double tmp; + memcpy(&tmp, scratch, sizeof(double)); + if(NativeReal__set(td, sptr, tmp) < 0) + ASN__DECODE_FAILED; + } + break; + case sizeof(float): + { + float tmp; + memcpy(&tmp, scratch, sizeof(float)); + if(NativeReal__set(td, sptr, tmp) < 0) + ASN__DECODE_FAILED; + } + break; + default: + ASN__DECODE_FAILED; + } + + ok.consumed = wire_size; + return ok; + } + + len_len = oer_fetch_length(ptr, size, &real_body_len); + if(len_len < 0) ASN__DECODE_FAILED; + if(len_len == 0) ASN__DECODE_STARVED; + + ptr = (const char *)ptr + len_len; + size -= len_len; + + if(real_body_len > size) ASN__DECODE_STARVED; + + { + uint8_t scratch[24]; /* Longer than %.16f in decimal */ + REAL_t tmp; + int ret; + + if(real_body_len < sizeof(scratch)) { + tmp.buf = scratch; + tmp.size = real_body_len; + } else { + /* This rarely happens: impractically long value */ + tmp.buf = CALLOC(1, real_body_len + 1); + tmp.size = real_body_len; + if(!tmp.buf) { + ASN__DECODE_FAILED; + } + } + + memcpy(tmp.buf, ptr, real_body_len); + tmp.buf[real_body_len] = '\0'; + + ret = asn_REAL2double(&tmp, &d); + if(tmp.buf != scratch) FREEMEM(tmp.buf); + if(ret) { + ASN_DEBUG("REAL decoded in %" ASN_PRI_SIZE " bytes, but can't convert t double", + real_body_len); + ASN__DECODE_FAILED; + } + } + + if(NativeReal__set(td, sptr, d) < 0) + ASN__DECODE_FAILED; + + ok.consumed = len_len + real_body_len; + return ok; +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ + +/* + * Decode the chunk of XML text encoding REAL. + */ +asn_dec_rval_t +NativeReal_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + asn_dec_rval_t rval; + REAL_t st = { 0, 0 }; + REAL_t *stp = &st; + + rval = REAL_decode_xer(opt_codec_ctx, td, (void **)&stp, opt_mname, + buf_ptr, size); + if(rval.code == RC_OK) { + double d; + if(asn_REAL2double(&st, &d) || NativeReal__set(td, sptr, d) < 0) { + rval.code = RC_FAIL; + rval.consumed = 0; + } + } else { + /* Convert all errors into RC_FAIL */ + rval.consumed = 0; + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &st); + return rval; +} + +asn_enc_rval_t +NativeReal_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + double d = NativeReal__get_double(td, sptr); + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + + er.encoded = REAL__dump(d, flags & XER_F_CANONICAL, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +/* + * REAL specific human-readable output. + */ +int +NativeReal_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + (void)ilevel; /* Unused argument */ + + if(sptr) { + double d = NativeReal__get_double(td, sptr); + return (REAL__dump(d, 0, cb, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +int +NativeReal_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + + if(aptr && bptr) { + double a = NativeReal__get_double(td, aptr); + double b = NativeReal__get_double(td, bptr); + + /* NaN sorted above everything else */ + if(asn_isnan(a)) { + if(asn_isnan(b)) { + return 0; + } else { + return -1; + } + } else if(asn_isnan(b)) { + return 1; + } + /* Value comparison. */ + if(a < b) { + return -1; + } else if(a > b) { + return 1; + } else { + return 0; + } + } else if(!aptr) { + return -1; + } else { + return 1; + } +} + +void +NativeReal_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as REAL (%d, %p, Native)", + td->name, method, ptr); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: { + const asn_NativeReal_specifics_t *specs; + size_t float_size; + specs = (const asn_NativeReal_specifics_t *)td->specifics; + float_size = specs ? specs->float_size : sizeof(double); + memset(ptr, 0, float_size); + } break; + } +} + +asn_random_fill_result_t +NativeReal_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 0}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; +#ifndef INFINITY +#define INFINITY (1.0/0.0) +#endif +#ifndef NAN +#define NAN (0.0/0.0) +#endif + static const double double_values[] = { + -M_E, M_E, -M_PI, M_PI, /* Better precision than with floats */ + -1E+308, 1E+308, + /* 2^51 */ + -2251799813685248.0, 2251799813685248.0, + /* 2^52 */ + -4503599627370496.0, 4503599627370496.0, + /* 2^100 */ + -1267650600228229401496703205376.0, 1267650600228229401496703205376.0, + -DBL_MIN, DBL_MIN, + -DBL_MAX, DBL_MAX, +#ifdef DBL_TRUE_MIN + -DBL_TRUE_MIN, DBL_TRUE_MIN +#endif + }; + static const float float_values[] = { + 0, -0.0, -1, 1, -M_E, M_E, -3.14, 3.14, -M_PI, M_PI, -255, 255, + -FLT_MIN, FLT_MIN, + -FLT_MAX, FLT_MAX, +#ifdef FLT_TRUE_MIN + -FLT_TRUE_MIN, FLT_TRUE_MIN, +#endif + INFINITY, -INFINITY, NAN + }; + ssize_t float_set_size = NativeReal__float_size(td); + const size_t n_doubles = sizeof(double_values) / sizeof(double_values[0]); + const size_t n_floats = sizeof(float_values) / sizeof(float_values[0]); + double d; + + (void)constraints; + + if(max_length == 0) return result_skipped; + + if(float_set_size == sizeof(double) && asn_random_between(0, 1) == 0) { + d = double_values[asn_random_between(0, n_doubles - 1)]; + } else { + d = float_values[asn_random_between(0, n_floats - 1)]; + } + + if(NativeReal__set(td, sptr, d) < 0) { + return result_failed; + } + + result_ok.length = float_set_size; + return result_ok; +} + + +/* + * Local helper functions. + */ + +static size_t +NativeReal__float_size(const asn_TYPE_descriptor_t *td) { + const asn_NativeReal_specifics_t *specs = + (const asn_NativeReal_specifics_t *)td->specifics; + return specs ? specs->float_size : sizeof(double); +} + +static double +NativeReal__get_double(const asn_TYPE_descriptor_t *td, const void *ptr) { + size_t float_size = NativeReal__float_size(td); + if(float_size == sizeof(float)) { + return *(const float *)ptr; + } else { + return *(const double *)ptr; + } +} + +static ssize_t /* Returns -1 or float size. */ +NativeReal__set(const asn_TYPE_descriptor_t *td, void **sptr, double d) { + size_t float_size = NativeReal__float_size(td); + void *native; + + if(!(native = *sptr)) { + native = (*sptr = CALLOC(1, float_size)); + if(!native) { + return -1; + } + } + + if(float_size == sizeof(float)) { + if(asn_double2float(d, (float *)native)) { + return -1; + } + } else { + *(double *)native = d; + } + + return float_size; +} + diff --git a/Bouncer/e2sm_kpm/lib/NgENB-ID.c b/Bouncer/e2sm_kpm/lib/NgENB-ID.c new file mode 100644 index 0000000..9c538bd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NgENB-ID.c @@ -0,0 +1,180 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "NgENB-ID.h" + +static int +memb_macroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_shortMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 18)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_longMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 21)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_macroNgENB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_shortMacroNgENB_ID_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_longMacroNgENB_ID_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, + 0, 0 /* No PER value map */ +}; +asn_per_constraints_t asn_PER_type_NgENB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NgENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NgENB_ID, choice.macroNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_macroNgENB_ID_constr_2, memb_macroNgENB_ID_constraint_1 }, + 0, 0, /* No default value */ + "macroNgENB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct NgENB_ID, choice.shortMacroNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_shortMacroNgENB_ID_constr_3, memb_shortMacroNgENB_ID_constraint_1 }, + 0, 0, /* No default value */ + "shortMacroNgENB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct NgENB_ID, choice.longMacroNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, &asn_PER_memb_longMacroNgENB_ID_constr_4, memb_longMacroNgENB_ID_constraint_1 }, + 0, 0, /* No default value */ + "longMacroNgENB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_NgENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macroNgENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* shortMacroNgENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* longMacroNgENB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_NgENB_ID_specs_1 = { + sizeof(struct NgENB_ID), + offsetof(struct NgENB_ID, _asn_ctx), + offsetof(struct NgENB_ID, present), + sizeof(((struct NgENB_ID *)0)->present), + asn_MAP_NgENB_ID_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_NgENB_ID = { + "NgENB-ID", + "NgENB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_NgENB_ID_constr_1, CHOICE_constraint }, + asn_MBR_NgENB_ID_1, + 3, /* Elements count */ + &asn_SPC_NgENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/NumericString.c b/Bouncer/e2sm_kpm/lib/NumericString.c new file mode 100644 index 0000000..ec98ba5 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/NumericString.c @@ -0,0 +1,121 @@ +/*- + * Copyright (c) 2003, 2006 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * NumericString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NumericString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (18 << 2)), /* [UNIVERSAL 18] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +static int asn_DEF_NumericString_v2c(unsigned int value) { + switch(value) { + case 0x20: return 0; + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + return value - (0x30 - 1); + } + return -1; +} +static int asn_DEF_NumericString_c2v(unsigned int code) { + if(code > 0) { + if(code <= 10) + return code + (0x30 - 1); + else + return -1; + } else { + return 0x20; + } +} +static asn_per_constraints_t asn_DEF_NumericString_per_constraints = { + { APC_CONSTRAINED, 4, 4, 0x20, 0x39 }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + asn_DEF_NumericString_v2c, + asn_DEF_NumericString_c2v +}; +asn_TYPE_operation_t asn_OP_NumericString = { + OCTET_STRING_free, + OCTET_STRING_print_utf8, /* ASCII subset */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NumericString = { + "NumericString", + "NumericString", + &asn_OP_NumericString, + asn_DEF_NumericString_tags, + sizeof(asn_DEF_NumericString_tags) + / sizeof(asn_DEF_NumericString_tags[0]) - 1, + asn_DEF_NumericString_tags, + sizeof(asn_DEF_NumericString_tags) + / sizeof(asn_DEF_NumericString_tags[0]), + { 0, &asn_DEF_NumericString_per_constraints, NumericString_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +int +NumericString_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const NumericString_t *st = (const NumericString_t *)sptr; + + if(st && st->buf) { + uint8_t *buf = st->buf; + uint8_t *end = buf + st->size; + + /* + * Check the alphabet of the NumericString. + * ASN.1:1984 (X.409) + */ + for(; buf < end; buf++) { + switch(*buf) { + case 0x20: + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + continue; + } + ASN__CTFAIL(app_key, td, sptr, + "%s: value byte %ld (%d) " + "not in NumericString alphabet (%s:%d)", + td->name, + (long)((buf - st->buf) + 1), + *buf, + __FILE__, __LINE__); + return -1; + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + return 0; +} diff --git a/Bouncer/asn1c_defs/OBJECT_IDENTIFIER.c b/Bouncer/e2sm_kpm/lib/OBJECT_IDENTIFIER.c similarity index 100% rename from Bouncer/asn1c_defs/OBJECT_IDENTIFIER.c rename to Bouncer/e2sm_kpm/lib/OBJECT_IDENTIFIER.c diff --git a/Bouncer/e2sm_kpm/lib/OCTET_STRING.c b/Bouncer/e2sm_kpm/lib/OCTET_STRING.c new file mode 100644 index 0000000..ae34c96 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/OCTET_STRING.c @@ -0,0 +1,2411 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ +#include + +/* + * OCTET STRING basic type description. + */ +static const ber_tlv_tag_t asn_DEF_OCTET_STRING_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs = { + sizeof(OCTET_STRING_t), + offsetof(OCTET_STRING_t, _asn_ctx), + ASN_OSUBV_STR +}; + +asn_TYPE_operation_t asn_OP_OCTET_STRING = { + OCTET_STRING_free, + OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, /* Unaligned PER decoder */ + OCTET_STRING_encode_uper, /* Unaligned PER encoder */ + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = { + "OCTET STRING", /* Canonical name */ + "OCTET_STRING", /* XML tag name */ + &asn_OP_OCTET_STRING, + asn_DEF_OCTET_STRING_tags, + sizeof(asn_DEF_OCTET_STRING_tags) + / sizeof(asn_DEF_OCTET_STRING_tags[0]), + asn_DEF_OCTET_STRING_tags, /* Same as above */ + sizeof(asn_DEF_OCTET_STRING_tags) + / sizeof(asn_DEF_OCTET_STRING_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs +}; + +#undef _CH_PHASE +#undef NEXT_PHASE +#undef PREV_PHASE +#define _CH_PHASE(ctx, inc) do { \ + if(ctx->phase == 0) \ + ctx->context = 0; \ + ctx->phase += inc; \ + } while(0) +#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1) +#define PREV_PHASE(ctx) _CH_PHASE(ctx, -1) + +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = (num_bytes); \ + buf_ptr = ((const char *)buf_ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +#undef RETURN +#define RETURN(_code) do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +#undef APPEND +#define APPEND(bufptr, bufsize) do { \ + size_t _bs = (bufsize); /* Append size */ \ + size_t _ns = ctx->context; /* Allocated now */ \ + size_t _es = st->size + _bs; /* Expected size */ \ + /* int is really a typeof(st->size): */ \ + if((int)_es < 0) RETURN(RC_FAIL); \ + if(_ns <= _es) { \ + void *ptr; \ + /* Be nice and round to the memory allocator */ \ + do { _ns = _ns ? _ns << 1 : 16; } \ + while(_ns <= _es); \ + /* int is really a typeof(st->size): */ \ + if((int)_ns < 0) RETURN(RC_FAIL); \ + ptr = REALLOC(st->buf, _ns); \ + if(ptr) { \ + st->buf = (uint8_t *)ptr; \ + ctx->context = _ns; \ + } else { \ + RETURN(RC_FAIL); \ + } \ + ASN_DEBUG("Reallocating into %ld", (long)_ns); \ + } \ + memcpy(st->buf + st->size, bufptr, _bs); \ + /* Convenient nul-termination */ \ + st->buf[_es] = '\0'; \ + st->size = _es; \ + } while(0) + +/* + * The main reason why ASN.1 is still alive is that too much time and effort + * is necessary for learning it more or less adequately, thus creating a gut + * necessity to demonstrate that aquired skill everywhere afterwards. + * No, I am not going to explain what the following stuff is. + */ +struct _stack_el { + ber_tlv_len_t left; /* What's left to read (or -1) */ + ber_tlv_len_t got; /* What was actually processed */ + unsigned cont_level; /* Depth of subcontainment */ + int want_nulls; /* Want null "end of content" octets? */ + int bits_chopped; /* Flag in BIT STRING mode */ + ber_tlv_tag_t tag; /* For debugging purposes */ + struct _stack_el *prev; + struct _stack_el *next; +}; +struct _stack { + struct _stack_el *tail; + struct _stack_el *cur_ptr; +}; + +static struct _stack_el * +OS__add_stack_el(struct _stack *st) { + struct _stack_el *nel; + + /* + * Reuse the old stack frame or allocate a new one. + */ + if(st->cur_ptr && st->cur_ptr->next) { + nel = st->cur_ptr->next; + nel->bits_chopped = 0; + nel->got = 0; + /* Retain the nel->cont_level, it's correct. */ + } else { + nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el)); + if(nel == NULL) + return NULL; + + if(st->tail) { + /* Increase a subcontainment depth */ + nel->cont_level = st->tail->cont_level + 1; + st->tail->next = nel; + } + nel->prev = st->tail; + st->tail = nel; + } + + st->cur_ptr = nel; + + return nel; +} + +static struct _stack * +_new_stack(void) { + return (struct _stack *)CALLOC(1, sizeof(struct _stack)); +} + +/* + * Decode OCTET STRING type. + */ +asn_dec_rval_t +OCTET_STRING_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buf_ptr, size_t size, int tag_mode) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + asn_dec_rval_t rval; + asn_struct_ctx_t *ctx; + ssize_t consumed_myself = 0; + struct _stack *stck; /* Expectations stack structure */ + struct _stack_el *sel = 0; /* Stack element */ + int tlv_constr; + enum asn_OS_Subvariant type_variant = specs->subvariant; + + ASN_DEBUG("Decoding %s as %s (frame %ld)", + td->name, + (type_variant == ASN_OSUBV_STR) ? + "OCTET STRING" : "OS-SpecialCase", + (long)size); + + /* + * Create the string if does not exist. + */ + if(st == NULL) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(st == NULL) RETURN(RC_FAIL); + } + + /* Restore parsing context */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + switch(ctx->phase) { + case 0: + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, ctx, + buf_ptr, size, tag_mode, -1, + &ctx->left, &tlv_constr); + if(rval.code != RC_OK) + return rval; + + if(tlv_constr) { + /* + * Complex operation, requires stack of expectations. + */ + ctx->ptr = _new_stack(); + if(!ctx->ptr) { + RETURN(RC_FAIL); + } + } else { + /* + * Jump into stackless primitive decoding. + */ + _CH_PHASE(ctx, 3); + if(type_variant == ASN_OSUBV_ANY && tag_mode != 1) + APPEND(buf_ptr, rval.consumed); + ADVANCE(rval.consumed); + goto phase3; + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 1: + phase1: + /* + * Fill the stack with expectations. + */ + stck = (struct _stack *)ctx->ptr; + sel = stck->cur_ptr; + do { + ber_tlv_tag_t tlv_tag; + ber_tlv_len_t tlv_len; + ber_tlv_tag_t expected_tag; + ssize_t tl, ll, tlvl; + /* This one works even if (sel->left == -1) */ + size_t Left = ((!sel||(size_t)sel->left >= size) + ?size:(size_t)sel->left); + + + ASN_DEBUG("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", (void *)sel, + (long)(sel?sel->left:0), + (long)(sel?sel->want_nulls:0), + (long)(sel?sel->got:0) + ); + if(sel && sel->left <= 0 && sel->want_nulls == 0) { + if(sel->prev) { + struct _stack_el *prev = sel->prev; + if(prev->left != -1) { + if(prev->left < sel->got) + RETURN(RC_FAIL); + prev->left -= sel->got; + } + prev->got += sel->got; + sel = stck->cur_ptr = prev; + if(!sel) break; + tlv_constr = 1; + continue; + } else { + sel = stck->cur_ptr = 0; + break; /* Nothing to wait */ + } + } + + tl = ber_fetch_tag(buf_ptr, Left, &tlv_tag); + ASN_DEBUG("fetch tag(size=%ld,L=%ld), %sstack, left=%ld, wn=%ld, tl=%ld", + (long)size, (long)Left, sel?"":"!", + (long)(sel?sel->left:0), + (long)(sel?sel->want_nulls:0), + (long)tl); + switch(tl) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + tlv_constr = BER_TLV_CONSTRUCTED(buf_ptr); + + ll = ber_fetch_length(tlv_constr, + (const char *)buf_ptr + tl,Left - tl,&tlv_len); + ASN_DEBUG("Got tag=%s, tc=%d, left=%ld, tl=%ld, len=%ld, ll=%ld", + ber_tlv_tag_string(tlv_tag), tlv_constr, + (long)Left, (long)tl, (long)tlv_len, (long)ll); + switch(ll) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + if(sel && sel->want_nulls + && ((const uint8_t *)buf_ptr)[0] == 0 + && ((const uint8_t *)buf_ptr)[1] == 0) + { + + ASN_DEBUG("Eat EOC; wn=%d--", sel->want_nulls); + + if(type_variant == ASN_OSUBV_ANY + && (tag_mode != 1 || sel->cont_level)) + APPEND("\0\0", 2); + + ADVANCE(2); + sel->got += 2; + if(sel->left != -1) { + sel->left -= 2; /* assert(sel->left >= 2) */ + } + + sel->want_nulls--; + if(sel->want_nulls == 0) { + /* Move to the next expectation */ + sel->left = 0; + tlv_constr = 1; + } + + continue; + } + + /* + * Set up expected tags, + * depending on ASN.1 type being decoded. + */ + switch(type_variant) { + case ASN_OSUBV_BIT: + /* X.690: 8.6.4.1, NOTE 2 */ + /* Fall through */ + case ASN_OSUBV_STR: + default: + if(sel) { + unsigned level = sel->cont_level; + if(level < td->all_tags_count) { + expected_tag = td->all_tags[level]; + break; + } else if(td->all_tags_count) { + expected_tag = td->all_tags + [td->all_tags_count - 1]; + break; + } + /* else, Fall through */ + } + /* Fall through */ + case ASN_OSUBV_ANY: + expected_tag = tlv_tag; + break; + } + + + if(tlv_tag != expected_tag) { + char buf[2][32]; + ber_tlv_tag_snprint(tlv_tag, + buf[0], sizeof(buf[0])); + ber_tlv_tag_snprint(td->tags[td->tags_count-1], + buf[1], sizeof(buf[1])); + ASN_DEBUG("Tag does not match expectation: %s != %s", + buf[0], buf[1]); + RETURN(RC_FAIL); + } + + tlvl = tl + ll; /* Combined length of T and L encoding */ + if((tlv_len + tlvl) < 0) { + /* tlv_len value is too big */ + ASN_DEBUG("TLV encoding + length (%ld) is too big", + (long)tlv_len); + RETURN(RC_FAIL); + } + + /* + * Append a new expectation. + */ + sel = OS__add_stack_el(stck); + if(!sel) RETURN(RC_FAIL); + + sel->tag = tlv_tag; + + sel->want_nulls = (tlv_len==-1); + if(sel->prev && sel->prev->left != -1) { + /* Check that the parent frame is big enough */ + if(sel->prev->left < tlvl + (tlv_len==-1?0:tlv_len)) + RETURN(RC_FAIL); + if(tlv_len == -1) + sel->left = sel->prev->left - tlvl; + else + sel->left = tlv_len; + } else { + sel->left = tlv_len; + } + if(type_variant == ASN_OSUBV_ANY + && (tag_mode != 1 || sel->cont_level)) + APPEND(buf_ptr, tlvl); + sel->got += tlvl; + ADVANCE(tlvl); + + ASN_DEBUG("+EXPECT2 got=%ld left=%ld, wn=%d, clvl=%u", + (long)sel->got, (long)sel->left, + sel->want_nulls, sel->cont_level); + + } while(tlv_constr); + if(sel == NULL) { + /* Finished operation, "phase out" */ + ASN_DEBUG("Phase out"); + _CH_PHASE(ctx, +3); + break; + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 2: + stck = (struct _stack *)ctx->ptr; + sel = stck->cur_ptr; + ASN_DEBUG("Phase 2: Need %ld bytes, size=%ld, alrg=%ld, wn=%d", + (long)sel->left, (long)size, (long)sel->got, + sel->want_nulls); + { + ber_tlv_len_t len; + + assert(sel->left >= 0); + + len = ((ber_tlv_len_t)size < sel->left) + ? (ber_tlv_len_t)size : sel->left; + if(len > 0) { + if(type_variant == ASN_OSUBV_BIT + && sel->bits_chopped == 0) { + /* Put the unused-bits-octet away */ + st->bits_unused = *(const uint8_t *)buf_ptr; + APPEND(((const char *)buf_ptr+1), (len - 1)); + sel->bits_chopped = 1; + } else { + APPEND(buf_ptr, len); + } + ADVANCE(len); + sel->left -= len; + sel->got += len; + } + + if(sel->left) { + ASN_DEBUG("OS left %ld, size = %ld, wn=%d\n", + (long)sel->left, (long)size, sel->want_nulls); + RETURN(RC_WMORE); + } + + PREV_PHASE(ctx); + goto phase1; + } + break; + case 3: + phase3: + /* + * Primitive form, no stack required. + */ + assert(ctx->left >= 0); + + if(size < (size_t)ctx->left) { + if(!size) RETURN(RC_WMORE); + if(type_variant == ASN_OSUBV_BIT && !ctx->context) { + st->bits_unused = *(const uint8_t *)buf_ptr; + ctx->left--; + ADVANCE(1); + } + APPEND(buf_ptr, size); + assert(ctx->context > 0); + ctx->left -= size; + ADVANCE(size); + RETURN(RC_WMORE); + } else { + if(type_variant == ASN_OSUBV_BIT + && !ctx->context && ctx->left) { + st->bits_unused = *(const uint8_t *)buf_ptr; + ctx->left--; + ADVANCE(1); + } + APPEND(buf_ptr, ctx->left); + ADVANCE(ctx->left); + ctx->left = 0; + + NEXT_PHASE(ctx); + } + break; + } + + if(sel) { + ASN_DEBUG("3sel p=%p, wn=%d, l=%ld, g=%ld, size=%ld", + (void *)sel->prev, sel->want_nulls, + (long)sel->left, (long)sel->got, (long)size); + if(sel->prev || sel->want_nulls > 1 || sel->left > 0) { + RETURN(RC_WMORE); + } + } + + /* + * BIT STRING-specific processing. + */ + if(type_variant == ASN_OSUBV_BIT) { + if(st->size) { + if(st->bits_unused < 0 || st->bits_unused > 7) { + RETURN(RC_FAIL); + } + /* Finalize BIT STRING: zero out unused bits. */ + st->buf[st->size-1] &= 0xff << st->bits_unused; + } else { + if(st->bits_unused) { + RETURN(RC_FAIL); + } + } + } + + ASN_DEBUG("Took %ld bytes to encode %s: [%s]:%ld", + (long)consumed_myself, td->name, + (type_variant == ASN_OSUBV_STR) ? (char *)st->buf : "", + (long)st->size); + + + RETURN(RC_OK); +} + +/* + * Encode OCTET STRING type using DER. + */ +asn_enc_rval_t +OCTET_STRING_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = { 0, 0, 0 }; + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + enum asn_OS_Subvariant type_variant = specs->subvariant; + int fix_last_byte = 0; + + ASN_DEBUG("%s %s as OCTET STRING", + cb?"Estimating":"Encoding", td->name); + + /* + * Write tags. + */ + if(type_variant != ASN_OSUBV_ANY || tag_mode == 1) { + er.encoded = der_write_tags(td, + (type_variant == ASN_OSUBV_BIT) + st->size, + tag_mode, type_variant == ASN_OSUBV_ANY, tag, + cb, app_key); + if(er.encoded == -1) { + er.failed_type = td; + er.structure_ptr = sptr; + return er; + } + } else { + /* Disallow: [] IMPLICIT ANY */ + assert(type_variant != ASN_OSUBV_ANY || tag_mode != -1); + er.encoded = 0; + } + + if(!cb) { + er.encoded += (type_variant == ASN_OSUBV_BIT) + st->size; + ASN__ENCODED_OK(er); + } + + /* + * Prepare to deal with the last octet of BIT STRING. + */ + if(type_variant == ASN_OSUBV_BIT) { + uint8_t b = st->bits_unused & 0x07; + if(b && st->size) fix_last_byte = 1; + ASN__CALLBACK(&b, 1); + } + + /* Invoke callback for the main part of the buffer */ + ASN__CALLBACK(st->buf, st->size - fix_last_byte); + + /* The last octet should be stripped off the unused bits */ + if(fix_last_byte) { + uint8_t b = st->buf[st->size-1] & (0xff << st->bits_unused); + ASN__CALLBACK(&b, 1); + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +asn_enc_rval_t +OCTET_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + char scratch[16 * 3 + 4]; + char *p = scratch; + uint8_t *buf; + uint8_t *end; + size_t i; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + /* + * Dump the contents of the buffer in hexadecimal. + */ + buf = st->buf; + end = buf + st->size; + if(flags & XER_F_CANONICAL) { + char *scend = scratch + (sizeof(scratch) - 2); + for(; buf < end; buf++) { + if(p >= scend) { + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + } + + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + } else { + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + ASN__CALLBACK(scratch, p-scratch); + p = scratch; + ASN__TEXT_INDENT(1, ilevel); + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + if(p - scratch) { + p--; /* Remove the tail space */ + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + if(st->size > 16) + ASN__TEXT_INDENT(1, ilevel-1); + } + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +static const struct OCTET_STRING__xer_escape_table_s { + const char *string; + int size; +} OCTET_STRING__xer_escape_table[] = { +#define OSXET(s) { s, sizeof(s) - 1 } + OSXET("\074\156\165\154\057\076"), /* */ + OSXET("\074\163\157\150\057\076"), /* */ + OSXET("\074\163\164\170\057\076"), /* */ + OSXET("\074\145\164\170\057\076"), /* */ + OSXET("\074\145\157\164\057\076"), /* */ + OSXET("\074\145\156\161\057\076"), /* */ + OSXET("\074\141\143\153\057\076"), /* */ + OSXET("\074\142\145\154\057\076"), /* */ + OSXET("\074\142\163\057\076"), /* */ + OSXET("\011"), /* \t */ + OSXET("\012"), /* \n */ + OSXET("\074\166\164\057\076"), /* */ + OSXET("\074\146\146\057\076"), /* */ + OSXET("\015"), /* \r */ + OSXET("\074\163\157\057\076"), /* */ + OSXET("\074\163\151\057\076"), /* */ + OSXET("\074\144\154\145\057\076"), /* */ + OSXET("\074\144\143\061\057\076"), /* */ + OSXET("\074\144\143\062\057\076"), /* */ + OSXET("\074\144\143\063\057\076"), /* */ + OSXET("\074\144\143\064\057\076"), /* */ + OSXET("\074\156\141\153\057\076"), /* */ + OSXET("\074\163\171\156\057\076"), /* */ + OSXET("\074\145\164\142\057\076"), /* */ + OSXET("\074\143\141\156\057\076"), /* */ + OSXET("\074\145\155\057\076"), /* */ + OSXET("\074\163\165\142\057\076"), /* */ + OSXET("\074\145\163\143\057\076"), /* */ + OSXET("\074\151\163\064\057\076"), /* */ + OSXET("\074\151\163\063\057\076"), /* */ + OSXET("\074\151\163\062\057\076"), /* */ + OSXET("\074\151\163\061\057\076"), /* */ + { 0, 0 }, /* " " */ + { 0, 0 }, /* ! */ + { 0, 0 }, /* \" */ + { 0, 0 }, /* # */ + { 0, 0 }, /* $ */ + { 0, 0 }, /* % */ + OSXET("\046\141\155\160\073"), /* & */ + { 0, 0 }, /* ' */ + {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* ()*+,-./ */ + {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* 01234567 */ + {0,0},{0,0},{0,0},{0,0}, /* 89:; */ + OSXET("\046\154\164\073"), /* < */ + { 0, 0 }, /* = */ + OSXET("\046\147\164\073"), /* > */ +}; + +static int +OS__check_escaped_control_char(const void *buf, int size) { + size_t i; + /* + * Inefficient algorithm which translates the escape sequences + * defined above into characters. Returns -1 if not found. + * TODO: replace by a faster algorithm (bsearch(), hash or + * nested table lookups). + */ + for(i = 0; i < 32 /* Don't spend time on the bottom half */; i++) { + const struct OCTET_STRING__xer_escape_table_s *el; + el = &OCTET_STRING__xer_escape_table[i]; + if(el->size == size && memcmp(buf, el->string, size) == 0) + return i; + } + return -1; +} + +static int +OCTET_STRING__handle_control_chars(void *struct_ptr, const void *chunk_buf, size_t chunk_size) { + /* + * This might be one of the escape sequences + * for control characters. Check it out. + * #11.15.5 + */ + int control_char = OS__check_escaped_control_char(chunk_buf,chunk_size); + if(control_char >= 0) { + OCTET_STRING_t *st = (OCTET_STRING_t *)struct_ptr; + void *p = REALLOC(st->buf, st->size + 2); + if(p) { + st->buf = (uint8_t *)p; + st->buf[st->size++] = control_char; + st->buf[st->size] = '\0'; /* nul-termination */ + return 0; + } + } + + return -1; /* No, it's not */ +} + +asn_enc_rval_t +OCTET_STRING_encode_xer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + uint8_t *buf, *end; + uint8_t *ss; /* Sequence start */ + ssize_t encoded_len = 0; + + (void)ilevel; /* Unused argument */ + (void)flags; /* Unused argument */ + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + buf = st->buf; + end = buf + st->size; + for(ss = buf; buf < end; buf++) { + unsigned int ch = *buf; + int s_len; /* Special encoding sequence length */ + + /* + * Escape certain characters: X.680/11.15 + */ + if(ch < sizeof(OCTET_STRING__xer_escape_table) + /sizeof(OCTET_STRING__xer_escape_table[0]) + && (s_len = OCTET_STRING__xer_escape_table[ch].size)) { + if(((buf - ss) && cb(ss, buf - ss, app_key) < 0) + || cb(OCTET_STRING__xer_escape_table[ch].string, s_len, + app_key) < 0) + ASN__ENCODE_FAILED; + encoded_len += (buf - ss) + s_len; + ss = buf + 1; + } + } + + encoded_len += (buf - ss); + if((buf - ss) && cb(ss, buf - ss, app_key) < 0) + ASN__ENCODE_FAILED; + + er.encoded = encoded_len; + ASN__ENCODED_OK(er); +} + +/* + * Convert from hexadecimal format (cstring): "AB CD EF" + */ +static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const char *chunk_stop = (const char *)chunk_buf; + const char *p = chunk_stop; + const char *pend = p + chunk_size; + unsigned int clv = 0; + int half = 0; /* Half bit */ + uint8_t *buf; + + /* Reallocate buffer according to high cap estimation */ + size_t new_size = st->size + (chunk_size + 1) / 2; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + /* + * If something like " a b c " appears here, the " a b":3 will be + * converted, and the rest skipped. That is, unless buf_size is greater + * than chunk_size, then it'll be equivalent to "ABC0". + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + switch(ch) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* Ignore whitespace */ + continue; + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ + clv = (clv << 4) + (ch - 0x30); + break; + case 0x41: case 0x42: case 0x43: /* ABC */ + case 0x44: case 0x45: case 0x46: /* DEF */ + clv = (clv << 4) + (ch - 0x41 + 10); + break; + case 0x61: case 0x62: case 0x63: /* abc */ + case 0x64: case 0x65: case 0x66: /* def */ + clv = (clv << 4) + (ch - 0x61 + 10); + break; + default: + *buf = 0; /* JIC */ + return -1; + } + if(half++) { + half = 0; + *buf++ = clv; + chunk_stop = p + 1; + } + } + + /* + * Check partial decoding. + */ + if(half) { + if(have_more) { + /* + * Partial specification is fine, + * because no more more PXER_TEXT data is available. + */ + *buf++ = clv << 4; + chunk_stop = p; + } + } else { + chunk_stop = p; + } + + st->size = buf - st->buf; /* Adjust the buffer size */ + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return (chunk_stop - (const char *)chunk_buf); /* Converted size */ +} + +/* + * Convert from binary format: "00101011101" + */ +static ssize_t OCTET_STRING__convert_binary(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { + BIT_STRING_t *st = (BIT_STRING_t *)sptr; + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + int bits_unused = st->bits_unused & 0x7; + uint8_t *buf; + + /* Reallocate buffer according to high cap estimation */ + size_t new_size = st->size + (chunk_size + 7) / 8; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + (void)have_more; + + if(bits_unused == 0) + bits_unused = 8; + else if(st->size) + buf--; + + /* + * Convert series of 0 and 1 into the octet string. + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + switch(ch) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* Ignore whitespace */ + break; + case 0x30: + case 0x31: + if(bits_unused-- <= 0) { + *++buf = 0; /* Clean the cell */ + bits_unused = 7; + } + *buf |= (ch&1) << bits_unused; + break; + default: + st->bits_unused = bits_unused; + return -1; + } + } + + if(bits_unused == 8) { + st->size = buf - st->buf; + st->bits_unused = 0; + } else { + st->size = buf - st->buf + 1; + st->bits_unused = bits_unused; + } + + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return chunk_size; /* Converted in full */ +} + +/* + * Something like strtod(), but with stricter rules. + */ +static int +OS__strtoent(int base, const char *buf, const char *end, int32_t *ret_value) { + const int32_t last_unicode_codepoint = 0x10ffff; + int32_t val = 0; + const char *p; + + for(p = buf; p < end; p++) { + int ch = *p; + + switch(ch) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ + val = val * base + (ch - 0x30); + break; + case 0x41: case 0x42: case 0x43: /* ABC */ + case 0x44: case 0x45: case 0x46: /* DEF */ + val = val * base + (ch - 0x41 + 10); + break; + case 0x61: case 0x62: case 0x63: /* abc */ + case 0x64: case 0x65: case 0x66: /* def */ + val = val * base + (ch - 0x61 + 10); + break; + case 0x3b: /* ';' */ + *ret_value = val; + return (p - buf) + 1; + default: + return -1; /* Character set error */ + } + + /* Value exceeds the Unicode range. */ + if(val > last_unicode_codepoint) { + return -1; + } + } + + *ret_value = -1; + return (p - buf); +} + +/* + * Convert from the plain UTF-8 format, expanding entity references: "2 < 3" + */ +static ssize_t +OCTET_STRING__convert_entrefs(void *sptr, const void *chunk_buf, + size_t chunk_size, int have_more) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + uint8_t *buf; + + /* Reallocate buffer */ + size_t new_size = st->size + chunk_size; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + /* + * Convert series of 0 and 1 into the octet string. + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + int len; /* Length of the rest of the chunk */ + + if(ch != 0x26 /* '&' */) { + *buf++ = ch; + continue; /* That was easy... */ + } + + /* + * Process entity reference. + */ + len = chunk_size - (p - (const char *)chunk_buf); + if(len == 1 /* "&" */) goto want_more; + if(p[1] == 0x23 /* '#' */) { + const char *pval; /* Pointer to start of digits */ + int32_t val = 0; /* Entity reference value */ + int base; + + if(len == 2 /* "&#" */) goto want_more; + if(p[2] == 0x78 /* 'x' */) + pval = p + 3, base = 16; + else + pval = p + 2, base = 10; + len = OS__strtoent(base, pval, p + len, &val); + if(len == -1) { + /* Invalid charset. Just copy verbatim. */ + *buf++ = ch; + continue; + } + if(!len || pval[len-1] != 0x3b) goto want_more; + assert(val > 0); + p += (pval - p) + len - 1; /* Advance past entref */ + + if(val < 0x80) { + *buf++ = (char)val; + } else if(val < 0x800) { + *buf++ = 0xc0 | ((val >> 6)); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x10000) { + *buf++ = 0xe0 | ((val >> 12)); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x200000) { + *buf++ = 0xf0 | ((val >> 18)); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x4000000) { + *buf++ = 0xf8 | ((val >> 24)); + *buf++ = 0x80 | ((val >> 18) & 0x3f); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else { + *buf++ = 0xfc | ((val >> 30) & 0x1); + *buf++ = 0x80 | ((val >> 24) & 0x3f); + *buf++ = 0x80 | ((val >> 18) & 0x3f); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } + } else { + /* + * Ugly, limited parsing of & > < + */ + char *sc = (char *)memchr(p, 0x3b, len > 5 ? 5 : len); + if(!sc) goto want_more; + if((sc - p) == 4 + && p[1] == 0x61 /* 'a' */ + && p[2] == 0x6d /* 'm' */ + && p[3] == 0x70 /* 'p' */) { + *buf++ = 0x26; + p = sc; + continue; + } + if((sc - p) == 3) { + if(p[1] == 0x6c) { + *buf = 0x3c; /* '<' */ + } else if(p[1] == 0x67) { + *buf = 0x3e; /* '>' */ + } else { + /* Unsupported entity reference */ + *buf++ = ch; + continue; + } + if(p[2] != 0x74) { + /* Unsupported entity reference */ + *buf++ = ch; + continue; + } + buf++; + p = sc; + continue; + } + /* Unsupported entity reference */ + *buf++ = ch; + } + + continue; + want_more: + if(have_more) { + /* + * We know that no more data (of the same type) + * is coming. Copy the rest verbatim. + */ + *buf++ = ch; + continue; + } + chunk_size = (p - (const char *)chunk_buf); + /* Processing stalled: need more data */ + break; + } + + st->size = buf - st->buf; + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return chunk_size; /* Converted in full */ +} + +/* + * Decode OCTET STRING from the XML element's body. + */ +static asn_dec_rval_t +OCTET_STRING__decode_xer( + const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, + void **sptr, const char *opt_mname, const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder)(void *struct_ptr, const void *chunk_buf, + size_t chunk_size), + ssize_t (*body_receiver)(void *struct_ptr, const void *chunk_buf, + size_t chunk_size, int have_more)) { + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + asn_struct_ctx_t *ctx; /* Per-structure parser context */ + asn_dec_rval_t rval; /* Return value from the decoder */ + int st_allocated; + + /* + * Create the string if does not exist. + */ + if(!st) { + st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); + *sptr = (void *)st; + if(!st) goto sta_failed; + st_allocated = 1; + } else { + st_allocated = 0; + } + if(!st->buf) { + /* This is separate from above section */ + st->buf = (uint8_t *)CALLOC(1, 1); + if(!st->buf) { + if(st_allocated) { + *sptr = 0; + goto stb_failed; + } else { + goto sta_failed; + } + } + } + + /* Restore parsing context */ + ctx = (asn_struct_ctx_t *)(((char *)*sptr) + specs->ctx_offset); + + return xer_decode_general(opt_codec_ctx, ctx, *sptr, xml_tag, + buf_ptr, size, opt_unexpected_tag_decoder, body_receiver); + +stb_failed: + FREEMEM(st); +sta_failed: + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; +} + +/* + * Decode OCTET STRING from the hexadecimal data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_hex(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, 0, OCTET_STRING__convert_hexadecimal); +} + +/* + * Decode OCTET STRING from the binary (0/1) data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_binary(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, 0, OCTET_STRING__convert_binary); +} + +/* + * Decode OCTET STRING from the string (ASCII/UTF-8) data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_utf8(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, + OCTET_STRING__handle_control_chars, + OCTET_STRING__convert_entrefs); +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +static int +OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf, + size_t units, unsigned int bpc, unsigned int unit_bits, + long lb, long ub, const asn_per_constraints_t *pc) { + uint8_t *end = buf + units * bpc; + + ASN_DEBUG("Expanding %d characters into (%ld..%ld):%d", + (int)units, lb, ub, unit_bits); + + /* X.691: 27.5.4 */ + if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { + /* Decode without translation */ + lb = 0; + } else if(pc && pc->code2value) { + if(unit_bits > 16) + return 1; /* FATAL: can't have constrained + * UniversalString with more than + * 16 million code points */ + for(; buf < end; buf += bpc) { + int value; + int code = per_get_few_bits(po, unit_bits); + if(code < 0) return -1; /* WMORE */ + value = pc->code2value(code); + if(value < 0) { + ASN_DEBUG("Code %d (0x%02x) is" + " not in map (%ld..%ld)", + code, code, lb, ub); + return 1; /* FATAL */ + } + switch(bpc) { + case 1: *buf = value; break; + case 2: buf[0] = value >> 8; buf[1] = value; break; + case 4: buf[0] = value >> 24; buf[1] = value >> 16; + buf[2] = value >> 8; buf[3] = value; break; + } + } + return 0; + } + + /* Shortcut the no-op copying to the aligned structure */ + if(lb == 0 && (unit_bits == 8 * bpc)) { + return per_get_many_bits(po, buf, 0, unit_bits * units); + } + + for(; buf < end; buf += bpc) { + int32_t code = per_get_few_bits(po, unit_bits); + int32_t ch = code + lb; + if(code < 0) return -1; /* WMORE */ + if(ch > ub) { + ASN_DEBUG("Code %d is out of range (%ld..%ld)", + ch, lb, ub); + return 1; /* FATAL */ + } + switch(bpc) { + case 1: *buf = ch; break; + case 2: buf[0] = ch >> 8; buf[1] = ch; break; + case 4: buf[0] = ch >> 24; buf[1] = ch >> 16; + buf[2] = ch >> 8; buf[3] = ch; break; + } + } + + return 0; +} + +static int +OCTET_STRING_per_put_characters(asn_per_outp_t *po, const uint8_t *buf, + size_t units, unsigned int bpc, unsigned int unit_bits, + long lb, long ub, const asn_per_constraints_t *pc) { + const uint8_t *end = buf + units * bpc; + + ASN_DEBUG("Squeezing %d characters into (%ld..%ld):%d (%d bpc)", + (int)units, lb, ub, unit_bits, bpc); + + /* X.691: 27.5.4 */ + if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { + /* Encode as is */ + lb = 0; + } else if(pc && pc->value2code) { + for(; buf < end; buf += bpc) { + int code; + uint32_t value; + switch(bpc) { + case 1: value = *(const uint8_t *)buf; break; + case 2: value = (buf[0] << 8) | buf[1]; break; + case 4: value = (buf[0] << 24) | (buf[1] << 16) + | (buf[2] << 8) | buf[3]; break; + default: return -1; + } + code = pc->value2code(value); + if(code < 0) { + ASN_DEBUG("Character %d (0x%02x) is" + " not in map (%ld..%ld)", + *buf, *buf, lb, ub); + return -1; + } + if(per_put_few_bits(po, code, unit_bits)) + return -1; + } + } + + /* Shortcut the no-op copying to the aligned structure */ + if(lb == 0 && (unit_bits == 8 * bpc)) { + return per_put_many_bits(po, buf, unit_bits * units); + } + + for(ub -= lb; buf < end; buf += bpc) { + int ch; + uint32_t value; + switch(bpc) { + case 1: + value = *(const uint8_t *)buf; + break; + case 2: + value = (buf[0] << 8) | buf[1]; + break; + case 4: + value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; + break; + default: + return -1; + } + ch = value - lb; + if(ch < 0 || ch > ub) { + ASN_DEBUG("Character %d (0x%02x) is out of range (%ld..%ld)", *buf, + value, lb, ub + lb); + return -1; + } + if(per_put_few_bits(po, ch, unit_bits)) return -1; + } + + return 0; +} + +static asn_per_constraints_t asn_DEF_OCTET_STRING_constraints = { + { APC_CONSTRAINED, 8, 8, 0, 255 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, + 0, 0 +}; + +asn_dec_rval_t +OCTET_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = + constraints ? constraints : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + enum { + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + + (void)opt_codec_ctx; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + case ASN_OSUBV_BIT: + ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); + RETURN(RC_FAIL); + break; + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_CHAR; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + break; + } + + /* + * Allocate the string. + */ + if(!st) { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + if(bpc) { + st->size = csiz->upper_bound * bpc; + } else { + st->size = (csiz->upper_bound + 7) >> 3; + } + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + if(bpc) { + ASN_DEBUG("Encoding OCTET STRING size %ld", + csiz->upper_bound); + ret = OCTET_STRING_per_get_characters(pd, st->buf, + csiz->upper_bound, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ASN_DEBUG("Encoding BIT STRING size %ld", + csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, + unit_bits * csiz->upper_bound); + } + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += unit_bits * csiz->upper_bound; + st->buf[st->size] = 0; + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + void *p; + int ret; + + /* Get the PER length */ + raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, + &repeat); + if(raw_len < 0) RETURN(RC_WMORE); + if(raw_len == 0 && st->buf) break; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + len_bytes = raw_len * bpc; + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + ret = OCTET_STRING_per_get_characters(pd, &st->buf[st->size], raw_len, + bpc, unit_bits, cval->lower_bound, + cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +OCTET_STRING_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + size_t size_in_units; + const uint8_t *buf; + int ret; + enum { + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + case ASN_OSUBV_BIT: + ASN__ENCODE_FAILED; + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_CHAR; + size_in_units = st->size; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + size_in_units = st->size >> 1; + if(st->size & 1) { + ASN_DEBUG("%s string size is not modulo 2", td->name); + ASN__ENCODE_FAILED; + } + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + size_in_units = st->size >> 2; + if(st->size & 3) { + ASN_DEBUG("%s string size is not modulo 4", td->name); + ASN__ENCODE_FAILED; + } + break; + } + + ASN_DEBUG("Encoding %s into %" ASN_PRI_SIZE " units of %d bits" + " (%ld..%ld, effective %d)%s", + td->name, size_in_units, unit_bits, + csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out whether size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((ssize_t)size_in_units < csiz->lower_bound + || (ssize_t)size_in_units > csiz->upper_bound) { + if(ct_extensible) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + inext = 1; + } else { + ASN__ENCODE_FAILED; + } + } + } else { + inext = 0; + } + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + if(csiz->effective_bits >= 0 && !inext) { + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes (%ld), length in %d bits", st->size, + size_in_units - csiz->lower_bound, csiz->effective_bits); + ret = per_put_few_bits(po, size_in_units - csiz->lower_bound, + csiz->effective_bits); + if(ret) ASN__ENCODE_FAILED; + ret = OCTET_STRING_per_put_characters(po, st->buf, size_in_units, bpc, + unit_bits, cval->lower_bound, + cval->upper_bound, pc); + if(ret) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); + + buf = st->buf; + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " in units", size_in_units); + do { + int need_eom = 0; + ssize_t may_save = uper_put_length(po, size_in_units, &need_eom); + if(may_save < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "%s", may_save, size_in_units, + need_eom ? ",+EOM" : ""); + + ret = OCTET_STRING_per_put_characters(po, buf, may_save, bpc, unit_bits, + cval->lower_bound, + cval->upper_bound, pc); + if(ret) ASN__ENCODE_FAILED; + + buf += may_save * bpc; + size_in_units -= may_save; + assert(!(may_save & 0x07) || !size_in_units); + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size_in_units); + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + enum { + OS__BPC_BIT = 0, + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + + (void)opt_codec_ctx; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + + switch(specs->subvariant) { + default: +/* case ASN_OSUBV_ANY: + ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); + RETURN(RC_FAIL); +*/ + case ASN_OSUBV_BIT: + canonical_unit_bits = unit_bits = 1; + bpc = OS__BPC_BIT; + break; + case ASN_OSUBV_ANY: + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; +/* if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; +*/ + bpc = OS__BPC_CHAR; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + break; + } + + /* + * Allocate the string. + */ + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + cval = &asn_DEF_OCTET_STRING_constraints.value; + unit_bits = canonical_unit_bits; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + if(bpc) { + st->size = csiz->upper_bound * bpc; + } else { + st->size = (csiz->upper_bound + 7) >> 3; + } + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + if (st->size > 2) { /* X.691 #16 NOTE 1 */ + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + if(bpc) { + ASN_DEBUG("Decoding OCTET STRING size %ld", + csiz->upper_bound); + ret = OCTET_STRING_per_get_characters(pd, st->buf, + csiz->upper_bound, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ASN_DEBUG("Decoding BIT STRING size %ld", + csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, + unit_bits * csiz->upper_bound); + } + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += unit_bits * csiz->upper_bound; + st->buf[st->size] = 0; + if(bpc == 0) { + int ubs = (csiz->upper_bound & 0x7); + st->bits_unused = ubs ? 8 - ubs : 0; + } + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + ssize_t len_bits; + void *p; + int ret; + + /* Get the PER length */ + if (csiz->upper_bound - csiz->lower_bound == 0) + /* Indefinite length case */ + raw_len = aper_get_length(pd, -1, csiz->effective_bits, &repeat); + else + raw_len = aper_get_length(pd, csiz->upper_bound - csiz->lower_bound + 1, csiz->effective_bits, &repeat); + repeat = 0; + if(raw_len < 0) RETURN(RC_WMORE); + raw_len += csiz->lower_bound; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + + if (raw_len > 2) { /* X.691 #16 NOTE 1 */ + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + + if(bpc) { + len_bytes = raw_len * bpc; + len_bits = len_bytes * unit_bits; + } else { + len_bits = raw_len; + len_bytes = (len_bits + 7) >> 3; + if(len_bits & 0x7) + st->bits_unused = 8 - (len_bits & 0x7); + /* len_bits be multiple of 16K if repeat is set */ + } + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + if(bpc) { + ret = OCTET_STRING_per_get_characters(pd, + &st->buf[st->size], raw_len, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ret = per_get_many_bits(pd, &st->buf[st->size], + 0, len_bits); + } + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +OCTET_STRING_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + unsigned int sizeinunits; + const uint8_t *buf; + int ret; + enum { + OS__BPC_BIT = 0, + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + switch(specs->subvariant) { + default: + /* case ASN_OSUBV_ANY: + ASN__ENCODE_FAILED; + */ + case ASN_OSUBV_BIT: + canonical_unit_bits = unit_bits = 1; + bpc = OS__BPC_BIT; + sizeinunits = st->size * 8 - (st->bits_unused & 0x07); + ASN_DEBUG("BIT STRING of %d bytes", + sizeinunits); + break; + case ASN_OSUBV_ANY: + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; +/* if(cval->flags & APC_CONSTRAINED) + unit_bits = 8; +*/ + bpc = OS__BPC_CHAR; + sizeinunits = st->size; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + sizeinunits = st->size / 2; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + sizeinunits = st->size / 4; + break; + } + + ASN_DEBUG("Encoding %s into %d units of %d bits" + " (%ld..%ld, effective %d)%s", + td->name, sizeinunits, unit_bits, + csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out wheter size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((int)sizeinunits < csiz->lower_bound + || (int)sizeinunits > csiz->upper_bound) { + if(ct_extensible) { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + inext = 1; + } else + ASN__ENCODE_FAILED; + } + } else { + inext = 0; + } + + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits >= 0) { + ASN_DEBUG("Encoding %lu bytes (%ld), length in %d bits", + st->size, sizeinunits - csiz->lower_bound, + csiz->effective_bits); + if (csiz->effective_bits > 0) { + ret = aper_put_length(po, csiz->upper_bound - csiz->lower_bound + 1, sizeinunits - csiz->lower_bound); + if(ret) ASN__ENCODE_FAILED; + } + /* EB MOD + AFAIU if lb != ub it is aligned whatever the number of bits */ + if ((st->size > 2) || (csiz->lower_bound != csiz->upper_bound)) { /* X.691 #16.11 */ + if (aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + } + if(bpc) { + ret = OCTET_STRING_per_put_characters(po, st->buf, + sizeinunits, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + } else { + ret = per_put_many_bits(po, st->buf, + sizeinunits * unit_bits); + } + if(ret) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %lu bytes", st->size); + + if(sizeinunits == 0) { + if(aper_put_length(po, -1, 0)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + buf = st->buf; + while(sizeinunits) { + ssize_t maySave = aper_put_length(po, -1, sizeinunits); + + if(maySave < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %ld of %ld", + (long)maySave, (long)sizeinunits); + + if(bpc) { + ret = OCTET_STRING_per_put_characters(po, buf, + maySave, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + } else { + ret = per_put_many_bits(po, buf, maySave * unit_bits); + } + if(ret) ASN__ENCODE_FAILED; + + if(bpc) + buf += maySave * bpc; + else + buf += maySave >> 3; + sizeinunits -= maySave; + assert(!(maySave & 0x07) || !sizeinunits); + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +int +OCTET_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + char scratch[16 * 3 + 4]; + char *p = scratch; + uint8_t *buf; + uint8_t *end; + size_t i; + + (void)td; /* Unused argument */ + + if(!st || (!st->buf && st->size)) + return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* + * Dump the contents of the buffer in hexadecimal. + */ + buf = st->buf; + end = buf + st->size; + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + _i_INDENT(1); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + + if(p > scratch) { + p--; /* Remove the tail space */ + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + } + + return 0; +} + +int +OCTET_STRING_print_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, + void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(st && (st->buf || !st->size)) { + return (cb(st->buf, st->size, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, + enum asn_struct_free_method method) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const asn_OCTET_STRING_specifics_t *specs; + asn_struct_ctx_t *ctx; + struct _stack *stck; + + if(!td || !st) + return; + + specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + ASN_DEBUG("Freeing %s as OCTET STRING", td->name); + + if(st->buf) { + FREEMEM(st->buf); + st->buf = 0; + } + + /* + * Remove decode-time stack. + */ + stck = (struct _stack *)ctx->ptr; + if(stck) { + while(stck->tail) { + struct _stack_el *sel = stck->tail; + stck->tail = sel->prev; + FREEMEM(sel); + } + FREEMEM(stck); + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(sptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(sptr, 0, + td->specifics + ? ((const asn_OCTET_STRING_specifics_t *)(td->specifics)) + ->struct_size + : sizeof(OCTET_STRING_t)); + break; + } +} + +/* + * Conversion routines. + */ +int +OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) { + void *buf; + + if(st == 0 || (str == 0 && len)) { + errno = EINVAL; + return -1; + } + + /* + * Clear the OCTET STRING. + */ + if(str == NULL) { + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + return 0; + } + + /* Determine the original string size, if not explicitly given */ + if(len < 0) + len = strlen(str); + + /* Allocate and fill the memory */ + buf = MALLOC(len + 1); + if(buf == NULL) + return -1; + + memcpy(buf, str, len); + ((uint8_t *)buf)[len] = '\0'; /* Couldn't use memcpy(len+1)! */ + FREEMEM(st->buf); + st->buf = (uint8_t *)buf; + st->size = len; + + return 0; +} + +OCTET_STRING_t * +OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, const char *str, + int len) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + OCTET_STRING_t *st; + + st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); + if(st && str && OCTET_STRING_fromBuf(st, str, len)) { + FREEMEM(st); + st = NULL; + } + + return st; +} + +/* + * Lexicographically compare the common prefix of both strings, + * and if it is the same return -1 for the smallest string. + */ +int +OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics; + const OCTET_STRING_t *a = aptr; + const OCTET_STRING_t *b = bptr; + + assert(!specs || specs->subvariant != ASN_OSUBV_BIT); + + if(a && b) { + size_t common_prefix_size = a->size <= b->size ? a->size : b->size; + int ret = memcmp(a->buf, b->buf, common_prefix_size); + if(ret == 0) { + /* Figure out which string with equal prefixes is longer. */ + if(a->size < b->size) { + return -1; + } else if(a->size > b->size) { + return 1; + } else { + return 0; + } + } else { + return ret < 0 ? -1 : 1; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } + +} + +/* + * Biased function for randomizing character values around their limits. + */ +static uint32_t +OCTET_STRING__random_char(unsigned long lb, unsigned long ub) { + assert(lb <= ub); + switch(asn_random_between(0, 16)) { + case 0: + if(lb < ub) return lb + 1; + /* Fall through */ + case 1: + return lb; + case 2: + if(lb < ub) return ub - 1; + /* Fall through */ + case 3: + return ub; + default: + return asn_random_between(lb, ub); + } +} + + +size_t +OCTET_STRING_random_length_constrained( + const asn_TYPE_descriptor_t *td, + const asn_encoding_constraints_t *constraints, size_t max_length) { + const unsigned lengths[] = {0, 1, 2, 3, 4, 8, + 126, 127, 128, 16383, 16384, 16385, + 65534, 65535, 65536, 65537}; + size_t rnd_len; + + /* Figure out how far we should go */ + rnd_len = lengths[asn_random_between( + 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->size; + if(pc->flags & APC_CONSTRAINED) { + long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length + ? pc->upper_bound + : (ssize_t)max_length; + if(max_length <= (size_t)pc->lower_bound) { + return pc->lower_bound; + } + if(pc->flags & APC_EXTENSIBLE) { + switch(asn_random_between(0, 5)) { + case 0: + if(pc->lower_bound > 0) { + rnd_len = pc->lower_bound - 1; + break; + } + /* Fall through */ + case 1: + rnd_len = pc->upper_bound + 1; + break; + case 2: + /* Keep rnd_len from the table */ + if(rnd_len <= max_length) { + break; + } + /* Fall through */ + default: + rnd_len = asn_random_between(pc->lower_bound, + suggested_upper_bound); + } + } else { + rnd_len = + asn_random_between(pc->lower_bound, suggested_upper_bound); + } + } else { + rnd_len = asn_random_between(0, max_length); + } + } else if(rnd_len > max_length) { + rnd_len = asn_random_between(0, max_length); + } + + return rnd_len; +} + +asn_random_fill_result_t +OCTET_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + unsigned int unit_bytes = 1; + unsigned long clb = 0; /* Lower bound on char */ + unsigned long cub = 255; /* Higher bound on char value */ + uint8_t *buf; + uint8_t *bend; + uint8_t *b; + size_t rnd_len; + OCTET_STRING_t *st; + + if(max_length == 0 && !*sptr) return result_skipped; + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + return result_failed; + case ASN_OSUBV_BIT: + /* Handled by BIT_STRING itself. */ + return result_failed; + case ASN_OSUBV_STR: + unit_bytes = 1; + clb = 0; + cub = 255; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + clb = 0; + cub = 65535; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + clb = 0; + cub = 0x10FFFF; + break; + } + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->value; + if(pc->flags & APC_SEMI_CONSTRAINED) { + clb = pc->lower_bound; + } else if(pc->flags & APC_CONSTRAINED) { + clb = pc->lower_bound; + cub = pc->upper_bound; + } + } + + rnd_len = + OCTET_STRING_random_length_constrained(td, constraints, max_length); + + buf = CALLOC(unit_bytes, rnd_len + 1); + if(!buf) return result_failed; + + bend = &buf[unit_bytes * rnd_len]; + + switch(unit_bytes) { + case 1: + for(b = buf; b < bend; b += unit_bytes) { + *(uint8_t *)b = OCTET_STRING__random_char(clb, cub); + } + *(uint8_t *)b = 0; + break; + case 2: + for(b = buf; b < bend; b += unit_bytes) { + uint32_t code = OCTET_STRING__random_char(clb, cub); + b[0] = code >> 8; + b[1] = code; + } + *(uint16_t *)b = 0; + break; + case 4: + for(b = buf; b < bend; b += unit_bytes) { + uint32_t code = OCTET_STRING__random_char(clb, cub); + b[0] = code >> 24; + b[1] = code >> 16; + b[2] = code >> 8; + b[3] = code; + } + *(uint32_t *)b = 0; + break; + } + + if(*sptr) { + st = *sptr; + FREEMEM(st->buf); + } else { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) { + FREEMEM(buf); + return result_failed; + } + } + + st->buf = buf; + st->size = unit_bytes * rnd_len; + + result_ok.length = st->size; + return result_ok; +} diff --git a/Bouncer/e2sm_kpm/lib/OCTET_STRING_oer.c b/Bouncer/e2sm_kpm/lib/OCTET_STRING_oer.c new file mode 100644 index 0000000..c16faea --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/OCTET_STRING_oer.c @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +OCTET_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + + size_t unit_bytes; + switch(specs->subvariant) { + default: + case ASN_OSUBV_BIT: + ASN_DEBUG("Invalid use of OCTET STRING to decode BIT STRING"); + ASN__DECODE_FAILED; + case ASN_OSUBV_ANY: + /* Fall through */ + case ASN_OSUBV_STR: + unit_bytes = 1; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + break; + } + + (void)opt_codec_ctx; + + if(!st) { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) ASN__DECODE_FAILED; + } + + if(ct_size >= 0) { + expected_length = unit_bytes * ct_size; + } else { + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + rval.consumed = len_len; + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(expected_length % unit_bytes != 0) { + ASN_DEBUG( + "Data size %" ASN_PRI_SIZE " bytes is not consistent with multiplier %" ASN_PRI_SIZE "", + expected_length, unit_bytes); + ASN__DECODE_FAILED; + } + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + + rval.consumed += expected_length; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +OCTET_STRING_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_enc_rval_t er = {0, 0, 0}; + + if(!st) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s %" ASN_PRI_SIZE " as OCTET STRING", td ? td->name : "", st->size); + + if(ct_size >= 0) { + /* + * Check that available data matches the constraint + */ + size_t unit_bytes; + switch(specs->subvariant) { + default: + case ASN_OSUBV_BIT: + ASN_DEBUG("Invalid use of OCTET STRING to encode BIT STRING"); + ASN__ENCODE_FAILED; + case ASN_OSUBV_ANY: + /* Fall through */ + case ASN_OSUBV_STR: + unit_bytes = 1; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + break; + } + + if(st->size != unit_bytes * (size_t)ct_size) { + ASN_DEBUG( + "Trying to encode %s (%" ASN_PRI_SIZE " bytes) which doesn't fit SIZE " + "constraint (%" ASN_PRI_SIZE ")", + td->name, st->size, ct_size); + ASN__ENCODE_FAILED; + } + } else { + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t ret = oer_serialize_length(st->size, cb, app_key); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += ret; + } + + er.encoded += st->size; + if(cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/OCUCP-PF-Container.c b/Bouncer/e2sm_kpm/lib/OCUCP-PF-Container.c new file mode 100644 index 0000000..e71aefd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/OCUCP-PF-Container.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "OCUCP-PF-Container.h" + +static int +memb_numberOfActive_UEs_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65536)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_numberOfActive_UEs_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_numberOfActive_UEs_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, -1, 1, 65536 } /* (1..65536,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cu_CP_Resource_Status_3[] = { + { ATF_POINTER, 1, offsetof(struct OCUCP_PF_Container__cu_CP_Resource_Status, numberOfActive_UEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_numberOfActive_UEs_constr_4, &asn_PER_memb_numberOfActive_UEs_constr_4, memb_numberOfActive_UEs_constraint_3 }, + 0, 0, /* No default value */ + "numberOfActive-UEs" + }, +}; +static const int asn_MAP_cu_CP_Resource_Status_oms_3[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_cu_CP_Resource_Status_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_cu_CP_Resource_Status_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* numberOfActive-UEs */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_cu_CP_Resource_Status_specs_3 = { + sizeof(struct OCUCP_PF_Container__cu_CP_Resource_Status), + offsetof(struct OCUCP_PF_Container__cu_CP_Resource_Status, _asn_ctx), + asn_MAP_cu_CP_Resource_Status_tag2el_3, + 1, /* Count of tags in the map */ + asn_MAP_cu_CP_Resource_Status_oms_3, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cu_CP_Resource_Status_3 = { + "cu-CP-Resource-Status", + "cu-CP-Resource-Status", + &asn_OP_SEQUENCE, + asn_DEF_cu_CP_Resource_Status_tags_3, + sizeof(asn_DEF_cu_CP_Resource_Status_tags_3) + /sizeof(asn_DEF_cu_CP_Resource_Status_tags_3[0]) - 1, /* 1 */ + asn_DEF_cu_CP_Resource_Status_tags_3, /* Same as above */ + sizeof(asn_DEF_cu_CP_Resource_Status_tags_3) + /sizeof(asn_DEF_cu_CP_Resource_Status_tags_3[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_cu_CP_Resource_Status_3, + 1, /* Elements count */ + &asn_SPC_cu_CP_Resource_Status_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_OCUCP_PF_Container_1[] = { + { ATF_POINTER, 1, offsetof(struct OCUCP_PF_Container, gNB_CU_CP_Name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_CP_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct OCUCP_PF_Container, cu_CP_Resource_Status), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_cu_CP_Resource_Status_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cu-CP-Resource-Status" + }, +}; +static const int asn_MAP_OCUCP_PF_Container_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_OCUCP_PF_Container_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_OCUCP_PF_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-CU-CP-Name */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cu-CP-Resource-Status */ +}; +asn_SEQUENCE_specifics_t asn_SPC_OCUCP_PF_Container_specs_1 = { + sizeof(struct OCUCP_PF_Container), + offsetof(struct OCUCP_PF_Container, _asn_ctx), + asn_MAP_OCUCP_PF_Container_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_OCUCP_PF_Container_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_OCUCP_PF_Container = { + "OCUCP-PF-Container", + "OCUCP-PF-Container", + &asn_OP_SEQUENCE, + asn_DEF_OCUCP_PF_Container_tags_1, + sizeof(asn_DEF_OCUCP_PF_Container_tags_1) + /sizeof(asn_DEF_OCUCP_PF_Container_tags_1[0]), /* 1 */ + asn_DEF_OCUCP_PF_Container_tags_1, /* Same as above */ + sizeof(asn_DEF_OCUCP_PF_Container_tags_1) + /sizeof(asn_DEF_OCUCP_PF_Container_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_OCUCP_PF_Container_1, + 2, /* Elements count */ + &asn_SPC_OCUCP_PF_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/OCUUP-PF-Container.c b/Bouncer/e2sm_kpm/lib/OCUUP-PF-Container.c new file mode 100644 index 0000000..ea7d6bc --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/OCUUP-PF-Container.c @@ -0,0 +1,142 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "OCUUP-PF-Container.h" + +#include "PF-ContainerListItem.h" +static int +memb_pf_ContainerList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 3)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_pf_ContainerList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..3)) */}; +static asn_per_constraints_t asn_PER_type_pf_ContainerList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 2, 2, 1, 3 } /* (SIZE(1..3)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_pf_ContainerList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..3)) */}; +static asn_per_constraints_t asn_PER_memb_pf_ContainerList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 2, 2, 1, 3 } /* (SIZE(1..3)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_pf_ContainerList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PF_ContainerListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_pf_ContainerList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_pf_ContainerList_specs_3 = { + sizeof(struct OCUUP_PF_Container__pf_ContainerList), + offsetof(struct OCUUP_PF_Container__pf_ContainerList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_pf_ContainerList_3 = { + "pf-ContainerList", + "pf-ContainerList", + &asn_OP_SEQUENCE_OF, + asn_DEF_pf_ContainerList_tags_3, + sizeof(asn_DEF_pf_ContainerList_tags_3) + /sizeof(asn_DEF_pf_ContainerList_tags_3[0]) - 1, /* 1 */ + asn_DEF_pf_ContainerList_tags_3, /* Same as above */ + sizeof(asn_DEF_pf_ContainerList_tags_3) + /sizeof(asn_DEF_pf_ContainerList_tags_3[0]), /* 2 */ + { &asn_OER_type_pf_ContainerList_constr_3, &asn_PER_type_pf_ContainerList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_pf_ContainerList_3, + 1, /* Single element */ + &asn_SPC_pf_ContainerList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_OCUUP_PF_Container_1[] = { + { ATF_POINTER, 1, offsetof(struct OCUUP_PF_Container, gNB_CU_UP_Name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct OCUUP_PF_Container, pf_ContainerList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_pf_ContainerList_3, + 0, + { &asn_OER_memb_pf_ContainerList_constr_3, &asn_PER_memb_pf_ContainerList_constr_3, memb_pf_ContainerList_constraint_1 }, + 0, 0, /* No default value */ + "pf-ContainerList" + }, +}; +static const int asn_MAP_OCUUP_PF_Container_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_OCUUP_PF_Container_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_OCUUP_PF_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-CU-UP-Name */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* pf-ContainerList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_OCUUP_PF_Container_specs_1 = { + sizeof(struct OCUUP_PF_Container), + offsetof(struct OCUUP_PF_Container, _asn_ctx), + asn_MAP_OCUUP_PF_Container_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_OCUUP_PF_Container_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_OCUUP_PF_Container = { + "OCUUP-PF-Container", + "OCUUP-PF-Container", + &asn_OP_SEQUENCE, + asn_DEF_OCUUP_PF_Container_tags_1, + sizeof(asn_DEF_OCUUP_PF_Container_tags_1) + /sizeof(asn_DEF_OCUUP_PF_Container_tags_1[0]), /* 1 */ + asn_DEF_OCUUP_PF_Container_tags_1, /* Same as above */ + sizeof(asn_DEF_OCUUP_PF_Container_tags_1) + /sizeof(asn_DEF_OCUUP_PF_Container_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_OCUUP_PF_Container_1, + 2, /* Elements count */ + &asn_SPC_OCUUP_PF_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ODU-PF-Container.c b/Bouncer/e2sm_kpm/lib/ODU-PF-Container.c new file mode 100644 index 0000000..fde90d1 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ODU-PF-Container.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ODU-PF-Container.h" + +#include "CellResourceReportListItem.h" +static int +memb_cellResourceReportList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 512)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_type_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..512)) */}; +static asn_per_constraints_t asn_PER_memb_cellResourceReportList_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 9, 9, 1, 512 } /* (SIZE(1..512)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellResourceReportList_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CellResourceReportListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellResourceReportList_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellResourceReportList_specs_2 = { + sizeof(struct ODU_PF_Container__cellResourceReportList), + offsetof(struct ODU_PF_Container__cellResourceReportList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellResourceReportList_2 = { + "cellResourceReportList", + "cellResourceReportList", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellResourceReportList_tags_2, + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellResourceReportList_tags_2, /* Same as above */ + sizeof(asn_DEF_cellResourceReportList_tags_2) + /sizeof(asn_DEF_cellResourceReportList_tags_2[0]), /* 2 */ + { &asn_OER_type_cellResourceReportList_constr_2, &asn_PER_type_cellResourceReportList_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellResourceReportList_2, + 1, /* Single element */ + &asn_SPC_cellResourceReportList_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ODU_PF_Container_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ODU_PF_Container, cellResourceReportList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellResourceReportList_2, + 0, + { &asn_OER_memb_cellResourceReportList_constr_2, &asn_PER_memb_cellResourceReportList_constr_2, memb_cellResourceReportList_constraint_1 }, + 0, 0, /* No default value */ + "cellResourceReportList" + }, +}; +static const ber_tlv_tag_t asn_DEF_ODU_PF_Container_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ODU_PF_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellResourceReportList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ODU_PF_Container_specs_1 = { + sizeof(struct ODU_PF_Container), + offsetof(struct ODU_PF_Container, _asn_ctx), + asn_MAP_ODU_PF_Container_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ODU_PF_Container = { + "ODU-PF-Container", + "ODU-PF-Container", + &asn_OP_SEQUENCE, + asn_DEF_ODU_PF_Container_tags_1, + sizeof(asn_DEF_ODU_PF_Container_tags_1) + /sizeof(asn_DEF_ODU_PF_Container_tags_1[0]), /* 1 */ + asn_DEF_ODU_PF_Container_tags_1, /* Same as above */ + sizeof(asn_DEF_ODU_PF_Container_tags_1) + /sizeof(asn_DEF_ODU_PF_Container_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ODU_PF_Container_1, + 1, /* Elements count */ + &asn_SPC_ODU_PF_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/OPEN_TYPE.c b/Bouncer/e2sm_kpm/lib/OPEN_TYPE.c new file mode 100644 index 0000000..a54e99c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/OPEN_TYPE.c @@ -0,0 +1,509 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include +#include + +asn_TYPE_operation_t asn_OP_OPEN_TYPE = { + OPEN_TYPE_free, + OPEN_TYPE_print, + OPEN_TYPE_compare, + OPEN_TYPE_decode_ber, + OPEN_TYPE_encode_der, + OPEN_TYPE_decode_xer, + OPEN_TYPE_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, 0, /* No OER support, use "-gen-OER" to enable */ +#else + OPEN_TYPE_decode_oer, + OPEN_TYPE_encode_oer, +#endif +#ifdef ASN_DISABLE_PER_SUPPORT + 0, 0, 0, 0, +#else + OPEN_TYPE_decode_uper, + OPEN_TYPE_encode_uper, + OPEN_TYPE_decode_aper, + OPEN_TYPE_encode_aper, +#endif + 0, /* Random fill is not supported for open type */ + 0 /* Use generic outmost tag fetcher */ +}; + +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +asn_dec_rval_t +OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, const void *ptr, size_t size) { + size_t consumed_myself = 0; + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + ASN_DEBUG("presence %d\n", selected.presence_index); + + rv = selected.type_descriptor->op->ber_decoder( + opt_codec_ctx, selected.type_descriptor, &inner_value, ptr, size, + elm->tag_mode); + ADVANCE(rv.consumed); + rv.consumed = 0; + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + rv.code = RC_OK; + rv.consumed = consumed_myself; + return rv; + } else { + /* Oh, now a full-blown failure failure */ + } + /* Fall through */ + case RC_FAIL: + rv.consumed = consumed_myself; + /* Fall through */ + case RC_WMORE: + break; + } + + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + return rv; +} + +asn_dec_rval_t +OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, const void *ptr, size_t size) { + size_t consumed_myself = 0; + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + int xer_context = 0; + ssize_t ch_size; + pxer_chunk_type_e ch_type; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + assert(elm->flags == ATF_OPEN_TYPE); + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) + != 0) { + ASN__DECODE_FAILED; + } + } + + /* + * Confirm wrapper. + */ + for(;;) { + ch_size = xer_next_token(&xer_context, ptr, size, &ch_type); + if(ch_size < 0) { + ASN__DECODE_FAILED; + } else { + switch(ch_type) { + case PXER_WMORE: + ASN__DECODE_STARVED; + case PXER_COMMENT: + case PXER_TEXT: + ADVANCE(ch_size); + continue; + case PXER_TAG: + break; + } + break; + } + } + + /* + * Wrapper value confirmed. + */ + switch(xer_check_tag(ptr, ch_size, elm->name)) { + case XCT_OPENING: + ADVANCE(ch_size); + break; + case XCT_BROKEN: + default: + ASN__DECODE_FAILED; + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + rv = selected.type_descriptor->op->xer_decoder( + opt_codec_ctx, selected.type_descriptor, &inner_value, NULL, ptr, size); + ADVANCE(rv.consumed); + rv.consumed = 0; + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + break; + } else { + rv.code = RC_FAIL; + } + /* Fall through */ + case RC_FAIL: + /* Point to a best position where failure occurred */ + rv.consumed = consumed_myself; + /* Fall through */ + case RC_WMORE: + /* Wrt. rv.consumed==0: + * In case a genuine RC_WMORE, the whole Open Type decoding + * will have to be restarted. + */ + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + return rv; + } + + /* + * Finalize wrapper. + */ + for(;;) { + ch_size = xer_next_token(&xer_context, ptr, size, &ch_type); + if(ch_size < 0) { + ASN__DECODE_FAILED; + } else { + switch(ch_type) { + case PXER_WMORE: + ASN__DECODE_STARVED; + case PXER_COMMENT: + case PXER_TEXT: + ADVANCE(ch_size); + continue; + case PXER_TAG: + break; + } + break; + } + } + + /* + * Wrapper value confirmed. + */ + switch(xer_check_tag(ptr, ch_size, elm->name)) { + case XCT_CLOSING: + ADVANCE(ch_size); + break; + case XCT_BROKEN: + default: + ASN__DECODE_FAILED; + } + + rv.consumed += consumed_myself; + + return rv; +} + + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, asn_per_data_t *pd) { + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + assert(elm->flags == ATF_OPEN_TYPE); + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) + != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + rv = uper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, + &inner_value, pd); + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + break; + } else { + rv.code = RC_FAIL; + } + /* Fall through */ + case RC_WMORE: + case RC_FAIL: + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + } + return rv; +} + +asn_enc_rval_t +OPEN_TYPE_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const void *memb_ptr; /* Pointer to the member */ + asn_TYPE_member_t *elm; /* CHOICE's element */ + asn_enc_rval_t er = {0,0,0}; + unsigned present; + + (void)constraints; + + present = CHOICE_variant_get_presence(td, sptr); + if(present == 0 || present > td->elements_count) { + ASN__ENCODE_FAILED; + } else { + present--; + } + + ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present); + + elm = &td->elements[present]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(uper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) { + ASN__ENCODE_FAILED; + } + + er.encoded = 0; + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, asn_per_data_t *pd) { + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + assert(elm->flags == ATF_OPEN_TYPE); + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) + != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, + &inner_value, pd); + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + break; + } else { + rv.code = RC_FAIL; + } + /* Fall through */ + case RC_WMORE: + case RC_FAIL: + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + } + return rv; +} + +asn_enc_rval_t +OPEN_TYPE_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const void *memb_ptr; /* Pointer to the member */ + asn_TYPE_member_t *elm; /* CHOICE's element */ + asn_enc_rval_t er = {0,0,0}; + unsigned present; + + (void)constraints; + + present = CHOICE_variant_get_presence(td, sptr); + if(present == 0 || present > td->elements_count) { + ASN__ENCODE_FAILED; + } else { + present--; + } + + ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present); + + elm = &td->elements[present]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(aper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) { + ASN__ENCODE_FAILED; + } + + er.encoded = 0; + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/OPEN_TYPE_oer.c b/Bouncer/e2sm_kpm/lib/OPEN_TYPE_oer.c new file mode 100644 index 0000000..dd2f5c6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/OPEN_TYPE_oer.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +asn_dec_rval_t +OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + asn_TYPE_member_t *elm, const void *ptr, size_t size) { + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + size_t ot_ret; + + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + ot_ret = oer_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, + &inner_value, ptr, size); + switch(ot_ret) { + default: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + rv.code = RC_OK; + rv.consumed = ot_ret; + return rv; + } else { + /* Oh, now a full-blown failure failure */ + } + /* Fall through */ + case -1: + rv.code = RC_FAIL; + rv.consumed = ot_ret; + break; + case 0: + rv.code = RC_WMORE; + rv.consumed = 0; + break; + } + + if(*memb_ptr2) { + const asn_CHOICE_specifics_t *specs = + selected.type_descriptor->specifics; + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_FREE_CONTENTS_ONLY(*selected.type_descriptor, + inner_value); + memset(*memb_ptr2, 0, specs->struct_size); + } + } + return rv; +} diff --git a/Bouncer/e2sm_kpm/lib/ObjectDescriptor.c b/Bouncer/e2sm_kpm/lib/ObjectDescriptor.c new file mode 100644 index 0000000..5d8bfb2 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ObjectDescriptor.c @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * ObjectDescriptor basic type description. + */ +static const ber_tlv_tag_t asn_DEF_ObjectDescriptor_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), /* [UNIVERSAL 7] IMPLICIT ... */ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +asn_TYPE_operation_t asn_OP_ObjectDescriptor = { + OCTET_STRING_free, + OCTET_STRING_print_utf8, /* Treat as ASCII subset (it's not) */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + 0, + 0, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + 0, /* Not supported for ObjectDescriptor */ + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = { + "ObjectDescriptor", + "ObjectDescriptor", + &asn_OP_ObjectDescriptor, + asn_DEF_ObjectDescriptor_tags, + sizeof(asn_DEF_ObjectDescriptor_tags) + / sizeof(asn_DEF_ObjectDescriptor_tags[0]) - 1, + asn_DEF_ObjectDescriptor_tags, + sizeof(asn_DEF_ObjectDescriptor_tags) + / sizeof(asn_DEF_ObjectDescriptor_tags[0]), + { 0, 0, asn_generic_unknown_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PF-Container.c b/Bouncer/e2sm_kpm/lib/PF-Container.c new file mode 100644 index 0000000..b380786 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PF-Container.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PF-Container.h" + +#include "ODU-PF-Container.h" +#include "OCUCP-PF-Container.h" +#include "OCUUP-PF-Container.h" +static asn_oer_constraints_t asn_OER_type_PF_Container_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_PF_Container_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_PF_Container_1[] = { + { ATF_POINTER, 0, offsetof(struct PF_Container, choice.oDU), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ODU_PF_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oDU" + }, + { ATF_POINTER, 0, offsetof(struct PF_Container, choice.oCU_CP), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCUCP_PF_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oCU-CP" + }, + { ATF_POINTER, 0, offsetof(struct PF_Container, choice.oCU_UP), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCUUP_PF_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oCU-UP" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_PF_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* oDU */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* oCU-CP */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* oCU-UP */ +}; +asn_CHOICE_specifics_t asn_SPC_PF_Container_specs_1 = { + sizeof(struct PF_Container), + offsetof(struct PF_Container, _asn_ctx), + offsetof(struct PF_Container, present), + sizeof(((struct PF_Container *)0)->present), + asn_MAP_PF_Container_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_PF_Container = { + "PF-Container", + "PF-Container", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_PF_Container_constr_1, &asn_PER_type_PF_Container_constr_1, CHOICE_constraint }, + asn_MBR_PF_Container_1, + 3, /* Elements count */ + &asn_SPC_PF_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PF-ContainerListItem.c b/Bouncer/e2sm_kpm/lib/PF-ContainerListItem.c new file mode 100644 index 0000000..3c3df6f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PF-ContainerListItem.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PF-ContainerListItem.h" + +asn_TYPE_member_t asn_MBR_PF_ContainerListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PF_ContainerListItem, interface_type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NI_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "interface-type" + }, + { ATF_NOFLAGS, 0, offsetof(struct PF_ContainerListItem, o_CU_UP_PM_Container), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CUUPMeasurement_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "o-CU-UP-PM-Container" + }, +}; +static const ber_tlv_tag_t asn_DEF_PF_ContainerListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_PF_ContainerListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* interface-type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* o-CU-UP-PM-Container */ +}; +asn_SEQUENCE_specifics_t asn_SPC_PF_ContainerListItem_specs_1 = { + sizeof(struct PF_ContainerListItem), + offsetof(struct PF_ContainerListItem, _asn_ctx), + asn_MAP_PF_ContainerListItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_PF_ContainerListItem = { + "PF-ContainerListItem", + "PF-ContainerListItem", + &asn_OP_SEQUENCE, + asn_DEF_PF_ContainerListItem_tags_1, + sizeof(asn_DEF_PF_ContainerListItem_tags_1) + /sizeof(asn_DEF_PF_ContainerListItem_tags_1[0]), /* 1 */ + asn_DEF_PF_ContainerListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_PF_ContainerListItem_tags_1) + /sizeof(asn_DEF_PF_ContainerListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_PF_ContainerListItem_1, + 2, /* Elements count */ + &asn_SPC_PF_ContainerListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PLMN-Identity.c b/Bouncer/e2sm_kpm/lib/PLMN-Identity.c new file mode 100644 index 0000000..5ebacad --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PLMN-Identity.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PLMN-Identity.h" + +int +PLMN_Identity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_PLMN_Identity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_PLMN_Identity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_PLMN_Identity = { + "PLMN-Identity", + "PLMN-Identity", + &asn_OP_OCTET_STRING, + asn_DEF_PLMN_Identity_tags_1, + sizeof(asn_DEF_PLMN_Identity_tags_1) + /sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */ + asn_DEF_PLMN_Identity_tags_1, /* Same as above */ + sizeof(asn_DEF_PLMN_Identity_tags_1) + /sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */ + { &asn_OER_type_PLMN_Identity_constr_1, &asn_PER_type_PLMN_Identity_constr_1, PLMN_Identity_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PLMNIdentity.c b/Bouncer/e2sm_kpm/lib/PLMNIdentity.c new file mode 100644 index 0000000..d375735 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PLMNIdentity.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "PLMNIdentity.h" + +int +PLMNIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_PLMNIdentity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_PLMNIdentity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_PLMNIdentity = { + "PLMNIdentity", + "PLMNIdentity", + &asn_OP_OCTET_STRING, + asn_DEF_PLMNIdentity_tags_1, + sizeof(asn_DEF_PLMNIdentity_tags_1) + /sizeof(asn_DEF_PLMNIdentity_tags_1[0]), /* 1 */ + asn_DEF_PLMNIdentity_tags_1, /* Same as above */ + sizeof(asn_DEF_PLMNIdentity_tags_1) + /sizeof(asn_DEF_PLMNIdentity_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_PLMNIdentity_constr_1, PLMNIdentity_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PM-Containers-List.c b/Bouncer/e2sm_kpm/lib/PM-Containers-List.c new file mode 100644 index 0000000..2a4b953 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PM-Containers-List.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PM-Containers-List.h" + +#include "PF-Container.h" +#include "RAN-Container.h" +asn_TYPE_member_t asn_MBR_PM_Containers_List_1[] = { + { ATF_POINTER, 2, offsetof(struct PM_Containers_List, performanceContainer), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_PF_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "performanceContainer" + }, + { ATF_POINTER, 1, offsetof(struct PM_Containers_List, theRANContainer), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RAN_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "theRANContainer" + }, +}; +static const int asn_MAP_PM_Containers_List_oms_1[] = { 0, 1 }; +static const ber_tlv_tag_t asn_DEF_PM_Containers_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_PM_Containers_List_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* performanceContainer */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* theRANContainer */ +}; +asn_SEQUENCE_specifics_t asn_SPC_PM_Containers_List_specs_1 = { + sizeof(struct PM_Containers_List), + offsetof(struct PM_Containers_List, _asn_ctx), + asn_MAP_PM_Containers_List_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_PM_Containers_List_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_PM_Containers_List = { + "PM-Containers-List", + "PM-Containers-List", + &asn_OP_SEQUENCE, + asn_DEF_PM_Containers_List_tags_1, + sizeof(asn_DEF_PM_Containers_List_tags_1) + /sizeof(asn_DEF_PM_Containers_List_tags_1[0]), /* 1 */ + asn_DEF_PM_Containers_List_tags_1, /* Same as above */ + sizeof(asn_DEF_PM_Containers_List_tags_1) + /sizeof(asn_DEF_PM_Containers_List_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_PM_Containers_List_1, + 2, /* Elements count */ + &asn_SPC_PM_Containers_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PerQCIReportListItem.c b/Bouncer/e2sm_kpm/lib/PerQCIReportListItem.c new file mode 100644 index 0000000..b420e15 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PerQCIReportListItem.c @@ -0,0 +1,171 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PerQCIReportListItem.h" + +static int +memb_qci_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_dl_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 100)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ul_PRBUsage_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 100)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_qci_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +static asn_per_constraints_t asn_PER_memb_qci_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { 1, 1 } /* (0..100) */, + -1}; +static asn_per_constraints_t asn_PER_memb_dl_PRBUsage_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 0, 100 } /* (0..100) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { 1, 1 } /* (0..100) */, + -1}; +static asn_per_constraints_t asn_PER_memb_ul_PRBUsage_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 0, 100 } /* (0..100) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_PerQCIReportListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PerQCIReportListItem, qci), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_qci_constr_2, &asn_PER_memb_qci_constr_2, memb_qci_constraint_1 }, + 0, 0, /* No default value */ + "qci" + }, + { ATF_POINTER, 2, offsetof(struct PerQCIReportListItem, dl_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_dl_PRBUsage_constr_3, &asn_PER_memb_dl_PRBUsage_constr_3, memb_dl_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "dl-PRBUsage" + }, + { ATF_POINTER, 1, offsetof(struct PerQCIReportListItem, ul_PRBUsage), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ul_PRBUsage_constr_4, &asn_PER_memb_ul_PRBUsage_constr_4, memb_ul_PRBUsage_constraint_1 }, + 0, 0, /* No default value */ + "ul-PRBUsage" + }, +}; +static const int asn_MAP_PerQCIReportListItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_PerQCIReportListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_PerQCIReportListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* qci */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dl-PRBUsage */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ul-PRBUsage */ +}; +asn_SEQUENCE_specifics_t asn_SPC_PerQCIReportListItem_specs_1 = { + sizeof(struct PerQCIReportListItem), + offsetof(struct PerQCIReportListItem, _asn_ctx), + asn_MAP_PerQCIReportListItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_PerQCIReportListItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_PerQCIReportListItem = { + "PerQCIReportListItem", + "PerQCIReportListItem", + &asn_OP_SEQUENCE, + asn_DEF_PerQCIReportListItem_tags_1, + sizeof(asn_DEF_PerQCIReportListItem_tags_1) + /sizeof(asn_DEF_PerQCIReportListItem_tags_1[0]), /* 1 */ + asn_DEF_PerQCIReportListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_PerQCIReportListItem_tags_1) + /sizeof(asn_DEF_PerQCIReportListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_PerQCIReportListItem_1, + 3, /* Elements count */ + &asn_SPC_PerQCIReportListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PerQCIReportListItemFormat.c b/Bouncer/e2sm_kpm/lib/PerQCIReportListItemFormat.c new file mode 100644 index 0000000..d95ad56 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PerQCIReportListItemFormat.c @@ -0,0 +1,183 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PerQCIReportListItemFormat.h" + +static int +memb_qci_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_pDCPBytesDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_pDCPBytesUL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 10000000000)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_qci_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +static asn_per_constraints_t asn_PER_memb_qci_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 34, -1, 0, 10000000000 } /* (0..10000000000,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_PerQCIReportListItemFormat_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PerQCIReportListItemFormat, qci), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_qci_constr_2, &asn_PER_memb_qci_constr_2, memb_qci_constraint_1 }, + 0, 0, /* No default value */ + "qci" + }, + { ATF_POINTER, 2, offsetof(struct PerQCIReportListItemFormat, pDCPBytesDL), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesDL_constr_3, &asn_PER_memb_pDCPBytesDL_constr_3, memb_pDCPBytesDL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesDL" + }, + { ATF_POINTER, 1, offsetof(struct PerQCIReportListItemFormat, pDCPBytesUL), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, + { &asn_OER_memb_pDCPBytesUL_constr_4, &asn_PER_memb_pDCPBytesUL_constr_4, memb_pDCPBytesUL_constraint_1 }, + 0, 0, /* No default value */ + "pDCPBytesUL" + }, +}; +static const int asn_MAP_PerQCIReportListItemFormat_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_PerQCIReportListItemFormat_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_PerQCIReportListItemFormat_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* qci */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pDCPBytesDL */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* pDCPBytesUL */ +}; +asn_SEQUENCE_specifics_t asn_SPC_PerQCIReportListItemFormat_specs_1 = { + sizeof(struct PerQCIReportListItemFormat), + offsetof(struct PerQCIReportListItemFormat, _asn_ctx), + asn_MAP_PerQCIReportListItemFormat_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_PerQCIReportListItemFormat_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_PerQCIReportListItemFormat = { + "PerQCIReportListItemFormat", + "PerQCIReportListItemFormat", + &asn_OP_SEQUENCE, + asn_DEF_PerQCIReportListItemFormat_tags_1, + sizeof(asn_DEF_PerQCIReportListItemFormat_tags_1) + /sizeof(asn_DEF_PerQCIReportListItemFormat_tags_1[0]), /* 1 */ + asn_DEF_PerQCIReportListItemFormat_tags_1, /* Same as above */ + sizeof(asn_DEF_PerQCIReportListItemFormat_tags_1) + /sizeof(asn_DEF_PerQCIReportListItemFormat_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_PerQCIReportListItemFormat_1, + 3, /* Elements count */ + &asn_SPC_PerQCIReportListItemFormat_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/PlmnID-List.c b/Bouncer/e2sm_kpm/lib/PlmnID-List.c new file mode 100644 index 0000000..210c424 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/PlmnID-List.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "PlmnID-List.h" + +#include "FGC-CUUP-PM-Format.h" +#include "EPC-CUUP-PM-Format.h" +asn_TYPE_member_t asn_MBR_PlmnID_List_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PlmnID_List, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_POINTER, 2, offsetof(struct PlmnID_List, cu_UP_PM_5GC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FGC_CUUP_PM_Format, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cu-UP-PM-5GC" + }, + { ATF_POINTER, 1, offsetof(struct PlmnID_List, cu_UP_PM_EPC), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EPC_CUUP_PM_Format, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cu-UP-PM-EPC" + }, +}; +static const int asn_MAP_PlmnID_List_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_PlmnID_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_PlmnID_List_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cu-UP-PM-5GC */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cu-UP-PM-EPC */ +}; +asn_SEQUENCE_specifics_t asn_SPC_PlmnID_List_specs_1 = { + sizeof(struct PlmnID_List), + offsetof(struct PlmnID_List, _asn_ctx), + asn_MAP_PlmnID_List_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_PlmnID_List_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_PlmnID_List = { + "PlmnID-List", + "PlmnID-List", + &asn_OP_SEQUENCE, + asn_DEF_PlmnID_List_tags_1, + sizeof(asn_DEF_PlmnID_List_tags_1) + /sizeof(asn_DEF_PlmnID_List_tags_1[0]), /* 1 */ + asn_DEF_PlmnID_List_tags_1, /* Same as above */ + sizeof(asn_DEF_PlmnID_List_tags_1) + /sizeof(asn_DEF_PlmnID_List_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_PlmnID_List_1, + 3, /* Elements count */ + &asn_SPC_PlmnID_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/asn1c_defs/PrintableString.c b/Bouncer/e2sm_kpm/lib/PrintableString.c similarity index 100% rename from Bouncer/asn1c_defs/PrintableString.c rename to Bouncer/e2sm_kpm/lib/PrintableString.c diff --git a/Bouncer/e2sm_kpm/lib/QCI.c b/Bouncer/e2sm_kpm/lib/QCI.c new file mode 100644 index 0000000..75e4c56 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/QCI.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "QCI.h" + +int +QCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_QCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_QCI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_QCI = { + "QCI", + "QCI", + &asn_OP_NativeInteger, + asn_DEF_QCI_tags_1, + sizeof(asn_DEF_QCI_tags_1) + /sizeof(asn_DEF_QCI_tags_1[0]), /* 1 */ + asn_DEF_QCI_tags_1, /* Same as above */ + sizeof(asn_DEF_QCI_tags_1) + /sizeof(asn_DEF_QCI_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_QCI_constr_1, QCI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/QoSID.c b/Bouncer/e2sm_kpm/lib/QoSID.c new file mode 100644 index 0000000..bae6079 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/QoSID.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "QoSID.h" + +static asn_per_constraints_t asn_PER_type_QoSID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_QoSID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct QoSID, choice.fiveGC), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FiveQI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveGC" + }, + { ATF_NOFLAGS, 0, offsetof(struct QoSID, choice.ePC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ePC" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_QoSID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveGC */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ePC */ +}; +static asn_CHOICE_specifics_t asn_SPC_QoSID_specs_1 = { + sizeof(struct QoSID), + offsetof(struct QoSID, _asn_ctx), + offsetof(struct QoSID, present), + sizeof(((struct QoSID *)0)->present), + asn_MAP_QoSID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_QoSID = { + "QoSID", + "QoSID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_QoSID_constr_1, CHOICE_constraint }, + asn_MBR_QoSID_1, + 2, /* Elements count */ + &asn_SPC_QoSID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/QosFlowIdentifier.c b/Bouncer/e2sm_kpm/lib/QosFlowIdentifier.c new file mode 100644 index 0000000..a24d12a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/QosFlowIdentifier.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "QosFlowIdentifier.h" + +int +QosFlowIdentifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 63)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_QosFlowIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 6, 6, 0, 63 } /* (0..63,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_QosFlowIdentifier_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_QosFlowIdentifier = { + "QosFlowIdentifier", + "QosFlowIdentifier", + &asn_OP_NativeInteger, + asn_DEF_QosFlowIdentifier_tags_1, + sizeof(asn_DEF_QosFlowIdentifier_tags_1) + /sizeof(asn_DEF_QosFlowIdentifier_tags_1[0]), /* 1 */ + asn_DEF_QosFlowIdentifier_tags_1, /* Same as above */ + sizeof(asn_DEF_QosFlowIdentifier_tags_1) + /sizeof(asn_DEF_QosFlowIdentifier_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_QosFlowIdentifier_constr_1, QosFlowIdentifier_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RAN-Container.c b/Bouncer/e2sm_kpm/lib/RAN-Container.c new file mode 100644 index 0000000..d0ee73f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RAN-Container.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RAN-Container.h" + +#include "DU-Usage-Report-Per-UE.h" +#include "CU-CP-Usage-Report-Per-UE.h" +#include "CU-UP-Usage-Report-Per-UE.h" +static asn_oer_constraints_t asn_OER_type_reportContainer_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_reportContainer_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_reportContainer_3[] = { + { ATF_POINTER, 0, offsetof(struct RAN_Container__reportContainer, choice.oDU_UE), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_DU_Usage_Report_Per_UE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oDU-UE" + }, + { ATF_POINTER, 0, offsetof(struct RAN_Container__reportContainer, choice.oCU_CP_UE), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CU_CP_Usage_Report_Per_UE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oCU-CP-UE" + }, + { ATF_POINTER, 0, offsetof(struct RAN_Container__reportContainer, choice.oCU_UP_UE), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CU_UP_Usage_Report_Per_UE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "oCU-UP-UE" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_reportContainer_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* oDU-UE */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* oCU-CP-UE */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* oCU-UP-UE */ +}; +static asn_CHOICE_specifics_t asn_SPC_reportContainer_specs_3 = { + sizeof(struct RAN_Container__reportContainer), + offsetof(struct RAN_Container__reportContainer, _asn_ctx), + offsetof(struct RAN_Container__reportContainer, present), + sizeof(((struct RAN_Container__reportContainer *)0)->present), + asn_MAP_reportContainer_tag2el_3, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_reportContainer_3 = { + "reportContainer", + "reportContainer", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_reportContainer_constr_3, &asn_PER_type_reportContainer_constr_3, CHOICE_constraint }, + asn_MBR_reportContainer_3, + 3, /* Elements count */ + &asn_SPC_reportContainer_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RAN_Container_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RAN_Container, timestamp), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Timestamp, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "timestamp" + }, + { ATF_NOFLAGS, 0, offsetof(struct RAN_Container, reportContainer), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_reportContainer_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "reportContainer" + }, +}; +static const ber_tlv_tag_t asn_DEF_RAN_Container_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RAN_Container_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* timestamp */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* reportContainer */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RAN_Container_specs_1 = { + sizeof(struct RAN_Container), + offsetof(struct RAN_Container, _asn_ctx), + asn_MAP_RAN_Container_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RAN_Container = { + "RAN-Container", + "RAN-Container", + &asn_OP_SEQUENCE, + asn_DEF_RAN_Container_tags_1, + sizeof(asn_DEF_RAN_Container_tags_1) + /sizeof(asn_DEF_RAN_Container_tags_1[0]), /* 1 */ + asn_DEF_RAN_Container_tags_1, /* Same as above */ + sizeof(asn_DEF_RAN_Container_tags_1) + /sizeof(asn_DEF_RAN_Container_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RAN_Container_1, + 2, /* Elements count */ + &asn_SPC_RAN_Container_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RANUEID.c b/Bouncer/e2sm_kpm/lib/RANUEID.c new file mode 100644 index 0000000..11bbdfe --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RANUEID.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RANUEID.h" + +int +RANUEID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 8)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_RANUEID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RANUEID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANUEID = { + "RANUEID", + "RANUEID", + &asn_OP_OCTET_STRING, + asn_DEF_RANUEID_tags_1, + sizeof(asn_DEF_RANUEID_tags_1) + /sizeof(asn_DEF_RANUEID_tags_1[0]), /* 1 */ + asn_DEF_RANUEID_tags_1, /* Same as above */ + sizeof(asn_DEF_RANUEID_tags_1) + /sizeof(asn_DEF_RANUEID_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_RANUEID_constr_1, RANUEID_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RANcallProcess-ID-string.c b/Bouncer/e2sm_kpm/lib/RANcallProcess-ID-string.c new file mode 100644 index 0000000..b49b812 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RANcallProcess-ID-string.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANcallProcess-ID-string.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RANcallProcess_ID_string_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RANcallProcess_ID_string_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RANcallProcess_ID_string_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RANcallProcess_ID_string_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_type_RANcallProcess_ID_string_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RANcallProcess_ID_string_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RANcallProcess_ID_string_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RANcallProcess_ID_string_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANcallProcess_ID_string = { + "RANcallProcess-ID-string", + "RANcallProcess-ID-string", + &asn_OP_PrintableString, + asn_DEF_RANcallProcess_ID_string_tags_1, + sizeof(asn_DEF_RANcallProcess_ID_string_tags_1) + /sizeof(asn_DEF_RANcallProcess_ID_string_tags_1[0]), /* 1 */ + asn_DEF_RANcallProcess_ID_string_tags_1, /* Same as above */ + sizeof(asn_DEF_RANcallProcess_ID_string_tags_1) + /sizeof(asn_DEF_RANcallProcess_ID_string_tags_1[0]), /* 1 */ + { &asn_OER_type_RANcallProcess_ID_string_constr_1, &asn_PER_type_RANcallProcess_ID_string_constr_1, RANcallProcess_ID_string_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RANfunction-Name.c b/Bouncer/e2sm_kpm/lib/RANfunction-Name.c new file mode 100644 index 0000000..cc349e4 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RANfunction-Name.c @@ -0,0 +1,307 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RANfunction-Name.h" + +static const int permitted_alphabet_table_2[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_2[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_2(const void *sptr) { + const int *table = permitted_alphabet_table_2; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static const int permitted_alphabet_table_3[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_3[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_3(const void *sptr) { + const int *table = permitted_alphabet_table_3; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static const int permitted_alphabet_table_4[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_4[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_4(const void *sptr) { + const int *table = permitted_alphabet_table_4; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static int +memb_ranFunction_ShortName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_2(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_ranFunction_ShortName_2_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_2)/sizeof(permitted_alphabet_table_2[0])) + return -1; + return permitted_alphabet_table_2[value] - 1; +} +static int asn_PER_MAP_ranFunction_ShortName_2_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_2)/sizeof(permitted_alphabet_code2value_2[0])) + return -1; + return permitted_alphabet_code2value_2[code]; +} +static int +memb_ranFunction_E2SM_OID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 1000) + && !check_permitted_alphabet_3(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_ranFunction_E2SM_OID_3_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_3)/sizeof(permitted_alphabet_table_3[0])) + return -1; + return permitted_alphabet_table_3[value] - 1; +} +static int asn_PER_MAP_ranFunction_E2SM_OID_3_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_3)/sizeof(permitted_alphabet_code2value_3[0])) + return -1; + return permitted_alphabet_code2value_3[code]; +} +static int +memb_ranFunction_Description_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_4(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_ranFunction_Description_4_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_4)/sizeof(permitted_alphabet_table_4[0])) + return -1; + return permitted_alphabet_table_4[value] - 1; +} +static int asn_PER_MAP_ranFunction_Description_4_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_4)/sizeof(permitted_alphabet_code2value_4[0])) + return -1; + return permitted_alphabet_code2value_4[code]; +} +static asn_per_constraints_t asn_PER_memb_ranFunction_ShortName_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_ranFunction_ShortName_2_v2c, /* Value to PER code map */ + asn_PER_MAP_ranFunction_ShortName_2_c2v /* PER code to value map */ +}; +static asn_per_constraints_t asn_PER_memb_ranFunction_E2SM_OID_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1000 } /* (SIZE(1..1000,...)) */, + asn_PER_MAP_ranFunction_E2SM_OID_3_v2c, /* Value to PER code map */ + asn_PER_MAP_ranFunction_E2SM_OID_3_c2v /* PER code to value map */ +}; +static asn_per_constraints_t asn_PER_memb_ranFunction_Description_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_ranFunction_Description_4_v2c, /* Value to PER code map */ + asn_PER_MAP_ranFunction_Description_4_c2v /* PER code to value map */ +}; +asn_TYPE_member_t asn_MBR_RANfunction_Name_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Name, ranFunction_ShortName), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, &asn_PER_memb_ranFunction_ShortName_constr_2, memb_ranFunction_ShortName_constraint_1 }, + 0, 0, /* No default value */ + "ranFunction-ShortName" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Name, ranFunction_E2SM_OID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, &asn_PER_memb_ranFunction_E2SM_OID_constr_3, memb_ranFunction_E2SM_OID_constraint_1 }, + 0, 0, /* No default value */ + "ranFunction-E2SM-OID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Name, ranFunction_Description), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, &asn_PER_memb_ranFunction_Description_constr_4, memb_ranFunction_Description_constraint_1 }, + 0, 0, /* No default value */ + "ranFunction-Description" + }, + { ATF_POINTER, 1, offsetof(struct RANfunction_Name, ranFunction_Instance), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunction-Instance" + }, +}; +static const int asn_MAP_RANfunction_Name_oms_1[] = { 3 }; +static const ber_tlv_tag_t asn_DEF_RANfunction_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunction_Name_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunction-ShortName */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranFunction-E2SM-OID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranFunction-Description */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ranFunction-Instance */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Name_specs_1 = { + sizeof(struct RANfunction_Name), + offsetof(struct RANfunction_Name, _asn_ctx), + asn_MAP_RANfunction_Name_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_RANfunction_Name_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunction_Name = { + "RANfunction-Name", + "RANfunction-Name", + &asn_OP_SEQUENCE, + asn_DEF_RANfunction_Name_tags_1, + sizeof(asn_DEF_RANfunction_Name_tags_1) + /sizeof(asn_DEF_RANfunction_Name_tags_1[0]), /* 1 */ + asn_DEF_RANfunction_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunction_Name_tags_1) + /sizeof(asn_DEF_RANfunction_Name_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunction_Name_1, + 4, /* Elements count */ + &asn_SPC_RANfunction_Name_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/REAL.c b/Bouncer/e2sm_kpm/lib/REAL.c new file mode 100644 index 0000000..e3daf37 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/REAL.c @@ -0,0 +1,1028 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#define _ISOC99_SOURCE /* For ilogb() and quiet NAN */ +#ifndef _BSD_SOURCE +#define _BSD_SOURCE /* To reintroduce finite(3) */ +#endif +#include +#if defined(__alpha) +#include /* For INFINITY */ +#endif +#include /* for strtod(3) */ +#include +#include +#include +#include +#include + +#undef INT_MAX +#define INT_MAX ((int)(((unsigned int)-1) >> 1)) + +#if !(defined(NAN) || defined(INFINITY)) +static volatile double real_zero CC_NOTUSED = 0.0; +#endif +#ifndef NAN +#define NAN (0.0/0.0) +#endif +#ifndef INFINITY +#define INFINITY (1.0/0.0) +#endif + +#if defined(__clang__) +/* + * isnan() is defined using generic selections and won't compile in + * strict C89 mode because of too fancy system's standard library. + * However, prior to C11 the math had a perfectly working isnan() + * in the math library. + * Disable generic selection warning so we can test C89 mode with newer libc. + */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc11-extensions" +static int asn_isnan(double d) { + return isnan(d); +} +static int asn_isfinite(double d) { +#ifdef isfinite + return isfinite(d); /* ISO C99 */ +#else + return finite(d); /* Deprecated on Mac OS X 10.9 */ +#endif +} +#pragma clang diagnostic pop +#else /* !clang */ +#define asn_isnan(v) isnan(v) +#ifdef isfinite +#define asn_isfinite(d) isfinite(d) /* ISO C99 */ +#else +#define asn_isfinite(d) finite(d) /* Deprecated on Mac OS X 10.9 */ +#endif +#endif /* clang */ + +/* + * REAL basic type description. + */ +static const ber_tlv_tag_t asn_DEF_REAL_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) +}; +asn_TYPE_operation_t asn_OP_REAL = { + ASN__PRIMITIVE_TYPE_free, + REAL_print, + REAL_compare, + ber_decode_primitive, + der_encode_primitive, + REAL_decode_xer, + REAL_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + REAL_decode_oer, + REAL_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + REAL_decode_uper, + REAL_encode_uper, + REAL_decode_aper, + REAL_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + REAL_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_REAL = { + "REAL", + "REAL", + &asn_OP_REAL, + asn_DEF_REAL_tags, + sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]), + asn_DEF_REAL_tags, /* Same as above */ + sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, + 0, /* No members */ + 0 /* No specifics */ +}; + +typedef enum specialRealValue { + SRV__NOT_A_NUMBER, + SRV__MINUS_INFINITY, + SRV__PLUS_INFINITY +} specialRealValue_e; +static struct specialRealValue_s { + char *string; + size_t length; + long dv; +} specialRealValue[] = { +#define SRV_SET(foo, val) { foo, sizeof(foo) - 1, val } + SRV_SET("", 0), + SRV_SET("", -1), + SRV_SET("", 1), +#undef SRV_SET +}; + +ssize_t +REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key) { + char local_buf[64]; + char *buf = local_buf; + ssize_t buflen = sizeof(local_buf); + const char *fmt = canonical ? "%.17E" /* Precise */ : "%.15f" /* Pleasant*/; + ssize_t ret; + + /* + * Check whether it is a special value. + */ + /* fpclassify(3) is not portable yet */ + if(asn_isnan(d)) { + buf = specialRealValue[SRV__NOT_A_NUMBER].string; + buflen = specialRealValue[SRV__NOT_A_NUMBER].length; + return (cb(buf, buflen, app_key) < 0) ? -1 : buflen; + } else if(!asn_isfinite(d)) { + if(copysign(1.0, d) < 0.0) { + buf = specialRealValue[SRV__MINUS_INFINITY].string; + buflen = specialRealValue[SRV__MINUS_INFINITY].length; + } else { + buf = specialRealValue[SRV__PLUS_INFINITY].string; + buflen = specialRealValue[SRV__PLUS_INFINITY].length; + } + return (cb(buf, buflen, app_key) < 0) ? -1 : buflen; + } else if(ilogb(d) <= -INT_MAX) { + if(copysign(1.0, d) < 0.0) { + buf = "-0"; + buflen = 2; + } else { + buf = "0"; + buflen = 1; + } + return (cb(buf, buflen, app_key) < 0) ? -1 : buflen; + } + + /* + * Use the libc's double printing, hopefully they got it right. + */ + do { + ret = snprintf(buf, buflen, fmt, d); + if(ret < 0) { + /* There are some old broken APIs. */ + buflen <<= 1; + if(buflen > 4096) { + /* Should be plenty. */ + if(buf != local_buf) FREEMEM(buf); + return -1; + } + } else if(ret >= buflen) { + buflen = ret + 1; + } else { + buflen = ret; + break; + } + if(buf != local_buf) FREEMEM(buf); + buf = (char *)MALLOC(buflen); + if(!buf) return -1; + } while(1); + + if(canonical) { + /* + * Transform the "[-]d.dddE+-dd" output into "[-]d.dddE[-]d" + * Check that snprintf() constructed the output correctly. + */ + char *dot; + char *end = buf + buflen; + char *last_zero; + char *first_zero_in_run; + char *s; + + enum { + LZSTATE_NOTHING, + LZSTATE_ZEROES + } lz_state = LZSTATE_NOTHING; + + dot = (buf[0] == 0x2d /* '-' */) ? (buf + 2) : (buf + 1); + if(*dot >= 0x30) { + if(buf != local_buf) FREEMEM(buf); + errno = EINVAL; + return -1; /* Not a dot, really */ + } + *dot = 0x2e; /* Replace possible comma */ + + for(first_zero_in_run = last_zero = s = dot + 2; s < end; s++) { + switch(*s) { + case 0x45: /* 'E' */ + if(lz_state == LZSTATE_ZEROES) last_zero = first_zero_in_run; + break; + case 0x30: /* '0' */ + if(lz_state == LZSTATE_NOTHING) first_zero_in_run = s; + lz_state = LZSTATE_ZEROES; + continue; + default: + lz_state = LZSTATE_NOTHING; + continue; + } + break; + } + + if(s == end) { + if(buf != local_buf) FREEMEM(buf); + errno = EINVAL; + return -1; /* No promised E */ + } + + assert(*s == 0x45); + { + char *E = s; + char *expptr = ++E; + char *s = expptr; + int sign; + + if(*expptr == 0x2b /* '+' */) { + /* Skip the "+" */ + buflen -= 1; + sign = 0; + } else { + sign = 1; + s++; + } + expptr++; + if(expptr > end) { + if(buf != local_buf) FREEMEM(buf); + errno = EINVAL; + return -1; + } + if(*expptr == 0x30) { + buflen--; + expptr++; + } + if(lz_state == LZSTATE_ZEROES) { + *last_zero = 0x45; /* E */ + buflen -= s - (last_zero + 1); + s = last_zero + 1; + if(sign) { + *s++ = 0x2d /* '-' */; + buflen++; + } + } + for(; expptr <= end; s++, expptr++) + *s = *expptr; + } + } else { + /* + * Remove trailing zeros. + */ + char *end = buf + buflen; + char *last_zero = end; + int stoplooking = 0; + char *z; + for(z = end - 1; z > buf; z--) { + switch(*z) { + case 0x30: + if(!stoplooking) + last_zero = z; + continue; + case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + stoplooking = 1; + continue; + default: /* Catch dot and other separators */ + /* + * Replace possible comma (which may even + * be not a comma at all: locale-defined). + */ + *z = 0x2e; + if(last_zero == z + 1) { /* leave x.0 */ + last_zero++; + } + buflen = last_zero - buf; + *last_zero = '\0'; + break; + } + break; + } + } + + ret = cb(buf, buflen, app_key); + if(buf != local_buf) FREEMEM(buf); + return (ret < 0) ? -1 : buflen; +} + +int +REAL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + ssize_t ret; + double d; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(!st || !st->buf) + ret = cb("", 8, app_key); + else if(asn_REAL2double(st, &d)) + ret = cb("", 7, app_key); + else + ret = REAL__dump(d, 0, cb, app_key); + + return (ret < 0) ? -1 : 0; +} + +int +REAL_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const REAL_t *a = aptr; + const REAL_t *b = bptr; + + (void)td; + + if(a && b) { + double adbl, bdbl; + int ra, rb; + ra = asn_REAL2double(a, &adbl); + rb = asn_REAL2double(b, &bdbl); + if(ra == 0 && rb == 0) { + if(asn_isnan(adbl)) { + if(asn_isnan(bdbl)) { + return 0; + } else { + return -1; + } + } else if(asn_isnan(bdbl)) { + return 1; + } + /* Value comparison. */ + if(adbl < bdbl) { + return -1; + } else if(adbl > bdbl) { + return 1; + } else { + return 0; + } + } else if(ra) { + return -1; + } else { + return 1; + } + } else if(!a) { + return -1; + } else { + return 1; + } +} + +asn_enc_rval_t +REAL_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + double d; + + (void)ilevel; + + if(!st || !st->buf || asn_REAL2double(st, &d)) + ASN__ENCODE_FAILED; + + er.encoded = REAL__dump(d, flags & XER_F_CANONICAL, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + + +/* + * Decode the chunk of XML text encoding REAL. + */ +static enum xer_pbd_rval +REAL__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + REAL_t *st = (REAL_t *)sptr; + double value; + const char *xerdata = (const char *)chunk_buf; + char *endptr = 0; + char *b; + + (void)td; + + if(!chunk_size) return XPBD_BROKEN_ENCODING; + + /* + * Decode an XMLSpecialRealValue: , etc. + */ + if(xerdata[0] == 0x3c /* '<' */) { + size_t i; + for(i = 0; i < sizeof(specialRealValue) + / sizeof(specialRealValue[0]); i++) { + struct specialRealValue_s *srv = &specialRealValue[i]; + double dv; + + if(srv->length != chunk_size + || memcmp(srv->string, chunk_buf, chunk_size)) + continue; + + /* + * It could've been done using + * (double)srv->dv / real_zero, + * but it summons fp exception on some platforms. + */ + switch(srv->dv) { + case -1: dv = - INFINITY; break; + case 0: dv = NAN; break; + case 1: dv = INFINITY; break; + default: return XPBD_SYSTEM_FAILURE; + } + + if(asn_double2REAL(st, dv)) + return XPBD_SYSTEM_FAILURE; + + return XPBD_BODY_CONSUMED; + } + ASN_DEBUG("Unknown XMLSpecialRealValue"); + return XPBD_BROKEN_ENCODING; + } + + /* + * Copy chunk into the nul-terminated string, and run strtod. + */ + b = (char *)MALLOC(chunk_size + 1); + if(!b) return XPBD_SYSTEM_FAILURE; + memcpy(b, chunk_buf, chunk_size); + b[chunk_size] = 0; /* nul-terminate */ + + value = strtod(b, &endptr); + FREEMEM(b); + if(endptr == b) return XPBD_BROKEN_ENCODING; + + if(asn_double2REAL(st, value)) + return XPBD_SYSTEM_FAILURE; + + return XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +REAL_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + return xer_decode_primitive(opt_codec_ctx, td, + sptr, sizeof(REAL_t), opt_mname, + buf_ptr, size, REAL__xer_body_decode); +} + +int +asn_REAL2double(const REAL_t *st, double *dbl_value) { + unsigned int octv; + + if(!st || !st->buf) { + errno = EINVAL; + return -1; + } + + if(st->size == 0) { + *dbl_value = 0; + return 0; + } + + octv = st->buf[0]; /* unsigned byte */ + + switch(octv & 0xC0) { + case 0x40: /* X.690: 8.5.6 a) => 8.5.9 */ + /* "SpecialRealValue" */ + + /* Be liberal in what you accept... + * http://en.wikipedia.org/wiki/Robustness_principle + if(st->size != 1) ... + */ + + switch(st->buf[0]) { + case 0x40: /* 01000000: PLUS-INFINITY */ + *dbl_value = INFINITY; + return 0; + case 0x41: /* 01000001: MINUS-INFINITY */ + *dbl_value = - INFINITY; + return 0; + case 0x42: /* 01000010: NOT-A-NUMBER */ + *dbl_value = NAN; + return 0; + case 0x43: /* 01000011: minus zero */ + *dbl_value = -0.0; + return 0; + } + + errno = EINVAL; + return -1; + case 0x00: { /* X.690: 8.5.7 */ + /* + * Decimal. NR{1,2,3} format from ISO 6093. + * NR1: [ ]*[+-]?[0-9]+ + * NR2: [ ]*[+-]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+) + * NR3: [ ]*[+-]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)[Ee][+-]?[0-9]+ + */ + double d; + char *source = 0; + char *endptr; + int used_malloc = 0; + + if(octv == 0 || (octv & 0x3C)) { + /* Remaining values of bits 6 to 1 are Reserved. */ + errno = EINVAL; + return -1; + } + + /* 1. By contract, an input buffer should be '\0'-terminated. + * OCTET STRING decoder ensures that, as is asn_double2REAL(). + * 2. ISO 6093 specifies COMMA as a possible decimal separator. + * However, strtod() can't always deal with COMMA. + * So her we fix both by reallocating, copying and fixing. + */ + if(st->buf[st->size] != '\0' || memchr(st->buf, ',', st->size)) { + const uint8_t *p, *end; + char *b; + + b = source = (char *)MALLOC(st->size + 1); + if(!source) return -1; + used_malloc = 1; + + /* Copy without the first byte and with 0-termination */ + for(p = st->buf + 1, end = st->buf + st->size; + p < end; b++, p++) + *b = (*p == ',') ? '.' : *p; + *b = '\0'; + } else { + source = (char *)&st->buf[1]; + } + + endptr = source; + d = strtod(source, &endptr); + if(*endptr != '\0') { + /* Format is not consistent with ISO 6093 */ + if(used_malloc) FREEMEM(source); + errno = EINVAL; + return -1; + } + if(used_malloc) FREEMEM(source); + if(asn_isfinite(d)) { + *dbl_value = d; + return 0; + } else { + errno = ERANGE; + return -1; + } + } + } + + /* + * Binary representation. + */ + { + double m; + int32_t expval; /* exponent value */ + unsigned int elen; /* exponent value length, in octets */ + int scaleF; + int baseF; + uint8_t *ptr; + uint8_t *end; + int sign; + + switch((octv & 0x30) >> 4) { + case 0x00: baseF = 1; break; /* base 2 */ + case 0x01: baseF = 3; break; /* base 8 */ + case 0x02: baseF = 4; break; /* base 16 */ + default: + /* Reserved field, can't parse now. */ + errno = EINVAL; + return -1; + } + + sign = (octv & 0x40); /* bit 7 */ + scaleF = (octv & 0x0C) >> 2; /* bits 4 to 3 */ + + if(st->size <= 1 + (octv & 0x03)) { + errno = EINVAL; + return -1; + } + + elen = (octv & 0x03); /* bits 2 to 1; 8.5.6.4 */ + if(elen == 0x03) { /* bits 2 to 1 = 11; 8.5.6.4, case d) */ + elen = st->buf[1]; /* unsigned binary number */ + if(elen == 0 || st->size <= (2 + elen)) { + errno = EINVAL; + return -1; + } + /* FIXME: verify constraints of case d) */ + ptr = &st->buf[2]; + } else { + ptr = &st->buf[1]; + } + + /* Fetch the multibyte exponent */ + expval = (int)(*(int8_t *)ptr); + if(elen >= sizeof(expval)-1) { + errno = ERANGE; + return -1; + } + end = ptr + elen + 1; + for(ptr++; ptr < end; ptr++) + expval = (expval * 256) + *ptr; + + m = 0.0; /* Initial mantissa value */ + + /* Okay, the exponent is here. Now, what about mantissa? */ + end = st->buf + st->size; + for(; ptr < end; ptr++) + m = ldexp(m, 8) + *ptr; + + if(0) + ASN_DEBUG("m=%.10f, scF=%d, bF=%d, expval=%d, ldexp()=%f, ldexp()=%f\n", + m, scaleF, baseF, expval, + ldexp(m, expval * baseF + scaleF), + ldexp(m, scaleF) * pow(pow(2, baseF), expval) + ); + + /* + * (S * N * 2^F) * B^E + * Essentially: + m = ldexp(m, scaleF) * pow(pow(2, baseF), expval); + */ + m = ldexp(m, expval * baseF + scaleF); + if(asn_isfinite(m)) { + *dbl_value = sign ? -m : m; + } else { + errno = ERANGE; + return -1; + } + + } /* if(binary_format) */ + + return 0; +} + +/* + * Assume IEEE 754 floating point: standard 64 bit double. + * [1 bit sign] [11 bits exponent] [52 bits mantissa] + */ +int +asn_double2REAL(REAL_t *st, double dbl_value) { + double test = -0.0; + int float_big_endian = *(const char *)&test != 0; + uint8_t buf[16]; /* More than enough for 8-byte dbl_value */ + uint8_t dscr[sizeof(dbl_value)]; /* double value scratch pad */ + /* Assertion guards: won't even compile, if unexpected double size */ + char assertion_buffer1[9 - sizeof(dbl_value)] CC_NOTUSED; + char assertion_buffer2[sizeof(dbl_value) - 7] CC_NOTUSED; + uint8_t *ptr = buf; + uint8_t *mstop; /* Last byte of mantissa */ + unsigned int mval; /* Value of the last byte of mantissa */ + unsigned int bmsign; /* binary mask with sign */ + unsigned int buflen; + unsigned int accum; + int expval; + + if(!st) { + errno = EINVAL; + return -1; + } + + /* + * ilogb(+-0) returns -INT_MAX or INT_MIN (platform-dependent) + * ilogb(+-inf) returns INT_MAX, logb(+-inf) returns +inf + * ilogb(NaN) returns INT_MIN or INT_MAX (platform-dependent) + */ + expval = ilogb(dbl_value); + if(expval <= -INT_MAX /* Also catches +-0 and maybe isnan() */ + || expval == INT_MAX /* catches isfin() and maybe isnan() */ + ) { + if(!st->buf || st->size < 2) { + ptr = (uint8_t *)MALLOC(2); + if(!ptr) return -1; + if(st->buf) FREEMEM(st->buf); + st->buf = ptr; + } + /* fpclassify(3) is not portable yet */ + if(asn_isnan(dbl_value)) { + st->buf[0] = 0x42; /* NaN */ + st->buf[1] = 0; + st->size = 1; + } else if(!asn_isfinite(dbl_value)) { + if(copysign(1.0, dbl_value) < 0.0) { + st->buf[0] = 0x41; /* MINUS-INFINITY */ + } else { + st->buf[0] = 0x40; /* PLUS-INFINITY */ + } + st->buf[1] = 0; + st->size = 1; + } else { + if(copysign(1.0, dbl_value) >= 0.0) { + /* no content octets: positive zero */ + st->buf[0] = 0; /* JIC */ + st->size = 0; + } else { + /* Negative zero. #8.5.3, 8.5.9 */ + st->buf[0] = 0x43; + st->buf[1] = 0; + st->size = 1; + } + } + return 0; + } + + if(float_big_endian) { + uint8_t *s = ((uint8_t *)&dbl_value) + 1; + uint8_t *end = ((uint8_t *)&dbl_value) + sizeof(double); + uint8_t *d; + + bmsign = 0x80 | ((s[-1] >> 1) & 0x40); /* binary mask & - */ + for(mstop = d = dscr; s < end; d++, s++) { + *d = *s; + if(*d) mstop = d; + } + } else { + uint8_t *s = ((uint8_t *)&dbl_value) + sizeof(dbl_value) - 2; + uint8_t *start = ((uint8_t *)&dbl_value); + uint8_t *d; + + bmsign = 0x80 | ((s[1] >> 1) & 0x40); /* binary mask & - */ + for(mstop = d = dscr; s >= start; d++, s--) { + *d = *s; + if(*d) mstop = d; + } + } + + /* Remove parts of the exponent, leave mantissa and explicit 1. */ + dscr[0] = 0x10 | (dscr[0] & 0x0f); + + /* Adjust exponent in a very unobvious way */ + expval -= 8 * ((mstop - dscr) + 1) - 4; + + /* This loop ensures DER conformance by forcing mantissa odd: 11.3.1 */ + mval = *mstop; + if(mval && !(mval & 1)) { + int shift_count = 1; + int ishift; + uint8_t *mptr; + + /* + * Figure out what needs to be done to make mantissa odd. + */ + if(!(mval & 0x0f)) /* Speed-up a little */ + shift_count = 4; + while(((mval >> shift_count) & 1) == 0) + shift_count++; + + ishift = 8 - shift_count; + accum = 0; + + /* Go over the buffer, shifting it shift_count bits right. */ + for(mptr = dscr; mptr <= mstop; mptr++) { + mval = *mptr; + *mptr = accum | (mval >> shift_count); + accum = mval << ishift; + } + + /* Adjust exponent appropriately. */ + expval += shift_count; + } + + if(expval < 0) { + if((expval >> 7) == -1) { + *ptr++ = bmsign | 0x00; + *ptr++ = expval; + } else if((expval >> 15) == -1) { + *ptr++ = bmsign | 0x01; + *ptr++ = expval >> 8; + *ptr++ = expval; + } else { + *ptr++ = bmsign | 0x02; + *ptr++ = expval >> 16; + *ptr++ = expval >> 8; + *ptr++ = expval; + } + } else if(expval <= 0x7f) { + *ptr++ = bmsign | 0x00; + *ptr++ = expval; + } else if(expval <= 0x7fff) { + *ptr++ = bmsign | 0x01; + *ptr++ = expval >> 8; + *ptr++ = expval; + } else { + assert(expval <= 0x7fffff); + *ptr++ = bmsign | 0x02; + *ptr++ = expval >> 16; + *ptr++ = expval >> 8; + *ptr++ = expval; + } + + buflen = (mstop - dscr) + 1; + memcpy(ptr, dscr, buflen); + ptr += buflen; + buflen = ptr - buf; + + ptr = (uint8_t *)MALLOC(buflen + 1); + if(!ptr) return -1; + + memcpy(ptr, buf, buflen); + buf[buflen] = 0; /* JIC */ + + if(st->buf) FREEMEM(st->buf); + st->buf = ptr; + st->size = buflen; + + return 0; +} + +int CC_ATTR_NO_SANITIZE("float-cast-overflow") +asn_double2float(double d, float *outcome) { + float f = d; + + *outcome = f; + + if(asn_isfinite(d) == asn_isfinite(f)) { + return 0; + } else { + return -1; + } +} + +#ifndef ASN_DISABLE_OER_SUPPORT + +/* + * Encode as Canonical OER + */ +asn_enc_rval_t +REAL_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const REAL_t *st = sptr; + asn_enc_rval_t er = {0,0,0}; + ssize_t len_len; + + if(!st || !st->buf || !td) + ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* If we're constrained to a narrow float/double representation, we + * shouldn't have ended up using REAL. Expecting NativeReal. */ + ASN__ENCODE_FAILED; + } + + /* Encode a fake REAL */ + len_len = oer_serialize_length(st->size, cb, app_key); + if(len_len < 0 || cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + er.encoded = len_len + st->size; + ASN__ENCODED_OK(er); + } +} + +asn_dec_rval_t +REAL_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + asn_dec_rval_t ok = {RC_OK, 0}; + REAL_t *st; + uint8_t *buf; + ssize_t len_len; + size_t real_body_len; + + (void)opt_codec_ctx; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* If we're constrained to a narrow float/double representation, we + * shouldn't have ended up using REAL. Expecting NativeReal. */ + ASN__DECODE_FAILED; + } + + len_len = oer_fetch_length(ptr, size, &real_body_len); + if(len_len < 0) ASN__DECODE_FAILED; + if(len_len == 0) ASN__DECODE_STARVED; + + ptr = (const char *)ptr + len_len; + size -= len_len; + + if(real_body_len > size) ASN__DECODE_STARVED; + + buf = CALLOC(1, real_body_len + 1); + if(!buf) ASN__DECODE_FAILED; + + if(!(st = *sptr)) { + st = (*sptr = CALLOC(1, sizeof(REAL_t))); + if(!st) { + FREEMEM(buf); + ASN__DECODE_FAILED; + } + } else { + FREEMEM(st->buf); + } + + memcpy(buf, ptr, real_body_len); + buf[real_body_len] = '\0'; + + st->buf = buf; + st->size = real_body_len; + + ok.consumed = len_len + real_body_len; + return ok; +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +REAL_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_decode_uper(opt_codec_ctx, td, 0, sptr, pd); +} + +asn_enc_rval_t +REAL_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_encode_uper(td, 0, sptr, po); +} + +asn_dec_rval_t +REAL_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_decode_aper(opt_codec_ctx, td, 0, sptr, pd); +} + +asn_enc_rval_t +REAL_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_encode_aper(td, 0, sptr, po); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +asn_random_fill_result_t +REAL_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + static const double values[] = { + 0, -0.0, -1, 1, -M_E, M_E, -3.14, 3.14, -M_PI, M_PI, -255, 255, + /* 2^51 */ + -2251799813685248.0, 2251799813685248.0, + /* 2^52 */ + -4503599627370496.0, 4503599627370496.0, + /* 2^100 */ + -1267650600228229401496703205376.0, 1267650600228229401496703205376.0, + -FLT_MIN, FLT_MIN, + -FLT_MAX, FLT_MAX, + -DBL_MIN, DBL_MIN, + -DBL_MAX, DBL_MAX, +#ifdef FLT_TRUE_MIN + -FLT_TRUE_MIN, FLT_TRUE_MIN, +#endif +#ifdef DBL_TRUE_MIN + -DBL_TRUE_MIN, DBL_TRUE_MIN, +#endif + INFINITY, -INFINITY, NAN}; + REAL_t *st; + double d; + + (void)constraints; + + if(max_length == 0) return result_skipped; + + d = values[asn_random_between(0, sizeof(values) / sizeof(values[0]) - 1)]; + + if(*sptr) { + st = *sptr; + } else { + st = (REAL_t*)(*sptr = CALLOC(1, sizeof(REAL_t))); + if(!st) { + return result_failed; + } + } + + if(asn_double2REAL(st, d)) { + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + return result_failed; + } + + result_ok.length = st->size; + return result_ok; +} + diff --git a/Bouncer/e2sm_kpm/lib/RELATIVE-OID.c b/Bouncer/e2sm_kpm/lib/RELATIVE-OID.c new file mode 100644 index 0000000..300dc1a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RELATIVE-OID.c @@ -0,0 +1,336 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include /* Encoder and decoder of a primitive type */ +#include /* for CHAR_BIT */ +#include + +/* + * RELATIVE-OID basic type description. + */ +static const ber_tlv_tag_t asn_DEF_RELATIVE_OID_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)) +}; +asn_TYPE_operation_t asn_OP_RELATIVE_OID = { + ASN__PRIMITIVE_TYPE_free, + RELATIVE_OID_print, + OCTET_STRING_compare, /* Implemented in terms of opaque comparison */ + ber_decode_primitive, + der_encode_primitive, + RELATIVE_OID_decode_xer, + RELATIVE_OID_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + RELATIVE_OID_decode_oer, + RELATIVE_OID_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + RELATIVE_OID_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = { + "RELATIVE-OID", + "RELATIVE_OID", + &asn_OP_RELATIVE_OID, + asn_DEF_RELATIVE_OID_tags, + sizeof(asn_DEF_RELATIVE_OID_tags) + / sizeof(asn_DEF_RELATIVE_OID_tags[0]), + asn_DEF_RELATIVE_OID_tags, /* Same as above */ + sizeof(asn_DEF_RELATIVE_OID_tags) + / sizeof(asn_DEF_RELATIVE_OID_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +static ssize_t +RELATIVE_OID__dump_body(const RELATIVE_OID_t *st, asn_app_consume_bytes_f *cb, void *app_key) { + char scratch[32]; + size_t produced = 0; + size_t off = 0; + + for(;;) { + asn_oid_arc_t arc; + ssize_t rd = OBJECT_IDENTIFIER_get_single_arc(st->buf + off, + st->size - off, &arc); + if(rd < 0) { + return -1; + } else if(rd == 0) { + /* No more arcs. */ + break; + } else { + int ret = snprintf(scratch, sizeof(scratch), "%s%" PRIu32, + off ? "." : "", arc); + if(ret >= (ssize_t)sizeof(scratch)) { + return -1; + } + produced += ret; + off += rd; + assert(off <= st->size); + if(cb(scratch, ret, app_key) < 0) return -1; + } + } + + if(off != st->size) { + ASN_DEBUG("Could not scan to the end of Object Identifier"); + return -1; + } + + return produced; +} + +int +RELATIVE_OID_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const RELATIVE_OID_t *st = (const RELATIVE_OID_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(!st || !st->buf) + return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* Dump preamble */ + if(cb("{ ", 2, app_key) < 0) + return -1; + + if(RELATIVE_OID__dump_body(st, cb, app_key) < 0) + return -1; + + return (cb(" }", 2, app_key) < 0) ? -1 : 0; +} + +static enum xer_pbd_rval +RELATIVE_OID__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + RELATIVE_OID_t *st = (RELATIVE_OID_t *)sptr; + const char *chunk_end = (const char *)chunk_buf + chunk_size; + const char *endptr; + asn_oid_arc_t s_arcs[6]; + asn_oid_arc_t *arcs = s_arcs; + ssize_t num_arcs; + int ret; + + (void)td; + + num_arcs = OBJECT_IDENTIFIER_parse_arcs( + (const char *)chunk_buf, chunk_size, arcs, + sizeof(s_arcs) / sizeof(s_arcs[0]), &endptr); + if(num_arcs < 0) { + /* Expecting at least one arc arcs */ + return XPBD_BROKEN_ENCODING; + } else if(num_arcs == 0) { + return XPBD_NOT_BODY_IGNORE; + } + assert(endptr == chunk_end); + + if((size_t)num_arcs > sizeof(s_arcs) / sizeof(s_arcs[0])) { + arcs = (asn_oid_arc_t *)MALLOC(num_arcs * sizeof(arcs[0])); + if(!arcs) return XPBD_SYSTEM_FAILURE; + ret = OBJECT_IDENTIFIER_parse_arcs((const char *)chunk_buf, chunk_size, + arcs, num_arcs, &endptr); + if(ret != num_arcs) { + return XPBD_SYSTEM_FAILURE; /* assert?.. */ + } + } + + /* + * Convert arcs into BER representation. + */ + ret = RELATIVE_OID_set_arcs(st, arcs, num_arcs); + if(arcs != s_arcs) FREEMEM(arcs); + + return ret ? XPBD_SYSTEM_FAILURE : XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +RELATIVE_OID_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return xer_decode_primitive(opt_codec_ctx, td, + sptr, sizeof(RELATIVE_OID_t), opt_mname, + buf_ptr, size, RELATIVE_OID__xer_body_decode); +} + +asn_enc_rval_t +RELATIVE_OID_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const RELATIVE_OID_t *st = (const RELATIVE_OID_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; /* Unused argument */ + (void)flags; /* Unused argument */ + + if(!st || !st->buf) + ASN__ENCODE_FAILED; + + er.encoded = RELATIVE_OID__dump_body(st, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +ssize_t +RELATIVE_OID_get_arcs(const RELATIVE_OID_t *st, asn_oid_arc_t *arcs, + size_t arcs_count) { + size_t num_arcs = 0; + size_t off; + + if(!st || !st->buf) { + errno = EINVAL; + return -1; + } + + for(off = 0;;) { + asn_oid_arc_t arc; + ssize_t rd = OBJECT_IDENTIFIER_get_single_arc(st->buf + off, + st->size - off, &arc); + if(rd < 0) { + return -1; + } else if(rd == 0) { + /* No more arcs. */ + break; + } else { + off += rd; + if(num_arcs < arcs_count) { + arcs[num_arcs] = arc; + } + num_arcs++; + } + } + + if(off != st->size) { + return -1; + } + + return num_arcs; +} + +int +RELATIVE_OID_set_arcs(RELATIVE_OID_t *st, const asn_oid_arc_t *arcs, + size_t arcs_count) { + uint8_t *buf; + uint8_t *bp; + size_t size; + size_t i; + + if(!st || !arcs) { + errno = EINVAL; + return -1; + } + + /* + * Roughly estimate the maximum size necessary to encode these arcs. + */ + size = ((sizeof(asn_oid_arc_t) * CHAR_BIT + 6) / 7) * arcs_count; + bp = buf = (uint8_t *)MALLOC(size + 1); + if(!buf) { + /* ENOMEM */ + return -1; + } + + /* + * Encode the arcs. + */ + for(i = 0; i < arcs_count; i++) { + ssize_t wrote = OBJECT_IDENTIFIER_set_single_arc(bp, size, arcs[i]); + if(wrote <= 0) { + FREEMEM(buf); + return -1; + } + assert((size_t)wrote <= size); + bp += wrote; + size -= wrote; + } + + /* + * Replace buffer. + */ + st->size = bp - buf; + bp = st->buf; + st->buf = buf; + st->buf[st->size] = '\0'; + if(bp) FREEMEM(bp); + + return 0; +} + + +/* + * Generate values from the list of interesting values, or just a random value. + */ +static asn_oid_arc_t +RELATIVE_OID__biased_random_arc() { + static const uint16_t values[] = {0, 1, 127, 128, 129, 254, 255, 256}; + + switch(asn_random_between(0, 2)) { + case 0: + return values[asn_random_between( + 0, sizeof(values) / sizeof(values[0]) - 1)]; + case 1: + return asn_random_between(0, UINT_MAX); + case 2: + default: + return UINT_MAX; + } +} + +asn_random_fill_result_t +RELATIVE_OID_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + RELATIVE_OID_t *st; + const int min_arcs = 1; /* A minimum of 1 arc is required */ + asn_oid_arc_t arcs[3]; + size_t arcs_len = + asn_random_between(min_arcs, sizeof(arcs) / sizeof(arcs[0])); + size_t i; + + (void)constraints; + + if(max_length < arcs_len) return result_skipped; + + if(*sptr) { + st = *sptr; + } else { + st = CALLOC(1, sizeof(*st)); + } + + for(i = 0; i < arcs_len; i++) { + arcs[i] = RELATIVE_OID__biased_random_arc(); + } + + if(RELATIVE_OID_set_arcs(st, arcs, arcs_len)) { + if(st != *sptr) { + ASN_STRUCT_FREE(*td, st); + } + return result_failed; + } + + *sptr = st; + + result_ok.length = st->size; + return result_ok; +} diff --git a/Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-Item.c b/Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-Item.c new file mode 100644 index 0000000..a6b258d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-Item.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RIC-EventTriggerStyle-Item.h" + +asn_TYPE_member_t asn_MBR_RIC_EventTriggerStyle_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RIC_EventTriggerStyle_Item, ric_EventTriggerStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_EventTriggerStyle_Item, ric_EventTriggerStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_EventTriggerStyle_Item, ric_EventTriggerFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerFormat-Type" + }, +}; +static const ber_tlv_tag_t asn_DEF_RIC_EventTriggerStyle_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RIC_EventTriggerStyle_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-EventTriggerStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-EventTriggerStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ric-EventTriggerFormat-Type */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RIC_EventTriggerStyle_Item_specs_1 = { + sizeof(struct RIC_EventTriggerStyle_Item), + offsetof(struct RIC_EventTriggerStyle_Item, _asn_ctx), + asn_MAP_RIC_EventTriggerStyle_Item_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RIC_EventTriggerStyle_Item = { + "RIC-EventTriggerStyle-Item", + "RIC-EventTriggerStyle-Item", + &asn_OP_SEQUENCE, + asn_DEF_RIC_EventTriggerStyle_Item_tags_1, + sizeof(asn_DEF_RIC_EventTriggerStyle_Item_tags_1) + /sizeof(asn_DEF_RIC_EventTriggerStyle_Item_tags_1[0]), /* 1 */ + asn_DEF_RIC_EventTriggerStyle_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_EventTriggerStyle_Item_tags_1) + /sizeof(asn_DEF_RIC_EventTriggerStyle_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RIC_EventTriggerStyle_Item_1, + 3, /* Elements count */ + &asn_SPC_RIC_EventTriggerStyle_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-List.c b/Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-List.c new file mode 100644 index 0000000..ec73afc --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RIC-EventTriggerStyle-List.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-EventTriggerStyle-List.h" + +asn_TYPE_member_t asn_MBR_RIC_EventTriggerStyle_List_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RIC_EventTriggerStyle_List, ric_EventTriggerStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_EventTriggerStyle_List, ric_EventTriggerStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_EventTriggerStyle_List, ric_EventTriggerFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerFormat-Type" + }, +}; +static const ber_tlv_tag_t asn_DEF_RIC_EventTriggerStyle_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RIC_EventTriggerStyle_List_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-EventTriggerStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-EventTriggerStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ric-EventTriggerFormat-Type */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RIC_EventTriggerStyle_List_specs_1 = { + sizeof(struct RIC_EventTriggerStyle_List), + offsetof(struct RIC_EventTriggerStyle_List, _asn_ctx), + asn_MAP_RIC_EventTriggerStyle_List_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RIC_EventTriggerStyle_List = { + "RIC-EventTriggerStyle-List", + "RIC-EventTriggerStyle-List", + &asn_OP_SEQUENCE, + asn_DEF_RIC_EventTriggerStyle_List_tags_1, + sizeof(asn_DEF_RIC_EventTriggerStyle_List_tags_1) + /sizeof(asn_DEF_RIC_EventTriggerStyle_List_tags_1[0]), /* 1 */ + asn_DEF_RIC_EventTriggerStyle_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_EventTriggerStyle_List_tags_1) + /sizeof(asn_DEF_RIC_EventTriggerStyle_List_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RIC_EventTriggerStyle_List_1, + 3, /* Elements count */ + &asn_SPC_RIC_EventTriggerStyle_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RIC-Format-Type.c b/Bouncer/e2sm_kpm/lib/RIC-Format-Type.c new file mode 100644 index 0000000..f34ef41 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RIC-Format-Type.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RIC-Format-Type.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RIC_Format_Type_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_Format_Type = { + "RIC-Format-Type", + "RIC-Format-Type", + &asn_OP_NativeInteger, + asn_DEF_RIC_Format_Type_tags_1, + sizeof(asn_DEF_RIC_Format_Type_tags_1) + /sizeof(asn_DEF_RIC_Format_Type_tags_1[0]), /* 1 */ + asn_DEF_RIC_Format_Type_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_Format_Type_tags_1) + /sizeof(asn_DEF_RIC_Format_Type_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RIC-ReportStyle-Item.c b/Bouncer/e2sm_kpm/lib/RIC-ReportStyle-Item.c new file mode 100644 index 0000000..c8c63ba --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RIC-ReportStyle-Item.c @@ -0,0 +1,100 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RIC-ReportStyle-Item.h" + +asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_Item, ric_ReportStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ReportStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_Item, ric_ReportStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ReportStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_Item, ric_ActionFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ActionFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_Item, measInfo_Action_List), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MeasurementInfo_Action_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "measInfo-Action-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_Item, ric_IndicationHeaderFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationHeaderFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_Item, ric_IndicationMessageFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationMessageFormat-Type" + }, +}; +static const ber_tlv_tag_t asn_DEF_RIC_ReportStyle_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RIC_ReportStyle_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ReportStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-ReportStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-ActionFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* measInfo-Action-List */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ric-IndicationHeaderFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* ric-IndicationMessageFormat-Type */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RIC_ReportStyle_Item_specs_1 = { + sizeof(struct RIC_ReportStyle_Item), + offsetof(struct RIC_ReportStyle_Item, _asn_ctx), + asn_MAP_RIC_ReportStyle_Item_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RIC_ReportStyle_Item = { + "RIC-ReportStyle-Item", + "RIC-ReportStyle-Item", + &asn_OP_SEQUENCE, + asn_DEF_RIC_ReportStyle_Item_tags_1, + sizeof(asn_DEF_RIC_ReportStyle_Item_tags_1) + /sizeof(asn_DEF_RIC_ReportStyle_Item_tags_1[0]), /* 1 */ + asn_DEF_RIC_ReportStyle_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_ReportStyle_Item_tags_1) + /sizeof(asn_DEF_RIC_ReportStyle_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RIC_ReportStyle_Item_1, + 6, /* Elements count */ + &asn_SPC_RIC_ReportStyle_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RIC-ReportStyle-List.c b/Bouncer/e2sm_kpm/lib/RIC-ReportStyle-List.c new file mode 100644 index 0000000..70b7732 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RIC-ReportStyle-List.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-ReportStyle-List.h" + +asn_TYPE_member_t asn_MBR_RIC_ReportStyle_List_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_List, ric_ReportStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ReportStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_List, ric_ReportStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ReportStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_List, ric_IndicationHeaderFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationHeaderFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_ReportStyle_List, ric_IndicationMessageFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationMessageFormat-Type" + }, +}; +static const ber_tlv_tag_t asn_DEF_RIC_ReportStyle_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RIC_ReportStyle_List_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ReportStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-ReportStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-IndicationHeaderFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ric-IndicationMessageFormat-Type */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RIC_ReportStyle_List_specs_1 = { + sizeof(struct RIC_ReportStyle_List), + offsetof(struct RIC_ReportStyle_List, _asn_ctx), + asn_MAP_RIC_ReportStyle_List_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RIC_ReportStyle_List = { + "RIC-ReportStyle-List", + "RIC-ReportStyle-List", + &asn_OP_SEQUENCE, + asn_DEF_RIC_ReportStyle_List_tags_1, + sizeof(asn_DEF_RIC_ReportStyle_List_tags_1) + /sizeof(asn_DEF_RIC_ReportStyle_List_tags_1[0]), /* 1 */ + asn_DEF_RIC_ReportStyle_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_ReportStyle_List_tags_1) + /sizeof(asn_DEF_RIC_ReportStyle_List_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RIC_ReportStyle_List_1, + 4, /* Elements count */ + &asn_SPC_RIC_ReportStyle_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RIC-Style-Name.c b/Bouncer/e2sm_kpm/lib/RIC-Style-Name.c new file mode 100644 index 0000000..662ada6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RIC-Style-Name.c @@ -0,0 +1,106 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RIC-Style-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RIC_Style_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RIC_Style_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RIC_Style_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_RIC_Style_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RIC_Style_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RIC_Style_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_Style_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_Style_Name = { + "RIC-Style-Name", + "RIC-Style-Name", + &asn_OP_PrintableString, + asn_DEF_RIC_Style_Name_tags_1, + sizeof(asn_DEF_RIC_Style_Name_tags_1) + /sizeof(asn_DEF_RIC_Style_Name_tags_1[0]), /* 1 */ + asn_DEF_RIC_Style_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_Style_Name_tags_1) + /sizeof(asn_DEF_RIC_Style_Name_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_RIC_Style_Name_constr_1, RIC_Style_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RIC-Style-Type.c b/Bouncer/e2sm_kpm/lib/RIC-Style-Type.c new file mode 100644 index 0000000..d08e69a --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RIC-Style-Type.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RIC-Style-Type.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RIC_Style_Type_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_Style_Type = { + "RIC-Style-Type", + "RIC-Style-Type", + &asn_OP_NativeInteger, + asn_DEF_RIC_Style_Type_tags_1, + sizeof(asn_DEF_RIC_Style_Type_tags_1) + /sizeof(asn_DEF_RIC_Style_Type_tags_1[0]), /* 1 */ + asn_DEF_RIC_Style_Type_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_Style_Type_tags_1) + /sizeof(asn_DEF_RIC_Style_Type_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RRC-MessageID.c b/Bouncer/e2sm_kpm/lib/RRC-MessageID.c new file mode 100644 index 0000000..8103669 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RRC-MessageID.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RRC-MessageID.h" + +static asn_per_constraints_t asn_PER_type_rrcType_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_rrcType_2[] = { + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID__rrcType, choice.lTE), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RRCclass_LTE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "lTE" + }, + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID__rrcType, choice.nR), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RRCclass_NR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_rrcType_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* lTE */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* nR */ +}; +static asn_CHOICE_specifics_t asn_SPC_rrcType_specs_2 = { + sizeof(struct RRC_MessageID__rrcType), + offsetof(struct RRC_MessageID__rrcType, _asn_ctx), + offsetof(struct RRC_MessageID__rrcType, present), + sizeof(((struct RRC_MessageID__rrcType *)0)->present), + asn_MAP_rrcType_tag2el_2, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_rrcType_2 = { + "rrcType", + "rrcType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_rrcType_constr_2, CHOICE_constraint }, + asn_MBR_rrcType_2, + 2, /* Elements count */ + &asn_SPC_rrcType_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_RRC_MessageID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID, rrcType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_rrcType_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "rrcType" + }, + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID, messageID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageID" + }, +}; +static const ber_tlv_tag_t asn_DEF_RRC_MessageID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RRC_MessageID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rrcType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* messageID */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RRC_MessageID_specs_1 = { + sizeof(struct RRC_MessageID), + offsetof(struct RRC_MessageID, _asn_ctx), + asn_MAP_RRC_MessageID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RRC_MessageID = { + "RRC-MessageID", + "RRC-MessageID", + &asn_OP_SEQUENCE, + asn_DEF_RRC_MessageID_tags_1, + sizeof(asn_DEF_RRC_MessageID_tags_1) + /sizeof(asn_DEF_RRC_MessageID_tags_1[0]), /* 1 */ + asn_DEF_RRC_MessageID_tags_1, /* Same as above */ + sizeof(asn_DEF_RRC_MessageID_tags_1) + /sizeof(asn_DEF_RRC_MessageID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RRC_MessageID_1, + 2, /* Elements count */ + &asn_SPC_RRC_MessageID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RRCclass-LTE.c b/Bouncer/e2sm_kpm/lib/RRCclass-LTE.c new file mode 100644 index 0000000..6310742 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RRCclass-LTE.c @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RRCclass-LTE.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_RRCclass_LTE_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 11 } /* (0..11,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RRCclass_LTE_value2enum_1[] = { + { 0, 8, "bCCH-BCH" }, + { 1, 13, "bCCH-BCH-MBMS" }, + { 2, 11, "bCCH-DL-SCH" }, + { 3, 14, "bCCH-DL-SCH-BR" }, + { 4, 16, "bCCH-DL-SCH-MBMS" }, + { 5, 4, "mCCH" }, + { 6, 4, "pCCH" }, + { 7, 7, "dL-CCCH" }, + { 8, 7, "dL-DCCH" }, + { 9, 7, "uL-CCCH" }, + { 10, 7, "uL-DCCH" }, + { 11, 7, "sC-MCCH" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RRCclass_LTE_enum2value_1[] = { + 0, /* bCCH-BCH(0) */ + 1, /* bCCH-BCH-MBMS(1) */ + 2, /* bCCH-DL-SCH(2) */ + 3, /* bCCH-DL-SCH-BR(3) */ + 4, /* bCCH-DL-SCH-MBMS(4) */ + 7, /* dL-CCCH(7) */ + 8, /* dL-DCCH(8) */ + 5, /* mCCH(5) */ + 6, /* pCCH(6) */ + 11, /* sC-MCCH(11) */ + 9, /* uL-CCCH(9) */ + 10 /* uL-DCCH(10) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RRCclass_LTE_specs_1 = { + asn_MAP_RRCclass_LTE_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RRCclass_LTE_enum2value_1, /* N => "tag"; sorted by N */ + 12, /* Number of elements in the maps */ + 13, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RRCclass_LTE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RRCclass_LTE = { + "RRCclass-LTE", + "RRCclass-LTE", + &asn_OP_NativeEnumerated, + asn_DEF_RRCclass_LTE_tags_1, + sizeof(asn_DEF_RRCclass_LTE_tags_1) + /sizeof(asn_DEF_RRCclass_LTE_tags_1[0]), /* 1 */ + asn_DEF_RRCclass_LTE_tags_1, /* Same as above */ + sizeof(asn_DEF_RRCclass_LTE_tags_1) + /sizeof(asn_DEF_RRCclass_LTE_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_RRCclass_LTE_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RRCclass_LTE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RRCclass-NR.c b/Bouncer/e2sm_kpm/lib/RRCclass-NR.c new file mode 100644 index 0000000..e85da53 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RRCclass-NR.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "RRCclass-NR.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_RRCclass_NR_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 7 } /* (0..7,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RRCclass_NR_value2enum_1[] = { + { 0, 8, "bCCH-BCH" }, + { 1, 11, "bCCH-DL-SCH" }, + { 2, 7, "dL-CCCH" }, + { 3, 7, "dL-DCCH" }, + { 4, 4, "pCCH" }, + { 5, 7, "uL-CCCH" }, + { 6, 8, "uL-CCCH1" }, + { 7, 7, "uL-DCCH" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RRCclass_NR_enum2value_1[] = { + 0, /* bCCH-BCH(0) */ + 1, /* bCCH-DL-SCH(1) */ + 2, /* dL-CCCH(2) */ + 3, /* dL-DCCH(3) */ + 4, /* pCCH(4) */ + 5, /* uL-CCCH(5) */ + 6, /* uL-CCCH1(6) */ + 7 /* uL-DCCH(7) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RRCclass_NR_specs_1 = { + asn_MAP_RRCclass_NR_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RRCclass_NR_enum2value_1, /* N => "tag"; sorted by N */ + 8, /* Number of elements in the maps */ + 9, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RRCclass_NR_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RRCclass_NR = { + "RRCclass-NR", + "RRCclass-NR", + &asn_OP_NativeEnumerated, + asn_DEF_RRCclass_NR_tags_1, + sizeof(asn_DEF_RRCclass_NR_tags_1) + /sizeof(asn_DEF_RRCclass_NR_tags_1[0]), /* 1 */ + asn_DEF_RRCclass_NR_tags_1, /* Same as above */ + sizeof(asn_DEF_RRCclass_NR_tags_1) + /sizeof(asn_DEF_RRCclass_NR_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_RRCclass_NR_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RRCclass_NR_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/RT-Period-IE.c b/Bouncer/e2sm_kpm/lib/RT-Period-IE.c new file mode 100644 index 0000000..82fd5b0 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/RT-Period-IE.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "RT-Period-IE.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RT_Period_IE_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RT_Period_IE_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 5, 5, 0, 19 } /* (0..19,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RT_Period_IE_value2enum_1[] = { + { 0, 4, "ms10" }, + { 1, 4, "ms20" }, + { 2, 4, "ms32" }, + { 3, 4, "ms40" }, + { 4, 4, "ms60" }, + { 5, 4, "ms64" }, + { 6, 4, "ms70" }, + { 7, 4, "ms80" }, + { 8, 5, "ms128" }, + { 9, 5, "ms160" }, + { 10, 5, "ms256" }, + { 11, 5, "ms320" }, + { 12, 5, "ms512" }, + { 13, 5, "ms640" }, + { 14, 6, "ms1024" }, + { 15, 6, "ms1280" }, + { 16, 6, "ms2048" }, + { 17, 6, "ms2560" }, + { 18, 6, "ms5120" }, + { 19, 7, "ms10240" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RT_Period_IE_enum2value_1[] = { + 0, /* ms10(0) */ + 14, /* ms1024(14) */ + 19, /* ms10240(19) */ + 8, /* ms128(8) */ + 15, /* ms1280(15) */ + 9, /* ms160(9) */ + 1, /* ms20(1) */ + 16, /* ms2048(16) */ + 10, /* ms256(10) */ + 17, /* ms2560(17) */ + 2, /* ms32(2) */ + 11, /* ms320(11) */ + 3, /* ms40(3) */ + 12, /* ms512(12) */ + 18, /* ms5120(18) */ + 4, /* ms60(4) */ + 5, /* ms64(5) */ + 13, /* ms640(13) */ + 6, /* ms70(6) */ + 7 /* ms80(7) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RT_Period_IE_specs_1 = { + asn_MAP_RT_Period_IE_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RT_Period_IE_enum2value_1, /* N => "tag"; sorted by N */ + 20, /* Number of elements in the maps */ + 21, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RT_Period_IE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RT_Period_IE = { + "RT-Period-IE", + "RT-Period-IE", + &asn_OP_NativeEnumerated, + asn_DEF_RT_Period_IE_tags_1, + sizeof(asn_DEF_RT_Period_IE_tags_1) + /sizeof(asn_DEF_RT_Period_IE_tags_1[0]), /* 1 */ + asn_DEF_RT_Period_IE_tags_1, /* Same as above */ + sizeof(asn_DEF_RT_Period_IE_tags_1) + /sizeof(asn_DEF_RT_Period_IE_tags_1[0]), /* 1 */ + { &asn_OER_type_RT_Period_IE_constr_1, &asn_PER_type_RT_Period_IE_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RT_Period_IE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/S-NSSAI.c b/Bouncer/e2sm_kpm/lib/S-NSSAI.c new file mode 100644 index 0000000..f5eadec --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/S-NSSAI.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "S-NSSAI.h" + +asn_TYPE_member_t asn_MBR_S_NSSAI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct S_NSSAI, sST), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SST, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sST" + }, + { ATF_POINTER, 1, offsetof(struct S_NSSAI, sD), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SD, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sD" + }, +}; +static const int asn_MAP_S_NSSAI_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_S_NSSAI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_S_NSSAI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sST */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sD */ +}; +asn_SEQUENCE_specifics_t asn_SPC_S_NSSAI_specs_1 = { + sizeof(struct S_NSSAI), + offsetof(struct S_NSSAI, _asn_ctx), + asn_MAP_S_NSSAI_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_S_NSSAI_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_S_NSSAI = { + "S-NSSAI", + "S-NSSAI", + &asn_OP_SEQUENCE, + asn_DEF_S_NSSAI_tags_1, + sizeof(asn_DEF_S_NSSAI_tags_1) + /sizeof(asn_DEF_S_NSSAI_tags_1[0]), /* 1 */ + asn_DEF_S_NSSAI_tags_1, /* Same as above */ + sizeof(asn_DEF_S_NSSAI_tags_1) + /sizeof(asn_DEF_S_NSSAI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_S_NSSAI_1, + 2, /* Elements count */ + &asn_SPC_S_NSSAI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SD.c b/Bouncer/e2sm_kpm/lib/SD.c new file mode 100644 index 0000000..fcbcce8 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SD.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "SD.h" + +int +SD_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_SD_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_SD_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_SD = { + "SD", + "SD", + &asn_OP_OCTET_STRING, + asn_DEF_SD_tags_1, + sizeof(asn_DEF_SD_tags_1) + /sizeof(asn_DEF_SD_tags_1[0]), /* 1 */ + asn_DEF_SD_tags_1, /* Same as above */ + sizeof(asn_DEF_SD_tags_1) + /sizeof(asn_DEF_SD_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_SD_constr_1, SD_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SNSSAI.c b/Bouncer/e2sm_kpm/lib/SNSSAI.c new file mode 100644 index 0000000..4f63ad9 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SNSSAI.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "SNSSAI.h" + +static int +memb_sST_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 1)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_sD_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_sST_constr_2 CC_NOTUSED = { + { 0, 0 }, + 1 /* (SIZE(1..1)) */}; +static asn_per_constraints_t asn_PER_memb_sST_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_sD_constr_3 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +static asn_per_constraints_t asn_PER_memb_sD_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_SNSSAI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SNSSAI, sST), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { &asn_OER_memb_sST_constr_2, &asn_PER_memb_sST_constr_2, memb_sST_constraint_1 }, + 0, 0, /* No default value */ + "sST" + }, + { ATF_POINTER, 1, offsetof(struct SNSSAI, sD), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { &asn_OER_memb_sD_constr_3, &asn_PER_memb_sD_constr_3, memb_sD_constraint_1 }, + 0, 0, /* No default value */ + "sD" + }, +}; +static const int asn_MAP_SNSSAI_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_SNSSAI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SNSSAI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sST */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sD */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SNSSAI_specs_1 = { + sizeof(struct SNSSAI), + offsetof(struct SNSSAI, _asn_ctx), + asn_MAP_SNSSAI_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_SNSSAI_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SNSSAI = { + "SNSSAI", + "SNSSAI", + &asn_OP_SEQUENCE, + asn_DEF_SNSSAI_tags_1, + sizeof(asn_DEF_SNSSAI_tags_1) + /sizeof(asn_DEF_SNSSAI_tags_1[0]), /* 1 */ + asn_DEF_SNSSAI_tags_1, /* Same as above */ + sizeof(asn_DEF_SNSSAI_tags_1) + /sizeof(asn_DEF_SNSSAI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SNSSAI_1, + 2, /* Elements count */ + &asn_SPC_SNSSAI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SST.c b/Bouncer/e2sm_kpm/lib/SST.c new file mode 100644 index 0000000..cb7f498 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SST.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "SST.h" + +int +SST_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 1)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_SST_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_SST_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_SST = { + "SST", + "SST", + &asn_OP_OCTET_STRING, + asn_DEF_SST_tags_1, + sizeof(asn_DEF_SST_tags_1) + /sizeof(asn_DEF_SST_tags_1[0]), /* 1 */ + asn_DEF_SST_tags_1, /* Same as above */ + sizeof(asn_DEF_SST_tags_1) + /sizeof(asn_DEF_SST_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_SST_constr_1, SST_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ServedPlmnPerCellListItem.c b/Bouncer/e2sm_kpm/lib/ServedPlmnPerCellListItem.c new file mode 100644 index 0000000..7ebe3e6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ServedPlmnPerCellListItem.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "ServedPlmnPerCellListItem.h" + +#include "FGC-DU-PM-Container.h" +#include "EPC-DU-PM-Container.h" +asn_TYPE_member_t asn_MBR_ServedPlmnPerCellListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ServedPlmnPerCellListItem, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMN_Identity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_POINTER, 2, offsetof(struct ServedPlmnPerCellListItem, du_PM_5GC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FGC_DU_PM_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "du-PM-5GC" + }, + { ATF_POINTER, 1, offsetof(struct ServedPlmnPerCellListItem, du_PM_EPC), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EPC_DU_PM_Container, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "du-PM-EPC" + }, +}; +static const int asn_MAP_ServedPlmnPerCellListItem_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_ServedPlmnPerCellListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ServedPlmnPerCellListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* du-PM-5GC */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* du-PM-EPC */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ServedPlmnPerCellListItem_specs_1 = { + sizeof(struct ServedPlmnPerCellListItem), + offsetof(struct ServedPlmnPerCellListItem, _asn_ctx), + asn_MAP_ServedPlmnPerCellListItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_ServedPlmnPerCellListItem_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ServedPlmnPerCellListItem = { + "ServedPlmnPerCellListItem", + "ServedPlmnPerCellListItem", + &asn_OP_SEQUENCE, + asn_DEF_ServedPlmnPerCellListItem_tags_1, + sizeof(asn_DEF_ServedPlmnPerCellListItem_tags_1) + /sizeof(asn_DEF_ServedPlmnPerCellListItem_tags_1[0]), /* 1 */ + asn_DEF_ServedPlmnPerCellListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_ServedPlmnPerCellListItem_tags_1) + /sizeof(asn_DEF_ServedPlmnPerCellListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ServedPlmnPerCellListItem_1, + 3, /* Elements count */ + &asn_SPC_ServedPlmnPerCellListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ServingCell-ARFCN.c b/Bouncer/e2sm_kpm/lib/ServingCell-ARFCN.c new file mode 100644 index 0000000..a4df51f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ServingCell-ARFCN.c @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "ServingCell-ARFCN.h" + +#include "NR-ARFCN.h" +static asn_per_constraints_t asn_PER_type_ServingCell_ARFCN_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ServingCell_ARFCN_1[] = { + { ATF_POINTER, 0, offsetof(struct ServingCell_ARFCN, choice.nR), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR" + }, + { ATF_NOFLAGS, 0, offsetof(struct ServingCell_ARFCN, choice.eUTRA), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E_UTRA_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ServingCell_ARFCN_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nR */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRA */ +}; +static asn_CHOICE_specifics_t asn_SPC_ServingCell_ARFCN_specs_1 = { + sizeof(struct ServingCell_ARFCN), + offsetof(struct ServingCell_ARFCN, _asn_ctx), + offsetof(struct ServingCell_ARFCN, present), + sizeof(((struct ServingCell_ARFCN *)0)->present), + asn_MAP_ServingCell_ARFCN_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ServingCell_ARFCN = { + "ServingCell-ARFCN", + "ServingCell-ARFCN", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_ServingCell_ARFCN_constr_1, CHOICE_constraint }, + asn_MBR_ServingCell_ARFCN_1, + 2, /* Elements count */ + &asn_SPC_ServingCell_ARFCN_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/ServingCell-PCI.c b/Bouncer/e2sm_kpm/lib/ServingCell-PCI.c new file mode 100644 index 0000000..349468e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ServingCell-PCI.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "ServingCell-PCI.h" + +static asn_per_constraints_t asn_PER_type_ServingCell_PCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ServingCell_PCI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ServingCell_PCI, choice.nR), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_PCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR" + }, + { ATF_NOFLAGS, 0, offsetof(struct ServingCell_PCI, choice.eUTRA), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E_UTRA_PCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ServingCell_PCI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nR */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRA */ +}; +static asn_CHOICE_specifics_t asn_SPC_ServingCell_PCI_specs_1 = { + sizeof(struct ServingCell_PCI), + offsetof(struct ServingCell_PCI, _asn_ctx), + offsetof(struct ServingCell_PCI, present), + sizeof(((struct ServingCell_PCI *)0)->present), + asn_MAP_ServingCell_PCI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ServingCell_PCI = { + "ServingCell-PCI", + "ServingCell-PCI", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_ServingCell_PCI_constr_1, CHOICE_constraint }, + asn_MBR_ServingCell_PCI_1, + 2, /* Elements count */ + &asn_SPC_ServingCell_PCI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SlicePerPlmnPerCellListItem.c b/Bouncer/e2sm_kpm/lib/SlicePerPlmnPerCellListItem.c new file mode 100644 index 0000000..f4e75f8 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SlicePerPlmnPerCellListItem.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "SlicePerPlmnPerCellListItem.h" + +#include "FQIPERSlicesPerPlmnPerCellListItem.h" +static int +memb_fQIPERSlicesPerPlmnPerCellList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 64)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_fQIPERSlicesPerPlmnPerCellList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..64)) */}; +static asn_per_constraints_t asn_PER_type_fQIPERSlicesPerPlmnPerCellList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 64 } /* (SIZE(1..64)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_fQIPERSlicesPerPlmnPerCellList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..64)) */}; +static asn_per_constraints_t asn_PER_memb_fQIPERSlicesPerPlmnPerCellList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 64 } /* (SIZE(1..64)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_fQIPERSlicesPerPlmnPerCellList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_FQIPERSlicesPerPlmnPerCellListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_fQIPERSlicesPerPlmnPerCellList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_fQIPERSlicesPerPlmnPerCellList_specs_3 = { + sizeof(struct SlicePerPlmnPerCellListItem__fQIPERSlicesPerPlmnPerCellList), + offsetof(struct SlicePerPlmnPerCellListItem__fQIPERSlicesPerPlmnPerCellList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_fQIPERSlicesPerPlmnPerCellList_3 = { + "fQIPERSlicesPerPlmnPerCellList", + "fQIPERSlicesPerPlmnPerCellList", + &asn_OP_SEQUENCE_OF, + asn_DEF_fQIPERSlicesPerPlmnPerCellList_tags_3, + sizeof(asn_DEF_fQIPERSlicesPerPlmnPerCellList_tags_3) + /sizeof(asn_DEF_fQIPERSlicesPerPlmnPerCellList_tags_3[0]) - 1, /* 1 */ + asn_DEF_fQIPERSlicesPerPlmnPerCellList_tags_3, /* Same as above */ + sizeof(asn_DEF_fQIPERSlicesPerPlmnPerCellList_tags_3) + /sizeof(asn_DEF_fQIPERSlicesPerPlmnPerCellList_tags_3[0]), /* 2 */ + { &asn_OER_type_fQIPERSlicesPerPlmnPerCellList_constr_3, &asn_PER_type_fQIPERSlicesPerPlmnPerCellList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_fQIPERSlicesPerPlmnPerCellList_3, + 1, /* Single element */ + &asn_SPC_fQIPERSlicesPerPlmnPerCellList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_SlicePerPlmnPerCellListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SlicePerPlmnPerCellListItem, sliceID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SNSSAI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sliceID" + }, + { ATF_NOFLAGS, 0, offsetof(struct SlicePerPlmnPerCellListItem, fQIPERSlicesPerPlmnPerCellList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_fQIPERSlicesPerPlmnPerCellList_3, + 0, + { &asn_OER_memb_fQIPERSlicesPerPlmnPerCellList_constr_3, &asn_PER_memb_fQIPERSlicesPerPlmnPerCellList_constr_3, memb_fQIPERSlicesPerPlmnPerCellList_constraint_1 }, + 0, 0, /* No default value */ + "fQIPERSlicesPerPlmnPerCellList" + }, +}; +static const ber_tlv_tag_t asn_DEF_SlicePerPlmnPerCellListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SlicePerPlmnPerCellListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sliceID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* fQIPERSlicesPerPlmnPerCellList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SlicePerPlmnPerCellListItem_specs_1 = { + sizeof(struct SlicePerPlmnPerCellListItem), + offsetof(struct SlicePerPlmnPerCellListItem, _asn_ctx), + asn_MAP_SlicePerPlmnPerCellListItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SlicePerPlmnPerCellListItem = { + "SlicePerPlmnPerCellListItem", + "SlicePerPlmnPerCellListItem", + &asn_OP_SEQUENCE, + asn_DEF_SlicePerPlmnPerCellListItem_tags_1, + sizeof(asn_DEF_SlicePerPlmnPerCellListItem_tags_1) + /sizeof(asn_DEF_SlicePerPlmnPerCellListItem_tags_1[0]), /* 1 */ + asn_DEF_SlicePerPlmnPerCellListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_SlicePerPlmnPerCellListItem_tags_1) + /sizeof(asn_DEF_SlicePerPlmnPerCellListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SlicePerPlmnPerCellListItem_1, + 2, /* Elements count */ + &asn_SPC_SlicePerPlmnPerCellListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SliceToReportListItem.c b/Bouncer/e2sm_kpm/lib/SliceToReportListItem.c new file mode 100644 index 0000000..b02b3da --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SliceToReportListItem.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "SliceToReportListItem.h" + +#include "FQIPERSlicesPerPlmnListItem.h" +static int +memb_fQIPERSlicesPerPlmnList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 64)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_fQIPERSlicesPerPlmnList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..64)) */}; +static asn_per_constraints_t asn_PER_type_fQIPERSlicesPerPlmnList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 64 } /* (SIZE(1..64)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_fQIPERSlicesPerPlmnList_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..64)) */}; +static asn_per_constraints_t asn_PER_memb_fQIPERSlicesPerPlmnList_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 64 } /* (SIZE(1..64)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_fQIPERSlicesPerPlmnList_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_FQIPERSlicesPerPlmnListItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_fQIPERSlicesPerPlmnList_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_fQIPERSlicesPerPlmnList_specs_3 = { + sizeof(struct SliceToReportListItem__fQIPERSlicesPerPlmnList), + offsetof(struct SliceToReportListItem__fQIPERSlicesPerPlmnList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_fQIPERSlicesPerPlmnList_3 = { + "fQIPERSlicesPerPlmnList", + "fQIPERSlicesPerPlmnList", + &asn_OP_SEQUENCE_OF, + asn_DEF_fQIPERSlicesPerPlmnList_tags_3, + sizeof(asn_DEF_fQIPERSlicesPerPlmnList_tags_3) + /sizeof(asn_DEF_fQIPERSlicesPerPlmnList_tags_3[0]) - 1, /* 1 */ + asn_DEF_fQIPERSlicesPerPlmnList_tags_3, /* Same as above */ + sizeof(asn_DEF_fQIPERSlicesPerPlmnList_tags_3) + /sizeof(asn_DEF_fQIPERSlicesPerPlmnList_tags_3[0]), /* 2 */ + { &asn_OER_type_fQIPERSlicesPerPlmnList_constr_3, &asn_PER_type_fQIPERSlicesPerPlmnList_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_fQIPERSlicesPerPlmnList_3, + 1, /* Single element */ + &asn_SPC_fQIPERSlicesPerPlmnList_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_SliceToReportListItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SliceToReportListItem, sliceID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SNSSAI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sliceID" + }, + { ATF_NOFLAGS, 0, offsetof(struct SliceToReportListItem, fQIPERSlicesPerPlmnList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_fQIPERSlicesPerPlmnList_3, + 0, + { &asn_OER_memb_fQIPERSlicesPerPlmnList_constr_3, &asn_PER_memb_fQIPERSlicesPerPlmnList_constr_3, memb_fQIPERSlicesPerPlmnList_constraint_1 }, + 0, 0, /* No default value */ + "fQIPERSlicesPerPlmnList" + }, +}; +static const ber_tlv_tag_t asn_DEF_SliceToReportListItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SliceToReportListItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sliceID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* fQIPERSlicesPerPlmnList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SliceToReportListItem_specs_1 = { + sizeof(struct SliceToReportListItem), + offsetof(struct SliceToReportListItem, _asn_ctx), + asn_MAP_SliceToReportListItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SliceToReportListItem = { + "SliceToReportListItem", + "SliceToReportListItem", + &asn_OP_SEQUENCE, + asn_DEF_SliceToReportListItem_tags_1, + sizeof(asn_DEF_SliceToReportListItem_tags_1) + /sizeof(asn_DEF_SliceToReportListItem_tags_1[0]), /* 1 */ + asn_DEF_SliceToReportListItem_tags_1, /* Same as above */ + sizeof(asn_DEF_SliceToReportListItem_tags_1) + /sizeof(asn_DEF_SliceToReportListItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SliceToReportListItem_1, + 2, /* Elements count */ + &asn_SPC_SliceToReportListItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SubscriberProfileIDforRFP.c b/Bouncer/e2sm_kpm/lib/SubscriberProfileIDforRFP.c new file mode 100644 index 0000000..de6ac12 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SubscriberProfileIDforRFP.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "SubscriberProfileIDforRFP.h" + +int +SubscriberProfileIDforRFP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 256)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_SubscriberProfileIDforRFP_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (1..256) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_SubscriberProfileIDforRFP_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_SubscriberProfileIDforRFP = { + "SubscriberProfileIDforRFP", + "SubscriberProfileIDforRFP", + &asn_OP_NativeInteger, + asn_DEF_SubscriberProfileIDforRFP_tags_1, + sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1) + /sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1[0]), /* 1 */ + asn_DEF_SubscriberProfileIDforRFP_tags_1, /* Same as above */ + sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1) + /sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_SubscriberProfileIDforRFP_constr_1, SubscriberProfileIDforRFP_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SupportedSULBandList.c b/Bouncer/e2sm_kpm/lib/SupportedSULBandList.c new file mode 100644 index 0000000..94d81c5 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SupportedSULBandList.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "SupportedSULBandList.h" + +#include "SupportedSULFreqBandItem.h" +asn_per_constraints_t asn_PER_type_SupportedSULBandList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 0, 32 } /* (SIZE(0..32)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_SupportedSULBandList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_SupportedSULFreqBandItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_SupportedSULBandList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_SupportedSULBandList_specs_1 = { + sizeof(struct SupportedSULBandList), + offsetof(struct SupportedSULBandList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_SupportedSULBandList = { + "SupportedSULBandList", + "SupportedSULBandList", + &asn_OP_SEQUENCE_OF, + asn_DEF_SupportedSULBandList_tags_1, + sizeof(asn_DEF_SupportedSULBandList_tags_1) + /sizeof(asn_DEF_SupportedSULBandList_tags_1[0]), /* 1 */ + asn_DEF_SupportedSULBandList_tags_1, /* Same as above */ + sizeof(asn_DEF_SupportedSULBandList_tags_1) + /sizeof(asn_DEF_SupportedSULBandList_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_SupportedSULBandList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_SupportedSULBandList_1, + 1, /* Single element */ + &asn_SPC_SupportedSULBandList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/SupportedSULFreqBandItem.c b/Bouncer/e2sm_kpm/lib/SupportedSULFreqBandItem.c new file mode 100644 index 0000000..4e64674 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/SupportedSULFreqBandItem.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "SupportedSULFreqBandItem.h" + +static int +memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_per_constraints_t asn_PER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1024 } /* (1..1024,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_SupportedSULFreqBandItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SupportedSULFreqBandItem, freqBandIndicatorNr), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, &asn_PER_memb_freqBandIndicatorNr_constr_2, memb_freqBandIndicatorNr_constraint_1 }, + 0, 0, /* No default value */ + "freqBandIndicatorNr" + }, +}; +static const ber_tlv_tag_t asn_DEF_SupportedSULFreqBandItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SupportedSULFreqBandItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* freqBandIndicatorNr */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SupportedSULFreqBandItem_specs_1 = { + sizeof(struct SupportedSULFreqBandItem), + offsetof(struct SupportedSULFreqBandItem, _asn_ctx), + asn_MAP_SupportedSULFreqBandItem_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SupportedSULFreqBandItem = { + "SupportedSULFreqBandItem", + "SupportedSULFreqBandItem", + &asn_OP_SEQUENCE, + asn_DEF_SupportedSULFreqBandItem_tags_1, + sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1) + /sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1[0]), /* 1 */ + asn_DEF_SupportedSULFreqBandItem_tags_1, /* Same as above */ + sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1) + /sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SupportedSULFreqBandItem_1, + 1, /* Elements count */ + &asn_SPC_SupportedSULFreqBandItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/T61String.c b/Bouncer/e2sm_kpm/lib/T61String.c new file mode 100644 index 0000000..d3de88b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/T61String.c @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2003 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * T61String basic type description. + */ +static const ber_tlv_tag_t asn_DEF_T61String_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (20 << 2)), /* [UNIVERSAL 20] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +asn_TYPE_operation_t asn_OP_T61String = { + OCTET_STRING_free, + OCTET_STRING_print, /* non-ascii string */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_T61String = { + "T61String", + "T61String", + &asn_OP_T61String, + asn_DEF_T61String_tags, + sizeof(asn_DEF_T61String_tags) + / sizeof(asn_DEF_T61String_tags[0]) - 1, + asn_DEF_T61String_tags, + sizeof(asn_DEF_T61String_tags) + / sizeof(asn_DEF_T61String_tags[0]), + { 0, 0, asn_generic_unknown_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/TeletexString.c b/Bouncer/e2sm_kpm/lib/TeletexString.c new file mode 100644 index 0000000..9756c72 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/TeletexString.c @@ -0,0 +1,194 @@ +/*- + * Copyright (c) 2003, 2006 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * TeletexString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_TeletexString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (20 << 2)), /* [UNIVERSAL 20] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), /* ... OCTET STRING */ +}; +asn_TYPE_operation_t asn_OP_TeletexString = { + OCTET_STRING_free, + OCTET_STRING_print, /* non-ascii string */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_TeletexString = { + "TeletexString", + "TeletexString", + &asn_OP_TeletexString, + asn_DEF_TeletexString_tags, + sizeof(asn_DEF_TeletexString_tags) + / sizeof(asn_DEF_TeletexString_tags[0]) - 1, + asn_DEF_TeletexString_tags, + sizeof(asn_DEF_TeletexString_tags) + / sizeof(asn_DEF_TeletexString_tags[0]), + { 0, 0, asn_generic_unknown_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +/* + * Here is a formal attempt at creating a mapping from TeletexString + * (T61String) of the latest ASN.1 standard (X.680:2002) into the Unicode + * character set. -- Lev Walkin + * + * The first thing to keep in mind is that TeletexString (T61String) + * is defined in ASN.1, and is not really a T.61 string. + * The T.61 standard is withdrawn by ITU-T and is no longer an authoritative + * reference. See http://www.itu.int/rec/T-REC-T.61 + * + * The X.680 specifies TeletexString (T61String) as a combination of the + * character sets specified by the registration numbers listed in + * ISO International Register of Coded Character Sets to be used with + * Escape Sequences (ISO-2375): + * 6, 87, 102, 103, 106, 107, 126, 144, 150, 153, 156, 164, 165, 168, + * plus SPACE and DELETE characters. + * In addition to that, the X.680 Table 6 NOTE 2 allows using register entries + * 6 and 156 instead of 102 and 103. + * + * The ISO Register itself is available at http://www.itscj.ipsj.or.jp/ISO-IR/ + * + * #6 is ASCII. http://www.itscj.ipsj.or.jp/ISO-IR/006.pdf + * Escapes into: + * G0: ESC 2/8 4/2 ("(B") + * G1: ESC 2/9 4/2 (")B") + * The range is [0x21 .. 0x7e]. Conversion into Unicode + * is simple, because it has one-to-one correspondence. + * #87 is a "Japanese Graphic Character Set for Information Interchange". + * Is a multiple-byte set of 6877 characters. + * The character set is JIS X 0208-1983 (originally JIS C 6226-1983). + * Escapes into: + * G0: ESC 2/4 4/2 ("$B") + * G1: ESC 2/4 2/9 4/2 ("$)B") + * G2: ESC 2/4 2/10 4/2 ("$*B") + * G3: ESC 2/4 2/11 4/2 ("$+B") + * #102 is "Teletex Primary Set of Graphic Characters" and is almost ASCII. + * Escapes into: + * G0: ESC 2/8 7/5 ("(u") + * G1: ESC 2/9 7/5 (")u") + * G2: ESC 2/10 7/5 ("*u") + * G3: ESC 2/11 7/5 ("+u") + * It is almost identical to ASCII, except for ASCII position for '$' + * (DOLLAR SIGN) is filled with '¤' (CURRENCY SIGN), which is U+00A4. + * Also, ASCII positions for '`', '\', '^', '{', '}', '~' are marked + * as "should not be used". + * #103 is a supplementary set of characters used in combination with #102. + * Escapes into: + * G0: ESC 2/8 7/6 ("(v") + * G1: ESC 2/9 7/6 (")v") + * G2: ESC 2/10 7/6 ("*v") + * G3: ESC 2/11 7/6 ("+v") + * Some characters in that character set are combining characters, + * which can only be restrictively used with certain basic Latin letters. + * It can be thought of as a subset of #156 with the exception of 4/12 + * which is UNDERLINE in #103 and absent in #156. + * #106 is a primary set of control functions, used in combination with #107. + * Escapes into: + * C0: ESC 2/1 4/5 ("!E") + * This set is so short I can list it here: + * 0x08 BS BACKSPACE -- same as Unicode + * 0x0a LF LINE FEED -- same as Unicode + * 0x0c FF FORM FEED -- same as Unicode + * 0x0d CR CARRIAGE RETURN -- same as Unicode + * 0x0e LS1 LOCKING SHIFT ONE + * 0x0f LS0 LOCKING SHIFT ZERO + * 0x19 SS2 SINGLE SHIFT TWO + * 0x1a SUB SUBSTITUTE CHARACTER + * 0x1b ESC ESCAPE -- same as Unicode + * 0x1d SS3 SINGLE SHIFT THREE + * The LS1 and LS0 are two magical functions which, respectively, invoke + * the currently designated G1 or G0 set into positions 2/1 to 7/14 + * The SS2 and SS3, respectively, invoke one character of the + * currently designated set G2 and G3. + * The SUB is wholly equivalent to U+001a (SUBSTITUTE) + * #107 is a supplementary set of control functions, used with #106. + * Escapes into: + * C1: ESC 2/2 4/8 ('"H') + * This set contains three special control codes: + * 0x8b PLD PARTIAL LINE DOWN -- similar to + * 0x8c PLU PARTIAL LINE UP -- sumilar to + * 0x9b CSI CONTROL SEQUENCE INTRODUCER + * This set is so out of world we can probably safely ignore it. + * #126 is a "Right-hand Part of the Latin/Greek Alphabet". + * Comprises of 90 characters, including accented letters. + * Escapes into: + * G1: ESC 2/13 4/6 ("-F") + * G2: ESC 2/14 4/6 (".F") + * G3: ESC 2/15 4/6 ("/F") + * Note: This Registration is a subset of ISO-IR 227. + * #144 is a "Cyrillic part of the Latin/Cyrillic Alphabet". + * Comprises of 95 characters. + * Escapes into: + * G1: ESC 2/13 4/12 ("-L") + * G2: ESC 2/14 4/12 (".L") + * G3: ESC 2/15 4/12 ("/L") + * #150 is a "Greek Primary Set of Graphic Characters". + * Comprises of 94 characters. + * Escapes into: + * G0: ESC 2/8 2/1 4/0 ("(!@") + * G1: ESC 2/9 2/1 4/0 (")!@") + * G2: ESC 2/10 2/1 4/0 ("*!@") + * G3: ESC 2/11 2/1 4/0 ("+!@") + * #153 is a "Basic Cyrillic Character Set for 8-bit codes". + * Comprises of 68 characters. + * Escapes into: + * G1: ESC 2/13 4/15 ("-O") + * G2: ESC 2/14 4/15 (".O") + * G3: ESC 2/15 4/15 ("/O") + * #156 is a "Supplementary Set of ISO/IEC 6937:1992" for use with #6 + * Comprises of 87 characters. + * Escapes into: + * G1: ESC 2/13 5/2 ("-R") + * G2: ESC 2/14 5/2 (".R") + * G3: ESC 2/15 5/2 ("/R") + * #164 is a "Hebrew Supplementary Set of Graphic Characters" + * Comprises of 27 characters. + * Escapes into: + * G1: ESC 2/13 5/3 ("-S") + * G2: ESC 2/14 5/3 (".S") + * G3: ESC 2/15 5/3 ("/S") + * #165 is a set of "Codes of the Chinese graphic character set" + * Is a multiple-byte set of 8446 characters. + * Escapes into: + * G0: ESC 2/4 2/8 4/5 ("$(E") + * G1: ESC 2/4 2/9 4/5 ("$)E") + * G2: ESC 2/4 2/10 4/5 ("$*E") + * G3: ESC 2/4 2/11 4/5 ("$+E") + * #168 is a "Japanese Graphic Character Set for Information Interchange" + * A multiple-byte set of 6879 characters updated from #87. + * Escapes into: + * G0: ESC 2/6 4/0 ESC 2/4 4/2 ("&@" "$B") + * G1: ESC 2/6 4/0 ESC 2/4 2/9 4/2 ("&@" "$)B") + * G2: ESC 2/6 4/0 ESC 2/4 2/10 4/2 ("&@" "$*B") + * G3: ESC 2/6 4/0 ESC 2/4 2/11 4/2 ("&@" "$+B") + */ + diff --git a/Bouncer/e2sm_kpm/lib/TestCond-Expression.c b/Bouncer/e2sm_kpm/lib/TestCond-Expression.c new file mode 100644 index 0000000..808341d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/TestCond-Expression.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "TestCond-Expression.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_TestCond_Expression_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_TestCond_Expression_value2enum_1[] = { + { 0, 5, "equal" }, + { 1, 11, "greaterthan" }, + { 2, 8, "lessthan" }, + { 3, 8, "contains" }, + { 4, 7, "present" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_TestCond_Expression_enum2value_1[] = { + 3, /* contains(3) */ + 0, /* equal(0) */ + 1, /* greaterthan(1) */ + 2, /* lessthan(2) */ + 4 /* present(4) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_TestCond_Expression_specs_1 = { + asn_MAP_TestCond_Expression_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_TestCond_Expression_enum2value_1, /* N => "tag"; sorted by N */ + 5, /* Number of elements in the maps */ + 6, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_TestCond_Expression_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_TestCond_Expression = { + "TestCond-Expression", + "TestCond-Expression", + &asn_OP_NativeEnumerated, + asn_DEF_TestCond_Expression_tags_1, + sizeof(asn_DEF_TestCond_Expression_tags_1) + /sizeof(asn_DEF_TestCond_Expression_tags_1[0]), /* 1 */ + asn_DEF_TestCond_Expression_tags_1, /* Same as above */ + sizeof(asn_DEF_TestCond_Expression_tags_1) + /sizeof(asn_DEF_TestCond_Expression_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_TestCond_Expression_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_TestCond_Expression_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/TestCond-Type.c b/Bouncer/e2sm_kpm/lib/TestCond-Type.c new file mode 100644 index 0000000..103efdf --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/TestCond-Type.c @@ -0,0 +1,378 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "TestCond-Type.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_per_constraints_t asn_PER_type_gBR_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_aMBR_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_isStat_constr_8 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_isCatM_constr_11 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_rSRP_constr_14 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_type_rSRQ_constr_17 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_per_constraints_t asn_PER_type_TestCond_Type_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_gBR_value2enum_2[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_gBR_enum2value_2[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_gBR_specs_2 = { + asn_MAP_gBR_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_gBR_enum2value_2, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_gBR_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_gBR_2 = { + "gBR", + "gBR", + &asn_OP_NativeEnumerated, + asn_DEF_gBR_tags_2, + sizeof(asn_DEF_gBR_tags_2) + /sizeof(asn_DEF_gBR_tags_2[0]) - 1, /* 1 */ + asn_DEF_gBR_tags_2, /* Same as above */ + sizeof(asn_DEF_gBR_tags_2) + /sizeof(asn_DEF_gBR_tags_2[0]), /* 2 */ + { 0, &asn_PER_type_gBR_constr_2, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_gBR_specs_2 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_aMBR_value2enum_5[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_aMBR_enum2value_5[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_aMBR_specs_5 = { + asn_MAP_aMBR_value2enum_5, /* "tag" => N; sorted by tag */ + asn_MAP_aMBR_enum2value_5, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_aMBR_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_aMBR_5 = { + "aMBR", + "aMBR", + &asn_OP_NativeEnumerated, + asn_DEF_aMBR_tags_5, + sizeof(asn_DEF_aMBR_tags_5) + /sizeof(asn_DEF_aMBR_tags_5[0]) - 1, /* 1 */ + asn_DEF_aMBR_tags_5, /* Same as above */ + sizeof(asn_DEF_aMBR_tags_5) + /sizeof(asn_DEF_aMBR_tags_5[0]), /* 2 */ + { 0, &asn_PER_type_aMBR_constr_5, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_aMBR_specs_5 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_isStat_value2enum_8[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_isStat_enum2value_8[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_isStat_specs_8 = { + asn_MAP_isStat_value2enum_8, /* "tag" => N; sorted by tag */ + asn_MAP_isStat_enum2value_8, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_isStat_tags_8[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_isStat_8 = { + "isStat", + "isStat", + &asn_OP_NativeEnumerated, + asn_DEF_isStat_tags_8, + sizeof(asn_DEF_isStat_tags_8) + /sizeof(asn_DEF_isStat_tags_8[0]) - 1, /* 1 */ + asn_DEF_isStat_tags_8, /* Same as above */ + sizeof(asn_DEF_isStat_tags_8) + /sizeof(asn_DEF_isStat_tags_8[0]), /* 2 */ + { 0, &asn_PER_type_isStat_constr_8, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_isStat_specs_8 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_isCatM_value2enum_11[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_isCatM_enum2value_11[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_isCatM_specs_11 = { + asn_MAP_isCatM_value2enum_11, /* "tag" => N; sorted by tag */ + asn_MAP_isCatM_enum2value_11, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_isCatM_tags_11[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_isCatM_11 = { + "isCatM", + "isCatM", + &asn_OP_NativeEnumerated, + asn_DEF_isCatM_tags_11, + sizeof(asn_DEF_isCatM_tags_11) + /sizeof(asn_DEF_isCatM_tags_11[0]) - 1, /* 1 */ + asn_DEF_isCatM_tags_11, /* Same as above */ + sizeof(asn_DEF_isCatM_tags_11) + /sizeof(asn_DEF_isCatM_tags_11[0]), /* 2 */ + { 0, &asn_PER_type_isCatM_constr_11, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_isCatM_specs_11 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_rSRP_value2enum_14[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_rSRP_enum2value_14[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_rSRP_specs_14 = { + asn_MAP_rSRP_value2enum_14, /* "tag" => N; sorted by tag */ + asn_MAP_rSRP_enum2value_14, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_rSRP_tags_14[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_rSRP_14 = { + "rSRP", + "rSRP", + &asn_OP_NativeEnumerated, + asn_DEF_rSRP_tags_14, + sizeof(asn_DEF_rSRP_tags_14) + /sizeof(asn_DEF_rSRP_tags_14[0]) - 1, /* 1 */ + asn_DEF_rSRP_tags_14, /* Same as above */ + sizeof(asn_DEF_rSRP_tags_14) + /sizeof(asn_DEF_rSRP_tags_14[0]), /* 2 */ + { 0, &asn_PER_type_rSRP_constr_14, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_rSRP_specs_14 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_rSRQ_value2enum_17[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_rSRQ_enum2value_17[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_rSRQ_specs_17 = { + asn_MAP_rSRQ_value2enum_17, /* "tag" => N; sorted by tag */ + asn_MAP_rSRQ_enum2value_17, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_rSRQ_tags_17[] = { + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_rSRQ_17 = { + "rSRQ", + "rSRQ", + &asn_OP_NativeEnumerated, + asn_DEF_rSRQ_tags_17, + sizeof(asn_DEF_rSRQ_tags_17) + /sizeof(asn_DEF_rSRQ_tags_17[0]) - 1, /* 1 */ + asn_DEF_rSRQ_tags_17, /* Same as above */ + sizeof(asn_DEF_rSRQ_tags_17) + /sizeof(asn_DEF_rSRQ_tags_17[0]), /* 2 */ + { 0, &asn_PER_type_rSRQ_constr_17, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_rSRQ_specs_17 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_TestCond_Type_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Type, choice.gBR), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_gBR_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gBR" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Type, choice.aMBR), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_aMBR_5, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "aMBR" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Type, choice.isStat), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_isStat_8, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "isStat" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Type, choice.isCatM), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_isCatM_11, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "isCatM" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Type, choice.rSRP), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_rSRP_14, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "rSRP" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Type, choice.rSRQ), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_rSRQ_17, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "rSRQ" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_TestCond_Type_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gBR */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aMBR */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* isStat */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* isCatM */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* rSRP */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* rSRQ */ +}; +asn_CHOICE_specifics_t asn_SPC_TestCond_Type_specs_1 = { + sizeof(struct TestCond_Type), + offsetof(struct TestCond_Type, _asn_ctx), + offsetof(struct TestCond_Type, present), + sizeof(((struct TestCond_Type *)0)->present), + asn_MAP_TestCond_Type_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, + 6 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_TestCond_Type = { + "TestCond-Type", + "TestCond-Type", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_TestCond_Type_constr_1, CHOICE_constraint }, + asn_MBR_TestCond_Type_1, + 6, /* Elements count */ + &asn_SPC_TestCond_Type_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/TestCond-Value.c b/Bouncer/e2sm_kpm/lib/TestCond-Value.c new file mode 100644 index 0000000..0b6a55d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/TestCond-Value.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "TestCond-Value.h" + +asn_per_constraints_t asn_PER_type_TestCond_Value_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_TestCond_Value_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Value, choice.valueInt), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueInt" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Value, choice.valueEnum), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueEnum" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Value, choice.valueBool), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueBool" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Value, choice.valueBitS), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueBitS" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Value, choice.valueOctS), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueOctS" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCond_Value, choice.valuePrtS), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valuePrtS" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_TestCond_Value_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* valueInt */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* valueEnum */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* valueBool */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* valueBitS */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* valueOctS */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* valuePrtS */ +}; +asn_CHOICE_specifics_t asn_SPC_TestCond_Value_specs_1 = { + sizeof(struct TestCond_Value), + offsetof(struct TestCond_Value, _asn_ctx), + offsetof(struct TestCond_Value, present), + sizeof(((struct TestCond_Value *)0)->present), + asn_MAP_TestCond_Value_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, + 6 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_TestCond_Value = { + "TestCond-Value", + "TestCond-Value", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_TestCond_Value_constr_1, CHOICE_constraint }, + asn_MBR_TestCond_Value_1, + 6, /* Elements count */ + &asn_SPC_TestCond_Value_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/TestCondInfo.c b/Bouncer/e2sm_kpm/lib/TestCondInfo.c new file mode 100644 index 0000000..6b5be85 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/TestCondInfo.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "TestCondInfo.h" + +asn_TYPE_member_t asn_MBR_TestCondInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TestCondInfo, testType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_TestCond_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "testType" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCondInfo, testExpr), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TestCond_Expression, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "testExpr" + }, + { ATF_NOFLAGS, 0, offsetof(struct TestCondInfo, testValue), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_TestCond_Value, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "testValue" + }, +}; +static const ber_tlv_tag_t asn_DEF_TestCondInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_TestCondInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* testType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* testExpr */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* testValue */ +}; +asn_SEQUENCE_specifics_t asn_SPC_TestCondInfo_specs_1 = { + sizeof(struct TestCondInfo), + offsetof(struct TestCondInfo, _asn_ctx), + asn_MAP_TestCondInfo_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_TestCondInfo = { + "TestCondInfo", + "TestCondInfo", + &asn_OP_SEQUENCE, + asn_DEF_TestCondInfo_tags_1, + sizeof(asn_DEF_TestCondInfo_tags_1) + /sizeof(asn_DEF_TestCondInfo_tags_1[0]), /* 1 */ + asn_DEF_TestCondInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_TestCondInfo_tags_1) + /sizeof(asn_DEF_TestCondInfo_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_TestCondInfo_1, + 3, /* Elements count */ + &asn_SPC_TestCondInfo_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/TimeStamp.c b/Bouncer/e2sm_kpm/lib/TimeStamp.c new file mode 100644 index 0000000..36a5f47 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/TimeStamp.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "kpmv2.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "TimeStamp.h" + +int +TimeStamp_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 4)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +asn_per_constraints_t asn_PER_type_TimeStamp_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_TimeStamp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_TimeStamp = { + "TimeStamp", + "TimeStamp", + &asn_OP_OCTET_STRING, + asn_DEF_TimeStamp_tags_1, + sizeof(asn_DEF_TimeStamp_tags_1) + /sizeof(asn_DEF_TimeStamp_tags_1[0]), /* 1 */ + asn_DEF_TimeStamp_tags_1, /* Same as above */ + sizeof(asn_DEF_TimeStamp_tags_1) + /sizeof(asn_DEF_TimeStamp_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_TimeStamp_constr_1, TimeStamp_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/Timestamp.c b/Bouncer/e2sm_kpm/lib/Timestamp.c new file mode 100644 index 0000000..41a862f --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/Timestamp.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "Timestamp.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Timestamp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Timestamp = { + "Timestamp", + "Timestamp", + &asn_OP_OCTET_STRING, + asn_DEF_Timestamp_tags_1, + sizeof(asn_DEF_Timestamp_tags_1) + /sizeof(asn_DEF_Timestamp_tags_1[0]), /* 1 */ + asn_DEF_Timestamp_tags_1, /* Same as above */ + sizeof(asn_DEF_Timestamp_tags_1) + /sizeof(asn_DEF_Timestamp_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/Trigger-ConditionIE-Item.c b/Bouncer/e2sm_kpm/lib/Trigger-ConditionIE-Item.c new file mode 100644 index 0000000..c434c1b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/Trigger-ConditionIE-Item.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "Trigger-ConditionIE-Item.h" + +asn_TYPE_member_t asn_MBR_Trigger_ConditionIE_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Trigger_ConditionIE_Item, report_Period_IE), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RT_Period_IE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "report-Period-IE" + }, +}; +static const ber_tlv_tag_t asn_DEF_Trigger_ConditionIE_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Trigger_ConditionIE_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* report-Period-IE */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Trigger_ConditionIE_Item_specs_1 = { + sizeof(struct Trigger_ConditionIE_Item), + offsetof(struct Trigger_ConditionIE_Item, _asn_ctx), + asn_MAP_Trigger_ConditionIE_Item_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Trigger_ConditionIE_Item = { + "Trigger-ConditionIE-Item", + "Trigger-ConditionIE-Item", + &asn_OP_SEQUENCE, + asn_DEF_Trigger_ConditionIE_Item_tags_1, + sizeof(asn_DEF_Trigger_ConditionIE_Item_tags_1) + /sizeof(asn_DEF_Trigger_ConditionIE_Item_tags_1[0]), /* 1 */ + asn_DEF_Trigger_ConditionIE_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_Trigger_ConditionIE_Item_tags_1) + /sizeof(asn_DEF_Trigger_ConditionIE_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_Trigger_ConditionIE_Item_1, + 1, /* Elements count */ + &asn_SPC_Trigger_ConditionIE_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UE-Report-Type.c b/Bouncer/e2sm_kpm/lib/UE-Report-Type.c new file mode 100644 index 0000000..34f7512 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UE-Report-Type.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-KPM-IEs" + * found in "e2sm-kpm-v01.02.asn" + * `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example` + */ + +#include "UE-Report-Type.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_UE_Report_Type_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_UE_Report_Type_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_UE_Report_Type_value2enum_1[] = { + { 0, 17, "oDU-Report-Per-UE" }, + { 1, 20, "oCU-CP-Report-Per-UE" }, + { 2, 20, "oCU-UP-Report-Per-UE" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_UE_Report_Type_enum2value_1[] = { + 1, /* oCU-CP-Report-Per-UE(1) */ + 2, /* oCU-UP-Report-Per-UE(2) */ + 0 /* oDU-Report-Per-UE(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_UE_Report_Type_specs_1 = { + asn_MAP_UE_Report_Type_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_UE_Report_Type_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_UE_Report_Type_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_UE_Report_Type = { + "UE-Report-Type", + "UE-Report-Type", + &asn_OP_NativeEnumerated, + asn_DEF_UE_Report_Type_tags_1, + sizeof(asn_DEF_UE_Report_Type_tags_1) + /sizeof(asn_DEF_UE_Report_Type_tags_1[0]), /* 1 */ + asn_DEF_UE_Report_Type_tags_1, /* Same as above */ + sizeof(asn_DEF_UE_Report_Type_tags_1) + /sizeof(asn_DEF_UE_Report_Type_tags_1[0]), /* 1 */ + { &asn_OER_type_UE_Report_Type_constr_1, &asn_PER_type_UE_Report_Type_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_UE_Report_Type_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-EN-GNB.c b/Bouncer/e2sm_kpm/lib/UEID-EN-GNB.c new file mode 100644 index 0000000..16c48e6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-EN-GNB.c @@ -0,0 +1,103 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-EN-GNB.h" + +#include "UEID-GNB-CU-CP-E1AP-ID-List.h" +asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_EN_GNB, m_eNB_UE_X2AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_EN_GNB, m_eNB_UE_X2AP_ID_Extension), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID_Extension, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID-Extension" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_EN_GNB, globalENB_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalENB-ID" + }, + { ATF_POINTER, 3, offsetof(struct UEID_EN_GNB, gNB_CU_UE_F1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UE_F1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_EN_GNB, gNB_CU_CP_UE_E1AP_ID_List), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID-List" + }, + { ATF_POINTER, 1, offsetof(struct UEID_EN_GNB, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, +}; +static const int asn_MAP_UEID_EN_GNB_oms_1[] = { 1, 3, 4, 5 }; +static const ber_tlv_tag_t asn_DEF_UEID_EN_GNB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_EN_GNB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m-eNB-UE-X2AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m-eNB-UE-X2AP-ID-Extension */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* globalENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gNB-CU-UE-F1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* gNB-CU-CP-UE-E1AP-ID-List */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* ran-UEID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_EN_GNB_specs_1 = { + sizeof(struct UEID_EN_GNB), + offsetof(struct UEID_EN_GNB, _asn_ctx), + asn_MAP_UEID_EN_GNB_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_UEID_EN_GNB_oms_1, /* Optional members */ + 4, 0, /* Root/Additions */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_EN_GNB = { + "UEID-EN-GNB", + "UEID-EN-GNB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_EN_GNB_tags_1, + sizeof(asn_DEF_UEID_EN_GNB_tags_1) + /sizeof(asn_DEF_UEID_EN_GNB_tags_1[0]), /* 1 */ + asn_DEF_UEID_EN_GNB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_EN_GNB_tags_1) + /sizeof(asn_DEF_UEID_EN_GNB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_EN_GNB_1, + 6, /* Elements count */ + &asn_SPC_UEID_EN_GNB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-ENB.c b/Bouncer/e2sm_kpm/lib/UEID-ENB.c new file mode 100644 index 0000000..4897f16 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-ENB.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-ENB.h" + +#include "GlobalENB-ID.h" +asn_TYPE_member_t asn_MBR_UEID_ENB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_ENB, mME_UE_S1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MME_UE_S1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "mME-UE-S1AP-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_ENB, gUMMEI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUMMEI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gUMMEI" + }, + { ATF_POINTER, 3, offsetof(struct UEID_ENB, m_eNB_UE_X2AP_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_ENB, m_eNB_UE_X2AP_ID_Extension), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID_Extension, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID-Extension" + }, + { ATF_POINTER, 1, offsetof(struct UEID_ENB, globalENB_ID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalENB-ID" + }, +}; +static const int asn_MAP_UEID_ENB_oms_1[] = { 2, 3, 4 }; +static const ber_tlv_tag_t asn_DEF_UEID_ENB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_ENB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mME-UE-S1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gUMMEI */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m-eNB-UE-X2AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m-eNB-UE-X2AP-ID-Extension */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* globalENB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_ENB_specs_1 = { + sizeof(struct UEID_ENB), + offsetof(struct UEID_ENB, _asn_ctx), + asn_MAP_UEID_ENB_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_UEID_ENB_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_ENB = { + "UEID-ENB", + "UEID-ENB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_ENB_tags_1, + sizeof(asn_DEF_UEID_ENB_tags_1) + /sizeof(asn_DEF_UEID_ENB_tags_1[0]), /* 1 */ + asn_DEF_UEID_ENB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_ENB_tags_1) + /sizeof(asn_DEF_UEID_ENB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_ENB_1, + 5, /* Elements count */ + &asn_SPC_UEID_ENB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c new file mode 100644 index 0000000..05cfbc3 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-CP-E1AP-ID-Item.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_CU_CP_E1AP_ID_Item, gNB_CU_CP_UE_E1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_CP_UE_E1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_CU_CP_E1AP_ID_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-CU-CP-UE-E1AP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_Item_specs_1 = { + sizeof(struct UEID_GNB_CU_CP_E1AP_ID_Item), + offsetof(struct UEID_GNB_CU_CP_E1AP_ID_Item, _asn_ctx), + asn_MAP_UEID_GNB_CU_CP_E1AP_ID_Item_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item = { + "UEID-GNB-CU-CP-E1AP-ID-Item", + "UEID-GNB-CU-CP-E1AP-ID-Item", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_CU_CP_E1AP_ID_Item_1, + 1, /* Elements count */ + &asn_SPC_UEID_GNB_CU_CP_E1AP_ID_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c new file mode 100644 index 0000000..427847d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-CP-E1AP-ID-List.h" + +#include "UEID-GNB-CU-CP-E1AP-ID-Item.h" +asn_per_constraints_t asn_PER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_List_specs_1 = { + sizeof(struct UEID_GNB_CU_CP_E1AP_ID_List), + offsetof(struct UEID_GNB_CU_CP_E1AP_ID_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List = { + "UEID-GNB-CU-CP-E1AP-ID-List", + "UEID-GNB-CU-CP-E1AP-ID-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_UEID_GNB_CU_CP_E1AP_ID_List_1, + 1, /* Single element */ + &asn_SPC_UEID_GNB_CU_CP_E1AP_ID_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c new file mode 100644 index 0000000..4c1cedd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-CP-F1AP-ID-Item.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_F1AP_ID_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_CU_CP_F1AP_ID_Item, gNB_CU_UE_F1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UE_F1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_CU_CP_F1AP_ID_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-CU-UE-F1AP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_F1AP_ID_Item_specs_1 = { + sizeof(struct UEID_GNB_CU_CP_F1AP_ID_Item), + offsetof(struct UEID_GNB_CU_CP_F1AP_ID_Item, _asn_ctx), + asn_MAP_UEID_GNB_CU_CP_F1AP_ID_Item_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item = { + "UEID-GNB-CU-CP-F1AP-ID-Item", + "UEID-GNB-CU-CP-F1AP-ID-Item", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_CU_CP_F1AP_ID_Item_1, + 1, /* Elements count */ + &asn_SPC_UEID_GNB_CU_CP_F1AP_ID_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-F1AP-ID-List.c b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-F1AP-ID-List.c new file mode 100644 index 0000000..578eedc --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-F1AP-ID-List.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-F1AP-ID-List.h" + +#include "UEID-GNB-CU-CP-F1AP-ID-Item.h" +asn_per_constraints_t asn_PER_type_UEID_GNB_CU_F1AP_ID_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_F1AP_ID_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_F1AP_ID_List_specs_1 = { + sizeof(struct UEID_GNB_CU_F1AP_ID_List), + offsetof(struct UEID_GNB_CU_F1AP_ID_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_F1AP_ID_List = { + "UEID-GNB-CU-F1AP-ID-List", + "UEID-GNB-CU-F1AP-ID-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1[0]), /* 1 */ + { 0, &asn_PER_type_UEID_GNB_CU_F1AP_ID_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_UEID_GNB_CU_F1AP_ID_List_1, + 1, /* Single element */ + &asn_SPC_UEID_GNB_CU_F1AP_ID_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-UP.c b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-UP.c new file mode 100644 index 0000000..d8f4b1c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-GNB-CU-UP.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-UP.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_UP_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_CU_UP, gNB_CU_CP_UE_E1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_CP_UE_E1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_GNB_CU_UP, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, +}; +static const int asn_MAP_UEID_GNB_CU_UP_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_UP_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_CU_UP_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-CU-CP-UE-E1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ran-UEID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_UP_specs_1 = { + sizeof(struct UEID_GNB_CU_UP), + offsetof(struct UEID_GNB_CU_UP, _asn_ctx), + asn_MAP_UEID_GNB_CU_UP_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_UEID_GNB_CU_UP_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_UP = { + "UEID-GNB-CU-UP", + "UEID-GNB-CU-UP", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_CU_UP_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_UP_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_CU_UP_1, + 2, /* Elements count */ + &asn_SPC_UEID_GNB_CU_UP_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-GNB-DU.c b/Bouncer/e2sm_kpm/lib/UEID-GNB-DU.c new file mode 100644 index 0000000..3b2eae6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-GNB-DU.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-GNB-DU.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_DU_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_DU, gNB_CU_UE_F1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UE_F1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_GNB_DU, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, +}; +static const int asn_MAP_UEID_GNB_DU_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_DU_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_DU_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-CU-UE-F1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ran-UEID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_DU_specs_1 = { + sizeof(struct UEID_GNB_DU), + offsetof(struct UEID_GNB_DU, _asn_ctx), + asn_MAP_UEID_GNB_DU_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_UEID_GNB_DU_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_DU = { + "UEID-GNB-DU", + "UEID-GNB-DU", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_DU_tags_1, + sizeof(asn_DEF_UEID_GNB_DU_tags_1) + /sizeof(asn_DEF_UEID_GNB_DU_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_DU_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_DU_tags_1) + /sizeof(asn_DEF_UEID_GNB_DU_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_DU_1, + 2, /* Elements count */ + &asn_SPC_UEID_GNB_DU_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-GNB.c b/Bouncer/e2sm_kpm/lib/UEID-GNB.c new file mode 100644 index 0000000..812dbf0 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-GNB.c @@ -0,0 +1,126 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-GNB.h" + +#include "UEID-GNB-CU-F1AP-ID-List.h" +#include "UEID-GNB-CU-CP-E1AP-ID-List.h" +#include "GlobalGNB-ID.h" +#include "GlobalNGRANNodeID.h" +asn_TYPE_member_t asn_MBR_UEID_GNB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB, amf_UE_NGAP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMF_UE_NGAP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "amf-UE-NGAP-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB, guami), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "guami" + }, + { ATF_POINTER, 6, offsetof(struct UEID_GNB, gNB_CU_UE_F1AP_ID_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_F1AP_ID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID-List" + }, + { ATF_POINTER, 5, offsetof(struct UEID_GNB, gNB_CU_CP_UE_E1AP_ID_List), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID-List" + }, + { ATF_POINTER, 4, offsetof(struct UEID_GNB, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, + { ATF_POINTER, 3, offsetof(struct UEID_GNB, m_NG_RAN_UE_XnAP_ID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NG_RANnodeUEXnAPID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-NG-RAN-UE-XnAP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_GNB, globalGNB_ID), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalGNB-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_GNB, globalNG_RANNode_ID), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalNGRANNodeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalNG-RANNode-ID" + }, +}; +static const int asn_MAP_UEID_GNB_oms_1[] = { 2, 3, 4, 5, 6, 7 }; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* amf-UE-NGAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* guami */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gNB-CU-UE-F1AP-ID-List */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gNB-CU-CP-UE-E1AP-ID-List */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ran-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* m-NG-RAN-UE-XnAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* globalGNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* globalNG-RANNode-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_specs_1 = { + sizeof(struct UEID_GNB), + offsetof(struct UEID_GNB, _asn_ctx), + asn_MAP_UEID_GNB_tag2el_1, + 8, /* Count of tags in the map */ + asn_MAP_UEID_GNB_oms_1, /* Optional members */ + 5, 1, /* Root/Additions */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB = { + "UEID-GNB", + "UEID-GNB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_tags_1, + sizeof(asn_DEF_UEID_GNB_tags_1) + /sizeof(asn_DEF_UEID_GNB_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_tags_1) + /sizeof(asn_DEF_UEID_GNB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_1, + 8, /* Elements count */ + &asn_SPC_UEID_GNB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-NG-ENB-DU.c b/Bouncer/e2sm_kpm/lib/UEID-NG-ENB-DU.c new file mode 100644 index 0000000..36a652d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-NG-ENB-DU.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-NG-ENB-DU.h" + +asn_TYPE_member_t asn_MBR_UEID_NG_ENB_DU_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_NG_ENB_DU, ng_eNB_CU_UE_W1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_CU_UE_W1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-CU-UE-W1AP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_NG_ENB_DU_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_NG_ENB_DU_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ng-eNB-CU-UE-W1AP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_DU_specs_1 = { + sizeof(struct UEID_NG_ENB_DU), + offsetof(struct UEID_NG_ENB_DU, _asn_ctx), + asn_MAP_UEID_NG_ENB_DU_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB_DU = { + "UEID-NG-ENB-DU", + "UEID-NG-ENB-DU", + &asn_OP_SEQUENCE, + asn_DEF_UEID_NG_ENB_DU_tags_1, + sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1[0]), /* 1 */ + asn_DEF_UEID_NG_ENB_DU_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_NG_ENB_DU_1, + 1, /* Elements count */ + &asn_SPC_UEID_NG_ENB_DU_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID-NG-ENB.c b/Bouncer/e2sm_kpm/lib/UEID-NG-ENB.c new file mode 100644 index 0000000..cf9fd1e --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID-NG-ENB.c @@ -0,0 +1,104 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID-NG-ENB.h" + +#include "GlobalNgENB-ID.h" +#include "GlobalNGRANNodeID.h" +asn_TYPE_member_t asn_MBR_UEID_NG_ENB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_NG_ENB, amf_UE_NGAP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMF_UE_NGAP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "amf-UE-NGAP-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_NG_ENB, guami), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "guami" + }, + { ATF_POINTER, 4, offsetof(struct UEID_NG_ENB, ng_eNB_CU_UE_W1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_CU_UE_W1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-CU-UE-W1AP-ID" + }, + { ATF_POINTER, 3, offsetof(struct UEID_NG_ENB, m_NG_RAN_UE_XnAP_ID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NG_RANnodeUEXnAPID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-NG-RAN-UE-XnAP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_NG_ENB, globalNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalNgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalNgENB-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_NG_ENB, globalNG_RANNode_ID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalNGRANNodeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalNG-RANNode-ID" + }, +}; +static const int asn_MAP_UEID_NG_ENB_oms_1[] = { 2, 3, 4, 5 }; +static const ber_tlv_tag_t asn_DEF_UEID_NG_ENB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_NG_ENB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* amf-UE-NGAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* guami */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ng-eNB-CU-UE-W1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m-NG-RAN-UE-XnAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* globalNgENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* globalNG-RANNode-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_specs_1 = { + sizeof(struct UEID_NG_ENB), + offsetof(struct UEID_NG_ENB, _asn_ctx), + asn_MAP_UEID_NG_ENB_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_UEID_NG_ENB_oms_1, /* Optional members */ + 3, 1, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB = { + "UEID-NG-ENB", + "UEID-NG-ENB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_NG_ENB_tags_1, + sizeof(asn_DEF_UEID_NG_ENB_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_tags_1[0]), /* 1 */ + asn_DEF_UEID_NG_ENB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_NG_ENB_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_NG_ENB_1, + 6, /* Elements count */ + &asn_SPC_UEID_NG_ENB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UEID.c b/Bouncer/e2sm_kpm/lib/UEID.c new file mode 100644 index 0000000..fcce55c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UEID.c @@ -0,0 +1,119 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "E2SM-COMMON-IEs.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example` + */ + +#include "UEID.h" + +#include "UEID-GNB.h" +#include "UEID-GNB-DU.h" +#include "UEID-GNB-CU-UP.h" +#include "UEID-NG-ENB.h" +#include "UEID-NG-ENB-DU.h" +#include "UEID-EN-GNB.h" +#include "UEID-ENB.h" +asn_per_constraints_t asn_PER_type_UEID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_UEID_1[] = { + { ATF_POINTER, 0, offsetof(struct UEID, choice.gNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.gNB_DU_UEID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_DU, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.gNB_CU_UP_UEID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_UP, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.ng_eNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_NG_ENB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.ng_eNB_DU_UEID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_NG_ENB_DU, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-DU-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.en_gNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_EN_GNB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "en-gNB-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.eNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_ENB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eNB-UEID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-DU-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gNB-CU-UP-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ng-eNB-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ng-eNB-DU-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* en-gNB-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* eNB-UEID */ +}; +asn_CHOICE_specifics_t asn_SPC_UEID_specs_1 = { + sizeof(struct UEID), + offsetof(struct UEID, _asn_ctx), + offsetof(struct UEID, present), + sizeof(((struct UEID *)0)->present), + asn_MAP_UEID_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, + 7 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID = { + "UEID", + "UEID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { 0, &asn_PER_type_UEID_constr_1, CHOICE_constraint }, + asn_MBR_UEID_1, + 7, /* Elements count */ + &asn_SPC_UEID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/UTCTime.c b/Bouncer/e2sm_kpm/lib/UTCTime.c new file mode 100644 index 0000000..07891ac --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UTCTime.c @@ -0,0 +1,277 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +#ifdef __CYGWIN__ +#include "/usr/include/time.h" +#else +#include +#endif /* __CYGWIN__ */ + +#ifndef ASN___INTERNAL_TEST_MODE + +/* + * UTCTime basic type description. + */ +static const ber_tlv_tag_t asn_DEF_UTCTime_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (23 << 2)), /* [UNIVERSAL 23] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), /* [UNIVERSAL 26] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +static asn_per_constraints_t asn_DEF_UTCTime_constraints = { + { APC_CONSTRAINED, 7, 7, 0x20, 0x7e }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + 0, 0 +}; +asn_TYPE_operation_t asn_OP_UTCTime = { + OCTET_STRING_free, + UTCTime_print, + UTCTime_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_decode_xer_utf8, + UTCTime_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + UTCTime_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_UTCTime = { + "UTCTime", + "UTCTime", + &asn_OP_UTCTime, + asn_DEF_UTCTime_tags, + sizeof(asn_DEF_UTCTime_tags) + / sizeof(asn_DEF_UTCTime_tags[0]) - 2, + asn_DEF_UTCTime_tags, + sizeof(asn_DEF_UTCTime_tags) + / sizeof(asn_DEF_UTCTime_tags[0]), + { 0, &asn_DEF_UTCTime_constraints, UTCTime_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +#endif /* ASN___INTERNAL_TEST_MODE */ + +/* + * Check that the time looks like the time. + */ +int +UTCTime_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTCTime_t *st = (const UTCTime_t *)sptr; + time_t tloc; + + errno = EPERM; /* Just an unlikely error code */ + tloc = asn_UT2time(st, 0, 0); + if(tloc == -1 && errno != EPERM) { + ASN__CTFAIL(app_key, td, sptr, "%s: Invalid time format: %s (%s:%d)", + td->name, strerror(errno), __FILE__, __LINE__); + return -1; + } + + return 0; +} + +#ifndef ASN___INTERNAL_TEST_MODE + +asn_enc_rval_t +UTCTime_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + if(flags & XER_F_CANONICAL) { + asn_enc_rval_t rv; + UTCTime_t *ut; + struct tm tm; + + errno = EPERM; + if(asn_UT2time((const UTCTime_t *)sptr, &tm, 1) == -1 + && errno != EPERM) + ASN__ENCODE_FAILED; + + /* Fractions are not allowed in UTCTime */ + ut = asn_time2UT(0, &tm, 1); + if(!ut) ASN__ENCODE_FAILED; + + rv = OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags, + cb, app_key); + OCTET_STRING_free(&asn_DEF_UTCTime, ut, 0); + return rv; + } else { + return OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags, + cb, app_key); + } +} + +#endif /* ASN___INTERNAL_TEST_MODE */ + +int +UTCTime_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const UTCTime_t *st = (const UTCTime_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(st && st->buf) { + char buf[32]; + struct tm tm; + int ret; + + errno = EPERM; + if(asn_UT2time(st, &tm, 1) == -1 && errno != EPERM) + return (cb("", 11, app_key) < 0) ? -1 : 0; + + ret = snprintf(buf, sizeof(buf), + "%04d-%02d-%02d %02d:%02d:%02d (GMT)", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec); + assert(ret > 0 && ret < (int)sizeof(buf)); + return (cb(buf, ret, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +time_t +asn_UT2time(const UTCTime_t *st, struct tm *_tm, int as_gmt) { + char buf[24]; /* "AAMMJJhhmmss+hhmm" + cushion */ + GeneralizedTime_t gt; + + if(!st || !st->buf + || st->size < 11 || st->size >= ((int)sizeof(buf) - 2)) { + errno = EINVAL; + return -1; + } + + gt.buf = (unsigned char *)buf; + gt.size = st->size + 2; + memcpy(gt.buf + 2, st->buf, st->size); + if(st->buf[0] > 0x35) { + /* 19xx */ + gt.buf[0] = 0x31; + gt.buf[1] = 0x39; + } else { + /* 20xx */ + gt.buf[0] = 0x32; + gt.buf[1] = 0x30; + } + + return asn_GT2time(>, _tm, as_gmt); +} + +UTCTime_t * +asn_time2UT(UTCTime_t *opt_ut, const struct tm *tm, int force_gmt) { + GeneralizedTime_t *gt = (GeneralizedTime_t *)opt_ut; + + gt = asn_time2GT(gt, tm, force_gmt); + if(gt == 0) return 0; + + assert(gt->size >= 2); + gt->size -= 2; + memmove(gt->buf, gt->buf + 2, gt->size + 1); + + return (UTCTime_t *)gt; +} + + +asn_random_fill_result_t +UTCTime_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + static const char *values[] = { + "700101000000", "700101000000-0000", "700101000000+0000", + "700101000000Z", "821106210623", "691106210827-0500", + "821106210629Z", + }; + size_t rnd = asn_random_between(0, sizeof(values)/sizeof(values[0])-1); + + (void)constraints; + + if(max_length < sizeof("yymmddhhmmss") && !*sptr) { + return result_skipped; + } + + if(*sptr) { + if(OCTET_STRING_fromBuf(*sptr, values[rnd], -1) != 0) { + if(!sptr) return result_failed; + } + } else { + *sptr = OCTET_STRING_new_fromBuf(td, values[rnd], -1); + if(!sptr) return result_failed; + } + + return result_ok; +} + +int +UTCTime_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const GeneralizedTime_t *a = aptr; + const GeneralizedTime_t *b = bptr; + + (void)td; + + if(a && b) { + time_t at, bt; + int aerr, berr; + + errno = EPERM; + at = asn_UT2time(a, 0, 0); + aerr = errno; + errno = EPERM; + bt = asn_UT2time(b, 0, 0); + berr = errno; + + if(at == -1 && aerr != EPERM) { + if(bt == -1 && berr != EPERM) { + return OCTET_STRING_compare(td, aptr, bptr); + } else { + return -1; + } + } else if(bt == -1 && berr != EPERM) { + return 1; + } else { + /* Both values are valid. */ + } + + if(at < bt) { + return -1; + } else if(at > bt) { + return 1; + } else { + return 0; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } +} + diff --git a/Bouncer/e2sm_kpm/lib/UTF8String.c b/Bouncer/e2sm_kpm/lib/UTF8String.c new file mode 100644 index 0000000..c023ca1 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UTF8String.c @@ -0,0 +1,294 @@ +/*- + * Copyright (c) 2003, 2004, 2006 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * UTF8String basic type description. + */ +static const ber_tlv_tag_t asn_DEF_UTF8String_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), /* [UNIVERSAL 12] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), /* ... OCTET STRING */ +}; +asn_TYPE_operation_t asn_OP_UTF8String = { + OCTET_STRING_free, + UTF8String_print, + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + UTF8String_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_UTF8String = { + "UTF8String", + "UTF8String", + &asn_OP_UTF8String, + asn_DEF_UTF8String_tags, + sizeof(asn_DEF_UTF8String_tags) + / sizeof(asn_DEF_UTF8String_tags[0]) - 1, + asn_DEF_UTF8String_tags, + sizeof(asn_DEF_UTF8String_tags) + / sizeof(asn_DEF_UTF8String_tags[0]), + { 0, 0, UTF8String_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +/* + * This is the table of length expectations. + * The second half of this table is only applicable to the long sequences. + */ +static const int UTF8String_ht[2][16] = { + { /* 0x0 ... 0x7 */ + /* 0000..0111 */ + 1, 1, 1, 1, 1, 1, 1, 1, + /* 1000..1011(0), 1100..1101(2), 1110(3), 1111(-1) */ + 0, 0, 0, 0, 2, 2, 3, -1 }, + { /* 0xF0 .. 0xF7 */ + /* 11110000..11110111 */ + 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 6, 6, -1, -1 } +}; +static const int32_t UTF8String_mv[7] = { 0, 0, + 0x00000080, + 0x00000800, + 0x00010000, + 0x00200000, + 0x04000000 +}; + +/* Internal aliases for return codes */ +#define U8E_TRUNC -1 /* UTF-8 sequence truncated */ +#define U8E_ILLSTART -2 /* Illegal UTF-8 sequence start */ +#define U8E_NOTCONT -3 /* Continuation expectation failed */ +#define U8E_NOTMIN -4 /* Not minimal length encoding */ +#define U8E_EINVAL -5 /* Invalid arguments */ + +int +UTF8String_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + ssize_t len = UTF8String_length((const UTF8String_t *)sptr); + switch(len) { + case U8E_EINVAL: + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given", td->name); + break; + case U8E_TRUNC: + ASN__CTFAIL(app_key, td, sptr, + "%s: truncated UTF-8 sequence (%s:%d)", + td->name, __FILE__, __LINE__); + break; + case U8E_ILLSTART: + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8 illegal start of encoding (%s:%d)", + td->name, __FILE__, __LINE__); + break; + case U8E_NOTCONT: + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8 not continuation (%s:%d)", + td->name, __FILE__, __LINE__); + break; + case U8E_NOTMIN: + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8 not minimal sequence (%s:%d)", + td->name, __FILE__, __LINE__); + break; + } + return (len < 0) ? -1 : 0; +} + +static ssize_t +UTF8String__process(const UTF8String_t *st, uint32_t *dst, size_t dstlen) { + size_t length; + uint8_t *buf = st->buf; + uint8_t *end = buf + st->size; + uint32_t *dstend = dst + dstlen; + + for(length = 0; buf < end; length++) { + int ch = *buf; + uint8_t *cend; + int32_t value; + int want; + + /* Compute the sequence length */ + want = UTF8String_ht[0][ch >> 4]; + switch(want) { + case -1: + /* Second half of the table, long sequence */ + want = UTF8String_ht[1][ch & 0x0F]; + if(want != -1) break; + /* Fall through */ + case 0: + return U8E_ILLSTART; + } + + /* assert(want >= 1 && want <= 6) */ + + /* Check character sequence length */ + if(buf + want > end) return U8E_TRUNC; + + value = ch & (0xff >> want); + cend = buf + want; + for(buf++; buf < cend; buf++) { + ch = *buf; + if(ch < 0x80 || ch > 0xbf) return U8E_NOTCONT; + value = (value << 6) | (ch & 0x3F); + } + if(value < UTF8String_mv[want]) + return U8E_NOTMIN; + if(dst < dstend) + *dst++ = value; /* Record value */ + } + + if(dst < dstend) *dst = 0; /* zero-terminate */ + + return length; +} + + +ssize_t +UTF8String_length(const UTF8String_t *st) { + if(st && st->buf) { + return UTF8String__process(st, 0, 0); + } else { + return U8E_EINVAL; + } +} + +size_t +UTF8String_to_wcs(const UTF8String_t *st, uint32_t *dst, size_t dstlen) { + if(st && st->buf) { + ssize_t ret = UTF8String__process(st, dst, dstlen); + return (ret < 0) ? 0 : ret; + } else { + return 0; + } +} + +int +UTF8String_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(st && st->buf) { + return (cb(st->buf, st->size, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + + +/* + * Biased function for randomizing UTF-8 sequences. + */ +static size_t +UTF8String__random_char(uint8_t *b, size_t size) { + static const struct rnd_value { + const char *value; + size_t size; + } values[] = {{"\0", 1}, + {"\x01", 1}, + {"\x7f", 1}, + {"\xc2\xa2", 2}, + {"\xe2\x82\xac", 3}, + {"\xf0\x90\x8d\x88", 4}, + {"\xf4\x8f\xbf\xbf", 4}}; + + const struct rnd_value *v; + size_t max_idx = 0; + + switch(size) { + case 0: + assert(size != 0); + return 0; + case 1: + max_idx = 2; + break; + case 2: + max_idx = 3; + break; + default: + case 4: + max_idx = sizeof(values) / sizeof(values[0]) - 1; + break; + } + + v = &values[asn_random_between(0, max_idx)]; + memcpy(b, v->value, v->size); + return v->size; +} + +asn_random_fill_result_t +UTF8String_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + uint8_t *buf; + uint8_t *bend; + uint8_t *b; + size_t rnd_len; + size_t idx; + UTF8String_t *st; + + if(max_length == 0 && !*sptr) return result_skipped; + + /* Figure out how far we should go */ + rnd_len = OCTET_STRING_random_length_constrained(td, constraints, + max_length / 4); + + buf = CALLOC(4, rnd_len + 1); + if(!buf) return result_failed; + + bend = &buf[4 * rnd_len]; + + for(b = buf, idx = 0; idx < rnd_len; idx++) { + b += UTF8String__random_char(b, (bend - b)); + } + *(uint8_t *)b = 0; + + if(*sptr) { + st = *sptr; + FREEMEM(st->buf); + } else { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, sizeof(UTF8String_t))); + if(!st) { + FREEMEM(buf); + return result_failed; + } + } + + st->buf = buf; + st->size = b - buf; + + assert(UTF8String_length(st) == (ssize_t)rnd_len); + + return result_ok; +} diff --git a/Bouncer/e2sm_kpm/lib/UniversalString.c b/Bouncer/e2sm_kpm/lib/UniversalString.c new file mode 100644 index 0000000..0f6d796 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/UniversalString.c @@ -0,0 +1,243 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * UniversalString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_UniversalString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (28 << 2)), /* [UNIVERSAL 28] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +asn_OCTET_STRING_specifics_t asn_SPC_UniversalString_specs = { + sizeof(UniversalString_t), + offsetof(UniversalString_t, _asn_ctx), + ASN_OSUBV_U32 /* 32-bits character */ +}; +static asn_per_constraints_t asn_DEF_UniversalString_per_constraints = { + { APC_CONSTRAINED, 32, 32, 0, 2147483647 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, + 0, 0 +}; +asn_TYPE_operation_t asn_OP_UniversalString = { + OCTET_STRING_free, + UniversalString_print, /* Convert into UTF8 and print */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, + UniversalString_decode_xer, /* Convert from UTF-8 */ + UniversalString_encode_xer, /* Convert into UTF-8 */ +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_UniversalString = { + "UniversalString", + "UniversalString", + &asn_OP_UniversalString, + asn_DEF_UniversalString_tags, + sizeof(asn_DEF_UniversalString_tags) + / sizeof(asn_DEF_UniversalString_tags[0]) - 1, + asn_DEF_UniversalString_tags, + sizeof(asn_DEF_UniversalString_tags) + / sizeof(asn_DEF_UniversalString_tags[0]), + { 0, &asn_DEF_UniversalString_per_constraints, UniversalString_constraint }, + 0, 0, /* No members */ + &asn_SPC_UniversalString_specs +}; + +int +UniversalString_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, + void *app_key) { + const UniversalString_t *st = (const UniversalString_t *)sptr; + + if(st && st->buf) { + if(st->size % 4) { + ASN__CTFAIL(app_key, td, sptr, + "%s: invalid size %" ASN_PRI_SIZE " not divisible by 4 (%s:%d)", + td->name, st->size, __FILE__, __LINE__); + return -1; + } + } else { + ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, + __FILE__, __LINE__); + return -1; + } + + return 0; +} + +static ssize_t +UniversalString__dump(const UniversalString_t *st, + asn_app_consume_bytes_f *cb, void *app_key) { + char scratch[128]; /* Scratchpad buffer */ + char *p = scratch; + ssize_t wrote = 0; + uint8_t *ch; + uint8_t *end; + + ch = st->buf; + end = (st->buf + st->size); + for(end -= 3; ch < end; ch += 4) { + uint32_t wc = (ch[0] << 24) + | (ch[1] << 16) + | (ch[2] << 8) + | ch[3]; /* 4 bytes */ + if(sizeof(scratch) - (p - scratch) < 6) { + wrote += p - scratch; + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + p = scratch; + } + if(wc < 0x80) { + *p++ = (char)wc; + } else if(wc < 0x800) { + *p++ = 0xc0 | ((wc >> 6)); + *p++ = 0x80 | ((wc & 0x3f)); + } else if(wc < 0x10000) { + *p++ = 0xe0 | ((wc >> 12)); + *p++ = 0x80 | ((wc >> 6) & 0x3f); + *p++ = 0x80 | ((wc & 0x3f)); + } else if(wc < 0x200000) { + *p++ = 0xf0 | ((wc >> 18)); + *p++ = 0x80 | ((wc >> 12) & 0x3f); + *p++ = 0x80 | ((wc >> 6) & 0x3f); + *p++ = 0x80 | ((wc & 0x3f)); + } else if(wc < 0x4000000) { + *p++ = 0xf8 | ((wc >> 24)); + *p++ = 0x80 | ((wc >> 18) & 0x3f); + *p++ = 0x80 | ((wc >> 12) & 0x3f); + *p++ = 0x80 | ((wc >> 6) & 0x3f); + *p++ = 0x80 | ((wc & 0x3f)); + } else { + *p++ = 0xfc | ((wc >> 30) & 0x1); + *p++ = 0x80 | ((wc >> 24) & 0x3f); + *p++ = 0x80 | ((wc >> 18) & 0x3f); + *p++ = 0x80 | ((wc >> 12) & 0x3f); + *p++ = 0x80 | ((wc >> 6) & 0x3f); + *p++ = 0x80 | ((wc & 0x3f)); + } + } + + wrote += p - scratch; + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + + return wrote; +} + +asn_dec_rval_t +UniversalString_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + asn_dec_rval_t rc; + + rc = OCTET_STRING_decode_xer_utf8(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size); + if(rc.code == RC_OK) { + /* + * Now we have a whole string in UTF-8 format. + * Convert it into UCS-4. + */ + uint32_t *wcs; + size_t wcs_len; + UTF8String_t *st; +#ifndef WORDS_BIGENDIAN + int little_endian = 1; +#endif + + assert(*sptr); + st = (UTF8String_t *)*sptr; + assert(st->buf); + wcs_len = UTF8String_to_wcs(st, 0, 0); + + wcs = (uint32_t *)MALLOC(4 * (wcs_len + 1)); + if(wcs == 0 || UTF8String_to_wcs(st, wcs, wcs_len) != wcs_len) { + rc.code = RC_FAIL; + rc.consumed = 0; + return rc; + } else { + wcs[wcs_len] = 0; /* nul-terminate */ + } + +#ifndef WORDS_BIGENDIAN + if(*(char *)&little_endian) { + /* Swap byte order in encoding */ + uint32_t *wc = wcs; + uint32_t *wc_end = wcs + wcs_len; + for(; wc < wc_end; wc++) { + /* *wc = htonl(*wc); */ + uint32_t wch = *wc; + *((uint8_t *)wc + 0) = wch >> 24; + *((uint8_t *)wc + 1) = wch >> 16; + *((uint8_t *)wc + 2) = wch >> 8; + *((uint8_t *)wc + 3) = wch; + } + } +#endif /* WORDS_BIGENDIAN */ + + FREEMEM(st->buf); + st->buf = (uint8_t *)wcs; + st->size = 4 * wcs_len; + } + return rc; +} + +asn_enc_rval_t +UniversalString_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const UniversalString_t *st = (const UniversalString_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) + ASN__ENCODE_FAILED; + + er.encoded = UniversalString__dump(st, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +int +UniversalString_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const UniversalString_t *st = (const UniversalString_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(!st || !st->buf) return (cb("", 8, app_key) < 0) ? -1 : 0; + + if(UniversalString__dump(st, cb, app_key) < 0) + return -1; + + return 0; +} + diff --git a/Bouncer/e2sm_kpm/lib/VideotexString.c b/Bouncer/e2sm_kpm/lib/VideotexString.c new file mode 100644 index 0000000..69417bd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/VideotexString.c @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2003 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * VideotexString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_VideotexString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (21 << 2)), /* [UNIVERSAL 21] IMPLICIT */ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +asn_TYPE_operation_t asn_OP_VideotexString = { + OCTET_STRING_free, + OCTET_STRING_print, /* non-ascii string */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_VideotexString = { + "VideotexString", + "VideotexString", + &asn_OP_VideotexString, + asn_DEF_VideotexString_tags, + sizeof(asn_DEF_VideotexString_tags) + / sizeof(asn_DEF_VideotexString_tags[0]) - 1, + asn_DEF_VideotexString_tags, + sizeof(asn_DEF_VideotexString_tags) + / sizeof(asn_DEF_VideotexString_tags[0]), + { 0, 0, asn_generic_unknown_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/VisibleString.c b/Bouncer/e2sm_kpm/lib/VisibleString.c new file mode 100644 index 0000000..03fef8b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/VisibleString.c @@ -0,0 +1,99 @@ +/*- + * Copyright (c) 2003, 2006 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * VisibleString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_VisibleString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), /* [UNIVERSAL 26] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +static asn_per_constraints_t asn_DEF_VisibleString_constraints = { + { APC_CONSTRAINED, 7, 7, 0x20, 0x7e }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + 0, 0 +}; +asn_TYPE_operation_t asn_OP_VisibleString = { + OCTET_STRING_free, + OCTET_STRING_print_utf8, /* ASCII subset */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_VisibleString = { + "VisibleString", + "VisibleString", + &asn_OP_VisibleString, + asn_DEF_VisibleString_tags, + sizeof(asn_DEF_VisibleString_tags) + / sizeof(asn_DEF_VisibleString_tags[0]) - 1, + asn_DEF_VisibleString_tags, + sizeof(asn_DEF_VisibleString_tags) + / sizeof(asn_DEF_VisibleString_tags[0]), + { 0, &asn_DEF_VisibleString_constraints, VisibleString_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +int +VisibleString_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const VisibleString_t *st = (const VisibleString_t *)sptr; + + if(st && st->buf) { + uint8_t *buf = st->buf; + uint8_t *end = buf + st->size; + + /* + * Check the alphabet of the VisibleString. + * ISO646, ISOReg#6 + * The alphabet is a subset of ASCII between the space + * and "~" (tilde). + */ + for(; buf < end; buf++) { + if(*buf < 0x20 || *buf > 0x7e) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value byte %ld (%d) " + "not in VisibleString alphabet (%s:%d)", + td->name, + (long)((buf - st->buf) + 1), + *buf, + __FILE__, __LINE__); + return -1; + } + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + return 0; +} diff --git a/Bouncer/e2sm_kpm/lib/asn_SEQUENCE_OF.c b/Bouncer/e2sm_kpm/lib/asn_SEQUENCE_OF.c new file mode 100644 index 0000000..ec952fc --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/asn_SEQUENCE_OF.c @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +typedef A_SEQUENCE_OF(void) asn_sequence; + +void +asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free) { + asn_sequence *as = (asn_sequence *)asn_sequence_of_x; + + if(as) { + void *ptr; + int n; + + if(number < 0 || number >= as->count) + return; /* Nothing to delete */ + + if(_do_free && as->free) { + ptr = as->array[number]; + } else { + ptr = 0; + } + + /* + * Shift all elements to the left to hide the gap. + */ + --as->count; + for(n = number; n < as->count; n++) + as->array[n] = as->array[n+1]; + + /* + * Invoke the third-party function only when the state + * of the parent structure is consistent. + */ + if(ptr) as->free(ptr); + } +} + diff --git a/Bouncer/e2sm_kpm/lib/asn_SET_OF.c b/Bouncer/e2sm_kpm/lib/asn_SET_OF.c new file mode 100644 index 0000000..944f2cb --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/asn_SET_OF.c @@ -0,0 +1,88 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Add another element into the set. + */ +int +asn_set_add(void *asn_set_of_x, void *ptr) { + asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); + + if(as == 0 || ptr == 0) { + errno = EINVAL; /* Invalid arguments */ + return -1; + } + + /* + * Make sure there's enough space to insert an element. + */ + if(as->count == as->size) { + int _newsize = as->size ? (as->size << 1) : 4; + void *_new_arr; + _new_arr = REALLOC(as->array, _newsize * sizeof(as->array[0])); + if(_new_arr) { + as->array = (void **)_new_arr; + as->size = _newsize; + } else { + /* ENOMEM */ + return -1; + } + } + + as->array[as->count++] = ptr; + + return 0; +} + +void +asn_set_del(void *asn_set_of_x, int number, int _do_free) { + asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); + + if(as) { + void *ptr; + if(number < 0 || number >= as->count) + return; + + if(_do_free && as->free) { + ptr = as->array[number]; + } else { + ptr = 0; + } + + as->array[number] = as->array[--as->count]; + + /* + * Invoke the third-party function only when the state + * of the parent structure is consistent. + */ + if(ptr) as->free(ptr); + } +} + +/* + * Free the contents of the set, do not free the set itself. + */ +void +asn_set_empty(void *asn_set_of_x) { + asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); + + if(as) { + if(as->array) { + if(as->free) { + while(as->count--) + as->free(as->array[as->count]); + } + FREEMEM(as->array); + as->array = 0; + } + as->count = 0; + as->size = 0; + } + +} + diff --git a/Bouncer/e2sm_kpm/lib/asn_application.c b/Bouncer/e2sm_kpm/lib/asn_application.c new file mode 100644 index 0000000..2bff460 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/asn_application.c @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +static asn_enc_rval_t asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, + const void *sptr, + asn_app_consume_bytes_f *callback, + void *callback_key); + + +struct callback_count_bytes_key { + asn_app_consume_bytes_f *callback; + void *callback_key; + size_t computed_size; +}; + +/* + * Encoder which just counts bytes that come through it. + */ +static int +callback_count_bytes_cb(const void *data, size_t size, void *keyp) { + struct callback_count_bytes_key *key = keyp; + int ret; + + ret = key->callback(data, size, key->callback_key); + if(ret >= 0) { + key->computed_size += size; + } + + return ret; +} + +struct overrun_encoder_key { + void *buffer; + size_t buffer_size; + size_t computed_size; +}; + +struct dynamic_encoder_key { + void *buffer; + size_t buffer_size; + size_t computed_size; +}; + +struct callback_failure_catch_key { + asn_app_consume_bytes_f *callback; + void *callback_key; + int callback_failed; +}; + +/* + * Encoder which doesn't stop counting bytes + * even if it reaches the end of the buffer. + */ +static int +overrun_encoder_cb(const void *data, size_t size, void *keyp) { + struct overrun_encoder_key *key = keyp; + + if(key->computed_size + size > key->buffer_size) { + /* + * Avoid accident on the next call: + * stop adding bytes to the buffer. + */ + key->buffer_size = 0; + } else { + memcpy((char *)key->buffer + key->computed_size, data, size); + } + key->computed_size += size; + + return 0; +} + +/* + * Encoder which dynamically allocates output, and continues + * to count even if allocation failed. + */ +static int +dynamic_encoder_cb(const void *data, size_t size, void *keyp) { + struct dynamic_encoder_key *key = keyp; + + if(key->buffer) { + if(key->computed_size + size >= key->buffer_size) { + void *p; + size_t new_size = key->buffer_size; + + do { + new_size *= 2; + } while(new_size <= key->computed_size + size); + + p = REALLOC(key->buffer, new_size); + if(p) { + key->buffer = p; + key->buffer_size = new_size; + } else { + FREEMEM(key->buffer); + key->buffer = 0; + key->buffer_size = 0; + key->computed_size += size; + return 0; + } + } + memcpy((char *)key->buffer + key->computed_size, data, size); + } + + key->computed_size += size; + + return 0; +} + +/* + * Encoder which help convert the application level encoder failure into EIO. + */ +static int +callback_failure_catch_cb(const void *data, size_t size, void *keyp) { + struct callback_failure_catch_key *key = keyp; + int ret; + + ret = key->callback(data, size, key->callback_key); + if(ret < 0) { + key->callback_failed = 1; + } + + return ret; +} + +asn_enc_rval_t +asn_encode(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, + const void *sptr, asn_app_consume_bytes_f *callback, void *callback_key) { + struct callback_failure_catch_key cb_key; + asn_enc_rval_t er = {0,0,0}; + + if(!callback) { + errno = EINVAL; + ASN__ENCODE_FAILED; + } + + cb_key.callback = callback; + cb_key.callback_key = callback_key; + cb_key.callback_failed = 0; + + er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, + callback_failure_catch_cb, &cb_key); + if(cb_key.callback_failed) { + assert(er.encoded == -1); + assert(errno == EBADF); + errno = EIO; + } + + return er; +} + +asn_enc_rval_t +asn_encode_to_buffer(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, const void *sptr, + void *buffer, size_t buffer_size) { + struct overrun_encoder_key buf_key; + asn_enc_rval_t er = {0,0,0}; + + if(buffer_size > 0 && !buffer) { + errno = EINVAL; + ASN__ENCODE_FAILED; + } + + buf_key.buffer = buffer; + buf_key.buffer_size = buffer_size; + buf_key.computed_size = 0; + + er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, + overrun_encoder_cb, &buf_key); + + if(er.encoded >= 0 && (size_t)er.encoded != buf_key.computed_size) { + ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE + " yet produced %" ASN_PRI_SIZE " bytes", + er.encoded, buf_key.computed_size); + assert(er.encoded < 0 || (size_t)er.encoded == buf_key.computed_size); + } + + return er; +} + +asn_encode_to_new_buffer_result_t +asn_encode_to_new_buffer(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, const void *sptr) { + struct dynamic_encoder_key buf_key; + asn_encode_to_new_buffer_result_t res; + + buf_key.buffer_size = 16; + buf_key.buffer = MALLOC(buf_key.buffer_size); + buf_key.computed_size = 0; + + res.result = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, + dynamic_encoder_cb, &buf_key); + + if(res.result.encoded >= 0 + && (size_t)res.result.encoded != buf_key.computed_size) { + ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE + " yet produced %" ASN_PRI_SIZE " bytes", + res.result.encoded, buf_key.computed_size); + assert(res.result.encoded < 0 + || (size_t)res.result.encoded == buf_key.computed_size); + } + + res.buffer = buf_key.buffer; + + /* 0-terminate just in case. */ + if(res.buffer) { + assert(buf_key.computed_size < buf_key.buffer_size); + ((char *)res.buffer)[buf_key.computed_size] = '\0'; + } + + return res; +} + +static asn_enc_rval_t +asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *callback, void *callback_key) { + asn_enc_rval_t er = {0,0,0}; + enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL; + + (void)opt_codec_ctx; /* Parameters are not checked on encode yet. */ + + if(!td || !sptr) { + errno = EINVAL; + ASN__ENCODE_FAILED; + } + + switch(syntax) { + case ATS_NONSTANDARD_PLAINTEXT: + if(td->op->print_struct) { + struct callback_count_bytes_key cb_key; + cb_key.callback = callback; + cb_key.callback_key = callback_key; + cb_key.computed_size = 0; + if(td->op->print_struct(td, sptr, 1, callback_count_bytes_cb, + &cb_key) + < 0 + || callback_count_bytes_cb("\n", 1, &cb_key) < 0) { + errno = EBADF; /* Structure has incorrect form. */ + er.encoded = -1; + er.failed_type = td; + er.structure_ptr = sptr; + } else { + er.encoded = cb_key.computed_size; + er.failed_type = 0; + er.structure_ptr = 0; + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + + case ATS_RANDOM: + errno = ENOENT; /* Randomization doesn't make sense on output. */ + ASN__ENCODE_FAILED; + + case ATS_BER: + /* BER is a superset of DER. */ + /* Fall through. */ + case ATS_DER: + if(td->op->der_encoder) { + er = der_encode(td, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->der_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* DER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + case ATS_CER: + errno = ENOENT; /* Transfer syntax is not defined for any type. */ + ASN__ENCODE_FAILED; + +#ifdef ASN_DISABLE_OER_SUPPORT + case ATS_BASIC_OER: + case ATS_CANONICAL_OER: + errno = ENOENT; /* PER is not defined. */ + ASN__ENCODE_FAILED; + break; +#else /* ASN_DISABLE_OER_SUPPORT */ + case ATS_BASIC_OER: + /* CANONICAL-OER is a superset of BASIC-OER. */ + /* Fall through. */ + case ATS_CANONICAL_OER: + if(td->op->oer_encoder) { + er = oer_encode(td, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->oer_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* OER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; +#endif /* ASN_DISABLE_OER_SUPPORT */ + +#ifdef ASN_DISABLE_PER_SUPPORT + case ATS_UNALIGNED_BASIC_PER: + case ATS_UNALIGNED_CANONICAL_PER: + case ATS_ALIGNED_BASIC_PER: + case ATS_ALIGNED_CANONICAL_PER: + errno = ENOENT; /* PER is not defined. */ + ASN__ENCODE_FAILED; + break; +#else /* ASN_DISABLE_PER_SUPPORT */ + case ATS_UNALIGNED_BASIC_PER: + /* CANONICAL-UPER is a superset of BASIC-UPER. */ + /* Fall through. */ + case ATS_UNALIGNED_CANONICAL_PER: + if(td->op->uper_encoder) { + er = uper_encode(td, 0, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->uper_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* UPER is not defined for this type. */ + } + } else { + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + if(er.encoded == 0) { + /* Enforce "Complete Encoding" of X.691 #11.1 */ + if(callback("\0", 1, callback_key) < 0) { + errno = EBADF; + ASN__ENCODE_FAILED; + } + er.encoded = 8; /* Exactly 8 zero bits is added. */ + } + /* Convert bits into bytes */ + er.encoded = (er.encoded + 7) >> 3; + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + case ATS_ALIGNED_BASIC_PER: + /* CANONICAL-APER is a superset of BASIC-APER. */ + /* Fall through. */ + case ATS_ALIGNED_CANONICAL_PER: + if(td->op->aper_encoder) { + er = aper_encode(td, 0, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->aper_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* APER is not defined for this type. */ + } + } else { + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + if(er.encoded == 0) { + /* Enforce "Complete Encoding" of X.691 #11.1 */ + if(callback("\0", 1, callback_key) < 0) { + errno = EBADF; + ASN__ENCODE_FAILED; + } + er.encoded = 8; /* Exactly 8 zero bits is added. */ + } + /* Convert bits into bytes */ + er.encoded = (er.encoded + 7) >> 3; + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; +#endif /* ASN_DISABLE_PER_SUPPORT */ + + case ATS_BASIC_XER: + /* CANONICAL-XER is a superset of BASIC-XER. */ + xer_flags &= ~XER_F_CANONICAL; + xer_flags |= XER_F_BASIC; + /* Fall through. */ + case ATS_CANONICAL_XER: + if(td->op->xer_encoder) { + er = xer_encode(td, sptr, xer_flags, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->xer_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* XER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + + default: + errno = ENOENT; + ASN__ENCODE_FAILED; + } + + return er; +} + +asn_dec_rval_t +asn_decode(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, + void **sptr, const void *buffer, size_t size) { + if(!td || !td->op || !sptr || (size && !buffer)) { + ASN__DECODE_FAILED; + } + + switch(syntax) { + case ATS_CER: + case ATS_NONSTANDARD_PLAINTEXT: + default: + errno = ENOENT; + ASN__DECODE_FAILED; + + case ATS_RANDOM: + if(!td->op->random_fill) { + ASN__DECODE_FAILED; + } else { + if(asn_random_fill(td, sptr, 16000) == 0) { + asn_dec_rval_t ret = {RC_OK, 0}; + return ret; + } else { + ASN__DECODE_FAILED; + } + } + break; + + case ATS_DER: + case ATS_BER: + return ber_decode(opt_codec_ctx, td, sptr, buffer, size); + + case ATS_BASIC_OER: + case ATS_CANONICAL_OER: +#ifdef ASN_DISABLE_OER_SUPPORT + errno = ENOENT; + ASN__DECODE_FAILED; +#else + return oer_decode(opt_codec_ctx, td, sptr, buffer, size); +#endif + + case ATS_UNALIGNED_BASIC_PER: + case ATS_UNALIGNED_CANONICAL_PER: +#ifdef ASN_DISABLE_PER_SUPPORT + errno = ENOENT; + ASN__DECODE_FAILED; +#else + return uper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#endif + + case ATS_ALIGNED_BASIC_PER: + case ATS_ALIGNED_CANONICAL_PER: +#ifdef ASN_DISABLE_PER_SUPPORT + errno = ENOENT; + ASN__DECODE_FAILED; +#else + return aper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#endif + + case ATS_BASIC_XER: + case ATS_CANONICAL_XER: + return xer_decode(opt_codec_ctx, td, sptr, buffer, size); + } +} + diff --git a/Bouncer/e2sm_kpm/lib/asn_bit_data.c b/Bouncer/e2sm_kpm/lib/asn_bit_data.c new file mode 100644 index 0000000..fe4b89b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/asn_bit_data.c @@ -0,0 +1,333 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Create a contiguous non-refillable bit data structure. + * Can be freed by FREEMEM(). + */ +asn_bit_data_t * +asn_bit_data_new_contiguous(const void *data, size_t size_bits) { + size_t size_bytes = (size_bits + 7) / 8; + asn_bit_data_t *pd; + uint8_t *bytes; + + /* Get the extensions map */ + pd = CALLOC(1, sizeof(*pd) + size_bytes + 1); + if(!pd) { + return NULL; + } + bytes = (void *)(((char *)pd) + sizeof(*pd)); + memcpy(bytes, data, size_bytes); + bytes[size_bytes] = 0; + pd->buffer = bytes; + pd->nboff = 0; + pd->nbits = size_bits; + + return pd; +} + + +char * +asn_bit_data_string(asn_bit_data_t *pd) { + static char buf[2][32]; + static int n; + n = (n+1) % 2; + snprintf(buf[n], sizeof(buf[n]), + "{m=%" ASN_PRI_SIZE " span %" ASN_PRI_SIZE "[%" ASN_PRI_SIZE + "..%" ASN_PRI_SIZE "] (%" ASN_PRI_SIZE ")}", + pd->moved, ((uintptr_t)(pd->buffer) & 0xf), pd->nboff, pd->nbits, + pd->nbits - pd->nboff); + return buf[n]; +} + +void +asn_get_undo(asn_bit_data_t *pd, int nbits) { + if((ssize_t)pd->nboff < nbits) { + assert((ssize_t)pd->nboff < nbits); + } else { + pd->nboff -= nbits; + pd->moved -= nbits; + } +} + +/* + * Extract a small number of bits (<= 31) from the specified PER data pointer. + */ +int32_t +asn_get_few_bits(asn_bit_data_t *pd, int nbits) { + size_t off; /* Next after last bit offset */ + ssize_t nleft; /* Number of bits left in this stream */ + uint32_t accum; + const uint8_t *buf; + + if(nbits < 0) + return -1; + + nleft = pd->nbits - pd->nboff; + if(nbits > nleft) { + int32_t tailv, vhead; + if(!pd->refill || nbits > 31) return -1; + /* Accumulate unused bytes before refill */ + ASN_DEBUG("Obtain the rest %d bits (want %d)", + (int)nleft, (int)nbits); + tailv = asn_get_few_bits(pd, nleft); + if(tailv < 0) return -1; + /* Refill (replace pd contents with new data) */ + if(pd->refill(pd)) + return -1; + nbits -= nleft; + vhead = asn_get_few_bits(pd, nbits); + /* Combine the rest of previous pd with the head of new one */ + tailv = (tailv << nbits) | vhead; /* Could == -1 */ + return tailv; + } + + /* + * Normalize position indicator. + */ + if(pd->nboff >= 8) { + pd->buffer += (pd->nboff >> 3); + pd->nbits -= (pd->nboff & ~0x07); + pd->nboff &= 0x07; + } + pd->moved += nbits; + pd->nboff += nbits; + off = pd->nboff; + buf = pd->buffer; + + /* + * Extract specified number of bits. + */ + if(off <= 8) + accum = nbits ? (buf[0]) >> (8 - off) : 0; + else if(off <= 16) + accum = ((buf[0] << 8) + buf[1]) >> (16 - off); + else if(off <= 24) + accum = ((buf[0] << 16) + (buf[1] << 8) + buf[2]) >> (24 - off); + else if(off <= 31) + accum = (((uint32_t)buf[0] << 24) + (buf[1] << 16) + + (buf[2] << 8) + (buf[3])) >> (32 - off); + else if(nbits <= 31) { + asn_bit_data_t tpd = *pd; + /* Here are we with our 31-bits limit plus 1..7 bits offset. */ + asn_get_undo(&tpd, nbits); + /* The number of available bits in the stream allow + * for the following operations to take place without + * invoking the ->refill() function */ + accum = asn_get_few_bits(&tpd, nbits - 24) << 24; + accum |= asn_get_few_bits(&tpd, 24); + } else { + asn_get_undo(pd, nbits); + return -1; + } + + accum &= (((uint32_t)1 << nbits) - 1); + + ASN_DEBUG(" [PER got %2d<=%2d bits => span %d %+ld[%d..%d]:%02x (%d) => 0x%x]", + (int)nbits, (int)nleft, + (int)pd->moved, + (((long)pd->buffer) & 0xf), + (int)pd->nboff, (int)pd->nbits, + ((pd->buffer != NULL)?pd->buffer[0]:0), + (int)(pd->nbits - pd->nboff), + (int)accum); + + return accum; +} + +/* + * Extract a large number of bits from the specified PER data pointer. + */ +int +asn_get_many_bits(asn_bit_data_t *pd, uint8_t *dst, int alright, int nbits) { + int32_t value; + + if(alright && (nbits & 7)) { + /* Perform right alignment of a first few bits */ + value = asn_get_few_bits(pd, nbits & 0x07); + if(value < 0) return -1; + *dst++ = value; /* value is already right-aligned */ + nbits &= ~7; + } + + while(nbits) { + if(nbits >= 24) { + value = asn_get_few_bits(pd, 24); + if(value < 0) return -1; + *(dst++) = value >> 16; + *(dst++) = value >> 8; + *(dst++) = value; + nbits -= 24; + } else { + value = asn_get_few_bits(pd, nbits); + if(value < 0) return -1; + if(nbits & 7) { /* implies left alignment */ + value <<= 8 - (nbits & 7), + nbits += 8 - (nbits & 7); + if(nbits > 24) + *dst++ = value >> 24; + } + if(nbits > 16) + *dst++ = value >> 16; + if(nbits > 8) + *dst++ = value >> 8; + *dst++ = value; + break; + } + } + + return 0; +} + +/* + * Put a small number of bits (<= 31). + */ +int +asn_put_few_bits(asn_bit_outp_t *po, uint32_t bits, int obits) { + size_t off; /* Next after last bit offset */ + size_t omsk; /* Existing last byte meaningful bits mask */ + uint8_t *buf; + + if(obits <= 0 || obits >= 32) return obits ? -1 : 0; + + ASN_DEBUG("[PER put %d bits %x to %p+%d bits]", + obits, (int)bits, (void *)po->buffer, (int)po->nboff); + + /* + * Normalize position indicator. + */ + if(po->nboff >= 8) { + po->buffer += (po->nboff >> 3); + po->nbits -= (po->nboff & ~0x07); + po->nboff &= 0x07; + } + + /* + * Flush whole-bytes output, if necessary. + */ + if(po->nboff + obits > po->nbits) { + size_t complete_bytes; + if(!po->buffer) po->buffer = po->tmpspace; + complete_bytes = (po->buffer - po->tmpspace); + ASN_DEBUG("[PER output %ld complete + %ld]", + (long)complete_bytes, (long)po->flushed_bytes); + if(po->output(po->tmpspace, complete_bytes, po->op_key) < 0) + return -1; + if(po->nboff) + po->tmpspace[0] = po->buffer[0]; + po->buffer = po->tmpspace; + po->nbits = 8 * sizeof(po->tmpspace); + po->flushed_bytes += complete_bytes; + } + + /* + * Now, due to sizeof(tmpspace), we are guaranteed large enough space. + */ + buf = po->buffer; + omsk = ~((1 << (8 - po->nboff)) - 1); + off = (po->nboff + obits); + + /* Clear data of debris before meaningful bits */ + bits &= (((uint32_t)1 << obits) - 1); + + ASN_DEBUG("[PER out %d %u/%x (t=%d,o=%d) %x&%x=%x]", obits, + (int)bits, (int)bits, + (int)po->nboff, (int)off, + buf[0], (int)(omsk&0xff), + (int)(buf[0] & omsk)); + + if(off <= 8) /* Completely within 1 byte */ + po->nboff = off, + bits <<= (8 - off), + buf[0] = (buf[0] & omsk) | bits; + else if(off <= 16) + po->nboff = off, + bits <<= (16 - off), + buf[0] = (buf[0] & omsk) | (bits >> 8), + buf[1] = bits; + else if(off <= 24) + po->nboff = off, + bits <<= (24 - off), + buf[0] = (buf[0] & omsk) | (bits >> 16), + buf[1] = bits >> 8, + buf[2] = bits; + else if(off <= 31) + po->nboff = off, + bits <<= (32 - off), + buf[0] = (buf[0] & omsk) | (bits >> 24), + buf[1] = bits >> 16, + buf[2] = bits >> 8, + buf[3] = bits; + else { + if(asn_put_few_bits(po, bits >> (obits - 24), 24)) return -1; + if(asn_put_few_bits(po, bits, obits - 24)) return -1; + } + + ASN_DEBUG("[PER out %u/%x => %02x buf+%ld]", + (int)bits, (int)bits, buf[0], + (long)(po->buffer - po->tmpspace)); + + return 0; +} + + +/* + * Output a large number of bits. + */ +int +asn_put_many_bits(asn_bit_outp_t *po, const uint8_t *src, int nbits) { + + while(nbits) { + uint32_t value; + + if(nbits >= 24) { + value = (src[0] << 16) | (src[1] << 8) | src[2]; + src += 3; + nbits -= 24; + if(asn_put_few_bits(po, value, 24)) + return -1; + } else { + value = src[0]; + if(nbits > 8) + value = (value << 8) | src[1]; + if(nbits > 16) + value = (value << 8) | src[2]; + if(nbits & 0x07) + value >>= (8 - (nbits & 0x07)); + if(asn_put_few_bits(po, value, nbits)) + return -1; + break; + } + } + + return 0; +} + + +int +asn_put_aligned_flush(asn_bit_outp_t *po) { + uint32_t unused_bits = (0x7 & (8 - (po->nboff & 0x07))); + size_t complete_bytes = + (po->buffer ? po->buffer - po->tmpspace : 0) + ((po->nboff + 7) >> 3); + + if(unused_bits) { + po->buffer[po->nboff >> 3] &= ~0u << unused_bits; + } + + if(po->output(po->tmpspace, complete_bytes, po->op_key) < 0) { + return -1; + } else { + po->buffer = po->tmpspace; + po->nboff = 0; + po->nbits = 8 * sizeof(po->tmpspace); + po->flushed_bytes += complete_bytes; + return 0; + } +} + diff --git a/Bouncer/e2sm_kpm/lib/asn_codecs_prim.c b/Bouncer/e2sm_kpm/lib/asn_codecs_prim.c new file mode 100644 index 0000000..fc24247 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/asn_codecs_prim.c @@ -0,0 +1,317 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Decode an always-primitive type. + */ +asn_dec_rval_t +ber_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buf_ptr, size_t size, int tag_mode) { + ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr; + asn_dec_rval_t rval; + ber_tlv_len_t length = 0; /* =0 to avoid [incorrect] warning. */ + + /* + * If the structure is not there, allocate it. + */ + if(st == NULL) { + st = (ASN__PRIMITIVE_TYPE_t *)CALLOC(1, sizeof(*st)); + if(st == NULL) ASN__DECODE_FAILED; + *sptr = (void *)st; + } + + ASN_DEBUG("Decoding %s as plain primitive (tm=%d)", + td->name, tag_mode); + + /* + * Check tags and extract value length. + */ + rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, + tag_mode, 0, &length, 0); + if(rval.code != RC_OK) + return rval; + + ASN_DEBUG("%s length is %d bytes", td->name, (int)length); + + /* + * Make sure we have this length. + */ + buf_ptr = ((const char *)buf_ptr) + rval.consumed; + size -= rval.consumed; + if(length > (ber_tlv_len_t)size) { + rval.code = RC_WMORE; + rval.consumed = 0; + return rval; + } + + st->size = (int)length; + /* The following better be optimized away. */ + if(sizeof(st->size) != sizeof(length) + && (ber_tlv_len_t)st->size != length) { + st->size = 0; + ASN__DECODE_FAILED; + } + + st->buf = (uint8_t *)MALLOC(length + 1); + if(!st->buf) { + st->size = 0; + ASN__DECODE_FAILED; + } + + memcpy(st->buf, buf_ptr, length); + st->buf[length] = '\0'; /* Just in case */ + + rval.code = RC_OK; + rval.consumed += length; + + ASN_DEBUG("Took %ld/%ld bytes to encode %s", + (long)rval.consumed, + (long)length, td->name); + + return rval; +} + +/* + * Encode an always-primitive type using DER. + */ +asn_enc_rval_t +der_encode_primitive(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t erval = {0,0,0}; + const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr; + + ASN_DEBUG("%s %s as a primitive type (tm=%d)", + cb?"Encoding":"Estimating", td->name, tag_mode); + + erval.encoded = der_write_tags(td, st->size, tag_mode, 0, tag, + cb, app_key); + ASN_DEBUG("%s wrote tags %d", td->name, (int)erval.encoded); + if(erval.encoded == -1) { + erval.failed_type = td; + erval.structure_ptr = sptr; + return erval; + } + + if(cb && st->buf) { + if(cb(st->buf, st->size, app_key) < 0) { + erval.encoded = -1; + erval.failed_type = td; + erval.structure_ptr = sptr; + return erval; + } + } else { + assert(st->buf || st->size == 0); + } + + erval.encoded += st->size; + ASN__ENCODED_OK(erval); +} + +void +ASN__PRIMITIVE_TYPE_free(const asn_TYPE_descriptor_t *td, void *sptr, + enum asn_struct_free_method method) { + ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)sptr; + + if(!td || !sptr) + return; + + ASN_DEBUG("Freeing %s as a primitive type", td->name); + + if(st->buf) + FREEMEM(st->buf); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(sptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(sptr, 0, sizeof(ASN__PRIMITIVE_TYPE_t)); + break; + } +} + + +/* + * Local internal type passed around as an argument. + */ +struct xdp_arg_s { + const asn_TYPE_descriptor_t *type_descriptor; + void *struct_key; + xer_primitive_body_decoder_f *prim_body_decoder; + int decoded_something; + int want_more; +}; + +/* + * Since some kinds of primitive values can be encoded using value-specific + * tags (, , etc), the primitive decoder must + * be supplied with such tags to parse them as needed. + */ +static int +xer_decode__unexpected_tag(void *key, const void *chunk_buf, size_t chunk_size) { + struct xdp_arg_s *arg = (struct xdp_arg_s *)key; + enum xer_pbd_rval bret; + + /* + * The chunk_buf is guaranteed to start at '<'. + */ + assert(chunk_size && ((const char *)chunk_buf)[0] == 0x3c); + + /* + * Decoding was performed once already. Prohibit doing it again. + */ + if(arg->decoded_something) + return -1; + + bret = arg->prim_body_decoder(arg->type_descriptor, + arg->struct_key, chunk_buf, chunk_size); + switch(bret) { + case XPBD_SYSTEM_FAILURE: + case XPBD_DECODER_LIMIT: + case XPBD_BROKEN_ENCODING: + break; + case XPBD_BODY_CONSUMED: + /* Tag decoded successfully */ + arg->decoded_something = 1; + /* Fall through */ + case XPBD_NOT_BODY_IGNORE: /* Safe to proceed further */ + return 0; + } + + return -1; +} + +static ssize_t +xer_decode__primitive_body(void *key, const void *chunk_buf, size_t chunk_size, int have_more) { + struct xdp_arg_s *arg = (struct xdp_arg_s *)key; + enum xer_pbd_rval bret; + size_t lead_wsp_size; + + if(arg->decoded_something) { + if(xer_whitespace_span(chunk_buf, chunk_size) == chunk_size) { + /* + * Example: + * "123 " + * ^- chunk_buf position. + */ + return chunk_size; + } + /* + * Decoding was done once already. Prohibit doing it again. + */ + return -1; + } + + if(!have_more) { + /* + * If we've received something like "1", we can't really + * tell whether it is really `1` or `123`, until we know + * that there is no more data coming. + * The have_more argument will be set to 1 once something + * like this is available to the caller of this callback: + * "1want_more = 1; + return -1; + } + + lead_wsp_size = xer_whitespace_span(chunk_buf, chunk_size); + chunk_buf = (const char *)chunk_buf + lead_wsp_size; + chunk_size -= lead_wsp_size; + + bret = arg->prim_body_decoder(arg->type_descriptor, + arg->struct_key, chunk_buf, chunk_size); + switch(bret) { + case XPBD_SYSTEM_FAILURE: + case XPBD_DECODER_LIMIT: + case XPBD_BROKEN_ENCODING: + break; + case XPBD_BODY_CONSUMED: + /* Tag decoded successfully */ + arg->decoded_something = 1; + /* Fall through */ + case XPBD_NOT_BODY_IGNORE: /* Safe to proceed further */ + return lead_wsp_size + chunk_size; + } + + return -1; +} + + +asn_dec_rval_t +xer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + size_t struct_size, const char *opt_mname, + const void *buf_ptr, size_t size, + xer_primitive_body_decoder_f *prim_body_decoder) { + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + asn_struct_ctx_t s_ctx; + struct xdp_arg_s s_arg; + asn_dec_rval_t rc; + + /* + * Create the structure if does not exist. + */ + if(!*sptr) { + *sptr = CALLOC(1, struct_size); + if(!*sptr) ASN__DECODE_FAILED; + } + + memset(&s_ctx, 0, sizeof(s_ctx)); + s_arg.type_descriptor = td; + s_arg.struct_key = *sptr; + s_arg.prim_body_decoder = prim_body_decoder; + s_arg.decoded_something = 0; + s_arg.want_more = 0; + + rc = xer_decode_general(opt_codec_ctx, &s_ctx, &s_arg, + xml_tag, buf_ptr, size, + xer_decode__unexpected_tag, xer_decode__primitive_body); + switch(rc.code) { + case RC_OK: + if(!s_arg.decoded_something) { + char ch; + ASN_DEBUG("Primitive body is not recognized, " + "supplying empty one"); + /* + * Decoding opportunity has come and gone. + * Where's the result? + * Try to feed with empty body, see if it eats it. + */ + if(prim_body_decoder(s_arg.type_descriptor, + s_arg.struct_key, &ch, 0) + != XPBD_BODY_CONSUMED) { + /* + * This decoder does not like empty stuff. + */ + ASN__DECODE_FAILED; + } + } + break; + case RC_WMORE: + /* + * Redo the whole thing later. + * We don't have a context to save intermediate parsing state. + */ + rc.consumed = 0; + break; + case RC_FAIL: + rc.consumed = 0; + if(s_arg.want_more) + rc.code = RC_WMORE; + else + ASN__DECODE_FAILED; + break; + } + return rc; +} + diff --git a/Bouncer/e2sm_kpm/lib/asn_internal.c b/Bouncer/e2sm_kpm/lib/asn_internal.c new file mode 100644 index 0000000..004660b --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/asn_internal.c @@ -0,0 +1,49 @@ +#include + +ssize_t +asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key, + const char *fmt, ...) { + char scratch[64]; + char *buf = scratch; + size_t buf_size = sizeof(scratch); + int wrote; + int cb_ret; + + do { + va_list args; + va_start(args, fmt); + + wrote = vsnprintf(buf, buf_size, fmt, args); + if(wrote < (ssize_t)buf_size) { + if(wrote < 0) { + if(buf != scratch) FREEMEM(buf); + va_end(args); + return -1; + } + break; + } + + buf_size <<= 1; + if(buf == scratch) { + buf = MALLOC(buf_size); + if(!buf) { va_end(args); return -1; } + } else { + void *p = REALLOC(buf, buf_size); + if(!p) { + FREEMEM(buf); + va_end(args); + return -1; + } + buf = p; + } + } while(1); + + cb_ret = cb(buf, wrote, key); + if(buf != scratch) FREEMEM(buf); + if(cb_ret < 0) { + return -1; + } + + return wrote; +} + diff --git a/Bouncer/e2sm_kpm/lib/asn_random_fill.c b/Bouncer/e2sm_kpm/lib/asn_random_fill.c new file mode 100644 index 0000000..819cf70 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/asn_random_fill.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +int +asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr, + size_t length) { + + if(td && td->op->random_fill) { + asn_random_fill_result_t res = + td->op->random_fill(td, struct_ptr, 0, length); + return (res.code == ARFILL_OK) ? 0 : -1; + } else { + return -1; + } +} + +static uintmax_t +asn__intmax_range(intmax_t lb, intmax_t ub) { + assert(lb <= ub); + if((ub < 0) == (lb < 0)) { + return ub - lb; + } else if(lb < 0) { + return 1 + ((uintmax_t)ub + (uintmax_t)-(lb + 1)); + } else { + assert(!"Unreachable"); + return 0; + } +} + +intmax_t +asn_random_between(intmax_t lb, intmax_t rb) { + if(lb == rb) { + return lb; + } else { + const uintmax_t intmax_max = ((~(uintmax_t)0) >> 1); + uintmax_t range = asn__intmax_range(lb, rb); + uintmax_t value = 0; + uintmax_t got_entropy = 0; + + assert(RAND_MAX > 0xffffff); /* Seen 7ffffffd! */ + assert(range < intmax_max); + + for(; got_entropy < range;) { + got_entropy = (got_entropy << 24) | 0xffffff; + value = (value << 24) | (random() % 0xffffff); + } + + return lb + (intmax_t)(value % (range + 1)); + } +} diff --git a/Bouncer/e2sm_kpm/lib/ber_decoder.c b/Bouncer/e2sm_kpm/lib/ber_decoder.c new file mode 100644 index 0000000..75d6016 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ber_decoder.c @@ -0,0 +1,283 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include + +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) +#undef RETURN +#define RETURN(_code) do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + if(opt_ctx) opt_ctx->step = step; /* Save context */ \ + if(_code == RC_OK || opt_ctx) \ + rval.consumed = consumed_myself; \ + else \ + rval.consumed = 0; /* Context-free */ \ + return rval; \ + } while(0) + +/* + * The BER decoder of any type. + */ +asn_dec_rval_t +ber_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, + const void *ptr, size_t size) { + asn_codec_ctx_t s_codec_ctx; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* + * Invoke type-specific decoder. + */ + return type_descriptor->op->ber_decoder(opt_codec_ctx, type_descriptor, + struct_ptr, /* Pointer to the destination structure */ + ptr, size, /* Buffer and its size */ + 0 /* Default tag mode is 0 */ + ); +} + +/* + * Check the set of >> tags matches the definition. + */ +asn_dec_rval_t +ber_check_tags(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, asn_struct_ctx_t *opt_ctx, + const void *ptr, size_t size, int tag_mode, int last_tag_form, + ber_tlv_len_t *last_length, int *opt_tlv_form) { + ssize_t consumed_myself = 0; + ssize_t tag_len; + ssize_t len_len; + ber_tlv_tag_t tlv_tag; + ber_tlv_len_t tlv_len; + ber_tlv_len_t limit_len = -1; + int expect_00_terminators = 0; + int tlv_constr = -1; /* If CHOICE, opt_tlv_form is not given */ + int step = opt_ctx ? opt_ctx->step : 0; /* Where we left previously */ + int tagno; + + /* + * Make sure we didn't exceed the maximum stack size. + */ + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + RETURN(RC_FAIL); + + /* + * So what does all this implicit skip stuff mean? + * Imagine two types, + * A ::= [5] IMPLICIT T + * B ::= [2] EXPLICIT T + * Where T is defined as + * T ::= [4] IMPLICIT SEQUENCE { ... } + * + * Let's say, we are starting to decode type A, given the + * following TLV stream: <5> <0>. What does this mean? + * It means that the type A contains type T which is, + * in turn, empty. + * Remember though, that we are still in A. We cannot + * just pass control to the type T decoder. Why? Because + * the type T decoder expects <4> <0>, not <5> <0>. + * So, we must make sure we are going to receive <5> while + * still in A, then pass control to the T decoder, indicating + * that the tag <4> was implicitly skipped. The decoder of T + * hence will be prepared to treat <4> as valid tag, and decode + * it appropriately. + */ + + tagno = step /* Continuing where left previously */ + + (tag_mode==1?-1:0) + ; + ASN_DEBUG("ber_check_tags(%s, size=%ld, tm=%d, step=%d, tagno=%d)", + td->name, (long)size, tag_mode, step, tagno); + /* assert(td->tags_count >= 1) May not be the case for CHOICE or ANY */ + + if(tag_mode == 0 && tagno == (int)td->tags_count) { + /* + * This must be the _untagged_ ANY type, + * which outermost tag isn't known in advance. + * Fetch the tag and length separately. + */ + tag_len = ber_fetch_tag(ptr, size, &tlv_tag); + switch(tag_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + tlv_constr = BER_TLV_CONSTRUCTED(ptr); + len_len = ber_fetch_length(tlv_constr, + (const char *)ptr + tag_len, size - tag_len, &tlv_len); + switch(len_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + ASN_DEBUG("Advancing %ld in ANY case", + (long)(tag_len + len_len)); + ADVANCE(tag_len + len_len); + } else { + assert(tagno < (int)td->tags_count); /* At least one loop */ + } + for((void)tagno; tagno < (int)td->tags_count; tagno++, step++) { + + /* + * Fetch and process T from TLV. + */ + tag_len = ber_fetch_tag(ptr, size, &tlv_tag); + ASN_DEBUG("Fetching tag from {%p,%ld}: " + "len %ld, step %d, tagno %d got %s", + ptr, (long)size, + (long)tag_len, step, tagno, + ber_tlv_tag_string(tlv_tag)); + switch(tag_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + tlv_constr = BER_TLV_CONSTRUCTED(ptr); + + /* + * If {I}, don't check anything. + * If {I,B,C}, check B and C unless we're at I. + */ + if(tag_mode != 0 && step == 0) { + /* + * We don't expect tag to match here. + * It's just because we don't know how the tag + * is supposed to look like. + */ + } else { + assert(tagno >= 0); /* Guaranteed by the code above */ + if(tlv_tag != td->tags[tagno]) { + /* + * Unexpected tag. Too bad. + */ + ASN_DEBUG("Expected: %s, " + "expectation failed (tn=%d, tm=%d)", + ber_tlv_tag_string(td->tags[tagno]), + tagno, tag_mode + ); + RETURN(RC_FAIL); + } + } + + /* + * Attention: if there are more tags expected, + * ensure that the current tag is presented + * in constructed form (it contains other tags!). + * If this one is the last one, check that the tag form + * matches the one given in descriptor. + */ + if(tagno < ((int)td->tags_count - 1)) { + if(tlv_constr == 0) { + ASN_DEBUG("tlv_constr = %d, expfail", + tlv_constr); + RETURN(RC_FAIL); + } + } else { + if(last_tag_form != tlv_constr + && last_tag_form != -1) { + ASN_DEBUG("last_tag_form %d != %d", + last_tag_form, tlv_constr); + RETURN(RC_FAIL); + } + } + + /* + * Fetch and process L from TLV. + */ + len_len = ber_fetch_length(tlv_constr, + (const char *)ptr + tag_len, size - tag_len, &tlv_len); + ASN_DEBUG("Fetching len = %ld", (long)len_len); + switch(len_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + /* + * FIXME + * As of today, the chain of tags + * must either contain several indefinite length TLVs, + * or several definite length ones. + * No mixing is allowed. + */ + if(tlv_len == -1) { + /* + * Indefinite length. + */ + if(limit_len == -1) { + expect_00_terminators++; + } else { + ASN_DEBUG("Unexpected indefinite length " + "in a chain of definite lengths"); + RETURN(RC_FAIL); + } + ADVANCE(tag_len + len_len); + continue; + } else { + if(expect_00_terminators) { + ASN_DEBUG("Unexpected definite length " + "in a chain of indefinite lengths"); + RETURN(RC_FAIL); + } + } + + /* + * Check that multiple TLVs specify ever decreasing length, + * which is consistent. + */ + if(limit_len == -1) { + limit_len = tlv_len + tag_len + len_len; + if(limit_len < 0) { + /* Too great tlv_len value? */ + RETURN(RC_FAIL); + } + } else if(limit_len != tlv_len + tag_len + len_len) { + /* + * Inner TLV specifies length which is inconsistent + * with the outer TLV's length value. + */ + ASN_DEBUG("Outer TLV is %ld and inner is %ld", + (long)limit_len, (long)tlv_len); + RETURN(RC_FAIL); + } + + ADVANCE(tag_len + len_len); + + limit_len -= (tag_len + len_len); + if((ssize_t)size > limit_len) { + /* + * Make sure that we won't consume more bytes + * from the parent frame than the inferred limit. + */ + size = limit_len; + } + } + + if(opt_tlv_form) + *opt_tlv_form = tlv_constr; + if(expect_00_terminators) + *last_length = -expect_00_terminators; + else + *last_length = tlv_len; + + RETURN(RC_OK); +} diff --git a/Bouncer/e2sm_kpm/lib/ber_tlv_length.c b/Bouncer/e2sm_kpm/lib/ber_tlv_length.c new file mode 100644 index 0000000..0a0deec --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ber_tlv_length.c @@ -0,0 +1,168 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +ssize_t +ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, + ber_tlv_len_t *len_r) { + const uint8_t *buf = (const uint8_t *)bufptr; + unsigned oct; + + if(size == 0) + return 0; /* Want more */ + + oct = *(const uint8_t *)buf; + if((oct & 0x80) == 0) { + /* + * Short definite length. + */ + *len_r = oct; /* & 0x7F */ + return 1; + } else { + ber_tlv_len_t len; + size_t skipped; + + if(_is_constructed && oct == 0x80) { + *len_r = -1; /* Indefinite length */ + return 1; + } + + if(oct == 0xff) { + /* Reserved in standard for future use. */ + return -1; + } + + oct &= 0x7F; /* Leave only the 7 LS bits */ + for(len = 0, buf++, skipped = 1; + oct && (++skipped <= size); buf++, oct--) { + + /* Verify that we won't overflow. */ + if(!(len >> ((8 * sizeof(len)) - (8+1)))) { + len = (len << 8) | *buf; + } else { + /* Too large length value. */ + return -1; + } + } + + if(oct == 0) { + if(len < 0 || len > RSSIZE_MAX) { + /* Length value out of sane range. */ + return -1; + } + + *len_r = len; + return skipped; + } + + return 0; /* Want more */ + } + +} + +ssize_t +ber_skip_length(const asn_codec_ctx_t *opt_codec_ctx, + int _is_constructed, const void *ptr, size_t size) { + ber_tlv_len_t vlen; /* Length of V in TLV */ + ssize_t tl; /* Length of L in TLV */ + ssize_t ll; /* Length of L in TLV */ + size_t skip; + + /* + * Make sure we didn't exceed the maximum stack size. + */ + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + return -1; + + /* + * Determine the size of L in TLV. + */ + ll = ber_fetch_length(_is_constructed, ptr, size, &vlen); + if(ll <= 0) return ll; + + /* + * Definite length. + */ + if(vlen >= 0) { + skip = ll + vlen; + if(skip > size) + return 0; /* Want more */ + return skip; + } + + /* + * Indefinite length! + */ + ASN_DEBUG("Skipping indefinite length"); + for(skip = ll, ptr = ((const char *)ptr) + ll, size -= ll;;) { + ber_tlv_tag_t tag; + + /* Fetch the tag */ + tl = ber_fetch_tag(ptr, size, &tag); + if(tl <= 0) return tl; + + ll = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + ((const char *)ptr) + tl, size - tl); + if(ll <= 0) return ll; + + skip += tl + ll; + + /* + * This may be the end of the indefinite length structure, + * two consecutive 0 octets. + * Check if it is true. + */ + if(((const uint8_t *)ptr)[0] == 0 + && ((const uint8_t *)ptr)[1] == 0) + return skip; + + ptr = ((const char *)ptr) + tl + ll; + size -= tl + ll; + } + + /* UNREACHABLE */ +} + +size_t +der_tlv_length_serialize(ber_tlv_len_t len, void *bufp, size_t size) { + size_t required_size; /* Size of len encoding */ + uint8_t *buf = (uint8_t *)bufp; + uint8_t *end; + int i; + + if(len <= 127) { + /* Encoded in 1 octet */ + if(size) *buf = (uint8_t)len; + return 1; + } + + /* + * Compute the size of the subsequent bytes. + */ + for(required_size = 1, i = 8; i < 8 * (int)sizeof(len); i += 8) { + if(len >> i) + required_size++; + else + break; + } + + if(size <= required_size) + return required_size + 1; + + *buf++ = (uint8_t)(0x80 | required_size); /* Length of the encoding */ + + /* + * Produce the len encoding, space permitting. + */ + end = buf + required_size; + for(i -= 8; buf < end; i -= 8, buf++) + *buf = (uint8_t)(len >> i); + + return required_size + 1; +} + diff --git a/Bouncer/e2sm_kpm/lib/ber_tlv_tag.c b/Bouncer/e2sm_kpm/lib/ber_tlv_tag.c new file mode 100644 index 0000000..4a7d732 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/ber_tlv_tag.c @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +ssize_t +ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { + ber_tlv_tag_t val; + ber_tlv_tag_t tclass; + size_t skipped; + + if(size == 0) + return 0; + + val = *(const uint8_t *)ptr; + tclass = (val >> 6); + if((val &= 0x1F) != 0x1F) { + /* + * Simple form: everything encoded in a single octet. + * Tag Class is encoded using two least significant bits. + */ + *tag_r = (val << 2) | tclass; + return 1; + } + + /* + * Each octet contains 7 bits of useful information. + * The MSB is 0 if it is the last octet of the tag. + */ + for(val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; + skipped <= size; + ptr = ((const char *)ptr) + 1, skipped++) { + unsigned int oct = *(const uint8_t *)ptr; + if(oct & 0x80) { + val = (val << 7) | (oct & 0x7F); + /* + * Make sure there are at least 9 bits spare + * at the MS side of a value. + */ + if(val >> ((8 * sizeof(val)) - 9)) { + /* + * We would not be able to accomodate + * any more tag bits. + */ + return -1; + } + } else { + val = (val << 7) | oct; + *tag_r = (val << 2) | tclass; + return skipped; + } + } + + return 0; /* Want more */ +} + + +ssize_t +ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *f) { + char buf[sizeof("[APPLICATION ]") + 32]; + ssize_t ret; + + ret = ber_tlv_tag_snprint(tag, buf, sizeof(buf)); + if(ret >= (ssize_t)sizeof(buf) || ret < 2) { + errno = EPERM; + return -1; + } + + return fwrite(buf, 1, ret, f); +} + +ssize_t +ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t size) { + const char *type = 0; + int ret; + + switch(tag & 0x3) { + case ASN_TAG_CLASS_UNIVERSAL: type = "UNIVERSAL "; break; + case ASN_TAG_CLASS_APPLICATION: type = "APPLICATION "; break; + case ASN_TAG_CLASS_CONTEXT: type = ""; break; + case ASN_TAG_CLASS_PRIVATE: type = "PRIVATE "; break; + } + + ret = snprintf(buf, size, "[%s%u]", type, ((unsigned)tag) >> 2); + if(ret <= 0 && size) buf[0] = '\0'; /* against broken libc's */ + + return ret; +} + +char * +ber_tlv_tag_string(ber_tlv_tag_t tag) { + static char buf[sizeof("[APPLICATION ]") + 32]; + + (void)ber_tlv_tag_snprint(tag, buf, sizeof(buf)); + + return buf; +} + + +size_t +ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufp, size_t size) { + int tclass = BER_TAG_CLASS(tag); + ber_tlv_tag_t tval = BER_TAG_VALUE(tag); + uint8_t *buf = (uint8_t *)bufp; + uint8_t *end; + size_t required_size; + size_t i; + + if(tval <= 30) { + /* Encoded in 1 octet */ + if(size) buf[0] = (tclass << 6) | tval; + return 1; + } else if(size) { + *buf++ = (tclass << 6) | 0x1F; + size--; + } + + /* + * Compute the size of the subsequent bytes. + */ + for(required_size = 1, i = 7; i < 8 * sizeof(tval); i += 7) { + if(tval >> i) + required_size++; + else + break; + } + + if(size < required_size) + return required_size + 1; + + /* + * Fill in the buffer, space permitting. + */ + end = buf + required_size - 1; + for(i -= 7; buf < end; i -= 7, buf++) + *buf = 0x80 | ((tval >> i) & 0x7F); + *buf = (tval & 0x7F); /* Last octet without high bit */ + + return required_size + 1; +} + diff --git a/Bouncer/e2sm_kpm/lib/constr_CHOICE.c b/Bouncer/e2sm_kpm/lib/constr_CHOICE.c new file mode 100644 index 0000000..86dcbb0 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_CHOICE.c @@ -0,0 +1,1533 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num;\ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * See the definitions. + */ +static unsigned _fetch_present_idx(const void *struct_ptr, unsigned off, + unsigned size); +static void _set_present_idx(void *sptr, unsigned offset, unsigned size, + unsigned pres); +static const void *_get_member_ptr(const asn_TYPE_descriptor_t *, + const void *sptr, asn_TYPE_member_t **elm, + unsigned *present); + +/* + * Tags are canonically sorted in the tag to member table. + */ +static int +_search4tag(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) + return 0; + else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + +/* + * The decoder of the CHOICE type. + */ +asn_dec_rval_t +CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + ssize_t tag_len; /* Length of TLV's T */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + ASN_DEBUG("Decoding %s as CHOICE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + if(tag_mode || td->tags_count) { + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, -1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) { + /* ?Substracted below! */ + ctx->left += rval.consumed; + } + ADVANCE(rval.consumed); + } else { + ctx->left = -1; + } + + NEXT_PHASE(ctx); + + ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", + (long)ctx->left, (long)size); + + /* Fall through */ + case 1: + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + ASN_DEBUG("In %s CHOICE tag length %d", td->name, (int)tag_len); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + do { + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key; + + key.el_tag = tlv_tag; + t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, + specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _search4tag); + if(t2m) { + /* + * Found the element corresponding to the tag. + */ + NEXT_PHASE(ctx); + ctx->step = t2m->el_no; + break; + } else if(specs->ext_start == -1) { + ASN_DEBUG("Unexpected tag %s " + "in non-extensible CHOICE %s", + ber_tlv_tag_string(tlv_tag), td->name); + RETURN(RC_FAIL); + } else { + /* Skip this tag */ + ssize_t skip; + + ASN_DEBUG("Skipping unknown tag %s", + ber_tlv_tag_string(tlv_tag)); + + skip = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tag_len, + LEFT - tag_len); + + switch(skip) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(skip + tag_len); + RETURN(RC_OK); + } + } while(0); + + case 2: + /* + * PHASE 2. + * Read in the element. + */ + do { + asn_TYPE_member_t *elm;/* CHOICE's element */ + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + elm = &elements[ctx->step]; + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + /* Set presence to be able to free it properly at any time */ + _set_present_idx(st, specs->pres_offset, + specs->pres_size, ctx->step + 1); + /* + * Invoke the member fetch routine according to member's type + */ + rval = elm->type->op->ber_decoder(opt_codec_ctx, elm->type, + memb_ptr2, ptr, LEFT, elm->tag_mode); + switch(rval.code) { + case RC_OK: + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + RETURN(RC_FAIL); + case RC_FAIL: /* Fatal error */ + RETURN(rval.code); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } while(0); + + NEXT_PHASE(ctx); + + /* Fall through */ + case 3: + ASN_DEBUG("CHOICE %s Leftover: %ld, size = %ld, tm=%d, tc=%d", + td->name, (long)ctx->left, (long)size, + tag_mode, td->tags_count); + + if(ctx->left > 0) { + /* + * The type must be fully decoded + * by the CHOICE member-specific decoder. + */ + RETURN(RC_FAIL); + } + + if(ctx->left == -1 + && !(tag_mode || td->tags_count)) { + /* + * This is an untagged CHOICE. + * It doesn't contain nothing + * except for the member itself, including all its tags. + * The decoding is completed. + */ + NEXT_PHASE(ctx); + break; + } + + /* + * Read in the "end of data chunks"'s. + */ + while(ctx->left < 0) { + ssize_t tl; + + tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tl) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + /* + * Expected <0><0>... + */ + if(((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Correctly finished with <0><0>. + */ + ADVANCE(2); + ctx->left++; + continue; + } + } else { + ASN_DEBUG("Unexpected continuation in %s", + td->name); + RETURN(RC_FAIL); + } + + /* UNREACHABLE */ + } + + NEXT_PHASE(ctx); + case 4: + /* No meaningful work here */ + break; + } + + RETURN(RC_OK); +} + +asn_enc_rval_t +CHOICE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE element */ + asn_enc_rval_t erval = {0,0,0}; + const void *memb_ptr; + size_t computed_size = 0; + unsigned present; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("%s %s as CHOICE", + cb?"Encoding":"Estimating", td->name); + + present = _fetch_present_idx(sptr, + specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present == 0 || present > td->elements_count) { + if(present == 0 && td->elements_count == 0) { + /* The CHOICE is empty?! */ + erval.encoded = 0; + ASN__ENCODED_OK(erval); + } + ASN__ENCODE_FAILED; + } + + /* + * Seek over the present member of the structure. + */ + elm = &td->elements[present-1]; + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(memb_ptr == 0) { + if(elm->optional) { + erval.encoded = 0; + ASN__ENCODED_OK(erval); + } + /* Mandatory element absent */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* + * If the CHOICE itself is tagged EXPLICIT: + * T ::= [2] EXPLICIT CHOICE { ... } + * Then emit the appropriate tags. + */ + if(tag_mode == 1 || td->tags_count) { + /* + * For this, we need to pre-compute the member. + */ + ssize_t ret; + + /* Encode member with its tag */ + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + elm->tag_mode, elm->tag, 0, 0); + if(erval.encoded == -1) + return erval; + + /* Encode CHOICE with parent or my own tag */ + ret = der_write_tags(td, erval.encoded, tag_mode, 1, tag, + cb, app_key); + if(ret == -1) + ASN__ENCODE_FAILED; + computed_size += ret; + } + + /* + * Encode the single underlying member. + */ + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + elm->tag_mode, elm->tag, cb, app_key); + if(erval.encoded == -1) + return erval; + + ASN_DEBUG("Encoded CHOICE member in %ld bytes (+%ld)", + (long)erval.encoded, (long)computed_size); + + erval.encoded += computed_size; + + return erval; +} + +ber_tlv_tag_t +CHOICE_outmost_tag(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + assert(tag_mode == 0); (void)tag_mode; + assert(tag == 0); (void)tag; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); + + if(present > 0 && present <= td->elements_count) { + const asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *) + ((const char *)ptr + elm->memb_offset); + } else { + memb_ptr = (const void *) + ((const char *)ptr + elm->memb_offset); + } + + return asn_TYPE_outmost_tag(elm->type, memb_ptr, + elm->tag_mode, elm->tag); + } else { + return (ber_tlv_tag_t)-1; + } +} + +int +CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) + return 0; + ASN__CTFAIL(app_key, td, sptr, + "%s: mandatory CHOICE element %s absent (%s:%d)", + td->name, elm->name, __FILE__, __LINE__); + return -1; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(elm->encoding_constraints.general_constraints) { + return elm->encoding_constraints.general_constraints(elm->type, memb_ptr, + ctfailcb, app_key); + } else { + return elm->type->encoding_constraints.general_constraints(elm->type, + memb_ptr, ctfailcb, app_key); + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: no CHOICE element given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + buf_ptr = (const void *)(((const char *)buf_ptr) + num); \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +CHOICE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval; /* Return value of a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* Element index */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + if(ctx->phase == 0 && !*xml_tag) + ctx->phase = 1; /* Skip the outer tag checking phase */ + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + * Phase 3: Only waiting for closing tag. + * Phase 4: Skipping unknown extensions. + * Phase 5: PHASED OUT + */ + for(edx = ctx->step; ctx->phase <= 4;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + asn_TYPE_member_t *elm; + + /* + * Go inside the member. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + unsigned old_present; + + elm = &td->elements[edx]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Start/Continue decoding the inner member */ + tmprval = elm->type->op->xer_decoder(opt_codec_ctx, + elm->type, memb_ptr2, elm->name, + buf_ptr, size); + XER_ADVANCE(tmprval.consumed); + ASN_DEBUG("XER/CHOICE: itdf: [%s] code=%d", + elm->type->name, tmprval.code); + old_present = _fetch_present_idx(st, + specs->pres_offset, specs->pres_size); + assert(old_present == 0 || old_present == edx + 1); + /* Record what we've got */ + _set_present_idx(st, + specs->pres_offset, specs->pres_size, edx + 1); + if(tmprval.code != RC_OK) + RETURN(tmprval.code); + ctx->phase = 3; + /* Fall through */ + } + + /* No need to wait for closing tag; special mode. */ + if(ctx->phase == 3 && !*xml_tag) { + ctx->phase = 5; /* Phase out */ + RETURN(RC_OK); + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, buf_ptr, size, &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + ASN_DEBUG("XER/CHOICE checked [%c%c%c%c] vs [%s], tcv=%d", + ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', + ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', + ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', + ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', + xml_tag, tcv); + + /* Skip the extensions section */ + if(ctx->phase == 4) { + ASN_DEBUG("skip_unknown(%d, %ld)", + tcv, (long)ctx->left); + switch(xer_skip_unknown(tcv, &ctx->left)) { + case -1: + ctx->phase = 5; + RETURN(RC_FAIL); + case 1: + ctx->phase = 3; + /* Fall through */ + case 0: + XER_ADVANCE(ch_size); + continue; + case 2: + ctx->phase = 3; + break; + } + } + + switch(tcv) { + case XCT_BOTH: + break; /* No CHOICE? */ + case XCT_CLOSING: + if(ctx->phase != 3) + break; + XER_ADVANCE(ch_size); + ctx->phase = 5; /* Phase out */ + RETURN(RC_OK); + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + if(ctx->phase != 1) + break; /* Really unexpected */ + + /* + * Search which inner member corresponds to this tag. + */ + for(edx = 0; edx < td->elements_count; edx++) { + elm = &td->elements[edx]; + tcv = xer_check_tag(buf_ptr,ch_size,elm->name); + switch(tcv) { + case XCT_BOTH: + case XCT_OPENING: + /* + * Process this member. + */ + ctx->step = edx; + ctx->phase = 2; + break; + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + continue; + default: + edx = td->elements_count; + break; /* Phase out */ + } + break; + } + if(edx != td->elements_count) + continue; + + /* It is expected extension */ + if(specs->ext_start != -1) { + ASN_DEBUG("Got anticipated extension"); + /* + * Check for (XCT_BOTH or XCT_UNKNOWN_BO) + * By using a mask. Only record a pure + * tags. + */ + if(tcv & XCT_CLOSING) { + /* Found without body */ + ctx->phase = 3; /* Terminating */ + } else { + ctx->left = 1; + ctx->phase = 4; /* Skip ...'s */ + } + XER_ADVANCE(ch_size); + continue; + } + + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag [%c%c%c%c] in CHOICE [%s]" + " (ph=%d, tag=%s)", + ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', + ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', + ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', + ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', + td->name, ctx->phase, xml_tag); + break; + } + + ctx->phase = 5; /* Phase out, just in case */ + RETURN(RC_FAIL); +} + + +asn_enc_rval_t +CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + unsigned present = 0; + + if(!sptr) + ASN__ENCODE_FAILED; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + + if(present == 0 || present > td->elements_count) { + ASN__ENCODE_FAILED; + } else { + asn_enc_rval_t tmper = {0,0,0}; + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr = NULL; + const char *mname = elm->name; + unsigned int mlen = strlen(mname); + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + er.encoded = 0; + + if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, + ilevel + 1, flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("", 1); + } + + if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +asn_dec_rval_t +CHOICE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_dec_rval_t rv; + const asn_per_constraint_t *ct; + asn_TYPE_member_t *elm; /* CHOICE's element */ + void *memb_ptr; + void **memb_ptr2; + void *st = *sptr; + int value; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) ct = 0; /* Not restricted */ + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + ASN_DEBUG("CHOICE %s got index %d in range %d", + td->name, value, ct->range_bits); + if(value > ct->upper_bound) + ASN__DECODE_FAILED; + } else { + if(specs->ext_start == -1) + ASN__DECODE_FAILED; + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->ext_start; + if((unsigned)value >= td->elements_count) + ASN__DECODE_FAILED; + } + + /* Adjust if canonical order is different from natural order */ + if(specs->from_canonical_order) { + ASN_DEBUG("CHOICE presence from wire %d", value); + value = specs->from_canonical_order[value]; + ASN_DEBUG("CHOICE presence index effective %d", value); + } + + /* Set presence to be able to free it later */ + _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); + + elm = &td->elements[value]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); + + if(ct && ct->range_bits >= 0) { + rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } else { + rv = uper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + + if(rv.code != RC_OK) + ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", + elm->name, td->name, rv.code); + return rv; +} + +asn_enc_rval_t +CHOICE_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE's element */ + const asn_per_constraint_t *ct; + const void *memb_ptr; + unsigned present; + int present_enc; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s as CHOICE", td->name); + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized properly, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present == 0 || present > td->elements_count) + ASN__ENCODE_FAILED; + else + present--; + + ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); + + /* Adjust if canonical order is different from natural order */ + if(specs->to_canonical_order) + present_enc = specs->to_canonical_order[present]; + else + present_enc = present; + + if(ct && ct->range_bits >= 0) { + if(present_enc < ct->lower_bound + || present_enc > ct->upper_bound) { + if(ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG( + "CHOICE member %d (enc %d) is an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + if(per_put_few_bits(po, 1, 1)) + ASN__ENCODE_FAILED; + } else { + ASN__ENCODE_FAILED; + } + ct = 0; + } + } + if(ct && ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + if(per_put_few_bits(po, 0, 1)) + ASN__ENCODE_FAILED; + } + + + elm = &td->elements[present]; + ASN_DEBUG("CHOICE member \"%s\" %d (as %d)", elm->name, present, + present_enc); + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, present_enc, ct->range_bits)) + ASN__ENCODE_FAILED; + + return elm->type->op->uper_encoder( + elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); + } else { + asn_enc_rval_t rval = {0,0,0}; + if(specs->ext_start == -1) ASN__ENCODE_FAILED; + if(uper_put_nsnnwn(po, present_enc - specs->ext_start)) + ASN__ENCODE_FAILED; + if(uper_open_type_put(elm->type, + elm->encoding_constraints.per_constraints, + memb_ptr, po)) + ASN__ENCODE_FAILED; + rval.encoded = 0; + ASN__ENCODED_OK(rval); + } +} + +asn_dec_rval_t +CHOICE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_dec_rval_t rv; + const asn_per_constraint_t *ct; + const asn_per_constraint_t *ext_ct = NULL; + asn_TYPE_member_t *elm; /* CHOICE's element */ + void *memb_ptr; + void **memb_ptr2; + void *st = *sptr; + int value; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) { + ext_ct = ct; + ct = 0; /* Not restricted */ + } + } + + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + ASN_DEBUG("CHOICE %s got index %d in range %d", + td->name, value, ct->range_bits); + if(value > ct->upper_bound) + ASN__DECODE_FAILED; + } else { + if(specs->ext_start == -1) + ASN__DECODE_FAILED; + value = aper_get_nsnnwn(pd, ext_ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + value += specs->ext_start; + if((unsigned)value >= td->elements_count) + ASN__DECODE_FAILED; + } + + /* Adjust if canonical order is different from natural order */ + if(specs->from_canonical_order) + value = specs->from_canonical_order[value]; + + /* Set presence to be able to free it later */ + _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); + + elm = &td->elements[value]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); + + if(ct && ct->range_bits >= 0) { + rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } else { + rv = aper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + + if(rv.code != RC_OK) + ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", + elm->name, td->name, rv.code); + return rv; +} + +asn_enc_rval_t +CHOICE_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm; /* CHOICE's element */ + const asn_per_constraint_t *ct = NULL; + const asn_per_constraint_t *ext_ct = NULL; + const void *memb_ptr; + unsigned present; + int present_enc; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s as CHOICE using ALIGNED PER", td->name); + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = NULL; + + present = _fetch_present_idx(sptr, + specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized properly, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present <= 0 || (unsigned)present > td->elements_count) + ASN__ENCODE_FAILED; + else + present--; + + /* Adjust if canonical order is different from natural order */ + if(specs->to_canonical_order) + present_enc = specs->to_canonical_order[present]; + else + present_enc = present; + + ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); + + if(ct && (ct->range_bits >= 0)) { + // Value is not within the range of the primary values ? + if(present < ct->lower_bound || present > ct->upper_bound) { + if(ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG("CHOICE member %d (enc %d) is an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + // X691/23.5 Extension marker = 1 + if(per_put_few_bits(po, 1, 1)) { + ASN__ENCODE_FAILED; + } + } else { + ASN__ENCODE_FAILED; + } + // no more need of constraint. + ext_ct = ct; + ct = NULL; + } + } + + if(ct && (ct->flags & APC_EXTENSIBLE)) { + ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", + present, present, ct->lower_bound, ct->upper_bound); + // X691.23.5 Extension marker = 0 + if(per_put_few_bits(po, 0, 1)) { + ASN__ENCODE_FAILED; + } + } + + elm = &td->elements[present]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(ct && (ct->range_bits >= 0)) { + // By construction (ct != 0), the alternative value is a non extended one. + // X691/23.7 X691/23.6 alternative value encoded as a range_bits bits value. + if(per_put_few_bits(po, present_enc, ct->range_bits)) + ASN__ENCODE_FAILED; + + return elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, + memb_ptr, po); + } else { + asn_enc_rval_t rval = {0,0,0}; + if(specs->ext_start == -1) + ASN__ENCODE_FAILED; + // X691/23.8 normally encoded as a small non negative whole number + + if(ext_ct && aper_put_nsnnwn(po, ext_ct->range_bits, present_enc - specs->ext_start)) + ASN__ENCODE_FAILED; + if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, + memb_ptr, po)) + ASN__ENCODE_FAILED; + rval.encoded = 0; + ASN__ENCODED_OK(rval); + } +} + +int +CHOICE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + + /* + * Print that element. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* Print member's name and stuff */ + if(0) { + if(cb(elm->name, strlen(elm->name), app_key) < 0 + || cb(": ", 2, app_key) < 0) + return -1; + } + + return elm->type->op->print_struct(elm->type, memb_ptr, ilevel, + cb, app_key); + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as CHOICE", td->name); + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); + + /* + * Free that element. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(void **)((char *)ptr + elm->memb_offset); + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } else { + memb_ptr = (void *)((char *)ptr + elm->memb_offset); + ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); + } + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, specs->struct_size); + break; + } +} + + +/* + * The following functions functions offer protection against -fshort-enums, + * compatible with little- and big-endian machines. + * If assertion is triggered, either disable -fshort-enums, or add an entry + * here with the ->pres_size of your target stracture. + * Unless the target structure is packed, the ".present" member + * is guaranteed to be aligned properly. ASN.1 compiler itself does not + * produce packed code. + */ +static unsigned +_fetch_present_idx(const void *struct_ptr, unsigned pres_offset, + unsigned pres_size) { + const void *present_ptr; + unsigned present; + + present_ptr = ((const char *)struct_ptr) + pres_offset; + + switch(pres_size) { + case sizeof(int): present = *(const unsigned int *)present_ptr; break; + case sizeof(short): present = *(const unsigned short *)present_ptr; break; + case sizeof(char): present = *(const unsigned char *)present_ptr; break; + default: + /* ANSI C mandates enum to be equivalent to integer */ + assert(pres_size != sizeof(int)); + return 0; /* If not aborted, pass back safe value */ + } + + return present; +} + +static void +_set_present_idx(void *struct_ptr, unsigned pres_offset, unsigned pres_size, + unsigned present) { + void *present_ptr; + present_ptr = ((char *)struct_ptr) + pres_offset; + + switch(pres_size) { + case sizeof(int): *(unsigned int *)present_ptr = present; break; + case sizeof(short): *(unsigned short *)present_ptr = present; break; + case sizeof(char): *(unsigned char *)present_ptr = present; break; + default: + /* ANSI C mandates enum to be equivalent to integer */ + assert(pres_size != sizeof(int)); + } +} + +static const void * +_get_member_ptr(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_TYPE_member_t **elm_ptr, unsigned *present_out) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) { + *elm_ptr = NULL; + *present_out = 0; + return NULL; + } + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + *present_out = present; + + /* + * The presence index is intentionally 1-based to avoid + * treating zeroed structure as a valid one. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *const elm = &td->elements[present - 1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + *elm_ptr = elm; + return memb_ptr; + } else { + *elm_ptr = NULL; + return NULL; + } + +} + +int +CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { + asn_TYPE_member_t *aelm; + asn_TYPE_member_t *belm; + unsigned apresent = 0; + unsigned bpresent = 0; + const void *amember = _get_member_ptr(td, aptr, &aelm, &apresent); + const void *bmember = _get_member_ptr(td, bptr, &belm, &bpresent); + + if(amember && bmember) { + if(apresent == bpresent) { + assert(aelm == belm); + return aelm->type->op->compare_struct(aelm->type, amember, bmember); + } else if(apresent < bpresent) { + return -1; + } else { + return 1; + } + } else if(!amember) { + return -1; + } else { + return 1; + } +} + +/* + * Return the 1-based choice variant presence index. + * Returns 0 in case of error. + */ +unsigned +CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, const void *sptr) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + return _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); +} + +/* + * Sets or resets the 1-based choice variant presence index. + * In case a previous index is not zero, the currently selected structure + * member is freed and zeroed-out first. + * Returns 0 on success and -1 on error. + */ +int +CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, + unsigned present) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned old_present; + + if(!sptr) { + return -1; + } + + if(present > td->elements_count) + return -1; + + old_present = + _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + if(present == old_present) + return 0; + + if(old_present != 0) { + assert(old_present <= td->elements_count); + ASN_STRUCT_RESET(*td, sptr); + } + + _set_present_idx(sptr, specs->pres_offset, specs->pres_size, present); + + return 0; +} + + +asn_random_fill_result_t +CHOICE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constr, + size_t max_length) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_random_fill_result_t res; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + const asn_TYPE_member_t *elm; + unsigned present; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *st = *sptr; + + if(max_length == 0) return result_skipped; + + (void)constr; + + if(st == NULL) { + st = CALLOC(1, specs->struct_size); + if(st == NULL) { + return result_failed; + } + } + + present = asn_random_between(1, td->elements_count); + elm = &td->elements[present - 1]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + res = elm->type->op->random_fill(elm->type, memb_ptr2, + &elm->encoding_constraints, max_length); + _set_present_idx(st, specs->pres_offset, specs->pres_size, present); + if(res.code == ARFILL_OK) { + *sptr = st; + } else { + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + } + + return res; +} + + +asn_TYPE_operation_t asn_OP_CHOICE = { + CHOICE_free, + CHOICE_print, + CHOICE_compare, + CHOICE_decode_ber, + CHOICE_encode_der, + CHOICE_decode_xer, + CHOICE_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + CHOICE_decode_oer, + CHOICE_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + CHOICE_decode_uper, + CHOICE_encode_uper, + CHOICE_decode_aper, + CHOICE_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + CHOICE_random_fill, + CHOICE_outmost_tag +}; diff --git a/Bouncer/e2sm_kpm/lib/constr_CHOICE_oer.c b/Bouncer/e2sm_kpm/lib/constr_CHOICE_oer.c new file mode 100644 index 0000000..a4c591c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_CHOICE_oer.c @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#undef SET_PHASE +#define SET_PHASE(ctx, value) \ + do { \ + ctx->phase = value; \ + ctx->step = 0; \ + } while(0) + +/* + * Tags are canonically sorted in the tag to member table. + */ +static int +_search4tag(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) + return 0; + else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + +/* + * X.696 (08/2015) #8.7 Encoding of tags + */ +static ssize_t +oer_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { + ber_tlv_tag_t val; + ber_tlv_tag_t tclass; + size_t skipped; + + if(size == 0) + return 0; + + val = *(const uint8_t *)ptr; + tclass = (val >> 6); + if((val & 0x3F) != 0x3F) { + /* #8.7.1 */ + *tag_r = ((val & 0x3F) << 2) | tclass; + return 1; + } + + /* + * Each octet contains 7 bits of useful information. + * The MSB is 0 if it is the last octet of the tag. + */ + for(val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; skipped <= size; + ptr = ((const char *)ptr) + 1, skipped++) { + unsigned int oct = *(const uint8_t *)ptr; + if(oct & 0x80) { + val = (val << 7) | (oct & 0x7F); + /* + * Make sure there are at least 9 bits spare + * at the MS side of a value. + */ + if(val >> ((8 * sizeof(val)) - 9)) { + /* + * We would not be able to accomodate + * any more tag bits. + */ + return -1; + } + } else { + val = (val << 7) | oct; + *tag_r = (val << 2) | tclass; + return skipped; + } + } + + return 0; /* Want more */ +} + +asn_dec_rval_t +CHOICE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + (void)constraints; + + ASN_DEBUG("Decoding %s as CHOICE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + switch(ctx->phase) { + case 0: { + /* + * Discover the tag. + */ + ber_tlv_tag_t tlv_tag; /* T from TLV */ + ssize_t tag_len; /* Length of TLV's T */ + + tag_len = oer_fetch_tag(ptr, size, &tlv_tag); + switch(tag_len) { + case 0: + ASN__DECODE_STARVED; + case -1: + ASN__DECODE_FAILED; + } + + do { + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key = {0, 0, 0, 0}; + key.el_tag = tlv_tag; + + t2m = (const asn_TYPE_tag2member_t *)bsearch( + &key, specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _search4tag); + if(t2m) { + /* + * Found the element corresponding to the tag. + */ + NEXT_PHASE(ctx); + ctx->step = t2m->el_no; + break; + } else if(specs->ext_start == -1) { + ASN_DEBUG( + "Unexpected tag %s " + "in non-extensible CHOICE %s", + ber_tlv_tag_string(tlv_tag), td->name); + RETURN(RC_FAIL); + } else { + /* Skip open type extension */ + ASN_DEBUG( + "Not implemented skipping open type extension for tag %s", + ber_tlv_tag_string(tlv_tag)); + RETURN(RC_FAIL); + } + } while(0); + + + ADVANCE(tag_len); + } + /* Fall through */ + case 1: { + asn_TYPE_member_t *elm = &elements[ctx->step]; /* CHOICE's element */ + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + asn_dec_rval_t rval = {0,0}; + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Set presence to be able to free it properly at any time */ + (void)CHOICE_variant_set_presence(td, st, ctx->step + 1); + + if(specs->ext_start >= 0 && specs->ext_start <= ctx->step) { + ssize_t got = + oer_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr2, ptr, size); + if(got < 0) ASN__DECODE_FAILED; + if(got == 0) ASN__DECODE_STARVED; + rval.code = RC_OK; + rval.consumed = got; + } else { + rval = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, + size); + } + rval.consumed += consumed_myself; + switch(rval.code) { + case RC_OK: + NEXT_PHASE(ctx); + case RC_WMORE: + break; + case RC_FAIL: + SET_PHASE(ctx, 3); /* => 3 */ + } + return rval; + } + case 2: + /* Already decoded everything */ + RETURN(RC_OK); + case 3: + /* Failed to decode, after all */ + RETURN(RC_FAIL); + } + + RETURN(RC_FAIL); +} + +/* + * X.696 (08/2015) #8.7 Encoding of tags + */ +static ssize_t +oer_put_tag(ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { + uint8_t tclass = BER_TAG_CLASS(tag); + ber_tlv_tag_t tval = BER_TAG_VALUE(tag); + + if(tval < 0x3F) { + uint8_t b = (uint8_t)((tclass << 6) | tval); + if(cb(&b, 1, app_key) < 0) { + return -1; + } + return 1; + } else { + uint8_t buf[1 + 2 * sizeof(tval)]; + uint8_t *b = &buf[sizeof(buf)-1]; /* Last addressable */ + size_t encoded; + for(; ; tval >>= 7) { + if(tval >> 7) { + *b-- = 0x80 | (tval & 0x7f); + } else { + *b-- = tval & 0x7f; + break; + } + } + *b = (uint8_t)((tclass << 6) | 0x3F); + encoded = sizeof(buf) - (b - buf); + if(cb(b, encoded, app_key) < 0) { + return -1; + } + return encoded; + } + +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +CHOICE_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE element */ + unsigned present; + const void *memb_ptr; + ber_tlv_tag_t tag; + ssize_t tag_len; + asn_enc_rval_t er = {0, 0, 0}; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("OER %s encoding as CHOICE", td->name); + + present = CHOICE_variant_get_presence(td, sptr); + if(present == 0 || present > td->elements_count) { + ASN_DEBUG("CHOICE %s member is not selected", td->name); + ASN__ENCODE_FAILED; + } + + elm = &td->elements[present-1]; + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(memb_ptr == 0) { + /* Mandatory element absent */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + tag = asn_TYPE_outmost_tag(elm->type, memb_ptr, elm->tag_mode, elm->tag); + if(tag == 0) { + ASN__ENCODE_FAILED; + } + + tag_len = oer_put_tag(tag, cb, app_key); + if(tag_len < 0) { + ASN__ENCODE_FAILED; + } + + if(specs->ext_start >= 0 && (unsigned)specs->ext_start <= (present-1)) { + ssize_t encoded = oer_open_type_put(elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr, cb, app_key); + if(encoded < 0) ASN__ENCODE_FAILED; + er.encoded = tag_len + encoded; + } else { + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded >= 0) er.encoded += tag_len; + } + + return er; +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/constr_SEQUENCE.c b/Bouncer/e2sm_kpm/lib/constr_SEQUENCE.c new file mode 100644 index 0000000..43dcac7 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_SEQUENCE.c @@ -0,0 +1,2059 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#undef PHASE_OUT +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * Check whether we are inside the extensions group. + */ +#define IN_EXTENSION_GROUP(specs, memb_idx) \ + ((specs)->first_extension >= 0 \ + && (unsigned)(specs)->first_extension <= (memb_idx)) + +/* + * Tags are canonically sorted in the tag2element map. + */ +static int +_t2e_cmp(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) { + if(a->el_no > b->el_no) + return 1; + /* + * Important: we do not check + * for a->el_no <= b->el_no! + */ + return 0; + } else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + + +/* + * The decoder of the SEQUENCE type. + */ +asn_dec_rval_t +SEQUENCE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + const asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* SEQUENCE element's index */ + + ASN_DEBUG("Decoding %s as SEQUENCE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, 1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) + ctx->left += rval.consumed; /* ?Substracted below! */ + ADVANCE(rval.consumed); + + NEXT_PHASE(ctx); + + ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", + (long)ctx->left, (long)size); + + /* Fall through */ + case 1: + /* + * PHASE 1. + * From the place where we've left it previously, + * try to decode the next member from the list of + * this structure's elements. + * (ctx->step) stores the member being processed + * between invocations and the microphase {0,1} of parsing + * that member: + * step = ( * 2 + ). + */ + for(edx = ((size_t)ctx->step >> 1); edx < td->elements_count; + edx++, ctx->step = (ctx->step & ~1) + 2) { + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + ssize_t tag_len; /* Length of TLV's T */ + size_t opt_edx_end; /* Next non-optional element */ + size_t n; + int use_bsearch; + + if(ctx->step & 1) + goto microphase2; + + /* + * MICROPHASE 1: Synchronize decoding. + */ + ASN_DEBUG("In %s SEQUENCE left %d, edx=%" ASN_PRI_SIZE " flags=%d" + " opt=%d ec=%d", + td->name, (int)ctx->left, edx, + elements[edx].flags, elements[edx].optional, + td->elements_count); + + if(ctx->left == 0 /* No more stuff is expected */ + && ( + /* Explicit OPTIONAL specification reaches the end */ + (edx + elements[edx].optional == td->elements_count) || + /* All extensions are optional */ + IN_EXTENSION_GROUP(specs, edx))) { + ASN_DEBUG("End of SEQUENCE %s", td->name); + /* + * Found the legitimate end of the structure. + */ + PHASE_OUT(ctx); + RETURN(RC_OK); + } + + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + ASN_DEBUG("Current tag in %s SEQUENCE for element %" ASN_PRI_SIZE " " + "(%s) is %s encoded in %d bytes, of frame %ld", + td->name, edx, elements[edx].name, + ber_tlv_tag_string(tlv_tag), (int)tag_len, (long)LEFT); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) { + RETURN(RC_FAIL); + } else { + RETURN(RC_WMORE); + } + } else if(((const uint8_t *)ptr)[1] == 0) { + ASN_DEBUG("edx = %" ASN_PRI_SIZE ", opt = %d, ec=%d", edx, + elements[edx].optional, td->elements_count); + if((edx + elements[edx].optional == td->elements_count) + || IN_EXTENSION_GROUP(specs, edx)) { + /* + * Yeah, baby! Found the terminator + * of the indefinite length structure. + */ + /* + * Proceed to the canonical + * finalization function. + * No advancing is necessary. + */ + goto phase3; + } + } + } + + /* + * Find the next available type with this tag. + */ + use_bsearch = 0; + opt_edx_end = edx + elements[edx].optional + 1; + if(opt_edx_end > td->elements_count) + opt_edx_end = td->elements_count; /* Cap */ + else if(opt_edx_end - edx > 8) { + /* Limit the scope of linear search... */ + opt_edx_end = edx + 8; + use_bsearch = 1; + /* ... and resort to bsearch() */ + } + for(n = edx; n < opt_edx_end; n++) { + if(BER_TAGS_EQUAL(tlv_tag, elements[n].tag)) { + /* + * Found element corresponding to the tag + * being looked at. + * Reposition over the right element. + */ + edx = n; + ctx->step = 1 + 2 * edx; /* Remember! */ + goto microphase2; + } else if(elements[n].flags & ATF_ANY_TYPE) { + /* + * This is the ANY type, which may bear + * any flag whatsoever. + */ + edx = n; + ctx->step = 1 + 2 * edx; /* Remember! */ + goto microphase2; + } else if(elements[n].tag == (ber_tlv_tag_t)-1) { + use_bsearch = 1; + break; + } + } + if(use_bsearch) { + /* + * Resort to a binary search over + * sorted array of tags. + */ + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key = {0, 0, 0, 0}; + key.el_tag = tlv_tag; + key.el_no = edx; + t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, + specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _t2e_cmp); + if(t2m) { + const asn_TYPE_tag2member_t *best = 0; + const asn_TYPE_tag2member_t *t2m_f, *t2m_l; + size_t edx_max = edx + elements[edx].optional; + /* + * Rewind to the first element with that tag, + * `cause bsearch() does not guarantee order. + */ + t2m_f = t2m + t2m->toff_first; + t2m_l = t2m + t2m->toff_last; + for(t2m = t2m_f; t2m <= t2m_l; t2m++) { + if(t2m->el_no > edx_max) break; + if(t2m->el_no < edx) continue; + best = t2m; + } + if(best) { + edx = best->el_no; + ctx->step = 1 + 2 * edx; + goto microphase2; + } + } + n = opt_edx_end; + } + if(n == opt_edx_end) { + /* + * If tag is unknown, it may be either + * an unknown (thus, incorrect) tag, + * or an extension (...), + * or an end of the indefinite-length structure. + */ + if(!IN_EXTENSION_GROUP(specs, + edx + elements[edx].optional)) { + ASN_DEBUG("Unexpected tag %s (at %" ASN_PRI_SIZE ")", + ber_tlv_tag_string(tlv_tag), edx); + ASN_DEBUG("Expected tag %s (%s)%s", + ber_tlv_tag_string(elements[edx].tag), + elements[edx].name, + elements[edx].optional + ?" or alternatives":""); + RETURN(RC_FAIL); + } else { + /* Skip this tag */ + ssize_t skip; + edx += elements[edx].optional; + + ASN_DEBUG("Skipping unexpected %s (at %" ASN_PRI_SIZE ")", + ber_tlv_tag_string(tlv_tag), edx); + skip = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tag_len, + LEFT - tag_len); + ASN_DEBUG("Skip length %d in %s", + (int)skip, td->name); + switch(skip) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(skip + tag_len); + ctx->step -= 2; + edx--; + continue; /* Try again with the next tag */ + } + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + ctx->step |= 1; /* Confirm entering next microphase */ + microphase2: + ASN_DEBUG("Inside SEQUENCE %s MF2", td->name); + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elements[edx].flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elements[edx].memb_offset; + memb_ptr2 = &memb_ptr; + } + /* + * Invoke the member fetch routine according to member's type + */ + if(elements[edx].flags & ATF_OPEN_TYPE) { + rval = OPEN_TYPE_ber_get(opt_codec_ctx, td, st, &elements[edx], ptr, LEFT); + } else { + rval = elements[edx].type->op->ber_decoder(opt_codec_ctx, + elements[edx].type, + memb_ptr2, ptr, LEFT, + elements[edx].tag_mode); + } + ASN_DEBUG("In %s SEQUENCE decoded %" ASN_PRI_SIZE " %s of %d " + "in %d bytes rval.code %d, size=%d", + td->name, edx, elements[edx].type->name, + (int)LEFT, (int)rval.consumed, rval.code, (int)size); + switch(rval.code) { + case RC_OK: + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + ASN_DEBUG("Size violation (c->l=%ld <= s=%ld)", + (long)ctx->left, (long)size); + /* Fall through */ + case RC_FAIL: /* Fatal error */ + RETURN(RC_FAIL); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } /* for(all structure members) */ + + phase3: + ctx->phase = 3; + /* Fall through */ + case 3: /* 00 and other tags expected */ + case 4: /* only 00's expected */ + + ASN_DEBUG("SEQUENCE %s Leftover: %ld, size = %ld", + td->name, (long)ctx->left, (long)size); + + /* + * Skip everything until the end of the SEQUENCE. + */ + while(ctx->left) { + ssize_t tl, ll; + + tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tl) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + /* + * If expected <0><0>... + */ + if(ctx->left < 0 + && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Correctly finished with <0><0>. + */ + ADVANCE(2); + ctx->left++; + ctx->phase = 4; + continue; + } + } + + if(!IN_EXTENSION_GROUP(specs, td->elements_count) + || ctx->phase == 4) { + ASN_DEBUG("Unexpected continuation " + "of a non-extensible type " + "%s (SEQUENCE): %s", + td->name, + ber_tlv_tag_string(tlv_tag)); + RETURN(RC_FAIL); + } + + ll = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tl, LEFT - tl); + switch(ll) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(tl + ll); + } + + PHASE_OUT(ctx); + } + + RETURN(RC_OK); +} + + +/* + * The DER encoder of the SEQUENCE type. + */ +asn_enc_rval_t +SEQUENCE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t computed_size = 0; + asn_enc_rval_t erval = {0,0,0}; + ssize_t ret; + size_t edx; + + ASN_DEBUG("%s %s as SEQUENCE", + cb?"Encoding":"Estimating", td->name); + + /* + * Gather the length of the underlying members sequence. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) { + ASN_DEBUG("Element %s %" ASN_PRI_SIZE " not present", + elm->name, edx); + if(elm->optional) + continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) + continue; + + erval = elm->type->op->der_encoder(elm->type, *memb_ptr2, + elm->tag_mode, elm->tag, + 0, 0); + if(erval.encoded == -1) + return erval; + computed_size += erval.encoded; + ASN_DEBUG("Member %" ASN_PRI_SIZE " %s estimated %ld bytes", + edx, elm->name, (long)erval.encoded); + } + + /* + * Encode the TLV for the sequence itself. + */ + ret = der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); + ASN_DEBUG("Wrote tags: %ld (+%ld)", (long)ret, (long)computed_size); + if(ret == -1) + ASN__ENCODE_FAILED; + erval.encoded = computed_size + ret; + + if(!cb) ASN__ENCODED_OK(erval); + + /* + * Encode all members. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + asn_enc_rval_t tmperval = {0,0,0}; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) continue; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) + continue; + + tmperval = elm->type->op->der_encoder(elm->type, *memb_ptr2, + elm->tag_mode, elm->tag, cb, app_key); + if(tmperval.encoded == -1) + return tmperval; + computed_size -= tmperval.encoded; + ASN_DEBUG("Member %" ASN_PRI_SIZE " %s of SEQUENCE %s encoded in %ld bytes", + edx, elm->name, td->name, (long)tmperval.encoded); + } + + if(computed_size != 0) + /* + * Encoded size is not equal to the computed size. + */ + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(erval); +} + + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) \ + do { \ + size_t num = (num_bytes); \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +SEQUENCE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * ... and parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval; /* Return value from a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* Element index */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + * Phase 3: Skipping unknown extensions. + * Phase 4: PHASED OUT + */ + for(edx = ctx->step; ctx->phase <= 3;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + asn_TYPE_member_t *elm; + + /* + * Go inside the inner member of a sequence. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval; + void *memb_ptr_dontuse; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + elm = &td->elements[edx]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr_dontuse = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr_dontuse; /* Only use of memb_ptr_dontuse */ + } + + if(elm->flags & ATF_OPEN_TYPE) { + tmprval = OPEN_TYPE_xer_get(opt_codec_ctx, td, st, elm, ptr, size); + } else { + /* Invoke the inner type decoder, m.b. multiple times */ + tmprval = elm->type->op->xer_decoder(opt_codec_ctx, + elm->type, memb_ptr2, elm->name, + ptr, size); + } + XER_ADVANCE(tmprval.consumed); + if(tmprval.code != RC_OK) + RETURN(tmprval.code); + ctx->phase = 1; /* Back to body processing */ + ctx->step = ++edx; + ASN_DEBUG("XER/SEQUENCE phase => %d, step => %d", + ctx->phase, ctx->step); + /* Fall through */ + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, ptr, size, + &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(ptr, ch_size, xml_tag); + ASN_DEBUG("XER/SEQUENCE: tcv = %d, ph=%d [%s]", + tcv, ctx->phase, xml_tag); + + /* Skip the extensions section */ + if(ctx->phase == 3) { + switch(xer_skip_unknown(tcv, &ctx->left)) { + case -1: + ctx->phase = 4; + RETURN(RC_FAIL); + case 0: + XER_ADVANCE(ch_size); + continue; + case 1: + XER_ADVANCE(ch_size); + ctx->phase = 1; + continue; + case 2: + ctx->phase = 1; + break; + } + } + + switch(tcv) { + case XCT_CLOSING: + if(ctx->phase == 0) break; + ctx->phase = 0; + /* Fall through */ + case XCT_BOTH: + if(ctx->phase == 0) { + if(edx >= td->elements_count || + /* Explicit OPTIONAL specs reaches the end */ + (edx + elements[edx].optional == td->elements_count) || + /* All extensions are optional */ + IN_EXTENSION_GROUP(specs, edx)) { + XER_ADVANCE(ch_size); + ctx->phase = 4; /* Phase out */ + RETURN(RC_OK); + } else { + ASN_DEBUG("Premature end of XER SEQUENCE"); + RETURN(RC_FAIL); + } + } + /* Fall through */ + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + ASN_DEBUG("XER/SEQUENCE: tcv=%d, ph=%d, edx=%" ASN_PRI_SIZE "", + tcv, ctx->phase, edx); + if(ctx->phase != 1) { + break; /* Really unexpected */ + } + + if(edx < td->elements_count) { + /* + * Search which member corresponds to this tag. + */ + size_t n; + size_t edx_end = edx + elements[edx].optional + 1; + if(edx_end > td->elements_count) + edx_end = td->elements_count; + for(n = edx; n < edx_end; n++) { + elm = &td->elements[n]; + tcv = xer_check_tag(ptr, ch_size, elm->name); + switch(tcv) { + case XCT_BOTH: + case XCT_OPENING: + /* + * Process this member. + */ + ctx->step = edx = n; + ctx->phase = 2; + break; + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + continue; + default: + n = edx_end; + break; /* Phase out */ + } + break; + } + if(n != edx_end) + continue; + } else { + ASN_DEBUG("Out of defined members: %" ASN_PRI_SIZE "/%u", + edx, td->elements_count); + } + + /* It is expected extension */ + if(IN_EXTENSION_GROUP(specs, + edx + (edx < td->elements_count + ? elements[edx].optional : 0))) { + ASN_DEBUG("Got anticipated extension at %" ASN_PRI_SIZE "", + edx); + /* + * Check for (XCT_BOTH or XCT_UNKNOWN_BO) + * By using a mask. Only record a pure + * tags. + */ + if(tcv & XCT_CLOSING) { + /* Found without body */ + } else { + ctx->left = 1; + ctx->phase = 3; /* Skip ...'s */ + } + XER_ADVANCE(ch_size); + continue; + } + + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag in SEQUENCE [%c%c%c%c%c%c]", + size>0?((const char *)ptr)[0]:'.', + size>1?((const char *)ptr)[1]:'.', + size>2?((const char *)ptr)[2]:'.', + size>3?((const char *)ptr)[3]:'.', + size>4?((const char *)ptr)[4]:'.', + size>5?((const char *)ptr)[5]:'.'); + break; + } + + ctx->phase = 4; /* "Phase out" on hard failure */ + RETURN(RC_FAIL); +} + +asn_enc_rval_t +SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0,0,0}; + int xcan = (flags & XER_F_CANONICAL); + asn_TYPE_descriptor_t *tmp_def_val_td = 0; + void *tmp_def_val = 0; + size_t edx; + + if(!sptr) ASN__ENCODE_FAILED; + + er.encoded = 0; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_enc_rval_t tmper = {0,0,0}; + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + const char *mname = elm->name; + unsigned int mlen = strlen(mname); + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + assert(tmp_def_val == 0); + if(elm->default_value_set) { + if(elm->default_value_set(&tmp_def_val)) { + ASN__ENCODE_FAILED; + } else { + memb_ptr = tmp_def_val; + tmp_def_val_td = elm->type; + } + } else if(elm->optional) { + continue; + } else { + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + /* Print the member itself */ + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1, + flags, cb, app_key); + if(tmp_def_val) { + ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val); + tmp_def_val = 0; + } + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("", 1); + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + if(tmp_def_val) ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val); + ASN__ENCODE_FAILED; +} + +int +SEQUENCE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t edx; + int ret; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* Dump preamble */ + if(cb(td->name, strlen(td->name), app_key) < 0 + || cb(" ::= {", 6, app_key) < 0) + return -1; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) continue; + /* Print line */ + /* Fall through */ + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* Indentation */ + _i_INDENT(1); + + /* Print the member's name and stuff */ + if(cb(elm->name, strlen(elm->name), app_key) < 0 + || cb(": ", 2, app_key) < 0) + return -1; + + /* Print the member itself */ + ret = elm->type->op->print_struct(elm->type, memb_ptr, ilevel + 1, + cb, app_key); + if(ret) return ret; + } + + ilevel--; + _i_INDENT(1); + + return (cb("}", 1, app_key) < 0) ? -1 : 0; +} + +void +SEQUENCE_free(const asn_TYPE_descriptor_t *td, void *sptr, + enum asn_struct_free_method method) { + size_t edx; + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_struct_ctx_t *ctx; /* Decoder context */ + + if(!td || !sptr) + return; + + ASN_DEBUG("Freeing %s as SEQUENCE", td->name); + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; + if(elm->flags & ATF_POINTER) { + memb_ptr = *(void **)((char *)sptr + elm->memb_offset); + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } else { + memb_ptr = (void *)((char *)sptr + elm->memb_offset); + ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); + } + } + + /* Clean parsing context */ + ctx = (asn_struct_ctx_t *)((char *)sptr + specs->ctx_offset); + FREEMEM(ctx->ptr); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(sptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset( + sptr, 0, + ((const asn_SEQUENCE_specifics_t *)(td->specifics))->struct_size); + break; + } +} + +int +SEQUENCE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t edx; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* + * Iterate over structure members and check their validity. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) + continue; + ASN__CTFAIL(app_key, td, sptr, + "%s: mandatory element %s absent (%s:%d)", + td->name, elm->name, __FILE__, __LINE__); + return -1; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(elm->encoding_constraints.general_constraints) { + int ret = elm->encoding_constraints.general_constraints(elm->type, memb_ptr, + ctfailcb, app_key); + if(ret) return ret; + } else { + return elm->type->encoding_constraints.general_constraints(elm->type, + memb_ptr, ctfailcb, app_key); + } + } + + return 0; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +SEQUENCE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + void *st = *sptr; /* Target structure. */ + int extpresent; /* Extension additions are present */ + uint8_t *opres; /* Presence of optional root members */ + asn_per_data_t opmd; + asn_dec_rval_t rv; + size_t edx; + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as SEQUENCE (UPER)", td->name); + + /* Handle extensions */ + if(specs->first_extension < 0) { + extpresent = 0; + } else { + extpresent = per_get_few_bits(pd, 1); + if(extpresent < 0) ASN__DECODE_STARVED; + } + + /* Prepare a place and read-in the presence bitmap */ + memset(&opmd, 0, sizeof(opmd)); + if(specs->roms_count) { + opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1); + if(!opres) ASN__DECODE_FAILED; + /* Get the presence map */ + if(per_get_many_bits(pd, opres, 0, specs->roms_count)) { + FREEMEM(opres); + ASN__DECODE_STARVED; + } + opmd.buffer = opres; + opmd.nbits = specs->roms_count; + ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)", + td->name, specs->roms_count, *opres); + } else { + opres = 0; + } + + /* + * Get the sequence ROOT elements. + */ + for(edx = 0; + edx < (specs->first_extension < 0 ? td->elements_count + : (size_t)specs->first_extension); + edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + assert(!IN_EXTENSION_GROUP(specs, edx)); + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Deal with optionality */ + if(elm->optional) { + int present = per_get_few_bits(&opmd, 1); + ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)", + td->name, elm->name, present, + (int)opmd.nboff, (int)opmd.nbits); + if(present == 0) { + /* This element is not present */ + if(elm->default_value_set) { + /* Fill-in DEFAULT */ + if(elm->default_value_set(memb_ptr2)) { + FREEMEM(opres); + ASN__DECODE_FAILED; + } + ASN_DEBUG("Filled-in default"); + } + /* The member is just not present */ + continue; + } + /* Fall through */ + } + + /* Fetch the member from the stream */ + ASN_DEBUG("Decoding member \"%s\" in %s", elm->name, td->name); + + if(elm->flags & ATF_OPEN_TYPE) { + rv = OPEN_TYPE_uper_get(opt_codec_ctx, td, st, elm, pd); + } else { + rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + if(rv.code != RC_OK) { + ASN_DEBUG("Failed decode %s in %s", + elm->name, td->name); + FREEMEM(opres); + return rv; + } + } + + /* Optionality map is not needed anymore */ + FREEMEM(opres); + + /* + * Deal with extensions. + */ + if(extpresent) { + ssize_t bmlength; + uint8_t *epres; /* Presence of extension members */ + asn_per_data_t epmd; + + bmlength = uper_get_nslength(pd); + if(bmlength < 0) ASN__DECODE_STARVED; + + ASN_DEBUG("Extensions %" ASN_PRI_SSIZE " present in %s", bmlength, td->name); + + epres = (uint8_t *)MALLOC((bmlength + 15) >> 3); + if(!epres) ASN__DECODE_STARVED; + + /* Get the extensions map */ + if(per_get_many_bits(pd, epres, 0, bmlength)) { + FREEMEM(epres); + ASN__DECODE_STARVED; + } + + memset(&epmd, 0, sizeof(epmd)); + epmd.buffer = epres; + epmd.nbits = bmlength; + ASN_DEBUG("Read in extensions bitmap for %s of %ld bits (%x..)", + td->name, (long)bmlength, *epres); + + /* Go over extensions and read them in */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + int present; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (void *)((char *)st + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + present = per_get_few_bits(&epmd, 1); + if(present <= 0) { + if(present < 0) break; /* No more extensions */ + continue; + } + + ASN_DEBUG("Decoding member %s in %s %p", elm->name, td->name, + *memb_ptr2); + rv = uper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, + memb_ptr2, pd); + if(rv.code != RC_OK) { + FREEMEM(epres); + return rv; + } + } + + /* Skip over overflow extensions which aren't present + * in this system's version of the protocol */ + for(;;) { + ASN_DEBUG("Getting overflow extensions"); + switch(per_get_few_bits(&epmd, 1)) { + case -1: break; + case 0: continue; + default: + if(uper_open_type_skip(opt_codec_ctx, pd)) { + FREEMEM(epres); + ASN__DECODE_STARVED; + } + ASN_DEBUG("Skipped overflow extension"); + continue; + } + break; + } + + FREEMEM(epres); + } + + if(specs->first_extension >= 0) { + unsigned i; + /* Fill DEFAULT members in extensions */ + for(i = specs->roms_count; i < specs->roms_count + specs->aoms_count; + i++) { + asn_TYPE_member_t *elm; + void **memb_ptr2; /* Pointer to member pointer */ + + edx = specs->oms[i]; + elm = &td->elements[edx]; + + if(!elm->default_value_set) continue; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + if(*memb_ptr2) continue; + } else { + continue; /* Extensions are all optionals */ + } + + /* Set default value */ + if(elm->default_value_set(memb_ptr2)) { + ASN__DECODE_FAILED; + } + } + } + + rv.consumed = 0; + rv.code = RC_OK; + return rv; +} + +static int +SEQUENCE__handle_extensions(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_per_outp_t *po1, asn_per_outp_t *po2) { + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + int exts_present = 0; + int exts_count = 0; + size_t edx; + + if(specs->first_extension < 0) { + return 0; + } + + /* Find out which extensions are present */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + int present; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + ASN_DEBUG("checking %s:%s (@%" ASN_PRI_SIZE ") present => %d", elm->name, + elm->type->name, edx, present); + exts_count++; + exts_present += present; + + /* Encode as presence marker */ + if(po1 && per_put_few_bits(po1, present, 1)) { + return -1; + } + /* Encode as open type field */ + if(po2 && present + && uper_open_type_put(elm->type, + elm->encoding_constraints.per_constraints, + *memb_ptr2, po2)) + return -1; + } + + return exts_present ? exts_count : 0; +} + +asn_enc_rval_t +SEQUENCE_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + int n_extensions; + size_t edx; + size_t i; + + (void)constraints; + + if(!sptr) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE (UPER)", td->name); + + /* + * X.691#18.1 Whether structure is extensible + * and whether to encode extensions + */ + if(specs->first_extension < 0) { + n_extensions = 0; /* There are no extensions to encode */ + } else { + n_extensions = SEQUENCE__handle_extensions(td, sptr, 0, 0); + if(n_extensions < 0) ASN__ENCODE_FAILED; + if(per_put_few_bits(po, n_extensions ? 1 : 0, 1)) { + ASN__ENCODE_FAILED; + } + } + + /* Encode a presence bitmap */ + for(i = 0; i < specs->roms_count; i++) { + asn_TYPE_member_t *elm; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + int present; + + edx = specs->oms[i]; + elm = &td->elements[edx]; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + /* Eliminate default values */ + if(present && elm->default_value_cmp + && elm->default_value_cmp(*memb_ptr2) == 0) + present = 0; + + ASN_DEBUG("Element %s %s %s->%s is %s", + elm->flags & ATF_POINTER ? "ptr" : "inline", + elm->default_value_cmp ? "def" : "wtv", + td->name, elm->name, present ? "present" : "absent"); + if(per_put_few_bits(po, present, 1)) + ASN__ENCODE_FAILED; + } + + /* + * Encode the sequence ROOT elements. + */ + ASN_DEBUG("first_extension = %d, elements = %d", specs->first_extension, + td->elements_count); + for(edx = 0; + edx < ((specs->first_extension < 0) ? td->elements_count + : (size_t)specs->first_extension); + edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + ASN_DEBUG("About to encode %s", elm->type->name); + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) { + ASN_DEBUG("Element %s %" ASN_PRI_SIZE " not present", + elm->name, edx); + if(elm->optional) + continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) + continue; + + ASN_DEBUG("Encoding %s->%s:%s", td->name, elm->name, elm->type->name); + er = elm->type->op->uper_encoder( + elm->type, elm->encoding_constraints.per_constraints, *memb_ptr2, + po); + if(er.encoded == -1) return er; + } + + /* No extensions to encode */ + if(!n_extensions) ASN__ENCODED_OK(er); + + ASN_DEBUG("Length of extensions %d bit-map", n_extensions); + /* #18.8. Write down the presence bit-map length. */ + if(uper_put_nslength(po, n_extensions)) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Bit-map of %d elements", n_extensions); + /* #18.7. Encoding the extensions presence bit-map. */ + /* TODO: act upon NOTE in #18.7 for canonical PER */ + if(SEQUENCE__handle_extensions(td, sptr, po, 0) != n_extensions) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Writing %d extensions", n_extensions); + /* #18.9. Encode extensions as open type fields. */ + if(SEQUENCE__handle_extensions(td, sptr, 0, po) != n_extensions) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +SEQUENCE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + void *st = *sptr; /* Target structure. */ + int extpresent; /* Extension additions are present */ + uint8_t *opres; /* Presence of optional root members */ + asn_per_data_t opmd; + asn_dec_rval_t rv; + size_t edx; + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as SEQUENCE (APER)", td->name); + + /* Handle extensions */ + if(specs->first_extension < 0) { + extpresent = 0; + } else { + extpresent = per_get_few_bits(pd, 1); + if(extpresent < 0) ASN__DECODE_STARVED; + } + + /* Prepare a place and read-in the presence bitmap */ + memset(&opmd, 0, sizeof(opmd)); + if(specs->roms_count) { + opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1); + if(!opres) ASN__DECODE_FAILED; + /* Get the presence map */ + if(per_get_many_bits(pd, opres, 0, specs->roms_count)) { + FREEMEM(opres); + ASN__DECODE_STARVED; + } + opmd.buffer = opres; + opmd.nbits = specs->roms_count; + ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)", + td->name, specs->roms_count, *opres); + } else { + opres = 0; + } + + /* + * Get the sequence ROOT elements. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ +#if 0 + int padding; +#endif + + if(IN_EXTENSION_GROUP(specs, edx)) + continue; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } +#if 0 + /* Get Padding */ + padding = (8 - (pd->moved % 8)) % 8; + if(padding > 0) + ASN_DEBUG("For element %s,offset= %ld Padding bits = %d", td->name, pd->moved, padding); +#if 0 /* old way of removing padding */ + per_get_few_bits(pd, padding); +#else /* Experimental fix proposed by @mhanna123 */ + if(edx != (td->elements_count-1)) + per_get_few_bits(pd, padding); + else { + if(specs->roms_count && (padding > 0)) + ASN_DEBUG(">>>>> not skipping padding of %d bits for element:%ld out of %d", padding, edx, td->elements_count); + else + per_get_few_bits(pd, padding); + } +#endif /* dealing with padding */ +#endif + /* Deal with optionality */ + if(elm->optional) { + int present = per_get_few_bits(&opmd, 1); + ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)", + td->name, elm->name, present, + (int)opmd.nboff, (int)opmd.nbits); + if(present == 0) { + /* This element is not present */ + if(elm->default_value_set) { + /* Fill-in DEFAULT */ + if(elm->default_value_set(memb_ptr2)) { + FREEMEM(opres); + ASN__DECODE_FAILED; + } + ASN_DEBUG("Filled-in default"); + } + /* The member is just not present */ + continue; + } + /* Fall through */ + } + + /* Fetch the member from the stream */ + ASN_DEBUG("Decoding member \"%s\" in %s", elm->name, td->name); + + if(elm->flags & ATF_OPEN_TYPE) { + rv = OPEN_TYPE_aper_get(opt_codec_ctx, td, st, elm, pd); + } else { + rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + if(rv.code != RC_OK) { + ASN_DEBUG("Failed decode %s in %s", + elm->name, td->name); + FREEMEM(opres); + return rv; + } + } + + /* Optionality map is not needed anymore */ + FREEMEM(opres); + + /* + * Deal with extensions. + */ + if(extpresent) { + ssize_t bmlength; + uint8_t *epres; /* Presence of extension members */ + asn_per_data_t epmd; + + bmlength = aper_get_nslength(pd); + if(bmlength < 0) ASN__DECODE_STARVED; + + ASN_DEBUG("Extensions %" ASN_PRI_SSIZE " present in %s", bmlength, td->name); + + epres = (uint8_t *)MALLOC((bmlength + 15) >> 3); + if(!epres) ASN__DECODE_STARVED; + + /* Get the extensions map */ + if(per_get_many_bits(pd, epres, 0, bmlength)) + ASN__DECODE_STARVED; + + memset(&epmd, 0, sizeof(epmd)); + epmd.buffer = epres; + epmd.nbits = bmlength; + ASN_DEBUG("Read in extensions bitmap for %s of %ld bits (%x..)", + td->name, bmlength, *epres); + + /* Go over extensions and read them in */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + int present; + + if(!IN_EXTENSION_GROUP(specs, edx)) { + ASN_DEBUG("%ld is not extension", edx); + continue; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (void *)((char *)st + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + present = per_get_few_bits(&epmd, 1); + if(present <= 0) { + if(present < 0) break; /* No more extensions */ + continue; + } + + ASN_DEBUG("Decoding member %s in %s %p", elm->name, td->name, *memb_ptr2); + rv = aper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + if(rv.code != RC_OK) { + FREEMEM(epres); + return rv; + } + } + + /* Skip over overflow extensions which aren't present + * in this system's version of the protocol */ + for(;;) { + ASN_DEBUG("Getting overflow extensions"); + switch(per_get_few_bits(&epmd, 1)) { + case -1: + break; + case 0: + continue; + default: + if(aper_open_type_skip(opt_codec_ctx, pd)) { + FREEMEM(epres); + ASN__DECODE_STARVED; + } + } + break; + } + + FREEMEM(epres); + } + + /* Fill DEFAULT members in extensions */ + for(edx = specs->roms_count; edx < specs->roms_count + + specs->aoms_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void **memb_ptr2; /* Pointer to member pointer */ + + if(!elm->default_value_set) continue; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + + elm->memb_offset); + if(*memb_ptr2) continue; + } else { + continue; /* Extensions are all optionals */ + } + + /* Set default value */ + if(elm->default_value_set(memb_ptr2)) { + ASN__DECODE_FAILED; + } + } + + rv.consumed = 0; + rv.code = RC_OK; + return rv; +} + +static int +SEQUENCE_handle_extensions_aper(const asn_TYPE_descriptor_t *td, + const void *sptr, + asn_per_outp_t *po1, asn_per_outp_t *po2) { + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + int exts_present = 0; + int exts_count = 0; + size_t edx; + + if(specs->first_extension < 0) { + return 0; + } + + /* Find out which extensions are present */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void * const *memb_ptr2; /* Pointer to that pointer */ + int present; + + if(!IN_EXTENSION_GROUP(specs, edx)) { + ASN_DEBUG("%s (@%ld) is not extension", elm->type->name, edx); + continue; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + ASN_DEBUG("checking %s (@%ld) present => %d", + elm->type->name, edx, present); + exts_count++; + exts_present += present; + + /* Encode as presence marker */ + if(po1 && per_put_few_bits(po1, present, 1)) + return -1; + /* Encode as open type field */ + if(po2 && present && aper_open_type_put(elm->type, + elm->encoding_constraints.per_constraints, *memb_ptr2, po2)) + return -1; + + } + + return exts_present ? exts_count : 0; +} + +asn_enc_rval_t +SEQUENCE_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + int n_extensions; + size_t edx; + size_t i; + + (void)constraints; + + if(!sptr) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE (APER)", td->name); + + /* + * X.691#18.1 Whether structure is extensible + * and whether to encode extensions + */ + if(specs->first_extension < 0) { + n_extensions = 0; /* There are no extensions to encode */ + } else { + n_extensions = SEQUENCE_handle_extensions_aper(td, sptr, 0, 0); + if(n_extensions < 0) ASN__ENCODE_FAILED; + if(per_put_few_bits(po, n_extensions ? 1 : 0, 1)) { + ASN__ENCODE_FAILED; + } + } + + /* Encode a presence bitmap */ + for(i = 0; i < specs->roms_count; i++) { + asn_TYPE_member_t *elm; + const void *memb_ptr; /* Pointer to the member */ + const void * const *memb_ptr2; /* Pointer to that pointer */ + int present; + + edx = specs->oms[i]; + elm = &td->elements[edx]; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + /* Eliminate default values */ + if(present && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr2) == 1) + present = 0; + + ASN_DEBUG("Element %s %s %s->%s is %s", + elm->flags & ATF_POINTER ? "ptr" : "inline", + elm->default_value_cmp ? "def" : "wtv", + td->name, elm->name, present ? "present" : "absent"); + if(per_put_few_bits(po, present, 1)) + ASN__ENCODE_FAILED; + } + + /* + * Encode the sequence ROOT elements. + */ + ASN_DEBUG("first_extension = %d, elements = %d", specs->first_extension, + td->elements_count); + for(edx = 0; + edx < ((specs->first_extension < 0) ? td->elements_count + : (size_t)specs->first_extension); + edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void * const *memb_ptr2; /* Pointer to that pointer */ + + if(IN_EXTENSION_GROUP(specs, edx)) + continue; + + ASN_DEBUG("About to encode %s", elm->type->name); + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) { + ASN_DEBUG("Element %s %ld not present", + elm->name, edx); + if(elm->optional) + continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(memb_ptr2) == 1) + continue; + + ASN_DEBUG("Encoding %s->%s", td->name, elm->name); + er = elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, + *memb_ptr2, po); + if(er.encoded == -1) + return er; + } + + /* No extensions to encode */ + if(!n_extensions) ASN__ENCODED_OK(er); + + ASN_DEBUG("Length of %d bit-map", n_extensions); + /* #18.8. Write down the presence bit-map length. */ + if(aper_put_nslength(po, n_extensions)) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Bit-map of %d elements", n_extensions); + /* #18.7. Encoding the extensions presence bit-map. */ + /* TODO: act upon NOTE in #18.7 for canonical PER */ + if(SEQUENCE_handle_extensions_aper(td, sptr, po, 0) != n_extensions) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Writing %d extensions", n_extensions); + /* #18.9. Encode extensions as open type fields. */ + if(SEQUENCE_handle_extensions_aper(td, sptr, 0, po) != n_extensions) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +int +SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + size_t edx; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *amemb; + const void *bmemb; + int ret; + + if(elm->flags & ATF_POINTER) { + amemb = + *(const void *const *)((const char *)aptr + elm->memb_offset); + bmemb = + *(const void *const *)((const char *)bptr + elm->memb_offset); + if(!amemb) { + if(!bmemb) continue; + if(elm->default_value_cmp + && elm->default_value_cmp(bmemb) == 0) { + /* A is absent, but B is present and equal to DEFAULT */ + continue; + } + return -1; + } else if(!bmemb) { + if(elm->default_value_cmp + && elm->default_value_cmp(amemb) == 0) { + /* B is absent, but A is present and equal to DEFAULT */ + continue; + } + return 1; + } + } else { + amemb = (const void *)((const char *)aptr + elm->memb_offset); + bmemb = (const void *)((const char *)bptr + elm->memb_offset); + } + + ret = elm->type->op->compare_struct(elm->type, amemb, bmemb); + if(ret != 0) return ret; + } + + return 0; +} + +asn_TYPE_operation_t asn_OP_SEQUENCE = { + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_compare, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + SEQUENCE_decode_oer, + SEQUENCE_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + SEQUENCE_decode_uper, + SEQUENCE_encode_uper, + SEQUENCE_decode_aper, + SEQUENCE_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + SEQUENCE_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; + + +asn_random_fill_result_t +SEQUENCE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constr, + size_t max_length) { + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_random_fill_result_t result_ok = {ARFILL_OK, 0}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + void *st = *sptr; + size_t edx; + + if(max_length == 0) return result_skipped; + + (void)constr; + + if(st == NULL) { + st = CALLOC(1, specs->struct_size); + if(st == NULL) { + return result_failed; + } + } + + for(edx = 0; edx < td->elements_count; edx++) { + const asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + asn_random_fill_result_t tmpres; + + if(elm->optional && asn_random_between(0, 4) == 2) { + /* Sometimes decide not to fill the optional value */ + continue; + } + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + tmpres = elm->type->op->random_fill( + elm->type, memb_ptr2, &elm->encoding_constraints, + max_length > result_ok.length ? max_length - result_ok.length : 0); + switch(tmpres.code) { + case ARFILL_OK: + result_ok.length += tmpres.length; + continue; + case ARFILL_SKIPPED: + assert(!(elm->flags & ATF_POINTER) || *memb_ptr2 == NULL); + continue; + case ARFILL_FAILED: + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + return tmpres; + } + } + + *sptr = st; + + return result_ok; +} + diff --git a/Bouncer/e2sm_kpm/lib/constr_SEQUENCE_OF.c b/Bouncer/e2sm_kpm/lib/constr_SEQUENCE_OF.c new file mode 100644 index 0000000..10f18cf --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_SEQUENCE_OF.c @@ -0,0 +1,358 @@ +/*- + * Copyright (c) 2003, 2004, 2006 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * The DER encoder of the SEQUENCE OF type. + */ +asn_enc_rval_t +SEQUENCE_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(ptr); + size_t computed_size = 0; + ssize_t encoding_size = 0; + asn_enc_rval_t erval = {0,0,0}; + int edx; + + ASN_DEBUG("Estimating size of SEQUENCE OF %s", td->name); + + /* + * Gather the length of the underlying members sequence. + */ + for(edx = 0; edx < list->count; edx++) { + void *memb_ptr = list->array[edx]; + if(!memb_ptr) continue; + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + 0, elm->tag, + 0, 0); + if(erval.encoded == -1) + return erval; + computed_size += erval.encoded; + } + + /* + * Encode the TLV for the sequence itself. + */ + encoding_size = der_write_tags(td, computed_size, tag_mode, 1, tag, + cb, app_key); + if(encoding_size == -1) { + erval.encoded = -1; + erval.failed_type = td; + erval.structure_ptr = ptr; + return erval; + } + + computed_size += encoding_size; + if(!cb) { + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } + + ASN_DEBUG("Encoding members of SEQUENCE OF %s", td->name); + + /* + * Encode all members. + */ + for(edx = 0; edx < list->count; edx++) { + void *memb_ptr = list->array[edx]; + if(!memb_ptr) continue; + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + 0, elm->tag, + cb, app_key); + if(erval.encoded == -1) + return erval; + encoding_size += erval.encoded; + } + + if(computed_size != (size_t)encoding_size) { + /* + * Encoded size is not equal to the computed size. + */ + erval.encoded = -1; + erval.failed_type = td; + erval.structure_ptr = ptr; + } else { + erval.encoded = computed_size; + erval.structure_ptr = 0; + erval.failed_type = 0; + } + + return erval; +} + +asn_enc_rval_t +SEQUENCE_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0,0,0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(sptr); + const char *mname = specs->as_XMLValueList + ? 0 + : ((*elm->name) ? elm->name : elm->type->xml_tag); + size_t mlen = mname ? strlen(mname) : 0; + int xcan = (flags & XER_F_CANONICAL); + int i; + + if(!sptr) ASN__ENCODE_FAILED; + + er.encoded = 0; + + for(i = 0; i < list->count; i++) { + asn_enc_rval_t tmper = {0,0,0}; + void *memb_ptr = list->array[i]; + if(!memb_ptr) continue; + + if(mname) { + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + } + + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1, + flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + if(tmper.encoded == 0 && specs->as_XMLValueList) { + const char *name = elm->type->xml_tag; + size_t len = strlen(name); + if(!xcan) ASN__TEXT_INDENT(1, ilevel + 1); + ASN__CALLBACK3("<", 1, name, len, "/>", 2); + } + + if(mname) { + ASN__CALLBACK3("", 1); + } + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_enc_rval_t +SEQUENCE_OF_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_anonymous_sequence_ *list; + const asn_per_constraint_t *ct; + asn_enc_rval_t er = {0,0,0}; + const asn_TYPE_member_t *elm = td->elements; + size_t encoded_edx; + + if(!sptr) ASN__ENCODE_FAILED; + list = _A_CSEQUENCE_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE OF (%d)", td->name, list->count); + + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + /* If extensible constraint, check if size is in root */ + if(ct) { + int not_in_root = + (list->count < ct->lower_bound || list->count > ct->upper_bound); + ASN_DEBUG("lb %ld ub %ld %s", ct->lower_bound, ct->upper_bound, + ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); + if(ct->flags & APC_EXTENSIBLE) { + /* Declare whether size is in extension root */ + if(per_put_few_bits(po, not_in_root, 1)) ASN__ENCODE_FAILED; + if(not_in_root) ct = 0; + } else if(not_in_root && ct->effective_bits >= 0) { + ASN__ENCODE_FAILED; + } + + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + if(per_put_few_bits(po, list->count - ct->lower_bound, + ct->effective_bits)) + ASN__ENCODE_FAILED; + } else if(list->count == 0) { + /* When the list is empty add only the length determinant + * X.691, #20.6 and #11.9.4.1 + */ + if (uper_put_length(po, 0, 0)) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } + + for(encoded_edx = 0; (ssize_t)encoded_edx < list->count;) { + ssize_t may_encode; + size_t edx; + int need_eom = 0; + + if(ct && ct->effective_bits >= 0) { + may_encode = list->count; + } else { + may_encode = + uper_put_length(po, list->count - encoded_edx, &need_eom); + if(may_encode < 0) ASN__ENCODE_FAILED; + } + + for(edx = encoded_edx; edx < encoded_edx + may_encode; edx++) { + void *memb_ptr = list->array[edx]; + if(!memb_ptr) ASN__ENCODE_FAILED; + er = elm->type->op->uper_encoder( + elm->type, elm->encoding_constraints.per_constraints, memb_ptr, + po); + if(er.encoded == -1) ASN__ENCODE_FAILED; + } + + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + + encoded_edx += may_encode; + } + + ASN__ENCODED_OK(er); +} + +asn_enc_rval_t +SEQUENCE_OF_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_anonymous_sequence_ *list; + const asn_per_constraint_t *ct; + asn_enc_rval_t er = {0,0,0}; + asn_TYPE_member_t *elm = td->elements; + int seq; + + if(!sptr) ASN__ENCODE_FAILED; + list = _A_CSEQUENCE_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE OF size (%d) using ALIGNED PER", td->name, list->count); + + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + /* If extensible constraint, check if size is in root */ + if(ct) { + int not_in_root = (list->count < ct->lower_bound + || list->count > ct->upper_bound); + ASN_DEBUG("lb %ld ub %ld %s", + ct->lower_bound, ct->upper_bound, + ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); + if(ct->flags & APC_EXTENSIBLE) { + /* Declare whether size is in extension root */ + if(per_put_few_bits(po, not_in_root, 1)) + ASN__ENCODE_FAILED; + if(not_in_root) ct = 0; + } else if(not_in_root && ct->effective_bits >= 0) + ASN__ENCODE_FAILED; + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ +/* if(per_put_few_bits(po, list->count - ct->lower_bound, + ct->effective_bits)) + ASN__ENCODE_FAILED; +*/ + if (aper_put_length(po, ct->upper_bound - ct->lower_bound + 1, list->count - ct->lower_bound) < 0) + ASN__ENCODE_FAILED; + } + + for(seq = -1; seq < list->count;) { + ssize_t mayEncode; + if(seq < 0) seq = 0; + if(ct && ct->effective_bits >= 0) { + mayEncode = list->count; + } else { + mayEncode = aper_put_length(po, -1, list->count - seq); + if(mayEncode < 0) ASN__ENCODE_FAILED; + } + + while(mayEncode--) { + void *memb_ptr = list->array[seq++]; + if(!memb_ptr) ASN__ENCODE_FAILED; + er = elm->type->op->aper_encoder(elm->type, + elm->encoding_constraints.per_constraints, memb_ptr, po); + if(er.encoded == -1) + ASN__ENCODE_FAILED; + } + } + + ASN__ENCODED_OK(er); +} +#endif /* ASN_DISABLE_PER_SUPPORT */ + +int +SEQUENCE_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const asn_anonymous_sequence_ *a = _A_CSEQUENCE_FROM_VOID(aptr); + const asn_anonymous_sequence_ *b = _A_CSEQUENCE_FROM_VOID(bptr); + ssize_t idx; + + if(a && b) { + ssize_t common_length = (a->count < b->count ? a->count : b->count); + for(idx = 0; idx < common_length; idx++) { + int ret = td->elements->type->op->compare_struct( + td->elements->type, a->array[idx], b->array[idx]); + if(ret) return ret; + } + + if(idx < b->count) /* more elements in b */ + return -1; /* a is shorter, so put it first */ + if(idx < a->count) return 1; + + } else if(!a) { + return -1; + } else if(!b) { + return 1; + } + + return 0; +} + + +asn_TYPE_operation_t asn_OP_SEQUENCE_OF = { + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_compare, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + SEQUENCE_OF_decode_oer, /* Same as SET OF decoder. */ + SEQUENCE_OF_encode_oer, /* Same as SET OF encoder */ +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + SEQUENCE_OF_decode_uper, /* Same as SET OF decoder */ + SEQUENCE_OF_encode_uper, + SEQUENCE_OF_decode_aper, + SEQUENCE_OF_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + SEQUENCE_OF_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; + diff --git a/Bouncer/e2sm_kpm/lib/constr_SEQUENCE_oer.c b/Bouncer/e2sm_kpm/lib/constr_SEQUENCE_oer.c new file mode 100644 index 0000000..ecb589c --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_SEQUENCE_oer.c @@ -0,0 +1,561 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include +#include + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#undef PHASE_OUT +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) + +/* + * Check whether we are inside the extensions group. + */ +#define IN_EXTENSION_GROUP(specs, memb_idx) \ + ((specs)->first_extension >= 0 \ + && (unsigned)(specs)->first_extension <= (memb_idx)) + +#define IN_ROOT_GROUP_PRED(edx) \ + edx < (specs->first_extension < 0 ? td->elements_count \ + : (size_t)specs->first_extension) + +#define FOR_IN_ROOT_GROUP(edx) for(edx = 0; IN_ROOT_GROUP_PRED(edx); edx++) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * Return pointer to a member. + */ +static void ** +element_ptrptr(void *struct_ptr, asn_TYPE_member_t *elm, void **tmp_save_ptr) { + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + return (void **)((char *)struct_ptr + elm->memb_offset); + } else { + assert(tmp_save_ptr); + *tmp_save_ptr = (void *)((char *)struct_ptr + elm->memb_offset); + return tmp_save_ptr; + } +} + +static const void * +element_ptr(const void *struct_ptr, const asn_TYPE_member_t *elm) { + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + return *(const void *const *)((const char *)struct_ptr + + elm->memb_offset); + } else { + return (const void *)((const char *)struct_ptr + elm->memb_offset); + } +} + +asn_dec_rval_t +SEQUENCE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + void *st = *struct_ptr; /* Target structure */ + asn_struct_ctx_t *ctx; /* Decoder context */ + size_t consumed_myself = 0; /* Consumed bytes from ptr. */ + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously. + */ + switch(ctx->phase) { + case 0: { + /* + * Fetch preamble. + */ + asn_bit_data_t *preamble; + int has_extensions_bit = (specs->first_extension >= 0); + size_t preamble_bits = (has_extensions_bit + specs->roms_count); + size_t preamble_bytes = ((7 + preamble_bits) >> 3); + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 0", td->name); + + ASN_DEBUG( + "Expecting preamble bits %" ASN_PRI_SIZE " for %s (including %d extension bits)", + preamble_bits, td->name, has_extensions_bit); + + if(preamble_bytes > size) { + ASN__DECODE_STARVED; + } + + preamble = asn_bit_data_new_contiguous(ptr, preamble_bits); + if(!preamble) { + RETURN(RC_FAIL); + } + preamble->nboff = has_extensions_bit; + ctx->ptr = preamble; + ADVANCE(preamble_bytes); + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 1: { + /* Decode components of the extension root */ + asn_bit_data_t *preamble = ctx->ptr; + size_t edx; + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 1 (Root)", td->name); + + assert(preamble); + + for(edx = (ctx->step >> 1); IN_ROOT_GROUP_PRED(edx); + edx++, ctx->step = (ctx->step & ~1) + 2) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + ASN_DEBUG("Decoding %s->%s", td->name, elm->name); + + assert(!IN_EXTENSION_GROUP(specs, edx)); + + if(ctx->step & 1) { + goto microphase2_decode_continues; + } + + + if(elm->optional) { + int32_t present = asn_get_few_bits(preamble, 1); + if(present < 0) { + ASN_DEBUG("Presence map ended prematurely: %d", present); + RETURN(RC_FAIL); + } else if(present == 0) { + if(elm->default_value_set) { + /* Fill-in DEFAULT */ + void *tmp; + if(elm->default_value_set( + element_ptrptr(st, elm, &tmp))) { + RETURN(RC_FAIL); + } + } + /* The member is not present. */ + continue; + } + /* Present OPTIONAL or DEFAULT component. */ + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + ctx->step |= 1; /* Confirm entering next microphase */ + microphase2_decode_continues: + if(elm->flags & ATF_OPEN_TYPE) { + rval = OPEN_TYPE_oer_get(opt_codec_ctx, td, st, elm, ptr, size); + } else { + void *save_memb_ptr; /* Temporary reference. */ + void **memb_ptr2; /* Pointer to a pointer to a memmber */ + + memb_ptr2 = element_ptrptr(st, elm, &save_memb_ptr); + + rval = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, + size); + } + switch(rval.code) { + case RC_OK: + ADVANCE(rval.consumed); + break; + case RC_WMORE: + ASN_DEBUG("More bytes needed at element %s \"%s\"", td->name, + elm->name); + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + case RC_FAIL: + ASN_DEBUG("Decoding failed at element %s \"%s\"", td->name, + elm->name); + RETURN(RC_FAIL); + } + } /* for(all root members) */ + + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 2: + assert(ctx->ptr); + { + /* Cleanup preamble. */ + asn_bit_data_t *preamble = ctx->ptr; + asn_bit_data_t *extadds; + int has_extensions_bit = (specs->first_extension >= 0); + int extensions_present = + has_extensions_bit + && (preamble->buffer == NULL + || (((const uint8_t *)preamble->buffer)[0] & 0x80)); + uint8_t unused_bits; + size_t len = 0; + ssize_t len_len; + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 2", td->name); + + preamble->buffer = 0; /* Will do extensions_present==1 next time. */ + + if(!extensions_present) { + ctx->phase = 10; + RETURN(RC_OK); + } + + /* + * X.696 (08/2015) #16.1 (c), #16.4 + * Read in the extension addition presence bitmap. + */ + + len_len = oer_fetch_length(ptr, size, &len); + if(len_len > 0) { + ADVANCE(len_len); + } else if(len_len < 0) { + RETURN(RC_FAIL); + } else { + RETURN(RC_WMORE); + } + + if(len == 0) { + /* 16.4.1-2 */ + RETURN(RC_FAIL); + } else if(len > size) { + RETURN(RC_WMORE); + } + + /* Account for unused bits */ + unused_bits = 0x7 & *(const uint8_t *)ptr; + ADVANCE(1); + len--; + if(unused_bits && len == 0) { + RETURN(RC_FAIL); + } + + /* Get the extensions map */ + extadds = asn_bit_data_new_contiguous(ptr, len * 8 - unused_bits); + if(!extadds) { + RETURN(RC_FAIL); + } + FREEMEM(preamble); + ctx->ptr = extadds; + ADVANCE(len); + } + NEXT_PHASE(ctx); + ctx->step = + (specs->first_extension < 0 ? td->elements_count + : (size_t)specs->first_extension); + /* Fall through */ + case 3: + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 3 (Extensions)", td->name); + for(; ctx->step < (signed)td->elements_count; ctx->step++) { + asn_bit_data_t *extadds = ctx->ptr; + size_t edx = ctx->step; + asn_TYPE_member_t *elm = &td->elements[edx]; + void *tmp_memb_ptr; + void **memb_ptr2 = element_ptrptr(st, elm, &tmp_memb_ptr); + + switch(asn_get_few_bits(extadds, 1)) { + case -1: + /* + * Not every one of our extensions is known to the remote side. + * Continue filling in their defaults though. + */ + /* Fall through */ + case 0: + /* Fill-in DEFAULT */ + if(elm->default_value_set + && elm->default_value_set(memb_ptr2)) { + RETURN(RC_FAIL); + } + continue; + case 1: { + /* Read OER open type */ + ssize_t ot_size = + oer_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr2, ptr, size); + assert(ot_size <= (ssize_t)size); + if(ot_size > 0) { + ADVANCE(ot_size); + } else if(ot_size < 0) { + RETURN(RC_FAIL); + } else { + /* Roll back open type parsing */ + asn_get_undo(extadds, 1); + RETURN(RC_WMORE); + } + break; + } + default: + RETURN(RC_FAIL); + } + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 4: + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 4", td->name); + /* Read in the rest of Open Types while ignoring them */ + for(;;) { + asn_bit_data_t *extadds = ctx->ptr; + switch(asn_get_few_bits(extadds, 1)) { + case 0: + continue; + case 1: { + ssize_t skipped = oer_open_type_skip(ptr, size); + if(skipped > 0) { + ADVANCE(skipped); + } else if(skipped < 0) { + RETURN(RC_FAIL); + } else { + asn_get_undo(extadds, 1); + RETURN(RC_WMORE); + } + continue; + } + case -1: + /* No more Open Type encoded components */ + break; + default: + RETURN(RC_FAIL); + } + break; + } + } + + RETURN(RC_OK); +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + size_t computed_size = 0; + int has_extensions_bit = (specs->first_extension >= 0); + size_t preamble_bits = (has_extensions_bit + specs->roms_count); + uint32_t has_extensions = 0; + size_t edx; + int ret; + + (void)constraints; + + if(preamble_bits) { + asn_bit_outp_t preamble; + + memset(&preamble, 0, sizeof(preamble)); + preamble.output = cb; + preamble.op_key = app_key; + + if(has_extensions_bit) { + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Do not encode default values in extensions */ + } else { + has_extensions = 1; + break; + } + } + } + ret = asn_put_few_bits(&preamble, has_extensions, 1); + assert(ret == 0); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + } + + /* + * Encode optional components bitmap. + */ + if(specs->roms_count) { + FOR_IN_ROOT_GROUP(edx) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + if(IN_EXTENSION_GROUP(specs, edx)) break; + + if(elm->optional) { + const void *memb_ptr = element_ptr(sptr, elm); + uint32_t has_component = memb_ptr != NULL; + if(has_component && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + has_component = 0; + } + ret = asn_put_few_bits(&preamble, has_component, 1); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + } + } + } + + asn_put_aligned_flush(&preamble); + computed_size += preamble.flushed_bytes; + } /* if(preamble_bits) */ + + /* + * Put root components and extensions root. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + asn_enc_rval_t er = {0,0,0}; + const void *memb_ptr; + + if(IN_EXTENSION_GROUP(specs, edx)) break; + + memb_ptr = element_ptr(sptr, elm); + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Skip default values in encoding */ + continue; + } + } else { + if(elm->optional) continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + if(!elm->type->op->oer_encoder) { + ASN_DEBUG("OER encoder is not defined for type %s", elm->type->name); + ASN__ENCODE_FAILED; + } + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded == -1) { + ASN_DEBUG("... while encoding %s member \"%s\"\n", td->name, + elm->name); + return er; + } + computed_size += er.encoded; + } + + /* + * Before encode extensions, encode extensions additions presense bitmap + # X.696 (08/2015) #16.4. + */ + if(has_extensions) { + asn_bit_outp_t extadds; + + /* Special case allowing us to use exactly one byte for #8.6 */ + size_t aoms_length_bits = specs->aoms_count; + size_t aoms_length_bytes = (7 + aoms_length_bits) >> 3; + uint8_t unused_bits = 0x07 & (8 - (aoms_length_bits & 0x07)); + + assert(1 + aoms_length_bytes <= 127); + + memset(&extadds, 0, sizeof(extadds)); + extadds.output = cb; + extadds.op_key = app_key; + + /* #8.6 length determinant */ + ret = asn_put_few_bits(&extadds, (1 + aoms_length_bytes), 8); + if(ret < 0) ASN__ENCODE_FAILED; + + /* Number of unused bytes, #16.4.2 */ + ret = asn_put_few_bits(&extadds, unused_bits, 8); + if(ret < 0) ASN__ENCODE_FAILED; + + /* Encode presence bitmap #16.4.3 */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + if(memb_ptr && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + memb_ptr = 0; /* Do not encode default value. */ + } + ret |= asn_put_few_bits(&extadds, memb_ptr ? 1 : 0, 1); + } + if(ret < 0) ASN__ENCODE_FAILED; + + asn_put_aligned_flush(&extadds); + computed_size += extadds.flushed_bytes; + + /* Now, encode extensions */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Do not encode default value. */ + } else { + ssize_t wrote = oer_open_type_put( + elm->type, elm->encoding_constraints.oer_constraints, + memb_ptr, cb, app_key); + if(wrote == -1) { + ASN__ENCODE_FAILED; + } + computed_size += wrote; + } + } else if(!elm->optional) { + ASN__ENCODE_FAILED; + } + } + } /* if(has_extensions) */ + + + { + asn_enc_rval_t er = {0, 0, 0}; + er.encoded = computed_size; + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/constr_SET.c b/Bouncer/e2sm_kpm/lib/constr_SET.c new file mode 100644 index 0000000..554a7dd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_SET.c @@ -0,0 +1,1149 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* Check that all the mandatory members are present */ +static int _SET_is_populated(const asn_TYPE_descriptor_t *td, const void *st); + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num;\ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * Tags are canonically sorted in the tag2element map. + */ +static int +_t2e_cmp(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) + return 0; + else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + +/* + * The decoder of the SET type. + */ +asn_dec_rval_t +SET_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_SET_specifics_t *specs = (const asn_SET_specifics_t *)td->specifics; + const asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* SET element's index */ + + ASN_DEBUG("Decoding %s as SET", td->name); + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, 1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) + ctx->left += rval.consumed; /* ?Substracted below! */ + ADVANCE(rval.consumed); + + NEXT_PHASE(ctx); + + ASN_DEBUG("Structure advertised %ld bytes, " + "buffer contains %ld", (long)ctx->left, (long)size); + + /* Fall through */ + case 1: + /* + * PHASE 1. + * From the place where we've left it previously, + * try to decode the next member from the list of + * this structure's elements. + * Note that elements in BER may arrive out of + * order, yet DER mandates that they shall arive in the + * canonical order of their tags. So, there is a room + * for optimization. + */ + for(;; ctx->step = 0) { + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + ssize_t tag_len; /* Length of TLV's T */ + + if(ctx->step & 1) { + edx = ctx->step >> 1; + goto microphase2; + } + + /* + * MICROPHASE 1: Synchronize decoding. + */ + + if(ctx->left == 0) + /* + * No more things to decode. + * Exit out of here and check whether all mandatory + * elements have been received (in the next phase). + */ + break; + + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Found the terminator of the + * indefinite length structure. + * Invoke the generic finalization function. + */ + goto phase3; + } + } + + key.el_tag = tlv_tag; + t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, + specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _t2e_cmp); + if(t2m) { + /* + * Found the element corresponding to the tag. + */ + edx = t2m->el_no; + ctx->step = (edx << 1) + 1; + ASN_DEBUG("Got tag %s (%s), edx %" ASN_PRI_SSIZE "", + ber_tlv_tag_string(tlv_tag), td->name, edx); + } else if(specs->extensible == 0) { + ASN_DEBUG("Unexpected tag %s " + "in non-extensible SET %s", + ber_tlv_tag_string(tlv_tag), td->name); + RETURN(RC_FAIL); + } else { + /* Skip this tag */ + ssize_t skip; + + ASN_DEBUG("Skipping unknown tag %s", + ber_tlv_tag_string(tlv_tag)); + + skip = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tag_len, LEFT - tag_len); + + switch(skip) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(skip + tag_len); + continue; /* Try again with the next tag */ + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + microphase2: + + /* + * Check for duplications: must not overwrite + * already decoded elements. + */ + if(ASN_SET_ISPRESENT2((char *)st + specs->pres_offset, edx)) { + ASN_DEBUG("SET %s: Duplicate element %s (%" ASN_PRI_SSIZE ")", + td->name, elements[edx].name, edx); + RETURN(RC_FAIL); + } + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elements[edx].flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elements[edx].memb_offset; + memb_ptr2 = &memb_ptr; + } + /* + * Invoke the member fetch routine according to member's type + */ + rval = elements[edx].type->op->ber_decoder(opt_codec_ctx, + elements[edx].type, + memb_ptr2, ptr, LEFT, + elements[edx].tag_mode); + switch(rval.code) { + case RC_OK: + ASN_SET_MKPRESENT((char *)st + specs->pres_offset, edx); + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + /* Fall through */ + case RC_FAIL: /* Fatal error */ + RETURN(RC_FAIL); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } /* for(all structure members) */ + + phase3: + ctx->phase = 3; + /* Fall through */ + case 3: + case 4: /* Only 00 is expected */ + ASN_DEBUG("SET %s Leftover: %ld, size = %ld", + td->name, (long)ctx->left, (long)size); + + /* + * Skip everything until the end of the SET. + */ + while(ctx->left) { + ssize_t tl, ll; + + tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tl) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + /* + * If expected <0><0>... + */ + if(ctx->left < 0 + && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Correctly finished with <0><0>. + */ + ADVANCE(2); + ctx->left++; + ctx->phase = 4; + continue; + } + } + + if(specs->extensible == 0 || ctx->phase == 4) { + ASN_DEBUG("Unexpected continuation " + "of a non-extensible type %s " + "(ptr=%02x)", + td->name, *(const uint8_t *)ptr); + RETURN(RC_FAIL); + } + + ll = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tl, LEFT - tl); + switch(ll) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(tl + ll); + } + + ctx->phase = 5; + /* Fall through */ + case 5: + /* Check that all mandatory elements are present. */ + if(!_SET_is_populated(td, st)) + RETURN(RC_FAIL); + + NEXT_PHASE(ctx); + } + + RETURN(RC_OK); +} + +static int +_SET_is_populated(const asn_TYPE_descriptor_t *td, const void *st) { + const asn_SET_specifics_t *specs = (const asn_SET_specifics_t *)td->specifics; + size_t edx; + + /* + * Check that all mandatory elements are present. + */ + for(edx = 0; edx < td->elements_count; + edx += (8 * sizeof(specs->_mandatory_elements[0]))) { + unsigned int midx, pres, must; + + midx = edx/(8 * sizeof(specs->_mandatory_elements[0])); + pres = ((const unsigned int *)((const char *)st + + specs->pres_offset))[midx]; + must = sys_ntohl(specs->_mandatory_elements[midx]); + + if((pres & must) == must) { + /* + * Yes, everything seems to be in place. + */ + } else { + ASN_DEBUG("One or more mandatory elements " + "of a SET %s %d (%08x.%08x)=%08x " + "are not present", + td->name, + midx, + pres, + must, + (~(pres & must) & must) + ); + return 0; + } + } + + return 1; +} + +/* + * The DER encoder of the SET type. + */ +asn_enc_rval_t +SET_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, + ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { + const asn_SET_specifics_t *specs = (const asn_SET_specifics_t *)td->specifics; + size_t computed_size = 0; + asn_enc_rval_t er; + int t2m_build_own = (specs->tag2el_count != td->elements_count); + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t *t2m_build; + size_t t2m_count; + ssize_t ret; + size_t edx; + + /* + * Use existing, or build our own tags map. + */ + if(t2m_build_own) { + t2m_build = (asn_TYPE_tag2member_t *)CALLOC(td->elements_count, + sizeof(t2m_build[0])); + if(!t2m_build) ASN__ENCODE_FAILED; + t2m_count = 0; + } else { + t2m_build = NULL; + /* + * There is no untagged CHOICE in this SET. + * Employ existing table. + */ + } + + /* + * Gather the length of the underlying members sequence. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + asn_enc_rval_t tmper; + const void *memb_ptr_dontuse; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + /* + * Compute the length of the encoding of this member. + */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) { + if(!elm->optional) { + /* Mandatory elements missing */ + FREEMEM(t2m_build); + ASN__ENCODE_FAILED; + } + if(t2m_build) { + t2m_build[t2m_count].el_no = edx; + t2m_build[t2m_count].el_tag = 0; + t2m_count++; + } + continue; + } + } else { + memb_ptr_dontuse = + (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr_dontuse; /* Only use of memb_ptr_dontuse */ + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) { + if(t2m_build) { + t2m_build[t2m_count].el_no = edx; + t2m_build[t2m_count].el_tag = 0; + t2m_count++; + } + continue; + } + + tmper = elm->type->op->der_encoder(elm->type, *memb_ptr2, + elm->tag_mode, elm->tag, + 0, 0); + if(tmper.encoded == -1) + return tmper; + computed_size += tmper.encoded; + + /* + * Remember the outmost tag of this member. + */ + if(t2m_build) { + t2m_build[t2m_count].el_no = edx; + t2m_build[t2m_count].el_tag = asn_TYPE_outmost_tag( + elm->type, *memb_ptr2, elm->tag_mode, elm->tag); + t2m_count++; + } else { + /* + * No dynamic sorting is necessary. + */ + } + } + + /* + * Finalize order of the components. + */ + if(t2m_build) { + /* + * Sort the underlying members according to their + * canonical tags order. DER encoding mandates it. + */ + qsort(t2m_build, t2m_count, sizeof(specs->tag2el[0]), _t2e_cmp); + t2m = t2m_build; + } else { + /* + * Tags are already sorted by the compiler. + */ + t2m = specs->tag2el; + t2m_count = specs->tag2el_count; + } + assert(t2m_count == td->elements_count); + + /* + * Encode the TLV for the sequence itself. + */ + ret = der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); + if(ret == -1) { + FREEMEM(t2m_build); + ASN__ENCODE_FAILED; + } + er.encoded = computed_size + ret; + + if(!cb) { + FREEMEM(t2m_build); + ASN__ENCODED_OK(er); + } + + /* + * Encode all members. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm; + asn_enc_rval_t tmper; + + const void *memb_ptr_dontuse; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + /* Encode according to the tag order */ + elm = &td->elements[t2m[edx].el_no]; + + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) continue; + } else { + memb_ptr_dontuse = + (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr_dontuse; /* Only use of memb_ptr_dontuse */ + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) + continue; + + tmper = elm->type->op->der_encoder(elm->type, *memb_ptr2, + elm->tag_mode, elm->tag, cb, app_key); + if(tmper.encoded == -1) + return tmper; + computed_size -= tmper.encoded; + } + + if(computed_size != 0) { + /* + * Encoded size is not equal to the computed size. + */ + FREEMEM(t2m_build); + ASN__ENCODE_FAILED; + } + + FREEMEM(t2m_build); + ASN__ENCODED_OK(er); +} + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + buf_ptr = ((const char *)buf_ptr) + num;\ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +SET_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_SET_specifics_t *specs = (const asn_SET_specifics_t *)td->specifics; + const asn_TYPE_member_t *elements = td->elements; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * ... and parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval; /* Return value from a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* Element index */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + * Phase 3: Skipping unknown extensions. + * Phase 4: PHASED OUT + */ + for(edx = ctx->step; ctx->phase <= 3;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + const asn_TYPE_member_t *elm; + + /* + * Go inside the inner member of a set. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval; + void *memb_ptr_dontuse; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + if(ASN_SET_ISPRESENT2((char *)st + specs->pres_offset, + edx)) { + ASN_DEBUG("SET %s: Duplicate element %s (%" ASN_PRI_SSIZE ")", + td->name, elements[edx].name, edx); + RETURN(RC_FAIL); + } + + elm = &elements[edx]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr_dontuse = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr_dontuse; /* Only use of memb_ptr_dontuse */ + } + + /* Invoke the inner type decoder, m.b. multiple times */ + tmprval = elm->type->op->xer_decoder(opt_codec_ctx, + elm->type, memb_ptr2, elm->name, + buf_ptr, size); + XER_ADVANCE(tmprval.consumed); + if(tmprval.code != RC_OK) + RETURN(tmprval.code); + ctx->phase = 1; /* Back to body processing */ + ASN_SET_MKPRESENT((char *)st + specs->pres_offset, edx); + ASN_DEBUG("XER/SET phase => %d", ctx->phase); + /* Fall through */ + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, + buf_ptr, size, &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + ASN_DEBUG("XER/SET: tcv = %d, ph=%d", tcv, ctx->phase); + + /* Skip the extensions section */ + if(ctx->phase == 3) { + switch(xer_skip_unknown(tcv, &ctx->left)) { + case -1: + ctx->phase = 4; + RETURN(RC_FAIL); + case 1: + ctx->phase = 1; + /* Fall through */ + case 0: + XER_ADVANCE(ch_size); + continue; + case 2: + ctx->phase = 1; + break; + } + } + + switch(tcv) { + case XCT_CLOSING: + if(ctx->phase == 0) break; + ctx->phase = 0; + /* Fall through */ + case XCT_BOTH: + if(ctx->phase == 0) { + if(_SET_is_populated(td, st)) { + XER_ADVANCE(ch_size); + ctx->phase = 4; /* Phase out */ + RETURN(RC_OK); + } else { + ASN_DEBUG("Premature end of XER SET"); + RETURN(RC_FAIL); + } + } + /* Fall through */ + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + ASN_DEBUG("XER/SET: tcv=%d, ph=%d", tcv, ctx->phase); + if(ctx->phase != 1) + break; /* Really unexpected */ + + /* + * Search which member corresponds to this tag. + */ + for(edx = 0; edx < td->elements_count; edx++) { + switch(xer_check_tag(buf_ptr, ch_size, + elements[edx].name)) { + case XCT_BOTH: + case XCT_OPENING: + /* + * Process this member. + */ + ctx->step = edx; + ctx->phase = 2; + break; + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + continue; + default: + edx = td->elements_count; + break; /* Phase out */ + } + break; + } + if(edx != td->elements_count) + continue; + + /* It is expected extension */ + if(specs->extensible) { + ASN_DEBUG("Got anticipated extension"); + /* + * Check for (XCT_BOTH or XCT_UNKNOWN_BO) + * By using a mask. Only record a pure + * tags. + */ + if(tcv & XCT_CLOSING) { + /* Found without body */ + } else { + ctx->left = 1; + ctx->phase = 3; /* Skip ...'s */ + } + XER_ADVANCE(ch_size); + continue; + } + + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag in SET, expected \"%s\"", + xml_tag); + break; + } + + ctx->phase = 4; /* "Phase out" on hard failure */ + RETURN(RC_FAIL); +} + +asn_enc_rval_t +SET_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_SET_specifics_t *specs = (const asn_SET_specifics_t *)td->specifics; + asn_enc_rval_t er; + int xcan = (flags & XER_F_CANONICAL); + const asn_TYPE_tag2member_t *t2m = specs->tag2el_cxer; + size_t t2m_count = specs->tag2el_cxer_count; + size_t edx; + + if(!sptr) + ASN__ENCODE_FAILED; + + assert(t2m_count == td->elements_count); + + er.encoded = 0; + + for(edx = 0; edx < t2m_count; edx++) { + asn_enc_rval_t tmper; + asn_TYPE_member_t *elm; + const void *memb_ptr; + const char *mname; + size_t mlen; + + elm = &td->elements[t2m[edx].el_no]; + mname = elm->name; + mlen = strlen(elm->name); + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) + continue; + /* Mandatory element missing */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(!xcan) + ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + /* Print the member itself */ + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, + ilevel + 1, flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("", 1); + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +int +SET_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t edx; + int ret; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* Dump preamble */ + if(cb(td->name, strlen(td->name), app_key) < 0 + || cb(" ::= {", 6, app_key) < 0) + return -1; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) continue; + /* Print line */ + /* Fall through */ + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + _i_INDENT(1); + + /* Print the member's name and stuff */ + if(cb(elm->name, strlen(elm->name), app_key) < 0 + || cb(": ", 2, app_key) < 0) + return -1; + + /* Print the member itself */ + ret = elm->type->op->print_struct(elm->type, memb_ptr, ilevel + 1, + cb, app_key); + if(ret) return ret; + } + + ilevel--; + _i_INDENT(1); + + return (cb("}", 1, app_key) < 0) ? -1 : 0; +} + +void +SET_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + size_t edx; + + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as SET", td->name); + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; + if(elm->flags & ATF_POINTER) { + memb_ptr = *(void **)((char *)ptr + elm->memb_offset); + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } else { + memb_ptr = (void *)((char *)ptr + elm->memb_offset); + ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); + } + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, + ((const asn_SET_specifics_t *)(td->specifics))->struct_size); + break; + } +} + +int +SET_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t edx; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* + * Iterate over structure members and check their validity. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) + continue; + ASN__CTFAIL(app_key, td, sptr, + "%s: mandatory element %s absent (%s:%d)", + td->name, elm->name, __FILE__, __LINE__); + return -1; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(elm->encoding_constraints.general_constraints) { + return elm->encoding_constraints.general_constraints( + elm->type, memb_ptr, ctfailcb, app_key); + } else { + return elm->type->encoding_constraints.general_constraints( + elm->type, memb_ptr, ctfailcb, app_key); + } + } + + return 0; +} + +int +SET_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + size_t edx; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *amemb; + const void *bmemb; + int ret; + + if(elm->flags & ATF_POINTER) { + amemb = + *(const void *const *)((const char *)aptr + elm->memb_offset); + bmemb = + *(const void *const *)((const char *)bptr + elm->memb_offset); + if(!amemb) { + if(!bmemb) continue; + return -1; + } else if(!bmemb) { + return 1; + } + } else { + amemb = (const void *)((const char *)aptr + elm->memb_offset); + bmemb = (const void *)((const char *)bptr + elm->memb_offset); + } + + ret = elm->type->op->compare_struct(elm->type, amemb, bmemb); + if(ret != 0) return ret; + } + + return 0; +} + + +asn_TYPE_operation_t asn_OP_SET = { + SET_free, + SET_print, + SET_compare, + SET_decode_ber, + SET_encode_der, + SET_decode_xer, + SET_encode_xer, + 0, /* SET_decode_oer */ + 0, /* SET_encode_oer */ + 0, /* SET_decode_uper */ + 0, /* SET_encode_uper */ + 0, /* SET_decode_aper */ + 0, /* SET_encode_aper */ + SET_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; + + +asn_random_fill_result_t +SET_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constr, + size_t max_length) { + const asn_SET_specifics_t *specs = + (const asn_SET_specifics_t *)td->specifics; + asn_random_fill_result_t result_ok = {ARFILL_OK, 0}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + void *st = *sptr; + size_t edx; + + if(max_length == 0) return result_skipped; + + (void)constr; + + if(st == NULL) { + st = CALLOC(1, specs->struct_size); + if(st == NULL) { + return result_failed; + } + } + + for(edx = 0; edx < td->elements_count; edx++) { + const asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + asn_random_fill_result_t tmpres; + + if(elm->optional && asn_random_between(0, 4) == 2) { + /* Sometimes decide not to fill the optional value */ + continue; + } + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + tmpres = elm->type->op->random_fill( + elm->type, memb_ptr2, &elm->encoding_constraints, + max_length > result_ok.length ? max_length - result_ok.length : 0); + switch(tmpres.code) { + case ARFILL_OK: + result_ok.length += tmpres.length; + continue; + case ARFILL_SKIPPED: + assert(!(elm->flags & ATF_POINTER) || *memb_ptr2 == NULL); + continue; + case ARFILL_FAILED: + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + return tmpres; + } + } + + *sptr = st; + + return result_ok; +} + diff --git a/Bouncer/e2sm_kpm/lib/constr_SET_OF.c b/Bouncer/e2sm_kpm/lib/constr_SET_OF.c new file mode 100644 index 0000000..bf1dc27 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_SET_OF.c @@ -0,0 +1,1441 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num;\ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#undef PHASE_OUT +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * The decoder of the SET OF type. + */ +asn_dec_rval_t +SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; /* Single one */ + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + ASN_DEBUG("Decoding %s as SET OF", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, 1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) + ctx->left += rval.consumed; /* ?Substracted below! */ + ADVANCE(rval.consumed); + + ASN_DEBUG("Structure consumes %ld bytes, " + "buffer %ld", (long)ctx->left, (long)size); + + NEXT_PHASE(ctx); + /* Fall through */ + case 1: + /* + * PHASE 1. + * From the place where we've left it previously, + * try to decode the next item. + */ + for(;; ctx->step = 0) { + ssize_t tag_len; /* Length of TLV's T */ + + if(ctx->step & 1) + goto microphase2; + + /* + * MICROPHASE 1: Synchronize decoding. + */ + + if(ctx->left == 0) { + ASN_DEBUG("End of SET OF %s", td->name); + /* + * No more things to decode. + * Exit out of here. + */ + PHASE_OUT(ctx); + RETURN(RC_OK); + } + + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Found the terminator of the + * indefinite length structure. + */ + break; + } + } + + /* Outmost tag may be unknown and cannot be fetched/compared */ + if(elm->tag != (ber_tlv_tag_t)-1) { + if(BER_TAGS_EQUAL(tlv_tag, elm->tag)) { + /* + * The new list member of expected type has arrived. + */ + } else { + ASN_DEBUG("Unexpected tag %s fixed SET OF %s", + ber_tlv_tag_string(tlv_tag), td->name); + ASN_DEBUG("%s SET OF has tag %s", + td->name, ber_tlv_tag_string(elm->tag)); + RETURN(RC_FAIL); + } + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + ctx->step |= 1; /* Confirm entering next microphase */ + microphase2: + + /* + * Invoke the member fetch routine according to member's type + */ + rval = elm->type->op->ber_decoder(opt_codec_ctx, + elm->type, &ctx->ptr, ptr, LEFT, 0); + ASN_DEBUG("In %s SET OF %s code %d consumed %d", + td->name, elm->type->name, + rval.code, (int)rval.consumed); + switch(rval.code) { + case RC_OK: + { + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + if(ASN_SET_ADD(list, ctx->ptr) != 0) + RETURN(RC_FAIL); + else + ctx->ptr = 0; + } + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + /* Fall through */ + case RC_FAIL: /* Fatal error */ + ASN_STRUCT_FREE(*elm->type, ctx->ptr); + ctx->ptr = 0; + RETURN(RC_FAIL); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } /* for(all list members) */ + + NEXT_PHASE(ctx); + case 2: + /* + * Read in all "end of content" TLVs. + */ + while(ctx->left < 0) { + if(LEFT < 2) { + if(LEFT > 0 && ((const char *)ptr)[0] != 0) { + /* Unexpected tag */ + RETURN(RC_FAIL); + } else { + RETURN(RC_WMORE); + } + } + if(((const char *)ptr)[0] == 0 + && ((const char *)ptr)[1] == 0) { + ADVANCE(2); + ctx->left++; + } else { + RETURN(RC_FAIL); + } + } + + PHASE_OUT(ctx); + } + + RETURN(RC_OK); +} + +/* + * Internally visible buffer holding a single encoded element. + */ +struct _el_buffer { + uint8_t *buf; + size_t length; + size_t allocated_size; + unsigned bits_unused; +}; +/* Append bytes to the above structure */ +static int _el_addbytes(const void *buffer, size_t size, void *el_buf_ptr) { + struct _el_buffer *el_buf = (struct _el_buffer *)el_buf_ptr; + + if(el_buf->length + size > el_buf->allocated_size) { + size_t new_size = el_buf->allocated_size ? el_buf->allocated_size : 8; + void *p; + + do { + new_size <<= 2; + } while(el_buf->length + size > new_size); + + p = REALLOC(el_buf->buf, new_size); + if(p) { + el_buf->buf = p; + el_buf->allocated_size = new_size; + } else { + return -1; + } + } + + memcpy(el_buf->buf + el_buf->length, buffer, size); + + el_buf->length += size; + return 0; +} + +static void assert_unused_bits(const struct _el_buffer* p) { + if(p->length) { + assert((p->buf[p->length-1] & ~(0xff << p->bits_unused)) == 0); + } else { + assert(p->bits_unused == 0); + } +} + +static int _el_buf_cmp(const void *ap, const void *bp) { + const struct _el_buffer *a = (const struct _el_buffer *)ap; + const struct _el_buffer *b = (const struct _el_buffer *)bp; + size_t common_len; + int ret = 0; + + if(a->length < b->length) + common_len = a->length; + else + common_len = b->length; + + if (a->buf && b->buf) { + ret = memcmp(a->buf, b->buf, common_len); + } + if(ret == 0) { + if(a->length < b->length) + ret = -1; + else if(a->length > b->length) + ret = 1; + /* Ignore unused bits. */ + assert_unused_bits(a); + assert_unused_bits(b); + } + + return ret; +} + +static void +SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count) { + size_t i; + + for(i = 0; i < count; i++) { + FREEMEM(el_buf[i].buf); + } + + FREEMEM(el_buf); +} + +enum SET_OF__encode_method { + SOES_DER, /* Distinguished Encoding Rules */ + SOES_CUPER /* Canonical Unaligned Packed Encoding Rules */ +}; + +static struct _el_buffer * +SET_OF__encode_sorted(const asn_TYPE_member_t *elm, + const asn_anonymous_set_ *list, + enum SET_OF__encode_method method) { + struct _el_buffer *encoded_els; + int edx; + + encoded_els = + (struct _el_buffer *)CALLOC(list->count, sizeof(encoded_els[0])); + if(encoded_els == NULL) { + return NULL; + } + + /* + * Encode all members. + */ + for(edx = 0; edx < list->count; edx++) { + const void *memb_ptr = list->array[edx]; + struct _el_buffer *encoding_el = &encoded_els[edx]; + asn_enc_rval_t erval = {0,0,0}; + + if(!memb_ptr) break; + + /* + * Encode the member into the prepared space. + */ + switch(method) { + case SOES_DER: + erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, + _el_addbytes, encoding_el); + break; + case SOES_CUPER: + erval = uper_encode(elm->type, + elm->encoding_constraints.per_constraints, + memb_ptr, _el_addbytes, encoding_el); + if(erval.encoded != -1) { + size_t extra_bits = erval.encoded % 8; + assert(encoding_el->length == (size_t)(erval.encoded + 7) / 8); + encoding_el->bits_unused = (8 - extra_bits) & 0x7; + } + break; + default: + assert(!"Unreachable"); + break; + } + if(erval.encoded < 0) break; + } + + if(edx == list->count) { + /* + * Sort the encoded elements according to their encoding. + */ + qsort(encoded_els, list->count, sizeof(encoded_els[0]), _el_buf_cmp); + + return encoded_els; + } else { + SET_OF__encode_sorted_free(encoded_els, edx); + return NULL; + } +} + + +/* + * The DER encoder of the SET OF type. + */ +asn_enc_rval_t +SET_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + size_t computed_size = 0; + ssize_t encoding_size = 0; + struct _el_buffer *encoded_els; + int edx; + + ASN_DEBUG("Estimating size for SET OF %s", td->name); + + /* + * Gather the length of the underlying members sequence. + */ + for(edx = 0; edx < list->count; edx++) { + void *memb_ptr = list->array[edx]; + asn_enc_rval_t erval = {0,0,0}; + + if(!memb_ptr) ASN__ENCODE_FAILED; + + erval = + elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, 0, 0); + if(erval.encoded == -1) return erval; + computed_size += erval.encoded; + } + + + /* + * Encode the TLV for the sequence itself. + */ + encoding_size = + der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); + if(encoding_size < 0) { + ASN__ENCODE_FAILED; + } + computed_size += encoding_size; + + if(!cb || list->count == 0) { + asn_enc_rval_t erval = {0,0,0}; + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } + + ASN_DEBUG("Encoding members of %s SET OF", td->name); + + /* + * DER mandates dynamic sorting of the SET OF elements + * according to their encodings. Build an array of the + * encoded elements. + */ + encoded_els = SET_OF__encode_sorted(elm, list, SOES_DER); + + /* + * Report encoded elements to the application. + * Dispose of temporary sorted members table. + */ + for(edx = 0; edx < list->count; edx++) { + struct _el_buffer *encoded_el = &encoded_els[edx]; + /* Report encoded chunks to the application */ + if(cb(encoded_el->buf, encoded_el->length, app_key) < 0) { + break; + } else { + encoding_size += encoded_el->length; + } + } + + SET_OF__encode_sorted_free(encoded_els, list->count); + + if(edx == list->count) { + asn_enc_rval_t erval = {0,0,0}; + assert(computed_size == (size_t)encoding_size); + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } else { + ASN__ENCODE_FAILED; + } +} + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + buf_ptr = ((const char *)buf_ptr) + num;\ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +SET_OF_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *element = td->elements; + const char *elm_tag; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * ... and parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval = {RC_OK, 0};/* Return value from a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* Which tag is expected for the downstream */ + if(specs->as_XMLValueList) { + elm_tag = (specs->as_XMLValueList == 1) ? 0 : ""; + } else { + elm_tag = (*element->name) + ? element->name : element->type->xml_tag; + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + */ + for(; ctx->phase <= 2;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + + /* + * Go inside the inner member of a set. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval = {RC_OK, 0}; + + /* Invoke the inner type decoder, m.b. multiple times */ + ASN_DEBUG("XER/SET OF element [%s]", elm_tag); + tmprval = element->type->op->xer_decoder(opt_codec_ctx, + element->type, &ctx->ptr, elm_tag, + buf_ptr, size); + if(tmprval.code == RC_OK) { + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + if(ASN_SET_ADD(list, ctx->ptr) != 0) + RETURN(RC_FAIL); + ctx->ptr = 0; + XER_ADVANCE(tmprval.consumed); + } else { + XER_ADVANCE(tmprval.consumed); + RETURN(tmprval.code); + } + ctx->phase = 1; /* Back to body processing */ + ASN_DEBUG("XER/SET OF phase => %d", ctx->phase); + /* Fall through */ + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, + buf_ptr, size, &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + ASN_DEBUG("XER/SET OF: tcv = %d, ph=%d t=%s", + tcv, ctx->phase, xml_tag); + switch(tcv) { + case XCT_CLOSING: + if(ctx->phase == 0) break; + ctx->phase = 0; + /* Fall through */ + case XCT_BOTH: + if(ctx->phase == 0) { + /* No more things to decode */ + XER_ADVANCE(ch_size); + ctx->phase = 3; /* Phase out */ + RETURN(RC_OK); + } + /* Fall through */ + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + ASN_DEBUG("XER/SET OF: tcv=%d, ph=%d", tcv, ctx->phase); + if(ctx->phase == 1) { + /* + * Process a single possible member. + */ + ctx->phase = 2; + continue; + } + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag in SET OF"); + break; + } + + ctx->phase = 3; /* "Phase out" on hard failure */ + RETURN(RC_FAIL); +} + + + +typedef struct xer_tmp_enc_s { + void *buffer; + size_t offset; + size_t size; +} xer_tmp_enc_t; +static int +SET_OF_encode_xer_callback(const void *buffer, size_t size, void *key) { + xer_tmp_enc_t *t = (xer_tmp_enc_t *)key; + if(t->offset + size >= t->size) { + size_t newsize = (t->size << 2) + size; + void *p = REALLOC(t->buffer, newsize); + if(!p) return -1; + t->buffer = p; + t->size = newsize; + } + memcpy((char *)t->buffer + t->offset, buffer, size); + t->offset += size; + return 0; +} +static int +SET_OF_xer_order(const void *aptr, const void *bptr) { + const xer_tmp_enc_t *a = (const xer_tmp_enc_t *)aptr; + const xer_tmp_enc_t *b = (const xer_tmp_enc_t *)bptr; + size_t minlen = a->offset; + int ret; + if(b->offset < minlen) minlen = b->offset; + /* Well-formed UTF-8 has this nice lexicographical property... */ + ret = memcmp(a->buffer, b->buffer, minlen); + if(ret != 0) return ret; + if(a->offset == b->offset) + return 0; + if(a->offset == minlen) + return -1; + return 1; +} + + +asn_enc_rval_t +SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0,0,0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + const char *mname = specs->as_XMLValueList + ? 0 : ((*elm->name) ? elm->name : elm->type->xml_tag); + size_t mlen = mname ? strlen(mname) : 0; + int xcan = (flags & XER_F_CANONICAL); + xer_tmp_enc_t *encs = 0; + size_t encs_count = 0; + void *original_app_key = app_key; + asn_app_consume_bytes_f *original_cb = cb; + int i; + + if(!sptr) ASN__ENCODE_FAILED; + + if(xcan) { + encs = (xer_tmp_enc_t *)MALLOC(list->count * sizeof(encs[0])); + if(!encs) ASN__ENCODE_FAILED; + cb = SET_OF_encode_xer_callback; + } + + er.encoded = 0; + + for(i = 0; i < list->count; i++) { + asn_enc_rval_t tmper = {0,0,0}; + + void *memb_ptr = list->array[i]; + if(!memb_ptr) continue; + + if(encs) { + memset(&encs[encs_count], 0, sizeof(encs[0])); + app_key = &encs[encs_count]; + encs_count++; + } + + if(mname) { + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + } + + if(!xcan && specs->as_XMLValueList == 1) + ASN__TEXT_INDENT(1, ilevel + 1); + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, + ilevel + (specs->as_XMLValueList != 2), + flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + if(tmper.encoded == 0 && specs->as_XMLValueList) { + const char *name = elm->type->xml_tag; + size_t len = strlen(name); + ASN__CALLBACK3("<", 1, name, len, "/>", 2); + } + + if(mname) { + ASN__CALLBACK3("", 1); + } + + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + if(encs) { + xer_tmp_enc_t *enc = encs; + xer_tmp_enc_t *end = encs + encs_count; + ssize_t control_size = 0; + + er.encoded = 0; + cb = original_cb; + app_key = original_app_key; + qsort(encs, encs_count, sizeof(encs[0]), SET_OF_xer_order); + + for(; enc < end; enc++) { + ASN__CALLBACK(enc->buffer, enc->offset); + FREEMEM(enc->buffer); + enc->buffer = 0; + control_size += enc->offset; + } + assert(control_size == er.encoded); + } + + goto cleanup; +cb_failed: + ASN__ENCODE_FAILED; +cleanup: + if(encs) { + size_t n; + for(n = 0; n < encs_count; n++) { + FREEMEM(encs[n].buffer); + } + FREEMEM(encs); + } + ASN__ENCODED_OK(er); +} + +int +SET_OF_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + int ret; + int i; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* Dump preamble */ + if(cb(td->name, strlen(td->name), app_key) < 0 + || cb(" ::= {", 6, app_key) < 0) + return -1; + + for(i = 0; i < list->count; i++) { + const void *memb_ptr = list->array[i]; + if(!memb_ptr) continue; + + _i_INDENT(1); + + ret = elm->type->op->print_struct(elm->type, memb_ptr, + ilevel + 1, cb, app_key); + if(ret) return ret; + } + + ilevel--; + _i_INDENT(1); + + return (cb("}", 1, app_key) < 0) ? -1 : 0; +} + +void +SET_OF_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + if(td && ptr) { + const asn_SET_OF_specifics_t *specs; + asn_TYPE_member_t *elm = td->elements; + asn_anonymous_set_ *list = _A_SET_FROM_VOID(ptr); + asn_struct_ctx_t *ctx; /* Decoder context */ + int i; + + /* + * Could not use set_of_empty() because of (*free) + * incompatibility. + */ + for(i = 0; i < list->count; i++) { + void *memb_ptr = list->array[i]; + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } + list->count = 0; /* No meaningful elements left */ + + asn_set_empty(list); /* Remove (list->array) */ + + specs = (const asn_SET_OF_specifics_t *)td->specifics; + ctx = (asn_struct_ctx_t *)((char *)ptr + specs->ctx_offset); + if(ctx->ptr) { + ASN_STRUCT_FREE(*elm->type, ctx->ptr); + ctx->ptr = 0; + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, specs->struct_size); + break; + } + } +} + +int +SET_OF_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const asn_TYPE_member_t *elm = td->elements; + asn_constr_check_f *constr; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + int i; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + constr = elm->encoding_constraints.general_constraints; + if(!constr) constr = elm->type->encoding_constraints.general_constraints; + + /* + * Iterate over the members of an array. + * Validate each in turn, until one fails. + */ + for(i = 0; i < list->count; i++) { + const void *memb_ptr = list->array[i]; + int ret; + + if(!memb_ptr) continue; + + ret = constr(elm->type, memb_ptr, ctfailcb, app_key); + if(ret) return ret; + } + + return 0; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +SET_OF_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rv = {RC_OK, 0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; /* Single one */ + void *st = *sptr; + asn_anonymous_set_ *list; + const asn_per_constraint_t *ct; + int repeat = 0; + ssize_t nelems; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + list = _A_SET_FROM_VOID(st); + + /* Figure out which constraints to use */ + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) ct = 0; /* Not restricted! */ + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + nelems = per_get_few_bits(pd, ct->effective_bits); + ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s", + (long)nelems, ct->lower_bound, td->name); + if(nelems < 0) ASN__DECODE_STARVED; + nelems += ct->lower_bound; + } else { + nelems = -1; + } + + do { + int i; + if(nelems < 0) { + nelems = uper_get_length(pd, -1, 0, &repeat); + ASN_DEBUG("Got to decode %" ASN_PRI_SSIZE " elements (eff %d)", + nelems, (int)(ct ? ct->effective_bits : -1)); + if(nelems < 0) ASN__DECODE_STARVED; + } + + for(i = 0; i < nelems; i++) { + void *ptr = 0; + ASN_DEBUG("SET OF %s decoding", elm->type->name); + rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, &ptr, pd); + ASN_DEBUG("%s SET OF %s decoded %d, %p", + td->name, elm->type->name, rv.code, ptr); + if(rv.code == RC_OK) { + if(ASN_SET_ADD(list, ptr) == 0) { + if(rv.consumed == 0 && nelems > 200) { + /* Protect from SET OF NULL compression bombs. */ + ASN__DECODE_FAILED; + } + continue; + } + ASN_DEBUG("Failed to add element into %s", + td->name); + /* Fall through */ + rv.code = RC_FAIL; + } else { + ASN_DEBUG("Failed decoding %s of %s (SET OF)", + elm->type->name, td->name); + } + if(ptr) ASN_STRUCT_FREE(*elm->type, ptr); + return rv; + } + + nelems = -1; /* Allow uper_get_length() */ + } while(repeat); + + ASN_DEBUG("Decoded %s as SET OF", td->name); + + rv.code = RC_OK; + rv.consumed = 0; + return rv; +} + +asn_enc_rval_t +SET_OF_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_anonymous_set_ *list; + const asn_per_constraint_t *ct; + const asn_TYPE_member_t *elm = td->elements; + struct _el_buffer *encoded_els; + asn_enc_rval_t er = {0,0,0}; + size_t encoded_edx; + + if(!sptr) ASN__ENCODE_FAILED; + + list = _A_CSET_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE OF (%d)", td->name, list->count); + + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + /* If extensible constraint, check if size is in root */ + if(ct) { + int not_in_root = + (list->count < ct->lower_bound || list->count > ct->upper_bound); + ASN_DEBUG("lb %ld ub %ld %s", ct->lower_bound, ct->upper_bound, + ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); + if(ct->flags & APC_EXTENSIBLE) { + /* Declare whether size is in extension root */ + if(per_put_few_bits(po, not_in_root, 1)) ASN__ENCODE_FAILED; + if(not_in_root) ct = 0; + } else if(not_in_root && ct->effective_bits >= 0) { + ASN__ENCODE_FAILED; + } + + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + if(per_put_few_bits(po, list->count - ct->lower_bound, + ct->effective_bits)) + ASN__ENCODE_FAILED; + } else if(list->count == 0) { + /* When the list is empty add only the length determinant + * X.691, #20.6 and #11.9.4.1 + */ + if (uper_put_length(po, 0, 0)) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } + + + /* + * Canonical UPER #22.1 mandates dynamic sorting of the SET OF elements + * according to their encodings. Build an array of the encoded elements. + */ + encoded_els = SET_OF__encode_sorted(elm, list, SOES_CUPER); + + for(encoded_edx = 0; (ssize_t)encoded_edx < list->count;) { + ssize_t may_encode; + size_t edx; + int need_eom = 0; + + if(ct && ct->effective_bits >= 0) { + may_encode = list->count; + } else { + may_encode = + uper_put_length(po, list->count - encoded_edx, &need_eom); + if(may_encode < 0) ASN__ENCODE_FAILED; + } + + for(edx = encoded_edx; edx < encoded_edx + may_encode; edx++) { + const struct _el_buffer *el = &encoded_els[edx]; + if(asn_put_many_bits(po, el->buf, + (8 * el->length) - el->bits_unused) < 0) { + break; + } + } + + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + + encoded_edx += may_encode; + } + + SET_OF__encode_sorted_free(encoded_els, list->count); + + if((ssize_t)encoded_edx == list->count) { + ASN__ENCODED_OK(er); + } else { + ASN__ENCODE_FAILED; + } +} + +asn_dec_rval_t +SET_OF_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + asn_dec_rval_t rv = {RC_OK, 0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; /* Single one */ + void *st = *sptr; + asn_anonymous_set_ *list; + const asn_per_constraint_t *ct; + int repeat = 0; + ssize_t nelems; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + list = _A_SET_FROM_VOID(st); + + /* Figure out which constraints to use */ + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) ct = 0; /* Not restricted! */ + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + nelems = aper_get_nsnnwn(pd, ct->upper_bound - ct->lower_bound + 1); + ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s", + (long)nelems, ct->lower_bound, td->name); + if(nelems < 0) ASN__DECODE_STARVED; + nelems += ct->lower_bound; + } else { + nelems = -1; + } + + do { + int i; + if(nelems < 0) { + nelems = aper_get_length(pd, ct ? ct->upper_bound - ct->lower_bound + 1 : -1, + ct ? ct->effective_bits : -1, &repeat); + ASN_DEBUG("Got to decode %d elements (eff %d)", + (int)nelems, (int)(ct ? ct->effective_bits : -1)); + if(nelems < 0) ASN__DECODE_STARVED; + } + + for(i = 0; i < nelems; i++) { + void *ptr = 0; + ASN_DEBUG("SET OF %s decoding", elm->type->name); + rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, &ptr, pd); + ASN_DEBUG("%s SET OF %s decoded %d, %p", + td->name, elm->type->name, rv.code, ptr); + if(rv.code == RC_OK) { + if(ASN_SET_ADD(list, ptr) == 0) + continue; + ASN_DEBUG("Failed to add element into %s", + td->name); + /* Fall through */ + rv.code = RC_FAIL; + } else { + ASN_DEBUG("Failed decoding %s of %s (SET OF)", + elm->type->name, td->name); + } + if(ptr) ASN_STRUCT_FREE(*elm->type, ptr); + return rv; + } + + nelems = -1; /* Allow uper_get_length() */ + } while(repeat); + + ASN_DEBUG("Decoded %s as SET OF", td->name); + + rv.code = RC_OK; + rv.consumed = 0; + return rv; +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +struct comparable_ptr { + const asn_TYPE_descriptor_t *td; + const void *sptr; +}; + +static int +SET_OF__compare_cb(const void *aptr, const void *bptr) { + const struct comparable_ptr *a = aptr; + const struct comparable_ptr *b = bptr; + assert(a->td == b->td); + return a->td->op->compare_struct(a->td, a->sptr, b->sptr); +} + +int +SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const asn_anonymous_set_ *a = _A_CSET_FROM_VOID(aptr); + const asn_anonymous_set_ *b = _A_CSET_FROM_VOID(bptr); + + if(a && b) { + struct comparable_ptr *asorted; + struct comparable_ptr *bsorted; + ssize_t common_length; + ssize_t idx; + + if(a->count == 0) { + if(b->count) return -1; + return 0; + } else if(b->count == 0) { + return 1; + } + + asorted = MALLOC(a->count * sizeof(asorted[0])); + bsorted = MALLOC(b->count * sizeof(bsorted[0])); + if(!asorted || !bsorted) { + FREEMEM(asorted); + FREEMEM(bsorted); + return -1; + } + + for(idx = 0; idx < a->count; idx++) { + asorted[idx].td = td->elements->type; + asorted[idx].sptr = a->array[idx]; + } + + for(idx = 0; idx < b->count; idx++) { + bsorted[idx].td = td->elements->type; + bsorted[idx].sptr = b->array[idx]; + } + + qsort(asorted, a->count, sizeof(asorted[0]), SET_OF__compare_cb); + qsort(bsorted, b->count, sizeof(bsorted[0]), SET_OF__compare_cb); + + common_length = (a->count < b->count ? a->count : b->count); + for(idx = 0; idx < common_length; idx++) { + int ret = td->elements->type->op->compare_struct( + td->elements->type, asorted[idx].sptr, bsorted[idx].sptr); + if(ret) { + FREEMEM(asorted); + FREEMEM(bsorted); + return ret; + } + } + + FREEMEM(asorted); + FREEMEM(bsorted); + + if(idx < b->count) /* more elements in b */ + return -1; /* a is shorter, so put it first */ + if(idx < a->count) return 1; + } else if(!a) { + return -1; + } else if(!b) { + return 1; + } + + return 0; +} + + +asn_TYPE_operation_t asn_OP_SET_OF = { + SET_OF_free, + SET_OF_print, + SET_OF_compare, + SET_OF_decode_ber, + SET_OF_encode_der, + SET_OF_decode_xer, + SET_OF_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + SET_OF_decode_oer, + SET_OF_encode_oer, +#endif +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + SET_OF_decode_uper, + SET_OF_encode_uper, + SET_OF_decode_aper, + 0, /* SET_OF_encode_aper */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + SET_OF_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; + + +asn_random_fill_result_t +SET_OF_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_SET_OF_specifics_t *specs = + (const asn_SET_OF_specifics_t *)td->specifics; + asn_random_fill_result_t res_ok = {ARFILL_OK, 0}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + const asn_TYPE_member_t *elm = td->elements; + void *st = *sptr; + long max_elements = 5; + long slb = 0; /* Lower size bound */ + long sub = 0; /* Upper size bound */ + size_t rnd_len; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (*sptr = CALLOC(1, specs->struct_size)); + if(st == NULL) { + return result_failed; + } + } + + switch(asn_random_between(0, 6)) { + case 0: max_elements = 0; break; + case 1: max_elements = 1; break; + case 2: max_elements = 5; break; + case 3: max_elements = max_length; break; + case 4: max_elements = max_length / 2; break; + case 5: max_elements = max_length / 4; break; + default: break; + } + sub = slb + max_elements; + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->size; + if(pc->flags & APC_SEMI_CONSTRAINED) { + slb = pc->lower_bound; + sub = pc->lower_bound + max_elements; + } else if(pc->flags & APC_CONSTRAINED) { + slb = pc->lower_bound; + sub = pc->upper_bound; + if(sub - slb > max_elements) sub = slb + max_elements; + } + } + + /* Bias towards edges of allowed space */ + switch(asn_random_between(-1, 4)) { + default: + case -1: + /* Prepare lengths somewhat outside of constrained range. */ + if(constraints->per_constraints + && (constraints->per_constraints->size.flags & APC_EXTENSIBLE)) { + switch(asn_random_between(0, 5)) { + default: + case 0: + rnd_len = 0; + break; + case 1: + if(slb > 0) { + rnd_len = slb - 1; + } else { + rnd_len = 0; + } + break; + case 2: + rnd_len = asn_random_between(0, slb); + break; + case 3: + if(sub < (ssize_t)max_length) { + rnd_len = sub + 1; + } else { + rnd_len = max_length; + } + break; + case 4: + if(sub < (ssize_t)max_length) { + rnd_len = asn_random_between(sub + 1, max_length); + } else { + rnd_len = max_length; + } + break; + case 5: + rnd_len = max_length; + break; + } + break; + } + /* Fall through */ + case 0: + rnd_len = asn_random_between(slb, sub); + break; + case 1: + if(slb < sub) { + rnd_len = asn_random_between(slb + 1, sub); + break; + } + /* Fall through */ + case 2: + rnd_len = asn_random_between(slb, slb); + break; + case 3: + if(slb < sub) { + rnd_len = asn_random_between(slb, sub - 1); + break; + } + /* Fall through */ + case 4: + rnd_len = asn_random_between(sub, sub); + break; + } + + for(; rnd_len > 0; rnd_len--) { + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + void *ptr = 0; + asn_random_fill_result_t tmpres = elm->type->op->random_fill( + elm->type, &ptr, &elm->encoding_constraints, + (max_length > res_ok.length ? max_length - res_ok.length : 0) + / rnd_len); + switch(tmpres.code) { + case ARFILL_OK: + ASN_SET_ADD(list, ptr); + res_ok.length += tmpres.length; + break; + case ARFILL_SKIPPED: + break; + case ARFILL_FAILED: + assert(ptr == 0); + return tmpres; + } + } + + return res_ok; +} + diff --git a/Bouncer/e2sm_kpm/lib/constr_SET_OF_oer.c b/Bouncer/e2sm_kpm/lib/constr_SET_OF_oer.c new file mode 100644 index 0000000..5200518 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_SET_OF_oer.c @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include +#include + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#undef SET_PHASE +#define SET_PHASE(ctx, value) \ + do { \ + ctx->phase = value; \ + ctx->step = 0; \ + } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +/* + * The SEQUENCE OF and SET OF values utilize a "quantity field". + * It is is a pointless combination of #8.6 (length determinant, capable + * of encoding tiny and huge numbers in the shortest possible number of octets) + * and the variable sized integer. What could have been encoded by #8.6 alone + * is required to be encoded by #8.6 followed by that number of unsigned octets. + * This doesn't make too much sense. It seems that the original version of OER + * standard have been using the unconstrained unsigned integer as a quantity + * field, and this legacy have gone through ISO/ITU-T standardization process. + */ +static ssize_t +oer_fetch_quantity(const void *ptr, size_t size, size_t *qty_r) { + const uint8_t *b; + const uint8_t *bend; + size_t len = 0; + size_t qty; + + ssize_t len_len = oer_fetch_length(ptr, size, &len); + if(len_len <= 0) { + *qty_r = 0; + return len_len; + } + + if((len_len + len) > size) { + *qty_r = 0; + return 0; + } + + b = (const uint8_t *)ptr + len_len; + bend = b + len; + + /* Skip the leading 0-bytes */ + for(; b < bend && *b == 0; b++) { + } + + if((bend - b) > (ssize_t)sizeof(size_t)) { + /* Length is not representable by the native size_t type */ + *qty_r = 0; + return -1; + } + + for(qty = 0; b < bend; b++) { + qty = (qty << 8) + *b; + } + + if(qty > RSIZE_MAX) { /* A bit of C11 validation */ + *qty_r = 0; + return -1; + } + + *qty_r = qty; + assert((size_t)len_len + len == (size_t)(bend - (const uint8_t *)ptr)); + return len_len + len; +} + +asn_dec_rval_t +SET_OF_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + void *st = *struct_ptr; /* Target structure */ + asn_struct_ctx_t *ctx; /* Decoder context */ + size_t consumed_myself = 0; /* Consumed bytes from ptr. */ + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously. + */ + switch(ctx->phase) { + case 0: { + /* + * Fetch number of elements to decode. + */ + size_t length = 0; + size_t len_size = oer_fetch_quantity(ptr, size, &length); + switch(len_size) { + case 0: + RETURN(RC_WMORE); + case -1: + RETURN(RC_FAIL); + default: + ADVANCE(len_size); + ctx->left = length; + } + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 1: { + /* Decode components of the extension root */ + asn_TYPE_member_t *elm = td->elements; + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + const void *base_ptr = ptr; + ber_tlv_len_t base_ctx_left = ctx->left; + + assert(td->elements_count == 1); + + ASN_DEBUG("OER SET OF %s Decoding PHASE 1", td->name); + + for(; ctx->left > 0; ctx->left--) { + asn_dec_rval_t rv = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, &ctx->ptr, ptr, + size); + ADVANCE(rv.consumed); + switch(rv.code) { + case RC_OK: + if(ASN_SET_ADD(list, ctx->ptr) != 0) { + RETURN(RC_FAIL); + } else { + ctx->ptr = 0; + /* + * This check is to avoid compression bomb with + * specs like SEQUENCE/SET OF NULL which don't + * consume data at all. + */ + if(rv.consumed == 0 && base_ptr == ptr + && (base_ctx_left - ctx->left) > 200) { + ASN__DECODE_FAILED; + } + break; + } + case RC_WMORE: + RETURN(RC_WMORE); + case RC_FAIL: + ASN_STRUCT_FREE(*elm->type, ctx->ptr); + ctx->ptr = 0; + SET_PHASE(ctx, 3); + RETURN(RC_FAIL); + } + } + /* Decoded decently. */ + NEXT_PHASE(ctx); + } + /* Fall through */ + case 2: + /* Ignore fully decoded */ + assert(ctx->left == 0); + RETURN(RC_OK); + case 3: + /* Failed to decode. */ + RETURN(RC_FAIL); + } + + return rval; +} + +static ssize_t +oer_put_quantity(size_t qty, asn_app_consume_bytes_f *cb, void *app_key) { + uint8_t buf[1 + sizeof(size_t)]; + uint8_t *b = &buf[sizeof(size_t)]; /* Last addressable */ + size_t encoded; + + do { + *b-- = qty; + qty >>= 8; + } while(qty); + + *b = sizeof(buf) - (b-buf) - 1; + encoded = sizeof(buf) - (b-buf); + if(cb(b, encoded, app_key) < 0) + return -1; + return encoded; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +SET_OF_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_TYPE_member_t *elm; + const asn_anonymous_set_ *list; + size_t computed_size = 0; + ssize_t qty_len; + int n; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + elm = td->elements; + list = _A_CSET_FROM_VOID(sptr); + + qty_len = oer_put_quantity(list->count, cb, app_key); + if(qty_len < 0) { + ASN__ENCODE_FAILED; + } + computed_size += qty_len; + + for(n = 0; n < list->count; n++) { + void *memb_ptr = list->array[n]; + asn_enc_rval_t er = {0,0,0}; + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded < 0) { + return er; + } else { + computed_size += er.encoded; + } + } + + { + asn_enc_rval_t erval = {0,0,0}; + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_kpm/lib/constr_TYPE.c b/Bouncer/e2sm_kpm/lib/constr_TYPE.c new file mode 100644 index 0000000..aefaefd --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constr_TYPE.c @@ -0,0 +1,80 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Version of the ASN.1 infrastructure shipped with compiler. + */ +int get_asn1c_environment_version() { return ASN1C_ENVIRONMENT_VERSION; } + +static asn_app_consume_bytes_f _print2fp; + +/* + * Return the outmost tag of the type. + */ +ber_tlv_tag_t +asn_TYPE_outmost_tag(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag) { + + if(tag_mode) + return tag; + + if(type_descriptor->tags_count) + return type_descriptor->tags[0]; + + return type_descriptor->op->outmost_tag(type_descriptor, struct_ptr, 0, 0); +} + +/* + * Print the target language's structure in human readable form. + */ +int +asn_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, + const void *struct_ptr) { + if(!stream) stream = stdout; + if(!td || !struct_ptr) { + errno = EINVAL; + return -1; + } + + /* Invoke type-specific printer */ + if(td->op->print_struct(td, struct_ptr, 1, _print2fp, stream)) { + return -1; + } + + /* Terminate the output */ + if(_print2fp("\n", 1, stream)) { + return -1; + } + + return fflush(stream); +} + +/* Dump the data into the specified stdio stream */ +static int +_print2fp(const void *buffer, size_t size, void *app_key) { + FILE *stream = (FILE *)app_key; + + if(fwrite(buffer, 1, size, stream) != size) + return -1; + + return 0; +} + + +/* + * Some compilers do not support variable args macros. + * This function is a replacement of ASN_DEBUG() macro. + */ +void ASN_DEBUG_f(const char *fmt, ...); +void ASN_DEBUG_f(const char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} diff --git a/Bouncer/e2sm_kpm/lib/constraints.c b/Bouncer/e2sm_kpm/lib/constraints.c new file mode 100644 index 0000000..df3c6c1 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/constraints.c @@ -0,0 +1,93 @@ +#include +#include + +int +asn_generic_no_constraint(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, + asn_app_constraint_failed_f *cb, void *key) { + (void)type_descriptor; /* Unused argument */ + (void)struct_ptr; /* Unused argument */ + (void)cb; /* Unused argument */ + (void)key; /* Unused argument */ + + /* Nothing to check */ + return 0; +} + +int +asn_generic_unknown_constraint(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, + asn_app_constraint_failed_f *cb, void *key) { + (void)type_descriptor; /* Unused argument */ + (void)struct_ptr; /* Unused argument */ + (void)cb; /* Unused argument */ + (void)key; /* Unused argument */ + + /* Unknown how to check */ + return 0; +} + +struct errbufDesc { + const asn_TYPE_descriptor_t *failed_type; + const void *failed_struct_ptr; + char *errbuf; + size_t errlen; +}; + +static void +_asn_i_ctfailcb(void *key, const asn_TYPE_descriptor_t *td, const void *sptr, + const char *fmt, ...) { + struct errbufDesc *arg = key; + va_list ap; + ssize_t vlen; + ssize_t maxlen; + + arg->failed_type = td; + arg->failed_struct_ptr = sptr; + + maxlen = arg->errlen; + if(maxlen <= 0) + return; + + va_start(ap, fmt); + vlen = vsnprintf(arg->errbuf, maxlen, fmt, ap); + va_end(ap); + if(vlen >= maxlen) { + arg->errbuf[maxlen-1] = '\0'; /* Ensuring libc correctness */ + arg->errlen = maxlen - 1; /* Not counting termination */ + return; + } else if(vlen >= 0) { + arg->errbuf[vlen] = '\0'; /* Ensuring libc correctness */ + arg->errlen = vlen; /* Not counting termination */ + } else { + /* + * The libc on this system is broken. + */ + vlen = sizeof("") - 1; + maxlen--; + arg->errlen = vlen < maxlen ? vlen : maxlen; + memcpy(arg->errbuf, "", arg->errlen); + arg->errbuf[arg->errlen] = 0; + } + + return; +} + +int +asn_check_constraints(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, char *errbuf, size_t *errlen) { + struct errbufDesc arg; + int ret; + + arg.failed_type = 0; + arg.failed_struct_ptr = 0; + arg.errbuf = errbuf; + arg.errlen = errlen ? *errlen : 0; + + ret = type_descriptor->encoding_constraints.general_constraints( + type_descriptor, struct_ptr, _asn_i_ctfailcb, &arg); + if(ret == -1 && errlen) *errlen = arg.errlen; + + return ret; +} + diff --git a/Bouncer/e2sm_kpm/lib/cscope.out b/Bouncer/e2sm_kpm/lib/cscope.out new file mode 100644 index 0000000..9b3ad35 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/cscope.out @@ -0,0 +1,116022 @@ +cscope 15 $HOME/Desktop/kpimon/e2sm/lib 0000709974 + @AMF-UE-NGAP-ID.c + +8  + ~"AMF-UE-NGAP-ID.h +" + +11 + $AMF_UE_NGAP_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +14  +v®ue +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)) { + +24 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +26 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +30 if(( +v®ue + >= 0 && value <= 1099511627775)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_AMF_UE_NGAP_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_CONSTRAINED +, 40, -1, 0, 1099511627775 } , + +47 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_AMF_UE_NGAP_ID_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_AMF_UE_NGAP_ID + = { + +56 & +a¢_OP_INTEGER +, + +57 +a¢_DEF_AMF_UE_NGAP_ID_gs_1 +, + +58 ( +a¢_DEF_AMF_UE_NGAP_ID_gs_1 +) + +59 /( +a¢_DEF_AMF_UE_NGAP_ID_gs_1 +[0]), + +60 +a¢_DEF_AMF_UE_NGAP_ID_gs_1 +, + +61 ( +a¢_DEF_AMF_UE_NGAP_ID_gs_1 +) + +62 /( +a¢_DEF_AMF_UE_NGAP_ID_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_AMF_UE_NGAP_ID_cÚ¡r_1 +, +AMF_UE_NGAP_ID_cÚ¡¿št + }, + + @AMFPointer.c + +8  + ~"AMFPoš‹r.h +" + +11 + $AMFPoš‹r_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + == 6)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_AMFPoš‹r_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +47 { +APC_CONSTRAINED +, 0, 0, 6, 6 } , + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_AMFPoš‹r_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (3 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_AMFPoš‹r + = { + +56 & +a¢_OP_BIT_STRING +, + +57 +a¢_DEF_AMFPoš‹r_gs_1 +, + +58 ( +a¢_DEF_AMFPoš‹r_gs_1 +) + +59 /( +a¢_DEF_AMFPoš‹r_gs_1 +[0]), + +60 +a¢_DEF_AMFPoš‹r_gs_1 +, + +61 ( +a¢_DEF_AMFPoš‹r_gs_1 +) + +62 /( +a¢_DEF_AMFPoš‹r_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_AMFPoš‹r_cÚ¡r_1 +, +AMFPoš‹r_cÚ¡¿št + }, + +65 & +a¢_SPC_BIT_STRING_¥ecs + + + @AMFRegionID.c + +8  + ~"AMFRegiÚID.h +" + +11 + $AMFRegiÚID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + == 8)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_AMFRegiÚID_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +47 { +APC_CONSTRAINED +, 0, 0, 8, 8 } , + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_AMFRegiÚID_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (3 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_AMFRegiÚID + = { + +56 & +a¢_OP_BIT_STRING +, + +57 +a¢_DEF_AMFRegiÚID_gs_1 +, + +58 ( +a¢_DEF_AMFRegiÚID_gs_1 +) + +59 /( +a¢_DEF_AMFRegiÚID_gs_1 +[0]), + +60 +a¢_DEF_AMFRegiÚID_gs_1 +, + +61 ( +a¢_DEF_AMFRegiÚID_gs_1 +) + +62 /( +a¢_DEF_AMFRegiÚID_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_AMFRegiÚID_cÚ¡r_1 +, +AMFRegiÚID_cÚ¡¿št + }, + +65 & +a¢_SPC_BIT_STRING_¥ecs + + + @AMFSetID.c + +8  + ~"AMFS‘ID.h +" + +11 + $AMFS‘ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + == 10)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_AMFS‘ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +47 { +APC_CONSTRAINED +, 0, 0, 10, 10 } , + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_AMFS‘ID_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (3 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_AMFS‘ID + = { + +56 & +a¢_OP_BIT_STRING +, + +57 +a¢_DEF_AMFS‘ID_gs_1 +, + +58 ( +a¢_DEF_AMFS‘ID_gs_1 +) + +59 /( +a¢_DEF_AMFS‘ID_gs_1 +[0]), + +60 +a¢_DEF_AMFS‘ID_gs_1 +, + +61 ( +a¢_DEF_AMFS‘ID_gs_1 +) + +62 /( +a¢_DEF_AMFS‘ID_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_AMFS‘ID_cÚ¡r_1 +, +AMFS‘ID_cÚ¡¿št + }, + +65 & +a¢_SPC_BIT_STRING_¥ecs + + + @BIT_STRING.c + +5  + ~ + +6  + ~ + +7  + ~ + +12 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_BIT_STRING_gs +[] = { + +13 ( +ASN_TAG_CLASS_UNIVERSAL + | (3 << 2)) + +15 +a¢_OCTET_STRING_¥ecifics_t + + ga¢_SPC_BIT_STRING_¥ecs + = { + +16 ( +BIT_STRING_t +), + +17 +off£tof +( +BIT_STRING_t +, +_a¢_ùx +), + +18 +ASN_OSUBV_BIT + + +20 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_BIT_STRING + = { + +21 +OCTET_STRING_ä“ +, + +22 +BIT_STRING_´št +, + +23 +BIT_STRING_com·» +, + +24 +OCTET_STRING_decode_b” +, + +25 +OCTET_STRING_’code_d” +, + +26 +OCTET_STRING_decode_x”_bš¬y +, + +27 +BIT_STRING_’code_x” +, + +28 #ifdef +ASN_DISABLE_OER_SUPPORT + + +32 +BIT_STRING_decode_Ûr +, + +33 +BIT_STRING_’code_Ûr +, + +35 #ifdef +ASN_DISABLE_PER_SUPPORT + + +41 +BIT_STRING_decode_u³r +, + +42 +BIT_STRING_’code_u³r +, + +43 +OCTET_STRING_decode_­” +, + +44 +OCTET_STRING_’code_­” +, + +46 +BIT_STRING_¿ndom_fžl +, + +49 +a¢_TYPE_desütÜ_t + + ga¢_DEF_BIT_STRING + = { + +52 & +a¢_OP_BIT_STRING +, + +53 +a¢_DEF_BIT_STRING_gs +, + +54 ( +a¢_DEF_BIT_STRING_gs +) + +55 / ( +a¢_DEF_BIT_STRING_gs +[0]), + +56 +a¢_DEF_BIT_STRING_gs +, + +57 ( +a¢_DEF_BIT_STRING_gs +) + +58 / ( +a¢_DEF_BIT_STRING_gs +[0]), + +59 { 0, 0, +BIT_STRING_cÚ¡¿št + }, + +61 & +a¢_SPC_BIT_STRING_¥ecs + + +68 + $BIT_STRING_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +69 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +70 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +72 if( +¡ + && st-> +buf +) { + +73 if(( +¡ +-> +size + =ð0 && st-> +b™s_unu£d +) + +74 || +¡ +-> +b™s_unu£d + < 0 || st->bits_unused > 7) { + +75 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +77 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +81 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +83 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +88 + } +} + +90 cÚ¡ * + g_b™_·‰”n +[16] = { + +95 +a¢_’c_rv®_t + + +96 + $BIT_STRING_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +97  +žev– +, +x”_’cod”_æags_e + +æags +, + +98 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +99 +a¢_’c_rv®_t + +” + = {0, 0, 0}; + +100  +sü©ch +[128]; + +101 * +p + = +sü©ch +; + +102 * +sûnd + = +sü©ch + + ((scratch) - 10); + +103 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +104  +xÿn + = ( +æags + & +XER_F_CANONICAL +); + +105 +ušt8_t + * +buf +; + +106 +ušt8_t + * +’d +; + +108 if(! +¡ + || !¡-> +buf +) + +109 +ASN__ENCODE_FAILED +; + +111 +” +. +’coded + = 0; + +113 +buf + = +¡ +->buf; + +114 +’d + = +buf + + +¡ +-> +size + - 1; + +119 ; +buf + < +’d +; buf++) { + +120  +v + = * +buf +; + +121  +ƚe + = +xÿn +?0:((( +buf + - +¡ +->buf) % 8) == 0); + +122 if( +p + >ð +sûnd + || +ƚe +) { + +123 + `ASN__CALLBACK +( +sü©ch +, +p + - scratch); + +124 +p + = +sü©ch +; + +125 if( +ƚe +è + `ASN__TEXT_INDENT +(1, +žev– +); + +127 + `memýy +( +p + + 0, +_b™_·‰”n +[ +v + >> 4], 4); + +128 + `memýy +( +p + + 4, +_b™_·‰”n +[ +v + & 0x0f], 4); + +129 +p + += 8; + +132 if(! +xÿn + && (( +buf + - +¡ +->buf) % 8) == 0) + +133 + `ASN__TEXT_INDENT +(1, +žev– +); + +134 + `ASN__CALLBACK +( +sü©ch +, +p + - scratch); + +135 +p + = +sü©ch +; + +137 if( +buf + =ð +’d +) { + +138  +v + = * +buf +; + +139  +ub™s + = +¡ +-> +b™s_unu£d +; + +140  +i +; + +141  +i + = 7; i >ð +ub™s +; i--) + +142 * +p +++ = ( +v + & (1 << +i +)) ? 0x31 : 0x30; + +143 + `ASN__CALLBACK +( +sü©ch +, +p + - scratch); + +146 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– + - 1); + +148 + `ASN__ENCODED_OK +( +” +); + +149 +cb_çžed +: + +150 +ASN__ENCODE_FAILED +; + +151 + } +} + +158 + $BIT_STRING_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +159 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +160 cÚ¡ * cÚ¡ +h2c + = "0123456789ABCDEF"; + +161  +sü©ch +[64]; + +162 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +163 +ušt8_t + * +buf +; + +164 +ušt8_t + * +’d +; + +165 * +p + = +sü©ch +; + +167 () +td +; + +169 if(! +¡ + || !¡-> +buf +) + +170  ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +172 +žev– +++; + +173 +buf + = +¡ +->buf; + +174 +’d + = +buf + + +¡ +-> +size +; + +179 ; +buf + < +’d +; buf++) { + +180 if(( +buf + - +¡ +->bufè% 16 =ð0 && (¡-> +size + > 16) + +181 && +buf + !ð +¡ +->buf) { + +182 + `_i_INDENT +(1); + +184 if( + `cb +( +sü©ch +, +p + - sü©ch, +­p_key +) < 0)  -1; + +185 +p + = +sü©ch +; + +187 * +p +++ = +h2c +[* +buf + >> 4]; + +188 * +p +++ = +h2c +[* +buf + & 0x0F]; + +189 * +p +++ = 0x20; + +192 if( +p + > +sü©ch +) { + +193 +p +--; + +195 if(( +¡ +-> +size + > 16)) { + +196 + `_i_INDENT +(1); + +200 if( + `cb +( +sü©ch +, +p + - sü©ch, +­p_key +) < 0) + +204 if( +¡ +-> +b™s_unu£d +) { + +205  +»t + = + `¢´štf +( +sü©ch +, (scratch), " (%d bit%s unused)", + +206 +¡ +-> +b™s_unu£d +, st->bits_unused == 1 ? "" : "s"); + +207 + `as£¹ +( +»t + > 0 &&„‘ < ( +ssize_t +)( +sü©ch +)); + +208 if( +»t + > 0 &&„‘ < ( +ssize_t +)( +sü©ch +) + +209 && + `cb +( +sü©ch +, +»t +, +­p_key +) < 0) + +214 + } +} + +219 cÚ¡ +BIT_STRING_t + * + +220 + $BIT_STRING__com·ùify +(cÚ¡ +BIT_STRING_t + * +¡ +, BIT_STRING_ˆ* +tmp +) { + +221 cÚ¡ +ušt8_t + * +b +; + +223 cÚ¡ +ušt8_t + * +c_buf +; + +224 +ušt8_t + * +nc_buf +; + +225 } +uncÚ¡ +; + +227 if( +¡ +-> +size + == 0) { + +228 + `as£¹ +( +¡ +-> +b™s_unu£d + == 0); + +229  +¡ +; + +231  +b + = & +¡ +-> +buf +[¡-> +size + - 1]; b > st->buf && *b == 0; b--) { + +235 if(* +b +) { + +236  +unu£d + = 7; + +237 +ušt8_t + +v + = * +b +; + +238 +v + &ð-( +št8_t +)v; + +239 if( +v + & 0x0Fè +unu£d + -= 4; + +240 if( +v + & 0x33è +unu£d + -= 2; + +241 if( +v + & 0x55è +unu£d + -= 1; + +242 +tmp +-> +size + = +b +- +¡ +-> +buf + + 1; + +243 +tmp +-> +b™s_unu£d + = +unu£d +; + +245 +tmp +-> +size + = +b +- +¡ +-> +buf +; + +246 +tmp +-> +b™s_unu£d + = 0; + +249 + `as£¹ +( +b + >ð +¡ +-> +buf +); + +252 +uncÚ¡ +. +c_buf + = +¡ +-> +buf +; + +253 +tmp +-> +buf + = +uncÚ¡ +. +nc_buf +; + +254  +tmp +; + +255 + } +} + +262 + $BIT_STRING_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +263 cÚ¡ * +b±r +) { + +269 +BIT_STRING_t + +com·ù_a +, +com·ù_b +; + +270 cÚ¡ +BIT_STRING_t + * +a + = + `BIT_STRING__com·ùify +( +­Œ +, & +com·ù_a +); + +271 cÚ¡ +BIT_STRING_t + * +b + = + `BIT_STRING__com·ùify +( +b±r +, & +com·ù_b +); + +272 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics +; + +274 + `as£¹ +( +¥ecs + && s³cs-> +subv¬ŸÁ + =ð +ASN_OSUBV_BIT +); + +276 if( +a + && +b +) { + +277 +size_t + +commÚ_´efix_size + = +a +-> +size + <ð +b +->size ?‡->size : b->size; + +278  +»t + = + `memcmp +( +a +-> +buf +, +b +->buf, +commÚ_´efix_size +); + +279 if( +»t + == 0) { + +281 if( +a +-> +size + < +b +->size) { + +283 } if( +a +-> +size + > +b +->size) { + +287 if( +a +-> +b™s_unu£d + > +b +->bits_unused) { + +289 } if( +a +-> +b™s_unu£d + < +b +->bits_unused) { + +296  +»t +; + +298 } if(! +a + && ! +b +) { + +300 } if(! +a +) { + +305 + } +} + +307 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +309 #undeà +RETURN + + +310  + #RETURN +( +_code +) \ + +312 +a¢_dec_rv®_t + +tm´v® +; \ + +313 +tm´v® +. +code + = +_code +; \ + +314 +tm´v® +. +cÚsumed + = +cÚsumed_my£lf +; \ + +315  +tm´v® +; \ + +316 } 0) + + ) + +318  +a¢_³r_cÚ¡¿št_t + + ga¢_DEF_BIT_STRING_cÚ¡¿št_size + = { + +319 +APC_SEMI_CONSTRAINED +, -1, -1, 0, 0}; + +321 +a¢_dec_rv®_t + + +322 + $BIT_STRING_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +323 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +324 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +325 +a¢_³r_d©a_t + * +pd +) { + +326 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +327 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +328 : & +a¢_SPC_BIT_STRING_¥ecs +; + +329 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc + = + +330 +cÚ¡¿šts + ? cÚ¡¿št : +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +331 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +csiz +; + +332 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0 }; + +333 +BIT_STRING_t + * +¡ + = (BIT_STRING_ˆ*)* +¥Œ +; + +334 +ssize_t + +cÚsumed_my£lf + = 0; + +335  +»³© +; + +337 () +Ýt_codec_ùx +; + +339 if( +pc +) { + +340 +csiz + = & +pc +-> +size +; + +342 +csiz + = & +a¢_DEF_BIT_STRING_cÚ¡¿št_size +; + +345 if( +¥ecs +-> +subv¬ŸÁ + !ð +ASN_OSUBV_BIT +) { + +346 + `ASN_DEBUG +("Subv¬ŸÁ %d i nÙ BIT OSUBV_BIT", +¥ecs +-> +subv¬ŸÁ +); + +347 + `RETURN +( +RC_FAIL +); + +353 if(! +¡ +) { + +354 +¡ + = ( +BIT_STRING_t + *)(* +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +)); + +355 if(! +¡ +è + `RETURN +( +RC_FAIL +); + +358 + `ASN_DEBUG +("PER Decoding %s size %ld .. %ld bits %d", + +359 +csiz +-> +æags + & +APC_EXTENSIBLE + ? "extensible" : "non-extensible", + +360 +csiz +-> +low”_bound +, csiz-> +uµ”_bound +, csiz-> +efãùive_b™s +); + +362 if( +csiz +-> +æags + & +APC_EXTENSIBLE +) { + +363  +šext + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +364 if( +šext + < 0è + `RETURN +( +RC_WMORE +); + +365 if( +šext +) { + +366 +csiz + = & +a¢_DEF_BIT_STRING_cÚ¡¿št_size +; + +370 if( +csiz +-> +efãùive_b™s + >= 0) { + +371 + `FREEMEM +( +¡ +-> +buf +); + +372 +¡ +-> +size + = ( +csiz +-> +uµ”_bound + + 7) >> 3; + +373 +¡ +-> +buf + = ( +ušt8_t + *) + `MALLOC +(¡-> +size + + 1); + +374 if(! +¡ +-> +buf +è{ st-> +size + = 0; + `RETURN +( +RC_FAIL +); } + +380 if( +csiz +-> +efãùive_b™s + == 0) { + +381  +»t +; + +382 + `ASN_DEBUG +("Encodšg BIT STRING siz%ld", +csiz +-> +uµ”_bound +); + +383 +»t + = + `³r_g‘_mªy_b™s +( +pd +, +¡ +-> +buf +, 0, +csiz +-> +uµ”_bound +); + +384 if( +»t + < 0è + `RETURN +( +RC_WMORE +); + +385 +cÚsumed_my£lf + +ð +csiz +-> +uµ”_bound +; + +386 +¡ +-> +buf +[¡-> +size +] = 0; + +387 +¡ +-> +b™s_unu£d + = (8 - ( +csiz +-> +uµ”_bound + & 0x7)) & 0x7; + +388 + `RETURN +( +RC_OK +); + +391 +¡ +-> +size + = 0; + +393 +ssize_t + +¿w_Ën +; + +394 +ssize_t + +Ën_by‹s +; + +395 +ssize_t + +Ën_b™s +; + +396 * +p +; + +397  +»t +; + +400 +¿w_Ën + = + `u³r_g‘_Ëngth +( +pd +, +csiz +-> +efãùive_b™s +, csiz-> +low”_bound +, + +401 & +»³© +); + +402 if( +¿w_Ën + < 0è + `RETURN +( +RC_WMORE +); + +403 if( +¿w_Ën + =ð0 && +¡ +-> +buf +) ; + +405 + `ASN_DEBUG +("Got PER†engthƒb %ld,†en %ld, %s (%s)", + +406 () +csiz +-> +efãùive_b™s +, () +¿w_Ën +, + +407 +»³© + ? "»³©" : "Úû", +td +-> +Çme +); + +408 +Ën_b™s + = +¿w_Ën +; + +409 +Ën_by‹s + = ( +Ën_b™s + + 7) >> 3; + +410 if( +Ën_b™s + & 0x7è +¡ +-> +b™s_unu£d + = 8 - (len_bits & 0x7); + +412 +p + = + `REALLOC +( +¡ +-> +buf +, st-> +size + + +Ën_by‹s + + 1); + +413 if(! +p +è + `RETURN +( +RC_FAIL +); + +414 +¡ +-> +buf + = ( +ušt8_t + *) +p +; + +416 +»t + = + `³r_g‘_mªy_b™s +( +pd +, & +¡ +-> +buf +[¡-> +size +], 0, +Ën_b™s +); + +417 if( +»t + < 0è + `RETURN +( +RC_WMORE +); + +418 +¡ +-> +size + +ð +Ën_by‹s +; + +419 }  +»³© +); + +420 +¡ +-> +buf +[¡-> +size +] = 0; + +422  +rv® +; + +423 + } +} + +425 +a¢_’c_rv®_t + + +426 + $BIT_STRING_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +427 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +428 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +429 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = + +430 +td +-> +¥ecifics + ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *)td->specifics + +431 : & +a¢_SPC_BIT_STRING_¥ecs +; + +432 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc + = + +433 +cÚ¡¿šts + ? cÚ¡¿št : +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +434 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +csiz +; + +435 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +436 +BIT_STRING_t + +com·ù_b¡r +; + +437 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +438  +šext + = 0; + +439 +size_t + +size_š_b™s +; + +440 cÚ¡ +ušt8_t + * +buf +; + +441  +»t +; + +442  +ù_ex‹nsibË +; + +444 if(! +¡ + || (!¡-> +buf + && st-> +size +)) + +445 +ASN__ENCODE_FAILED +; + +447 if( +¥ecs +-> +subv¬ŸÁ + =ð +ASN_OSUBV_BIT +) { + +448 if(( +¡ +-> +size + =ð0 && st-> +b™s_unu£d +) || (st->bits_unused & ~7)) + +449 +ASN__ENCODE_FAILED +; + +451 +ASN__ENCODE_FAILED +; + +454 if( +pc +) { + +455 +csiz + = & +pc +-> +size +; + +457 +csiz + = & +a¢_DEF_BIT_STRING_cÚ¡¿št_size +; + +459 +ù_ex‹nsibË + = +csiz +-> +æags + & +APC_EXTENSIBLE +; + +462 +¡ + = + `BIT_STRING__com·ùify +(¡, & +com·ù_b¡r +); + +463 +size_š_b™s + = 8 * +¡ +-> +size + - st-> +b™s_unu£d +; + +465 + `ASN_DEBUG +( + +466 "Encodšg % štØ%" +ASN_PRI_SIZE + " bits" + +468 +td +-> +Çme +, +size_š_b™s +, +csiz +-> +low”_bound +, csiz-> +uµ”_bound +, + +469 +csiz +-> +efãùive_b™s +, +ù_ex‹nsibË + ? " EXT" : ""); + +473 if( +csiz +-> +efãùive_b™s + >= 0) { + +474 if(( +ssize_t +) +size_š_b™s + > +csiz +-> +uµ”_bound +) { + +475 if( +ù_ex‹nsibË +) { + +476 +csiz + = & +a¢_DEF_BIT_STRING_cÚ¡¿št_size +; + +477 +šext + = 1; + +479 +ASN__ENCODE_FAILED +; + +483 +šext + = 0; + +486 if( +ù_ex‹nsibË +) { + +488 if( + `³r_put_ãw_b™s +( +po +, +šext +, 1)) + +489 +ASN__ENCODE_FAILED +; + +492 if( +csiz +-> +efãùive_b™s + >ð0 && ! +šext +) { + +493  +add_Œaž” + = ( +ssize_t +) +size_š_b™s + < +csiz +-> +low”_bound +; + +494 + `ASN_DEBUG +( + +495 "Encodšg %" +ASN_PRI_SIZE + " bytes (%ld),†ength (in %d bits)railer %d;‡ctual " + +496 "v®u%" +ASN_PRI_SSIZE + "", + +497 +¡ +-> +size +, +size_š_b™s + - +csiz +-> +low”_bound +, csiz-> +efãùive_b™s +, + +498 +add_Œaž” +, + +499 +add_Œaž” + ? 0 : ( +ssize_t +) +size_š_b™s + - +csiz +-> +low”_bound +); + +500 +»t + = + `³r_put_ãw_b™s +( + +501 +po +, +add_Œaž” + ? 0 : ( +ssize_t +) +size_š_b™s + - +csiz +-> +low”_bound +, + +502 +csiz +-> +efãùive_b™s +); + +503 if( +»t +è +ASN__ENCODE_FAILED +; + +504 +»t + = + `³r_put_mªy_b™s +( +po +, +¡ +-> +buf +, +size_š_b™s +); + +505 if( +»t +è +ASN__ENCODE_FAILED +; + +506 if( +add_Œaž” +) { + +507 cÚ¡ +ušt8_t + +z”os +[16]; + +508 +size_t + +Œažšg_z”o_b™s + = +csiz +-> +low”_bound + - +size_š_b™s +; + +509  +Œažšg_z”o_b™s + > 0) { + +510 if( +Œažšg_z”o_b™s + > 8 * ( +z”os +)) { + +511 +»t + = + `³r_put_mªy_b™s +( +po +, +z”os +, 8 * (zeros)); + +512 +Œažšg_z”o_b™s + -ð8 * ( +z”os +); + +514 +»t + = + `³r_put_mªy_b™s +( +po +, +z”os +, +Œažšg_z”o_b™s +); + +515 +Œažšg_z”o_b™s + = 0; + +517 if( +»t +è +ASN__ENCODE_FAILED +; + +520 + `ASN__ENCODED_OK +( +” +); + +523 + `ASN_DEBUG +("Encodšg %" +ASN_PRI_SIZE + " by‹s", +¡ +-> +size +); + +525 +buf + = +¡ +->buf; + +527  +Ãed_eom + = 0; + +528 +ssize_t + +maySave + = + `u³r_put_Ëngth +( +po +, +size_š_b™s +, & +Ãed_eom +); + +529 if( +maySave + < 0è +ASN__ENCODE_FAILED +; + +531 + `ASN_DEBUG +("Encodšg %" +ASN_PRI_SSIZE + " oà%" +ASN_PRI_SIZE + "", +maySave +, +size_š_b™s +); + +533 +»t + = + `³r_put_mªy_b™s +( +po +, +buf +, +maySave +); + +534 if( +»t +è +ASN__ENCODE_FAILED +; + +536 +buf + +ð +maySave + >> 3; + +537 +size_š_b™s + -ð +maySave +; + +538 + `as£¹ +(!( +maySave + & 0x07è|| ! +size_š_b™s +); + +539 if( +Ãed_eom + && + `u³r_put_Ëngth +( +po +, 0, 0)) + +540 +ASN__ENCODE_FAILED +; + +541 }  +size_š_b™s +); + +543 + `ASN__ENCODED_OK +( +” +); + +544 + } +} + +548 +a¢_¿ndom_fžl_»suÉ_t + + +549 + $BIT_STRING_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +550 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +551 +size_t + +max_Ëngth +) { + +552 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = + +553 +td +-> +¥ecifics + ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *)td->specifics + +554 : & +a¢_SPC_BIT_STRING_¥ecs +; + +555 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 1}; + +556 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +557 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +558  +Ëngths +[] = {0, 1, 2, 3, 4, 8, + +561 +ušt8_t + * +buf +; + +562 +ušt8_t + * +b’d +; + +563 +ušt8_t + * +b +; + +564 +size_t + +ºd_b™s +, +ºd_Ën +; + +565 +BIT_STRING_t + * +¡ +; + +567 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +569  +¥ecs +-> +subv¬ŸÁ +) { + +570  +ASN_OSUBV_ANY +: + +571  +»suÉ_çžed +; + +572  +ASN_OSUBV_BIT +: + +579 +ºd_b™s + = +Ëngths +[ + `a¢_¿ndom_b‘w“n +( + +580 0, ( +Ëngths +) / (lengths[0]) - 1)]; + +581 if(! +cÚ¡¿šts + || !cÚ¡¿šts-> +³r_cÚ¡¿šts +) + +582 +cÚ¡¿šts + = & +td +-> +’codšg_cÚ¡¿šts +; + +583 if( +cÚ¡¿šts +-> +³r_cÚ¡¿šts +) { + +584 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +pc + = & +cÚ¡¿šts +-> +³r_cÚ¡¿šts +-> +size +; + +585 if( +pc +-> +æags + & +APC_CONSTRAINED +) { + +586  +sugge¡ed_uµ”_bound + = +pc +-> +uµ”_bound + < ( +ssize_t +) +max_Ëngth + + +587 ? +pc +-> +uµ”_bound + + +588 : ( +ssize_t +) +max_Ëngth +; + +589 if( +max_Ëngth + < ( +size_t +) +pc +-> +low”_bound +) { + +590  +»suÉ_sk³d +; + +592 if( +pc +-> +æags + & +APC_EXTENSIBLE +) { + +593  + `a¢_¿ndom_b‘w“n +(0, 5)) { + +595 if( +pc +-> +low”_bound + > 0) { + +596 +ºd_b™s + = +pc +-> +low”_bound + - 1; + +601 +ºd_b™s + = +pc +-> +uµ”_bound + + 1; + +605 if( +ºd_b™s + < +max_Ëngth +) { + +610 +ºd_b™s + = + `a¢_¿ndom_b‘w“n +( +pc +-> +low”_bound +, + +611 +sugge¡ed_uµ”_bound +); + +614 +ºd_b™s + = + +615 + `a¢_¿ndom_b‘w“n +( +pc +-> +low”_bound +, +sugge¡ed_uµ”_bound +); + +618 +ºd_b™s + = + `a¢_¿ndom_b‘w“n +(0, +max_Ëngth + - 1); + +620 } if( +ºd_b™s + >ð +max_Ëngth +) { + +621 +ºd_b™s + = + `a¢_¿ndom_b‘w“n +(0, +max_Ëngth + - 1); + +624 +ºd_Ën + = ( +ºd_b™s + + 7) / 8; + +625 +buf + = + `CALLOC +(1, +ºd_Ën + + 1); + +626 if(! +buf +è +»suÉ_çžed +; + +628 +b’d + = & +buf +[ +ºd_Ën +]; + +630  +b + = +buf +; b < +b’d +; b++) { + +631 *( +ušt8_t + *) +b + = + `a¢_¿ndom_b‘w“n +(0, 255); + +633 * +b + = 0; + +635 if(* +¥Œ +) { + +636 +¡ + = * +¥Œ +; + +637 + `FREEMEM +( +¡ +-> +buf +); + +639 +¡ + = ( +BIT_STRING_t + *)(* +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +)); + +640 if(! +¡ +) { + +641 + `FREEMEM +( +buf +); + +642  +»suÉ_çžed +; + +646 +¡ +-> +buf + = buf; + +647 +¡ +-> +size + = +ºd_Ën +; + +648 +¡ +-> +b™s_unu£d + = (8 - ( +ºd_b™s + & 0x7)) & 0x7; + +649 if( +¡ +-> +b™s_unu£d +) { + +650 + `as£¹ +( +¡ +-> +size + > 0); + +651 +¡ +-> +buf +[¡-> +size +-1] &ð0xfà<< st-> +b™s_unu£d +; + +654 +»suÉ_ok +. +Ëngth + = +¡ +-> +size +; + +655  +»suÉ_ok +; + +656 + } +} + + @BOOLEAN.c + +5  + ~ + +6  + ~ + +7  + ~ + +12 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_BOOLEAN_gs +[] = { + +13 ( +ASN_TAG_CLASS_UNIVERSAL + | (1 << 2)) + +15 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_BOOLEAN + = { + +16 +BOOLEAN_ä“ +, + +17 +BOOLEAN_´št +, + +18 +BOOLEAN_com·» +, + +19 +BOOLEAN_decode_b” +, + +20 +BOOLEAN_’code_d” +, + +21 +BOOLEAN_decode_x” +, + +22 +BOOLEAN_’code_x” +, + +23 #ifdef +ASN_DISABLE_OER_SUPPORT + + +27 +BOOLEAN_decode_Ûr +, + +28 +BOOLEAN_’code_Ûr +, + +30 #ifdef +ASN_DISABLE_PER_SUPPORT + + +36 +BOOLEAN_decode_u³r +, + +37 +BOOLEAN_’code_u³r +, + +38 +BOOLEAN_decode_­” +, + +39 +BOOLEAN_’code_­” +, + +41 +BOOLEAN_¿ndom_fžl +, + +44 +a¢_TYPE_desütÜ_t + + ga¢_DEF_BOOLEAN + = { + +47 & +a¢_OP_BOOLEAN +, + +48 +a¢_DEF_BOOLEAN_gs +, + +49 ( +a¢_DEF_BOOLEAN_gs +) / (asn_DEF_BOOLEAN_tags[0]), + +50 +a¢_DEF_BOOLEAN_gs +, + +51 ( +a¢_DEF_BOOLEAN_gs +) / (asn_DEF_BOOLEAN_tags[0]), + +52 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +60 +a¢_dec_rv®_t + + +61 + $BOOLEAN_decode_b” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +62 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +boÞ_v®ue +, + +63 cÚ¡ * +buf_±r +, +size_t + +size +,  +g_mode +) { + +64 +BOOLEAN_t + * +¡ + = (BOOLEAN_ˆ*)* +boÞ_v®ue +; + +65 +a¢_dec_rv®_t + +rv® +; + +66 +b”_Žv_Ën_t + +Ëngth +; + +67 +b”_Žv_Ën_t + +lidx +; + +69 if( +¡ + =ð +NULL +) { + +70 +¡ + = ( +BOOLEAN_t + *)(* +boÞ_v®ue + = + `CALLOC +(1, (*st))); + +71 if( +¡ + =ð +NULL +) { + +72 +rv® +. +code + = +RC_FAIL +; + +73 +rv® +. +cÚsumed + = 0; + +74  +rv® +; + +78 + `ASN_DEBUG +("Decoding %s‡s BOOLEAN (tm=%d)", + +79 +td +-> +Çme +, +g_mode +); + +84 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, 0, +buf_±r +, +size +, + +85 +g_mode +, 0, & +Ëngth +, 0); + +86 if( +rv® +. +code + !ð +RC_OK +) + +87  +rv® +; + +89 + `ASN_DEBUG +("BoޗÀËngth i %d by‹s", () +Ëngth +); + +91 +buf_±r + = ((cÚ¡ *)buf_±rè+ +rv® +. +cÚsumed +; + +92 +size + -ð +rv® +. +cÚsumed +; + +93 if( +Ëngth + > ( +b”_Žv_Ën_t +) +size +) { + +94 +rv® +. +code + = +RC_WMORE +; + +95 +rv® +. +cÚsumed + = 0; + +96  +rv® +; + +102 * +¡ + = 0, +lidx + = 0; + +103 ( +lidx + < +Ëngth +è&& * +¡ + == 0;†idx++) { + +109 * +¡ + |ð((cÚ¡ +ušt8_t + *) +buf_±r +)[ +lidx +]; + +112 +rv® +. +code + = +RC_OK +; + +113 +rv® +. +cÚsumed + +ð +Ëngth +; + +115 + `ASN_DEBUG +("Took %ld/%ld bytesoƒncode %s, value=%d", + +116 () +rv® +. +cÚsumed +, () +Ëngth +, + +117 +td +-> +Çme +, * +¡ +); + +119  +rv® +; + +120 + } +} + +122 +a¢_’c_rv®_t + + +123 + $BOOLEAN_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +124  +g_mode +, +b”_Žv_g_t + +g +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +125 * +­p_key +) { + +126 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +127 cÚ¡ +BOOLEAN_t + * +¡ + = (cÚ¡ BOOLEAN_ˆ*) +¥Œ +; + +129 +”v® +. +’coded + = + `d”_wr™e_gs +( +td +, 1, +g_mode +, 0, +g +, +cb +, +­p_key +); + +130 if( +”v® +. +’coded + == -1) { + +131 +”v® +. +çžed_ty³ + = +td +; + +132 +”v® +. +¡ruùu»_±r + = +¥Œ +; + +133  +”v® +; + +136 if( +cb +) { + +137 +ušt8_t + +boÞ_v®ue +; + +139 +boÞ_v®ue + = * +¡ + ? 0xff : 0; + +141 if( + `cb +(& +boÞ_v®ue +, 1, +­p_key +) < 0) { + +142 +”v® +. +’coded + = -1; + +143 +”v® +. +çžed_ty³ + = +td +; + +144 +”v® +. +¡ruùu»_±r + = +¥Œ +; + +145  +”v® +; + +149 +”v® +. +’coded + += 1; + +151 + `ASN__ENCODED_OK +( +”v® +); + +152 + } +} + +158  +x”_pbd_rv® + + +159 + $BOOLEAN__x”_body_decode +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +160 cÚ¡ * +chunk_buf +, +size_t + +chunk_size +) { + +161 +BOOLEAN_t + * +¡ + = (BOOLEAN_ˆ*) +¥Œ +; + +162 cÚ¡ * +p + = (cÚ¡ *) +chunk_buf +; + +164 () +td +; + +166 if( +chunk_size + && +p +[0] == 0x3c ) { + +167  + `x”_check_g +( +chunk_buf +, +chunk_size +, "false")) { + +168  +XCT_BOTH +: + +170 * +¡ + = 0; + +172  +XCT_UNKNOWN_BO +: + +173 if( + `x”_check_g +( +chunk_buf +, +chunk_size +, "true") + +174 !ð +XCT_BOTH +) + +175  +XPBD_BROKEN_ENCODING +; + +177 * +¡ + = 1; + +180  +XPBD_BROKEN_ENCODING +; + +182  +XPBD_BODY_CONSUMED +; + +184  +XPBD_BROKEN_ENCODING +; + +186 + } +} + +189 +a¢_dec_rv®_t + + +190 + $BOOLEAN_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +191 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +192 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +) { + +193  + `x”_decode_´im™ive +( +Ýt_codec_ùx +, +td +, + +194 +¥Œ +, ( +BOOLEAN_t +), +Ýt_mÇme +, +buf_±r +, +size +, + +195 +BOOLEAN__x”_body_decode +); + +196 + } +} + +198 +a¢_’c_rv®_t + + +199 + $BOOLEAN_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +200  +žev– +, +x”_’cod”_æags_e + +æags +, + +201 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +202 cÚ¡ +BOOLEAN_t + * +¡ + = (cÚ¡ BOOLEAN_ˆ*) +¥Œ +; + +203 +a¢_’c_rv®_t + +” + = {0, 0, 0}; + +205 () +žev– +; + +206 () +æags +; + +208 if(! +¡ +è +ASN__ENCODE_FAILED +; + +210 if(* +¡ +) { + +211 + `ASN__CALLBACK +("", 7); + +213 + `ASN__CALLBACK +("", 8); + +216 + `ASN__ENCODED_OK +( +” +); + +217 +cb_çžed +: + +218 +ASN__ENCODE_FAILED +; + +219 + } +} + +222 + $BOOLEAN_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +223 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +224 cÚ¡ +BOOLEAN_t + * +¡ + = (cÚ¡ BOOLEAN_ˆ*) +¥Œ +; + +225 cÚ¡ * +buf +; + +226 +size_t + +buæ’ +; + +228 () +td +; + +229 () +žev– +; + +231 if( +¡ +) { + +232 if(* +¡ +) { + +233 +buf + = "TRUE"; + +234 +buæ’ + = 4; + +236 +buf + = "FALSE"; + +237 +buæ’ + = 5; + +240 +buf + = ""; + +241 +buæ’ + = 8; + +244  ( + `cb +( +buf +, +buæ’ +, +­p_key +) < 0) ? -1 : 0; + +245 + } +} + +248 + $BOOLEAN_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +±r +, + +249 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +250 if( +td + && +±r +) { + +251  +m‘hod +) { + +252  +ASFM_FREE_EVERYTHING +: + +253 + `FREEMEM +( +±r +); + +255  +ASFM_FREE_UNDERLYING +: + +257  +ASFM_FREE_UNDERLYING_AND_RESET +: + +258 + `mem£t +( +±r +, 0, ( +BOOLEAN_t +)); + +262 + } +} + +264 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +266 +a¢_dec_rv®_t + + +267 + $BOOLEAN_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +268 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +269 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +270 +a¢_³r_d©a_t + * +pd +) { + +271 +a¢_dec_rv®_t + +rv +; + +272 +BOOLEAN_t + * +¡ + = (BOOLEAN_ˆ*)* +¥Œ +; + +274 () +Ýt_codec_ùx +; + +275 () +td +; + +276 () +cÚ¡¿šts +; + +278 if(! +¡ +) { + +279 +¡ + = ( +BOOLEAN_t + *)(* +¥Œ + = + `MALLOC +((*st))); + +280 if(! +¡ +è +ASN__DECODE_FAILED +; + +286  + `³r_g‘_ãw_b™s +( +pd +, 1)) { + +287 1: * +¡ + = 1; ; + +288 0: * +¡ + = 0; ; + +289 -1: : +ASN__DECODE_STARVED +; + +292 + `ASN_DEBUG +("% decoded‡ %s", +td +-> +Çme +, * +¡ + ? "TRUE" : "FALSE"); + +294 +rv +. +code + = +RC_OK +; + +295 +rv +. +cÚsumed + = 1; + +296  +rv +; + +297 + } +} + +300 +a¢_’c_rv®_t + + +301 + $BOOLEAN_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +302 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +303 +a¢_³r_ou_t + * +po +) { + +304 cÚ¡ +BOOLEAN_t + * +¡ + = (cÚ¡ BOOLEAN_ˆ*) +¥Œ +; + +305 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +307 () +cÚ¡¿šts +; + +309 if(! +¡ +è +ASN__ENCODE_FAILED +; + +311 if( + `³r_put_ãw_b™s +( +po +, * +¡ + ? 1 : 0, 1)) + +312 +ASN__ENCODE_FAILED +; + +314 + `ASN__ENCODED_OK +( +” +); + +315 + } +} + +317 +a¢_dec_rv®_t + + +318 + $BOOLEAN_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +319 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +320 +a¢_dec_rv®_t + +rv +; + +321 +BOOLEAN_t + * +¡ + = (BOOLEAN_ˆ*)* +¥Œ +; + +323 () +Ýt_codec_ùx +; + +324 () +cÚ¡¿šts +; + +325 () +td +; + +327 if(! +¡ +) { + +328 +¡ + = ( +BOOLEAN_t + *)(* +¥Œ + = + `MALLOC +((*st))); + +329 if(! +¡ +è +ASN__DECODE_FAILED +; + +335  + `³r_g‘_ãw_b™s +( +pd +, 1)) { + +337 * +¡ + = 1; + +340 * +¡ + = 0; + +344 +ASN__DECODE_STARVED +; + +347 + `ASN_DEBUG +("% decoded‡ %s", +td +-> +Çme +, * +¡ + ? "TRUE" : "FALSE"); + +349 +rv +. +code + = +RC_OK +; + +350 +rv +. +cÚsumed + = 1; + +351  +rv +; + +352 + } +} + +354 +a¢_’c_rv®_t + + +355 + $BOOLEAN_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +356 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +357 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +358 cÚ¡ +BOOLEAN_t + * +¡ + = (cÚ¡ BOOLEAN_ˆ*) +¥Œ +; + +359 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +361 () +cÚ¡¿šts +; + +363 if(! +¡ +è +ASN__ENCODE_FAILED +; + +365 if( + `³r_put_ãw_b™s +( +po +, * +¡ + ? 1 : 0, 1)) + +366 +ASN__ENCODE_FAILED +; + +368 + `ASN__ENCODED_OK +( +” +); + +369 + } +} + +373 #iâdeà +ASN_DISABLE_OER_SUPPORT + + +378 +a¢_’c_rv®_t + + +379 + $BOOLEAN_’code_Ûr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +380 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +381 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +382 +a¢_’c_rv®_t + +” + = { 1, 0, 0 }; + +383 cÚ¡ +BOOLEAN_t + * +¡ + = +¥Œ +; + +384 +ušt8_t + +boÞ_v®ue + = * +¡ + ? 0xff : 0; + +386 () +td +; + +387 () +cÚ¡¿šts +; + +389 if( + `cb +(& +boÞ_v®ue +, 1, +­p_key +) < 0) { + +390 +ASN__ENCODE_FAILED +; + +392 + `ASN__ENCODED_OK +( +” +); + +394 + } +} + +396 +a¢_dec_rv®_t + + +397 + $BOOLEAN_decode_Ûr +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +398 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +399 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +400 cÚ¡ * +±r +, +size_t + +size +) { + +401 +a¢_dec_rv®_t + +ok + = { +RC_OK +, 1}; + +402 +BOOLEAN_t + * +¡ +; + +404 () +Ýt_codec_ùx +; + +405 () +td +; + +406 () +cÚ¡¿šts +; + +408 if( +size + < 1) { + +409 +ASN__DECODE_STARVED +; + +412 if(!( +¡ + = * +¥Œ +)) { + +413 +¡ + = ( +BOOLEAN_t + *)(* +¥Œ + = + `CALLOC +(1, (*st))); + +414 if(! +¡ +è +ASN__DECODE_FAILED +; + +417 * +¡ + = *(cÚ¡ +ušt8_t + *) +±r +; + +419  +ok +; + +420 + } +} + +427 + $BOOLEAN_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +428 cÚ¡ * +b±r +) { + +429 cÚ¡ +BOOLEAN_t + * +a + = +­Œ +; + +430 cÚ¡ +BOOLEAN_t + * +b + = +b±r +; + +432 () +td +; + +434 if( +a + && +b +) { + +435 if(!* +a + =ð!* +b +) { + +437 } if(!* +a +) { + +442 } if(! +a +) { + +447 + } +} + +449 +a¢_¿ndom_fžl_»suÉ_t + + +450 + $BOOLEAN_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +451 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +452 +size_t + +max_Ëngth +) { + +453 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 1}; + +454 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +455 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +456 +BOOLEAN_t + * +¡ + = * +¥Œ +; + +458 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +460 if( +¡ + =ð +NULL +) { + +461 +¡ + = ( +BOOLEAN_t + *)(* +¥Œ + = + `CALLOC +(1, (*st))); + +462 if( +¡ + =ð +NULL +) { + +463  +»suÉ_çžed +; + +467 if(! +cÚ¡¿šts + || !cÚ¡¿šts-> +³r_cÚ¡¿šts +) + +468 +cÚ¡¿šts + = & +td +-> +’codšg_cÚ¡¿šts +; + +469 if( +cÚ¡¿šts +-> +³r_cÚ¡¿šts +) { + +470 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +pc + = & +cÚ¡¿šts +-> +³r_cÚ¡¿šts +-> +v®ue +; + +471 if( +pc +-> +æags + & +APC_CONSTRAINED +) { + +472 * +¡ + = + `a¢_¿ndom_b‘w“n +( +pc +-> +low”_bound +,…c-> +uµ”_bound +); + +473  +»suÉ_ok +; + +478  + `a¢_¿ndom_b‘w“n +(0, 7)) { + +482 * +¡ + = 0; ; + +483 3: * +¡ + = -1; ; + +484 4: * +¡ + = 1; ; + +485 5: * +¡ + = +INT_MIN +; ; + +486 6: * +¡ + = +INT_MAX +; ; + +488 * +¡ + = + `a¢_¿ndom_b‘w“n +( +INT_MIN +, +INT_MAX +); + +491  +»suÉ_ok +; + +492 + } +} + + @CGI.c + +8  + ~"CGI.h +" + +10  + ~"NR-CGI.h +" + +11  + ~"EUTRA-CGI.h +" + +12 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_CGI_cÚ¡r_1 + + gCC_NOTUSED + = { + +13 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +14 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +17 +a¢_TYPE_memb”_t + + ga¢_MBR_CGI_1 +[] = { + +18 { +ATF_POINTER +, 0, +off£tof +( +CGI +, +choiû +. +nR_CGI +), + +19 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +21 & +a¢_DEF_NR_CGI +, + +27 { +ATF_POINTER +, 0, +off£tof +( +CGI +, +choiû +. +eUTRA_CGI +), + +28 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +30 & +a¢_DEF_EUTRA_CGI +, + +37 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_CGI_g2–_1 +[] = { + +38 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +39 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +41 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_CGI_¥ecs_1 + = { + +42 ( +CGI +), + +43 +off£tof +( +CGI +, +_a¢_ùx +), + +44 +off£tof +( +CGI +, +´e£Á +), + +45 ((( +CGI + *)0)-> +´e£Á +), + +46 +a¢_MAP_CGI_g2–_1 +, + +51 +a¢_TYPE_desütÜ_t + + ga¢_DEF_CGI + = { + +54 & +a¢_OP_CHOICE +, + +59 { 0, & +a¢_PER_ty³_CGI_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +60 +a¢_MBR_CGI_1 +, + +62 & +a¢_SPC_CGI_¥ecs_1 + + + @CoreCPID.c + +8  + ~"CÜeCPID.h +" + +10  + ~"GUAMI.h +" + +11  + ~"GUMMEI.h +" + +12  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_CÜeCPID_cÚ¡r_1 + + gCC_NOTUSED + = { + +13 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +14 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +17  +a¢_TYPE_memb”_t + + ga¢_MBR_CÜeCPID_1 +[] = { + +18 { +ATF_POINTER +, 0, +off£tof +( +CÜeCPID +, +choiû +. +fiveGC +), + +19 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +21 & +a¢_DEF_GUAMI +, + +27 { +ATF_POINTER +, 0, +off£tof +( +CÜeCPID +, +choiû +. +ePC +), + +28 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +30 & +a¢_DEF_GUMMEI +, + +37 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_CÜeCPID_g2–_1 +[] = { + +38 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +39 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +41  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_CÜeCPID_¥ecs_1 + = { + +42 ( +CÜeCPID +), + +43 +off£tof +( +CÜeCPID +, +_a¢_ùx +), + +44 +off£tof +( +CÜeCPID +, +´e£Á +), + +45 ((( +CÜeCPID + *)0)-> +´e£Á +), + +46 +a¢_MAP_CÜeCPID_g2–_1 +, + +51 +a¢_TYPE_desütÜ_t + + ga¢_DEF_CÜeCPID + = { + +54 & +a¢_OP_CHOICE +, + +59 { 0, & +a¢_PER_ty³_CÜeCPID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +60 +a¢_MBR_CÜeCPID_1 +, + +62 & +a¢_SPC_CÜeCPID_¥ecs_1 + + + @E-UTRA-ARFCN.c + +8  + ~"E-UTRA-ARFCN.h +" + +11 + $E_UTRA_ARFCN_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 65535)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_E_UTRA_ARFCN_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED +, 16, 16, 0, 65535 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E_UTRA_ARFCN_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E_UTRA_ARFCN + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_E_UTRA_ARFCN_gs_1 +, + +52 ( +a¢_DEF_E_UTRA_ARFCN_gs_1 +) + +53 /( +a¢_DEF_E_UTRA_ARFCN_gs_1 +[0]), + +54 +a¢_DEF_E_UTRA_ARFCN_gs_1 +, + +55 ( +a¢_DEF_E_UTRA_ARFCN_gs_1 +) + +56 /( +a¢_DEF_E_UTRA_ARFCN_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_E_UTRA_ARFCN_cÚ¡r_1 +, +E_UTRA_ARFCN_cÚ¡¿št + }, + + @E-UTRA-PCI.c + +8  + ~"E-UTRA-PCI.h +" + +11 + $E_UTRA_PCI_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 503)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_E_UTRA_PCI_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 9, 9, 0, 503 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E_UTRA_PCI_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E_UTRA_PCI + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_E_UTRA_PCI_gs_1 +, + +52 ( +a¢_DEF_E_UTRA_PCI_gs_1 +) + +53 /( +a¢_DEF_E_UTRA_PCI_gs_1 +[0]), + +54 +a¢_DEF_E_UTRA_PCI_gs_1 +, + +55 ( +a¢_DEF_E_UTRA_PCI_gs_1 +) + +56 /( +a¢_DEF_E_UTRA_PCI_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_E_UTRA_PCI_cÚ¡r_1 +, +E_UTRA_PCI_cÚ¡¿št + }, + + @E-UTRA-TAC.c + +8  + ~"E-UTRA-TAC.h +" + +11 + $E_UTRA_TAC_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 2)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_E_UTRA_TAC_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 2, 2 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E_UTRA_TAC_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E_UTRA_TAC + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_E_UTRA_TAC_gs_1 +, + +53 ( +a¢_DEF_E_UTRA_TAC_gs_1 +) + +54 /( +a¢_DEF_E_UTRA_TAC_gs_1 +[0]), + +55 +a¢_DEF_E_UTRA_TAC_gs_1 +, + +56 ( +a¢_DEF_E_UTRA_TAC_gs_1 +) + +57 /( +a¢_DEF_E_UTRA_TAC_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_E_UTRA_TAC_cÚ¡r_1 +, +E_UTRA_TAC_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @E2SM-KPM-ActionDefinition-Format1.c + +8  + ~"E2SM-KPM-AùiÚDefš™iÚ-FÜm©1.h +" + +10  + ~"CGI.h +" + +11 +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_1 +[] = { + +12 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 +, +m—sInfoLi¡ +), + +13 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +15 & +a¢_DEF_M—su»m’tInfoLi¡ +, + +21 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 +, +g¿nulP”iod +), + +22 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +24 & +a¢_DEF_G¿nuÏr™yP”iod +, + +30 { +ATF_POINTER +, 1, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 +, +ûÎGlob®ID +), + +31 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +33 & +a¢_DEF_CGI +, + +40 cÚ¡  + ga¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_oms_1 +[] = { 2 }; + +41 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_gs_1 +[] = { + +42 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +44 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_g2–_1 +[] = { + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +46 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +47 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +49 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_¥ecs_1 + = { + +50 ( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 +), + +51 +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 +, +_a¢_ùx +), + +52 +a¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_g2–_1 +, + +54 +a¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_oms_1 +, + +58 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 + = { + +61 & +a¢_OP_SEQUENCE +, + +62 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_gs_1 +, + +63 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_gs_1 +) + +64 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_gs_1 +[0]), + +65 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_gs_1 +, + +66 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_gs_1 +) + +67 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_gs_1 +[0]), + +68 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +69 +a¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_1 +, + +71 & +a¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1_¥ecs_1 + + + @E2SM-KPM-ActionDefinition-Format2.c + +8  + ~"E2SM-KPM-AùiÚDefš™iÚ-FÜm©2.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©2 +, +ueID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_UEID +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©2 +, +subsütInfo +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_¥ecs_1 + = { + +38 ( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©2 +), + +39 +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©2 +, +_a¢_ùx +), + +40 +a¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2 + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_gs_1 +, + +50 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_gs_1 +) + +51 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_gs_1 +[0]), + +52 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_gs_1 +, + +53 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_gs_1 +) + +54 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_1 +, + +58 & +a¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2_¥ecs_1 + + + @E2SM-KPM-ActionDefinition-Format3.c + +8  + ~"E2SM-KPM-AùiÚDefš™iÚ-FÜm©3.h +" + +10  + ~"CGI.h +" + +11 +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_1 +[] = { + +12 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©3 +, +m—sCÚdLi¡ +), + +13 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +15 & +a¢_DEF_M—su»m’tCÚdLi¡ +, + +21 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©3 +, +g¿nulP”iod +), + +22 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +24 & +a¢_DEF_G¿nuÏr™yP”iod +, + +30 { +ATF_POINTER +, 1, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©3 +, +ûÎGlob®ID +), + +31 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +33 & +a¢_DEF_CGI +, + +40 cÚ¡  + ga¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_oms_1 +[] = { 2 }; + +41 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_gs_1 +[] = { + +42 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +44 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_g2–_1 +[] = { + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +46 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +47 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +49 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_¥ecs_1 + = { + +50 ( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©3 +), + +51 +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ_FÜm©3 +, +_a¢_ùx +), + +52 +a¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_g2–_1 +, + +54 +a¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_oms_1 +, + +58 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3 + = { + +61 & +a¢_OP_SEQUENCE +, + +62 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_gs_1 +, + +63 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_gs_1 +) + +64 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_gs_1 +[0]), + +65 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_gs_1 +, + +66 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_gs_1 +) + +67 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_gs_1 +[0]), + +68 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +69 +a¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_1 +, + +71 & +a¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3_¥ecs_1 + + + @E2SM-KPM-ActionDefinition.c + +8  + ~"E2SM-KPM-AùiÚDefš™iÚ.h +" + +10  + ~"E2SM-KPM-AùiÚDefš™iÚ-FÜm©1.h +" + +11  + ~"E2SM-KPM-AùiÚDefš™iÚ-FÜm©2.h +" + +12  + ~"E2SM-KPM-AùiÚDefš™iÚ-FÜm©3.h +" + +13  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_aùiÚDefš™iÚ_fÜm©s_cÚ¡r_3 + + gCC_NOTUSED + = { + +14 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 2, 2, 0, 2 } , + +15 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +18  +a¢_TYPE_memb”_t + + ga¢_MBR_aùiÚDefš™iÚ_fÜm©s_3 +[] = { + +19 { +ATF_POINTER +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ__aùiÚDefš™iÚ_fÜm©s +, +choiû +. +aùiÚDefš™iÚ_FÜm©1 +), + +20 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +22 & +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©1 +, + +28 { +ATF_POINTER +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ__aùiÚDefš™iÚ_fÜm©s +, +choiû +. +aùiÚDefš™iÚ_FÜm©2 +), + +29 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +31 & +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©2 +, + +37 { +ATF_POINTER +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ__aùiÚDefš™iÚ_fÜm©s +, +choiû +. +aùiÚDefš™iÚ_FÜm©3 +), + +38 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +40 & +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_FÜm©3 +, + +47 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_aùiÚDefš™iÚ_fÜm©s_g2–_3 +[] = { + +48 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +49 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +50 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +52  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_aùiÚDefš™iÚ_fÜm©s_¥ecs_3 + = { + +53 ( +E2SM_KPM_AùiÚDefš™iÚ__aùiÚDefš™iÚ_fÜm©s +), + +54 +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ__aùiÚDefš™iÚ_fÜm©s +, +_a¢_ùx +), + +55 +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ__aùiÚDefš™iÚ_fÜm©s +, +´e£Á +), + +56 ((( +E2SM_KPM_AùiÚDefš™iÚ__aùiÚDefš™iÚ_fÜm©s + *)0)-> +´e£Á +), + +57 +a¢_MAP_aùiÚDefš™iÚ_fÜm©s_g2–_3 +, + +63 +a¢_TYPE_desütÜ_t + + ga¢_DEF_aùiÚDefš™iÚ_fÜm©s_3 + = { + +66 & +a¢_OP_CHOICE +, + +71 { 0, & +a¢_PER_ty³_aùiÚDefš™iÚ_fÜm©s_cÚ¡r_3 +, +CHOICE_cÚ¡¿št + }, + +72 +a¢_MBR_aùiÚDefš™iÚ_fÜm©s_3 +, + +74 & +a¢_SPC_aùiÚDefš™iÚ_fÜm©s_¥ecs_3 + + +77  +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_1 +[] = { + +78 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ +, +ric_StyË_Ty³ +), + +79 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +81 & +a¢_DEF_RIC_StyË_Ty³ +, + +87 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ +, +aùiÚDefš™iÚ_fÜm©s +), + +88 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +90 & +a¢_DEF_aùiÚDefš™iÚ_fÜm©s_3 +, + +97 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_gs_1 +[] = { + +98 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +100 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_g2–_1 +[] = { + +101 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +102 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +104  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_¥ecs_1 + = { + +105 ( +E2SM_KPM_AùiÚDefš™iÚ +), + +106 +off£tof +( +E2SM_KPM_AùiÚDefš™iÚ +, +_a¢_ùx +), + +107 +a¢_MAP_E2SM_KPM_AùiÚDefš™iÚ_g2–_1 +, + +112 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_AùiÚDefš™iÚ + = { + +115 & +a¢_OP_SEQUENCE +, + +116 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_gs_1 +, + +117 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_gs_1 +) + +118 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_gs_1 +[0]), + +119 +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_gs_1 +, + +120 ( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_gs_1 +) + +121 /( +a¢_DEF_E2SM_KPM_AùiÚDefš™iÚ_gs_1 +[0]), + +122 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +123 +a¢_MBR_E2SM_KPM_AùiÚDefš™iÚ_1 +, + +125 & +a¢_SPC_E2SM_KPM_AùiÚDefš™iÚ_¥ecs_1 + + + @E2SM-KPM-EventTriggerDefinition-Format1.c + +8  + ~"E2SM-KPM-Ev’tTrigg”Defš™iÚ-FÜm©1.h +" + +11 + $»pÜtšgP”iod_2_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 4294967295)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +40 + $memb_»pÜtšgP”iod_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +41 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +42  +v®ue +; + +44 if(! +¥Œ +) { + +45 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +47 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +51 +v®ue + = *(cÚ¡ *) +¥Œ +; + +53 if(( +v®ue + >= 1 && value <= 4294967295)) { + +57 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +59 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +62 + } +} + +64  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_»pÜtšgP”iod_cÚ¡r_2 + + gCC_NOTUSED + = { + +65 { +APC_CONSTRAINED +, 32, -1, 1, 4294967295 } , + +66 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +69  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_»pÜtšgP”iod_cÚ¡r_2 + + gCC_NOTUSED + = { + +70 { +APC_CONSTRAINED +, 32, -1, 1, 4294967295 } , + +71 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +74 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_»pÜtšgP”iod_¥ecs_2 + = { + +79 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_»pÜtšgP”iod_gs_2 +[] = { + +80 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +81 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +84 +a¢_TYPE_desütÜ_t + + ga¢_DEF_»pÜtšgP”iod_2 + = { + +87 & +a¢_OP_N©iveIÁeg” +, + +88 +a¢_DEF_»pÜtšgP”iod_gs_2 +, + +89 ( +a¢_DEF_»pÜtšgP”iod_gs_2 +) + +90 /( +a¢_DEF_»pÜtšgP”iod_gs_2 +[0]) - 1, + +91 +a¢_DEF_»pÜtšgP”iod_gs_2 +, + +92 ( +a¢_DEF_»pÜtšgP”iod_gs_2 +) + +93 /( +a¢_DEF_»pÜtšgP”iod_gs_2 +[0]), + +94 { 0, & +a¢_PER_ty³_»pÜtšgP”iod_cÚ¡r_2 +, +»pÜtšgP”iod_2_cÚ¡¿št + }, + +96 & +a¢_SPC_»pÜtšgP”iod_¥ecs_2 + + +99 +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_1 +[] = { + +100 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1 +, +»pÜtšgP”iod +), + +101 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +103 & +a¢_DEF_»pÜtšgP”iod_2 +, + +105 { 0, & +a¢_PER_memb_»pÜtšgP”iod_cÚ¡r_2 +, +memb_»pÜtšgP”iod_cÚ¡¿št_1 + }, + +110 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_gs_1 +[] = { + +111 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +113 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_g2–_1 +[] = { + +114 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +116 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_¥ecs_1 + = { + +117 ( +E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1 +), + +118 +off£tof +( +E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1 +, +_a¢_ùx +), + +119 +a¢_MAP_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_g2–_1 +, + +124 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1 + = { + +127 & +a¢_OP_SEQUENCE +, + +128 +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_gs_1 +, + +129 ( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_gs_1 +) + +130 /( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_gs_1 +[0]), + +131 +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_gs_1 +, + +132 ( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_gs_1 +) + +133 /( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_gs_1 +[0]), + +134 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +135 +a¢_MBR_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_1 +, + +137 & +a¢_SPC_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1_¥ecs_1 + + + @E2SM-KPM-EventTriggerDefinition.c + +8  + ~"E2SM-KPM-Ev’tTrigg”Defš™iÚ.h +" + +10  + ~"E2SM-KPM-Ev’tTrigg”Defš™iÚ-FÜm©1.h +" + +11  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_ev’tDefš™iÚ_fÜm©s_cÚ¡r_2 + + gCC_NOTUSED + = { + +12 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +13 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +16  +a¢_TYPE_memb”_t + + ga¢_MBR_ev’tDefš™iÚ_fÜm©s_2 +[] = { + +17 { +ATF_POINTER +, 0, +off£tof +( +E2SM_KPM_Ev’tTrigg”Defš™iÚ__ev’tDefš™iÚ_fÜm©s +, +choiû +. +ev’tDefš™iÚ_FÜm©1 +), + +18 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +20 & +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_FÜm©1 +, + +27 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_ev’tDefš™iÚ_fÜm©s_g2–_2 +[] = { + +28 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +30  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_ev’tDefš™iÚ_fÜm©s_¥ecs_2 + = { + +31 ( +E2SM_KPM_Ev’tTrigg”Defš™iÚ__ev’tDefš™iÚ_fÜm©s +), + +32 +off£tof +( +E2SM_KPM_Ev’tTrigg”Defš™iÚ__ev’tDefš™iÚ_fÜm©s +, +_a¢_ùx +), + +33 +off£tof +( +E2SM_KPM_Ev’tTrigg”Defš™iÚ__ev’tDefš™iÚ_fÜm©s +, +´e£Á +), + +34 ((( +E2SM_KPM_Ev’tTrigg”Defš™iÚ__ev’tDefš™iÚ_fÜm©s + *)0)-> +´e£Á +), + +35 +a¢_MAP_ev’tDefš™iÚ_fÜm©s_g2–_2 +, + +41 +a¢_TYPE_desütÜ_t + + ga¢_DEF_ev’tDefš™iÚ_fÜm©s_2 + = { + +44 & +a¢_OP_CHOICE +, + +49 { 0, & +a¢_PER_ty³_ev’tDefš™iÚ_fÜm©s_cÚ¡r_2 +, +CHOICE_cÚ¡¿št + }, + +50 +a¢_MBR_ev’tDefš™iÚ_fÜm©s_2 +, + +52 & +a¢_SPC_ev’tDefš™iÚ_fÜm©s_¥ecs_2 + + +55  +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_Ev’tTrigg”Defš™iÚ_1 +[] = { + +56 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_Ev’tTrigg”Defš™iÚ +, +ev’tDefš™iÚ_fÜm©s +), + +57 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +59 & +a¢_DEF_ev’tDefš™iÚ_fÜm©s_2 +, + +66 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_gs_1 +[] = { + +67 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +69 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_Ev’tTrigg”Defš™iÚ_g2–_1 +[] = { + +70 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +72  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_Ev’tTrigg”Defš™iÚ_¥ecs_1 + = { + +73 ( +E2SM_KPM_Ev’tTrigg”Defš™iÚ +), + +74 +off£tof +( +E2SM_KPM_Ev’tTrigg”Defš™iÚ +, +_a¢_ùx +), + +75 +a¢_MAP_E2SM_KPM_Ev’tTrigg”Defš™iÚ_g2–_1 +, + +80 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ + = { + +83 & +a¢_OP_SEQUENCE +, + +84 +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_gs_1 +, + +85 ( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_gs_1 +) + +86 /( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_gs_1 +[0]), + +87 +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_gs_1 +, + +88 ( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_gs_1 +) + +89 /( +a¢_DEF_E2SM_KPM_Ev’tTrigg”Defš™iÚ_gs_1 +[0]), + +90 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +91 +a¢_MBR_E2SM_KPM_Ev’tTrigg”Defš™iÚ_1 +, + +93 & +a¢_SPC_E2SM_KPM_Ev’tTrigg”Defš™iÚ_¥ecs_1 + + + @E2SM-KPM-IndicationHeader-Format1.c + +8  + ~"E2SM-KPM-IndiÿtiÚH—d”-FÜm©1.h +" + +10 cÚ¡  + g³rm™‹d_®phab‘_bË_3 +[256] = { + +20 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_3 +[74] = { + +28  + $check_³rm™‹d_®phab‘_3 +(cÚ¡ * +¥Œ +) { + +29 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_3 +; + +31 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +32 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +33 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +35 ; +ch + < +’d +; ch++) { + +36 +ušt8_t + +cv + = * +ch +; + +37 if(! +bË +[ +cv +])  -1; + +40 + } +} + +42 cÚ¡  + g³rm™‹d_®phab‘_bË_4 +[256] = { + +52 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_4 +[74] = { + +60  + $check_³rm™‹d_®phab‘_4 +(cÚ¡ * +¥Œ +) { + +61 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_4 +; + +63 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +64 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +65 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +67 ; +ch + < +’d +; ch++) { + +68 +ušt8_t + +cv + = * +ch +; + +69 if(! +bË +[ +cv +])  -1; + +72 + } +} + +74 cÚ¡  + g³rm™‹d_®phab‘_bË_5 +[256] = { + +84 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_5 +[74] = { + +92  + $check_³rm™‹d_®phab‘_5 +(cÚ¡ * +¥Œ +) { + +93 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_5 +; + +95 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +96 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +97 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +99 ; +ch + < +’d +; ch++) { + +100 +ušt8_t + +cv + = * +ch +; + +101 if(! +bË +[ +cv +])  -1; + +104 + } +} + +106 cÚ¡  + g³rm™‹d_®phab‘_bË_6 +[256] = { + +116 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_6 +[74] = { + +124  + $check_³rm™‹d_®phab‘_6 +(cÚ¡ * +¥Œ +) { + +125 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_6 +; + +127 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +128 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +129 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +131 ; +ch + < +’d +; ch++) { + +132 +ušt8_t + +cv + = * +ch +; + +133 if(! +bË +[ +cv +])  -1; + +136 + } +} + +139 + $memb_fžeFÜm©v”siÚ_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +140 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +141 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +142 +size_t + +size +; + +144 if(! +¥Œ +) { + +145 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +147 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +151 +size + = +¡ +->size; + +153 if(( +size + <= 15) + +154 && ! + `check_³rm™‹d_®phab‘_3 +( +¡ +)) { + +158 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +160 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +163 + } +} + +165  + $a¢_PER_MAP_fžeFÜm©v”siÚ_3_v2c +( +v®ue +) { + +166 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_3 +)/(permitted_alphabet_table_3[0])) + +168  +³rm™‹d_®phab‘_bË_3 +[ +v®ue +] - 1; + +169 + } +} + +170  + $a¢_PER_MAP_fžeFÜm©v”siÚ_3_c2v +( +code +) { + +171 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_3 +)/(permitted_alphabet_code2value_3[0])) + +173  +³rm™‹d_®phab‘_code2v®ue_3 +[ +code +]; + +174 + } +} + +176 + $memb_£nd”Name_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +177 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +178 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +179 +size_t + +size +; + +181 if(! +¥Œ +) { + +182 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +184 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +188 +size + = +¡ +->size; + +190 if(( +size + <= 400) + +191 && ! + `check_³rm™‹d_®phab‘_4 +( +¡ +)) { + +195 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +197 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +200 + } +} + +202  + $a¢_PER_MAP_£nd”Name_4_v2c +( +v®ue +) { + +203 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_4 +)/(permitted_alphabet_table_4[0])) + +205  +³rm™‹d_®phab‘_bË_4 +[ +v®ue +] - 1; + +206 + } +} + +207  + $a¢_PER_MAP_£nd”Name_4_c2v +( +code +) { + +208 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_4 +)/(permitted_alphabet_code2value_4[0])) + +210  +³rm™‹d_®phab‘_code2v®ue_4 +[ +code +]; + +211 + } +} + +213 + $memb_£nd”Ty³_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +214 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +215 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +216 +size_t + +size +; + +218 if(! +¥Œ +) { + +219 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +221 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +225 +size + = +¡ +->size; + +227 if(( +size + <= 8) + +228 && ! + `check_³rm™‹d_®phab‘_5 +( +¡ +)) { + +232 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +234 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +237 + } +} + +239  + $a¢_PER_MAP_£nd”Ty³_5_v2c +( +v®ue +) { + +240 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_5 +)/(permitted_alphabet_table_5[0])) + +242  +³rm™‹d_®phab‘_bË_5 +[ +v®ue +] - 1; + +243 + } +} + +244  + $a¢_PER_MAP_£nd”Ty³_5_c2v +( +code +) { + +245 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_5 +)/(permitted_alphabet_code2value_5[0])) + +247  +³rm™‹d_®phab‘_code2v®ue_5 +[ +code +]; + +248 + } +} + +250 + $memb_v’dÜName_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +251 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +252 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +253 +size_t + +size +; + +255 if(! +¥Œ +) { + +256 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +258 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +262 +size + = +¡ +->size; + +264 if(( +size + <= 32) + +265 && ! + `check_³rm™‹d_®phab‘_6 +( +¡ +)) { + +269 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +271 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +274 + } +} + +276  + $a¢_PER_MAP_v’dÜName_6_v2c +( +v®ue +) { + +277 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_6 +)/(permitted_alphabet_table_6[0])) + +279  +³rm™‹d_®phab‘_bË_6 +[ +v®ue +] - 1; + +280 + } +} + +281  + $a¢_PER_MAP_v’dÜName_6_c2v +( +code +) { + +282 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_6 +)/(permitted_alphabet_code2value_6[0])) + +284  +³rm™‹d_®phab‘_code2v®ue_6 +[ +code +]; + +285 + } +} + +286  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_fžeFÜm©v”siÚ_cÚ¡r_3 + + gCC_NOTUSED + = { + +287 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +288 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 4, 4, 0, 15 } , + +289 +a¢_PER_MAP_fžeFÜm©v”siÚ_3_v2c +, + +290 +a¢_PER_MAP_fžeFÜm©v”siÚ_3_c2v + + +292  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_£nd”Name_cÚ¡r_4 + + gCC_NOTUSED + = { + +293 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +294 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 9, 9, 0, 400 } , + +295 +a¢_PER_MAP_£nd”Name_4_v2c +, + +296 +a¢_PER_MAP_£nd”Name_4_c2v + + +298  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_£nd”Ty³_cÚ¡r_5 + + gCC_NOTUSED + = { + +299 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +300 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 4, 4, 0, 8 } , + +301 +a¢_PER_MAP_£nd”Ty³_5_v2c +, + +302 +a¢_PER_MAP_£nd”Ty³_5_c2v + + +304  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_v’dÜName_cÚ¡r_6 + + gCC_NOTUSED + = { + +305 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +306 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 6, 6, 0, 32 } , + +307 +a¢_PER_MAP_v’dÜName_6_v2c +, + +308 +a¢_PER_MAP_v’dÜName_6_c2v + + +310 +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_1 +[] = { + +311 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +, +cÞËtS¹Time +), + +312 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +314 & +a¢_DEF_TimeSmp +, + +320 { +ATF_POINTER +, 4, +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +, +fžeFÜm©v”siÚ +), + +321 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +323 & +a¢_DEF_PršbËSŒšg +, + +325 { 0, & +a¢_PER_memb_fžeFÜm©v”siÚ_cÚ¡r_3 +, +memb_fžeFÜm©v”siÚ_cÚ¡¿št_1 + }, + +329 { +ATF_POINTER +, 3, +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +, +£nd”Name +), + +330 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +332 & +a¢_DEF_PršbËSŒšg +, + +334 { 0, & +a¢_PER_memb_£nd”Name_cÚ¡r_4 +, +memb_£nd”Name_cÚ¡¿št_1 + }, + +338 { +ATF_POINTER +, 2, +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +, +£nd”Ty³ +), + +339 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +341 & +a¢_DEF_PršbËSŒšg +, + +343 { 0, & +a¢_PER_memb_£nd”Ty³_cÚ¡r_5 +, +memb_£nd”Ty³_cÚ¡¿št_1 + }, + +347 { +ATF_POINTER +, 1, +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +, +v’dÜName +), + +348 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +350 & +a¢_DEF_PršbËSŒšg +, + +352 { 0, & +a¢_PER_memb_v’dÜName_cÚ¡r_6 +, +memb_v’dÜName_cÚ¡¿št_1 + }, + +357 cÚ¡  + ga¢_MAP_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_oms_1 +[] = { 1, 2, 3, 4 }; + +358 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_gs_1 +[] = { + +359 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +361 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_g2–_1 +[] = { + +362 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +363 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +364 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +365 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +366 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 } + +368 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_¥ecs_1 + = { + +369 ( +E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +), + +370 +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +, +_a¢_ùx +), + +371 +a¢_MAP_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_g2–_1 +, + +373 +a¢_MAP_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_oms_1 +, + +377 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 + = { + +380 & +a¢_OP_SEQUENCE +, + +381 +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_gs_1 +, + +382 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_gs_1 +) + +383 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_gs_1 +[0]), + +384 +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_gs_1 +, + +385 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_gs_1 +) + +386 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_gs_1 +[0]), + +387 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +388 +a¢_MBR_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_1 +, + +390 & +a¢_SPC_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1_¥ecs_1 + + + @E2SM-KPM-IndicationHeader.c + +8  + ~"E2SM-KPM-IndiÿtiÚH—d”.h +" + +10  + ~"E2SM-KPM-IndiÿtiÚH—d”-FÜm©1.h +" + +11  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_šdiÿtiÚH—d”_fÜm©s_cÚ¡r_2 + + gCC_NOTUSED + = { + +12 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +13 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +16  +a¢_TYPE_memb”_t + + ga¢_MBR_šdiÿtiÚH—d”_fÜm©s_2 +[] = { + +17 { +ATF_POINTER +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”__šdiÿtiÚH—d”_fÜm©s +, +choiû +. +šdiÿtiÚH—d”_FÜm©1 +), + +18 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +20 & +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_FÜm©1 +, + +27 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_šdiÿtiÚH—d”_fÜm©s_g2–_2 +[] = { + +28 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +30  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_šdiÿtiÚH—d”_fÜm©s_¥ecs_2 + = { + +31 ( +E2SM_KPM_IndiÿtiÚH—d”__šdiÿtiÚH—d”_fÜm©s +), + +32 +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”__šdiÿtiÚH—d”_fÜm©s +, +_a¢_ùx +), + +33 +off£tof +( +E2SM_KPM_IndiÿtiÚH—d”__šdiÿtiÚH—d”_fÜm©s +, +´e£Á +), + +34 ((( +E2SM_KPM_IndiÿtiÚH—d”__šdiÿtiÚH—d”_fÜm©s + *)0)-> +´e£Á +), + +35 +a¢_MAP_šdiÿtiÚH—d”_fÜm©s_g2–_2 +, + +41 +a¢_TYPE_desütÜ_t + + ga¢_DEF_šdiÿtiÚH—d”_fÜm©s_2 + = { + +44 & +a¢_OP_CHOICE +, + +49 { 0, & +a¢_PER_ty³_šdiÿtiÚH—d”_fÜm©s_cÚ¡r_2 +, +CHOICE_cÚ¡¿št + }, + +50 +a¢_MBR_šdiÿtiÚH—d”_fÜm©s_2 +, + +52 & +a¢_SPC_šdiÿtiÚH—d”_fÜm©s_¥ecs_2 + + +55  +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_IndiÿtiÚH—d”_1 +[] = { + +56 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚH—d” +, +šdiÿtiÚH—d”_fÜm©s +), + +57 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +59 & +a¢_DEF_šdiÿtiÚH—d”_fÜm©s_2 +, + +66 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_gs_1 +[] = { + +67 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +69 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_IndiÿtiÚH—d”_g2–_1 +[] = { + +70 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +72  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_IndiÿtiÚH—d”_¥ecs_1 + = { + +73 ( +E2SM_KPM_IndiÿtiÚH—d” +), + +74 +off£tof +( +E2SM_KPM_IndiÿtiÚH—d” +, +_a¢_ùx +), + +75 +a¢_MAP_E2SM_KPM_IndiÿtiÚH—d”_g2–_1 +, + +80 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚH—d” + = { + +83 & +a¢_OP_SEQUENCE +, + +84 +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_gs_1 +, + +85 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_gs_1 +) + +86 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_gs_1 +[0]), + +87 +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_gs_1 +, + +88 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_gs_1 +) + +89 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚH—d”_gs_1 +[0]), + +90 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +91 +a¢_MBR_E2SM_KPM_IndiÿtiÚH—d”_1 +, + +93 & +a¢_SPC_E2SM_KPM_IndiÿtiÚH—d”_¥ecs_1 + + + @E2SM-KPM-IndicationMessage-Format1.c + +8  + ~"E2SM-KPM-IndiÿtiÚMes§ge-FÜm©1.h +" + +10  + ~"M—su»m’tInfoLi¡.h +" + +11 +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_1 +[] = { + +12 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1 +, +m—sD©a +), + +13 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +15 & +a¢_DEF_M—su»m’tD©a +, + +21 { +ATF_POINTER +, 2, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1 +, +m—sInfoLi¡ +), + +22 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +24 & +a¢_DEF_M—su»m’tInfoLi¡ +, + +30 { +ATF_POINTER +, 1, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1 +, +g¿nulP”iod +), + +31 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +33 & +a¢_DEF_G¿nuÏr™yP”iod +, + +40 cÚ¡  + ga¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_oms_1 +[] = { 1, 2 }; + +41 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_gs_1 +[] = { + +42 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +44 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_g2–_1 +[] = { + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +46 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +47 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +49 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_¥ecs_1 + = { + +50 ( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1 +), + +51 +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1 +, +_a¢_ùx +), + +52 +a¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_g2–_1 +, + +54 +a¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_oms_1 +, + +58 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1 + = { + +61 & +a¢_OP_SEQUENCE +, + +62 +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_gs_1 +, + +63 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_gs_1 +) + +64 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_gs_1 +[0]), + +65 +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_gs_1 +, + +66 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_gs_1 +) + +67 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_gs_1 +[0]), + +68 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +69 +a¢_MBR_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_1 +, + +71 & +a¢_SPC_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1_¥ecs_1 + + + @E2SM-KPM-IndicationMessage-Format2.c + +8  + ~"E2SM-KPM-IndiÿtiÚMes§ge-FÜm©2.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2 +, +m—sD©a +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_M—su»m’tD©a +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2 +, +m—sCÚdUEidLi¡ +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_M—su»m’tCÚdUEidLi¡ +, + +29 { +ATF_POINTER +, 1, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2 +, +g¿nulP”iod +), + +30 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +32 & +a¢_DEF_G¿nuÏr™yP”iod +, + +39 cÚ¡  + ga¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_oms_1 +[] = { 2 }; + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_gs_1 +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +43 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_g2–_1 +[] = { + +44 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +46 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +48 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_¥ecs_1 + = { + +49 ( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2 +), + +50 +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2 +, +_a¢_ùx +), + +51 +a¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_g2–_1 +, + +53 +a¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_oms_1 +, + +57 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2 + = { + +60 & +a¢_OP_SEQUENCE +, + +61 +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_gs_1 +, + +62 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_gs_1 +) + +63 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_gs_1 +[0]), + +64 +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_gs_1 +, + +65 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_gs_1 +) + +66 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_gs_1 +[0]), + +67 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +68 +a¢_MBR_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_1 +, + +70 & +a¢_SPC_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2_¥ecs_1 + + + @E2SM-KPM-IndicationMessage.c + +8  + ~"E2SM-KPM-IndiÿtiÚMes§ge.h +" + +10  + ~"E2SM-KPM-IndiÿtiÚMes§ge-FÜm©1.h +" + +11  + ~"E2SM-KPM-IndiÿtiÚMes§ge-FÜm©2.h +" + +12  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_šdiÿtiÚMes§ge_fÜm©s_cÚ¡r_2 + + gCC_NOTUSED + = { + +13 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +14 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +17  +a¢_TYPE_memb”_t + + ga¢_MBR_šdiÿtiÚMes§ge_fÜm©s_2 +[] = { + +18 { +ATF_POINTER +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge__šdiÿtiÚMes§ge_fÜm©s +, +choiû +. +šdiÿtiÚMes§ge_FÜm©1 +), + +19 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +21 & +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©1 +, + +27 { +ATF_POINTER +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge__šdiÿtiÚMes§ge_fÜm©s +, +choiû +. +šdiÿtiÚMes§ge_FÜm©2 +), + +28 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +30 & +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_FÜm©2 +, + +37 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_šdiÿtiÚMes§ge_fÜm©s_g2–_2 +[] = { + +38 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +39 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +41  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_šdiÿtiÚMes§ge_fÜm©s_¥ecs_2 + = { + +42 ( +E2SM_KPM_IndiÿtiÚMes§ge__šdiÿtiÚMes§ge_fÜm©s +), + +43 +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge__šdiÿtiÚMes§ge_fÜm©s +, +_a¢_ùx +), + +44 +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge__šdiÿtiÚMes§ge_fÜm©s +, +´e£Á +), + +45 ((( +E2SM_KPM_IndiÿtiÚMes§ge__šdiÿtiÚMes§ge_fÜm©s + *)0)-> +´e£Á +), + +46 +a¢_MAP_šdiÿtiÚMes§ge_fÜm©s_g2–_2 +, + +52 +a¢_TYPE_desütÜ_t + + ga¢_DEF_šdiÿtiÚMes§ge_fÜm©s_2 + = { + +55 & +a¢_OP_CHOICE +, + +60 { 0, & +a¢_PER_ty³_šdiÿtiÚMes§ge_fÜm©s_cÚ¡r_2 +, +CHOICE_cÚ¡¿št + }, + +61 +a¢_MBR_šdiÿtiÚMes§ge_fÜm©s_2 +, + +63 & +a¢_SPC_šdiÿtiÚMes§ge_fÜm©s_¥ecs_2 + + +66  +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_IndiÿtiÚMes§ge_1 +[] = { + +67 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge +, +šdiÿtiÚMes§ge_fÜm©s +), + +68 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +70 & +a¢_DEF_šdiÿtiÚMes§ge_fÜm©s_2 +, + +77 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_gs_1 +[] = { + +78 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +80 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_g2–_1 +[] = { + +81 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +83  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_IndiÿtiÚMes§ge_¥ecs_1 + = { + +84 ( +E2SM_KPM_IndiÿtiÚMes§ge +), + +85 +off£tof +( +E2SM_KPM_IndiÿtiÚMes§ge +, +_a¢_ùx +), + +86 +a¢_MAP_E2SM_KPM_IndiÿtiÚMes§ge_g2–_1 +, + +91 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge + = { + +94 & +a¢_OP_SEQUENCE +, + +95 +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_gs_1 +, + +96 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_gs_1 +) + +97 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_gs_1 +[0]), + +98 +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_gs_1 +, + +99 ( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_gs_1 +) + +100 /( +a¢_DEF_E2SM_KPM_IndiÿtiÚMes§ge_gs_1 +[0]), + +101 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +102 +a¢_MBR_E2SM_KPM_IndiÿtiÚMes§ge_1 +, + +104 & +a¢_SPC_E2SM_KPM_IndiÿtiÚMes§ge_¥ecs_1 + + + @E2SM-KPM-RANfunction-Description.c + +8  + ~"E2SM-KPM-RANfunùiÚ-DesütiÚ.h +" + +10  + ~"RIC-Ev’tTrigg”StyË-I‹m.h +" + +11  + ~"RIC-R•ÜtStyË-I‹m.h +" + +13 + $memb_ric_Ev’tTrigg”StyË_Li¡_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +14 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +15 +size_t + +size +; + +17 if(! +¥Œ +) { + +18 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +20 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +25 +size + = + `_A_CSEQUENCE_FROM_VOID +( +¥Œ +)-> +couÁ +; + +27 if(( +size + >= 1 && size <= 63)) { + +29  +td +-> +’codšg_cÚ¡¿šts +. + `g’”®_cÚ¡¿šts +Ñd, +¥Œ +, +ùçžcb +, +­p_key +); + +31 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +33 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +36 + } +} + +39 + $memb_ric_R•ÜtStyË_Li¡_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +40 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +41 +size_t + +size +; + +43 if(! +¥Œ +) { + +44 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +46 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +51 +size + = + `_A_CSEQUENCE_FROM_VOID +( +¥Œ +)-> +couÁ +; + +53 if(( +size + >= 1 && size <= 63)) { + +55  +td +-> +’codšg_cÚ¡¿šts +. + `g’”®_cÚ¡¿šts +Ñd, +¥Œ +, +ùçžcb +, +­p_key +); + +57 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +59 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +62 + } +} + +64  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_ric_Ev’tTrigg”StyË_Li¡_cÚ¡r_3 + + gCC_NOTUSED + = { + +65 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +66 { +APC_CONSTRAINED +, 6, 6, 1, 63 } , + +69  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_ric_R•ÜtStyË_Li¡_cÚ¡r_5 + + gCC_NOTUSED + = { + +70 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +71 { +APC_CONSTRAINED +, 6, 6, 1, 63 } , + +74  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_ric_Ev’tTrigg”StyË_Li¡_cÚ¡r_3 + + gCC_NOTUSED + = { + +75 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +76 { +APC_CONSTRAINED +, 6, 6, 1, 63 } , + +79  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_ric_R•ÜtStyË_Li¡_cÚ¡r_5 + + gCC_NOTUSED + = { + +80 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +81 { +APC_CONSTRAINED +, 6, 6, 1, 63 } , + +84  +a¢_TYPE_memb”_t + + ga¢_MBR_ric_Ev’tTrigg”StyË_Li¡_3 +[] = { + +85 { +ATF_POINTER +, 0, 0, + +86 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +88 & +a¢_DEF_RIC_Ev’tTrigg”StyË_I‹m +, + +95 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_ric_Ev’tTrigg”StyË_Li¡_gs_3 +[] = { + +96 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +97 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +99  +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_ric_Ev’tTrigg”StyË_Li¡_¥ecs_3 + = { + +100 ( +E2SM_KPM_RANfunùiÚ_DesütiÚ__ric_Ev’tTrigg”StyË_Li¡ +), + +101 +off£tof +( +E2SM_KPM_RANfunùiÚ_DesütiÚ__ric_Ev’tTrigg”StyË_Li¡ +, +_a¢_ùx +), + +105 +a¢_TYPE_desütÜ_t + + ga¢_DEF_ric_Ev’tTrigg”StyË_Li¡_3 + = { + +108 & +a¢_OP_SEQUENCE_OF +, + +109 +a¢_DEF_ric_Ev’tTrigg”StyË_Li¡_gs_3 +, + +110 ( +a¢_DEF_ric_Ev’tTrigg”StyË_Li¡_gs_3 +) + +111 /( +a¢_DEF_ric_Ev’tTrigg”StyË_Li¡_gs_3 +[0]) - 1, + +112 +a¢_DEF_ric_Ev’tTrigg”StyË_Li¡_gs_3 +, + +113 ( +a¢_DEF_ric_Ev’tTrigg”StyË_Li¡_gs_3 +) + +114 /( +a¢_DEF_ric_Ev’tTrigg”StyË_Li¡_gs_3 +[0]), + +115 { 0, & +a¢_PER_ty³_ric_Ev’tTrigg”StyË_Li¡_cÚ¡r_3 +, +SEQUENCE_OF_cÚ¡¿št + }, + +116 +a¢_MBR_ric_Ev’tTrigg”StyË_Li¡_3 +, + +118 & +a¢_SPC_ric_Ev’tTrigg”StyË_Li¡_¥ecs_3 + + +121  +a¢_TYPE_memb”_t + + ga¢_MBR_ric_R•ÜtStyË_Li¡_5 +[] = { + +122 { +ATF_POINTER +, 0, 0, + +123 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +125 & +a¢_DEF_RIC_R•ÜtStyË_I‹m +, + +132 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_ric_R•ÜtStyË_Li¡_gs_5 +[] = { + +133 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +134 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +136  +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_ric_R•ÜtStyË_Li¡_¥ecs_5 + = { + +137 ( +E2SM_KPM_RANfunùiÚ_DesütiÚ__ric_R•ÜtStyË_Li¡ +), + +138 +off£tof +( +E2SM_KPM_RANfunùiÚ_DesütiÚ__ric_R•ÜtStyË_Li¡ +, +_a¢_ùx +), + +142 +a¢_TYPE_desütÜ_t + + ga¢_DEF_ric_R•ÜtStyË_Li¡_5 + = { + +145 & +a¢_OP_SEQUENCE_OF +, + +146 +a¢_DEF_ric_R•ÜtStyË_Li¡_gs_5 +, + +147 ( +a¢_DEF_ric_R•ÜtStyË_Li¡_gs_5 +) + +148 /( +a¢_DEF_ric_R•ÜtStyË_Li¡_gs_5 +[0]) - 1, + +149 +a¢_DEF_ric_R•ÜtStyË_Li¡_gs_5 +, + +150 ( +a¢_DEF_ric_R•ÜtStyË_Li¡_gs_5 +) + +151 /( +a¢_DEF_ric_R•ÜtStyË_Li¡_gs_5 +[0]), + +152 { 0, & +a¢_PER_ty³_ric_R•ÜtStyË_Li¡_cÚ¡r_5 +, +SEQUENCE_OF_cÚ¡¿št + }, + +153 +a¢_MBR_ric_R•ÜtStyË_Li¡_5 +, + +155 & +a¢_SPC_ric_R•ÜtStyË_Li¡_¥ecs_5 + + +158  +a¢_TYPE_memb”_t + + ga¢_MBR_E2SM_KPM_RANfunùiÚ_DesütiÚ_1 +[] = { + +159 { +ATF_NOFLAGS +, 0, +off£tof +( +E2SM_KPM_RANfunùiÚ_DesütiÚ +, +¿nFunùiÚ_Name +), + +160 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +162 & +a¢_DEF_RANfunùiÚ_Name +, + +168 { +ATF_POINTER +, 2, +off£tof +( +E2SM_KPM_RANfunùiÚ_DesütiÚ +, +ric_Ev’tTrigg”StyË_Li¡ +), + +169 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +171 & +a¢_DEF_ric_Ev’tTrigg”StyË_Li¡_3 +, + +173 { 0, & +a¢_PER_memb_ric_Ev’tTrigg”StyË_Li¡_cÚ¡r_3 +, +memb_ric_Ev’tTrigg”StyË_Li¡_cÚ¡¿št_1 + }, + +177 { +ATF_POINTER +, 1, +off£tof +( +E2SM_KPM_RANfunùiÚ_DesütiÚ +, +ric_R•ÜtStyË_Li¡ +), + +178 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +180 & +a¢_DEF_ric_R•ÜtStyË_Li¡_5 +, + +182 { 0, & +a¢_PER_memb_ric_R•ÜtStyË_Li¡_cÚ¡r_5 +, +memb_ric_R•ÜtStyË_Li¡_cÚ¡¿št_1 + }, + +187 cÚ¡  + ga¢_MAP_E2SM_KPM_RANfunùiÚ_DesütiÚ_oms_1 +[] = { 1, 2 }; + +188 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ_gs_1 +[] = { + +189 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +191 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_E2SM_KPM_RANfunùiÚ_DesütiÚ_g2–_1 +[] = { + +192 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +193 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +194 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +196  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_E2SM_KPM_RANfunùiÚ_DesütiÚ_¥ecs_1 + = { + +197 ( +E2SM_KPM_RANfunùiÚ_DesütiÚ +), + +198 +off£tof +( +E2SM_KPM_RANfunùiÚ_DesütiÚ +, +_a¢_ùx +), + +199 +a¢_MAP_E2SM_KPM_RANfunùiÚ_DesütiÚ_g2–_1 +, + +201 +a¢_MAP_E2SM_KPM_RANfunùiÚ_DesütiÚ_oms_1 +, + +205 +a¢_TYPE_desütÜ_t + + ga¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ + = { + +208 & +a¢_OP_SEQUENCE +, + +209 +a¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ_gs_1 +, + +210 ( +a¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ_gs_1 +) + +211 /( +a¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ_gs_1 +[0]), + +212 +a¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ_gs_1 +, + +213 ( +a¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ_gs_1 +) + +214 /( +a¢_DEF_E2SM_KPM_RANfunùiÚ_DesütiÚ_gs_1 +[0]), + +215 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +216 +a¢_MBR_E2SM_KPM_RANfunùiÚ_DesütiÚ_1 +, + +218 & +a¢_SPC_E2SM_KPM_RANfunùiÚ_DesütiÚ_¥ecs_1 + + + @EN-GNB-ID.c + +8  + ~"EN-GNB-ID.h +" + +11 + $memb_’_gNB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + >= 22 && size <= 32)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +41  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_’_gNB_ID_cÚ¡r_2 + + gCC_NOTUSED + = { + +42 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +43 { +APC_CONSTRAINED +, 4, 4, 22, 32 } , + +46 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_EN_GNB_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +47 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +48 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +51 +a¢_TYPE_memb”_t + + ga¢_MBR_EN_GNB_ID_1 +[] = { + +52 { +ATF_NOFLAGS +, 0, +off£tof +( +EN_GNB_ID +, +choiû +. +’_gNB_ID +), + +53 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +55 & +a¢_DEF_BIT_STRING +, + +57 { 0, & +a¢_PER_memb_’_gNB_ID_cÚ¡r_2 +, +memb_’_gNB_ID_cÚ¡¿št_1 + }, + +62 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_EN_GNB_ID_g2–_1 +[] = { + +63 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +65 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_EN_GNB_ID_¥ecs_1 + = { + +66 ( +EN_GNB_ID +), + +67 +off£tof +( +EN_GNB_ID +, +_a¢_ùx +), + +68 +off£tof +( +EN_GNB_ID +, +´e£Á +), + +69 ((( +EN_GNB_ID + *)0)-> +´e£Á +), + +70 +a¢_MAP_EN_GNB_ID_g2–_1 +, + +75 +a¢_TYPE_desütÜ_t + + ga¢_DEF_EN_GNB_ID + = { + +78 & +a¢_OP_CHOICE +, + +83 { 0, & +a¢_PER_ty³_EN_GNB_ID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +84 +a¢_MBR_EN_GNB_ID_1 +, + +86 & +a¢_SPC_EN_GNB_ID_¥ecs_1 + + + @ENB-ID.c + +8  + ~"ENB-ID.h +" + +11 + $memb_maüo_eNB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + == 20)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +42 + $memb_home_eNB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +43 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +44 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +45 +size_t + +size +; + +47 if(! +¥Œ +) { + +48 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +50 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +54 if( +¡ +-> +size + > 0) { + +56 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +58 +size + = 0; + +61 if(( +size + == 28)) { + +65 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +67 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +70 + } +} + +73 + $memb_shÜt_Maüo_eNB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +74 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +75 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +76 +size_t + +size +; + +78 if(! +¥Œ +) { + +79 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +81 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +85 if( +¡ +-> +size + > 0) { + +87 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +89 +size + = 0; + +92 if(( +size + == 18)) { + +96 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +98 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +101 + } +} + +104 + $memb_lÚg_Maüo_eNB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +105 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +106 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +107 +size_t + +size +; + +109 if(! +¥Œ +) { + +110 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +112 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +116 if( +¡ +-> +size + > 0) { + +118 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +120 +size + = 0; + +123 if(( +size + == 21)) { + +127 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +129 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +132 + } +} + +134  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_maüo_eNB_ID_cÚ¡r_2 + + gCC_NOTUSED + = { + +135 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +136 { +APC_CONSTRAINED +, 0, 0, 20, 20 } , + +139  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_home_eNB_ID_cÚ¡r_3 + + gCC_NOTUSED + = { + +140 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +141 { +APC_CONSTRAINED +, 0, 0, 28, 28 } , + +144  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_shÜt_Maüo_eNB_ID_cÚ¡r_5 + + gCC_NOTUSED + = { + +145 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +146 { +APC_CONSTRAINED +, 0, 0, 18, 18 } , + +149  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_lÚg_Maüo_eNB_ID_cÚ¡r_6 + + gCC_NOTUSED + = { + +150 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +151 { +APC_CONSTRAINED +, 0, 0, 21, 21 } , + +154 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_ENB_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +155 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +156 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +159 +a¢_TYPE_memb”_t + + ga¢_MBR_ENB_ID_1 +[] = { + +160 { +ATF_NOFLAGS +, 0, +off£tof +( +ENB_ID +, +choiû +. +maüo_eNB_ID +), + +161 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +163 & +a¢_DEF_BIT_STRING +, + +165 { 0, & +a¢_PER_memb_maüo_eNB_ID_cÚ¡r_2 +, +memb_maüo_eNB_ID_cÚ¡¿št_1 + }, + +169 { +ATF_NOFLAGS +, 0, +off£tof +( +ENB_ID +, +choiû +. +home_eNB_ID +), + +170 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +172 & +a¢_DEF_BIT_STRING +, + +174 { 0, & +a¢_PER_memb_home_eNB_ID_cÚ¡r_3 +, +memb_home_eNB_ID_cÚ¡¿št_1 + }, + +178 { +ATF_NOFLAGS +, 0, +off£tof +( +ENB_ID +, +choiû +. +shÜt_Maüo_eNB_ID +), + +179 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +181 & +a¢_DEF_BIT_STRING +, + +183 { 0, & +a¢_PER_memb_shÜt_Maüo_eNB_ID_cÚ¡r_5 +, +memb_shÜt_Maüo_eNB_ID_cÚ¡¿št_1 + }, + +187 { +ATF_NOFLAGS +, 0, +off£tof +( +ENB_ID +, +choiû +. +lÚg_Maüo_eNB_ID +), + +188 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +190 & +a¢_DEF_BIT_STRING +, + +192 { 0, & +a¢_PER_memb_lÚg_Maüo_eNB_ID_cÚ¡r_6 +, +memb_lÚg_Maüo_eNB_ID_cÚ¡¿št_1 + }, + +197 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_ENB_ID_g2–_1 +[] = { + +198 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +199 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +200 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +201 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 } + +203 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_ENB_ID_¥ecs_1 + = { + +204 ( +ENB_ID +), + +205 +off£tof +( +ENB_ID +, +_a¢_ùx +), + +206 +off£tof +( +ENB_ID +, +´e£Á +), + +207 ((( +ENB_ID + *)0)-> +´e£Á +), + +208 +a¢_MAP_ENB_ID_g2–_1 +, + +213 +a¢_TYPE_desütÜ_t + + ga¢_DEF_ENB_ID + = { + +216 & +a¢_OP_CHOICE +, + +221 { 0, & +a¢_PER_ty³_ENB_ID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +222 +a¢_MBR_ENB_ID_1 +, + +224 & +a¢_SPC_ENB_ID_¥ecs_1 + + + @ENB-UE-X2AP-ID-Extension.c + +8  + ~"ENB-UE-X2AP-ID-Ex‹nsiÚ.h +" + +11 + $ENB_UE_X2AP_ID_Ex‹nsiÚ_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 4095)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_ENB_UE_X2AP_ID_Ex‹nsiÚ_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 12, 12, 0, 4095 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ_gs_1 +, + +52 ( +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ_gs_1 +) + +53 /( +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ_gs_1 +[0]), + +54 +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ_gs_1 +, + +55 ( +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ_gs_1 +) + +56 /( +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_ENB_UE_X2AP_ID_Ex‹nsiÚ_cÚ¡r_1 +, +ENB_UE_X2AP_ID_Ex‹nsiÚ_cÚ¡¿št + }, + + @ENB-UE-X2AP-ID.c + +8  + ~"ENB-UE-X2AP-ID.h +" + +11 + $ENB_UE_X2AP_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 4095)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_ENB_UE_X2AP_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED +, 12, 12, 0, 4095 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_ENB_UE_X2AP_ID_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_ENB_UE_X2AP_ID + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_ENB_UE_X2AP_ID_gs_1 +, + +52 ( +a¢_DEF_ENB_UE_X2AP_ID_gs_1 +) + +53 /( +a¢_DEF_ENB_UE_X2AP_ID_gs_1 +[0]), + +54 +a¢_DEF_ENB_UE_X2AP_ID_gs_1 +, + +55 ( +a¢_DEF_ENB_UE_X2AP_ID_gs_1 +) + +56 /( +a¢_DEF_ENB_UE_X2AP_ID_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_ENB_UE_X2AP_ID_cÚ¡r_1 +, +ENB_UE_X2AP_ID_cÚ¡¿št + }, + + @EUTRA-CGI.c + +8  + ~"EUTRA-CGI.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_EUTRA_CGI_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +EUTRA_CGI +, +pLMNId’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +EUTRA_CGI +, +eUTRAC–lId’t™y +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_EUTRAC–lId’t™y +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_EUTRA_CGI_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_EUTRA_CGI_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_EUTRA_CGI_¥ecs_1 + = { + +38 ( +EUTRA_CGI +), + +39 +off£tof +( +EUTRA_CGI +, +_a¢_ùx +), + +40 +a¢_MAP_EUTRA_CGI_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_EUTRA_CGI + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_EUTRA_CGI_gs_1 +, + +50 ( +a¢_DEF_EUTRA_CGI_gs_1 +) + +51 /( +a¢_DEF_EUTRA_CGI_gs_1 +[0]), + +52 +a¢_DEF_EUTRA_CGI_gs_1 +, + +53 ( +a¢_DEF_EUTRA_CGI_gs_1 +) + +54 /( +a¢_DEF_EUTRA_CGI_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_EUTRA_CGI_1 +, + +58 & +a¢_SPC_EUTRA_CGI_¥ecs_1 + + + @EUTRACellIdentity.c + +8  + ~"EUTRAC–lId’t™y.h +" + +11 + $EUTRAC–lId’t™y_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + == 28)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_EUTRAC–lId’t™y_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +47 { +APC_CONSTRAINED +, 0, 0, 28, 28 } , + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_EUTRAC–lId’t™y_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (3 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_EUTRAC–lId’t™y + = { + +56 & +a¢_OP_BIT_STRING +, + +57 +a¢_DEF_EUTRAC–lId’t™y_gs_1 +, + +58 ( +a¢_DEF_EUTRAC–lId’t™y_gs_1 +) + +59 /( +a¢_DEF_EUTRAC–lId’t™y_gs_1 +[0]), + +60 +a¢_DEF_EUTRAC–lId’t™y_gs_1 +, + +61 ( +a¢_DEF_EUTRAC–lId’t™y_gs_1 +) + +62 /( +a¢_DEF_EUTRAC–lId’t™y_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_EUTRAC–lId’t™y_cÚ¡r_1 +, +EUTRAC–lId’t™y_cÚ¡¿št + }, + +65 & +a¢_SPC_BIT_STRING_¥ecs + + + @FiveGS-TAC.c + +8  + ~"FiveGS-TAC.h +" + +11 + $FiveGS_TAC_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 3)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_FiveGS_TAC_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 3, 3 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_FiveGS_TAC_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_FiveGS_TAC + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_FiveGS_TAC_gs_1 +, + +53 ( +a¢_DEF_FiveGS_TAC_gs_1 +) + +54 /( +a¢_DEF_FiveGS_TAC_gs_1 +[0]), + +55 +a¢_DEF_FiveGS_TAC_gs_1 +, + +56 ( +a¢_DEF_FiveGS_TAC_gs_1 +) + +57 /( +a¢_DEF_FiveGS_TAC_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_FiveGS_TAC_cÚ¡r_1 +, +FiveGS_TAC_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @FiveQI.c + +8  + ~"FiveQI.h +" + +11 + $FiveQI_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 255)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_FiveQI_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 8, 8, 0, 255 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_FiveQI_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_FiveQI + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_FiveQI_gs_1 +, + +52 ( +a¢_DEF_FiveQI_gs_1 +) + +53 /( +a¢_DEF_FiveQI_gs_1 +[0]), + +54 +a¢_DEF_FiveQI_gs_1 +, + +55 ( +a¢_DEF_FiveQI_gs_1 +) + +56 /( +a¢_DEF_FiveQI_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_FiveQI_cÚ¡r_1 +, +FiveQI_cÚ¡¿št + }, + + @FreqBandNrItem.c + +8  + ~"F»qBªdNrI‹m.h +" + +11 + $memb_äeqBªdIndiÿtÜNr_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 1024)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +35  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_äeqBªdIndiÿtÜNr_cÚ¡r_2 + + gCC_NOTUSED + = { + +36 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 10, 10, 1, 1024 } , + +37 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +40  +a¢_TYPE_memb”_t + + ga¢_MBR_F»qBªdNrI‹m_1 +[] = { + +41 { +ATF_NOFLAGS +, 0, +off£tof +( +F»qBªdNrI‹m +, +äeqBªdIndiÿtÜNr +), + +42 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +44 & +a¢_DEF_N©iveIÁeg” +, + +46 { 0, & +a¢_PER_memb_äeqBªdIndiÿtÜNr_cÚ¡r_2 +, +memb_äeqBªdIndiÿtÜNr_cÚ¡¿št_1 + }, + +51 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_F»qBªdNrI‹m_gs_1 +[] = { + +52 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +54 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_F»qBªdNrI‹m_g2–_1 +[] = { + +55 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +57  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_F»qBªdNrI‹m_¥ecs_1 + = { + +58 ( +F»qBªdNrI‹m +), + +59 +off£tof +( +F»qBªdNrI‹m +, +_a¢_ùx +), + +60 +a¢_MAP_F»qBªdNrI‹m_g2–_1 +, + +65 +a¢_TYPE_desütÜ_t + + ga¢_DEF_F»qBªdNrI‹m + = { + +68 & +a¢_OP_SEQUENCE +, + +69 +a¢_DEF_F»qBªdNrI‹m_gs_1 +, + +70 ( +a¢_DEF_F»qBªdNrI‹m_gs_1 +) + +71 /( +a¢_DEF_F»qBªdNrI‹m_gs_1 +[0]), + +72 +a¢_DEF_F»qBªdNrI‹m_gs_1 +, + +73 ( +a¢_DEF_F»qBªdNrI‹m_gs_1 +) + +74 /( +a¢_DEF_F»qBªdNrI‹m_gs_1 +[0]), + +75 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +76 +a¢_MBR_F»qBªdNrI‹m_1 +, + +78 & +a¢_SPC_F»qBªdNrI‹m_¥ecs_1 + + + @GNB-CU-CP-UE-E1AP-ID.c + +8  + ~"GNB-CU-CP-UE-E1AP-ID.h +" + +11 + $GNB_CU_CP_UE_E1AP_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +14 if(! +¥Œ +) { + +15 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +17 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +24 + } +} + +30 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_GNB_CU_CP_UE_E1AP_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +31 { +APC_CONSTRAINED +, 32, -1, 0, 4294967295 } , + +32 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +35 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_GNB_CU_CP_UE_E1AP_ID_¥ecs_1 + = { + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_GNB_CU_CP_UE_E1AP_ID_gs_1 +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +43 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GNB_CU_CP_UE_E1AP_ID + = { + +46 & +a¢_OP_N©iveIÁeg” +, + +47 +a¢_DEF_GNB_CU_CP_UE_E1AP_ID_gs_1 +, + +48 ( +a¢_DEF_GNB_CU_CP_UE_E1AP_ID_gs_1 +) + +49 /( +a¢_DEF_GNB_CU_CP_UE_E1AP_ID_gs_1 +[0]), + +50 +a¢_DEF_GNB_CU_CP_UE_E1AP_ID_gs_1 +, + +51 ( +a¢_DEF_GNB_CU_CP_UE_E1AP_ID_gs_1 +) + +52 /( +a¢_DEF_GNB_CU_CP_UE_E1AP_ID_gs_1 +[0]), + +53 { 0, & +a¢_PER_ty³_GNB_CU_CP_UE_E1AP_ID_cÚ¡r_1 +, +GNB_CU_CP_UE_E1AP_ID_cÚ¡¿št + }, + +55 & +a¢_SPC_GNB_CU_CP_UE_E1AP_ID_¥ecs_1 + + + @GNB-CU-UE-F1AP-ID.c + +8  + ~"GNB-CU-UE-F1AP-ID.h +" + +11 + $GNB_CU_UE_F1AP_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +14 if(! +¥Œ +) { + +15 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +17 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +24 + } +} + +30 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_GNB_CU_UE_F1AP_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +31 { +APC_CONSTRAINED +, 32, -1, 0, 4294967295 } , + +32 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +35 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_GNB_CU_UE_F1AP_ID_¥ecs_1 + = { + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_GNB_CU_UE_F1AP_ID_gs_1 +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +43 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GNB_CU_UE_F1AP_ID + = { + +46 & +a¢_OP_N©iveIÁeg” +, + +47 +a¢_DEF_GNB_CU_UE_F1AP_ID_gs_1 +, + +48 ( +a¢_DEF_GNB_CU_UE_F1AP_ID_gs_1 +) + +49 /( +a¢_DEF_GNB_CU_UE_F1AP_ID_gs_1 +[0]), + +50 +a¢_DEF_GNB_CU_UE_F1AP_ID_gs_1 +, + +51 ( +a¢_DEF_GNB_CU_UE_F1AP_ID_gs_1 +) + +52 /( +a¢_DEF_GNB_CU_UE_F1AP_ID_gs_1 +[0]), + +53 { 0, & +a¢_PER_ty³_GNB_CU_UE_F1AP_ID_cÚ¡r_1 +, +GNB_CU_UE_F1AP_ID_cÚ¡¿št + }, + +55 & +a¢_SPC_GNB_CU_UE_F1AP_ID_¥ecs_1 + + + @GNB-CU-UP-ID.c + +8  + ~"GNB-CU-UP-ID.h +" + +11 + $GNB_CU_UP_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +14  +v®ue +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)) { + +24 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +26 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +30 if(( +v®ue + >= 0 && value <= 68719476735)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_GNB_CU_UP_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_CONSTRAINED +, 36, -1, 0, 68719476735 } , + +47 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_GNB_CU_UP_ID_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GNB_CU_UP_ID + = { + +56 & +a¢_OP_INTEGER +, + +57 +a¢_DEF_GNB_CU_UP_ID_gs_1 +, + +58 ( +a¢_DEF_GNB_CU_UP_ID_gs_1 +) + +59 /( +a¢_DEF_GNB_CU_UP_ID_gs_1 +[0]), + +60 +a¢_DEF_GNB_CU_UP_ID_gs_1 +, + +61 ( +a¢_DEF_GNB_CU_UP_ID_gs_1 +) + +62 /( +a¢_DEF_GNB_CU_UP_ID_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_GNB_CU_UP_ID_cÚ¡r_1 +, +GNB_CU_UP_ID_cÚ¡¿št + }, + + @GNB-DU-ID.c + +8  + ~"GNB-DU-ID.h +" + +11 + $GNB_DU_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +14  +v®ue +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)) { + +24 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +26 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +30 if(( +v®ue + >= 0 && value <= 68719476735)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_GNB_DU_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_CONSTRAINED +, 36, -1, 0, 68719476735 } , + +47 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_GNB_DU_ID_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GNB_DU_ID + = { + +56 & +a¢_OP_INTEGER +, + +57 +a¢_DEF_GNB_DU_ID_gs_1 +, + +58 ( +a¢_DEF_GNB_DU_ID_gs_1 +) + +59 /( +a¢_DEF_GNB_DU_ID_gs_1 +[0]), + +60 +a¢_DEF_GNB_DU_ID_gs_1 +, + +61 ( +a¢_DEF_GNB_DU_ID_gs_1 +) + +62 /( +a¢_DEF_GNB_DU_ID_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_GNB_DU_ID_cÚ¡r_1 +, +GNB_DU_ID_cÚ¡¿št + }, + + @GNB-ID.c + +8  + ~"GNB-ID.h +" + +11 + $memb_gNB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + >= 22 && size <= 32)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +41  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_gNB_ID_cÚ¡r_2 + + gCC_NOTUSED + = { + +42 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +43 { +APC_CONSTRAINED +, 4, 4, 22, 32 } , + +46 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_GNB_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +47 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +48 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +51 +a¢_TYPE_memb”_t + + ga¢_MBR_GNB_ID_1 +[] = { + +52 { +ATF_NOFLAGS +, 0, +off£tof +( +GNB_ID +, +choiû +. +gNB_ID +), + +53 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +55 & +a¢_DEF_BIT_STRING +, + +57 { 0, & +a¢_PER_memb_gNB_ID_cÚ¡r_2 +, +memb_gNB_ID_cÚ¡¿št_1 + }, + +62 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_GNB_ID_g2–_1 +[] = { + +63 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +65 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_GNB_ID_¥ecs_1 + = { + +66 ( +GNB_ID +), + +67 +off£tof +( +GNB_ID +, +_a¢_ùx +), + +68 +off£tof +( +GNB_ID +, +´e£Á +), + +69 ((( +GNB_ID + *)0)-> +´e£Á +), + +70 +a¢_MAP_GNB_ID_g2–_1 +, + +75 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GNB_ID + = { + +78 & +a¢_OP_CHOICE +, + +83 { 0, & +a¢_PER_ty³_GNB_ID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +84 +a¢_MBR_GNB_ID_1 +, + +86 & +a¢_SPC_GNB_ID_¥ecs_1 + + + @GUAMI.c + +8  + ~"GUAMI.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_GUAMI_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +GUAMI +, +pLMNId’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +GUAMI +, +aMFRegiÚID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_AMFRegiÚID +, + +29 { +ATF_NOFLAGS +, 0, +off£tof +( +GUAMI +, +aMFS‘ID +), + +30 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +32 & +a¢_DEF_AMFS‘ID +, + +38 { +ATF_NOFLAGS +, 0, +off£tof +( +GUAMI +, +aMFPoš‹r +), + +39 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +41 & +a¢_DEF_AMFPoš‹r +, + +48 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_GUAMI_gs_1 +[] = { + +49 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +51 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_GUAMI_g2–_1 +[] = { + +52 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +53 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +54 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +55 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 } + +57 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_GUAMI_¥ecs_1 + = { + +58 ( +GUAMI +), + +59 +off£tof +( +GUAMI +, +_a¢_ùx +), + +60 +a¢_MAP_GUAMI_g2–_1 +, + +65 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GUAMI + = { + +68 & +a¢_OP_SEQUENCE +, + +69 +a¢_DEF_GUAMI_gs_1 +, + +70 ( +a¢_DEF_GUAMI_gs_1 +) + +71 /( +a¢_DEF_GUAMI_gs_1 +[0]), + +72 +a¢_DEF_GUAMI_gs_1 +, + +73 ( +a¢_DEF_GUAMI_gs_1 +) + +74 /( +a¢_DEF_GUAMI_gs_1 +[0]), + +75 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +76 +a¢_MBR_GUAMI_1 +, + +78 & +a¢_SPC_GUAMI_¥ecs_1 + + + @GUMMEI.c + +8  + ~"GUMMEI.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_GUMMEI_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +GUMMEI +, +pLMN_Id’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +GUMMEI +, +mME_Group_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_MME_Group_ID +, + +29 { +ATF_NOFLAGS +, 0, +off£tof +( +GUMMEI +, +mME_Code +), + +30 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +32 & +a¢_DEF_MME_Code +, + +39 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_GUMMEI_gs_1 +[] = { + +40 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +42 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_GUMMEI_g2–_1 +[] = { + +43 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +44 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +47 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_GUMMEI_¥ecs_1 + = { + +48 ( +GUMMEI +), + +49 +off£tof +( +GUMMEI +, +_a¢_ùx +), + +50 +a¢_MAP_GUMMEI_g2–_1 +, + +55 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GUMMEI + = { + +58 & +a¢_OP_SEQUENCE +, + +59 +a¢_DEF_GUMMEI_gs_1 +, + +60 ( +a¢_DEF_GUMMEI_gs_1 +) + +61 /( +a¢_DEF_GUMMEI_gs_1 +[0]), + +62 +a¢_DEF_GUMMEI_gs_1 +, + +63 ( +a¢_DEF_GUMMEI_gs_1 +) + +64 /( +a¢_DEF_GUMMEI_gs_1 +[0]), + +65 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +66 +a¢_MBR_GUMMEI_1 +, + +68 & +a¢_SPC_GUMMEI_¥ecs_1 + + + @GlobalENB-ID.c + +8  + ~"Glob®ENB-ID.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_Glob®ENB_ID_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®ENB_ID +, +pLMNId’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®ENB_ID +, +eNB_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_ENB_ID +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Glob®ENB_ID_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Glob®ENB_ID_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_Glob®ENB_ID_¥ecs_1 + = { + +38 ( +Glob®ENB_ID +), + +39 +off£tof +( +Glob®ENB_ID +, +_a¢_ùx +), + +40 +a¢_MAP_Glob®ENB_ID_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Glob®ENB_ID + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_Glob®ENB_ID_gs_1 +, + +50 ( +a¢_DEF_Glob®ENB_ID_gs_1 +) + +51 /( +a¢_DEF_Glob®ENB_ID_gs_1 +[0]), + +52 +a¢_DEF_Glob®ENB_ID_gs_1 +, + +53 ( +a¢_DEF_Glob®ENB_ID_gs_1 +) + +54 /( +a¢_DEF_Glob®ENB_ID_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_Glob®ENB_ID_1 +, + +58 & +a¢_SPC_Glob®ENB_ID_¥ecs_1 + + + @GlobalGNB-ID.c + +8  + ~"Glob®GNB-ID.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_Glob®GNB_ID_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®GNB_ID +, +pLMNId’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®GNB_ID +, +gNB_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_GNB_ID +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Glob®GNB_ID_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Glob®GNB_ID_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_Glob®GNB_ID_¥ecs_1 + = { + +38 ( +Glob®GNB_ID +), + +39 +off£tof +( +Glob®GNB_ID +, +_a¢_ùx +), + +40 +a¢_MAP_Glob®GNB_ID_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Glob®GNB_ID + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_Glob®GNB_ID_gs_1 +, + +50 ( +a¢_DEF_Glob®GNB_ID_gs_1 +) + +51 /( +a¢_DEF_Glob®GNB_ID_gs_1 +[0]), + +52 +a¢_DEF_Glob®GNB_ID_gs_1 +, + +53 ( +a¢_DEF_Glob®GNB_ID_gs_1 +) + +54 /( +a¢_DEF_Glob®GNB_ID_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_Glob®GNB_ID_1 +, + +58 & +a¢_SPC_Glob®GNB_ID_¥ecs_1 + + + @GlobalNGRANNodeID.c + +8  + ~"Glob®NGRANNodeID.h +" + +10  + ~"Glob®GNB-ID.h +" + +11  + ~"Glob®NgENB-ID.h +" + +12 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_Glob®NGRANNodeID_cÚ¡r_1 + + gCC_NOTUSED + = { + +13 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +14 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +17 +a¢_TYPE_memb”_t + + ga¢_MBR_Glob®NGRANNodeID_1 +[] = { + +18 { +ATF_POINTER +, 0, +off£tof +( +Glob®NGRANNodeID +, +choiû +. +gNB +), + +19 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +21 & +a¢_DEF_Glob®GNB_ID +, + +27 { +ATF_POINTER +, 0, +off£tof +( +Glob®NGRANNodeID +, +choiû +. +ng_eNB +), + +28 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +30 & +a¢_DEF_Glob®NgENB_ID +, + +37 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Glob®NGRANNodeID_g2–_1 +[] = { + +38 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +39 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +41 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_Glob®NGRANNodeID_¥ecs_1 + = { + +42 ( +Glob®NGRANNodeID +), + +43 +off£tof +( +Glob®NGRANNodeID +, +_a¢_ùx +), + +44 +off£tof +( +Glob®NGRANNodeID +, +´e£Á +), + +45 ((( +Glob®NGRANNodeID + *)0)-> +´e£Á +), + +46 +a¢_MAP_Glob®NGRANNodeID_g2–_1 +, + +51 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Glob®NGRANNodeID + = { + +54 & +a¢_OP_CHOICE +, + +59 { 0, & +a¢_PER_ty³_Glob®NGRANNodeID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +60 +a¢_MBR_Glob®NGRANNodeID_1 +, + +62 & +a¢_SPC_Glob®NGRANNodeID_¥ecs_1 + + + @GlobalNgENB-ID.c + +8  + ~"Glob®NgENB-ID.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_Glob®NgENB_ID_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®NgENB_ID +, +pLMNId’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®NgENB_ID +, +ngENB_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_NgENB_ID +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Glob®NgENB_ID_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Glob®NgENB_ID_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_Glob®NgENB_ID_¥ecs_1 + = { + +38 ( +Glob®NgENB_ID +), + +39 +off£tof +( +Glob®NgENB_ID +, +_a¢_ùx +), + +40 +a¢_MAP_Glob®NgENB_ID_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Glob®NgENB_ID + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_Glob®NgENB_ID_gs_1 +, + +50 ( +a¢_DEF_Glob®NgENB_ID_gs_1 +) + +51 /( +a¢_DEF_Glob®NgENB_ID_gs_1 +[0]), + +52 +a¢_DEF_Glob®NgENB_ID_gs_1 +, + +53 ( +a¢_DEF_Glob®NgENB_ID_gs_1 +) + +54 /( +a¢_DEF_Glob®NgENB_ID_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_Glob®NgENB_ID_1 +, + +58 & +a¢_SPC_Glob®NgENB_ID_¥ecs_1 + + + @GlobalenGNB-ID.c + +8  + ~"Glob®’GNB-ID.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_Glob®’GNB_ID_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®’GNB_ID +, +pLMN_Id’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +Glob®’GNB_ID +, +’_gNB_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_EN_GNB_ID +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Glob®’GNB_ID_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Glob®’GNB_ID_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_Glob®’GNB_ID_¥ecs_1 + = { + +38 ( +Glob®’GNB_ID +), + +39 +off£tof +( +Glob®’GNB_ID +, +_a¢_ùx +), + +40 +a¢_MAP_Glob®’GNB_ID_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Glob®’GNB_ID + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_Glob®’GNB_ID_gs_1 +, + +50 ( +a¢_DEF_Glob®’GNB_ID_gs_1 +) + +51 /( +a¢_DEF_Glob®’GNB_ID_gs_1 +[0]), + +52 +a¢_DEF_Glob®’GNB_ID_gs_1 +, + +53 ( +a¢_DEF_Glob®’GNB_ID_gs_1 +) + +54 /( +a¢_DEF_Glob®’GNB_ID_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_Glob®’GNB_ID_1 +, + +58 & +a¢_SPC_Glob®’GNB_ID_¥ecs_1 + + + @GranularityPeriod.c + +8  + ~"G¿nuÏr™yP”iod.h +" + +11 + $G¿nuÏr™yP”iod_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 4294967295)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_G¿nuÏr™yP”iod_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED +, 32, -1, 1, 4294967295 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_G¿nuÏr™yP”iod_¥ecs_1 + = { + +49 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_G¿nuÏr™yP”iod_gs_1 +[] = { + +50 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +52 +a¢_TYPE_desütÜ_t + + ga¢_DEF_G¿nuÏr™yP”iod + = { + +55 & +a¢_OP_N©iveIÁeg” +, + +56 +a¢_DEF_G¿nuÏr™yP”iod_gs_1 +, + +57 ( +a¢_DEF_G¿nuÏr™yP”iod_gs_1 +) + +58 /( +a¢_DEF_G¿nuÏr™yP”iod_gs_1 +[0]), + +59 +a¢_DEF_G¿nuÏr™yP”iod_gs_1 +, + +60 ( +a¢_DEF_G¿nuÏr™yP”iod_gs_1 +) + +61 /( +a¢_DEF_G¿nuÏr™yP”iod_gs_1 +[0]), + +62 { 0, & +a¢_PER_ty³_G¿nuÏr™yP”iod_cÚ¡r_1 +, +G¿nuÏr™yP”iod_cÚ¡¿št + }, + +64 & +a¢_SPC_G¿nuÏr™yP”iod_¥ecs_1 + + + @GroupID.c + +8  + ~"GroupID.h +" + +10  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_GroupID_cÚ¡r_1 + + gCC_NOTUSED + = { + +11 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +15  +a¢_TYPE_memb”_t + + ga¢_MBR_GroupID_1 +[] = { + +16 { +ATF_NOFLAGS +, 0, +off£tof +( +GroupID +, +choiû +. +fiveGC +), + +17 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +19 & +a¢_DEF_FiveQI +, + +25 { +ATF_NOFLAGS +, 0, +off£tof +( +GroupID +, +choiû +. +ePC +), + +26 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +28 & +a¢_DEF_QCI +, + +35 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_GroupID_g2–_1 +[] = { + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +37 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +39  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_GroupID_¥ecs_1 + = { + +40 ( +GroupID +), + +41 +off£tof +( +GroupID +, +_a¢_ùx +), + +42 +off£tof +( +GroupID +, +´e£Á +), + +43 ((( +GroupID + *)0)-> +´e£Á +), + +44 +a¢_MAP_GroupID_g2–_1 +, + +49 +a¢_TYPE_desütÜ_t + + ga¢_DEF_GroupID + = { + +52 & +a¢_OP_CHOICE +, + +57 { 0, & +a¢_PER_ty³_GroupID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +58 +a¢_MBR_GroupID_1 +, + +60 & +a¢_SPC_GroupID_¥ecs_1 + + + @INTEGER.c + +6  + ~ + +7  + ~ + +8  + ~ + +9  + ~<”ºo.h +> + +14 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_INTEGER_gs +[] = { + +15 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +17 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_INTEGER + = { + +18 +INTEGER_ä“ +, + +19 +INTEGER_´št +, + +20 +INTEGER_com·» +, + +21 +b”_decode_´im™ive +, + +22 +INTEGER_’code_d” +, + +23 +INTEGER_decode_x” +, + +24 +INTEGER_’code_x” +, + +25 #ifdeà +ASN_DISABLE_OER_SUPPORT + + +29 +INTEGER_decode_Ûr +, + +30 +INTEGER_’code_Ûr +, + +32 #ifdef +ASN_DISABLE_PER_SUPPORT + + +38 +INTEGER_decode_u³r +, + +39 +INTEGER_’code_u³r +, + +40 +INTEGER_decode_­” +, + +41 +INTEGER_’code_­” +, + +43 +INTEGER_¿ndom_fžl +, + +46 +a¢_TYPE_desütÜ_t + + ga¢_DEF_INTEGER + = { + +49 & +a¢_OP_INTEGER +, + +50 +a¢_DEF_INTEGER_gs +, + +51 ( +a¢_DEF_INTEGER_gs +) / (asn_DEF_INTEGER_tags[0]), + +52 +a¢_DEF_INTEGER_gs +, + +53 ( +a¢_DEF_INTEGER_gs +) / (asn_DEF_INTEGER_tags[0]), + +54 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +62 +a¢_’c_rv®_t + + +63 + $INTEGER_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +64  +g_mode +, +b”_Žv_g_t + +g +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +65 * +­p_key +) { + +66 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +67 +a¢_’c_rv®_t + +rv® +; + +68 +INTEGER_t + +efãùive_š‹g” +; + +70 + `ASN_DEBUG +("%s %s‡s INTEGER (tm=%d)", + +71 +cb +?"Encodšg":"E¡im©šg", +td +-> +Çme +, +g_mode +); + +77 if( +¡ +-> +buf +) { + +78 +ušt8_t + * +buf + = +¡ +->buf; + +79 +ušt8_t + * +’d1 + = +buf + + +¡ +-> +size + - 1; + +80  +shiá +; + +83 ; +buf + < +’d1 +; buf++) { + +91 * +buf +) { + +92 0x00: if(( +buf +[1] & 0x80) == 0) + +95 0xff: if(( +buf +[1] & 0x80)) + +103 +shiá + = +buf + - +¡ +->buf; + +104 if( +shiá +) { + +106 cÚ¡ +ušt8_t + * +c_buf +; + +107 +ušt8_t + * +nc_buf +; + +108 } +uncÚ¡ +; + +109 +uncÚ¡ +. +c_buf + = +¡ +-> +buf +; + +110 +efãùive_š‹g” +. +buf + = +uncÚ¡ +. +nc_buf + + +shiá +; + +111 +efãùive_š‹g” +. +size + = +¡ +->siz- +shiá +; + +113 +¡ + = & +efãùive_š‹g” +; + +117 +rv® + = + `d”_’code_´im™ive +( +td +, +¡ +, +g_mode +, +g +, +cb +, +­p_key +); + +118 if( +rv® +. +¡ruùu»_±r + =ð& +efãùive_š‹g” +) { + +119 +rv® +. +¡ruùu»_±r + = +¥Œ +; + +121  +rv® +; + +122 + } +} + +124 cÚ¡ +a¢_INTEGER_’um_m­_t + * +INTEGER_m­_’um2v®ue +( + +125 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs +, cÚ¡ * +l¡¬t +, + +126 cÚ¡ * +l¡Ý +); + +131  +ssize_t + + +132 + $INTEGER__dump +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ +INTEGER_t + * +¡ +, +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +,  +¶ašOrXER +) { + +133 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +134 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +135  +sü©ch +[32]; + +136 +ušt8_t + * +buf + = +¡ +->buf; + +137 +ušt8_t + * +buf_’d + = +¡ +-> +buf + + st-> +size +; + +138 +štmax_t + +v®ue +; + +139 +ssize_t + +wrÙe + = 0; + +140 * +p +; + +141  +»t +; + +143 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) + +144 +»t + = + `a¢_INTEGER2umax +( +¡ +, ( +uštmax_t + *)& +v®ue +); + +146 +»t + = + `a¢_INTEGER2imax +( +¡ +, & +v®ue +); + +149 if( +»t + == 0) { + +150 cÚ¡ +a¢_INTEGER_’um_m­_t + * +– +; + +151 +– + = ( +v®ue + >ð0 || ! +¥ecs + || !¥ecs-> +f›ld_unsigÃd +) + +152 ? + `INTEGER_m­_v®ue2’um +( +¥ecs +, +v®ue +) : 0; + +153 if( +– +) { + +154 if( +¶ašOrXER + == 0) + +155  + `a¢__fÜm©_to_ÿÎback +( +cb +, +­p_key +, + +156 "%" +ASN_PRIdMAX + " (%s)", +v®ue +, +– +-> +’um_Çme +); + +158  + `a¢__fÜm©_to_ÿÎback +( +cb +, +­p_key +, + +159 "<%s/>", +– +-> +’um_Çme +); + +160 } if( +¶ašOrXER + && +¥ecs + && s³cs-> +¡riù_’um”©iÚ +) { + +161 + `ASN_DEBUG +("ASN.1 forbids dealing with " + +163 +”ºo + = +EPERM +; + +166  + `a¢__fÜm©_to_ÿÎback +( +cb +, +­p_key +, + +167 ( +¥ecs + && s³cs-> +f›ld_unsigÃd +) + +168 ? "%" +ASN_PRIuMAX + + +169 : "%" +ASN_PRIdMAX +, + +170 +v®ue +); + +172 } if( +¶ašOrXER + && +¥ecs + && s³cs-> +¡riù_’um”©iÚ +) { + +177 + `ASN_DEBUG +("ASN.1 forbids dealing with " + +179 +”ºo + = +EPERM +; + +185  +p + = +sü©ch +; +buf + < +buf_’d +; buf++) { + +186 cÚ¡ * cÚ¡ +h2c + = "0123456789ABCDEF"; + +187 if(( +p + - +sü©ch +è>ð( +ssize_t +)((scratch) - 4)) { + +189 if( + `cb +( +sü©ch +, +p + - sü©ch, +­p_key +) < 0) + +191 +wrÙe + +ð +p + - +sü©ch +; + +192 +p + = +sü©ch +; + +194 * +p +++ = +h2c +[* +buf + >> 4]; + +195 * +p +++ = +h2c +[* +buf + & 0x0F]; + +196 * +p +++ = 0x3a; + +198 if( +p + !ð +sü©ch +) + +199 +p +--; + +201 +wrÙe + +ð +p + - +sü©ch +; + +202  ( + `cb +( +sü©ch +, +p + - sü©ch, +­p_key +è< 0è? -1 : +wrÙe +; + +203 + } +} + +209 + $INTEGER_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +210 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +211 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +212 +ssize_t + +»t +; + +214 () +žev– +; + +216 if(! +¡ + || !¡-> +buf +) + +217 +»t + = + `cb +("", 8, +­p_key +); + +219 +»t + = + `INTEGER__dump +( +td +, +¡ +, +cb +, +­p_key +, 0); + +221  ( +»t + < 0) ? -1 : 0; + +222 + } +} + +224  + se2v_key + { + +225 cÚ¡ * + m¡¬t +; + +226 cÚ¡ * + m¡Ý +; + +227 cÚ¡ +a¢_INTEGER_’um_m­_t + * + mvem­ +; + +228 cÚ¡ * + mevm­ +; + +231 + $INTEGER__com·r_’um2v®ue +(cÚ¡ * +kp +, cÚ¡ * +am +) { + +232 cÚ¡  +e2v_key + * +key + = (cÚ¡ e2v_key *) +kp +; + +233 cÚ¡ +a¢_INTEGER_’um_m­_t + * +– + = (cÚ¡‡¢_INTEGER_’um_m­_ˆ*) +am +; + +234 cÚ¡ * +±r +, * +’d +, * +Çme +; + +237 +– + = +key +-> +vem­ + + key-> +evm­ +[el - key->vemap]; + +240  +±r + = +key +-> +¡¬t +, +’d + = key-> +¡Ý +, +Çme + = +– +-> +’um_Çme +; + +241 +±r + < +’d +;…Œ++, +Çme +++) { + +242 if(* +±r + !ð* +Çme + || !*name) + +243  *(cÚ¡ *) +±r + + +244 - *(cÚ¡ *) +Çme +; + +246  +Çme +[0] ? -1 : 0; + +247 + } +} + +249 cÚ¡ +a¢_INTEGER_’um_m­_t + * + +250 + $INTEGER_m­_’um2v®ue +(cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs +, cÚ¡ * +l¡¬t +, + +251 cÚ¡ * +l¡Ý +) { + +252 cÚ¡ +a¢_INTEGER_’um_m­_t + * +–_found +; + +253  +couÁ + = +¥ecs + ? s³cs-> +m­_couÁ + : 0; + +254  +e2v_key + +key +; + +255 cÚ¡ * +Í +; + +257 if(! +couÁ +è +NULL +; + +261  +l¡¬t +++, +Í + =†¡¬t;†°< +l¡Ý +;†p++) { + +262 * +Í +) { + +271 if( +Í + =ð +l¡Ý +è +NULL +; + +272 +l¡Ý + = +Í +; + +274 +key +. +¡¬t + = +l¡¬t +; + +275 +key +. +¡Ý + = +l¡Ý +; + +276 +key +. +vem­ + = +¥ecs +-> +v®ue2’um +; + +277 +key +. +evm­ + = +¥ecs +-> +’um2v®ue +; + +278 +–_found + = ( +a¢_INTEGER_’um_m­_t + *) + `b£¬ch +(& +key +, + +279 +¥ecs +-> +v®ue2’um +, +couÁ +, (specs->value2enum[0]), + +280 +INTEGER__com·r_’um2v®ue +); + +281 if( +–_found +) { + +283 +–_found + = +key +. +vem­ + + key. +evm­ +[el_found - key.vemap]; + +285  +–_found +; + +286 + } +} + +289 + $INTEGER__com·r_v®ue2’um +(cÚ¡ * +kp +, cÚ¡ * +am +) { + +290  +a + = *(cÚ¡ *) +kp +; + +291 cÚ¡ +a¢_INTEGER_’um_m­_t + * +– + = (cÚ¡‡¢_INTEGER_’um_m­_ˆ*) +am +; + +292  +b + = +– +-> +Çt_v®ue +; + +293 if( +a + < +b +)  -1; + +294 if( +a + =ð +b +)  0; + +296 + } +} + +298 cÚ¡ +a¢_INTEGER_’um_m­_t + * + +299 + $INTEGER_m­_v®ue2’um +(cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs +,  +v®ue +) { + +300  +couÁ + = +¥ecs + ? s³cs-> +m­_couÁ + : 0; + +301 if(! +couÁ +)  0; + +302  ( +a¢_INTEGER_’um_m­_t + *) + `b£¬ch +(& +v®ue +, +¥ecs +-> +v®ue2’um +, + +303 +couÁ +, ( +¥ecs +-> +v®ue2’um +[0]), + +304 +INTEGER__com·r_v®ue2’um +); + +305 + } +} + +308 + $INTEGER_¡_´—Îoc +( +INTEGER_t + * +¡ +,  +mš_size +) { + +309 * +p + = + `MALLOC +( +mš_size + + 1); + +310 if( +p +) { + +311 * +b + = +¡ +-> +buf +; + +312 +¡ +-> +size + = 0; + +313 +¡ +-> +buf + = +p +; + +314 + `FREEMEM +( +b +); + +319 + } +} + +324  +x”_pbd_rv® + + +325 + $INTEGER__x”_body_decode +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +326 cÚ¡ * +chunk_buf +, +size_t + +chunk_size +) { + +327 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +328 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +329 +INTEGER_t + * +¡ + = (INTEGER_ˆ*) +¥Œ +; + +330 +štmax_t + +dec_v®ue +; + +331 +štmax_t + +hex_v®ue + = 0; + +332 cÚ¡ * +Í +; + +333 cÚ¡ * +l¡¬t + = (cÚ¡ *) +chunk_buf +; + +334 cÚ¡ * +l¡Ý + = +l¡¬t + + +chunk_size +; + +336 +ST_LEADSPACE +, + +337 +ST_SKIPSPHEX +, + +338 +ST_WAITDIGITS +, + +339 +ST_DIGITS +, + +340 +ST_DIGITS_TRAILSPACE +, + +341 +ST_HEXDIGIT1 +, + +342 +ST_HEXDIGIT2 +, + +343 +ST_HEXDIGITS_TRAILSPACE +, + +344 +ST_HEXCOLON +, + +345 +ST_END_ENUM +, + +346 +ST_UNEXPECTED + + +347 } +¡©e + = +ST_LEADSPACE +; + +348 cÚ¡ * +dec_v®ue_¡¬t + = 0; + +349 cÚ¡ * +dec_v®ue_’d + = 0; + +351 if( +chunk_size +) + +352 + `ASN_DEBUG +("INTEGER body %ld 0x%2x..0x%2x", + +353 () +chunk_size +, * +l¡¬t +, +l¡Ý +[-1]); + +355 if( + `INTEGER_¡_´—Îoc +( +¡ +, ( +chunk_size +/3) + 1)) + +356  +XPBD_SYSTEM_FAILURE +; + +362  +Í + = +l¡¬t +;†°< +l¡Ý +;†p++) { + +363  +lv + = * +Í +; + +364  +lv +) { + +366  +¡©e +) { + +367  +ST_LEADSPACE +: + +368  +ST_DIGITS_TRAILSPACE +: + +369  +ST_HEXDIGITS_TRAILSPACE +: + +370  +ST_SKIPSPHEX +: + +372  +ST_DIGITS +: + +373 +dec_v®ue_’d + = +Í +; + +374 +¡©e + = +ST_DIGITS_TRAILSPACE +; + +376  +ST_HEXCOLON +: + +377 +¡©e + = +ST_HEXDIGITS_TRAILSPACE +; + +384 if( +¡©e + =ð +ST_LEADSPACE +) { + +385 +dec_v®ue + = 0; + +386 +dec_v®ue_¡¬t + = +Í +; + +387 +¡©e + = +ST_WAITDIGITS +; + +392 if( +¡©e + =ð +ST_LEADSPACE +) { + +393 +dec_v®ue + = 0; + +394 +dec_v®ue_¡¬t + = +Í +; + +395 +¡©e + = +ST_WAITDIGITS +; + +401  +¡©e +) { + +402  +ST_DIGITS +: ; + +403  +ST_SKIPSPHEX +: + +404  +ST_HEXDIGIT1 +: + +405 +hex_v®ue + = ( +lv + - 0x30) << 4; + +406 +¡©e + = +ST_HEXDIGIT2 +; + +408  +ST_HEXDIGIT2 +: + +409 +hex_v®ue + +ð( +lv + - 0x30); + +410 +¡©e + = +ST_HEXCOLON +; + +411 +¡ +-> +buf +[¡-> +size +++] = ( +ušt8_t +) +hex_v®ue +; + +413  +ST_HEXCOLON +: + +414  +XPBD_BROKEN_ENCODING +; + +415  +ST_LEADSPACE +: + +416 +dec_v®ue + = 0; + +417 +dec_v®ue_¡¬t + = +Í +; + +419  +ST_WAITDIGITS +: + +420 +¡©e + = +ST_DIGITS +; + +427 if( +¡©e + =ð +ST_LEADSPACE +) { + +428 cÚ¡ +a¢_INTEGER_’um_m­_t + * +– +; + +429 +– + = + `INTEGER_m­_’um2v®ue +( + +430 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) + +431 +td +-> +¥ecifics +, +l¡¬t +, +l¡Ý +); + +432 if( +– +) { + +433 + `ASN_DEBUG +("Found \"%s\" => %ld", + +434 +– +-> +’um_Çme +,ƒl-> +Çt_v®ue +); + +435 +dec_v®ue + = +– +-> +Çt_v®ue +; + +436 +¡©e + = +ST_END_ENUM +; + +437 +Í + = +l¡Ý + - 1; + +440 + `ASN_DEBUG +("Unknown identifier for INTEGER"); + +442  +XPBD_BROKEN_ENCODING +; + +444 if( +¡©e + =ð +ST_HEXCOLON +) { + +446 +¡©e + = +ST_HEXDIGIT1 +; + +448 } if( +¡©e + =ð +ST_DIGITS +) { + +453 + `ASN_DEBUG +("INTEGER„e-evaluate‡s hex form"); + +454 +¡©e + = +ST_SKIPSPHEX +; + +455 +dec_v®ue_¡¬t + = 0; + +456 +Í + = +l¡¬t + - 1; + +459 + `ASN_DEBUG +("¡©%d‡ˆ%ld", +¡©e +, ()( +Í + - +l¡¬t +)); + +465  +¡©e +) { + +466  +ST_SKIPSPHEX +: + +467  +ST_LEADSPACE +: + +468  +ST_HEXDIGIT1 +: + +469 +hex_v®ue + = +lv + - ((lv < 0x61) ? 0x41 : 0x61); + +470 +hex_v®ue + += 10; + +471 +hex_v®ue + <<= 4; + +472 +¡©e + = +ST_HEXDIGIT2 +; + +474  +ST_HEXDIGIT2 +: + +475 +hex_v®ue + +ð +lv + - ((lv < 0x61) ? 0x41 : 0x61); + +476 +hex_v®ue + += 10; + +477 +¡ +-> +buf +[¡-> +size +++] = ( +ušt8_t +) +hex_v®ue +; + +478 +¡©e + = +ST_HEXCOLON +; + +480  +ST_DIGITS +: + +481 + `ASN_DEBUG +("INTEGER„e-evaluate‡s hex form"); + +482 +¡©e + = +ST_SKIPSPHEX +; + +483 +dec_v®ue_¡¬t + = 0; + +484 +Í + = +l¡¬t + - 1; + +493 + `ASN_DEBUG +("INTEGER :: Found‚on-numeric 0x%2x‡t %ld", + +494 +lv +, ()( +Í + - +l¡¬t +)); + +495 +¡©e + = +ST_UNEXPECTED +; + +499  +¡©e +) { + +500  +ST_END_ENUM +: + +503  +ST_DIGITS +: + +504 +dec_v®ue_’d + = +l¡Ý +; + +506  +ST_DIGITS_TRAILSPACE +: + +508  + `a¢_¡¹oimax_lim +( +dec_v®ue_¡¬t +, & +dec_v®ue_’d +, & +dec_v®ue +)) { + +509  +ASN_STRTOX_OK +: + +510 if( +¥ecs + && s³cs-> +f›ld_unsigÃd + && ( +uštmax_t +è +dec_v®ue + <ð +ULONG_MAX +) { + +512 } if( +dec_v®ue + >ð +LONG_MIN + && dec_v®u<ð +LONG_MAX +) { + +519 + `ASN_DEBUG +("INTEGERƒxceeds†ong„ange"); + +522  +ASN_STRTOX_ERROR_RANGE +: + +523 + `ASN_DEBUG +("INTEGER decod% h™„ªglim™", +td +-> +Çme +); + +524  +XPBD_DECODER_LIMIT +; + +525  +ASN_STRTOX_ERROR_INVAL +: + +526  +ASN_STRTOX_EXPECT_MORE +: + +527  +ASN_STRTOX_EXTRA_DATA +: + +528  +XPBD_BROKEN_ENCODING +; + +531  +ST_HEXCOLON +: + +532  +ST_HEXDIGITS_TRAILSPACE +: + +533 +¡ +-> +buf +[¡-> +size +] = 0; + +534  +XPBD_BODY_CONSUMED +; + +535  +ST_HEXDIGIT1 +: + +536  +ST_HEXDIGIT2 +: + +537  +ST_SKIPSPHEX +: + +538  +XPBD_BROKEN_ENCODING +; + +539  +ST_LEADSPACE +: + +541  +XPBD_NOT_BODY_IGNORE +; + +542  +ST_WAITDIGITS +: + +543  +ST_UNEXPECTED +: + +544 + `ASN_DEBUG +("INTEGER: NØu£fuÈdig™ (¡©%d)", +¡©e +); + +545  +XPBD_BROKEN_ENCODING +; + +552 if( + `a¢_imax2INTEGER +( +¡ +, +dec_v®ue +)) { + +553 + `ASN_DEBUG +("INTEGER decod% cÚv”siÚ fažed", +td +-> +Çme +); + +554  +XPBD_SYSTEM_FAILURE +; + +557  +XPBD_BODY_CONSUMED +; + +558 + } +} + +560 +a¢_dec_rv®_t + + +561 + $INTEGER_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +562 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +563 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +) { + +564  + `x”_decode_´im™ive +( +Ýt_codec_ùx +, +td +, + +565 +¥Œ +, ( +INTEGER_t +), +Ýt_mÇme +, + +566 +buf_±r +, +size +, +INTEGER__x”_body_decode +); + +567 + } +} + +569 +a¢_’c_rv®_t + + +570 + $INTEGER_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +571  +žev– +, +x”_’cod”_æags_e + +æags +, + +572 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +573 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +574 +a¢_’c_rv®_t + +” + = {0,0,0}; + +576 () +žev– +; + +577 () +æags +; + +579 if(! +¡ + || !¡-> +buf +) + +580 +ASN__ENCODE_FAILED +; + +582 +” +. +’coded + = + `INTEGER__dump +( +td +, +¡ +, +cb +, +­p_key +, 1); + +583 if( +” +. +’coded + < 0è +ASN__ENCODE_FAILED +; + +585 + `ASN__ENCODED_OK +( +” +); + +586 + } +} + +588 #iâdef +ASN_DISABLE_PER_SUPPORT + + +590 +a¢_dec_rv®_t + + +591 + $INTEGER_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +592 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +593 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +594 +a¢_³r_d©a_t + * +pd +) { + +595 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +596 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +597 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0 }; + +598 +INTEGER_t + * +¡ + = (INTEGER_ˆ*)* +¥Œ +; + +599 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +600  +»³© +; + +602 () +Ýt_codec_ùx +; + +604 if(! +¡ +) { + +605 +¡ + = ( +INTEGER_t + *)(* +¥Œ + = + `CALLOC +(1, (*st))); + +606 if(! +¡ +è +ASN__DECODE_FAILED +; + +609 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +610 +ù + = +cÚ¡¿šts + ? &cÚ¡¿šts-> +v®ue + : 0; + +612 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +613  +šext + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +614 if( +šext + < 0è +ASN__DECODE_STARVED +; + +615 if( +šext +è +ù + = 0; + +618 + `FREEMEM +( +¡ +-> +buf +); + +619 +¡ +-> +buf + = 0; + +620 +¡ +-> +size + = 0; + +621 if( +ù +) { + +622 if( +ù +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +623 +¡ +-> +buf + = ( +ušt8_t + *) + `CALLOC +(1, 2); + +624 if(! +¡ +-> +buf +è +ASN__DECODE_FAILED +; + +625 +¡ +-> +size + = 1; + +626 } if( +ù +-> +æags + & +APC_CONSTRAINED + && ct-> +¿nge_b™s + >= 0) { + +627 +size_t + +size + = ( +ù +-> +¿nge_b™s + + 7) >> 3; + +628 +¡ +-> +buf + = ( +ušt8_t + *) + `MALLOC +(1 + +size + + 1); + +629 if(! +¡ +-> +buf +è +ASN__DECODE_FAILED +; + +630 +¡ +-> +size + = size; + +635 if( +ù + && ct-> +æags + !ð +APC_UNCONSTRAINED +) { + +637 + `ASN_DEBUG +("IÁeg” w™h„ªg%d b™s", +ù +-> +¿nge_b™s +); + +638 if( +ù +-> +¿nge_b™s + >= 0) { + +639 if(( +size_t +) +ù +-> +¿nge_b™s + > 8 * ()) + +640 +ASN__DECODE_FAILED +; + +642 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) { + +643  +uv®ue + = 0; + +644 if( + `u³r_g‘_cÚ¡¿šed_whÞe_numb” +( +pd +, + +645 & +uv®ue +, +ù +-> +¿nge_b™s +)) + +646 +ASN__DECODE_STARVED +; + +647 + `ASN_DEBUG +("Got value %lu +†ow %ld", + +648 +uv®ue +, +ù +-> +low”_bound +); + +649 +uv®ue + +ð +ù +-> +low”_bound +; + +650 if( + `a¢_ulÚg2INTEGER +( +¡ +, +uv®ue +)) + +651 +ASN__DECODE_FAILED +; + +653  +uv®ue + = 0; + +654  +sv®ue +; + +655 if( + `u³r_g‘_cÚ¡¿šed_whÞe_numb” +( +pd +, + +656 & +uv®ue +, +ù +-> +¿nge_b™s +)) + +657 +ASN__DECODE_STARVED +; + +658 + `ASN_DEBUG +("Got value %lu +†ow %ld", + +659 +uv®ue +, +ù +-> +low”_bound +); + +660 if( + `³r_lÚg_¿nge_uÄeba£ +( +uv®ue +, +ù +-> +low”_bound +, + +661 +ù +-> +uµ”_bound +, & +sv®ue +) + +662 || + `a¢_lÚg2INTEGER +( +¡ +, +sv®ue +)) { + +663 +ASN__DECODE_FAILED +; + +666  +rv® +; + +669 + `ASN_DEBUG +("Decodšg uncÚ¡¿šed iÁeg” %s", +td +-> +Çme +); + +674 +ssize_t + +Ën + = 0; + +675 * +p + = +NULL +; + +676  +»t + = 0; + +679 +Ën + = + `u³r_g‘_Ëngth +( +pd +, -1, 0, & +»³© +); + +680 if( +Ën + < 0è +ASN__DECODE_STARVED +; + +682 +p + = + `REALLOC +( +¡ +-> +buf +, st-> +size + + +Ën + + 1); + +683 if(! +p +è +ASN__DECODE_FAILED +; + +684 +¡ +-> +buf + = ( +ušt8_t + *) +p +; + +686 +»t + = + `³r_g‘_mªy_b™s +( +pd +, & +¡ +-> +buf +[¡-> +size +], 0, 8 * +Ën +); + +687 if( +»t + < 0è +ASN__DECODE_STARVED +; + +688 +¡ +-> +size + +ð +Ën +; + +689 }  +»³© +); + +690 +¡ +-> +buf +[¡-> +size +] = 0; + +693 if( +ù + && ct-> +low”_bound +) { + +697  +v®ue + = 0; + +698 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)) + +699 +ASN__DECODE_FAILED +; + +700 if( + `a¢_imax2INTEGER +( +¡ +, +v®ue + + +ù +-> +low”_bound +)) + +701 +ASN__DECODE_FAILED +; + +704  +rv® +; + +705 + } +} + +707 +a¢_’c_rv®_t + + +708 + $INTEGER_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +709 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +710 +a¢_³r_ou_t + * +po +) { + +711 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +712 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +713 +a¢_’c_rv®_t + +” + = {0,0,0}; + +714 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +715 cÚ¡ +ušt8_t + * +buf +; + +716 cÚ¡ +ušt8_t + * +’d +; + +717 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +718  +v®ue + = 0; + +720 if(! +¡ + || st-> +size + =ð0è +ASN__ENCODE_FAILED +; + +722 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +723 +ù + = +cÚ¡¿šts + ? &cÚ¡¿šts-> +v®ue + : 0; + +725 +” +. +’coded + = 0; + +727 if( +ù +) { + +728  +šext + = 0; + +729 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) { + +730  +uv® +; + +731 if( + `a¢_INTEGER2ulÚg +( +¡ +, & +uv® +)) + +732 +ASN__ENCODE_FAILED +; + +734 if( +ù +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +735 if( +uv® + < () +ù +-> +low”_bound +) + +736 +šext + = 1; + +737 } if( +ù +-> +¿nge_b™s + >= 0) { + +738 if( +uv® + < () +ù +-> +low”_bound + + +739 || +uv® + > () +ù +-> +uµ”_bound +) + +740 +šext + = 1; + +742 + `ASN_DEBUG +("V®u%lu (%02x/%" +ASN_PRI_SIZE + ")†b %lu ub %lu %s", + +743 +uv® +, +¡ +-> +buf +[0], st-> +size +, + +744 +ù +-> +low”_bound +, ct-> +uµ”_bound +, + +745 +šext + ? "ext" : "fix"); + +746 +v®ue + = +uv® +; + +748 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)) + +749 +ASN__ENCODE_FAILED +; + +751 if( +ù +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +752 if( +v®ue + < +ù +-> +low”_bound +) + +753 +šext + = 1; + +754 } if( +ù +-> +¿nge_b™s + >= 0) { + +755 if( +v®ue + < +ù +-> +low”_bound + + +756 || +v®ue + > +ù +-> +uµ”_bound +) + +757 +šext + = 1; + +759 + `ASN_DEBUG +("V®u%ld (%02x/%" +ASN_PRI_SIZE + ")†b %ld ub %ld %s", + +760 +v®ue +, +¡ +-> +buf +[0], st-> +size +, + +761 +ù +-> +low”_bound +, ct-> +uµ”_bound +, + +762 +šext + ? "ext" : "fix"); + +764 if( +ù +-> +æags + & +APC_EXTENSIBLE +) { + +765 if( + `³r_put_ãw_b™s +( +po +, +šext +, 1)) + +766 +ASN__ENCODE_FAILED +; + +767 if( +šext +è +ù + = 0; + +768 } if( +šext +) { + +769 +ASN__ENCODE_FAILED +; + +775 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +776  +v +; + +778 + `ASN_DEBUG +("Encoding integer %ld (%lu) with„ange %d bits", + +779 +v®ue +, v®u- +ù +-> +low”_bound +, ct-> +¿nge_b™s +); + +780 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) { + +781 iàÐ(() +ù +-> +low”_bound + > ()(ù-> +uµ”_bound +) + +782 || (() +v®ue + < () +ù +-> +low”_bound +)) + +783 || (() +v®ue + > () +ù +-> +uµ”_bound +) + +785 + `ASN_DEBUG +("Value %luo-be-encoded is outsidehe bounds [%lu, %lu]!", + +786 +v®ue +, +ù +-> +low”_bound +, ct-> +uµ”_bound +); + +787 +ASN__ENCODE_FAILED +; + +789 +v + = () +v®ue + - () +ù +-> +low”_bound +; + +791 if( + `³r_lÚg_¿nge_»ba£ +( +v®ue +, +ù +-> +low”_bound +, ct-> +uµ”_bound +, & +v +)) { + +792 +ASN__ENCODE_FAILED +; + +795 if( + `u³r_put_cÚ¡¿šed_whÞe_numb”_u +( +po +, +v +, +ù +-> +¿nge_b™s +)) + +796 +ASN__ENCODE_FAILED +; + +797 + `ASN__ENCODED_OK +( +” +); + +800 if( +ù + && ct-> +low”_bound +) { + +801 + `ASN_DEBUG +("Adju¡†ow” boundØ%ld", +ù +-> +low”_bound +); + +803 +ASN__ENCODE_FAILED +; + +806  +buf + = +¡ +->buf, +’d + = st->buà+ st-> +size +; buf <ƒnd;) { + +807  +Ãed_eom + = 0; + +808 +ssize_t + +mayEncode + = + `u³r_put_Ëngth +( +po +, +’d + - +buf +, & +Ãed_eom +); + +809 if( +mayEncode + < 0) + +810 +ASN__ENCODE_FAILED +; + +811 if( + `³r_put_mªy_b™s +( +po +, +buf +, 8 * +mayEncode +)) + +812 +ASN__ENCODE_FAILED +; + +813 +buf + +ð +mayEncode +; + +814 if( +Ãed_eom + && + `u³r_put_Ëngth +( +po +, 0, 0)è +ASN__ENCODE_FAILED +; + +817 + `ASN__ENCODED_OK +( +” +); + +818 + } +} + +820 +a¢_dec_rv®_t + + +821 + $INTEGER_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +822 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +823 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +824 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_INTEGER_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +825 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0 }; + +826 +INTEGER_t + * +¡ + = (INTEGER_ˆ*)* +¥Œ +; + +827 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +828  +»³© +; + +830 () +Ýt_codec_ùx +; + +832 if(! +¡ +) { + +833 +¡ + = ( +INTEGER_t + *)(* +¥Œ + = + `CALLOC +(1, (*st))); + +834 if(! +¡ +è +ASN__DECODE_FAILED +; + +837 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +838 +ù + = +cÚ¡¿šts + ? &cÚ¡¿šts-> +v®ue + : 0; + +840 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +841  +šext + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +842 if( +šext + < 0è +ASN__DECODE_STARVED +; + +843 if( +šext +è +ù + = 0; + +846 + `FREEMEM +( +¡ +-> +buf +); + +847 +¡ +-> +buf + = 0; + +848 +¡ +-> +size + = 0; + +849 if( +ù +) { + +850 if( +ù +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +851 +¡ +-> +buf + = ( +ušt8_t + *) + `CALLOC +(1, 2); + +852 if(! +¡ +-> +buf +è +ASN__DECODE_FAILED +; + +853 +¡ +-> +size + = 1; + +854 } if( +ù +-> +æags + & +APC_CONSTRAINED + && ct-> +¿nge_b™s + >= 0) { + +855 +size_t + +size + = ( +ù +-> +¿nge_b™s + + 7) >> 3; + +856 +¡ +-> +buf + = ( +ušt8_t + *) + `MALLOC +(1 + +size + + 1); + +857 if(! +¡ +-> +buf +è +ASN__DECODE_FAILED +; + +858 +¡ +-> +size + = size; + +863 if( +ù + && ct-> +æags + !ð +APC_UNCONSTRAINED +) { + +865 + `ASN_DEBUG +("IÁeg” w™h„ªg%d b™s", +ù +-> +¿nge_b™s +); + +866 if( +ù +-> +¿nge_b™s + >= 0) { + +867 ià( +ù +-> +¿nge_b™s + > 16) { + +868  +max_¿nge_by‹s + = ( +ù +-> +¿nge_b™s + >> 3) + + +869 ((( +ù +-> +¿nge_b™s + % 8) > 0) ? 1 : 0); + +870  +Ëngth + = 0, +i +; + +871  +v®ue + = 0; + +873  +i + = 1; ; i++) { + +874  +uµ” + = 1 << +i +; + +875 ià( +uµ” + >ð +max_¿nge_by‹s +) + +878 + `ASN_DEBUG +("Cªƒncod%d (%d by‹sèš %d b™s", +ù +-> +¿nge_b™s +, + +879 +max_¿nge_by‹s +, +i +); + +881 ià(( +Ëngth + = + `³r_g‘_ãw_b™s +( +pd +, +i +)) < 0) + +882 +ASN__DECODE_FAILED +; + +885 +Ëngth + += 1; + +886 + `ASN_DEBUG +("Gن’gth %d", +Ëngth +); + +887 ià( + `­”_g‘_®ign +( +pd +) != 0) + +888 +ASN__DECODE_FAILED +; + +889  +Ëngth +--) { + +890  +buf + = + `³r_g‘_ãw_b™s +( +pd +, 8); + +891 ià( +buf + < 0) + +892 +ASN__DECODE_FAILED +; + +893 +v®ue + +ð((() +buf +è<< (8 * +Ëngth +)); + +896 +v®ue + +ð +ù +-> +low”_bound +; + +897 if(( +¥ecs + && s³cs-> +f›ld_unsigÃd +) + +898 ? + `a¢_ušt642INTEGER +( +¡ +, () +v®ue +) + +899 : + `a¢_št642INTEGER +( +¡ +, +v®ue +)) + +900 +ASN__DECODE_FAILED +; + +901 + `ASN_DEBUG +("Got value %ld +†ow %ld", + +902 +v®ue +, +ù +-> +low”_bound +); + +904  +v®ue + = 0; + +905 ià( +ù +-> +¿nge_b™s + < 8) { + +906 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +ù +-> +¿nge_b™s +); + +907 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +908 } ià( +ù +-> +¿nge_b™s + == 8) { + +909 ià( + `­”_g‘_®ign +( +pd +) < 0) + +910 +ASN__DECODE_FAILED +; + +911 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +ù +-> +¿nge_b™s +); + +912 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +915 ià( + `­”_g‘_®ign +( +pd +) < 0) + +916 +ASN__DECODE_FAILED +; + +917 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 16); + +918 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +920 +v®ue + +ð +ù +-> +low”_bound +; + +921 if(( +¥ecs + && s³cs-> +f›ld_unsigÃd +) + +922 ? + `a¢_ulÚg2INTEGER +( +¡ +, +v®ue +) + +923 : + `a¢_lÚg2INTEGER +( +¡ +, +v®ue +)) + +924 +ASN__DECODE_FAILED +; + +925 + `ASN_DEBUG +("Got value %ld +†ow %ld", + +926 +v®ue +, +ù +-> +low”_bound +); + +928  +rv® +; + +930 +ASN__DECODE_FAILED +; + +933 + `ASN_DEBUG +("Decodšg uncÚ¡¿šed iÁeg” %s", +td +-> +Çme +); + +938 +ssize_t + +Ën +; + +939 * +p +; + +940  +»t +; + +943 +Ën + = + `­”_g‘_Ëngth +( +pd +, -1, -1, & +»³© +); + +944 if( +Ën + < 0è +ASN__DECODE_STARVED +; + +946 +p + = + `REALLOC +( +¡ +-> +buf +, st-> +size + + +Ën + + 1); + +947 if(! +p +è +ASN__DECODE_FAILED +; + +948 +¡ +-> +buf + = ( +ušt8_t + *) +p +; + +950 +»t + = + `³r_g‘_mªy_b™s +( +pd +, & +¡ +-> +buf +[¡-> +size +], 0, 8 * +Ën +); + +951 if( +»t + < 0è +ASN__DECODE_STARVED +; + +952 +¡ +-> +size + +ð +Ën +; + +953 }  +»³© +); + +954 +¡ +-> +buf +[¡-> +size +] = 0; + +957 if( +ù + && ct-> +low”_bound +) { + +961  +v®ue +; + +962 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)) + +963 +ASN__DECODE_FAILED +; + +964 if( + `a¢_lÚg2INTEGER +( +¡ +, +v®ue + + +ù +-> +low”_bound +)) + +965 +ASN__DECODE_FAILED +; + +968  +rv® +; + +969 + } +} + +971 +a¢_’c_rv®_t + + +972 + $INTEGER_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +973 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +974 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +975 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_INTEGER_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +976 +a¢_’c_rv®_t + +” + = {0,0,0}; + +977 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +978 cÚ¡ +ušt8_t + * +buf +; + +979 cÚ¡ +ušt8_t + * +’d +; + +980 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +981  +v®ue + = 0; + +983 if(! +¡ + || st-> +size + =ð0è +ASN__ENCODE_FAILED +; + +985 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +986 +ù + = +cÚ¡¿šts + ? &cÚ¡¿šts-> +v®ue + : 0; + +988 +” +. +’coded + = 0; + +990 if( +ù +) { + +991  +šext + = 0; + +992 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) { + +993  +uv® +; + +994 if( + `a¢_INTEGER2ulÚg +( +¡ +, & +uv® +)) + +995 +ASN__ENCODE_FAILED +; + +997 if( +ù +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +998 if( +uv® + < () +ù +-> +low”_bound +) + +999 +šext + = 1; + +1000 } if( +ù +-> +¿nge_b™s + >= 0) { + +1001 if( +uv® + < () +ù +-> +low”_bound + + +1002 || +uv® + > () +ù +-> +uµ”_bound +) + +1003 +šext + = 1; + +1005 + `ASN_DEBUG +("Value %lu (%02x/%lu)†b %ld ub %ld %s", + +1006 +uv® +, +¡ +-> +buf +[0], st-> +size +, + +1007 +ù +-> +low”_bound +, ct-> +uµ”_bound +, + +1008 +šext + ? "ext" : "fix"); + +1009 +v®ue + = +uv® +; + +1011 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)è +ASN__ENCODE_FAILED +; + +1013 if( +ù +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +1014 if( +v®ue + < +ù +-> +low”_bound +) + +1015 +šext + = 1; + +1016 } if( +ù +-> +¿nge_b™s + >= 0) { + +1017 if( +v®ue + < +ù +-> +low”_bound + + +1018 || +v®ue + > +ù +-> +uµ”_bound +) + +1019 +šext + = 1; + +1021 + `ASN_DEBUG +("Value %lu (%02x/%lu)†b %ld ub %ld %s", + +1022 +v®ue +, +¡ +-> +buf +[0], st-> +size +, + +1023 +ù +-> +low”_bound +, ct-> +uµ”_bound +, + +1024 +šext + ? "ext" : "fix"); + +1026 if( +ù +-> +æags + & +APC_EXTENSIBLE +) { + +1027 if( + `³r_put_ãw_b™s +( +po +, +šext +, 1)) + +1028 +ASN__ENCODE_FAILED +; + +1029 if( +šext +è +ù + = 0; + +1030 } if( +šext +) { + +1031 +ASN__ENCODE_FAILED +; + +1036 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +1037  +v +; + +1040 + `ASN_DEBUG +("Encoding integer %ld (%lu) with„ange %d bits", + +1041 +v®ue +, v®u- +ù +-> +low”_bound +, ct-> +¿nge_b™s +); + +1043 +v + = +v®ue + - +ù +-> +low”_bound +; + +1046 ià( +ù +-> +¿nge_b™s + < 8) { + +1047 if( + `³r_put_ãw_b™s +( +po +, 0x00 | +v +, +ù +-> +¿nge_b™s +)) + +1048 +ASN__ENCODE_FAILED +; + +1049 } ià( +ù +-> +¿nge_b™s + == 8) { + +1050 if( + `­”_put_®ign +( +po +) < 0) + +1051 +ASN__ENCODE_FAILED +; + +1052 if( + `³r_put_ãw_b™s +( +po +, 0x00 | +v +, +ù +-> +¿nge_b™s +)) + +1053 +ASN__ENCODE_FAILED +; + +1054 } ià( +ù +-> +¿nge_b™s + <= 16) { + +1056 if( + `­”_put_®ign +( +po +) < 0) + +1057 +ASN__ENCODE_FAILED +; + +1058 if( + `³r_put_ãw_b™s +( +po +, 0x0000 | +v +, + +1060 +ASN__ENCODE_FAILED +; + +1063 +št64_t + +v64 + = +v +; + +1064  +i +, +j +; + +1065  +max_¿nge_by‹s + = ( +ù +-> +¿nge_b™s + >> 3) + + +1066 ((( +ù +-> +¿nge_b™s + % 8) > 0) ? 1 : 0); + +1068  +i + = 1; ; i++) { + +1069  +uµ” + = 1 << +i +; + +1070 ià( +uµ” + >ð +max_¿nge_by‹s +) + +1074  +j + = ( +št64_t +) -1; j != 0; j--) { + +1075 +št64_t + +v® +; + +1076 +v® + = +v64 + >> ( +j + * 8); + +1077 ià( +v® + != 0) + +1082 ià( + `³r_put_ãw_b™s +( +po +, +j +, +i +)) + +1083 +ASN__ENCODE_FAILED +; + +1086 ià( + `­”_put_®ign +( +po +) < 0) + +1087 +ASN__ENCODE_FAILED +; + +1089  +i + = 0; i <ð +j +; i++) { + +1090 if( + `³r_put_ãw_b™s +( +po +, ( +v64 + >> (8 * ( +j + - +i +))) & 0xff, 8)) + +1091 +ASN__ENCODE_FAILED +; + +1094 + `ASN__ENCODED_OK +( +” +); + +1097 if( +ù + && ct-> +low”_bound +) { + +1098 + `ASN_DEBUG +("Adju¡†ow” boundØ%ld", +ù +-> +low”_bound +); + +1100 +ASN__ENCODE_FAILED +; + +1103  +buf + = +¡ +->buf, +’d + = st->buà+ st-> +size +; buf <ƒnd;) { + +1104 +ssize_t + +mayEncode + = + `­”_put_Ëngth +( +po +, -1, +’d + - +buf +); + +1105 if( +mayEncode + < 0) + +1106 +ASN__ENCODE_FAILED +; + +1107 if( + `³r_put_mªy_b™s +( +po +, +buf +, 8 * +mayEncode +)) + +1108 +ASN__ENCODE_FAILED +; + +1109 +buf + +ð +mayEncode +; + +1112 + `ASN__ENCODED_OK +( +” +); + +1113 + } +} + +1117  +štmax_t + + +1118 + $a¢__š‹g”_cÚv”t +(cÚ¡ +ušt8_t + * +b +, cÚ¡ ušt8_ˆ* +’d +) { + +1119 +uštmax_t + +v®ue +; + +1123 if((* +b + >> 7)) { + +1124 +v®ue + = ( +uštmax_t +)(-1); + +1126 +v®ue + = 0; + +1130 ; +b + < +’d +; b++) { + +1131 +v®ue + = (v®u<< 8è| * +b +; + +1134  +v®ue +; + +1135 + } +} + +1138 + $a¢_INTEGER2imax +(cÚ¡ +INTEGER_t + * +Œ +, +štmax_t + * +͌ +) { + +1139 +ušt8_t + * +b +, * +’d +; + +1140 +size_t + +size +; + +1143 if(! +Œ + || !Œ-> +buf + || ! +͌ +) { + +1144 +”ºo + = +EINVAL +; + +1149 +b + = +Œ +-> +buf +; + +1150 +size + = +Œ +->size; + +1151 +’d + = +b + + +size +; + +1153 if( +size + > ( +štmax_t +)) { + +1154 +ušt8_t + * +’d1 + = +’d + - 1; + +1162 ; +b + < +’d1 +; b++) { + +1163 * +b +) { + +1164 0x00: if(( +b +[1] & 0x80) == 0) ; ; + +1165 0xff: if(( +b +[1] & 0x80) != 0) ; ; + +1170 +size + = +’d + - +b +; + +1171 if( +size + > ( +štmax_t +)) { + +1173 +”ºo + = +ERANGE +; + +1179 if( +’d + =ð +b +) { + +1180 * +͌ + = 0; + +1184 * +͌ + = + `a¢__š‹g”_cÚv”t +( +b +, +’d +); + +1186 + } +} + +1190 + $a¢_INTEGER2umax +(cÚ¡ +INTEGER_t + * +Œ +, +uštmax_t + * +͌ +) { + +1191 +ušt8_t + * +b +, * +’d +; + +1192 +uštmax_t + +v®ue +; + +1193 +size_t + +size +; + +1195 if(! +Œ + || !Œ-> +buf + || ! +͌ +) { + +1196 +”ºo + = +EINVAL +; + +1200 +b + = +Œ +-> +buf +; + +1201 +size + = +Œ +->size; + +1202 +’d + = +b + + +size +; + +1205 ; +size + > ( +v®ue +); +b +++, size--) { + +1206 if(* +b +) { + +1208 +”ºo + = +ERANGE +; + +1214  +v®ue + = 0; +b + < +’d +; b++) + +1215 +v®ue + = (v®u<< 8è| * +b +; + +1217 * +͌ + = +v®ue +; + +1219 + } +} + +1222 + $a¢_umax2INTEGER +( +INTEGER_t + * +¡ +, +uštmax_t + +v®ue +) { + +1223 +ušt8_t + * +buf +; + +1224 +ušt8_t + * +’d +; + +1225 +ušt8_t + * +b +; + +1226  +shr +; + +1228 if( +v®ue + <ð((~( +uštmax_t +)0) >> 1)) { + +1229  + `a¢_imax2INTEGER +( +¡ +, +v®ue +); + +1232 +buf + = ( +ušt8_t + *) + `MALLOC +(1 + ( +v®ue +)); + +1233 if(! +buf +)  -1; + +1235 +’d + = +buf + + (( +v®ue +) + 1); + +1236 +buf +[0] = 0; + +1237  +b + = +buf + + 1, +shr + = (( +v®ue +è- 1è* 8; b < +’d +; shr -= 8, b++) + +1238 * +b + = ( +ušt8_t +)( +v®ue + >> +shr +); + +1240 if( +¡ +-> +buf +è + `FREEMEM +(st->buf); + +1241 +¡ +-> +buf + = buf; + +1242 +¡ +-> +size + = 1 + ( +v®ue +); + +1245 + } +} + +1248 + $a¢_imax2INTEGER +( +INTEGER_t + * +¡ +, +štmax_t + +v®ue +) { + +1249 +ušt8_t + * +buf +, * +bp +; + +1250 +ušt8_t + * +p +; + +1251 +ušt8_t + * +p¡¬t +; + +1252 +ušt8_t + * +³nd1 +; + +1253  +l™ŽeEndŸn + = 1; + +1254  +add +; + +1256 if(! +¡ +) { + +1257 +”ºo + = +EINVAL +; + +1261 +buf + = ( +ušt8_t + *)(*) + `MALLOC +(( +v®ue +)); + +1262 if(! +buf +)  -1; + +1264 if(*(*)& +l™ŽeEndŸn +) { + +1265 +p¡¬t + = ( +ušt8_t + *)& +v®ue + + (value) - 1; + +1266 +³nd1 + = ( +ušt8_t + *)& +v®ue +; + +1267 +add + = -1; + +1269 +p¡¬t + = ( +ušt8_t + *)& +v®ue +; + +1270 +³nd1 + = +p¡¬t + + ( +v®ue +) - 1; + +1271 +add + = 1; + +1280  +p + = +p¡¬t +;… !ð +³nd1 +;… +ð +add +) { + +1281 * +p +) { + +1282 0x00: if((*( +p ++ +add +) & 0x80) == 0) + +1285 0xff: if((*( +p ++ +add +) & 0x80)) + +1292  +bp + = +buf +, +³nd1 + +ð +add +; +p + !=…end1;… +=‡dd) + +1293 * +bp +++ = * +p +; + +1295 if( +¡ +-> +buf +è + `FREEMEM +(st->buf); + +1296 +¡ +-> +buf + = buf; + +1297 +¡ +-> +size + = +bp + - +buf +; + +1300 + } +} + +1303 + $a¢_INTEGER2lÚg +(cÚ¡ +INTEGER_t + * +Œ +, * +l +) { + +1304 +štmax_t + +v +; + +1305 if( + `a¢_INTEGER2imax +( +Œ +, & +v +) == 0) { + +1306 if( +v + < +LONG_MIN + || v > +LONG_MAX +) { + +1307 +”ºo + = +ERANGE +; + +1310 * +l + = +v +; + +1315 + } +} + +1318 + $a¢_INTEGER2ulÚg +(cÚ¡ +INTEGER_t + * +Œ +, * +l +) { + +1319 +uštmax_t + +v +; + +1320 if( + `a¢_INTEGER2umax +( +Œ +, & +v +) == 0) { + +1321 if( +v + > +ULONG_MAX +) { + +1322 +”ºo + = +ERANGE +; + +1325 * +l + = +v +; + +1330 + } +} + +1333 + $a¢_lÚg2INTEGER +( +INTEGER_t + * +¡ +,  +v®ue +) { + +1334  + `a¢_imax2INTEGER +( +¡ +, +v®ue +); + +1335 + } +} + +1338 + $a¢_ulÚg2INTEGER +( +INTEGER_t + * +¡ +,  +v®ue +) { + +1339  + `a¢_imax2INTEGER +( +¡ +, +v®ue +); + +1340 + } +} + +1344 + $a¢_ušt642INTEGER +( +INTEGER_t + * +¡ +, +ušt64_t + +v®ue +) { + +1345 +ušt8_t + * +buf +; + +1346 +ušt8_t + * +’d +; + +1347 +ušt8_t + * +b +; + +1348  +shr +; + +1350 if( +v®ue + <ð +INT64_MAX +) + +1351  + `a¢_št642INTEGER +( +¡ +, +v®ue +); + +1353 +buf + = ( +ušt8_t + *) + `MALLOC +(1 + ( +v®ue +)); + +1354 if(! +buf +)  -1; + +1356 +’d + = +buf + + (( +v®ue +) + 1); + +1357 +buf +[0] = 0; + +1358  +b + = +buf + + 1, +shr + = (( +v®ue +)-1)*8; b < +’d +; shr -= 8, b++) + +1359 * +b + = ( +ušt8_t +)( +v®ue + >> +shr +); + +1361 if( +¡ +-> +buf +è + `FREEMEM +(st->buf); + +1362 +¡ +-> +buf + = buf; + +1363 +¡ +-> +size + = 1 + ( +v®ue +); + +1366 + } +} + +1369 + $a¢_št642INTEGER +( +INTEGER_t + * +¡ +, +št64_t + +v®ue +) { + +1370 +ušt8_t + * +buf +, * +bp +; + +1371 +ušt8_t + * +p +; + +1372 +ušt8_t + * +p¡¬t +; + +1373 +ušt8_t + * +³nd1 +; + +1374  +l™ŽeEndŸn + = 1; + +1375  +add +; + +1377 if(! +¡ +) { + +1378 +”ºo + = +EINVAL +; + +1382 +buf + = ( +ušt8_t + *) + `MALLOC +(( +v®ue +)); + +1383 if(! +buf +)  -1; + +1385 if(*(*)& +l™ŽeEndŸn +) { + +1386 +p¡¬t + = ( +ušt8_t + *)& +v®ue + + (value) - 1; + +1387 +³nd1 + = ( +ušt8_t + *)& +v®ue +; + +1388 +add + = -1; + +1390 +p¡¬t + = ( +ušt8_t + *)& +v®ue +; + +1391 +³nd1 + = +p¡¬t + + ( +v®ue +) - 1; + +1392 +add + = 1; + +1401  +p + = +p¡¬t +;… !ð +³nd1 +;… +ð +add +) { + +1402 * +p +) { + +1403 0x00: if((*( +p ++ +add +) & 0x80) == 0) + +1406 0xff: if((*( +p ++ +add +) & 0x80)) + +1413  +p¡¬t + = +p +, +bp + = +buf +, +³nd1 + +ð +add +;… !=…end1;… +=‡dd) + +1414 * +bp +++ = * +p +; + +1416 if( +¡ +-> +buf +è + `FREEMEM +(st->buf); + +1417 +¡ +-> +buf + = buf; + +1418 +¡ +-> +size + = +bp + - +buf +; + +1421 + } +} + +1429 +a¢_¡¹ox_»suÉ_e + + +1430 + $a¢_¡¹oimax_lim +(cÚ¡ * +¡r +, cÚ¡ ** +’d +, +štmax_t + * +š +) { + +1431  +sign + = 1; + +1432 +štmax_t + +v®ue +; + +1434  + #ASN1_INTMAX_MAX + ((~( +uštmax_t +)0è>> 1) + + ) + +1435 cÚ¡ +štmax_t + +uµ”_bound¬y + = +ASN1_INTMAX_MAX + / 10; + +1436 +štmax_t + +Ï¡_dig™_max + = +ASN1_INTMAX_MAX + % 10; + +1437 #undeà +ASN1_INTMAX_MAX + + +1439 if( +¡r + >ð* +’d +è +ASN_STRTOX_ERROR_INVAL +; + +1441 * +¡r +) { + +1443 +Ï¡_dig™_max +++; + +1444 +sign + = -1; + +1447 +¡r +++; + +1448 if( +¡r + >ð* +’d +) { + +1449 * +’d + = +¡r +; + +1450  +ASN_STRTOX_EXPECT_MORE +; + +1454  +v®ue + = 0; +¡r + < (* +’d +); str++) { + +1455 * +¡r +) { + +1458  +d + = * +¡r + - '0'; + +1459 if( +v®ue + < +uµ”_bound¬y +) { + +1460 +v®ue + = v®u* 10 + +d +; + +1461 } if( +v®ue + =ð +uµ”_bound¬y +) { + +1462 if( +d + <ð +Ï¡_dig™_max +) { + +1463 if( +sign + > 0) { + +1464 +v®ue + = v®u* 10 + +d +; + +1466 +sign + = 1; + +1467 +v®ue + = -v®u* 10 - +d +; + +1470 * +’d + = +¡r +; + +1471  +ASN_STRTOX_ERROR_RANGE +; + +1474 * +’d + = +¡r +; + +1475  +ASN_STRTOX_ERROR_RANGE +; + +1480 * +’d + = +¡r +; + +1481 * +š + = +sign + * +v®ue +; + +1482  +ASN_STRTOX_EXTRA_DATA +; + +1486 * +’d + = +¡r +; + +1487 * +š + = +sign + * +v®ue +; + +1488  +ASN_STRTOX_OK +; + +1489 + } +} + +1497 +a¢_¡¹ox_»suÉ_e + + +1498 + $a¢_¡¹oumax_lim +(cÚ¡ * +¡r +, cÚ¡ ** +’d +, +uštmax_t + * +uš +) { + +1499 +uštmax_t + +v®ue +; + +1501  + #ASN1_UINTMAX_MAX + ((~( +uštmax_t +)0)) + + ) + +1502 cÚ¡ +uštmax_t + +uµ”_bound¬y + = +ASN1_UINTMAX_MAX + / 10; + +1503 +uštmax_t + +Ï¡_dig™_max + = +ASN1_UINTMAX_MAX + % 10; + +1504 #undeà +ASN1_UINTMAX_MAX + + +1506 if( +¡r + >ð* +’d +è +ASN_STRTOX_ERROR_INVAL +; + +1508 * +¡r +) { + +1510  +ASN_STRTOX_ERROR_INVAL +; + +1512 +¡r +++; + +1513 if( +¡r + >ð* +’d +) { + +1514 * +’d + = +¡r +; + +1515  +ASN_STRTOX_EXPECT_MORE +; + +1519  +v®ue + = 0; +¡r + < (* +’d +); str++) { + +1520 * +¡r +) { + +1523  +d + = * +¡r + - '0'; + +1524 if( +v®ue + < +uµ”_bound¬y +) { + +1525 +v®ue + = v®u* 10 + +d +; + +1526 } if( +v®ue + =ð +uµ”_bound¬y +) { + +1527 if( +d + <ð +Ï¡_dig™_max +) { + +1528 +v®ue + = v®u* 10 + +d +; + +1530 * +’d + = +¡r +; + +1531  +ASN_STRTOX_ERROR_RANGE +; + +1534 * +’d + = +¡r +; + +1535  +ASN_STRTOX_ERROR_RANGE +; + +1540 * +’d + = +¡r +; + +1541 * +uš + = +v®ue +; + +1542  +ASN_STRTOX_EXTRA_DATA +; + +1546 * +’d + = +¡r +; + +1547 * +uš + = +v®ue +; + +1548  +ASN_STRTOX_OK +; + +1549 + } +} + +1551 +a¢_¡¹ox_»suÉ_e + + +1552 + $a¢_¡¹Þ_lim +(cÚ¡ * +¡r +, cÚ¡ ** +’d +, * +Í +) { + +1553 +štmax_t + +v®ue +; + +1554  + `a¢_¡¹oimax_lim +( +¡r +, +’d +, & +v®ue +)) { + +1555  +ASN_STRTOX_ERROR_RANGE +: + +1556  +ASN_STRTOX_ERROR_RANGE +; + +1557  +ASN_STRTOX_ERROR_INVAL +: + +1558  +ASN_STRTOX_ERROR_INVAL +; + +1559  +ASN_STRTOX_EXPECT_MORE +: + +1560  +ASN_STRTOX_EXPECT_MORE +; + +1561  +ASN_STRTOX_OK +: + +1562 if( +v®ue + >ð +LONG_MIN + && v®u<ð +LONG_MAX +) { + +1563 * +Í + = +v®ue +; + +1564  +ASN_STRTOX_OK +; + +1566  +ASN_STRTOX_ERROR_RANGE +; + +1568  +ASN_STRTOX_EXTRA_DATA +: + +1569 if( +v®ue + >ð +LONG_MIN + && v®u<ð +LONG_MAX +) { + +1570 * +Í + = +v®ue +; + +1571  +ASN_STRTOX_EXTRA_DATA +; + +1573  +ASN_STRTOX_ERROR_RANGE +; + +1577 + `as£¹ +(!"Unreachable"); + +1578  +ASN_STRTOX_ERROR_INVAL +; + +1579 + } +} + +1581 +a¢_¡¹ox_»suÉ_e + + +1582 + $a¢_¡¹oul_lim +(cÚ¡ * +¡r +, cÚ¡ ** +’d +, * +uÍ +) { + +1583 +uštmax_t + +v®ue +; + +1584  + `a¢_¡¹oumax_lim +( +¡r +, +’d +, & +v®ue +)) { + +1585  +ASN_STRTOX_ERROR_RANGE +: + +1586  +ASN_STRTOX_ERROR_RANGE +; + +1587  +ASN_STRTOX_ERROR_INVAL +: + +1588  +ASN_STRTOX_ERROR_INVAL +; + +1589  +ASN_STRTOX_EXPECT_MORE +: + +1590  +ASN_STRTOX_EXPECT_MORE +; + +1591  +ASN_STRTOX_OK +: + +1592 if( +v®ue + <ð +ULONG_MAX +) { + +1593 * +uÍ + = +v®ue +; + +1594  +ASN_STRTOX_OK +; + +1596  +ASN_STRTOX_ERROR_RANGE +; + +1598  +ASN_STRTOX_EXTRA_DATA +: + +1599 if( +v®ue + <ð +ULONG_MAX +) { + +1600 * +uÍ + = +v®ue +; + +1601  +ASN_STRTOX_EXTRA_DATA +; + +1603  +ASN_STRTOX_ERROR_RANGE +; + +1607 + `as£¹ +(!"Unreachable"); + +1608  +ASN_STRTOX_ERROR_INVAL +; + +1609 + } +} + +1612 + $INTEGER_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +1613 cÚ¡ * +b±r +) { + +1614 cÚ¡ +INTEGER_t + * +a + = +­Œ +; + +1615 cÚ¡ +INTEGER_t + * +b + = +b±r +; + +1617 () +td +; + +1619 if( +a + && +b +) { + +1620 if( +a +-> +size + && +b +->size) { + +1621  +sign_a + = ( +a +-> +buf +[0] & 0x80) ? -1 : 1; + +1622  +sign_b + = ( +b +-> +buf +[0] & 0x80) ? -1 : 1; + +1624 if( +sign_a + < +sign_b +)  -1; + +1625 if( +sign_a + > +sign_b +)  1; + +1628 if( +a +-> +size + < +b +->size) { + +1629  -1 * +sign_a +; + +1630 } if( +a +-> +size + > +b +->size) { + +1631  1 * +sign_b +; + +1634  +sign_a + * + `memcmp +( +a +-> +buf +, +b +->buf,‡-> +size +); + +1635 } if( +a +-> +size +) { + +1636  +sign + = ( +a +-> +buf +[0] & 0x80) ? -1 : 1; + +1637  (1è* +sign +; + +1638 } if( +b +-> +size +) { + +1639  +sign + = ( +a +-> +buf +[0] & 0x80) ? -1 : 1; + +1640  (-1è* +sign +; + +1644 } if(! +a + && ! +b +) { + +1646 } if(! +a +) { + +1652 + } +} + +1654 +a¢_¿ndom_fžl_»suÉ_t + + +1655 + $INTEGER_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +1656 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +1657 +size_t + +max_Ëngth +) { + +1658 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +1659 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +1660 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 1}; + +1661 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +1662 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +1663 +INTEGER_t + * +¡ + = * +¥Œ +; + +1664 cÚ¡ +a¢_INTEGER_’um_m­_t + * +em­ +; + +1665 +size_t + +em­_Ën +; + +1666 +štmax_t + +v®ue +; + +1667  +fšd_šside_m­ +; + +1669 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +1671 if( +¡ + =ð +NULL +) { + +1672 +¡ + = ( +INTEGER_t + *) + `CALLOC +(1, (*st)); + +1673 if( +¡ + =ð +NULL +) { + +1674  +»suÉ_çžed +; + +1678 if( +¥ecs +) { + +1679 +em­ + = +¥ecs +-> +v®ue2’um +; + +1680 +em­_Ën + = +¥ecs +-> +m­_couÁ +; + +1681 if( +¥ecs +-> +¡riù_’um”©iÚ +) { + +1682 +fšd_šside_m­ + = +em­_Ën + > 0; + +1684 +fšd_šside_m­ + = +em­_Ën + ? + `a¢_¿ndom_b‘w“n +(0, 1) : 0; + +1687 +em­ + = 0; + +1688 +em­_Ën + = 0; + +1689 +fšd_šside_m­ + = 0; + +1692 if( +fšd_šside_m­ +) { + +1693 + `as£¹ +( +em­_Ën + > 0); + +1694 +v®ue + = +em­ +[ + `a¢_¿ndom_b‘w“n +(0, +em­_Ën + - 1)]. +Çt_v®ue +; + +1696 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +ù +; + +1698 cÚ¡  +v¬ŸÁs +[] = { + +1704 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) { + +1705 + `as£¹ +( +v¬ŸÁs +[18] == 0); + +1706 +v®ue + = +v¬ŸÁs +[ + `a¢_¿ndom_b‘w“n +( + +1707 18, ( +v¬ŸÁs +) / (variants[0]) - 1)]; + +1709 +v®ue + = +v¬ŸÁs +[ + `a¢_¿ndom_b‘w“n +( + +1710 0, ( +v¬ŸÁs +) / (variants[0]) - 1)]; + +1713 if(! +cÚ¡¿šts +ècÚ¡¿št ð& +td +-> +’codšg_cÚ¡¿šts +; + +1714 +ù + = +cÚ¡¿šts + ? cÚ¡¿šts-> +³r_cÚ¡¿šts + : 0; + +1715 if( +ù + && (ù-> +v®ue +. +æags + & +APC_CONSTRAINED +)) { + +1716 if( +v®ue + < +ù +->v®ue. +low”_bound + || v®u> ct->v®ue. +uµ”_bound +) { + +1717 +v®ue + = + `a¢_¿ndom_b‘w“n +( +ù +->v®ue. +low”_bound +, + +1718 +ù +-> +v®ue +. +uµ”_bound +); + +1723 if( + `a¢_imax2INTEGER +( +¡ +, +v®ue +)) { + +1724 if( +¡ + =ð* +¥Œ +) { + +1725 + `ASN_STRUCT_RESET +(* +td +, +¡ +); + +1727 + `ASN_STRUCT_FREE +(* +td +, +¡ +); + +1729  +»suÉ_çžed +; + +1731 * +¥Œ + = +¡ +; + +1732 +»suÉ_ok +. +Ëngth + = +¡ +-> +size +; + +1733  +»suÉ_ok +; + +1735 + } +} + + @IndexToRFSP.c + +8  + ~"IndexToRFSP.h +" + +11 + $IndexToRFSP_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 256)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_IndexToRFSP_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 8, 8, 1, 256 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IndexToRFSP_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IndexToRFSP + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_IndexToRFSP_gs_1 +, + +52 ( +a¢_DEF_IndexToRFSP_gs_1 +) + +53 /( +a¢_DEF_IndexToRFSP_gs_1 +[0]), + +54 +a¢_DEF_IndexToRFSP_gs_1 +, + +55 ( +a¢_DEF_IndexToRFSP_gs_1 +) + +56 /( +a¢_DEF_IndexToRFSP_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_IndexToRFSP_cÚ¡r_1 +, +IndexToRFSP_cÚ¡¿št + }, + + @Interface-MessageID.c + +8  + ~"IÁ”çû-Mes§geID.h +" + +14  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_mes§geTy³_cÚ¡r_3 + + gCC_NOTUSED + = { + +15 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 2, 2, 0, 2 } , + +16 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +19 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_mes§geTy³_v®ue2’um_3 +[] = { + +25 cÚ¡  + ga¢_MAP_mes§geTy³_’um2v®ue_3 +[] = { + +31 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_mes§geTy³_¥ecs_3 + = { + +32 +a¢_MAP_mes§geTy³_v®ue2’um_3 +, + +33 +a¢_MAP_mes§geTy³_’um2v®ue_3 +, + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_mes§geTy³_gs_3 +[] = { + +41 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +42 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_mes§geTy³_3 + = { + +48 & +a¢_OP_N©iveEnum”©ed +, + +49 +a¢_DEF_mes§geTy³_gs_3 +, + +50 ( +a¢_DEF_mes§geTy³_gs_3 +) + +51 /( +a¢_DEF_mes§geTy³_gs_3 +[0]) - 1, + +52 +a¢_DEF_mes§geTy³_gs_3 +, + +53 ( +a¢_DEF_mes§geTy³_gs_3 +) + +54 /( +a¢_DEF_mes§geTy³_gs_3 +[0]), + +55 { 0, & +a¢_PER_ty³_mes§geTy³_cÚ¡r_3 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +57 & +a¢_SPC_mes§geTy³_¥ecs_3 + + +60  +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çû_Mes§geID_1 +[] = { + +61 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çû_Mes§geID +, +š‹rçûProûdu»ID +), + +62 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +64 & +a¢_DEF_N©iveIÁeg” +, + +70 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çû_Mes§geID +, +mes§geTy³ +), + +71 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +73 & +a¢_DEF_mes§geTy³_3 +, + +80 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çû_Mes§geID_gs_1 +[] = { + +81 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +83 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çû_Mes§geID_g2–_1 +[] = { + +84 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +85 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +87  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çû_Mes§geID_¥ecs_1 + = { + +88 ( +IÁ”çû_Mes§geID +), + +89 +off£tof +( +IÁ”çû_Mes§geID +, +_a¢_ùx +), + +90 +a¢_MAP_IÁ”çû_Mes§geID_g2–_1 +, + +95 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çû_Mes§geID + = { + +98 & +a¢_OP_SEQUENCE +, + +99 +a¢_DEF_IÁ”çû_Mes§geID_gs_1 +, + +100 ( +a¢_DEF_IÁ”çû_Mes§geID_gs_1 +) + +101 /( +a¢_DEF_IÁ”çû_Mes§geID_gs_1 +[0]), + +102 +a¢_DEF_IÁ”çû_Mes§geID_gs_1 +, + +103 ( +a¢_DEF_IÁ”çû_Mes§geID_gs_1 +) + +104 /( +a¢_DEF_IÁ”çû_Mes§geID_gs_1 +[0]), + +105 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +106 +a¢_MBR_IÁ”çû_Mes§geID_1 +, + +108 & +a¢_SPC_IÁ”çû_Mes§geID_¥ecs_1 + + + @InterfaceID-E1.c + +8  + ~"IÁ”çûID-E1.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûID_E1_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_E1 +, +glob®GNB_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_Glob®GNB_ID +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_E1 +, +gNB_CU_UP_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_GNB_CU_UP_ID +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûID_E1_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûID_E1_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çûID_E1_¥ecs_1 + = { + +38 ( +IÁ”çûID_E1 +), + +39 +off£tof +( +IÁ”çûID_E1 +, +_a¢_ùx +), + +40 +a¢_MAP_IÁ”çûID_E1_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûID_E1 + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_IÁ”çûID_E1_gs_1 +, + +50 ( +a¢_DEF_IÁ”çûID_E1_gs_1 +) + +51 /( +a¢_DEF_IÁ”çûID_E1_gs_1 +[0]), + +52 +a¢_DEF_IÁ”çûID_E1_gs_1 +, + +53 ( +a¢_DEF_IÁ”çûID_E1_gs_1 +) + +54 /( +a¢_DEF_IÁ”çûID_E1_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_IÁ”çûID_E1_1 +, + +58 & +a¢_SPC_IÁ”çûID_E1_¥ecs_1 + + + @InterfaceID-F1.c + +8  + ~"IÁ”çûID-F1.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûID_F1_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_F1 +, +glob®GNB_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_Glob®GNB_ID +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_F1 +, +gNB_DU_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_GNB_DU_ID +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûID_F1_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûID_F1_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çûID_F1_¥ecs_1 + = { + +38 ( +IÁ”çûID_F1 +), + +39 +off£tof +( +IÁ”çûID_F1 +, +_a¢_ùx +), + +40 +a¢_MAP_IÁ”çûID_F1_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûID_F1 + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_IÁ”çûID_F1_gs_1 +, + +50 ( +a¢_DEF_IÁ”çûID_F1_gs_1 +) + +51 /( +a¢_DEF_IÁ”çûID_F1_gs_1 +[0]), + +52 +a¢_DEF_IÁ”çûID_F1_gs_1 +, + +53 ( +a¢_DEF_IÁ”çûID_F1_gs_1 +) + +54 /( +a¢_DEF_IÁ”çûID_F1_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_IÁ”çûID_F1_1 +, + +58 & +a¢_SPC_IÁ”çûID_F1_¥ecs_1 + + + @InterfaceID-NG.c + +8  + ~"IÁ”çûID-NG.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûID_NG_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_NG +, +guami +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_GUAMI +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûID_NG_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûID_NG_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çûID_NG_¥ecs_1 + = { + +28 ( +IÁ”çûID_NG +), + +29 +off£tof +( +IÁ”çûID_NG +, +_a¢_ùx +), + +30 +a¢_MAP_IÁ”çûID_NG_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûID_NG + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_IÁ”çûID_NG_gs_1 +, + +40 ( +a¢_DEF_IÁ”çûID_NG_gs_1 +) + +41 /( +a¢_DEF_IÁ”çûID_NG_gs_1 +[0]), + +42 +a¢_DEF_IÁ”çûID_NG_gs_1 +, + +43 ( +a¢_DEF_IÁ”çûID_NG_gs_1 +) + +44 /( +a¢_DEF_IÁ”çûID_NG_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_IÁ”çûID_NG_1 +, + +48 & +a¢_SPC_IÁ”çûID_NG_¥ecs_1 + + + @InterfaceID-S1.c + +8  + ~"IÁ”çûID-S1.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûID_S1_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_S1 +, +gUMMEI +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_GUMMEI +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûID_S1_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûID_S1_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çûID_S1_¥ecs_1 + = { + +28 ( +IÁ”çûID_S1 +), + +29 +off£tof +( +IÁ”çûID_S1 +, +_a¢_ùx +), + +30 +a¢_MAP_IÁ”çûID_S1_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûID_S1 + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_IÁ”çûID_S1_gs_1 +, + +40 ( +a¢_DEF_IÁ”çûID_S1_gs_1 +) + +41 /( +a¢_DEF_IÁ”çûID_S1_gs_1 +[0]), + +42 +a¢_DEF_IÁ”çûID_S1_gs_1 +, + +43 ( +a¢_DEF_IÁ”çûID_S1_gs_1 +) + +44 /( +a¢_DEF_IÁ”çûID_S1_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_IÁ”çûID_S1_1 +, + +48 & +a¢_SPC_IÁ”çûID_S1_¥ecs_1 + + + @InterfaceID-W1.c + +8  + ~"IÁ”çûID-W1.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûID_W1_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_W1 +, +glob®_ng_eNB_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_Glob®NgENB_ID +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_W1 +, +ng_eNB_DU_ID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_NGENB_DU_ID +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûID_W1_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûID_W1_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çûID_W1_¥ecs_1 + = { + +38 ( +IÁ”çûID_W1 +), + +39 +off£tof +( +IÁ”çûID_W1 +, +_a¢_ùx +), + +40 +a¢_MAP_IÁ”çûID_W1_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûID_W1 + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_IÁ”çûID_W1_gs_1 +, + +50 ( +a¢_DEF_IÁ”çûID_W1_gs_1 +) + +51 /( +a¢_DEF_IÁ”çûID_W1_gs_1 +[0]), + +52 +a¢_DEF_IÁ”çûID_W1_gs_1 +, + +53 ( +a¢_DEF_IÁ”çûID_W1_gs_1 +) + +54 /( +a¢_DEF_IÁ”çûID_W1_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_IÁ”çûID_W1_1 +, + +58 & +a¢_SPC_IÁ”çûID_W1_¥ecs_1 + + + @InterfaceID-X2.c + +8  + ~"IÁ”çûID-X2.h +" + +10  + ~"Glob®ENB-ID.h +" + +11  + ~"Glob®’GNB-ID.h +" + +12  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_nodeTy³_cÚ¡r_2 + + gCC_NOTUSED + = { + +13 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +14 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +17  +a¢_TYPE_memb”_t + + ga¢_MBR_nodeTy³_2 +[] = { + +18 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûID_X2__nodeTy³ +, +choiû +. +glob®_eNB_ID +), + +19 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +21 & +a¢_DEF_Glob®ENB_ID +, + +27 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûID_X2__nodeTy³ +, +choiû +. +glob®_’_gNB_ID +), + +28 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +30 & +a¢_DEF_Glob®’GNB_ID +, + +37 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_nodeTy³_g2–_2 +[] = { + +38 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +39 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +41  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_nodeTy³_¥ecs_2 + = { + +42 ( +IÁ”çûID_X2__nodeTy³ +), + +43 +off£tof +( +IÁ”çûID_X2__nodeTy³ +, +_a¢_ùx +), + +44 +off£tof +( +IÁ”çûID_X2__nodeTy³ +, +´e£Á +), + +45 ((( +IÁ”çûID_X2__nodeTy³ + *)0)-> +´e£Á +), + +46 +a¢_MAP_nodeTy³_g2–_2 +, + +52 +a¢_TYPE_desütÜ_t + + ga¢_DEF_nodeTy³_2 + = { + +55 & +a¢_OP_CHOICE +, + +60 { 0, & +a¢_PER_ty³_nodeTy³_cÚ¡r_2 +, +CHOICE_cÚ¡¿št + }, + +61 +a¢_MBR_nodeTy³_2 +, + +63 & +a¢_SPC_nodeTy³_¥ecs_2 + + +66 +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûID_X2_1 +[] = { + +67 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_X2 +, +nodeTy³ +), + +68 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +70 & +a¢_DEF_nodeTy³_2 +, + +77 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûID_X2_gs_1 +[] = { + +78 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +80 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûID_X2_g2–_1 +[] = { + +81 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +83 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çûID_X2_¥ecs_1 + = { + +84 ( +IÁ”çûID_X2 +), + +85 +off£tof +( +IÁ”çûID_X2 +, +_a¢_ùx +), + +86 +a¢_MAP_IÁ”çûID_X2_g2–_1 +, + +91 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûID_X2 + = { + +94 & +a¢_OP_SEQUENCE +, + +95 +a¢_DEF_IÁ”çûID_X2_gs_1 +, + +96 ( +a¢_DEF_IÁ”çûID_X2_gs_1 +) + +97 /( +a¢_DEF_IÁ”çûID_X2_gs_1 +[0]), + +98 +a¢_DEF_IÁ”çûID_X2_gs_1 +, + +99 ( +a¢_DEF_IÁ”çûID_X2_gs_1 +) + +100 /( +a¢_DEF_IÁ”çûID_X2_gs_1 +[0]), + +101 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +102 +a¢_MBR_IÁ”çûID_X2_1 +, + +104 & +a¢_SPC_IÁ”çûID_X2_¥ecs_1 + + + @InterfaceID-Xn.c + +8  + ~"IÁ”çûID-Xn.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûID_Xn_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +IÁ”çûID_Xn +, +glob®_NG_RAN_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_Glob®NGRANNodeID +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûID_Xn_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûID_Xn_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_IÁ”çûID_Xn_¥ecs_1 + = { + +28 ( +IÁ”çûID_Xn +), + +29 +off£tof +( +IÁ”çûID_Xn +, +_a¢_ùx +), + +30 +a¢_MAP_IÁ”çûID_Xn_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûID_Xn + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_IÁ”çûID_Xn_gs_1 +, + +40 ( +a¢_DEF_IÁ”çûID_Xn_gs_1 +) + +41 /( +a¢_DEF_IÁ”çûID_Xn_gs_1 +[0]), + +42 +a¢_DEF_IÁ”çûID_Xn_gs_1 +, + +43 ( +a¢_DEF_IÁ”çûID_Xn_gs_1 +) + +44 /( +a¢_DEF_IÁ”çûID_Xn_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_IÁ”çûID_Xn_1 +, + +48 & +a¢_SPC_IÁ”çûID_Xn_¥ecs_1 + + + @InterfaceIdentifier.c + +8  + ~"IÁ”çûId’tif›r.h +" + +10  + ~"IÁ”çûID-NG.h +" + +11  + ~"IÁ”çûID-Xn.h +" + +12  + ~"IÁ”çûID-F1.h +" + +13  + ~"IÁ”çûID-E1.h +" + +14  + ~"IÁ”çûID-S1.h +" + +15  + ~"IÁ”çûID-X2.h +" + +16  + ~"IÁ”çûID-W1.h +" + +17  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_IÁ”çûId’tif›r_cÚ¡r_1 + + gCC_NOTUSED + = { + +18 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 3, 3, 0, 6 } , + +19 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +22  +a¢_TYPE_memb”_t + + ga¢_MBR_IÁ”çûId’tif›r_1 +[] = { + +23 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûId’tif›r +, +choiû +. +nG +), + +24 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +26 & +a¢_DEF_IÁ”çûID_NG +, + +32 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûId’tif›r +, +choiû +. +xN +), + +33 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +35 & +a¢_DEF_IÁ”çûID_Xn +, + +41 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûId’tif›r +, +choiû +. +f1 +), + +42 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +44 & +a¢_DEF_IÁ”çûID_F1 +, + +50 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûId’tif›r +, +choiû +. +e1 +), + +51 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +53 & +a¢_DEF_IÁ”çûID_E1 +, + +59 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûId’tif›r +, +choiû +. +s1 +), + +60 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +62 & +a¢_DEF_IÁ”çûID_S1 +, + +68 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûId’tif›r +, +choiû +. +x2 +), + +69 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +71 & +a¢_DEF_IÁ”çûID_X2 +, + +77 { +ATF_POINTER +, 0, +off£tof +( +IÁ”çûId’tif›r +, +choiû +. +w1 +), + +78 ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), + +80 & +a¢_DEF_IÁ”çûID_W1 +, + +87 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_IÁ”çûId’tif›r_g2–_1 +[] = { + +88 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +89 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +90 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +91 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +92 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +93 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 }, + +94 { ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), 6, 0, 0 } + +96  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_IÁ”çûId’tif›r_¥ecs_1 + = { + +97 ( +IÁ”çûId’tif›r +), + +98 +off£tof +( +IÁ”çûId’tif›r +, +_a¢_ùx +), + +99 +off£tof +( +IÁ”çûId’tif›r +, +´e£Á +), + +100 ((( +IÁ”çûId’tif›r + *)0)-> +´e£Á +), + +101 +a¢_MAP_IÁ”çûId’tif›r_g2–_1 +, + +106 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûId’tif›r + = { + +109 & +a¢_OP_CHOICE +, + +114 { 0, & +a¢_PER_ty³_IÁ”çûId’tif›r_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +115 +a¢_MBR_IÁ”çûId’tif›r_1 +, + +117 & +a¢_SPC_IÁ”çûId’tif›r_¥ecs_1 + + + @InterfaceType.c + +8  + ~"IÁ”çûTy³.h +" + +14  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_IÁ”çûTy³_cÚ¡r_1 + + gCC_NOTUSED + = { + +15 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 3, 3, 0, 6 } , + +16 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +19 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_IÁ”çûTy³_v®ue2’um_1 +[] = { + +29 cÚ¡  + ga¢_MAP_IÁ”çûTy³_’um2v®ue_1 +[] = { + +39 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_IÁ”çûTy³_¥ecs_1 + = { + +40 +a¢_MAP_IÁ”çûTy³_v®ue2’um_1 +, + +41 +a¢_MAP_IÁ”çûTy³_’um2v®ue_1 +, + +48 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_IÁ”çûTy³_gs_1 +[] = { + +49 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +51 +a¢_TYPE_desütÜ_t + + ga¢_DEF_IÁ”çûTy³ + = { + +54 & +a¢_OP_N©iveEnum”©ed +, + +55 +a¢_DEF_IÁ”çûTy³_gs_1 +, + +56 ( +a¢_DEF_IÁ”çûTy³_gs_1 +) + +57 /( +a¢_DEF_IÁ”çûTy³_gs_1 +[0]), + +58 +a¢_DEF_IÁ”çûTy³_gs_1 +, + +59 ( +a¢_DEF_IÁ”çûTy³_gs_1 +) + +60 /( +a¢_DEF_IÁ”çûTy³_gs_1 +[0]), + +61 { 0, & +a¢_PER_ty³_IÁ”çûTy³_cÚ¡r_1 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +63 & +a¢_SPC_IÁ”çûTy³_¥ecs_1 + + + @LabelInfoItem.c + +8  + ~"Lab–InfoI‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_Lab–InfoI‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +Lab–InfoI‹m +, +m—sLab– +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_M—su»m’tLab– +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Lab–InfoI‹m_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Lab–InfoI‹m_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_Lab–InfoI‹m_¥ecs_1 + = { + +28 ( +Lab–InfoI‹m +), + +29 +off£tof +( +Lab–InfoI‹m +, +_a¢_ùx +), + +30 +a¢_MAP_Lab–InfoI‹m_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Lab–InfoI‹m + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_Lab–InfoI‹m_gs_1 +, + +40 ( +a¢_DEF_Lab–InfoI‹m_gs_1 +) + +41 /( +a¢_DEF_Lab–InfoI‹m_gs_1 +[0]), + +42 +a¢_DEF_Lab–InfoI‹m_gs_1 +, + +43 ( +a¢_DEF_Lab–InfoI‹m_gs_1 +) + +44 /( +a¢_DEF_Lab–InfoI‹m_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_Lab–InfoI‹m_1 +, + +48 & +a¢_SPC_Lab–InfoI‹m_¥ecs_1 + + + @LabelInfoList.c + +8  + ~"Lab–InfoLi¡.h +" + +10  + ~"Lab–InfoI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_Lab–InfoLi¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 31, -1, 1, 2147483647 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_Lab–InfoLi¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_Lab–InfoI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Lab–InfoLi¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_Lab–InfoLi¡_¥ecs_1 + = { + +31 ( +Lab–InfoLi¡ +), + +32 +off£tof +( +Lab–InfoLi¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Lab–InfoLi¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_Lab–InfoLi¡_gs_1 +, + +40 ( +a¢_DEF_Lab–InfoLi¡_gs_1 +) + +41 /( +a¢_DEF_Lab–InfoLi¡_gs_1 +[0]), + +42 +a¢_DEF_Lab–InfoLi¡_gs_1 +, + +43 ( +a¢_DEF_Lab–InfoLi¡_gs_1 +) + +44 /( +a¢_DEF_Lab–InfoLi¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_Lab–InfoLi¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_Lab–InfoLi¡_1 +, + +48 & +a¢_SPC_Lab–InfoLi¡_¥ecs_1 + + + @MME-Code.c + +8  + ~"MME-Code.h +" + +11 + $MME_Code_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 1)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_MME_Code_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 1, 1 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_MME_Code_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_MME_Code + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_MME_Code_gs_1 +, + +53 ( +a¢_DEF_MME_Code_gs_1 +) + +54 /( +a¢_DEF_MME_Code_gs_1 +[0]), + +55 +a¢_DEF_MME_Code_gs_1 +, + +56 ( +a¢_DEF_MME_Code_gs_1 +) + +57 /( +a¢_DEF_MME_Code_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_MME_Code_cÚ¡r_1 +, +MME_Code_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @MME-Group-ID.c + +8  + ~"MME-Group-ID.h +" + +11 + $MME_Group_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 2)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_MME_Group_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 2, 2 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_MME_Group_ID_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_MME_Group_ID + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_MME_Group_ID_gs_1 +, + +53 ( +a¢_DEF_MME_Group_ID_gs_1 +) + +54 /( +a¢_DEF_MME_Group_ID_gs_1 +[0]), + +55 +a¢_DEF_MME_Group_ID_gs_1 +, + +56 ( +a¢_DEF_MME_Group_ID_gs_1 +) + +57 /( +a¢_DEF_MME_Group_ID_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_MME_Group_ID_cÚ¡r_1 +, +MME_Group_ID_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @MME-UE-S1AP-ID.c + +8  + ~"MME-UE-S1AP-ID.h +" + +11 + $MME_UE_S1AP_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +14 if(! +¥Œ +) { + +15 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +17 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +24 + } +} + +30 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_MME_UE_S1AP_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +31 { +APC_CONSTRAINED +, 32, -1, 0, 4294967295 } , + +32 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +35 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_MME_UE_S1AP_ID_¥ecs_1 + = { + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_MME_UE_S1AP_ID_gs_1 +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +43 +a¢_TYPE_desütÜ_t + + ga¢_DEF_MME_UE_S1AP_ID + = { + +46 & +a¢_OP_N©iveIÁeg” +, + +47 +a¢_DEF_MME_UE_S1AP_ID_gs_1 +, + +48 ( +a¢_DEF_MME_UE_S1AP_ID_gs_1 +) + +49 /( +a¢_DEF_MME_UE_S1AP_ID_gs_1 +[0]), + +50 +a¢_DEF_MME_UE_S1AP_ID_gs_1 +, + +51 ( +a¢_DEF_MME_UE_S1AP_ID_gs_1 +) + +52 /( +a¢_DEF_MME_UE_S1AP_ID_gs_1 +[0]), + +53 { 0, & +a¢_PER_ty³_MME_UE_S1AP_ID_cÚ¡r_1 +, +MME_UE_S1AP_ID_cÚ¡¿št + }, + +55 & +a¢_SPC_MME_UE_S1AP_ID_¥ecs_1 + + + @MatchingCondItem.c + +8  + ~"M©chšgCÚdI‹m.h +" + +10  + ~"M—su»m’tLab–.h +" + +11  + ~"Te¡CÚdInfo.h +" + +12 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M©chšgCÚdI‹m_cÚ¡r_1 + + gCC_NOTUSED + = { + +13 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +14 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +17 +a¢_TYPE_memb”_t + + ga¢_MBR_M©chšgCÚdI‹m_1 +[] = { + +18 { +ATF_POINTER +, 0, +off£tof +( +M©chšgCÚdI‹m +, +choiû +. +m—sLab– +), + +19 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +21 & +a¢_DEF_M—su»m’tLab– +, + +27 { +ATF_POINTER +, 0, +off£tof +( +M©chšgCÚdI‹m +, +choiû +. +‹¡CÚdInfo +), + +28 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +30 & +a¢_DEF_Te¡CÚdInfo +, + +37 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M©chšgCÚdI‹m_g2–_1 +[] = { + +38 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +39 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +41 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_M©chšgCÚdI‹m_¥ecs_1 + = { + +42 ( +M©chšgCÚdI‹m +), + +43 +off£tof +( +M©chšgCÚdI‹m +, +_a¢_ùx +), + +44 +off£tof +( +M©chšgCÚdI‹m +, +´e£Á +), + +45 ((( +M©chšgCÚdI‹m + *)0)-> +´e£Á +), + +46 +a¢_MAP_M©chšgCÚdI‹m_g2–_1 +, + +51 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M©chšgCÚdI‹m + = { + +54 & +a¢_OP_CHOICE +, + +59 { 0, & +a¢_PER_ty³_M©chšgCÚdI‹m_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +60 +a¢_MBR_M©chšgCÚdI‹m_1 +, + +62 & +a¢_SPC_M©chšgCÚdI‹m_¥ecs_1 + + + @MatchingCondList.c + +8  + ~"M©chšgCÚdLi¡.h +" + +10  + ~"M©chšgCÚdI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M©chšgCÚdLi¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 15, 15, 1, 32768 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M©chšgCÚdLi¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +20 & +a¢_DEF_M©chšgCÚdI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M©chšgCÚdLi¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M©chšgCÚdLi¡_¥ecs_1 + = { + +31 ( +M©chšgCÚdLi¡ +), + +32 +off£tof +( +M©chšgCÚdLi¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M©chšgCÚdLi¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M©chšgCÚdLi¡_gs_1 +, + +40 ( +a¢_DEF_M©chšgCÚdLi¡_gs_1 +) + +41 /( +a¢_DEF_M©chšgCÚdLi¡_gs_1 +[0]), + +42 +a¢_DEF_M©chšgCÚdLi¡_gs_1 +, + +43 ( +a¢_DEF_M©chšgCÚdLi¡_gs_1 +) + +44 /( +a¢_DEF_M©chšgCÚdLi¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M©chšgCÚdLi¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M©chšgCÚdLi¡_1 +, + +48 & +a¢_SPC_M©chšgCÚdLi¡_¥ecs_1 + + + @MatchingUEidItem.c + +8  + ~"M©chšgUEidI‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_M©chšgUEidI‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +M©chšgUEidI‹m +, +ueID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_UEID +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M©chšgUEidI‹m_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M©chšgUEidI‹m_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_M©chšgUEidI‹m_¥ecs_1 + = { + +28 ( +M©chšgUEidI‹m +), + +29 +off£tof +( +M©chšgUEidI‹m +, +_a¢_ùx +), + +30 +a¢_MAP_M©chšgUEidI‹m_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M©chšgUEidI‹m + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_M©chšgUEidI‹m_gs_1 +, + +40 ( +a¢_DEF_M©chšgUEidI‹m_gs_1 +) + +41 /( +a¢_DEF_M©chšgUEidI‹m_gs_1 +[0]), + +42 +a¢_DEF_M©chšgUEidI‹m_gs_1 +, + +43 ( +a¢_DEF_M©chšgUEidI‹m_gs_1 +) + +44 /( +a¢_DEF_M©chšgUEidI‹m_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_M©chšgUEidI‹m_1 +, + +48 & +a¢_SPC_M©chšgUEidI‹m_¥ecs_1 + + + @MatchingUEidList.c + +8  + ~"M©chšgUEidLi¡.h +" + +10  + ~"M©chšgUEidI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M©chšgUEidLi¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 16, 16, 1, 65535 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M©chšgUEidLi¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_M©chšgUEidI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M©chšgUEidLi¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M©chšgUEidLi¡_¥ecs_1 + = { + +31 ( +M©chšgUEidLi¡ +), + +32 +off£tof +( +M©chšgUEidLi¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M©chšgUEidLi¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M©chšgUEidLi¡_gs_1 +, + +40 ( +a¢_DEF_M©chšgUEidLi¡_gs_1 +) + +41 /( +a¢_DEF_M©chšgUEidLi¡_gs_1 +[0]), + +42 +a¢_DEF_M©chšgUEidLi¡_gs_1 +, + +43 ( +a¢_DEF_M©chšgUEidLi¡_gs_1 +) + +44 /( +a¢_DEF_M©chšgUEidLi¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M©chšgUEidLi¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M©chšgUEidLi¡_1 +, + +48 & +a¢_SPC_M©chšgUEidLi¡_¥ecs_1 + + + @MeasurementCondItem.c + +8  + ~"M—su»m’tCÚdI‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tCÚdI‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tCÚdI‹m +, +m—sTy³ +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_M—su»m’tTy³ +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tCÚdI‹m +, +m©chšgCÚd +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_M©chšgCÚdLi¡ +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tCÚdI‹m_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tCÚdI‹m_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_M—su»m’tCÚdI‹m_¥ecs_1 + = { + +38 ( +M—su»m’tCÚdI‹m +), + +39 +off£tof +( +M—su»m’tCÚdI‹m +, +_a¢_ùx +), + +40 +a¢_MAP_M—su»m’tCÚdI‹m_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tCÚdI‹m + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_M—su»m’tCÚdI‹m_gs_1 +, + +50 ( +a¢_DEF_M—su»m’tCÚdI‹m_gs_1 +) + +51 /( +a¢_DEF_M—su»m’tCÚdI‹m_gs_1 +[0]), + +52 +a¢_DEF_M—su»m’tCÚdI‹m_gs_1 +, + +53 ( +a¢_DEF_M—su»m’tCÚdI‹m_gs_1 +) + +54 /( +a¢_DEF_M—su»m’tCÚdI‹m_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_M—su»m’tCÚdI‹m_1 +, + +58 & +a¢_SPC_M—su»m’tCÚdI‹m_¥ecs_1 + + + @MeasurementCondList.c + +8  + ~"M—su»m’tCÚdLi¡.h +" + +10  + ~"M—su»m’tCÚdI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tCÚdLi¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 16, 16, 1, 65535 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tCÚdLi¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_M—su»m’tCÚdI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tCÚdLi¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M—su»m’tCÚdLi¡_¥ecs_1 + = { + +31 ( +M—su»m’tCÚdLi¡ +), + +32 +off£tof +( +M—su»m’tCÚdLi¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tCÚdLi¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M—su»m’tCÚdLi¡_gs_1 +, + +40 ( +a¢_DEF_M—su»m’tCÚdLi¡_gs_1 +) + +41 /( +a¢_DEF_M—su»m’tCÚdLi¡_gs_1 +[0]), + +42 +a¢_DEF_M—su»m’tCÚdLi¡_gs_1 +, + +43 ( +a¢_DEF_M—su»m’tCÚdLi¡_gs_1 +) + +44 /( +a¢_DEF_M—su»m’tCÚdLi¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M—su»m’tCÚdLi¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M—su»m’tCÚdLi¡_1 +, + +48 & +a¢_SPC_M—su»m’tCÚdLi¡_¥ecs_1 + + + @MeasurementCondUEidItem.c + +8  + ~"M—su»m’tCÚdUEidI‹m.h +" + +10  + ~"M©chšgUEidLi¡.h +" + +11 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tCÚdUEidI‹m_1 +[] = { + +12 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tCÚdUEidI‹m +, +m—sTy³ +), + +13 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +15 & +a¢_DEF_M—su»m’tTy³ +, + +21 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tCÚdUEidI‹m +, +m©chšgCÚd +), + +22 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +24 & +a¢_DEF_M©chšgCÚdLi¡ +, + +30 { +ATF_POINTER +, 1, +off£tof +( +M—su»m’tCÚdUEidI‹m +, +m©chšgUEidLi¡ +), + +31 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +33 & +a¢_DEF_M©chšgUEidLi¡ +, + +40 cÚ¡  + ga¢_MAP_M—su»m’tCÚdUEidI‹m_oms_1 +[] = { 2 }; + +41 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tCÚdUEidI‹m_gs_1 +[] = { + +42 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +44 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tCÚdUEidI‹m_g2–_1 +[] = { + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +46 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +47 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +49 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_M—su»m’tCÚdUEidI‹m_¥ecs_1 + = { + +50 ( +M—su»m’tCÚdUEidI‹m +), + +51 +off£tof +( +M—su»m’tCÚdUEidI‹m +, +_a¢_ùx +), + +52 +a¢_MAP_M—su»m’tCÚdUEidI‹m_g2–_1 +, + +54 +a¢_MAP_M—su»m’tCÚdUEidI‹m_oms_1 +, + +58 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tCÚdUEidI‹m + = { + +61 & +a¢_OP_SEQUENCE +, + +62 +a¢_DEF_M—su»m’tCÚdUEidI‹m_gs_1 +, + +63 ( +a¢_DEF_M—su»m’tCÚdUEidI‹m_gs_1 +) + +64 /( +a¢_DEF_M—su»m’tCÚdUEidI‹m_gs_1 +[0]), + +65 +a¢_DEF_M—su»m’tCÚdUEidI‹m_gs_1 +, + +66 ( +a¢_DEF_M—su»m’tCÚdUEidI‹m_gs_1 +) + +67 /( +a¢_DEF_M—su»m’tCÚdUEidI‹m_gs_1 +[0]), + +68 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +69 +a¢_MBR_M—su»m’tCÚdUEidI‹m_1 +, + +71 & +a¢_SPC_M—su»m’tCÚdUEidI‹m_¥ecs_1 + + + @MeasurementCondUEidList.c + +8  + ~"M—su»m’tCÚdUEidLi¡.h +" + +10  + ~"M—su»m’tCÚdUEidI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tCÚdUEidLi¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 16, 16, 1, 65535 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tCÚdUEidLi¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_M—su»m’tCÚdUEidI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tCÚdUEidLi¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M—su»m’tCÚdUEidLi¡_¥ecs_1 + = { + +31 ( +M—su»m’tCÚdUEidLi¡ +), + +32 +off£tof +( +M—su»m’tCÚdUEidLi¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tCÚdUEidLi¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M—su»m’tCÚdUEidLi¡_gs_1 +, + +40 ( +a¢_DEF_M—su»m’tCÚdUEidLi¡_gs_1 +) + +41 /( +a¢_DEF_M—su»m’tCÚdUEidLi¡_gs_1 +[0]), + +42 +a¢_DEF_M—su»m’tCÚdUEidLi¡_gs_1 +, + +43 ( +a¢_DEF_M—su»m’tCÚdUEidLi¡_gs_1 +) + +44 /( +a¢_DEF_M—su»m’tCÚdUEidLi¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M—su»m’tCÚdUEidLi¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M—su»m’tCÚdUEidLi¡_1 +, + +48 & +a¢_SPC_M—su»m’tCÚdUEidLi¡_¥ecs_1 + + + @MeasurementData.c + +8  + ~"M—su»m’tD©a.h +" + +10  + ~"M—su»m’tD©aI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tD©a_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 16, 16, 1, 65535 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tD©a_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_M—su»m’tD©aI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tD©a_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M—su»m’tD©a_¥ecs_1 + = { + +31 ( +M—su»m’tD©a +), + +32 +off£tof +( +M—su»m’tD©a +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tD©a + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M—su»m’tD©a_gs_1 +, + +40 ( +a¢_DEF_M—su»m’tD©a_gs_1 +) + +41 /( +a¢_DEF_M—su»m’tD©a_gs_1 +[0]), + +42 +a¢_DEF_M—su»m’tD©a_gs_1 +, + +43 ( +a¢_DEF_M—su»m’tD©a_gs_1 +) + +44 /( +a¢_DEF_M—su»m’tD©a_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M—su»m’tD©a_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M—su»m’tD©a_1 +, + +48 & +a¢_SPC_M—su»m’tD©a_¥ecs_1 + + + @MeasurementDataItem.c + +8  + ~"M—su»m’tD©aI‹m.h +" + +14  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_šcom¶‘eFÏg_cÚ¡r_3 + + gCC_NOTUSED + = { + +15 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +16 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +19 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_šcom¶‘eFÏg_v®ue2’um_3 +[] = { + +23 cÚ¡  + ga¢_MAP_šcom¶‘eFÏg_’um2v®ue_3 +[] = { + +27 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_šcom¶‘eFÏg_¥ecs_3 + = { + +28 +a¢_MAP_šcom¶‘eFÏg_v®ue2’um_3 +, + +29 +a¢_MAP_šcom¶‘eFÏg_’um2v®ue_3 +, + +36 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_šcom¶‘eFÏg_gs_3 +[] = { + +37 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +38 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +41 +a¢_TYPE_desütÜ_t + + ga¢_DEF_šcom¶‘eFÏg_3 + = { + +44 & +a¢_OP_N©iveEnum”©ed +, + +45 +a¢_DEF_šcom¶‘eFÏg_gs_3 +, + +46 ( +a¢_DEF_šcom¶‘eFÏg_gs_3 +) + +47 /( +a¢_DEF_šcom¶‘eFÏg_gs_3 +[0]) - 1, + +48 +a¢_DEF_šcom¶‘eFÏg_gs_3 +, + +49 ( +a¢_DEF_šcom¶‘eFÏg_gs_3 +) + +50 /( +a¢_DEF_šcom¶‘eFÏg_gs_3 +[0]), + +51 { 0, & +a¢_PER_ty³_šcom¶‘eFÏg_cÚ¡r_3 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +53 & +a¢_SPC_šcom¶‘eFÏg_¥ecs_3 + + +56 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tD©aI‹m_1 +[] = { + +57 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tD©aI‹m +, +m—sRecÜd +), + +58 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +60 & +a¢_DEF_M—su»m’tRecÜd +, + +66 { +ATF_POINTER +, 1, +off£tof +( +M—su»m’tD©aI‹m +, +šcom¶‘eFÏg +), + +67 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +69 & +a¢_DEF_šcom¶‘eFÏg_3 +, + +76 cÚ¡  + ga¢_MAP_M—su»m’tD©aI‹m_oms_1 +[] = { 1 }; + +77 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tD©aI‹m_gs_1 +[] = { + +78 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +80 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tD©aI‹m_g2–_1 +[] = { + +81 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +82 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +84 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_M—su»m’tD©aI‹m_¥ecs_1 + = { + +85 ( +M—su»m’tD©aI‹m +), + +86 +off£tof +( +M—su»m’tD©aI‹m +, +_a¢_ùx +), + +87 +a¢_MAP_M—su»m’tD©aI‹m_g2–_1 +, + +89 +a¢_MAP_M—su»m’tD©aI‹m_oms_1 +, + +93 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tD©aI‹m + = { + +96 & +a¢_OP_SEQUENCE +, + +97 +a¢_DEF_M—su»m’tD©aI‹m_gs_1 +, + +98 ( +a¢_DEF_M—su»m’tD©aI‹m_gs_1 +) + +99 /( +a¢_DEF_M—su»m’tD©aI‹m_gs_1 +[0]), + +100 +a¢_DEF_M—su»m’tD©aI‹m_gs_1 +, + +101 ( +a¢_DEF_M—su»m’tD©aI‹m_gs_1 +) + +102 /( +a¢_DEF_M—su»m’tD©aI‹m_gs_1 +[0]), + +103 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +104 +a¢_MBR_M—su»m’tD©aI‹m_1 +, + +106 & +a¢_SPC_M—su»m’tD©aI‹m_¥ecs_1 + + + @MeasurementInfo-Action-Item.c + +8  + ~"M—su»m’tInfo-AùiÚ-I‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tInfo_AùiÚ_I‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tInfo_AùiÚ_I‹m +, +m—sName +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_M—su»m’tTy³Name +, + +20 { +ATF_POINTER +, 1, +off£tof +( +M—su»m’tInfo_AùiÚ_I‹m +, +m—sID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_M—su»m’tTy³ID +, + +30 cÚ¡  + ga¢_MAP_M—su»m’tInfo_AùiÚ_I‹m_oms_1 +[] = { 1 }; + +31 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tInfo_AùiÚ_I‹m_gs_1 +[] = { + +32 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +34 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tInfo_AùiÚ_I‹m_g2–_1 +[] = { + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +38 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_M—su»m’tInfo_AùiÚ_I‹m_¥ecs_1 + = { + +39 ( +M—su»m’tInfo_AùiÚ_I‹m +), + +40 +off£tof +( +M—su»m’tInfo_AùiÚ_I‹m +, +_a¢_ùx +), + +41 +a¢_MAP_M—su»m’tInfo_AùiÚ_I‹m_g2–_1 +, + +43 +a¢_MAP_M—su»m’tInfo_AùiÚ_I‹m_oms_1 +, + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tInfo_AùiÚ_I‹m + = { + +50 & +a¢_OP_SEQUENCE +, + +51 +a¢_DEF_M—su»m’tInfo_AùiÚ_I‹m_gs_1 +, + +52 ( +a¢_DEF_M—su»m’tInfo_AùiÚ_I‹m_gs_1 +) + +53 /( +a¢_DEF_M—su»m’tInfo_AùiÚ_I‹m_gs_1 +[0]), + +54 +a¢_DEF_M—su»m’tInfo_AùiÚ_I‹m_gs_1 +, + +55 ( +a¢_DEF_M—su»m’tInfo_AùiÚ_I‹m_gs_1 +) + +56 /( +a¢_DEF_M—su»m’tInfo_AùiÚ_I‹m_gs_1 +[0]), + +57 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +58 +a¢_MBR_M—su»m’tInfo_AùiÚ_I‹m_1 +, + +60 & +a¢_SPC_M—su»m’tInfo_AùiÚ_I‹m_¥ecs_1 + + + @MeasurementInfo-Action-List.c + +8  + ~"M—su»m’tInfo-AùiÚ-Li¡.h +" + +10  + ~"M—su»m’tInfo-AùiÚ-I‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tInfo_AùiÚ_Li¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 16, 16, 1, 65535 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tInfo_AùiÚ_Li¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_M—su»m’tInfo_AùiÚ_I‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tInfo_AùiÚ_Li¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M—su»m’tInfo_AùiÚ_Li¡_¥ecs_1 + = { + +31 ( +M—su»m’tInfo_AùiÚ_Li¡ +), + +32 +off£tof +( +M—su»m’tInfo_AùiÚ_Li¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tInfo_AùiÚ_Li¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M—su»m’tInfo_AùiÚ_Li¡_gs_1 +, + +40 ( +a¢_DEF_M—su»m’tInfo_AùiÚ_Li¡_gs_1 +) + +41 /( +a¢_DEF_M—su»m’tInfo_AùiÚ_Li¡_gs_1 +[0]), + +42 +a¢_DEF_M—su»m’tInfo_AùiÚ_Li¡_gs_1 +, + +43 ( +a¢_DEF_M—su»m’tInfo_AùiÚ_Li¡_gs_1 +) + +44 /( +a¢_DEF_M—su»m’tInfo_AùiÚ_Li¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M—su»m’tInfo_AùiÚ_Li¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M—su»m’tInfo_AùiÚ_Li¡_1 +, + +48 & +a¢_SPC_M—su»m’tInfo_AùiÚ_Li¡_¥ecs_1 + + + @MeasurementInfoItem.c + +8  + ~"M—su»m’tInfoI‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tInfoI‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tInfoI‹m +, +m—sTy³ +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_M—su»m’tTy³ +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tInfoI‹m +, +Ïb–InfoLi¡ +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_Lab–InfoLi¡ +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tInfoI‹m_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tInfoI‹m_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_M—su»m’tInfoI‹m_¥ecs_1 + = { + +38 ( +M—su»m’tInfoI‹m +), + +39 +off£tof +( +M—su»m’tInfoI‹m +, +_a¢_ùx +), + +40 +a¢_MAP_M—su»m’tInfoI‹m_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tInfoI‹m + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_M—su»m’tInfoI‹m_gs_1 +, + +50 ( +a¢_DEF_M—su»m’tInfoI‹m_gs_1 +) + +51 /( +a¢_DEF_M—su»m’tInfoI‹m_gs_1 +[0]), + +52 +a¢_DEF_M—su»m’tInfoI‹m_gs_1 +, + +53 ( +a¢_DEF_M—su»m’tInfoI‹m_gs_1 +) + +54 /( +a¢_DEF_M—su»m’tInfoI‹m_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_M—su»m’tInfoI‹m_1 +, + +58 & +a¢_SPC_M—su»m’tInfoI‹m_¥ecs_1 + + + @MeasurementInfoList.c + +8  + ~"M—su»m’tInfoLi¡.h +" + +10  + ~"M—su»m’tInfoI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tInfoLi¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 16, 16, 1, 65535 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tInfoLi¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_M—su»m’tInfoI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tInfoLi¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M—su»m’tInfoLi¡_¥ecs_1 + = { + +31 ( +M—su»m’tInfoLi¡ +), + +32 +off£tof +( +M—su»m’tInfoLi¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tInfoLi¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M—su»m’tInfoLi¡_gs_1 +, + +40 ( +a¢_DEF_M—su»m’tInfoLi¡_gs_1 +) + +41 /( +a¢_DEF_M—su»m’tInfoLi¡_gs_1 +[0]), + +42 +a¢_DEF_M—su»m’tInfoLi¡_gs_1 +, + +43 ( +a¢_DEF_M—su»m’tInfoLi¡_gs_1 +) + +44 /( +a¢_DEF_M—su»m’tInfoLi¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M—su»m’tInfoLi¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M—su»m’tInfoLi¡_1 +, + +48 & +a¢_SPC_M—su»m’tInfoLi¡_¥ecs_1 + + + @MeasurementLabel.c + +8  + ~"M—su»m’tLab–.h +" + +10  + ~"S-NSSAI.h +" + +40 + $memb_aRPmax_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +41 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +42  +v®ue +; + +44 if(! +¥Œ +) { + +45 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +47 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +51 +v®ue + = *(cÚ¡ *) +¥Œ +; + +53 if(( +v®ue + >= 1 && value <= 15)) { + +57 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +59 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +62 + } +} + +65 + $memb_aRPmš_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +66 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +67  +v®ue +; + +69 if(! +¥Œ +) { + +70 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +72 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +76 +v®ue + = *(cÚ¡ *) +¥Œ +; + +78 if(( +v®ue + >= 1 && value <= 15)) { + +82 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +84 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +87 + } +} + +90 + $memb_b™¿‹Rªge_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +91 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +92  +v®ue +; + +94 if(! +¥Œ +) { + +95 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +97 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +101 +v®ue + = *(cÚ¡ *) +¥Œ +; + +103 if(( +v®ue + >= 1 && value <= 65535)) { + +107 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +109 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +112 + } +} + +115 + $memb_Ïy”MU_MIMO_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +116 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +117  +v®ue +; + +119 if(! +¥Œ +) { + +120 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +122 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +126 +v®ue + = *(cÚ¡ *) +¥Œ +; + +128 if(( +v®ue + >= 1 && value <= 65535)) { + +132 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +134 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +137 + } +} + +140 + $memb_di¡BšX_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +141 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +142  +v®ue +; + +144 if(! +¥Œ +) { + +145 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +147 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +151 +v®ue + = *(cÚ¡ *) +¥Œ +; + +153 if(( +v®ue + >= 1 && value <= 65535)) { + +157 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +159 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +162 + } +} + +165 + $memb_di¡BšY_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +166 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +167  +v®ue +; + +169 if(! +¥Œ +) { + +170 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +172 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +176 +v®ue + = *(cÚ¡ *) +¥Œ +; + +178 if(( +v®ue + >= 1 && value <= 65535)) { + +182 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +184 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +187 + } +} + +190 + $memb_di¡BšZ_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +191 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +192  +v®ue +; + +194 if(! +¥Œ +) { + +195 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +197 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +201 +v®ue + = *(cÚ¡ *) +¥Œ +; + +203 if(( +v®ue + >= 1 && value <= 65535)) { + +207 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +209 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +212 + } +} + +214  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_noLab–_cÚ¡r_2 + + gCC_NOTUSED + = { + +215 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +216 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +219  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_sUM_cÚ¡r_16 + + gCC_NOTUSED + = { + +220 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +221 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +224  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_´eLab–Ov”ride_cÚ¡r_22 + + gCC_NOTUSED + = { + +225 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +226 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +229  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_¡¬tEndInd_cÚ¡r_25 + + gCC_NOTUSED + = { + +230 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +231 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +234  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_mš_cÚ¡r_29 + + gCC_NOTUSED + = { + +235 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +236 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +239  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_max_cÚ¡r_32 + + gCC_NOTUSED + = { + +240 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +241 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +244  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_avg_cÚ¡r_35 + + gCC_NOTUSED + = { + +245 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +246 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +249  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_aRPmax_cÚ¡r_12 + + gCC_NOTUSED + = { + +250 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 4, 4, 1, 15 } , + +251 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +254  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_aRPmš_cÚ¡r_13 + + gCC_NOTUSED + = { + +255 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 4, 4, 1, 15 } , + +256 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +259  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_b™¿‹Rªge_cÚ¡r_14 + + gCC_NOTUSED + = { + +260 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 16, 16, 1, 65535 } , + +261 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +264  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_Ïy”MU_MIMO_cÚ¡r_15 + + gCC_NOTUSED + = { + +265 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 16, 16, 1, 65535 } , + +266 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +269  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_di¡BšX_cÚ¡r_19 + + gCC_NOTUSED + = { + +270 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 16, 16, 1, 65535 } , + +271 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +274  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_di¡BšY_cÚ¡r_20 + + gCC_NOTUSED + = { + +275 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 16, 16, 1, 65535 } , + +276 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +279  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_di¡BšZ_cÚ¡r_21 + + gCC_NOTUSED + = { + +280 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 16, 16, 1, 65535 } , + +281 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +284 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_noLab–_v®ue2’um_2 +[] = { + +288 cÚ¡  + ga¢_MAP_noLab–_’um2v®ue_2 +[] = { + +292 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_noLab–_¥ecs_2 + = { + +293 +a¢_MAP_noLab–_v®ue2’um_2 +, + +294 +a¢_MAP_noLab–_’um2v®ue_2 +, + +301 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_noLab–_gs_2 +[] = { + +302 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +303 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +306 +a¢_TYPE_desütÜ_t + + ga¢_DEF_noLab–_2 + = { + +309 & +a¢_OP_N©iveEnum”©ed +, + +310 +a¢_DEF_noLab–_gs_2 +, + +311 ( +a¢_DEF_noLab–_gs_2 +) + +312 /( +a¢_DEF_noLab–_gs_2 +[0]) - 1, + +313 +a¢_DEF_noLab–_gs_2 +, + +314 ( +a¢_DEF_noLab–_gs_2 +) + +315 /( +a¢_DEF_noLab–_gs_2 +[0]), + +316 { 0, & +a¢_PER_ty³_noLab–_cÚ¡r_2 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +318 & +a¢_SPC_noLab–_¥ecs_2 + + +321 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_sUM_v®ue2’um_16 +[] = { + +325 cÚ¡  + ga¢_MAP_sUM_’um2v®ue_16 +[] = { + +329 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_sUM_¥ecs_16 + = { + +330 +a¢_MAP_sUM_v®ue2’um_16 +, + +331 +a¢_MAP_sUM_’um2v®ue_16 +, + +338 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_sUM_gs_16 +[] = { + +339 ( +ASN_TAG_CLASS_CONTEXT + | (12 << 2)), + +340 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +343 +a¢_TYPE_desütÜ_t + + ga¢_DEF_sUM_16 + = { + +346 & +a¢_OP_N©iveEnum”©ed +, + +347 +a¢_DEF_sUM_gs_16 +, + +348 ( +a¢_DEF_sUM_gs_16 +) + +349 /( +a¢_DEF_sUM_gs_16 +[0]) - 1, + +350 +a¢_DEF_sUM_gs_16 +, + +351 ( +a¢_DEF_sUM_gs_16 +) + +352 /( +a¢_DEF_sUM_gs_16 +[0]), + +353 { 0, & +a¢_PER_ty³_sUM_cÚ¡r_16 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +355 & +a¢_SPC_sUM_¥ecs_16 + + +358 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_´eLab–Ov”ride_v®ue2’um_22 +[] = { + +362 cÚ¡  + ga¢_MAP_´eLab–Ov”ride_’um2v®ue_22 +[] = { + +366 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_´eLab–Ov”ride_¥ecs_22 + = { + +367 +a¢_MAP_´eLab–Ov”ride_v®ue2’um_22 +, + +368 +a¢_MAP_´eLab–Ov”ride_’um2v®ue_22 +, + +375 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_´eLab–Ov”ride_gs_22 +[] = { + +376 ( +ASN_TAG_CLASS_CONTEXT + | (16 << 2)), + +377 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +380 +a¢_TYPE_desütÜ_t + + ga¢_DEF_´eLab–Ov”ride_22 + = { + +383 & +a¢_OP_N©iveEnum”©ed +, + +384 +a¢_DEF_´eLab–Ov”ride_gs_22 +, + +385 ( +a¢_DEF_´eLab–Ov”ride_gs_22 +) + +386 /( +a¢_DEF_´eLab–Ov”ride_gs_22 +[0]) - 1, + +387 +a¢_DEF_´eLab–Ov”ride_gs_22 +, + +388 ( +a¢_DEF_´eLab–Ov”ride_gs_22 +) + +389 /( +a¢_DEF_´eLab–Ov”ride_gs_22 +[0]), + +390 { 0, & +a¢_PER_ty³_´eLab–Ov”ride_cÚ¡r_22 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +392 & +a¢_SPC_´eLab–Ov”ride_¥ecs_22 + + +395 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_¡¬tEndInd_v®ue2’um_25 +[] = { + +400 cÚ¡  + ga¢_MAP_¡¬tEndInd_’um2v®ue_25 +[] = { + +405 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_¡¬tEndInd_¥ecs_25 + = { + +406 +a¢_MAP_¡¬tEndInd_v®ue2’um_25 +, + +407 +a¢_MAP_¡¬tEndInd_’um2v®ue_25 +, + +414 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_¡¬tEndInd_gs_25 +[] = { + +415 ( +ASN_TAG_CLASS_CONTEXT + | (17 << 2)), + +416 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +419 +a¢_TYPE_desütÜ_t + + ga¢_DEF_¡¬tEndInd_25 + = { + +422 & +a¢_OP_N©iveEnum”©ed +, + +423 +a¢_DEF_¡¬tEndInd_gs_25 +, + +424 ( +a¢_DEF_¡¬tEndInd_gs_25 +) + +425 /( +a¢_DEF_¡¬tEndInd_gs_25 +[0]) - 1, + +426 +a¢_DEF_¡¬tEndInd_gs_25 +, + +427 ( +a¢_DEF_¡¬tEndInd_gs_25 +) + +428 /( +a¢_DEF_¡¬tEndInd_gs_25 +[0]), + +429 { 0, & +a¢_PER_ty³_¡¬tEndInd_cÚ¡r_25 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +431 & +a¢_SPC_¡¬tEndInd_¥ecs_25 + + +434 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_mš_v®ue2’um_29 +[] = { + +438 cÚ¡  + ga¢_MAP_mš_’um2v®ue_29 +[] = { + +442 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_mš_¥ecs_29 + = { + +443 +a¢_MAP_mš_v®ue2’um_29 +, + +444 +a¢_MAP_mš_’um2v®ue_29 +, + +451 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_mš_gs_29 +[] = { + +452 ( +ASN_TAG_CLASS_CONTEXT + | (18 << 2)), + +453 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +456 +a¢_TYPE_desütÜ_t + + ga¢_DEF_mš_29 + = { + +459 & +a¢_OP_N©iveEnum”©ed +, + +460 +a¢_DEF_mš_gs_29 +, + +461 ( +a¢_DEF_mš_gs_29 +) + +462 /( +a¢_DEF_mš_gs_29 +[0]) - 1, + +463 +a¢_DEF_mš_gs_29 +, + +464 ( +a¢_DEF_mš_gs_29 +) + +465 /( +a¢_DEF_mš_gs_29 +[0]), + +466 { 0, & +a¢_PER_ty³_mš_cÚ¡r_29 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +468 & +a¢_SPC_mš_¥ecs_29 + + +471 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_max_v®ue2’um_32 +[] = { + +475 cÚ¡  + ga¢_MAP_max_’um2v®ue_32 +[] = { + +479 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_max_¥ecs_32 + = { + +480 +a¢_MAP_max_v®ue2’um_32 +, + +481 +a¢_MAP_max_’um2v®ue_32 +, + +488 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_max_gs_32 +[] = { + +489 ( +ASN_TAG_CLASS_CONTEXT + | (19 << 2)), + +490 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +493 +a¢_TYPE_desütÜ_t + + ga¢_DEF_max_32 + = { + +496 & +a¢_OP_N©iveEnum”©ed +, + +497 +a¢_DEF_max_gs_32 +, + +498 ( +a¢_DEF_max_gs_32 +) + +499 /( +a¢_DEF_max_gs_32 +[0]) - 1, + +500 +a¢_DEF_max_gs_32 +, + +501 ( +a¢_DEF_max_gs_32 +) + +502 /( +a¢_DEF_max_gs_32 +[0]), + +503 { 0, & +a¢_PER_ty³_max_cÚ¡r_32 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +505 & +a¢_SPC_max_¥ecs_32 + + +508 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_avg_v®ue2’um_35 +[] = { + +512 cÚ¡  + ga¢_MAP_avg_’um2v®ue_35 +[] = { + +516 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_avg_¥ecs_35 + = { + +517 +a¢_MAP_avg_v®ue2’um_35 +, + +518 +a¢_MAP_avg_’um2v®ue_35 +, + +525 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_avg_gs_35 +[] = { + +526 ( +ASN_TAG_CLASS_CONTEXT + | (20 << 2)), + +527 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +530 +a¢_TYPE_desütÜ_t + + ga¢_DEF_avg_35 + = { + +533 & +a¢_OP_N©iveEnum”©ed +, + +534 +a¢_DEF_avg_gs_35 +, + +535 ( +a¢_DEF_avg_gs_35 +) + +536 /( +a¢_DEF_avg_gs_35 +[0]) - 1, + +537 +a¢_DEF_avg_gs_35 +, + +538 ( +a¢_DEF_avg_gs_35 +) + +539 /( +a¢_DEF_avg_gs_35 +[0]), + +540 { 0, & +a¢_PER_ty³_avg_cÚ¡r_35 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +542 & +a¢_SPC_avg_¥ecs_35 + + +545 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tLab–_1 +[] = { + +546 { +ATF_POINTER +, 21, +off£tof +( +M—su»m’tLab– +, +noLab– +), + +547 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +549 & +a¢_DEF_noLab–_2 +, + +555 { +ATF_POINTER +, 20, +off£tof +( +M—su»m’tLab– +, +¶mnID +), + +556 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +558 & +a¢_DEF_PLMNId’t™y +, + +564 { +ATF_POINTER +, 19, +off£tof +( +M—su»m’tLab– +, +¦iûID +), + +565 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +567 & +a¢_DEF_S_NSSAI +, + +573 { +ATF_POINTER +, 18, +off£tof +( +M—su»m’tLab– +, +fiveQI +), + +574 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +576 & +a¢_DEF_FiveQI +, + +582 { +ATF_POINTER +, 17, +off£tof +( +M—su»m’tLab– +, +qFI +), + +583 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +585 & +a¢_DEF_QosFlowId’tif›r +, + +591 { +ATF_POINTER +, 16, +off£tof +( +M—su»m’tLab– +, +qCI +), + +592 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +594 & +a¢_DEF_QCI +, + +600 { +ATF_POINTER +, 15, +off£tof +( +M—su»m’tLab– +, +qCImax +), + +601 ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), + +603 & +a¢_DEF_QCI +, + +609 { +ATF_POINTER +, 14, +off£tof +( +M—su»m’tLab– +, +qCImš +), + +610 ( +ASN_TAG_CLASS_CONTEXT + | (7 << 2)), + +612 & +a¢_DEF_QCI +, + +618 { +ATF_POINTER +, 13, +off£tof +( +M—su»m’tLab– +, +aRPmax +), + +619 ( +ASN_TAG_CLASS_CONTEXT + | (8 << 2)), + +621 & +a¢_DEF_N©iveIÁeg” +, + +623 { 0, & +a¢_PER_memb_aRPmax_cÚ¡r_12 +, +memb_aRPmax_cÚ¡¿št_1 + }, + +627 { +ATF_POINTER +, 12, +off£tof +( +M—su»m’tLab– +, +aRPmš +), + +628 ( +ASN_TAG_CLASS_CONTEXT + | (9 << 2)), + +630 & +a¢_DEF_N©iveIÁeg” +, + +632 { 0, & +a¢_PER_memb_aRPmš_cÚ¡r_13 +, +memb_aRPmš_cÚ¡¿št_1 + }, + +636 { +ATF_POINTER +, 11, +off£tof +( +M—su»m’tLab– +, +b™¿‹Rªge +), + +637 ( +ASN_TAG_CLASS_CONTEXT + | (10 << 2)), + +639 & +a¢_DEF_N©iveIÁeg” +, + +641 { 0, & +a¢_PER_memb_b™¿‹Rªge_cÚ¡r_14 +, +memb_b™¿‹Rªge_cÚ¡¿št_1 + }, + +645 { +ATF_POINTER +, 10, +off£tof +( +M—su»m’tLab– +, +Ïy”MU_MIMO +), + +646 ( +ASN_TAG_CLASS_CONTEXT + | (11 << 2)), + +648 & +a¢_DEF_N©iveIÁeg” +, + +650 { 0, & +a¢_PER_memb_Ïy”MU_MIMO_cÚ¡r_15 +, +memb_Ïy”MU_MIMO_cÚ¡¿št_1 + }, + +654 { +ATF_POINTER +, 9, +off£tof +( +M—su»m’tLab– +, +sUM +), + +655 ( +ASN_TAG_CLASS_CONTEXT + | (12 << 2)), + +657 & +a¢_DEF_sUM_16 +, + +663 { +ATF_POINTER +, 8, +off£tof +( +M—su»m’tLab– +, +di¡BšX +), + +664 ( +ASN_TAG_CLASS_CONTEXT + | (13 << 2)), + +666 & +a¢_DEF_N©iveIÁeg” +, + +668 { 0, & +a¢_PER_memb_di¡BšX_cÚ¡r_19 +, +memb_di¡BšX_cÚ¡¿št_1 + }, + +672 { +ATF_POINTER +, 7, +off£tof +( +M—su»m’tLab– +, +di¡BšY +), + +673 ( +ASN_TAG_CLASS_CONTEXT + | (14 << 2)), + +675 & +a¢_DEF_N©iveIÁeg” +, + +677 { 0, & +a¢_PER_memb_di¡BšY_cÚ¡r_20 +, +memb_di¡BšY_cÚ¡¿št_1 + }, + +681 { +ATF_POINTER +, 6, +off£tof +( +M—su»m’tLab– +, +di¡BšZ +), + +682 ( +ASN_TAG_CLASS_CONTEXT + | (15 << 2)), + +684 & +a¢_DEF_N©iveIÁeg” +, + +686 { 0, & +a¢_PER_memb_di¡BšZ_cÚ¡r_21 +, +memb_di¡BšZ_cÚ¡¿št_1 + }, + +690 { +ATF_POINTER +, 5, +off£tof +( +M—su»m’tLab– +, +´eLab–Ov”ride +), + +691 ( +ASN_TAG_CLASS_CONTEXT + | (16 << 2)), + +693 & +a¢_DEF_´eLab–Ov”ride_22 +, + +699 { +ATF_POINTER +, 4, +off£tof +( +M—su»m’tLab– +, +¡¬tEndInd +), + +700 ( +ASN_TAG_CLASS_CONTEXT + | (17 << 2)), + +702 & +a¢_DEF_¡¬tEndInd_25 +, + +708 { +ATF_POINTER +, 3, +off£tof +( +M—su»m’tLab– +, +mš +), + +709 ( +ASN_TAG_CLASS_CONTEXT + | (18 << 2)), + +711 & +a¢_DEF_mš_29 +, + +717 { +ATF_POINTER +, 2, +off£tof +( +M—su»m’tLab– +, +max +), + +718 ( +ASN_TAG_CLASS_CONTEXT + | (19 << 2)), + +720 & +a¢_DEF_max_32 +, + +726 { +ATF_POINTER +, 1, +off£tof +( +M—su»m’tLab– +, +avg +), + +727 ( +ASN_TAG_CLASS_CONTEXT + | (20 << 2)), + +729 & +a¢_DEF_avg_35 +, + +736 cÚ¡  + ga¢_MAP_M—su»m’tLab–_oms_1 +[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }; + +737 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tLab–_gs_1 +[] = { + +738 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +740 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tLab–_g2–_1 +[] = { + +741 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +742 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +743 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +744 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +745 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +746 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 }, + +747 { ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), 6, 0, 0 }, + +748 { ( +ASN_TAG_CLASS_CONTEXT + | (7 << 2)), 7, 0, 0 }, + +749 { ( +ASN_TAG_CLASS_CONTEXT + | (8 << 2)), 8, 0, 0 }, + +750 { ( +ASN_TAG_CLASS_CONTEXT + | (9 << 2)), 9, 0, 0 }, + +751 { ( +ASN_TAG_CLASS_CONTEXT + | (10 << 2)), 10, 0, 0 }, + +752 { ( +ASN_TAG_CLASS_CONTEXT + | (11 << 2)), 11, 0, 0 }, + +753 { ( +ASN_TAG_CLASS_CONTEXT + | (12 << 2)), 12, 0, 0 }, + +754 { ( +ASN_TAG_CLASS_CONTEXT + | (13 << 2)), 13, 0, 0 }, + +755 { ( +ASN_TAG_CLASS_CONTEXT + | (14 << 2)), 14, 0, 0 }, + +756 { ( +ASN_TAG_CLASS_CONTEXT + | (15 << 2)), 15, 0, 0 }, + +757 { ( +ASN_TAG_CLASS_CONTEXT + | (16 << 2)), 16, 0, 0 }, + +758 { ( +ASN_TAG_CLASS_CONTEXT + | (17 << 2)), 17, 0, 0 }, + +759 { ( +ASN_TAG_CLASS_CONTEXT + | (18 << 2)), 18, 0, 0 }, + +760 { ( +ASN_TAG_CLASS_CONTEXT + | (19 << 2)), 19, 0, 0 }, + +761 { ( +ASN_TAG_CLASS_CONTEXT + | (20 << 2)), 20, 0, 0 } + +763 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_M—su»m’tLab–_¥ecs_1 + = { + +764 ( +M—su»m’tLab– +), + +765 +off£tof +( +M—su»m’tLab– +, +_a¢_ùx +), + +766 +a¢_MAP_M—su»m’tLab–_g2–_1 +, + +768 +a¢_MAP_M—su»m’tLab–_oms_1 +, + +772 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tLab– + = { + +775 & +a¢_OP_SEQUENCE +, + +776 +a¢_DEF_M—su»m’tLab–_gs_1 +, + +777 ( +a¢_DEF_M—su»m’tLab–_gs_1 +) + +778 /( +a¢_DEF_M—su»m’tLab–_gs_1 +[0]), + +779 +a¢_DEF_M—su»m’tLab–_gs_1 +, + +780 ( +a¢_DEF_M—su»m’tLab–_gs_1 +) + +781 /( +a¢_DEF_M—su»m’tLab–_gs_1 +[0]), + +782 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +783 +a¢_MBR_M—su»m’tLab–_1 +, + +785 & +a¢_SPC_M—su»m’tLab–_¥ecs_1 + + + @MeasurementRecord.c + +8  + ~"M—su»m’tRecÜd.h +" + +10  + ~"M—su»m’tRecÜdI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tRecÜd_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 31, -1, 1, 2147483647 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tRecÜd_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +20 & +a¢_DEF_M—su»m’tRecÜdI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tRecÜd_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_M—su»m’tRecÜd_¥ecs_1 + = { + +31 ( +M—su»m’tRecÜd +), + +32 +off£tof +( +M—su»m’tRecÜd +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tRecÜd + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_M—su»m’tRecÜd_gs_1 +, + +40 ( +a¢_DEF_M—su»m’tRecÜd_gs_1 +) + +41 /( +a¢_DEF_M—su»m’tRecÜd_gs_1 +[0]), + +42 +a¢_DEF_M—su»m’tRecÜd_gs_1 +, + +43 ( +a¢_DEF_M—su»m’tRecÜd_gs_1 +) + +44 /( +a¢_DEF_M—su»m’tRecÜd_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_M—su»m’tRecÜd_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_M—su»m’tRecÜd_1 +, + +48 & +a¢_SPC_M—su»m’tRecÜd_¥ecs_1 + + + @MeasurementRecordItem.c + +8  + ~"M—su»m’tRecÜdI‹m.h +" + +11 + $š‹g”_2_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +14 if(! +¥Œ +) { + +15 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +17 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +24 + } +} + +31 + $memb_š‹g”_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +32 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +34 if(! +¥Œ +) { + +35 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +37 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +44 + } +} + +46  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_š‹g”_cÚ¡r_2 + + gCC_NOTUSED + = { + +47 { +APC_CONSTRAINED +, 32, -1, 0, 4294967295 } , + +48 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +51  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_š‹g”_cÚ¡r_2 + + gCC_NOTUSED + = { + +52 { +APC_CONSTRAINED +, 32, -1, 0, 4294967295 } , + +53 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +56 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tRecÜdI‹m_cÚ¡r_1 + + gCC_NOTUSED + = { + +57 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 2, 2, 0, 2 } , + +58 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +61 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_š‹g”_¥ecs_2 + = { + +66 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_š‹g”_gs_2 +[] = { + +67 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +68 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +71 +a¢_TYPE_desütÜ_t + + ga¢_DEF_š‹g”_2 + = { + +74 & +a¢_OP_N©iveIÁeg” +, + +75 +a¢_DEF_š‹g”_gs_2 +, + +76 ( +a¢_DEF_š‹g”_gs_2 +) + +77 /( +a¢_DEF_š‹g”_gs_2 +[0]) - 1, + +78 +a¢_DEF_š‹g”_gs_2 +, + +79 ( +a¢_DEF_š‹g”_gs_2 +) + +80 /( +a¢_DEF_š‹g”_gs_2 +[0]), + +81 { 0, & +a¢_PER_ty³_š‹g”_cÚ¡r_2 +, +š‹g”_2_cÚ¡¿št + }, + +83 & +a¢_SPC_š‹g”_¥ecs_2 + + +86 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tRecÜdI‹m_1 +[] = { + +87 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tRecÜdI‹m +, +choiû +. +š‹g” +), + +88 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +90 & +a¢_DEF_š‹g”_2 +, + +92 { 0, & +a¢_PER_memb_š‹g”_cÚ¡r_2 +, +memb_š‹g”_cÚ¡¿št_1 + }, + +96 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tRecÜdI‹m +, +choiû +. +»® +), + +97 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +99 & +a¢_DEF_N©iveR—l +, + +105 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tRecÜdI‹m +, +choiû +. +noV®ue +), + +106 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +108 & +a¢_DEF_NULL +, + +115 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tRecÜdI‹m_g2–_1 +[] = { + +116 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +117 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +118 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +120 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_M—su»m’tRecÜdI‹m_¥ecs_1 + = { + +121 ( +M—su»m’tRecÜdI‹m +), + +122 +off£tof +( +M—su»m’tRecÜdI‹m +, +_a¢_ùx +), + +123 +off£tof +( +M—su»m’tRecÜdI‹m +, +´e£Á +), + +124 ((( +M—su»m’tRecÜdI‹m + *)0)-> +´e£Á +), + +125 +a¢_MAP_M—su»m’tRecÜdI‹m_g2–_1 +, + +130 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tRecÜdI‹m + = { + +133 & +a¢_OP_CHOICE +, + +138 { 0, & +a¢_PER_ty³_M—su»m’tRecÜdI‹m_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +139 +a¢_MBR_M—su»m’tRecÜdI‹m_1 +, + +141 & +a¢_SPC_M—su»m’tRecÜdI‹m_¥ecs_1 + + + @MeasurementType.c + +8  + ~"M—su»m’tTy³.h +" + +10 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tTy³_cÚ¡r_1 + + gCC_NOTUSED + = { + +11 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +15 +a¢_TYPE_memb”_t + + ga¢_MBR_M—su»m’tTy³_1 +[] = { + +16 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tTy³ +, +choiû +. +m—sName +), + +17 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +19 & +a¢_DEF_M—su»m’tTy³Name +, + +25 { +ATF_NOFLAGS +, 0, +off£tof +( +M—su»m’tTy³ +, +choiû +. +m—sID +), + +26 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +28 & +a¢_DEF_M—su»m’tTy³ID +, + +35 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_M—su»m’tTy³_g2–_1 +[] = { + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +37 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +39 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_M—su»m’tTy³_¥ecs_1 + = { + +40 ( +M—su»m’tTy³ +), + +41 +off£tof +( +M—su»m’tTy³ +, +_a¢_ùx +), + +42 +off£tof +( +M—su»m’tTy³ +, +´e£Á +), + +43 ((( +M—su»m’tTy³ + *)0)-> +´e£Á +), + +44 +a¢_MAP_M—su»m’tTy³_g2–_1 +, + +49 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tTy³ + = { + +52 & +a¢_OP_CHOICE +, + +57 { 0, & +a¢_PER_ty³_M—su»m’tTy³_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +58 +a¢_MBR_M—su»m’tTy³_1 +, + +60 & +a¢_SPC_M—su»m’tTy³_¥ecs_1 + + + @MeasurementTypeID.c + +8  + ~"M—su»m’tTy³ID.h +" + +11 + $M—su»m’tTy³ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 65536)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tTy³ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 16, -1, 1, 65536 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tTy³ID_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tTy³ID + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_M—su»m’tTy³ID_gs_1 +, + +52 ( +a¢_DEF_M—su»m’tTy³ID_gs_1 +) + +53 /( +a¢_DEF_M—su»m’tTy³ID_gs_1 +[0]), + +54 +a¢_DEF_M—su»m’tTy³ID_gs_1 +, + +55 ( +a¢_DEF_M—su»m’tTy³ID_gs_1 +) + +56 /( +a¢_DEF_M—su»m’tTy³ID_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_M—su»m’tTy³ID_cÚ¡r_1 +, +M—su»m’tTy³ID_cÚ¡¿št + }, + + @MeasurementTypeName.c + +8  + ~"M—su»m’tTy³Name.h +" + +10 cÚ¡  + g³rm™‹d_®phab‘_bË_1 +[256] = { + +20 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_1 +[74] = { + +28  + $check_³rm™‹d_®phab‘_1 +(cÚ¡ * +¥Œ +) { + +29 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_1 +; + +31 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +32 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +33 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +35 ; +ch + < +’d +; ch++) { + +36 +ušt8_t + +cv + = * +ch +; + +37 if(! +bË +[ +cv +])  -1; + +40 + } +} + +43 + $M—su»m’tTy³Name_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +44 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +45 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +46 +size_t + +size +; + +48 if(! +¥Œ +) { + +49 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +51 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +55 +size + = +¡ +->size; + +57 if(( +size + >= 1 && size <= 150) + +58 && ! + `check_³rm™‹d_®phab‘_1 +( +¡ +)) { + +62 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +64 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +67 + } +} + +69  + $a¢_PER_MAP_M—su»m’tTy³Name_1_v2c +( +v®ue +) { + +70 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_1 +)/(permitted_alphabet_table_1[0])) + +72  +³rm™‹d_®phab‘_bË_1 +[ +v®ue +] - 1; + +73 + } +} + +74  + $a¢_PER_MAP_M—su»m’tTy³Name_1_c2v +( +code +) { + +75 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_1 +)/(permitted_alphabet_code2value_1[0])) + +77  +³rm™‹d_®phab‘_code2v®ue_1 +[ +code +]; + +78 + } +} + +83 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_M—su»m’tTy³Name_cÚ¡r_1 + + gCC_NOTUSED + = { + +84 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +85 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 8, 8, 1, 150 } , + +86 +a¢_PER_MAP_M—su»m’tTy³Name_1_v2c +, + +87 +a¢_PER_MAP_M—su»m’tTy³Name_1_c2v + + +89 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_M—su»m’tTy³Name_gs_1 +[] = { + +90 ( +ASN_TAG_CLASS_UNIVERSAL + | (19 << 2)) + +92 +a¢_TYPE_desütÜ_t + + ga¢_DEF_M—su»m’tTy³Name + = { + +95 & +a¢_OP_PršbËSŒšg +, + +96 +a¢_DEF_M—su»m’tTy³Name_gs_1 +, + +97 ( +a¢_DEF_M—su»m’tTy³Name_gs_1 +) + +98 /( +a¢_DEF_M—su»m’tTy³Name_gs_1 +[0]), + +99 +a¢_DEF_M—su»m’tTy³Name_gs_1 +, + +100 ( +a¢_DEF_M—su»m’tTy³Name_gs_1 +) + +101 /( +a¢_DEF_M—su»m’tTy³Name_gs_1 +[0]), + +102 { 0, & +a¢_PER_ty³_M—su»m’tTy³Name_cÚ¡r_1 +, +M—su»m’tTy³Name_cÚ¡¿št + }, + + @NG-RANnodeUEXnAPID.c + +8  + ~"NG-RANnodeUEXnAPID.h +" + +11 + $NG_RANnodeUEXnAPID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +14 if(! +¥Œ +) { + +15 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +17 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +24 + } +} + +30 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NG_RANnodeUEXnAPID_cÚ¡r_1 + + gCC_NOTUSED + = { + +31 { +APC_CONSTRAINED +, 32, -1, 0, 4294967295 } , + +32 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +35 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_NG_RANnodeUEXnAPID_¥ecs_1 + = { + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NG_RANnodeUEXnAPID_gs_1 +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +43 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NG_RANnodeUEXnAPID + = { + +46 & +a¢_OP_N©iveIÁeg” +, + +47 +a¢_DEF_NG_RANnodeUEXnAPID_gs_1 +, + +48 ( +a¢_DEF_NG_RANnodeUEXnAPID_gs_1 +) + +49 /( +a¢_DEF_NG_RANnodeUEXnAPID_gs_1 +[0]), + +50 +a¢_DEF_NG_RANnodeUEXnAPID_gs_1 +, + +51 ( +a¢_DEF_NG_RANnodeUEXnAPID_gs_1 +) + +52 /( +a¢_DEF_NG_RANnodeUEXnAPID_gs_1 +[0]), + +53 { 0, & +a¢_PER_ty³_NG_RANnodeUEXnAPID_cÚ¡r_1 +, +NG_RANnodeUEXnAPID_cÚ¡¿št + }, + +55 & +a¢_SPC_NG_RANnodeUEXnAPID_¥ecs_1 + + + @NGENB-CU-UE-W1AP-ID.c + +8  + ~"NGENB-CU-UE-W1AP-ID.h +" + +11 + $NGENB_CU_UE_W1AP_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +14 if(! +¥Œ +) { + +15 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +17 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +24 + } +} + +30 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NGENB_CU_UE_W1AP_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +31 { +APC_CONSTRAINED +, 32, -1, 0, 4294967295 } , + +32 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +35 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_NGENB_CU_UE_W1AP_ID_¥ecs_1 + = { + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NGENB_CU_UE_W1AP_ID_gs_1 +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +43 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NGENB_CU_UE_W1AP_ID + = { + +46 & +a¢_OP_N©iveIÁeg” +, + +47 +a¢_DEF_NGENB_CU_UE_W1AP_ID_gs_1 +, + +48 ( +a¢_DEF_NGENB_CU_UE_W1AP_ID_gs_1 +) + +49 /( +a¢_DEF_NGENB_CU_UE_W1AP_ID_gs_1 +[0]), + +50 +a¢_DEF_NGENB_CU_UE_W1AP_ID_gs_1 +, + +51 ( +a¢_DEF_NGENB_CU_UE_W1AP_ID_gs_1 +) + +52 /( +a¢_DEF_NGENB_CU_UE_W1AP_ID_gs_1 +[0]), + +53 { 0, & +a¢_PER_ty³_NGENB_CU_UE_W1AP_ID_cÚ¡r_1 +, +NGENB_CU_UE_W1AP_ID_cÚ¡¿št + }, + +55 & +a¢_SPC_NGENB_CU_UE_W1AP_ID_¥ecs_1 + + + @NGENB-DU-ID.c + +8  + ~"NGENB-DU-ID.h +" + +11 + $NGENB_DU_ID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +INTEGER_t + * +¡ + = (cÚ¡ INTEGER_ˆ*) +¥Œ +; + +14  +v®ue +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( + `a¢_INTEGER2lÚg +( +¡ +, & +v®ue +)) { + +24 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +26 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +30 if(( +v®ue + >= 0 && value <= 68719476735)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NGENB_DU_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_CONSTRAINED +, 36, -1, 0, 68719476735 } , + +47 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NGENB_DU_ID_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NGENB_DU_ID + = { + +56 & +a¢_OP_INTEGER +, + +57 +a¢_DEF_NGENB_DU_ID_gs_1 +, + +58 ( +a¢_DEF_NGENB_DU_ID_gs_1 +) + +59 /( +a¢_DEF_NGENB_DU_ID_gs_1 +[0]), + +60 +a¢_DEF_NGENB_DU_ID_gs_1 +, + +61 ( +a¢_DEF_NGENB_DU_ID_gs_1 +) + +62 /( +a¢_DEF_NGENB_DU_ID_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_NGENB_DU_ID_cÚ¡r_1 +, +NGENB_DU_ID_cÚ¡¿št + }, + + @NR-ARFCN.c + +8  + ~"NR-ARFCN.h +" + +11 + $memb_nRARFCN_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 3279165)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +35  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_nRARFCN_cÚ¡r_2 + + gCC_NOTUSED + = { + +36 { +APC_CONSTRAINED +, 22, -1, 0, 3279165 } , + +37 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +40 +a¢_TYPE_memb”_t + + ga¢_MBR_NR_ARFCN_1 +[] = { + +41 { +ATF_NOFLAGS +, 0, +off£tof +( +NR_ARFCN +, +nRARFCN +), + +42 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +44 & +a¢_DEF_N©iveIÁeg” +, + +46 { 0, & +a¢_PER_memb_nRARFCN_cÚ¡r_2 +, +memb_nRARFCN_cÚ¡¿št_1 + }, + +51 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NR_ARFCN_gs_1 +[] = { + +52 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +54 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_NR_ARFCN_g2–_1 +[] = { + +55 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +57 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_NR_ARFCN_¥ecs_1 + = { + +58 ( +NR_ARFCN +), + +59 +off£tof +( +NR_ARFCN +, +_a¢_ùx +), + +60 +a¢_MAP_NR_ARFCN_g2–_1 +, + +65 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NR_ARFCN + = { + +68 & +a¢_OP_SEQUENCE +, + +69 +a¢_DEF_NR_ARFCN_gs_1 +, + +70 ( +a¢_DEF_NR_ARFCN_gs_1 +) + +71 /( +a¢_DEF_NR_ARFCN_gs_1 +[0]), + +72 +a¢_DEF_NR_ARFCN_gs_1 +, + +73 ( +a¢_DEF_NR_ARFCN_gs_1 +) + +74 /( +a¢_DEF_NR_ARFCN_gs_1 +[0]), + +75 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +76 +a¢_MBR_NR_ARFCN_1 +, + +78 & +a¢_SPC_NR_ARFCN_¥ecs_1 + + + @NR-CGI.c + +8  + ~"NR-CGI.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_NR_CGI_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +NR_CGI +, +pLMNId’t™y +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_PLMNId’t™y +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +NR_CGI +, +nRC–lId’t™y +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_NRC–lId’t™y +, + +30 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NR_CGI_gs_1 +[] = { + +31 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +33 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_NR_CGI_g2–_1 +[] = { + +34 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +37 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_NR_CGI_¥ecs_1 + = { + +38 ( +NR_CGI +), + +39 +off£tof +( +NR_CGI +, +_a¢_ùx +), + +40 +a¢_MAP_NR_CGI_g2–_1 +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NR_CGI + = { + +48 & +a¢_OP_SEQUENCE +, + +49 +a¢_DEF_NR_CGI_gs_1 +, + +50 ( +a¢_DEF_NR_CGI_gs_1 +) + +51 /( +a¢_DEF_NR_CGI_gs_1 +[0]), + +52 +a¢_DEF_NR_CGI_gs_1 +, + +53 ( +a¢_DEF_NR_CGI_gs_1 +) + +54 /( +a¢_DEF_NR_CGI_gs_1 +[0]), + +55 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +56 +a¢_MBR_NR_CGI_1 +, + +58 & +a¢_SPC_NR_CGI_¥ecs_1 + + + @NR-PCI.c + +8  + ~"NR-PCI.h +" + +11 + $NR_PCI_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 1007)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NR_PCI_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED +, 10, 10, 0, 1007 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NR_PCI_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NR_PCI + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_NR_PCI_gs_1 +, + +52 ( +a¢_DEF_NR_PCI_gs_1 +) + +53 /( +a¢_DEF_NR_PCI_gs_1 +[0]), + +54 +a¢_DEF_NR_PCI_gs_1 +, + +55 ( +a¢_DEF_NR_PCI_gs_1 +) + +56 /( +a¢_DEF_NR_PCI_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_NR_PCI_cÚ¡r_1 +, +NR_PCI_cÚ¡¿št + }, + + @NRCellIdentity.c + +8  + ~"NRC–lId’t™y.h +" + +11 + $NRC–lId’t™y_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + == 36)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +45 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NRC–lId’t™y_cÚ¡r_1 + + gCC_NOTUSED + = { + +46 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +47 { +APC_CONSTRAINED +, 0, 0, 36, 36 } , + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NRC–lId’t™y_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (3 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NRC–lId’t™y + = { + +56 & +a¢_OP_BIT_STRING +, + +57 +a¢_DEF_NRC–lId’t™y_gs_1 +, + +58 ( +a¢_DEF_NRC–lId’t™y_gs_1 +) + +59 /( +a¢_DEF_NRC–lId’t™y_gs_1 +[0]), + +60 +a¢_DEF_NRC–lId’t™y_gs_1 +, + +61 ( +a¢_DEF_NRC–lId’t™y_gs_1 +) + +62 /( +a¢_DEF_NRC–lId’t™y_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_NRC–lId’t™y_cÚ¡r_1 +, +NRC–lId’t™y_cÚ¡¿št + }, + +65 & +a¢_SPC_BIT_STRING_¥ecs + + + @NRFrequencyBand-List.c + +8  + ~"NRF»qu’cyBªd-Li¡.h +" + +10  + ~"NRF»qu’cyBªdI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NRF»qu’cyBªd_Li¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 5, 5, 1, 32 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_NRF»qu’cyBªd_Li¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_NRF»qu’cyBªdI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NRF»qu’cyBªd_Li¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_NRF»qu’cyBªd_Li¡_¥ecs_1 + = { + +31 ( +NRF»qu’cyBªd_Li¡ +), + +32 +off£tof +( +NRF»qu’cyBªd_Li¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NRF»qu’cyBªd_Li¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_NRF»qu’cyBªd_Li¡_gs_1 +, + +40 ( +a¢_DEF_NRF»qu’cyBªd_Li¡_gs_1 +) + +41 /( +a¢_DEF_NRF»qu’cyBªd_Li¡_gs_1 +[0]), + +42 +a¢_DEF_NRF»qu’cyBªd_Li¡_gs_1 +, + +43 ( +a¢_DEF_NRF»qu’cyBªd_Li¡_gs_1 +) + +44 /( +a¢_DEF_NRF»qu’cyBªd_Li¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_NRF»qu’cyBªd_Li¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_NRF»qu’cyBªd_Li¡_1 +, + +48 & +a¢_SPC_NRF»qu’cyBªd_Li¡_¥ecs_1 + + + @NRFrequencyBandItem.c + +8  + ~"NRF»qu’cyBªdI‹m.h +" + +11 + $memb_äeqBªdIndiÿtÜNr_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 1024)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +35  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_äeqBªdIndiÿtÜNr_cÚ¡r_2 + + gCC_NOTUSED + = { + +36 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 10, 10, 1, 1024 } , + +37 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +40 +a¢_TYPE_memb”_t + + ga¢_MBR_NRF»qu’cyBªdI‹m_1 +[] = { + +41 { +ATF_NOFLAGS +, 0, +off£tof +( +NRF»qu’cyBªdI‹m +, +äeqBªdIndiÿtÜNr +), + +42 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +44 & +a¢_DEF_N©iveIÁeg” +, + +46 { 0, & +a¢_PER_memb_äeqBªdIndiÿtÜNr_cÚ¡r_2 +, +memb_äeqBªdIndiÿtÜNr_cÚ¡¿št_1 + }, + +50 { +ATF_NOFLAGS +, 0, +off£tof +( +NRF»qu’cyBªdI‹m +, +suµÜ‹dSULBªdLi¡ +), + +51 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +53 & +a¢_DEF_SuµÜ‹dSULBªdLi¡ +, + +60 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NRF»qu’cyBªdI‹m_gs_1 +[] = { + +61 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +63 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_NRF»qu’cyBªdI‹m_g2–_1 +[] = { + +64 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +65 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +67 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_NRF»qu’cyBªdI‹m_¥ecs_1 + = { + +68 ( +NRF»qu’cyBªdI‹m +), + +69 +off£tof +( +NRF»qu’cyBªdI‹m +, +_a¢_ùx +), + +70 +a¢_MAP_NRF»qu’cyBªdI‹m_g2–_1 +, + +75 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NRF»qu’cyBªdI‹m + = { + +78 & +a¢_OP_SEQUENCE +, + +79 +a¢_DEF_NRF»qu’cyBªdI‹m_gs_1 +, + +80 ( +a¢_DEF_NRF»qu’cyBªdI‹m_gs_1 +) + +81 /( +a¢_DEF_NRF»qu’cyBªdI‹m_gs_1 +[0]), + +82 +a¢_DEF_NRF»qu’cyBªdI‹m_gs_1 +, + +83 ( +a¢_DEF_NRF»qu’cyBªdI‹m_gs_1 +) + +84 /( +a¢_DEF_NRF»qu’cyBªdI‹m_gs_1 +[0]), + +85 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +86 +a¢_MBR_NRF»qu’cyBªdI‹m_1 +, + +88 & +a¢_SPC_NRF»qu’cyBªdI‹m_¥ecs_1 + + + @NRFrequencyInfo.c + +8  + ~"NRF»qu’cyInfo.h +" + +10  +a¢_TYPE_memb”_t + + ga¢_MBR_NRF»qu’cyInfo_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +NRF»qu’cyInfo +, +ÄARFCN +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_NR_ARFCN +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +NRF»qu’cyInfo +, +äequ’cyBªd_Li¡ +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_NRF»qu’cyBªd_Li¡ +, + +29 { +ATF_POINTER +, 1, +off£tof +( +NRF»qu’cyInfo +, +äequ’cyShiá7p5khz +), + +30 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +32 & +a¢_DEF_NRF»qu’cyShiá7p5khz +, + +39 cÚ¡  + ga¢_MAP_NRF»qu’cyInfo_oms_1 +[] = { 2 }; + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NRF»qu’cyInfo_gs_1 +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +43 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_NRF»qu’cyInfo_g2–_1 +[] = { + +44 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +46 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +48  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_NRF»qu’cyInfo_¥ecs_1 + = { + +49 ( +NRF»qu’cyInfo +), + +50 +off£tof +( +NRF»qu’cyInfo +, +_a¢_ùx +), + +51 +a¢_MAP_NRF»qu’cyInfo_g2–_1 +, + +53 +a¢_MAP_NRF»qu’cyInfo_oms_1 +, + +57 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NRF»qu’cyInfo + = { + +60 & +a¢_OP_SEQUENCE +, + +61 +a¢_DEF_NRF»qu’cyInfo_gs_1 +, + +62 ( +a¢_DEF_NRF»qu’cyInfo_gs_1 +) + +63 /( +a¢_DEF_NRF»qu’cyInfo_gs_1 +[0]), + +64 +a¢_DEF_NRF»qu’cyInfo_gs_1 +, + +65 ( +a¢_DEF_NRF»qu’cyInfo_gs_1 +) + +66 /( +a¢_DEF_NRF»qu’cyInfo_gs_1 +[0]), + +67 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +68 +a¢_MBR_NRF»qu’cyInfo_1 +, + +70 & +a¢_SPC_NRF»qu’cyInfo_¥ecs_1 + + + @NRFrequencyShift7p5khz.c + +8  + ~"NRF»qu’cyShiá7p5khz.h +" + +14 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NRF»qu’cyShiá7p5khz_cÚ¡r_1 + + gCC_NOTUSED + = { + +15 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +16 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +19 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_NRF»qu’cyShiá7p5khz_v®ue2’um_1 +[] = { + +24 cÚ¡  + ga¢_MAP_NRF»qu’cyShiá7p5khz_’um2v®ue_1 +[] = { + +29 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_NRF»qu’cyShiá7p5khz_¥ecs_1 + = { + +30 +a¢_MAP_NRF»qu’cyShiá7p5khz_v®ue2’um_1 +, + +31 +a¢_MAP_NRF»qu’cyShiá7p5khz_’um2v®ue_1 +, + +38 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NRF»qu’cyShiá7p5khz_gs_1 +[] = { + +39 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +41 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NRF»qu’cyShiá7p5khz + = { + +44 & +a¢_OP_N©iveEnum”©ed +, + +45 +a¢_DEF_NRF»qu’cyShiá7p5khz_gs_1 +, + +46 ( +a¢_DEF_NRF»qu’cyShiá7p5khz_gs_1 +) + +47 /( +a¢_DEF_NRF»qu’cyShiá7p5khz_gs_1 +[0]), + +48 +a¢_DEF_NRF»qu’cyShiá7p5khz_gs_1 +, + +49 ( +a¢_DEF_NRF»qu’cyShiá7p5khz_gs_1 +) + +50 /( +a¢_DEF_NRF»qu’cyShiá7p5khz_gs_1 +[0]), + +51 { 0, & +a¢_PER_ty³_NRF»qu’cyShiá7p5khz_cÚ¡r_1 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +53 & +a¢_SPC_NRF»qu’cyShiá7p5khz_¥ecs_1 + + + @NULL.c + +5  + ~ + +6  + ~ + +7  + ~ + +8  + ~ + +13 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_NULL_gs +[] = { + +14 ( +ASN_TAG_CLASS_UNIVERSAL + | (5 << 2)) + +16 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_NULL + = { + +17 +BOOLEAN_ä“ +, + +18 +NULL_´št +, + +19 +NULL_com·» +, + +20 +BOOLEAN_decode_b” +, + +21 +NULL_’code_d” +, + +22 +NULL_decode_x” +, + +23 +NULL_’code_x” +, + +24 #ifdef +ASN_DISABLE_OER_SUPPORT + + +28 +NULL_decode_Ûr +, + +29 +NULL_’code_Ûr +, + +31 #ifdef +ASN_DISABLE_PER_SUPPORT + + +37 +NULL_decode_u³r +, + +38 +NULL_’code_u³r +, + +39 +NULL_decode_­” +, + +40 +NULL_’code_­” +, + +42 +NULL_¿ndom_fžl +, + +45 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NULL + = { + +48 & +a¢_OP_NULL +, + +49 +a¢_DEF_NULL_gs +, + +50 ( +a¢_DEF_NULL_gs +) / (asn_DEF_NULL_tags[0]), + +51 +a¢_DEF_NULL_gs +, + +52 ( +a¢_DEF_NULL_gs +) / (asn_DEF_NULL_tags[0]), + +53 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +58 +a¢_’c_rv®_t + + +59 + $NULL_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +±r +,  +g_mode +, + +60 +b”_Žv_g_t + +g +, +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +61 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +63 +”v® +. +’coded + = + `d”_wr™e_gs +( +td +, 0, +g_mode +, 0, +g +, +cb +, +­p_key +); + +64 if( +”v® +. +’coded + == -1) { + +65 +”v® +. +çžed_ty³ + = +td +; + +66 +”v® +. +¡ruùu»_±r + = +±r +; + +69 + `ASN__ENCODED_OK +( +”v® +); + +70 + } +} + +72 +a¢_’c_rv®_t + + +73 + $NULL_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +74 +x”_’cod”_æags_e + +æags +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +75 * +­p_key +) { + +76 +a¢_’c_rv®_t + +” + = {0,0,0}; + +78 () +td +; + +79 () +¥Œ +; + +80 () +žev– +; + +81 () +æags +; + +82 () +cb +; + +83 () +­p_key +; + +86 +” +. +’coded + = 0; + +87 + `ASN__ENCODED_OK +( +” +); + +88 + } +} + +91  +x”_pbd_rv® + + +92 + $NULL__x”_body_decode +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +93 cÚ¡ * +chunk_buf +, +size_t + +chunk_size +) { + +94 () +td +; + +95 () +¥Œ +; + +96 () +chunk_buf +; + +101 if( +chunk_size +) + +102  +XPBD_BROKEN_ENCODING +; + +104  +XPBD_BODY_CONSUMED +; + +105 + } +} + +107 +a¢_dec_rv®_t + + +108 + $NULL_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +109 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +110 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +) { + +111  + `x”_decode_´im™ive +( +Ýt_codec_ùx +, +td +, + +112 +¥Œ +, ( +NULL_t +), +Ýt_mÇme +, +buf_±r +, +size +, + +113 +NULL__x”_body_decode +); + +114 + } +} + +117 + $NULL_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +a +, cÚ¡ * +b +) { + +118 () +td +; + +119 () +a +; + +120 () +b +; + +122 + } +} + +125 + $NULL_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +126 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +127 () +td +; + +128 () +žev– +; + +130 if( +¥Œ +) { + +131  ( + `cb +("<´e£Á>", 9, +­p_key +) < 0) ? -1 : 0; + +133  ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +135 + } +} + +137 #iâdeà +ASN_DISABLE_OER_SUPPORT + + +139 +a¢_dec_rv®_t + + +140 + $NULL_decode_Ûr +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +141 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +142 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +143 cÚ¡ * +±r +, +size_t + +size +) { + +144 +a¢_dec_rv®_t + +rv + = { +RC_OK +, 0}; + +145 () +Ýt_codec_ùx +; + +146 () +td +; + +147 () +cÚ¡¿šts +; + +148 () +±r +; + +149 () +size +; + +151 if(!* +¥Œ +) { + +152 * +¥Œ + = + `MALLOC +(( +NULL_t +)); + +153 if(* +¥Œ +) { + +154 *( +NULL_t + *)* +¥Œ + = 0; + +156 +ASN__DECODE_FAILED +; + +160  +rv +; + +161 + } +} + +163 +a¢_’c_rv®_t + + +164 + $NULL_’code_Ûr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +165 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +166 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +167 +a¢_’c_rv®_t + +” + = {0,0,0}; + +169 () +td +; + +170 () +¥Œ +; + +171 () +cÚ¡¿šts +; + +172 () +cb +; + +173 () +­p_key +; + +175 +” +. +’coded + = 0; + +177 + `ASN__ENCODED_OK +( +” +); + +178 + } +} + +182 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +184 +a¢_dec_rv®_t + + +185 + $NULL_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +186 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +187 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +188 +a¢_³r_d©a_t + * +pd +) { + +189 +a¢_dec_rv®_t + +rv +; + +191 () +Ýt_codec_ùx +; + +192 () +td +; + +193 () +cÚ¡¿šts +; + +194 () +pd +; + +196 if(!* +¥Œ +) { + +197 * +¥Œ + = + `MALLOC +(( +NULL_t +)); + +198 if(* +¥Œ +) { + +199 *( +NULL_t + *)* +¥Œ + = 0; + +201 +ASN__DECODE_FAILED +; + +209 +rv +. +code + = +RC_OK +; + +210 +rv +. +cÚsumed + = 0; + +211  +rv +; + +212 + } +} + +214 +a¢_’c_rv®_t + + +215 + $NULL_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +216 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +217 +a¢_³r_ou_t + * +po +) { + +218 +a¢_’c_rv®_t + +” + = {0,0,0}; + +220 () +td +; + +221 () +cÚ¡¿šts +; + +222 () +¥Œ +; + +223 () +po +; + +225 +” +. +’coded + = 0; + +226 + `ASN__ENCODED_OK +( +” +); + +227 + } +} + +229 +a¢_dec_rv®_t + + +230 + $NULL_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +231 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +232 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +233 +a¢_dec_rv®_t + +rv + = { +RC_OK +, 0}; + +235 () +Ýt_codec_ùx +; + +236 () +td +; + +237 () +cÚ¡¿šts +; + +238 () +pd +; + +240 if(!* +¥Œ +) { + +241 * +¥Œ + = + `MALLOC +(( +NULL_t +)); + +242 if(* +¥Œ +) { + +243 *( +NULL_t + *)* +¥Œ + = 0; + +245 +ASN__DECODE_FAILED +; + +253 +rv +. +code + = +RC_OK +; + +254 +rv +. +cÚsumed + = 0; + +255  +rv +; + +256 + } +} + +259 +a¢_’c_rv®_t + + +260 + $NULL_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +261 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +262 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +263 +a¢_’c_rv®_t + +” + = {0,0,0}; + +265 () +td +; + +266 () +cÚ¡¿šts +; + +267 () +¥Œ +; + +268 () +po +; + +270 +” +. +’coded + = 0; + +271 + `ASN__ENCODED_OK +( +” +); + +272 + } +} + +276 +a¢_¿ndom_fžl_»suÉ_t + + +277 + $NULL_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +278 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡r +, + +279 +size_t + +max_Ëngth +) { + +280 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 1}; + +281 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +282 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +283 +NULL_t + * +¡ + = * +¥Œ +; + +285 () +td +; + +286 () +cÚ¡r +; + +288 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +290 if( +¡ + =ð +NULL +) { + +291 +¡ + = ( +NULL_t + *)(* +¥Œ + = + `CALLOC +(1, (*st))); + +292 if( +¡ + =ð +NULL +) { + +293  +»suÉ_çžed +; + +297  +»suÉ_ok +; + +298 + } +} + + @NativeEnumerated.c + +12  + ~ + +13  + ~ + +18 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_N©iveEnum”©ed_gs +[] = { + +19 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +21 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_N©iveEnum”©ed + = { + +22 +N©iveIÁeg”_ä“ +, + +23 +N©iveIÁeg”_´št +, + +24 +N©iveIÁeg”_com·» +, + +25 +N©iveIÁeg”_decode_b” +, + +26 +N©iveIÁeg”_’code_d” +, + +27 +N©iveIÁeg”_decode_x” +, + +28 +N©iveEnum”©ed_’code_x” +, + +29 #ifdef +ASN_DISABLE_OER_SUPPORT + + +33 +N©iveEnum”©ed_decode_Ûr +, + +34 +N©iveEnum”©ed_’code_Ûr +, + +36 #ifdef +ASN_DISABLE_PER_SUPPORT + + +42 +N©iveEnum”©ed_decode_u³r +, + +43 +N©iveEnum”©ed_’code_u³r +, + +44 +N©iveEnum”©ed_decode_­” +, + +45 +N©iveEnum”©ed_’code_­” +, + +47 +N©iveEnum”©ed_¿ndom_fžl +, + +50 +a¢_TYPE_desütÜ_t + + ga¢_DEF_N©iveEnum”©ed + = { + +53 & +a¢_OP_N©iveEnum”©ed +, + +54 +a¢_DEF_N©iveEnum”©ed_gs +, + +55 ( +a¢_DEF_N©iveEnum”©ed_gs +) / (asn_DEF_NativeEnumerated_tags[0]), + +56 +a¢_DEF_N©iveEnum”©ed_gs +, + +57 ( +a¢_DEF_N©iveEnum”©ed_gs +) / (asn_DEF_NativeEnumerated_tags[0]), + +58 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +63 +a¢_’c_rv®_t + + +64 + $N©iveEnum”©ed_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +65  +žev– +, +x”_’cod”_æags_e + +æags +, + +66 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +67 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +68 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +69 +a¢_’c_rv®_t + +” + = {0,0,0}; + +70 cÚ¡ * +Çtive + = (cÚ¡ *) +¥Œ +; + +71 cÚ¡ +a¢_INTEGER_’um_m­_t + * +– +; + +73 () +žev– +; + +74 () +æags +; + +76 if(! +Çtive +è +ASN__ENCODE_FAILED +; + +78 +– + = + `INTEGER_m­_v®ue2’um +( +¥ecs +, * +Çtive +); + +79 if( +– +) { + +80 +” +. +’coded + = + +81 + `a¢__fÜm©_to_ÿÎback +( +cb +, +­p_key +, "<%s/>", +– +-> +’um_Çme +); + +82 if( +” +. +’coded + < 0è +ASN__ENCODE_FAILED +; + +83 + `ASN__ENCODED_OK +( +” +); + +85 + `ASN_DEBUG +( + +88 +ASN__ENCODE_FAILED +; + +90 + } +} + +92 +a¢_dec_rv®_t + + +93 + $N©iveEnum”©ed_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +94 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +95 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +96 ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +97 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics +; + +98 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0 }; + +99 * +Çtive + = (*)* +¥Œ +; + +100 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù + = +NULL +; + +101  +v®ue +; + +103 () +Ýt_codec_ùx +; + +105 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +106 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +107 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +v®ue +; + +108 +ASN__DECODE_FAILED +; + +109 if(! +¥ecs +è +ASN__DECODE_FAILED +; + +111 if(! +Çtive +) { + +112 +Çtive + = (*)(* +¥Œ + = + `CALLOC +(1, (*native))); + +113 if(! +Çtive +è +ASN__DECODE_FAILED +; + +116 + `ASN_DEBUG +("Decodšg % a N©iveEnum”©ed", +td +-> +Çme +); + +118 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +119  +šext + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +120 if( +šext + < 0è +ASN__DECODE_STARVED +; + +121 if( +šext +è +ù + = 0; + +124 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +125 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +ù +-> +¿nge_b™s +); + +126 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +127 if( +v®ue + >ð( +¥ecs +-> +ex‹nsiÚ + + +128 ? +¥ecs +-> +ex‹nsiÚ + - 1 : s³cs-> +m­_couÁ +)) + +129 +ASN__DECODE_FAILED +; + +131 if(! +¥ecs +-> +ex‹nsiÚ +) + +132 +ASN__DECODE_FAILED +; + +136 +v®ue + = + `u³r_g‘_n¢nwn +( +pd +); + +137 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +138 +v®ue + +ð +¥ecs +-> +ex‹nsiÚ + - 1; + +139 if( +v®ue + >ð +¥ecs +-> +m­_couÁ +) + +140 +ASN__DECODE_FAILED +; + +143 * +Çtive + = +¥ecs +-> +v®ue2’um +[ +v®ue +]. +Çt_v®ue +; + +144 + `ASN_DEBUG +("Decoded % ð%ld", +td +-> +Çme +, * +Çtive +); + +146  +rv® +; + +147 + } +} + +150 + $N©iveEnum”©ed__com·r_v®ue2’um +(cÚ¡ * +­ +, cÚ¡ * +bp +) { + +151 cÚ¡ +a¢_INTEGER_’um_m­_t + * +a + = +­ +; + +152 cÚ¡ +a¢_INTEGER_’um_m­_t + * +b + = +bp +; + +153 if( +a +-> +Çt_v®ue + =ð +b +->nat_value) + +155 if( +a +-> +Çt_v®ue + < +b +->nat_value) + +158 + } +} + +160 +a¢_’c_rv®_t + + +161 + $N©iveEnum”©ed_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +162 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +163 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +164 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +165 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +166 +a¢_’c_rv®_t + +” + = {0,0,0}; + +167  +Çtive +, +v®ue +; + +168 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù + = +NULL +; + +169  +šext + = 0; + +170 +a¢_INTEGER_’um_m­_t + +key +; + +171 cÚ¡ +a¢_INTEGER_’um_m­_t + * +kf +; + +173 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +174 if(! +¥ecs +è +ASN__ENCODE_FAILED +; + +176 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +177 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +178 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +v®ue +; + +179 +ASN__ENCODE_FAILED +; + +181 + `ASN_DEBUG +("Encodšg % a N©iveEnum”©ed", +td +-> +Çme +); + +183 +” +. +’coded + = 0; + +185 +Çtive + = *(cÚ¡ *) +¥Œ +; + +187 +key +. +Çt_v®ue + = +Çtive +; + +188 +kf + = + `b£¬ch +(& +key +, +¥ecs +-> +v®ue2’um +, s³cs-> +m­_couÁ +, + +189 ( +key +), +N©iveEnum”©ed__com·r_v®ue2’um +); + +190 if(! +kf +) { + +191 + `ASN_DEBUG +("Nؖem’ˆcÜ»¥Úd tØ%ld", +Çtive +); + +192 +ASN__ENCODE_FAILED +; + +194 +v®ue + = +kf + - +¥ecs +-> +v®ue2’um +; + +196 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +197  +cmpW™h + = +¥ecs +-> +ex‹nsiÚ + + +198 ? +¥ecs +-> +ex‹nsiÚ + - 1 : s³cs-> +m­_couÁ +; + +199 if( +v®ue + >ð +cmpW™h +) + +200 +šext + = 1; + +202 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +203 if( + `³r_put_ãw_b™s +( +po +, +šext +, 1)) + +204 +ASN__ENCODE_FAILED +; + +205 if( +šext +è +ù + = 0; + +206 } if( +šext +) { + +207 +ASN__ENCODE_FAILED +; + +210 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +211 if( + `³r_put_ãw_b™s +( +po +, +v®ue +, +ù +-> +¿nge_b™s +)) + +212 +ASN__ENCODE_FAILED +; + +213 + `ASN__ENCODED_OK +( +” +); + +216 if(! +¥ecs +-> +ex‹nsiÚ +) + +217 +ASN__ENCODE_FAILED +; + +222 + `ASN_DEBUG +("value = %ld,ƒxt = %d, inext = %d,„es = %ld", + +223 +v®ue +, +¥ecs +-> +ex‹nsiÚ +, +šext +, + +224 +v®ue + - ( +šext + ? ( +¥ecs +-> +ex‹nsiÚ + - 1) : 0)); + +225 if( + `u³r_put_n¢nwn +( +po +, +v®ue + - ( +šext + ? ( +¥ecs +-> +ex‹nsiÚ + - 1) : 0))) + +226 +ASN__ENCODE_FAILED +; + +228 + `ASN__ENCODED_OK +( +” +); + +229 + } +} + +231 +a¢_dec_rv®_t + + +232 + $N©iveEnum”©ed_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +233 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +234 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +235 ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +236 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_INTEGER_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +237 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0 }; + +238 * +Çtive + = (*)* +¥Œ +; + +239 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù + = +NULL +; + +240  +v®ue +; + +242 () +Ýt_codec_ùx +; + +244 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +245 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +246 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +v®ue +; + +247 +ASN__DECODE_FAILED +; + +248 if(! +¥ecs +è +ASN__DECODE_FAILED +; + +250 if(! +Çtive +) { + +251 +Çtive + = (*)(* +¥Œ + = + `CALLOC +(1, (*native))); + +252 if(! +Çtive +è +ASN__DECODE_FAILED +; + +255 + `ASN_DEBUG +("Decodšg % a N©iveEnum”©ed", +td +-> +Çme +); + +257 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +258  +šext + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +259 if( +šext + < 0è +ASN__DECODE_STARVED +; + +260 if( +šext +è +ù + = 0; + +264 if( +ù + && ct-> +uµ”_bound + >= 255) { + +265  +·ddšg + = 0; + +266 +·ddšg + = (8 - ( +pd +-> +moved + % 8)) % 8; + +267 + `ASN_DEBUG +("FÜ N©iveEnum”©ed %s,off£tð%lu Paddšg b™ ð%d", +td +-> +Çme +, +pd +-> +moved +, +·ddšg +); + +268 + `ASN_DEBUG +("FÜ N©iveEnum”©ed %s, uµ” bound = %lu", +td +-> +Çme +, +ù +-> +uµ”_bound +); + +269 if( +·ddšg + > 0) + +270 + `³r_g‘_ãw_b™s +( +pd +, +·ddšg +); + +273 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +274 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +ù +-> +¿nge_b™s +); + +275 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +276 if( +v®ue + >ð( +¥ecs +-> +ex‹nsiÚ + + +277 ? +¥ecs +-> +ex‹nsiÚ + - 1 : s³cs-> +m­_couÁ +)) + +278 +ASN__DECODE_FAILED +; + +280 if(! +¥ecs +-> +ex‹nsiÚ +) + +281 +ASN__DECODE_FAILED +; + +285 +v®ue + = + `u³r_g‘_n¢nwn +( +pd +); + +286 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +287 +v®ue + +ð +¥ecs +-> +ex‹nsiÚ + - 1; + +288 if( +v®ue + >ð +¥ecs +-> +m­_couÁ +) + +289 +ASN__DECODE_FAILED +; + +292 * +Çtive + = +¥ecs +-> +v®ue2’um +[ +v®ue +]. +Çt_v®ue +; + +293 + `ASN_DEBUG +("Decoded % ð%ld", +td +-> +Çme +, * +Çtive +); + +295  +rv® +; + +296 + } +} + +298 +a¢_’c_rv®_t + + +299 + $N©iveEnum”©ed_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +300 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +301 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +302 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_INTEGER_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +303 +a¢_’c_rv®_t + +” + = {0,0,0}; + +304  +Çtive +, +v®ue +; + +305 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù + = +NULL +; + +306  +šext + = 0; + +307 +a¢_INTEGER_’um_m­_t + +key +; + +308 +a¢_INTEGER_’um_m­_t + * +kf +; + +310 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +311 if(! +¥ecs +è +ASN__ENCODE_FAILED +; + +313 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +314 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +315 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +v®ue +; + +316 +ASN__ENCODE_FAILED +; + +318 + `ASN_DEBUG +("Encodšg % a N©iveEnum”©ed", +td +-> +Çme +); + +320 +” +. +’coded + = 0; + +322 +Çtive + = *(cÚ¡ *) +¥Œ +; + +323 if( +Çtive + < 0è +ASN__ENCODE_FAILED +; + +325 +key +. +Çt_v®ue + = +Çtive +; + +326 +kf + = + `b£¬ch +(& +key +, +¥ecs +-> +v®ue2’um +, s³cs-> +m­_couÁ +, + +327 ( +key +), +N©iveEnum”©ed__com·r_v®ue2’um +); + +328 if(! +kf +) { + +329 + `ASN_DEBUG +("Nؖem’ˆcÜ»¥Úd tØ%ld", +Çtive +); + +330 +ASN__ENCODE_FAILED +; + +332 +v®ue + = +kf + - +¥ecs +-> +v®ue2’um +; + +334 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +335  +cmpW™h + = +¥ecs +-> +ex‹nsiÚ + + +336 ? +¥ecs +-> +ex‹nsiÚ + - 1 : s³cs-> +m­_couÁ +; + +337 if( +v®ue + >ð +cmpW™h +) + +338 +šext + = 1; + +340 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +341 if( + `³r_put_ãw_b™s +( +po +, +šext +, 1)) + +342 +ASN__ENCODE_FAILED +; + +343 if( +šext +è +ù + = 0; + +344 } if( +šext +) { + +345 +ASN__ENCODE_FAILED +; + +348 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +349 if( + `³r_put_ãw_b™s +( +po +, +v®ue +, +ù +-> +¿nge_b™s +)) + +350 +ASN__ENCODE_FAILED +; + +351 + `ASN__ENCODED_OK +( +” +); + +354 if(! +¥ecs +-> +ex‹nsiÚ +) + +355 +ASN__ENCODE_FAILED +; + +360 + `ASN_DEBUG +("value = %ld,ƒxt = %d, inext = %d,„es = %ld", + +361 +v®ue +, +¥ecs +-> +ex‹nsiÚ +, +šext +, + +362 +v®ue + - ( +šext + ? ( +¥ecs +-> +ex‹nsiÚ + - 1) : 0)); + +363 if( + `u³r_put_n¢nwn +( +po +, +v®ue + - ( +šext + ? ( +¥ecs +-> +ex‹nsiÚ + - 1) : 0))) + +364 +ASN__ENCODE_FAILED +; + +366 + `ASN__ENCODED_OK +( +” +); + +367 + } +} + + @NativeInteger.c + +13  + ~ + +14  + ~ + +19 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_N©iveIÁeg”_gs +[] = { + +20 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +22 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_N©iveIÁeg” + = { + +23 +N©iveIÁeg”_ä“ +, + +24 +N©iveIÁeg”_´št +, + +25 +N©iveIÁeg”_com·» +, + +26 +N©iveIÁeg”_decode_b” +, + +27 +N©iveIÁeg”_’code_d” +, + +28 +N©iveIÁeg”_decode_x” +, + +29 +N©iveIÁeg”_’code_x” +, + +30 #ifdef +ASN_DISABLE_OER_SUPPORT + + +34 +N©iveIÁeg”_decode_Ûr +, + +35 +N©iveIÁeg”_’code_Ûr +, + +37 #ifdef +ASN_DISABLE_PER_SUPPORT + + +43 +N©iveIÁeg”_decode_u³r +, + +44 +N©iveIÁeg”_’code_u³r +, + +45 +N©iveIÁeg”_decode_­” +, + +46 +N©iveIÁeg”_’code_­” +, + +48 +N©iveIÁeg”_¿ndom_fžl +, + +51 +a¢_TYPE_desütÜ_t + + ga¢_DEF_N©iveIÁeg” + = { + +54 & +a¢_OP_N©iveIÁeg” +, + +55 +a¢_DEF_N©iveIÁeg”_gs +, + +56 ( +a¢_DEF_N©iveIÁeg”_gs +) / (asn_DEF_NativeInteger_tags[0]), + +57 +a¢_DEF_N©iveIÁeg”_gs +, + +58 ( +a¢_DEF_N©iveIÁeg”_gs +) / (asn_DEF_NativeInteger_tags[0]), + +59 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +67 +a¢_dec_rv®_t + + +68 + $N©iveIÁeg”_decode_b” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +69 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +nšt_±r +, + +70 cÚ¡ * +buf_±r +, +size_t + +size +,  +g_mode +) { + +71 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +72 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +73 * +Çtive + = (*)* +nšt_±r +; + +74 +a¢_dec_rv®_t + +rv® +; + +75 +b”_Žv_Ën_t + +Ëngth +; + +80 if( +Çtive + =ð +NULL +) { + +81 +Çtive + = (*)(* +nšt_±r + = + `CALLOC +(1, (*native))); + +82 if( +Çtive + =ð +NULL +) { + +83 +rv® +. +code + = +RC_FAIL +; + +84 +rv® +. +cÚsumed + = 0; + +85  +rv® +; + +89 + `ASN_DEBUG +("Decoding %s‡s INTEGER (tm=%d)", + +90 +td +-> +Çme +, +g_mode +); + +95 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, 0, +buf_±r +, +size +, + +96 +g_mode +, 0, & +Ëngth +, 0); + +97 if( +rv® +. +code + !ð +RC_OK +) + +98  +rv® +; + +100 + `ASN_DEBUG +("% Ëngth i %d by‹s", +td +-> +Çme +, () +Ëngth +); + +105 +buf_±r + = ((cÚ¡ *)buf_±rè+ +rv® +. +cÚsumed +; + +106 +size + -ð +rv® +. +cÚsumed +; + +107 if( +Ëngth + > ( +b”_Žv_Ën_t +) +size +) { + +108 +rv® +. +code + = +RC_WMORE +; + +109 +rv® +. +cÚsumed + = 0; + +110  +rv® +; + +119 +INTEGER_t + +tmp +; + +121 cÚ¡ * +cÚ¡buf +; + +122 * +nÚcÚ¡buf +; + +123 } +uncÚ¡_buf +; + +124  +l +; + +126 +uncÚ¡_buf +. +cÚ¡buf + = +buf_±r +; + +127 +tmp +. +buf + = ( +ušt8_t + *) +uncÚ¡_buf +. +nÚcÚ¡buf +; + +128 +tmp +. +size + = +Ëngth +; + +130 if(( +¥ecs +&&¥ecs-> +f›ld_unsigÃd +) + +131 ? + `a¢_INTEGER2ulÚg +(& +tmp +, (*)& +l +) + +132 : + `a¢_INTEGER2lÚg +(& +tmp +, & +l +)) { + +133 +rv® +. +code + = +RC_FAIL +; + +134 +rv® +. +cÚsumed + = 0; + +135  +rv® +; + +138 * +Çtive + = +l +; + +141 +rv® +. +code + = +RC_OK +; + +142 +rv® +. +cÚsumed + +ð +Ëngth +; + +144 + `ASN_DEBUG +("Took %ld/%ld bytesoƒncode %s (%ld)", + +145 () +rv® +. +cÚsumed +, () +Ëngth +, +td +-> +Çme +, ()* +Çtive +); + +147  +rv® +; + +148 + } +} + +153 +a¢_’c_rv®_t + + +154 + $N©iveIÁeg”_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +sd +, cÚ¡ * +±r +, + +155  +g_mode +, +b”_Žv_g_t + +g +, + +156 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +157  +Çtive + = *(cÚ¡ *) +±r +; + +158 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +159 +INTEGER_t + +tmp +; + +161 #ifdef +WORDS_BIGENDIAN + + +163 +tmp +. +buf + = ( +ušt8_t + *)& +Çtive +; + +164 +tmp +. +size + = ( +Çtive +); + +167 +ušt8_t + +buf +[( +Çtive +)]; + +168 +ušt8_t + * +p +; + +171  +p + = +buf + + (bufè- 1;… >ðbuf;…--, +Çtive + >>= 8) + +172 * +p + = ( +ušt8_t +) +Çtive +; + +174 +tmp +. +buf + = buf; + +175 +tmp +. +size + = ( +buf +); + +179 +”v® + = + `INTEGER_’code_d” +( +sd +, & +tmp +, +g_mode +, +g +, +cb +, +­p_key +); + +180 if( +”v® +. +¡ruùu»_±r + =ð& +tmp +) { + +181 +”v® +. +¡ruùu»_±r + = +±r +; + +183  +”v® +; + +184 + } +} + +189 +a¢_dec_rv®_t + + +190 + $N©iveIÁeg”_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +191 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +192 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, + +193 +size_t + +size +) { + +194 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +195 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +196 +a¢_dec_rv®_t + +rv® +; + +197 +INTEGER_t + +¡ +; + +198 * +¡_±r + = (*)& +¡ +; + +199 * +Çtive + = (*)* +¥Œ +; + +201 if(! +Çtive +) { + +202 +Çtive + = (*)(* +¥Œ + = + `CALLOC +(1, (*native))); + +203 if(! +Çtive +è +ASN__DECODE_FAILED +; + +206 + `mem£t +(& +¡ +, 0, (st)); + +207 +rv® + = + `INTEGER_decode_x” +( +Ýt_codec_ùx +, +td +, & +¡_±r +, + +208 +Ýt_mÇme +, +buf_±r +, +size +); + +209 if( +rv® +. +code + =ð +RC_OK +) { + +210  +l +; + +211 if(( +¥ecs +&&¥ecs-> +f›ld_unsigÃd +) + +212 ? + `a¢_INTEGER2ulÚg +(& +¡ +, (*)& +l +) + +213 : + `a¢_INTEGER2lÚg +(& +¡ +, & +l +)) { + +214 +rv® +. +code + = +RC_FAIL +; + +215 +rv® +. +cÚsumed + = 0; + +217 * +Çtive + = +l +; + +225 +rv® +. +cÚsumed + = 0; + +227 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_INTEGER +, & +¡ +); + +228  +rv® +; + +229 + } +} + +232 +a¢_’c_rv®_t + + +233 + $N©iveIÁeg”_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +234  +žev– +, +x”_’cod”_æags_e + +æags +, + +235 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +236 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +237 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +238  +sü©ch +[32]; + +239 +a¢_’c_rv®_t + +” + = {0,0,0}; + +240 cÚ¡ * +Çtive + = (cÚ¡ *) +¥Œ +; + +242 () +žev– +; + +243 () +æags +; + +245 if(! +Çtive +è +ASN__ENCODE_FAILED +; + +247 +” +. +’coded + = + `¢´štf +( +sü©ch +, (scratch), + +248 ( +¥ecs + && s³cs-> +f›ld_unsigÃd +) + +249 ? "%lu" : "%ld", * +Çtive +); + +250 if( +” +. +’coded + <ð0 || ( +size_t +ër.’coded >ð( +sü©ch +) + +251 || + `cb +( +sü©ch +, +” +. +’coded +, +­p_key +) < 0) + +252 +ASN__ENCODE_FAILED +; + +254 + `ASN__ENCODED_OK +( +” +); + +255 + } +} + +257 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +259 +a¢_dec_rv®_t + + +260 + $N©iveIÁeg”_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +261 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +262 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +263 +a¢_³r_d©a_t + * +pd +) { + +264 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +265 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +266 +a¢_dec_rv®_t + +rv® +; + +267 * +Çtive + = (*)* +¥Œ +; + +268 +INTEGER_t + +tmpšt +; + +269 * +tmpšŒ + = & +tmpšt +; + +271 () +Ýt_codec_ùx +; + +272 + `ASN_DEBUG +("Decodšg N©iveIÁeg” % (UPER)", +td +-> +Çme +); + +274 if(! +Çtive +) { + +275 +Çtive + = (*)(* +¥Œ + = + `CALLOC +(1, (*native))); + +276 if(! +Çtive +è +ASN__DECODE_FAILED +; + +279 + `mem£t +(& +tmpšt +, 0, mpint); + +280 +rv® + = + `INTEGER_decode_u³r +( +Ýt_codec_ùx +, +td +, +cÚ¡¿šts +, + +281 & +tmpšŒ +, +pd +); + +282 if( +rv® +. +code + =ð +RC_OK +) { + +283 if(( +¥ecs +&&¥ecs-> +f›ld_unsigÃd +) + +284 ? + `a¢_INTEGER2ulÚg +(& +tmpšt +, (*) +Çtive +) + +285 : + `a¢_INTEGER2lÚg +(& +tmpšt +, +Çtive +)) + +286 +rv® +. +code + = +RC_FAIL +; + +288 + `ASN_DEBUG +("NativeInteger %s got value %ld", + +289 +td +-> +Çme +, * +Çtive +); + +291 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_INTEGER +, & +tmpšt +); + +293  +rv® +; + +294 + } +} + +296 +a¢_’c_rv®_t + + +297 + $N©iveIÁeg”_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +298 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +299 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +300 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +301 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +302 +a¢_’c_rv®_t + +” + = {0,0,0}; + +303  +Çtive +; + +304 +INTEGER_t + +tmpšt +; + +306 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +308 +Çtive + = *(cÚ¡ *) +¥Œ +; + +310 + `ASN_DEBUG +("Encodšg N©iveIÁeg” % %ld (UPER)", +td +-> +Çme +, +Çtive +); + +312 + `mem£t +(& +tmpšt +, 0, (tmpint)); + +313 if(( +¥ecs +&&¥ecs-> +f›ld_unsigÃd +) + +314 ? + `a¢_ulÚg2INTEGER +(& +tmpšt +, +Çtive +) + +315 : + `a¢_lÚg2INTEGER +(& +tmpšt +, +Çtive +)) + +316 +ASN__ENCODE_FAILED +; + +317 +” + = + `INTEGER_’code_u³r +( +td +, +cÚ¡¿šts +, & +tmpšt +, +po +); + +318 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_INTEGER +, & +tmpšt +); + +319  +” +; + +320 + } +} + +322 +a¢_dec_rv®_t + + +323 + $N©iveIÁeg”_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +324 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +325 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +327 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_INTEGER_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +328 +a¢_dec_rv®_t + +rv® +; + +329 * +Çtive + = (*)* +¥Œ +; + +330 +INTEGER_t + +tmpšt +; + +331 * +tmpšŒ + = & +tmpšt +; + +333 () +Ýt_codec_ùx +; + +334 + `ASN_DEBUG +("Decodšg N©iveIÁeg” % (APER)", +td +-> +Çme +); + +336 if(! +Çtive +) { + +337 +Çtive + = (*)(* +¥Œ + = + `CALLOC +(1, (*native))); + +338 if(! +Çtive +è +ASN__DECODE_FAILED +; + +341 + `mem£t +(& +tmpšt +, 0, mpint); + +342 +rv® + = + `INTEGER_decode_­” +( +Ýt_codec_ùx +, +td +, +cÚ¡¿šts +, + +343 & +tmpšŒ +, +pd +); + +344 if( +rv® +. +code + =ð +RC_OK +) { + +345 if(( +¥ecs +&&¥ecs-> +f›ld_unsigÃd +) + +346 ? + `a¢_INTEGER2ulÚg +(& +tmpšt +, (*) +Çtive +) + +347 : + `a¢_INTEGER2lÚg +(& +tmpšt +, +Çtive +)) + +348 +rv® +. +code + = +RC_FAIL +; + +350 + `ASN_DEBUG +("NativeInteger %s got value %ld", + +351 +td +-> +Çme +, * +Çtive +); + +353 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_INTEGER +, & +tmpšt +); + +355  +rv® +; + +356 + } +} + +358 +a¢_’c_rv®_t + + +359 + $N©iveIÁeg”_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +360 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +361 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +363 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_INTEGER_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +364 +a¢_’c_rv®_t + +” + = {0,0,0}; + +365  +Çtive +; + +366 +INTEGER_t + +tmpšt +; + +368 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +370 +Çtive + = *(cÚ¡ *) +¥Œ +; + +372 + `ASN_DEBUG +("Encodšg N©iveIÁeg” % %ld (APER)", +td +-> +Çme +, +Çtive +); + +374 + `mem£t +(& +tmpšt +, 0, (tmpint)); + +375 if(( +¥ecs +&&¥ecs-> +f›ld_unsigÃd +) + +376 ? + `a¢_ulÚg2INTEGER +(& +tmpšt +, () +Çtive +) + +377 : + `a¢_lÚg2INTEGER +(& +tmpšt +, +Çtive +)) + +378 +ASN__ENCODE_FAILED +; + +379 +” + = + `INTEGER_’code_­” +( +td +, +cÚ¡¿šts +, & +tmpšt +, +po +); + +380 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_INTEGER +, & +tmpšt +); + +381  +” +; + +382 + } +} + +390 + $N©iveIÁeg”_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +391  +žev– +, +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +392 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +393 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +394 cÚ¡ * +Çtive + = (cÚ¡ *) +¥Œ +; + +395  +sü©ch +[32]; + +396  +»t +; + +398 () +td +; + +399 () +žev– +; + +401 if( +Çtive +) { + +402  +v®ue + = * +Çtive +; + +403 +»t + = + `¢´štf +( +sü©ch +, (scratch), + +404 ( +¥ecs + && s³cs-> +f›ld_unsigÃd +è? "%lu" : "%ld", +v®ue +); + +405 + `as£¹ +( +»t + > 0 && ( +size_t +ì‘ < ( +sü©ch +)); + +406 if( + `cb +( +sü©ch +, +»t +, +­p_key +) < 0)  -1; + +407 if( +¥ecs + && ( +v®ue + >ð0 || !¥ecs-> +f›ld_unsigÃd +)) { + +408 cÚ¡ +a¢_INTEGER_’um_m­_t + * +– + = + +409 + `INTEGER_m­_v®ue2’um +( +¥ecs +, +v®ue +); + +410 if( +– +) { + +411 if( + `cb +(" (", 2, +­p_key +) < 0)  -1; + +412 if( + `cb +( +– +-> +’um_Çme +,ƒl-> +’um_Ën +, +­p_key +) < 0)  -1; + +413 if( + `cb +(")", 1, +­p_key +) < 0)  -1; + +418  ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +420 + } +} + +423 + $N©iveIÁeg”_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +±r +, + +424 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +425 if(! +td + || ! +±r +) + +428 + `ASN_DEBUG +("Freeing %s‡s INTEGER (%d, %p, Native)", + +429 +td +-> +Çme +, +m‘hod +, +±r +); + +431  +m‘hod +) { + +432  +ASFM_FREE_EVERYTHING +: + +433 + `FREEMEM +( +±r +); + +435  +ASFM_FREE_UNDERLYING +: + +437  +ASFM_FREE_UNDERLYING_AND_RESET +: + +438 + `mem£t +( +±r +, 0, ()); + +441 + } +} + +444 + $N©iveIÁeg”_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, cÚ¡ * +b±r +) { + +445 () +td +; + +447 if( +­Œ + && +b±r +) { + +448 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +449 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +450 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) { + +451 cÚ¡ * +a + = +­Œ +; + +452 cÚ¡ * +b + = +b±r +; + +453 if(* +a + < * +b +) { + +455 } if(* +a + > * +b +) { + +461 cÚ¡ * +a + = +­Œ +; + +462 cÚ¡ * +b + = +b±r +; + +463 if(* +a + < * +b +) { + +465 } if(* +a + > * +b +) { + +471 } if(! +­Œ +) { + +476 + } +} + +478 +a¢_¿ndom_fžl_»suÉ_t + + +479 + $N©iveIÁeg”_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +480 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +481 +size_t + +max_Ëngth +) { + +482 cÚ¡ +a¢_INTEGER_¥ecifics_t + * +¥ecs + = + +483 (cÚ¡ +a¢_INTEGER_¥ecifics_t + *) +td +-> +¥ecifics +; + +484 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 1}; + +485 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +486 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +487 * +¡ + = * +¥Œ +; + +488 cÚ¡ +a¢_INTEGER_’um_m­_t + * +em­ +; + +489 +size_t + +em­_Ën +; + +490 +štmax_t + +v®ue +; + +491  +fšd_šside_m­ +; + +493 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +495 if( +¡ + =ð +NULL +) { + +496 +¡ + = (*) + `CALLOC +(1, (*st)); + +497 if( +¡ + =ð +NULL +) { + +498  +»suÉ_çžed +; + +502 if( +¥ecs +) { + +503 +em­ + = +¥ecs +-> +v®ue2’um +; + +504 +em­_Ën + = +¥ecs +-> +m­_couÁ +; + +505 if( +¥ecs +-> +¡riù_’um”©iÚ +) { + +506 +fšd_šside_m­ + = +em­_Ën + > 0; + +508 +fšd_šside_m­ + = +em­_Ën + ? + `a¢_¿ndom_b‘w“n +(0, 1) : 0; + +511 +em­ + = 0; + +512 +em­_Ën + = 0; + +513 +fšd_šside_m­ + = 0; + +516 if( +fšd_šside_m­ +) { + +517 + `as£¹ +( +em­_Ën + > 0); + +518 +v®ue + = +em­ +[ + `a¢_¿ndom_b‘w“n +(0, +em­_Ën + - 1)]. +Çt_v®ue +; + +520 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +ù +; + +522 cÚ¡  +v¬ŸÁs +[] = { + +528 if( +¥ecs + && s³cs-> +f›ld_unsigÃd +) { + +529 + `as£¹ +( +v¬ŸÁs +[18] == 0); + +530 +v®ue + = +v¬ŸÁs +[ + `a¢_¿ndom_b‘w“n +( + +531 18, ( +v¬ŸÁs +) / (variants[0]) - 1)]; + +533 +v®ue + = +v¬ŸÁs +[ + `a¢_¿ndom_b‘w“n +( + +534 0, ( +v¬ŸÁs +) / (variants[0]) - 1)]; + +537 if(! +cÚ¡¿šts +ècÚ¡¿št ð& +td +-> +’codšg_cÚ¡¿šts +; + +538 +ù + = +cÚ¡¿šts + ? cÚ¡¿šts-> +³r_cÚ¡¿šts + : 0; + +539 if( +ù + && (ù-> +v®ue +. +æags + & +APC_CONSTRAINED +)) { + +540 if( +v®ue + < +ù +->v®ue. +low”_bound + || v®u> ct->v®ue. +uµ”_bound +) { + +541 +v®ue + = + `a¢_¿ndom_b‘w“n +( +ù +->v®ue. +low”_bound +, + +542 +ù +-> +v®ue +. +uµ”_bound +); + +547 * +¥Œ + = +¡ +; + +548 * +¡ + = +v®ue +; + +549  +»suÉ_ok +; + +550 + } +} + + @NativeReal.c + +12  + ~ + +13  + ~ + +14  + ~ + +15  + ~ + +16  + ~ + +17  + ~<æßt.h +> + +19 #ià +defšed +( +__þªg__ +) + +27 #´agm¨ +þªg + +dŸgno¡ic + +push + + +28 #´agm¨ +þªg + +dŸgno¡ic + +ignÜed + "-Wc11-extensions" + +29  + $a¢_i¢ª +( +d +) { + +30  + `i¢ª +( +d +); + +31 + } +} + +32 #´agm¨ +þªg + +dŸgno¡ic + +pÝ + + +34  + #a¢_i¢ª +( +v +è + `i¢ª +(v) + + ) + +40 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_N©iveR—l_gs +[] = { + +41 ( +ASN_TAG_CLASS_UNIVERSAL + | (9 << 2)) + +43 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_N©iveR—l + = { + +44 +N©iveR—l_ä“ +, + +45 +N©iveR—l_´št +, + +46 +N©iveR—l_com·» +, + +47 +N©iveR—l_decode_b” +, + +48 +N©iveR—l_’code_d” +, + +49 +N©iveR—l_decode_x” +, + +50 +N©iveR—l_’code_x” +, + +51 #ifdef +ASN_DISABLE_OER_SUPPORT + + +55 +N©iveR—l_decode_Ûr +, + +56 +N©iveR—l_’code_Ûr +, + +58 #ifdef +ASN_DISABLE_PER_SUPPORT + + +64 +N©iveR—l_decode_u³r +, + +65 +N©iveR—l_’code_u³r +, + +66 +N©iveR—l_decode_­” +, + +67 +N©iveR—l_’code_­” +, + +69 +N©iveR—l_¿ndom_fžl +, + +72 +a¢_TYPE_desütÜ_t + + ga¢_DEF_N©iveR—l + = { + +75 & +a¢_OP_N©iveR—l +, + +76 +a¢_DEF_N©iveR—l_gs +, + +77 ( +a¢_DEF_N©iveR—l_gs +) / (asn_DEF_NativeReal_tags[0]), + +78 +a¢_DEF_N©iveR—l_gs +, + +79 ( +a¢_DEF_N©iveR—l_gs +) / (asn_DEF_NativeReal_tags[0]), + +80 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +85  +size_t + +N©iveR—l__æßt_size +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +); + +86  +N©iveR—l__g‘_doubË +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +87 cÚ¡ * +±r +); + +88  +ssize_t + +N©iveR—l__£t +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +89  +d +); + +94 +a¢_dec_rv®_t + + +95 + $N©iveR—l_decode_b” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +96 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +97 cÚ¡ * +buf_±r +, +size_t + +size +,  +g_mode +) { + +98 +a¢_dec_rv®_t + +rv® +; + +99 +b”_Žv_Ën_t + +Ëngth +; + +101 + `ASN_DEBUG +("Decodšg % a REAL (tm=%d)", +td +-> +Çme +, +g_mode +); + +106 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, 0, +buf_±r +, +size +, +g_mode +, 0, + +107 & +Ëngth +, 0); + +108 if( +rv® +. +code + !ð +RC_OK +) „val; + +109 + `as£¹ +( +Ëngth + >= 0); + +111 + `ASN_DEBUG +("% Ëngth i %d by‹s", +td +-> +Çme +, () +Ëngth +); + +116 +buf_±r + = ((cÚ¡ *)buf_±rè+ +rv® +. +cÚsumed +; + +117 +size + -ð +rv® +. +cÚsumed +; + +118 if( +Ëngth + > ( +b”_Žv_Ën_t +) +size +) { + +119 +rv® +. +code + = +RC_WMORE +; + +120 +rv® +. +cÚsumed + = 0; + +121  +rv® +; + +130 +ušt8_t + +sü©ch +[24]; + +131 +REAL_t + +tmp +; + +132  +d +; + +133  +»t +; + +135 if(( +size_t +) +Ëngth + < ( +sü©ch +)) { + +136 +tmp +. +buf + = +sü©ch +; + +137 +tmp +. +size + = +Ëngth +; + +140 +tmp +. +buf + = + `CALLOC +(1, +Ëngth + + 1); + +141 +tmp +. +size + = +Ëngth +; + +142 if(! +tmp +. +buf +) { + +143 +rv® +. +code + = +RC_FAIL +; + +144 +rv® +. +cÚsumed + = 0; + +145  +rv® +; + +149 + `memýy +( +tmp +. +buf +, +buf_±r +, +Ëngth +); + +150 +tmp +. +buf +[ +Ëngth +] = '\0'; + +152 +»t + = + `a¢_REAL2doubË +(& +tmp +, & +d +); + +153 if( +tmp +. +buf + !ð +sü©ch +è + `FREEMEM +(tmp.buf); + +154 if( +»t +) { + +155 +rv® +. +code + = +RC_FAIL +; + +156 +rv® +. +cÚsumed + = 0; + +157  +rv® +; + +160 if( + `N©iveR—l__£t +( +td +, +¥Œ +, +d +) < 0) + +161 +ASN__DECODE_FAILED +; + +164 +rv® +. +code + = +RC_OK +; + +165 +rv® +. +cÚsumed + +ð +Ëngth +; + +167 + `ASN_DEBUG +("Took %ld/%ld by‹ tؒcod%s", () +rv® +. +cÚsumed +, + +168 () +Ëngth +, +td +-> +Çme +); + +170  +rv® +; + +171 + } +} + +176 +a¢_’c_rv®_t + + +177 + $N©iveR—l_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +178  +g_mode +, +b”_Žv_g_t + +g +, + +179 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +180  +d + = + `N©iveR—l__g‘_doubË +( +td +, +¥Œ +); + +181 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +182 +REAL_t + +tmp +; + +185 + `mem£t +(& +tmp +, 0, (tmp)); + +187 if( + `a¢_doubË2REAL +(& +tmp +, +d +)) + +188 +ASN__ENCODE_FAILED +; + +191 +”v® + = + `d”_’code_´im™ive +( +td +, & +tmp +, +g_mode +, +g +, +cb +, +­p_key +); + +192 if( +”v® +. +’coded + == -1) { + +193 + `as£¹ +( +”v® +. +¡ruùu»_±r + =ð& +tmp +); + +194 +”v® +. +¡ruùu»_±r + = +¥Œ +; + +198 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +200  +”v® +; + +201 + } +} + +203 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +208 +a¢_dec_rv®_t + + +209 + $N©iveR—l_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +210 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +211 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +212 +a¢_³r_d©a_t + * +pd +) { + +213 +a¢_dec_rv®_t + +rv® +; + +214  +d +; + +215 +REAL_t + +tmp +; + +216 * +±mp + = & +tmp +; + +217  +»t +; + +219 () +cÚ¡¿šts +; + +221 + `mem£t +(& +tmp +, 0, (tmp)); + +222 +rv® + = + `OCTET_STRING_decode_u³r +( +Ýt_codec_ùx +, & +a¢_DEF_REAL +, + +223 +NULL +, & +±mp +, +pd +); + +224 if( +rv® +. +code + !ð +RC_OK +) { + +225 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +226  +rv® +; + +229 +»t + = + `a¢_REAL2doubË +(& +tmp +, & +d +); + +230 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +231 if( +»t +è +ASN__DECODE_FAILED +; + +233 if( + `N©iveR—l__£t +( +td +, +¥Œ +, +d +) < 0 ) + +234 +ASN__DECODE_FAILED +; + +236  +rv® +; + +237 + } +} + +242 +a¢_’c_rv®_t + + +243 + $N©iveR—l_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +244 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +245 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +246  +d + = + `N©iveR—l__g‘_doubË +( +td +, +¥Œ +); + +247 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +248 +REAL_t + +tmp +; + +250 () +cÚ¡¿šts +; + +253 + `mem£t +(& +tmp +, 0, (tmp)); + +255 if( + `a¢_doubË2REAL +(& +tmp +, +d +)) + +256 +ASN__ENCODE_FAILED +; + +259 +”v® + = + `OCTET_STRING_’code_u³r +(& +a¢_DEF_REAL +, +NULL +, & +tmp +, +po +); + +260 if( +”v® +. +’coded + == -1) + +261 +”v® +. +¡ruùu»_±r + = +¥Œ +; + +264 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +266  +”v® +; + +267 + } +} + +270 +a¢_dec_rv®_t + + +271 + $N©iveR—l_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +272 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +273 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +274 ** +dbl_±r +, +a¢_³r_d©a_t + * +pd +) { + +275 * +Dbl + = (*)* +dbl_±r +; + +276 +a¢_dec_rv®_t + +rv® +; + +277 +REAL_t + +tmp +; + +278 * +±mp + = & +tmp +; + +279  +»t +; + +281 () +cÚ¡¿šts +; + +286 if( +Dbl + =ð +NULL +) { + +287 * +dbl_±r + = + `CALLOC +(1, (* +Dbl +)); + +288 +Dbl + = (*)* +dbl_±r +; + +289 if( +Dbl + =ð +NULL +) + +290 +ASN__DECODE_FAILED +; + +293 + `mem£t +(& +tmp +, 0, (tmp)); + +294 +rv® + = + `OCTET_STRING_decode_­” +( +Ýt_codec_ùx +, +td +, +NULL +, + +295 & +±mp +, +pd +); + +296 if( +rv® +. +code + !ð +RC_OK +) { + +297 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +298  +rv® +; + +301 +»t + = + `a¢_REAL2doubË +(& +tmp +, +Dbl +); + +302 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +303 if( +»t +è +ASN__DECODE_FAILED +; + +305  +rv® +; + +306 + } +} + +308 +a¢_’c_rv®_t + + +309 + $N©iveR—l_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +310 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +311 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +312  +Dbl + = *(cÚ¡ *) +¥Œ +; + +313 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +314 +REAL_t + +tmp +; + +316 () +cÚ¡¿šts +; + +319 + `mem£t +(& +tmp +, 0, (tmp)); + +321 if( + `a¢_doubË2REAL +(& +tmp +, +Dbl +)) + +322 +ASN__ENCODE_FAILED +; + +325 +”v® + = + `OCTET_STRING_’code_­” +( +td +, +NULL +, & +tmp +, +po +); + +326 if( +”v® +. +’coded + == -1) + +327 +”v® +. +¡ruùu»_±r + = +¥Œ +; + +330 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +332  +”v® +; + +333 + } +} + +337 #iâdeà +ASN_DISABLE_OER_SUPPORT + + +344 + $N©iveR—l__ÃtwÜk_sw­ +( +size_t + +æßt_size +, cÚ¡ * +¤ý +, +ušt8_t + * +d¡ +) { + +345 cÚ¡ +ušt8_t + * +¤c + = +¤ý +; + +346  +‹¡ + = -0.0; + +347  +æßt_big_’dŸn + = *(cÚ¡ *)& +‹¡ + != 0; + +349 cÚ¡  +sizeof_doubË_is_8_a +[()-7] +CC_NOTUSED +; + +350 cÚ¡  +sizeof_doubË_is_8_b +[9-()] +CC_NOTUSED +; + +352 cÚ¡  +sizeof_æßt_is_4_a +[()-3] +CC_NOTUSED +; + +353 cÚ¡  +sizeof_æßt_is_4_b +[5-()] +CC_NOTUSED +; + +355  +æßt_size +) { + +357 + `as£¹ +(() == 8); + +358 if( +æßt_big_’dŸn +) { + +359 +d¡ +[0] = +¤c +[0]; + +360 +d¡ +[1] = +¤c +[1]; + +361 +d¡ +[2] = +¤c +[2]; + +362 +d¡ +[3] = +¤c +[3]; + +363 +d¡ +[4] = +¤c +[4]; + +364 +d¡ +[5] = +¤c +[5]; + +365 +d¡ +[6] = +¤c +[6]; + +366 +d¡ +[7] = +¤c +[7]; + +368 +d¡ +[0] = +¤c +[7]; + +369 +d¡ +[1] = +¤c +[6]; + +370 +d¡ +[2] = +¤c +[5]; + +371 +d¡ +[3] = +¤c +[4]; + +372 +d¡ +[4] = +¤c +[3]; + +373 +d¡ +[5] = +¤c +[2]; + +374 +d¡ +[6] = +¤c +[1]; + +375 +d¡ +[7] = +¤c +[0]; + +379 + `as£¹ +(() == 4); + +380 if( +æßt_big_’dŸn +) { + +381 +d¡ +[0] = +¤c +[0]; + +382 +d¡ +[1] = +¤c +[1]; + +383 +d¡ +[2] = +¤c +[2]; + +384 +d¡ +[3] = +¤c +[3]; + +386 +d¡ +[0] = +¤c +[3]; + +387 +d¡ +[1] = +¤c +[2]; + +388 +d¡ +[2] = +¤c +[1]; + +389 +d¡ +[3] = +¤c +[0]; + +393 + } +} + +398 +a¢_’c_rv®_t + + +399 + $N©iveR—l_’code_Ûr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +400 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +401 cÚ¡ * +¥Œ +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +402 * +­p_key +) { + +403 +a¢_’c_rv®_t + +” + = {0, 0, 0}; + +405 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +Ûr_cÚ¡¿šts +; + +406 if( +cÚ¡¿šts + && cÚ¡¿šts-> +v®ue +. +width + != 0) { + +408 +ušt8_t + +sü©ch +[()]; + +409 cÚ¡ +a¢_N©iveR—l_¥ecifics_t + * +¥ecs + = + +410 (cÚ¡ +a¢_N©iveR—l_¥ecifics_t + *) +td +-> +¥ecifics +; + +411 +size_t + +wœe_size + = +cÚ¡¿šts +-> +v®ue +. +width +; + +413 if( +¥ecs + ? ( +wœe_size + =ð¥ecs-> +æßt_size +) + +414 : ( +wœe_size + == ())) { + +420 + `as£¹ +(( +wœe_size + == ()) + +421 || ( +¥ecs + && s³cs-> +æßt_size + =ð +wœe_size +)); + +422 +ASN__ENCODE_FAILED +; + +429 + `N©iveR—l__ÃtwÜk_sw­ +( +wœe_size +, +¥Œ +, +sü©ch +); + +430 if( + `cb +( +sü©ch +, +wœe_size +, +­p_key +) < 0) { + +431 +ASN__ENCODE_FAILED +; + +433 +” +. +’coded + = +wœe_size +; + +434 + `ASN__ENCODED_OK +( +” +); + +437  +d + = + `N©iveR—l__g‘_doubË +( +td +, +¥Œ +); + +438 +ssize_t + +Ën_Ën +; + +439 +REAL_t + +tmp +; + +442 + `mem£t +(& +tmp +, 0, (tmp)); + +444 if( + `a¢_doubË2REAL +(& +tmp +, +d +)) { + +445 +ASN__ENCODE_FAILED +; + +449 +Ën_Ën + = + `Ûr_£rŸlize_Ëngth +( +tmp +. +size +, +cb +, +­p_key +); + +450 if( +Ën_Ën + < 0 || + `cb +( +tmp +. +buf +,mp. +size +, +­p_key +) < 0) { + +451 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +452 +ASN__ENCODE_FAILED +; + +454 +” +. +’coded + = +Ën_Ën + + +tmp +. +size +; + +455 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +tmp +); + +456 + `ASN__ENCODED_OK +( +” +); + +459 + } +} + +461 +a¢_dec_rv®_t + + +462 + $N©iveR—l_decode_Ûr +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +463 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +464 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +465 cÚ¡ * +±r +, +size_t + +size +) { + +466 +a¢_dec_rv®_t + +ok + = { +RC_OK +, 0}; + +467  +d +; + +468 +ssize_t + +Ën_Ën +; + +469 +size_t + +»®_body_Ën +; + +471 () +Ýt_codec_ùx +; + +473 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +Ûr_cÚ¡¿šts +; + +474 if( +cÚ¡¿šts + && cÚ¡¿šts-> +v®ue +. +width + != 0) { + +476 +ušt8_t + +sü©ch +[()]; + +477 +size_t + +wœe_size + = +cÚ¡¿šts +-> +v®ue +. +width +; + +479 if( +size + < +wœe_size +) + +480 +ASN__DECODE_STARVED +; + +486 + `N©iveR—l__ÃtwÜk_sw­ +( +wœe_size +, +±r +, +sü©ch +); + +489  +wœe_size +) { + +492  +tmp +; + +493 + `memýy +(& +tmp +, +sü©ch +, ()); + +494 if( + `N©iveR—l__£t +( +td +, +¥Œ +, +tmp +) < 0) + +495 +ASN__DECODE_FAILED +; + +500  +tmp +; + +501 + `memýy +(& +tmp +, +sü©ch +, ()); + +502 if( + `N©iveR—l__£t +( +td +, +¥Œ +, +tmp +) < 0) + +503 +ASN__DECODE_FAILED +; + +507 +ASN__DECODE_FAILED +; + +510 +ok +. +cÚsumed + = +wœe_size +; + +511  +ok +; + +514 +Ën_Ën + = + `Ûr_ãtch_Ëngth +( +±r +, +size +, & +»®_body_Ën +); + +515 if( +Ën_Ën + < 0è +ASN__DECODE_FAILED +; + +516 if( +Ën_Ën + =ð0è +ASN__DECODE_STARVED +; + +518 +±r + = (cÚ¡ *íŒ + +Ën_Ën +; + +519 +size + -ð +Ën_Ën +; + +521 if( +»®_body_Ën + > +size +è +ASN__DECODE_STARVED +; + +524 +ušt8_t + +sü©ch +[24]; + +525 +REAL_t + +tmp +; + +526  +»t +; + +528 if( +»®_body_Ën + < ( +sü©ch +)) { + +529 +tmp +. +buf + = +sü©ch +; + +530 +tmp +. +size + = +»®_body_Ën +; + +533 +tmp +. +buf + = + `CALLOC +(1, +»®_body_Ën + + 1); + +534 +tmp +. +size + = +»®_body_Ën +; + +535 if(! +tmp +. +buf +) { + +536 +ASN__DECODE_FAILED +; + +540 + `memýy +( +tmp +. +buf +, +±r +, +»®_body_Ën +); + +541 +tmp +. +buf +[ +»®_body_Ën +] = '\0'; + +543 +»t + = + `a¢_REAL2doubË +(& +tmp +, & +d +); + +544 if( +tmp +. +buf + !ð +sü©ch +è + `FREEMEM +(tmp.buf); + +545 if( +»t +) { + +546 + `ASN_DEBUG +("REAL decoded iÀ%" +ASN_PRI_SIZE + " bytes, but can't convert double", + +547 +»®_body_Ën +); + +548 +ASN__DECODE_FAILED +; + +552 if( + `N©iveR—l__£t +( +td +, +¥Œ +, +d +) < 0) + +553 +ASN__DECODE_FAILED +; + +555 +ok +. +cÚsumed + = +Ën_Ën + + +»®_body_Ën +; + +556  +ok +; + +557 + } +} + +564 +a¢_dec_rv®_t + + +565 + $N©iveR—l_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +566 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +567 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +) { + +568 +a¢_dec_rv®_t + +rv® +; + +569 +REAL_t + +¡ + = { 0, 0 }; + +570 +REAL_t + * +¡p + = & +¡ +; + +572 +rv® + = + `REAL_decode_x” +( +Ýt_codec_ùx +, +td +, (**)& +¡p +, +Ýt_mÇme +, + +573 +buf_±r +, +size +); + +574 if( +rv® +. +code + =ð +RC_OK +) { + +575  +d +; + +576 if( + `a¢_REAL2doubË +(& +¡ +, & +d +è|| + `N©iveR—l__£t +( +td +, +¥Œ +, d) < 0) { + +577 +rv® +. +code + = +RC_FAIL +; + +578 +rv® +. +cÚsumed + = 0; + +582 +rv® +. +cÚsumed + = 0; + +584 + `ASN_STRUCT_FREE_CONTENTS_ONLY +( +a¢_DEF_REAL +, & +¡ +); + +585  +rv® +; + +586 + } +} + +588 +a¢_’c_rv®_t + + +589 + $N©iveR—l_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +590  +žev– +, +x”_’cod”_æags_e + +æags +, + +591 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +592  +d + = + `N©iveR—l__g‘_doubË +( +td +, +¥Œ +); + +593 +a¢_’c_rv®_t + +” + = {0,0,0}; + +595 () +žev– +; + +597 +” +. +’coded + = + `REAL__dump +( +d +, +æags + & +XER_F_CANONICAL +, +cb +, +­p_key +); + +598 if( +” +. +’coded + < 0è +ASN__ENCODE_FAILED +; + +600 + `ASN__ENCODED_OK +( +” +); + +601 + } +} + +607 + $N©iveR—l_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +608 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +609 () +žev– +; + +611 if( +¥Œ +) { + +612  +d + = + `N©iveR—l__g‘_doubË +( +td +, +¥Œ +); + +613  ( + `REAL__dump +( +d +, 0, +cb +, +­p_key +) < 0) ? -1 : 0; + +615  ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +617 + } +} + +620 + $N©iveR—l_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +621 cÚ¡ * +b±r +) { + +623 if( +­Œ + && +b±r +) { + +624  +a + = + `N©iveR—l__g‘_doubË +( +td +, +­Œ +); + +625  +b + = + `N©iveR—l__g‘_doubË +( +td +, +b±r +); + +628 if( + `a¢_i¢ª +( +a +)) { + +629 if( + `a¢_i¢ª +( +b +)) { + +634 } if( + `a¢_i¢ª +( +b +)) { + +638 if( +a + < +b +) { + +640 } if( +a + > +b +) { + +645 } if(! +­Œ +) { + +650 + } +} + +653 + $N©iveR—l_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +±r +, + +654 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +655 if(! +td + || ! +±r +) + +658 + `ASN_DEBUG +("Freeing %s‡s REAL (%d, %p, Native)", + +659 +td +-> +Çme +, +m‘hod +, +±r +); + +661  +m‘hod +) { + +662  +ASFM_FREE_EVERYTHING +: + +663 + `FREEMEM +( +±r +); + +665  +ASFM_FREE_UNDERLYING +: + +667  +ASFM_FREE_UNDERLYING_AND_RESET +: { + +668 cÚ¡ +a¢_N©iveR—l_¥ecifics_t + * +¥ecs +; + +669 +size_t + +æßt_size +; + +670 +¥ecs + = (cÚ¡ +a¢_N©iveR—l_¥ecifics_t + *) +td +-> +¥ecifics +; + +671 +æßt_size + = +¥ecs + ? specs->float_size : (); + +672 + `mem£t +( +±r +, 0, +æßt_size +); + +675 + } +} + +677 +a¢_¿ndom_fžl_»suÉ_t + + +678 + $N©iveR—l_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +679 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +680 +size_t + +max_Ëngth +) { + +681 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 0}; + +682 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +683 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +684 #iâdeà +INFINITY + + +685  + #INFINITY + (1.0/0.0) + + ) + +687 #iâdeà +NAN + + +688  + #NAN + (0.0/0.0) + + ) + +690 cÚ¡  +doubË_v®ues +[] = { + +691 - +M_E +, M_E, - +M_PI +, M_PI, + +699 - +DBL_MIN +, DBL_MIN, + +700 - +DBL_MAX +, DBL_MAX, + +701 #ifdeà +DBL_TRUE_MIN + + +702 - +DBL_TRUE_MIN +, DBL_TRUE_MIN + +705 cÚ¡  +æßt_v®ues +[] = { + +706 0, -0.0, -1, 1, - +M_E +, M_E, -3.14, 3.14, - +M_PI +, M_PI, -255, 255, + +707 - +FLT_MIN +, FLT_MIN, + +708 - +FLT_MAX +, FLT_MAX, + +709 #ifdeà +FLT_TRUE_MIN + + +710 - +FLT_TRUE_MIN +, FLT_TRUE_MIN, + +712 +INFINITY +, -INFINITY, +NAN + + +714 +ssize_t + +æßt_£t_size + = + `N©iveR—l__æßt_size +( +td +); + +715 cÚ¡ +size_t + +n_doubËs + = ( +doubË_v®ues +) / (double_values[0]); + +716 cÚ¡ +size_t + +n_æßts + = ( +æßt_v®ues +) / (float_values[0]); + +717  +d +; + +719 () +cÚ¡¿šts +; + +721 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +723 if( +æßt_£t_size + =ð(è&& + `a¢_¿ndom_b‘w“n +(0, 1) == 0) { + +724 +d + = +doubË_v®ues +[ + `a¢_¿ndom_b‘w“n +(0, +n_doubËs + - 1)]; + +726 +d + = +æßt_v®ues +[ + `a¢_¿ndom_b‘w“n +(0, +n_æßts + - 1)]; + +729 if( + `N©iveR—l__£t +( +td +, +¥Œ +, +d +) < 0) { + +730  +»suÉ_çžed +; + +733 +»suÉ_ok +. +Ëngth + = +æßt_£t_size +; + +734  +»suÉ_ok +; + +735 + } +} + +742  +size_t + + +743 + $N©iveR—l__æßt_size +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +) { + +744 cÚ¡ +a¢_N©iveR—l_¥ecifics_t + * +¥ecs + = + +745 (cÚ¡ +a¢_N©iveR—l_¥ecifics_t + *) +td +-> +¥ecifics +; + +746  +¥ecs + ? s³cs-> +æßt_size + : (); + +747 + } +} + +750 + $N©iveR—l__g‘_doubË +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +±r +) { + +751 +size_t + +æßt_size + = + `N©iveR—l__æßt_size +( +td +); + +752 if( +æßt_size + == ()) { + +753  *(cÚ¡ *) +±r +; + +755  *(cÚ¡ *) +±r +; + +757 + } +} + +759  +ssize_t + + +760 + $N©iveR—l__£t +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +,  +d +) { + +761 +size_t + +æßt_size + = + `N©iveR—l__æßt_size +( +td +); + +762 * +Çtive +; + +764 if(!( +Çtive + = * +¥Œ +)) { + +765 +Çtive + = (* +¥Œ + = + `CALLOC +(1, +æßt_size +)); + +766 if(! +Çtive +) { + +771 if( +æßt_size + == ()) { + +772 if( + `a¢_doubË2æßt +( +d +, (*) +Çtive +)) { + +776 *(*) +Çtive + = +d +; + +779  +æßt_size +; + +780 + } +} + + @NgENB-ID.c + +8  + ~"NgENB-ID.h +" + +11 + $memb_maüoNgENB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 if( +¡ +-> +size + > 0) { + +25 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +27 +size + = 0; + +30 if(( +size + == 20)) { + +34 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +36 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +39 + } +} + +42 + $memb_shÜtMaüoNgENB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +43 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +44 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +45 +size_t + +size +; + +47 if(! +¥Œ +) { + +48 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +50 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +54 if( +¡ +-> +size + > 0) { + +56 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +58 +size + = 0; + +61 if(( +size + == 18)) { + +65 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +67 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +70 + } +} + +73 + $memb_lÚgMaüoNgENB_ID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +74 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +75 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +76 +size_t + +size +; + +78 if(! +¥Œ +) { + +79 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +81 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +85 if( +¡ +-> +size + > 0) { + +87 +size + = 8 * +¡ +->siz- (¡-> +b™s_unu£d + & 0x07); + +89 +size + = 0; + +92 if(( +size + == 21)) { + +96 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +98 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +101 + } +} + +103  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_maüoNgENB_ID_cÚ¡r_2 + + gCC_NOTUSED + = { + +104 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +105 { +APC_CONSTRAINED +, 0, 0, 20, 20 } , + +108  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_shÜtMaüoNgENB_ID_cÚ¡r_3 + + gCC_NOTUSED + = { + +109 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +110 { +APC_CONSTRAINED +, 0, 0, 18, 18 } , + +113  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_lÚgMaüoNgENB_ID_cÚ¡r_4 + + gCC_NOTUSED + = { + +114 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +115 { +APC_CONSTRAINED +, 0, 0, 21, 21 } , + +118 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_NgENB_ID_cÚ¡r_1 + + gCC_NOTUSED + = { + +119 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 2, 2, 0, 2 } , + +120 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +123 +a¢_TYPE_memb”_t + + ga¢_MBR_NgENB_ID_1 +[] = { + +124 { +ATF_NOFLAGS +, 0, +off£tof +( +NgENB_ID +, +choiû +. +maüoNgENB_ID +), + +125 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +127 & +a¢_DEF_BIT_STRING +, + +129 { 0, & +a¢_PER_memb_maüoNgENB_ID_cÚ¡r_2 +, +memb_maüoNgENB_ID_cÚ¡¿št_1 + }, + +133 { +ATF_NOFLAGS +, 0, +off£tof +( +NgENB_ID +, +choiû +. +shÜtMaüoNgENB_ID +), + +134 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +136 & +a¢_DEF_BIT_STRING +, + +138 { 0, & +a¢_PER_memb_shÜtMaüoNgENB_ID_cÚ¡r_3 +, +memb_shÜtMaüoNgENB_ID_cÚ¡¿št_1 + }, + +142 { +ATF_NOFLAGS +, 0, +off£tof +( +NgENB_ID +, +choiû +. +lÚgMaüoNgENB_ID +), + +143 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +145 & +a¢_DEF_BIT_STRING +, + +147 { 0, & +a¢_PER_memb_lÚgMaüoNgENB_ID_cÚ¡r_4 +, +memb_lÚgMaüoNgENB_ID_cÚ¡¿št_1 + }, + +152 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_NgENB_ID_g2–_1 +[] = { + +153 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +154 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +155 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +157 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_NgENB_ID_¥ecs_1 + = { + +158 ( +NgENB_ID +), + +159 +off£tof +( +NgENB_ID +, +_a¢_ùx +), + +160 +off£tof +( +NgENB_ID +, +´e£Á +), + +161 ((( +NgENB_ID + *)0)-> +´e£Á +), + +162 +a¢_MAP_NgENB_ID_g2–_1 +, + +167 +a¢_TYPE_desütÜ_t + + ga¢_DEF_NgENB_ID + = { + +170 & +a¢_OP_CHOICE +, + +175 { 0, & +a¢_PER_ty³_NgENB_ID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +176 +a¢_MBR_NgENB_ID_1 +, + +178 & +a¢_SPC_NgENB_ID_¥ecs_1 + + + @OCTET_STRING.c + +6  + ~ + +7  + ~ + +8  + ~ + +9  + ~<”ºo.h +> + +14 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_OCTET_STRING_gs +[] = { + +15 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +17 +a¢_OCTET_STRING_¥ecifics_t + + ga¢_SPC_OCTET_STRING_¥ecs + = { + +18 ( +OCTET_STRING_t +), + +19 +off£tof +( +OCTET_STRING_t +, +_a¢_ùx +), + +20 +ASN_OSUBV_STR + + +23 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_OCTET_STRING + = { + +24 +OCTET_STRING_ä“ +, + +25 +OCTET_STRING_´št +, + +26 +OCTET_STRING_com·» +, + +27 +OCTET_STRING_decode_b” +, + +28 +OCTET_STRING_’code_d” +, + +29 +OCTET_STRING_decode_x”_hex +, + +30 +OCTET_STRING_’code_x” +, + +31 #ifdef +ASN_DISABLE_OER_SUPPORT + + +35 +OCTET_STRING_decode_Ûr +, + +36 +OCTET_STRING_’code_Ûr +, + +38 #ifdef +ASN_DISABLE_PER_SUPPORT + + +44 +OCTET_STRING_decode_u³r +, + +45 +OCTET_STRING_’code_u³r +, + +46 +OCTET_STRING_decode_­” +, + +47 +OCTET_STRING_’code_­” +, + +49 +OCTET_STRING_¿ndom_fžl +, + +52 +a¢_TYPE_desütÜ_t + + ga¢_DEF_OCTET_STRING + = { + +55 & +a¢_OP_OCTET_STRING +, + +56 +a¢_DEF_OCTET_STRING_gs +, + +57 ( +a¢_DEF_OCTET_STRING_gs +) + +58 / ( +a¢_DEF_OCTET_STRING_gs +[0]), + +59 +a¢_DEF_OCTET_STRING_gs +, + +60 ( +a¢_DEF_OCTET_STRING_gs +) + +61 / ( +a¢_DEF_OCTET_STRING_gs +[0]), + +62 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +64 & +a¢_SPC_OCTET_STRING_¥ecs + + +67 #undeà +_CH_PHASE + + +68 #undeà +NEXT_PHASE + + +69 #undeà +PREV_PHASE + + +70  + #_CH_PHASE +( +ùx +, +šc +) do { \ + +71 if( +ùx +-> +pha£ + == 0) \ + +72 +ùx +-> +cڋxt + = 0; \ + +73 +ùx +-> +pha£ + +ð +šc +; \ + +74 } 0) + + ) + +75  + #NEXT_PHASE +( +ùx +è + `_CH_PHASE +(ùx, +1) + + ) + +76  + #PREV_PHASE +( +ùx +è + `_CH_PHASE +(ùx, -1) + + ) + +78 #undeà +ADVANCE + + +79  + #ADVANCE +( +num_by‹s +) do { \ + +80 +size_t + +num + = ( +num_by‹s +); \ + +81 +buf_±r + = ((cÚ¡ *)buf_±rè+ +num +; \ + +82 +size + -ð +num +; \ + +83 +cÚsumed_my£lf + +ð +num +; \ + +84 } 0) + + ) + +86 #undeà +RETURN + + +87  + #RETURN +( +_code +) do { \ + +88 +a¢_dec_rv®_t + +tm´v® +; \ + +89 +tm´v® +. +code + = +_code +; \ + +90 +tm´v® +. +cÚsumed + = +cÚsumed_my£lf +; \ + +91  +tm´v® +; \ + +92 } 0) + + ) + +94 #undeà +APPEND + + +95  + #APPEND +( +buåŒ +, +bufsize +) do { \ + +96 +size_t + +_bs + = ( +bufsize +); \ + +97 +size_t + +_ns + = +ùx +-> +cڋxt +; \ + +98 +size_t + +_es + = +¡ +-> +size + + +_bs +; \ + +100 if(() +_es + < 0è + `RETURN +( +RC_FAIL +); \ + +101 if( +_ns + <ð +_es +) { \ + +102 * +±r +; \ + +104 dØ{ +_ns + = _ns ? _ns << 1 : 16; } \ + +105  +_ns + <ð +_es +); \ + +107 if(() +_ns + < 0è + `RETURN +( +RC_FAIL +); \ + +108 +±r + = + `REALLOC +( +¡ +-> +buf +, +_ns +); \ + +109 if( +±r +) { \ + +110 +¡ +-> +buf + = ( +ušt8_t + *) +±r +; \ + +111 +ùx +-> +cڋxt + = +_ns +; \ + +113 + `RETURN +( +RC_FAIL +); \ + +115 + `ASN_DEBUG +("R—Îoÿtšg iÁØ%ld", () +_ns +); \ + +117 + `memýy +( +¡ +-> +buf + + st-> +size +, +buåŒ +, +_bs +); \ + +119 +¡ +-> +buf +[ +_es +] = '\0'; \ + +120 +¡ +-> +size + = +_es +; \ + +121 } 0) + + ) + +129  + s_¡ack_– + { + +130 +b”_Žv_Ën_t + + mËá +; + +131 +b”_Žv_Ën_t + + mgÙ +; + +132  + mcÚt_Ëv– +; + +133  + mwªt_nuÎs +; + +134  + mb™s_chݳd +; + +135 +b”_Žv_g_t + + mg +; + +136  +_¡ack_– + * + m´ev +; + +137  +_¡ack_– + * + mÃxt +; + +139  + s_¡ack + { + +140  +_¡ack_– + * + mž +; + +141  +_¡ack_– + * + mcur_±r +; + +144  +_¡ack_– + * + +145 + $OS__add_¡ack_– +( +_¡ack + * +¡ +) { + +146  +_¡ack_– + * +Ãl +; + +151 if( +¡ +-> +cur_±r + && st->cur_±r-> +Ãxt +) { + +152 +Ãl + = +¡ +-> +cur_±r +-> +Ãxt +; + +153 +Ãl +-> +b™s_chݳd + = 0; + +154 +Ãl +-> +gÙ + = 0; + +157 +Ãl + = ( +_¡ack_– + *) + `CALLOC +(1, (_stack_el)); + +158 if( +Ãl + =ð +NULL +) + +159  +NULL +; + +161 if( +¡ +-> +ž +) { + +163 +Ãl +-> +cÚt_Ëv– + = +¡ +-> +ž +->cont_level + 1; + +164 +¡ +-> +ž +-> +Ãxt + = +Ãl +; + +166 +Ãl +-> +´ev + = +¡ +-> +ž +; + +167 +¡ +-> +ž + = +Ãl +; + +170 +¡ +-> +cur_±r + = +Ãl +; + +172  +Ãl +; + +173 + } +} + +175  +_¡ack + * + +176 + $_Ãw_¡ack +() { + +177  ( +_¡ack + *) + `CALLOC +(1, (_stack)); + +178 + } +} + +183 +a¢_dec_rv®_t + + +184 + $OCTET_STRING_decode_b” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +185 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +186 cÚ¡ * +buf_±r +, +size_t + +size +,  +g_mode +) { + +187 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +188 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +189 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +190 +BIT_STRING_t + * +¡ + = (BIT_STRING_ˆ*)* +¥Œ +; + +191 +a¢_dec_rv®_t + +rv® +; + +192 +a¢_¡ruù_ùx_t + * +ùx +; + +193 +ssize_t + +cÚsumed_my£lf + = 0; + +194  +_¡ack + * +¡ck +; + +195  +_¡ack_– + * +£l + = 0; + +196  +Žv_cÚ¡r +; + +197 +a¢_OS_Subv¬ŸÁ + +ty³_v¬ŸÁ + = +¥ecs +-> +subv¬ŸÁ +; + +199 + `ASN_DEBUG +("Decoding %s‡s %s (frame %ld)", + +200 +td +-> +Çme +, + +201 ( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_STR +) ? + +203 () +size +); + +208 if( +¡ + =ð +NULL +) { + +209 +¡ + = ( +BIT_STRING_t + *)(* +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +)); + +210 if( +¡ + =ð +NULL +è + `RETURN +( +RC_FAIL +); + +214 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +216  +ùx +-> +pha£ +) { + +221 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, +ùx +, + +222 +buf_±r +, +size +, +g_mode +, -1, + +223 & +ùx +-> +Ëá +, & +Žv_cÚ¡r +); + +224 if( +rv® +. +code + !ð +RC_OK +) + +225  +rv® +; + +227 if( +Žv_cÚ¡r +) { + +231 +ùx +-> +±r + = + `_Ãw_¡ack +(); + +232 if(! +ùx +-> +±r +) { + +233 + `RETURN +( +RC_FAIL +); + +239 + `_CH_PHASE +( +ùx +, 3); + +240 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_ANY + && +g_mode + != 1) + +241 + `APPEND +( +buf_±r +, +rv® +. +cÚsumed +); + +242 + `ADVANCE +( +rv® +. +cÚsumed +); + +243  +pha£3 +; + +246 + `NEXT_PHASE +( +ùx +); + +249 +pha£1 +: + +253 +¡ck + = ( +_¡ack + *) +ùx +-> +±r +; + +254 +£l + = +¡ck +-> +cur_±r +; + +256 +b”_Žv_g_t + +Žv_g +; + +257 +b”_Žv_Ën_t + +Žv_Ën +; + +258 +b”_Žv_g_t + +ex³ùed_g +; + +259 +ssize_t + +Ž +, +Î +, +Žvl +; + +261 +size_t + +Leá + = ((! +£l +||(size_t)£l-> +Ëá + >ð +size +) + +262 ? +size +:( +size_t +) +£l +-> +Ëá +); + +265 + `ASN_DEBUG +("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", (*) +£l +, + +266 ()( +£l +?£l-> +Ëá +:0), + +267 ()( +£l +?£l-> +wªt_nuÎs +:0), + +268 ()( +£l +?£l-> +gÙ +:0) + +270 if( +£l + && s–-> +Ëá + <ð0 && s–-> +wªt_nuÎs + == 0) { + +271 if( +£l +-> +´ev +) { + +272  +_¡ack_– + * +´ev + = +£l +->prev; + +273 if( +´ev +-> +Ëá + != -1) { + +274 if( +´ev +-> +Ëá + < +£l +-> +gÙ +) + +275 + `RETURN +( +RC_FAIL +); + +276 +´ev +-> +Ëá + -ð +£l +-> +gÙ +; + +278 +´ev +-> +gÙ + +ð +£l +->got; + +279 +£l + = +¡ck +-> +cur_±r + = +´ev +; + +280 if(! +£l +) ; + +281 +Žv_cÚ¡r + = 1; + +284 +£l + = +¡ck +-> +cur_±r + = 0; + +289 +Ž + = + `b”_ãtch_g +( +buf_±r +, +Leá +, & +Žv_g +); + +290 + `ASN_DEBUG +("fetchag(size=%ld,L=%ld), %sstack,†eft=%ld, wn=%ld,l=%ld", + +291 () +size +, () +Leá +, +£l +?"":"!", + +292 ()( +£l +?£l-> +Ëá +:0), + +293 ()( +£l +?£l-> +wªt_nuÎs +:0), + +294 () +Ž +); + +295  +Ž +) { + +296 -1: + `RETURN +( +RC_FAIL +); + +297 0: + `RETURN +( +RC_WMORE +); + +300 +Žv_cÚ¡r + = + `BER_TLV_CONSTRUCTED +( +buf_±r +); + +302 +Î + = + `b”_ãtch_Ëngth +( +Žv_cÚ¡r +, + +303 (cÚ¡ *) +buf_±r + + +Ž +, +Leá + -l,& +Žv_Ën +); + +304 + `ASN_DEBUG +("Gotag=%s,c=%d,†eft=%ld,l=%ld,†en=%ld,†l=%ld", + +305 + `b”_Žv_g_¡ršg +( +Žv_g +), +Žv_cÚ¡r +, + +306 () +Leá +, () +Ž +, () +Žv_Ën +, () +Î +); + +307  +Î +) { + +308 -1: + `RETURN +( +RC_FAIL +); + +309 0: + `RETURN +( +RC_WMORE +); + +312 if( +£l + && s–-> +wªt_nuÎs + + +313 && ((cÚ¡ +ušt8_t + *) +buf_±r +)[0] == 0 + +314 && ((cÚ¡ +ušt8_t + *) +buf_±r +)[1] == 0) + +317 + `ASN_DEBUG +("E© EOC; wn=%d--", +£l +-> +wªt_nuÎs +); + +319 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_ANY + + +320 && ( +g_mode + !ð1 || +£l +-> +cÚt_Ëv– +)) + +321 + `APPEND +("\0\0", 2); + +323 + `ADVANCE +(2); + +324 +£l +-> +gÙ + += 2; + +325 if( +£l +-> +Ëá + != -1) { + +326 +£l +-> +Ëá + -= 2; + +329 +£l +-> +wªt_nuÎs +--; + +330 if( +£l +-> +wªt_nuÎs + == 0) { + +332 +£l +-> +Ëá + = 0; + +333 +Žv_cÚ¡r + = 1; + +343  +ty³_v¬ŸÁ +) { + +344  +ASN_OSUBV_BIT +: + +347  +ASN_OSUBV_STR +: + +349 if( +£l +) { + +350  +Ëv– + = +£l +-> +cÚt_Ëv– +; + +351 if( +Ëv– + < +td +-> +®l_gs_couÁ +) { + +352 +ex³ùed_g + = +td +-> +®l_gs +[ +Ëv– +]; + +354 } if( +td +-> +®l_gs_couÁ +) { + +355 +ex³ùed_g + = +td +-> +®l_gs + + +356 [ +td +-> +®l_gs_couÁ + - 1]; + +362  +ASN_OSUBV_ANY +: + +363 +ex³ùed_g + = +Žv_g +; + +368 if( +Žv_g + !ð +ex³ùed_g +) { + +369  +buf +[2][32]; + +370 + `b”_Žv_g_¢´št +( +Žv_g +, + +371 +buf +[0], (buf[0])); + +372 + `b”_Žv_g_¢´št +( +td +-> +gs +[td-> +gs_couÁ +-1], + +373 +buf +[1], (buf[1])); + +374 + `ASN_DEBUG +("Tag does‚ot matchƒxpectation: %s != %s", + +375 +buf +[0], buf[1]); + +376 + `RETURN +( +RC_FAIL +); + +379 +Žvl + = +Ž + + +Î +; + +380 if(( +Žv_Ën + + +Žvl +) < 0) { + +382 + `ASN_DEBUG +("TLVƒncoding +†ength (%ld) isoo big", + +383 () +Žv_Ën +); + +384 + `RETURN +( +RC_FAIL +); + +390 +£l + = + `OS__add_¡ack_– +( +¡ck +); + +391 if(! +£l +è + `RETURN +( +RC_FAIL +); + +393 +£l +-> +g + = +Žv_g +; + +395 +£l +-> +wªt_nuÎs + = ( +Žv_Ën +==-1); + +396 if( +£l +-> +´ev + && s–->´ev-> +Ëá + != -1) { + +398 if( +£l +-> +´ev +-> +Ëá + < +Žvl + + ( +Žv_Ën +==-1?0:tlv_len)) + +399 + `RETURN +( +RC_FAIL +); + +400 if( +Žv_Ën + == -1) + +401 +£l +-> +Ëá + = s–-> +´ev +->Ëá - +Žvl +; + +403 +£l +-> +Ëá + = +Žv_Ën +; + +405 +£l +-> +Ëá + = +Žv_Ën +; + +407 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_ANY + + +408 && ( +g_mode + !ð1 || +£l +-> +cÚt_Ëv– +)) + +409 + `APPEND +( +buf_±r +, +Žvl +); + +410 +£l +-> +gÙ + +ð +Žvl +; + +411 + `ADVANCE +( +Žvl +); + +413 + `ASN_DEBUG +("+EXPECT2 got=%ld†eft=%ld, wn=%d, clvl=%u", + +414 () +£l +-> +gÙ +, ()£l-> +Ëá +, + +415 +£l +-> +wªt_nuÎs +, s–-> +cÚt_Ëv– +); + +417 }  +Žv_cÚ¡r +); + +418 if( +£l + =ð +NULL +) { + +420 + `ASN_DEBUG +("Phase out"); + +421 + `_CH_PHASE +( +ùx +, +3); + +425 + `NEXT_PHASE +( +ùx +); + +428 +¡ck + = ( +_¡ack + *) +ùx +-> +±r +; + +429 +£l + = +¡ck +-> +cur_±r +; + +430 + `ASN_DEBUG +("Phase 2: Need %ld bytes, size=%ld,‡lrg=%ld, wn=%d", + +431 () +£l +-> +Ëá +, () +size +, ()£l-> +gÙ +, + +432 +£l +-> +wªt_nuÎs +); + +434 +b”_Žv_Ën_t + +Ën +; + +436 + `as£¹ +( +£l +-> +Ëá + >= 0); + +438 +Ën + = (( +b”_Žv_Ën_t +) +size + < +£l +-> +Ëá +) + +439 ? ( +b”_Žv_Ën_t +) +size + : +£l +-> +Ëá +; + +440 if( +Ën + > 0) { + +441 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_BIT + + +442 && +£l +-> +b™s_chݳd + == 0) { + +444 +¡ +-> +b™s_unu£d + = *(cÚ¡ +ušt8_t + *) +buf_±r +; + +445 + `APPEND +(((cÚ¡ *) +buf_±r ++1), ( +Ën + - 1)); + +446 +£l +-> +b™s_chݳd + = 1; + +448 + `APPEND +( +buf_±r +, +Ën +); + +450 + `ADVANCE +( +Ën +); + +451 +£l +-> +Ëá + -ð +Ën +; + +452 +£l +-> +gÙ + +ð +Ën +; + +455 if( +£l +-> +Ëá +) { + +456 + `ASN_DEBUG +("OS†eft %ld, size = %ld, wn=%d\n", + +457 () +£l +-> +Ëá +, () +size +, s–-> +wªt_nuÎs +); + +458 + `RETURN +( +RC_WMORE +); + +461 + `PREV_PHASE +( +ùx +); + +462  +pha£1 +; + +466 +pha£3 +: + +470 + `as£¹ +( +ùx +-> +Ëá + >= 0); + +472 if( +size + < ( +size_t +) +ùx +-> +Ëá +) { + +473 if(! +size +è + `RETURN +( +RC_WMORE +); + +474 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_BIT + && ! +ùx +-> +cڋxt +) { + +475 +¡ +-> +b™s_unu£d + = *(cÚ¡ +ušt8_t + *) +buf_±r +; + +476 +ùx +-> +Ëá +--; + +477 + `ADVANCE +(1); + +479 + `APPEND +( +buf_±r +, +size +); + +480 + `as£¹ +( +ùx +-> +cڋxt + > 0); + +481 +ùx +-> +Ëá + -ð +size +; + +482 + `ADVANCE +( +size +); + +483 + `RETURN +( +RC_WMORE +); + +485 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_BIT + + +486 && ! +ùx +-> +cڋxt + && ctx-> +Ëá +) { + +487 +¡ +-> +b™s_unu£d + = *(cÚ¡ +ušt8_t + *) +buf_±r +; + +488 +ùx +-> +Ëá +--; + +489 + `ADVANCE +(1); + +491 + `APPEND +( +buf_±r +, +ùx +-> +Ëá +); + +492 + `ADVANCE +( +ùx +-> +Ëá +); + +493 +ùx +-> +Ëá + = 0; + +495 + `NEXT_PHASE +( +ùx +); + +500 if( +£l +) { + +501 + `ASN_DEBUG +("3sel…=%p, wn=%d,†=%ld, g=%ld, size=%ld", + +502 (*) +£l +-> +´ev +, s–-> +wªt_nuÎs +, + +503 () +£l +-> +Ëá +, ()£l-> +gÙ +, () +size +); + +504 if( +£l +-> +´ev + || s–-> +wªt_nuÎs + > 1 || s–-> +Ëá + > 0) { + +505 + `RETURN +( +RC_WMORE +); + +512 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_BIT +) { + +513 if( +¡ +-> +size +) { + +514 if( +¡ +-> +b™s_unu£d + < 0 || st->bits_unused > 7) { + +515 + `RETURN +( +RC_FAIL +); + +518 +¡ +-> +buf +[¡-> +size +-1] &ð0xfà<< st-> +b™s_unu£d +; + +520 if( +¡ +-> +b™s_unu£d +) { + +521 + `RETURN +( +RC_FAIL +); + +526 + `ASN_DEBUG +("Took %ld bytesoƒncode %s: [%s]:%ld", + +527 () +cÚsumed_my£lf +, +td +-> +Çme +, + +528 ( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_STR +è? (*) +¡ +-> +buf + : "", + +529 () +¡ +-> +size +); + +532 + `RETURN +( +RC_OK +); + +533 + } +} + +538 +a¢_’c_rv®_t + + +539 + $OCTET_STRING_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +540  +g_mode +, +b”_Žv_g_t + +g +, + +541 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +542 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +543 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +544 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +545 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +546 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +547 +a¢_OS_Subv¬ŸÁ + +ty³_v¬ŸÁ + = +¥ecs +-> +subv¬ŸÁ +; + +548  +fix_Ï¡_by‹ + = 0; + +550 + `ASN_DEBUG +("%s %s‡s OCTET STRING", + +551 +cb +?"E¡im©šg":"Encodšg", +td +-> +Çme +); + +556 if( +ty³_v¬ŸÁ + !ð +ASN_OSUBV_ANY + || +g_mode + == 1) { + +557 +” +. +’coded + = + `d”_wr™e_gs +( +td +, + +558 ( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_BIT +è+ +¡ +-> +size +, + +559 +g_mode +, +ty³_v¬ŸÁ + =ð +ASN_OSUBV_ANY +, +g +, + +560 +cb +, +­p_key +); + +561 if( +” +. +’coded + == -1) { + +562 +” +. +çžed_ty³ + = +td +; + +563 +” +. +¡ruùu»_±r + = +¥Œ +; + +564  +” +; + +568 + `as£¹ +( +ty³_v¬ŸÁ + !ð +ASN_OSUBV_ANY + || +g_mode + != -1); + +569 +” +. +’coded + = 0; + +572 if(! +cb +) { + +573 +” +. +’coded + +ð( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_BIT +è+ +¡ +-> +size +; + +574 + `ASN__ENCODED_OK +( +” +); + +580 if( +ty³_v¬ŸÁ + =ð +ASN_OSUBV_BIT +) { + +581 +ušt8_t + +b + = +¡ +-> +b™s_unu£d + & 0x07; + +582 if( +b + && +¡ +-> +size +è +fix_Ï¡_by‹ + = 1; + +583 + `ASN__CALLBACK +(& +b +, 1); + +587 + `ASN__CALLBACK +( +¡ +-> +buf +, st-> +size + - +fix_Ï¡_by‹ +); + +590 if( +fix_Ï¡_by‹ +) { + +591 +ušt8_t + +b + = +¡ +-> +buf +[¡-> +size +-1] & (0xfà<< st-> +b™s_unu£d +); + +592 + `ASN__CALLBACK +(& +b +, 1); + +595 + `ASN__ENCODED_OK +( +” +); + +596 +cb_çžed +: + +597 +ASN__ENCODE_FAILED +; + +598 + } +} + +600 +a¢_’c_rv®_t + + +601 + $OCTET_STRING_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +602  +žev– +, +x”_’cod”_æags_e + +æags +, + +603 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +604 cÚ¡ * cÚ¡ +h2c + = "0123456789ABCDEF"; + +605 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +606 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +607  +sü©ch +[16 * 3 + 4]; + +608 * +p + = +sü©ch +; + +609 +ušt8_t + * +buf +; + +610 +ušt8_t + * +’d +; + +611 +size_t + +i +; + +613 if(! +¡ + || (!¡-> +buf + && st-> +size +)) + +614 +ASN__ENCODE_FAILED +; + +616 +” +. +’coded + = 0; + +621 +buf + = +¡ +->buf; + +622 +’d + = +buf + + +¡ +-> +size +; + +623 if( +æags + & +XER_F_CANONICAL +) { + +624 * +sûnd + = +sü©ch + + ((scratch) - 2); + +625 ; +buf + < +’d +; buf++) { + +626 if( +p + >ð +sûnd +) { + +627 + `ASN__CALLBACK +( +sü©ch +, +p + - scratch); + +628 +p + = +sü©ch +; + +630 * +p +++ = +h2c +[(* +buf + >> 4) & 0x0F]; + +631 * +p +++ = +h2c +[* +buf + & 0x0F]; + +634 + `ASN__CALLBACK +( +sü©ch +, +p +-scratch); + +636  +i + = 0; +buf + < +’d +; buf++, i++) { + +637 if(!( +i + % 16è&& (˜|| +¡ +-> +size + > 16)) { + +638 + `ASN__CALLBACK +( +sü©ch +, +p +-scratch); + +639 +p + = +sü©ch +; + +640 + `ASN__TEXT_INDENT +(1, +žev– +); + +642 * +p +++ = +h2c +[(* +buf + >> 4) & 0x0F]; + +643 * +p +++ = +h2c +[* +buf + & 0x0F]; + +644 * +p +++ = 0x20; + +646 if( +p + - +sü©ch +) { + +647 +p +--; + +648 + `ASN__CALLBACK +( +sü©ch +, +p +-scratch); + +649 if( +¡ +-> +size + > 16) + +650 + `ASN__TEXT_INDENT +(1, +žev– +-1); + +654 + `ASN__ENCODED_OK +( +” +); + +655 +cb_çžed +: + +656 +ASN__ENCODE_FAILED +; + +657 + } +} + +659 cÚ¡  + sOCTET_STRING__x”_esÿ³_bË_s + { + +660 cÚ¡ * + m¡ršg +; + +661  + msize +; + +662 } + gOCTET_STRING__x”_esÿ³_bË +[] = { + +663  + #OSXET +( +s +è{ s, (sè- 1 } + + ) + +664 +OSXET +("\074\156\165\154\057\076"), + +665 +OSXET +("\074\163\157\150\057\076"), + +666 +OSXET +("\074\163\164\170\057\076"), + +667 +OSXET +("\074\145\164\170\057\076"), + +668 +OSXET +("\074\145\157\164\057\076"), + +669 +OSXET +("\074\145\156\161\057\076"), + +670 +OSXET +("\074\141\143\153\057\076"), + +671 +OSXET +("\074\142\145\154\057\076"), + +672 +OSXET +("\074\142\163\057\076"), + +673 +OSXET +("\011"), + +674 +OSXET +("\012"), + +675 +OSXET +("\074\166\164\057\076"), + +676 +OSXET +("\074\146\146\057\076"), + +677 +OSXET +("\015"), + +678 +OSXET +("\074\163\157\057\076"), + +679 +OSXET +("\074\163\151\057\076"), + +680 +OSXET +("\074\144\154\145\057\076"), + +681 +OSXET +("\074\144\143\061\057\076"), + +682 +OSXET +("\074\144\143\062\057\076"), + +683 +OSXET +("\074\144\143\063\057\076"), + +684 +OSXET +("\074\144\143\064\057\076"), + +685 +OSXET +("\074\156\141\153\057\076"), + +686 +OSXET +("\074\163\171\156\057\076"), + +687 +OSXET +("\074\145\164\142\057\076"), + +688 +OSXET +("\074\143\141\156\057\076"), + +689 +OSXET +("\074\145\155\057\076"), + +690 +OSXET +("\074\163\165\142\057\076"), + +691 +OSXET +("\074\145\163\143\057\076"), + +692 +OSXET +("\074\151\163\064\057\076"), + +693 +OSXET +("\074\151\163\063\057\076"), + +694 +OSXET +("\074\151\163\062\057\076"), + +695 +OSXET +("\074\151\163\061\057\076"), + +702 +OSXET +("\046\141\155\160\073"), + +707 +OSXET +("\046\154\164\073"), + +709 +OSXET +("\046\147\164\073"), + +713 + $OS__check_esÿ³d_cڌÞ_ch¬ +(cÚ¡ * +buf +,  +size +) { + +714 +size_t + +i +; + +721  +i + = 0; i < 32 ; i++) { + +722 cÚ¡  +OCTET_STRING__x”_esÿ³_bË_s + * +– +; + +723 +– + = & +OCTET_STRING__x”_esÿ³_bË +[ +i +]; + +724 if( +– +-> +size + =ðsiz&& + `memcmp +( +buf +,ƒl-> +¡ršg +, size) == 0) + +725  +i +; + +728 + } +} + +731 + $OCTET_STRING__hªdË_cڌÞ_ch¬s +(* +¡ruù_±r +, cÚ¡ * +chunk_buf +, +size_t + +chunk_size +) { + +737  +cڌÞ_ch¬ + = + `OS__check_esÿ³d_cڌÞ_ch¬ +( +chunk_buf +, +chunk_size +); + +738 if( +cڌÞ_ch¬ + >= 0) { + +739 +OCTET_STRING_t + * +¡ + = (OCTET_STRING_ˆ*) +¡ruù_±r +; + +740 * +p + = + `REALLOC +( +¡ +-> +buf +, st-> +size + + 2); + +741 if( +p +) { + +742 +¡ +-> +buf + = ( +ušt8_t + *) +p +; + +743 +¡ +-> +buf +[¡-> +size +++] = +cڌÞ_ch¬ +; + +744 +¡ +-> +buf +[¡-> +size +] = '\0'; + +750 + } +} + +752 +a¢_’c_rv®_t + + +753 + $OCTET_STRING_’code_x”_utf8 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +754  +žev– +, +x”_’cod”_æags_e + +æags +, + +755 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +756 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +757 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +758 +ušt8_t + * +buf +, * +’d +; + +759 +ušt8_t + * +ss +; + +760 +ssize_t + +’coded_Ën + = 0; + +762 () +žev– +; + +763 () +æags +; + +765 if(! +¡ + || (!¡-> +buf + && st-> +size +)) + +766 +ASN__ENCODE_FAILED +; + +768 +buf + = +¡ +->buf; + +769 +’d + = +buf + + +¡ +-> +size +; + +770  +ss + = +buf +; buà< +’d +; buf++) { + +771  +ch + = * +buf +; + +772  +s_Ën +; + +777 if( +ch + < ( +OCTET_STRING__x”_esÿ³_bË +) + +778 /( +OCTET_STRING__x”_esÿ³_bË +[0]) + +779 && ( +s_Ën + = +OCTET_STRING__x”_esÿ³_bË +[ +ch +]. +size +)) { + +780 if((( +buf + - +ss +è&& + `cb +(ss, buà- ss, +­p_key +) < 0) + +781 || + `cb +( +OCTET_STRING__x”_esÿ³_bË +[ +ch +]. +¡ršg +, +s_Ën +, + +782 +­p_key +) < 0) + +783 +ASN__ENCODE_FAILED +; + +784 +’coded_Ën + +ð( +buf + - +ss +è+ +s_Ën +; + +785 +ss + = +buf + + 1; + +789 +’coded_Ën + +ð( +buf + - +ss +); + +790 if(( +buf + - +ss +è&& + `cb +(ss, buà- ss, +­p_key +) < 0) + +791 +ASN__ENCODE_FAILED +; + +793 +” +. +’coded + = +’coded_Ën +; + +794 + `ASN__ENCODED_OK +( +” +); + +795 + } +} + +800  +ssize_t + + $OCTET_STRING__cÚv”t_hexadecim® +(* +¥Œ +, cÚ¡ * +chunk_buf +, +size_t + +chunk_size +,  +have_mÜe +) { + +801 +OCTET_STRING_t + * +¡ + = (OCTET_STRING_ˆ*) +¥Œ +; + +802 cÚ¡ * +chunk_¡Ý + = (cÚ¡ *) +chunk_buf +; + +803 cÚ¡ * +p + = +chunk_¡Ý +; + +804 cÚ¡ * +³nd + = +p + + +chunk_size +; + +805  +þv + = 0; + +806  +h®f + = 0; + +807 +ušt8_t + * +buf +; + +810 +size_t + +Ãw_size + = +¡ +-> +size + + ( +chunk_size + + 1) / 2; + +811 * +Ō + = + `REALLOC +( +¡ +-> +buf +, +Ãw_size + + 1); + +812 if(! +Ō +)  -1; + +813 +¡ +-> +buf + = ( +ušt8_t + *) +Ō +; + +814 +buf + = +¡ +->buà+ st-> +size +; + +821 ; +p + < +³nd +;…++) { + +822  +ch + = *(cÚ¡ *) +p +; + +823  +ch +) { + +830 +þv + = (þv << 4è+ ( +ch + - 0x30); + +834 +þv + = (þv << 4è+ ( +ch + - 0x41 + 10); + +838 +þv + = (þv << 4è+ ( +ch + - 0x61 + 10); + +841 * +buf + = 0; + +844 if( +h®f +++) { + +845 +h®f + = 0; + +846 * +buf +++ = +þv +; + +847 +chunk_¡Ý + = +p + + 1; + +854 if( +h®f +) { + +855 if( +have_mÜe +) { + +860 * +buf +++ = +þv + << 4; + +861 +chunk_¡Ý + = +p +; + +864 +chunk_¡Ý + = +p +; + +867 +¡ +-> +size + = +buf + - st->buf; + +868 + `as£¹ +( +¡ +-> +size + <ð +Ãw_size +); + +869 +¡ +-> +buf +[¡-> +size +] = 0; + +871  ( +chunk_¡Ý + - (cÚ¡ *) +chunk_buf +); + +872 + } +} + +877  +ssize_t + + $OCTET_STRING__cÚv”t_bš¬y +(* +¥Œ +, cÚ¡ * +chunk_buf +, +size_t + +chunk_size +,  +have_mÜe +) { + +878 +BIT_STRING_t + * +¡ + = (BIT_STRING_ˆ*) +¥Œ +; + +879 cÚ¡ * +p + = (cÚ¡ *) +chunk_buf +; + +880 cÚ¡ * +³nd + = +p + + +chunk_size +; + +881  +b™s_unu£d + = +¡ +->bits_unused & 0x7; + +882 +ušt8_t + * +buf +; + +885 +size_t + +Ãw_size + = +¡ +-> +size + + ( +chunk_size + + 7) / 8; + +886 * +Ō + = + `REALLOC +( +¡ +-> +buf +, +Ãw_size + + 1); + +887 if(! +Ō +)  -1; + +888 +¡ +-> +buf + = ( +ušt8_t + *) +Ō +; + +889 +buf + = +¡ +->buà+ st-> +size +; + +891 () +have_mÜe +; + +893 if( +b™s_unu£d + == 0) + +894 +b™s_unu£d + = 8; + +895 if( +¡ +-> +size +) + +896 +buf +--; + +901 ; +p + < +³nd +;…++) { + +902  +ch + = *(cÚ¡ *) +p +; + +903  +ch +) { + +910 if( +b™s_unu£d +-- <= 0) { + +911 *++ +buf + = 0; + +912 +b™s_unu£d + = 7; + +914 * +buf + |ð( +ch +&1è<< +b™s_unu£d +; + +917 +¡ +-> +b™s_unu£d + = bits_unused; + +922 if( +b™s_unu£d + == 8) { + +923 +¡ +-> +size + = +buf + - st->buf; + +924 +¡ +-> +b™s_unu£d + = 0; + +926 +¡ +-> +size + = +buf + - st->buf + 1; + +927 +¡ +-> +b™s_unu£d + = bits_unused; + +930 + `as£¹ +( +¡ +-> +size + <ð +Ãw_size +); + +931 +¡ +-> +buf +[¡-> +size +] = 0; + +933  +chunk_size +; + +934 + } +} + +940 + $OS__¡¹ÛÁ +( +ba£ +, cÚ¡ * +buf +, cÚ¡ * +’d +, +št32_t + * +»t_v®ue +) { + +941 cÚ¡ +št32_t + +Ï¡_unicode_cod•ošt + = 0x10ffff; + +942 +št32_t + +v® + = 0; + +943 cÚ¡ * +p +; + +945  +p + = +buf +;… < +’d +;…++) { + +946  +ch + = * +p +; + +948  +ch +) { + +951 +v® + = v® * +ba£ + + ( +ch + - 0x30); + +955 +v® + = v® * +ba£ + + ( +ch + - 0x41 + 10); + +959 +v® + = v® * +ba£ + + ( +ch + - 0x61 + 10); + +962 * +»t_v®ue + = +v® +; + +963  ( +p + - +buf +) + 1; + +969 if( +v® + > +Ï¡_unicode_cod•ošt +) { + +974 * +»t_v®ue + = -1; + +975  ( +p + - +buf +); + +976 + } +} + +981  +ssize_t + + +982 + $OCTET_STRING__cÚv”t_’Œefs +(* +¥Œ +, cÚ¡ * +chunk_buf +, + +983 +size_t + +chunk_size +,  +have_mÜe +) { + +984 +OCTET_STRING_t + * +¡ + = (OCTET_STRING_ˆ*) +¥Œ +; + +985 cÚ¡ * +p + = (cÚ¡ *) +chunk_buf +; + +986 cÚ¡ * +³nd + = +p + + +chunk_size +; + +987 +ušt8_t + * +buf +; + +990 +size_t + +Ãw_size + = +¡ +-> +size + + +chunk_size +; + +991 * +Ō + = + `REALLOC +( +¡ +-> +buf +, +Ãw_size + + 1); + +992 if(! +Ō +)  -1; + +993 +¡ +-> +buf + = ( +ušt8_t + *) +Ō +; + +994 +buf + = +¡ +->buà+ st-> +size +; + +999 ; +p + < +³nd +;…++) { + +1000  +ch + = *(cÚ¡ *) +p +; + +1001  +Ën +; + +1003 if( +ch + != 0x26 ) { + +1004 * +buf +++ = +ch +; + +1011 +Ën + = +chunk_size + - ( +p + - (cÚ¡ *) +chunk_buf +); + +1012 if( +Ën + =ð1 )  +wªt_mÜe +; + +1013 if( +p +[1] == 0x23 ) { + +1014 cÚ¡ * +pv® +; + +1015 +št32_t + +v® + = 0; + +1016  +ba£ +; + +1018 if( +Ën + =ð2 )  +wªt_mÜe +; + +1019 if( +p +[2] == 0x78 ) + +1020 +pv® + = +p + + 3, +ba£ + = 16; + +1022 +pv® + = +p + + 2, +ba£ + = 10; + +1023 +Ën + = + `OS__¡¹ÛÁ +( +ba£ +, +pv® +, +p + +†’, & +v® +); + +1024 if( +Ën + == -1) { + +1026 * +buf +++ = +ch +; + +1029 if(! +Ën + || +pv® +[Ën-1] !ð0x3bè +wªt_mÜe +; + +1030 + `as£¹ +( +v® + > 0); + +1031 +p + +ð( +pv® + -…è+ +Ën + - 1; + +1033 if( +v® + < 0x80) { + +1034 * +buf +++ = () +v® +; + +1035 } if( +v® + < 0x800) { + +1036 * +buf +++ = 0xc0 | (( +v® + >> 6)); + +1037 * +buf +++ = 0x80 | (( +v® + & 0x3f)); + +1038 } if( +v® + < 0x10000) { + +1039 * +buf +++ = 0xe0 | (( +v® + >> 12)); + +1040 * +buf +++ = 0x80 | (( +v® + >> 6) & 0x3f); + +1041 * +buf +++ = 0x80 | (( +v® + & 0x3f)); + +1042 } if( +v® + < 0x200000) { + +1043 * +buf +++ = 0xf0 | (( +v® + >> 18)); + +1044 * +buf +++ = 0x80 | (( +v® + >> 12) & 0x3f); + +1045 * +buf +++ = 0x80 | (( +v® + >> 6) & 0x3f); + +1046 * +buf +++ = 0x80 | (( +v® + & 0x3f)); + +1047 } if( +v® + < 0x4000000) { + +1048 * +buf +++ = 0xf8 | (( +v® + >> 24)); + +1049 * +buf +++ = 0x80 | (( +v® + >> 18) & 0x3f); + +1050 * +buf +++ = 0x80 | (( +v® + >> 12) & 0x3f); + +1051 * +buf +++ = 0x80 | (( +v® + >> 6) & 0x3f); + +1052 * +buf +++ = 0x80 | (( +v® + & 0x3f)); + +1054 * +buf +++ = 0xfø| (( +v® + >> 30) & 0x1); + +1055 * +buf +++ = 0x80 | (( +v® + >> 24) & 0x3f); + +1056 * +buf +++ = 0x80 | (( +v® + >> 18) & 0x3f); + +1057 * +buf +++ = 0x80 | (( +v® + >> 12) & 0x3f); + +1058 * +buf +++ = 0x80 | (( +v® + >> 6) & 0x3f); + +1059 * +buf +++ = 0x80 | (( +v® + & 0x3f)); + +1065 * +sc + = (*) + `memchr +( +p +, 0x3b, +Ën + > 5 ? 5 :†en); + +1066 if(! +sc +è +wªt_mÜe +; + +1067 if(( +sc + - +p +) == 4 + +1068 && +p +[1] == 0x61 + +1069 && +p +[2] == 0x6d + +1070 && +p +[3] == 0x70 ) { + +1071 * +buf +++ = 0x26; + +1072 +p + = +sc +; + +1075 if(( +sc + - +p +) == 3) { + +1076 if( +p +[1] == 0x6c) { + +1077 * +buf + = 0x3c; + +1078 } if( +p +[1] == 0x67) { + +1079 * +buf + = 0x3e; + +1082 * +buf +++ = +ch +; + +1085 if( +p +[2] != 0x74) { + +1087 * +buf +++ = +ch +; + +1090 +buf +++; + +1091 +p + = +sc +; + +1095 * +buf +++ = +ch +; + +1099 +wªt_mÜe +: + +1100 if( +have_mÜe +) { + +1105 * +buf +++ = +ch +; + +1108 +chunk_size + = ( +p + - (cÚ¡ *) +chunk_buf +); + +1113 +¡ +-> +size + = +buf + - st->buf; + +1114 + `as£¹ +( +¡ +-> +size + <ð +Ãw_size +); + +1115 +¡ +-> +buf +[¡-> +size +] = 0; + +1117  +chunk_size +; + +1118 + } +} + +1123  +a¢_dec_rv®_t + + +1124 + $OCTET_STRING__decode_x” +( + +1125 cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1126 ** +¥Œ +, cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +, + +1127 (* +Ýt_uÃx³ùed_g_decod” +)(* +¡ruù_±r +, cÚ¡ * +chunk_buf +, + +1128 +size_t + +chunk_size +), + +1129 + $ssize_t + (* +body_»ûiv” +)(* +¡ruù_±r +, cÚ¡ * +chunk_buf +, + +1130 +size_t + +chunk_size +,  +have_mÜe +)) { + +1131 +OCTET_STRING_t + * +¡ + = (OCTET_STRING_ˆ*)* +¥Œ +; + +1132 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +1133 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +1134 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +1135 cÚ¡ * +xml_g + = +Ýt_mÇme + ? o±_mÇm: +td +->xml_tag; + +1136 +a¢_¡ruù_ùx_t + * +ùx +; + +1137 +a¢_dec_rv®_t + +rv® +; + +1138  +¡_®loÿ‹d +; + +1143 if(! +¡ +) { + +1144 +¡ + = ( +OCTET_STRING_t + *) + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +1145 * +¥Œ + = (*) +¡ +; + +1146 if(! +¡ +è +¡a_çžed +; + +1147 +¡_®loÿ‹d + = 1; + +1149 +¡_®loÿ‹d + = 0; + +1151 if(! +¡ +-> +buf +) { + +1153 +¡ +-> +buf + = ( +ušt8_t + *) + `CALLOC +(1, 1); + +1154 if(! +¡ +-> +buf +) { + +1155 if( +¡_®loÿ‹d +) { + +1156 * +¥Œ + = 0; + +1157  +¡b_çžed +; + +1159  +¡a_çžed +; + +1165 +ùx + = ( +a¢_¡ruù_ùx_t + *)(((*)* +¥Œ +è+ +¥ecs +-> +ùx_off£t +); + +1167  + `x”_decode_g’”® +( +Ýt_codec_ùx +, +ùx +, * +¥Œ +, +xml_g +, + +1168 +buf_±r +, +size +, +Ýt_uÃx³ùed_g_decod” +, +body_»ûiv” +); + +1170 +¡b_çžed +: + +1171 + `FREEMEM +( +¡ +); + +1172 +¡a_çžed +: + +1173 +rv® +. +code + = +RC_FAIL +; + +1174 +rv® +. +cÚsumed + = 0; + +1175  +rv® +; + +1176 + } +} + +1181 +a¢_dec_rv®_t + + +1182 + $OCTET_STRING_decode_x”_hex +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1183 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +1184 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, + +1185 +size_t + +size +) { + +1186  + `OCTET_STRING__decode_x” +( +Ýt_codec_ùx +, +td +, +¥Œ +, +Ýt_mÇme +, + +1187 +buf_±r +, +size +, 0, +OCTET_STRING__cÚv”t_hexadecim® +); + +1188 + } +} + +1193 +a¢_dec_rv®_t + + +1194 + $OCTET_STRING_decode_x”_bš¬y +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1195 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +1196 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, + +1197 +size_t + +size +) { + +1198  + `OCTET_STRING__decode_x” +( +Ýt_codec_ùx +, +td +, +¥Œ +, +Ýt_mÇme +, + +1199 +buf_±r +, +size +, 0, +OCTET_STRING__cÚv”t_bš¬y +); + +1200 + } +} + +1205 +a¢_dec_rv®_t + + +1206 + $OCTET_STRING_decode_x”_utf8 +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1207 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +1208 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, + +1209 +size_t + +size +) { + +1210  + `OCTET_STRING__decode_x” +( +Ýt_codec_ùx +, +td +, +¥Œ +, +Ýt_mÇme +, + +1211 +buf_±r +, +size +, + +1212 +OCTET_STRING__hªdË_cڌÞ_ch¬s +, + +1213 +OCTET_STRING__cÚv”t_’Œefs +); + +1214 + } +} + +1216 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +1219 + $OCTET_STRING_³r_g‘_ch¬aù”s +( +a¢_³r_d©a_t + * +po +, +ušt8_t + * +buf +, + +1220 +size_t + +un™s +,  +bpc +,  +un™_b™s +, + +1221  +lb +,  +ub +, cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc +) { + +1222 +ušt8_t + * +’d + = +buf + + +un™s + * +bpc +; + +1224 + `ASN_DEBUG +("Expanding %d characters into (%ld..%ld):%d", + +1225 () +un™s +, +lb +, +ub +, +un™_b™s +); + +1228 if(() +ub + <ð(()2 << ( +un™_b™s + - 1))) { + +1230 +lb + = 0; + +1231 } if( +pc + &&…c-> +code2v®ue +) { + +1232 if( +un™_b™s + > 16) + +1236 ; +buf + < +’d +; buà+ð +bpc +) { + +1237  +v®ue +; + +1238  +code + = + `³r_g‘_ãw_b™s +( +po +, +un™_b™s +); + +1239 if( +code + < 0)  -1; + +1240 +v®ue + = +pc +-> + `code2v®ue +( +code +); + +1241 if( +v®ue + < 0) { + +1242 + `ASN_DEBUG +("Code %d (0x%02x) is" + +1244 +code +, code, +lb +, +ub +); + +1247  +bpc +) { + +1248 1: * +buf + = +v®ue +; ; + +1249 2: +buf +[0] = +v®ue + >> 8; buf[1] = value; ; + +1250 4: +buf +[0] = +v®ue + >> 24; buf[1] = value >> 16; + +1251 +buf +[2] = +v®ue + >> 8; buf[3] = value; ; + +1258 if( +lb + =ð0 && ( +un™_b™s + =ð8 * +bpc +)) { + +1259  + `³r_g‘_mªy_b™s +( +po +, +buf +, 0, +un™_b™s + * +un™s +); + +1262 ; +buf + < +’d +; buà+ð +bpc +) { + +1263 +št32_t + +code + = + `³r_g‘_ãw_b™s +( +po +, +un™_b™s +); + +1264 +št32_t + +ch + = +code + + +lb +; + +1265 if( +code + < 0)  -1; + +1266 if( +ch + > +ub +) { + +1267 + `ASN_DEBUG +("Code %d is out of„ange (%ld..%ld)", + +1268 +ch +, +lb +, +ub +); + +1271  +bpc +) { + +1272 1: * +buf + = +ch +; ; + +1273 2: +buf +[0] = +ch + >> 8; buf[1] = ch; ; + +1274 4: +buf +[0] = +ch + >> 24; buf[1] = ch >> 16; + +1275 +buf +[2] = +ch + >> 8; buf[3] = ch; ; + +1280 + } +} + +1283 + $OCTET_STRING_³r_put_ch¬aù”s +( +a¢_³r_ou_t + * +po +, cÚ¡ +ušt8_t + * +buf +, + +1284 +size_t + +un™s +,  +bpc +,  +un™_b™s +, + +1285  +lb +,  +ub +, cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc +) { + +1286 cÚ¡ +ušt8_t + * +’d + = +buf + + +un™s + * +bpc +; + +1288 + `ASN_DEBUG +("Squeezing %d characters into (%ld..%ld):%d (%d bpc)", + +1289 () +un™s +, +lb +, +ub +, +un™_b™s +, +bpc +); + +1292 if(() +ub + <ð(()2 << ( +un™_b™s + - 1))) { + +1294 +lb + = 0; + +1295 } if( +pc + &&…c-> +v®ue2code +) { + +1296 ; +buf + < +’d +; buà+ð +bpc +) { + +1297  +code +; + +1298 +ušt32_t + +v®ue +; + +1299  +bpc +) { + +1300 1: +v®ue + = *(cÚ¡ +ušt8_t + *) +buf +; ; + +1301 2: +v®ue + = ( +buf +[0] << 8) | buf[1]; ; + +1302 4: +v®ue + = ( +buf +[0] << 24) | (buf[1] << 16) + +1303 | ( +buf +[2] << 8) | buf[3]; ; + +1306 +code + = +pc +-> + `v®ue2code +( +v®ue +); + +1307 if( +code + < 0) { + +1308 + `ASN_DEBUG +("Character %d (0x%02x) is" + +1310 * +buf +, *buf, +lb +, +ub +); + +1313 if( + `³r_put_ãw_b™s +( +po +, +code +, +un™_b™s +)) + +1319 if( +lb + =ð0 && ( +un™_b™s + =ð8 * +bpc +)) { + +1320  + `³r_put_mªy_b™s +( +po +, +buf +, +un™_b™s + * +un™s +); + +1323  +ub + -ð +lb +; +buf + < +’d +; buà+ð +bpc +) { + +1324  +ch +; + +1325 +ušt32_t + +v®ue +; + +1326  +bpc +) { + +1328 +v®ue + = *(cÚ¡ +ušt8_t + *) +buf +; + +1331 +v®ue + = ( +buf +[0] << 8) | buf[1]; + +1334 +v®ue + = ( +buf +[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; + +1339 +ch + = +v®ue + - +lb +; + +1340 if( +ch + < 0 || ch > +ub +) { + +1341 + `ASN_DEBUG +("Ch¬aù” %d (0x%02xèi ouˆoà¿ng(%ld..%ld)", * +buf +, + +1342 +v®ue +, +lb +, +ub + +†b); + +1345 if( + `³r_put_ãw_b™s +( +po +, +ch +, +un™_b™s +))  -1; + +1349 + } +} + +1351  +a¢_³r_cÚ¡¿šts_t + + ga¢_DEF_OCTET_STRING_cÚ¡¿šts + = { + +1352 { +APC_CONSTRAINED +, 8, 8, 0, 255 }, + +1353 { +APC_SEMI_CONSTRAINED +, -1, -1, 0, 0 }, + +1357 +a¢_dec_rv®_t + + +1358 + $OCTET_STRING_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1359 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1360 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +1361 +a¢_³r_d©a_t + * +pd +) { + +1362 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +1363 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +1364 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +1365 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc + = + +1366 +cÚ¡¿šts + ? cÚ¡¿št : +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +1367 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +cv® +; + +1368 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +csiz +; + +1369 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0 }; + +1370 +OCTET_STRING_t + * +¡ + = (OCTET_STRING_ˆ*)* +¥Œ +; + +1371 +ssize_t + +cÚsumed_my£lf + = 0; + +1372  +»³© +; + +1374 +OS__BPC_CHAR + = 1, + +1375 +OS__BPC_U16 + = 2, + +1376 +OS__BPC_U32 + = 4 + +1377 } +bpc +; + +1378  +un™_b™s +; + +1379  +ÿnÚiÿl_un™_b™s +; + +1381 () +Ýt_codec_ùx +; + +1383 if( +pc +) { + +1384 +cv® + = & +pc +-> +v®ue +; + +1385 +csiz + = & +pc +-> +size +; + +1387 +cv® + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +v®ue +; + +1388 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1391  +¥ecs +-> +subv¬ŸÁ +) { + +1393  +ASN_OSUBV_ANY +: + +1394  +ASN_OSUBV_BIT +: + +1395 + `ASN_DEBUG +("UÄecognized subv¬ŸÁ %d", +¥ecs +-> +subv¬ŸÁ +); + +1396 + `RETURN +( +RC_FAIL +); + +1398  +ASN_OSUBV_STR +: + +1399 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 8; + +1400 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1401 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1402 +bpc + = +OS__BPC_CHAR +; + +1404  +ASN_OSUBV_U16 +: + +1405 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 16; + +1406 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1407 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1408 +bpc + = +OS__BPC_U16 +; + +1410  +ASN_OSUBV_U32 +: + +1411 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 32; + +1412 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1413 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1414 +bpc + = +OS__BPC_U32 +; + +1421 if(! +¡ +) { + +1422 +¡ + = ( +OCTET_STRING_t + *)(* +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +)); + +1423 if(! +¡ +è + `RETURN +( +RC_FAIL +); + +1426 + `ASN_DEBUG +("PER Decoding %s size %ld .. %ld bits %d", + +1427 +csiz +-> +æags + & +APC_EXTENSIBLE + ? "extensible" : "non-extensible", + +1428 +csiz +-> +low”_bound +, csiz-> +uµ”_bound +, csiz-> +efãùive_b™s +); + +1430 if( +csiz +-> +æags + & +APC_EXTENSIBLE +) { + +1431  +šext + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +1432 if( +šext + < 0è + `RETURN +( +RC_WMORE +); + +1433 if( +šext +) { + +1434 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1435 +un™_b™s + = +ÿnÚiÿl_un™_b™s +; + +1439 if( +csiz +-> +efãùive_b™s + >= 0) { + +1440 + `FREEMEM +( +¡ +-> +buf +); + +1441 if( +bpc +) { + +1442 +¡ +-> +size + = +csiz +-> +uµ”_bound + * +bpc +; + +1444 +¡ +-> +size + = ( +csiz +-> +uµ”_bound + + 7) >> 3; + +1446 +¡ +-> +buf + = ( +ušt8_t + *) + `MALLOC +(¡-> +size + + 1); + +1447 if(! +¡ +-> +buf +è{ st-> +size + = 0; + `RETURN +( +RC_FAIL +); } + +1453 if( +csiz +-> +efãùive_b™s + == 0) { + +1454  +»t +; + +1455 if( +bpc +) { + +1456 + `ASN_DEBUG +("Encoding OCTET STRING size %ld", + +1457 +csiz +-> +uµ”_bound +); + +1458 +»t + = + `OCTET_STRING_³r_g‘_ch¬aù”s +( +pd +, +¡ +-> +buf +, + +1459 +csiz +-> +uµ”_bound +, +bpc +, +un™_b™s +, + +1460 +cv® +-> +low”_bound +, cv®-> +uµ”_bound +, +pc +); + +1461 if( +»t + > 0è + `RETURN +( +RC_FAIL +); + +1463 + `ASN_DEBUG +("Encoding BIT STRING size %ld", + +1464 +csiz +-> +uµ”_bound +); + +1465 +»t + = + `³r_g‘_mªy_b™s +( +pd +, +¡ +-> +buf +, 0, + +1466 +un™_b™s + * +csiz +-> +uµ”_bound +); + +1468 if( +»t + < 0è + `RETURN +( +RC_WMORE +); + +1469 +cÚsumed_my£lf + +ð +un™_b™s + * +csiz +-> +uµ”_bound +; + +1470 +¡ +-> +buf +[¡-> +size +] = 0; + +1471 + `RETURN +( +RC_OK +); + +1474 +¡ +-> +size + = 0; + +1476 +ssize_t + +¿w_Ën +; + +1477 +ssize_t + +Ën_by‹s +; + +1478 * +p +; + +1479  +»t +; + +1482 +¿w_Ën + = + `u³r_g‘_Ëngth +( +pd +, +csiz +-> +efãùive_b™s +, csiz-> +low”_bound +, + +1483 & +»³© +); + +1484 if( +¿w_Ën + < 0è + `RETURN +( +RC_WMORE +); + +1485 if( +¿w_Ën + =ð0 && +¡ +-> +buf +) ; + +1487 + `ASN_DEBUG +("Got PER†engthƒb %ld,†en %ld, %s (%s)", + +1488 () +csiz +-> +efãùive_b™s +, () +¿w_Ën +, + +1489 +»³© + ? "»³©" : "Úû", +td +-> +Çme +); + +1490 +Ën_by‹s + = +¿w_Ën + * +bpc +; + +1491 +p + = + `REALLOC +( +¡ +-> +buf +, st-> +size + + +Ën_by‹s + + 1); + +1492 if(! +p +è + `RETURN +( +RC_FAIL +); + +1493 +¡ +-> +buf + = ( +ušt8_t + *) +p +; + +1495 +»t + = + `OCTET_STRING_³r_g‘_ch¬aù”s +( +pd +, & +¡ +-> +buf +[¡-> +size +], +¿w_Ën +, + +1496 +bpc +, +un™_b™s +, +cv® +-> +low”_bound +, + +1497 +cv® +-> +uµ”_bound +, +pc +); + +1498 if( +»t + > 0è + `RETURN +( +RC_FAIL +); + +1499 if( +»t + < 0è + `RETURN +( +RC_WMORE +); + +1500 +¡ +-> +size + +ð +Ën_by‹s +; + +1501 }  +»³© +); + +1502 +¡ +-> +buf +[¡-> +size +] = 0; + +1504  +rv® +; + +1505 + } +} + +1507 +a¢_’c_rv®_t + + +1508 + $OCTET_STRING_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1509 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +1510 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +1511 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +1512 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +1513 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +1514 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc + = +cÚ¡¿šts + ? constraints + +1515 : +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +1516 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +cv® +; + +1517 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +csiz +; + +1518 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +1519 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +1520  +šext + = 0; + +1521  +un™_b™s +; + +1522  +ÿnÚiÿl_un™_b™s +; + +1523 +size_t + +size_š_un™s +; + +1524 cÚ¡ +ušt8_t + * +buf +; + +1525  +»t +; + +1527 +OS__BPC_CHAR + = 1, + +1528 +OS__BPC_U16 + = 2, + +1529 +OS__BPC_U32 + = 4 + +1530 } +bpc +; + +1531  +ù_ex‹nsibË +; + +1533 if(! +¡ + || (!¡-> +buf + && st-> +size +)) + +1534 +ASN__ENCODE_FAILED +; + +1536 if( +pc +) { + +1537 +cv® + = & +pc +-> +v®ue +; + +1538 +csiz + = & +pc +-> +size +; + +1540 +cv® + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +v®ue +; + +1541 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1543 +ù_ex‹nsibË + = +csiz +-> +æags + & +APC_EXTENSIBLE +; + +1545  +¥ecs +-> +subv¬ŸÁ +) { + +1547  +ASN_OSUBV_ANY +: + +1548  +ASN_OSUBV_BIT +: + +1549 +ASN__ENCODE_FAILED +; + +1550  +ASN_OSUBV_STR +: + +1551 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 8; + +1552 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1553 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1554 +bpc + = +OS__BPC_CHAR +; + +1555 +size_š_un™s + = +¡ +-> +size +; + +1557  +ASN_OSUBV_U16 +: + +1558 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 16; + +1559 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1560 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1561 +bpc + = +OS__BPC_U16 +; + +1562 +size_š_un™s + = +¡ +-> +size + >> 1; + +1563 if( +¡ +-> +size + & 1) { + +1564 + `ASN_DEBUG +("% ¡ršg sizi nÙ modulØ2", +td +-> +Çme +); + +1565 +ASN__ENCODE_FAILED +; + +1568  +ASN_OSUBV_U32 +: + +1569 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 32; + +1570 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1571 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1572 +bpc + = +OS__BPC_U32 +; + +1573 +size_š_un™s + = +¡ +-> +size + >> 2; + +1574 if( +¡ +-> +size + & 3) { + +1575 + `ASN_DEBUG +("% ¡ršg sizi nÙ modulØ4", +td +-> +Çme +); + +1576 +ASN__ENCODE_FAILED +; + +1581 + `ASN_DEBUG +("Encodšg % štØ%" +ASN_PRI_SIZE + " units of %d bits" + +1583 +td +-> +Çme +, +size_š_un™s +, +un™_b™s +, + +1584 +csiz +-> +low”_bound +, csiz-> +uµ”_bound +, + +1585 +csiz +-> +efãùive_b™s +, +ù_ex‹nsibË + ? " EXT" : ""); + +1589 if( +csiz +-> +efãùive_b™s + >= 0) { + +1590 if(( +ssize_t +) +size_š_un™s + < +csiz +-> +low”_bound + + +1591 || ( +ssize_t +) +size_š_un™s + > +csiz +-> +uµ”_bound +) { + +1592 if( +ù_ex‹nsibË +) { + +1593 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1594 +un™_b™s + = +ÿnÚiÿl_un™_b™s +; + +1595 +šext + = 1; + +1597 +ASN__ENCODE_FAILED +; + +1601 +šext + = 0; + +1604 if( +ù_ex‹nsibË +) { + +1606 if( + `³r_put_ãw_b™s +( +po +, +šext +, 1)) + +1607 +ASN__ENCODE_FAILED +; + +1610 if( +csiz +-> +efãùive_b™s + >ð0 && ! +šext +) { + +1611 + `ASN_DEBUG +("Encodšg %" +ASN_PRI_SIZE + " by‹ (%ld),†’gth iÀ%d b™s", +¡ +-> +size +, + +1612 +size_š_un™s + - +csiz +-> +low”_bound +, csiz-> +efãùive_b™s +); + +1613 +»t + = + `³r_put_ãw_b™s +( +po +, +size_š_un™s + - +csiz +-> +low”_bound +, + +1614 +csiz +-> +efãùive_b™s +); + +1615 if( +»t +è +ASN__ENCODE_FAILED +; + +1616 +»t + = + `OCTET_STRING_³r_put_ch¬aù”s +( +po +, +¡ +-> +buf +, +size_š_un™s +, +bpc +, + +1617 +un™_b™s +, +cv® +-> +low”_bound +, + +1618 +cv® +-> +uµ”_bound +, +pc +); + +1619 if( +»t +è +ASN__ENCODE_FAILED +; + +1620 + `ASN__ENCODED_OK +( +” +); + +1623 + `ASN_DEBUG +("Encodšg %" +ASN_PRI_SIZE + " by‹s", +¡ +-> +size +); + +1625 +buf + = +¡ +->buf; + +1626 + `ASN_DEBUG +("Encodšg %" +ASN_PRI_SIZE + " iÀun™s", +size_š_un™s +); + +1628  +Ãed_eom + = 0; + +1629 +ssize_t + +may_§ve + = + `u³r_put_Ëngth +( +po +, +size_š_un™s +, & +Ãed_eom +); + +1630 if( +may_§ve + < 0è +ASN__ENCODE_FAILED +; + +1632 + `ASN_DEBUG +("Encodšg %" +ASN_PRI_SSIZE + " oà%" +ASN_PRI_SIZE + "%s", +may_§ve +, +size_š_un™s +, + +1633 +Ãed_eom + ? ",+EOM" : ""); + +1635 +»t + = + `OCTET_STRING_³r_put_ch¬aù”s +( +po +, +buf +, +may_§ve +, +bpc +, +un™_b™s +, + +1636 +cv® +-> +low”_bound +, + +1637 +cv® +-> +uµ”_bound +, +pc +); + +1638 if( +»t +è +ASN__ENCODE_FAILED +; + +1640 +buf + +ð +may_§ve + * +bpc +; + +1641 +size_š_un™s + -ð +may_§ve +; + +1642 + `as£¹ +(!( +may_§ve + & 0x07è|| ! +size_š_un™s +); + +1643 if( +Ãed_eom + && + `u³r_put_Ëngth +( +po +, 0, 0)) + +1644 +ASN__ENCODE_FAILED +; + +1645 }  +size_š_un™s +); + +1647 + `ASN__ENCODED_OK +( +” +); + +1648 + } +} + +1650 +a¢_dec_rv®_t + + +1651 + $OCTET_STRING_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1652 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1653 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +1654 ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +1656 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +1657 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +1658 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +1659 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc + = +cÚ¡¿šts + ? constraints + +1660 : +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +1661 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +cv® +; + +1662 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +csiz +; + +1663 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0 }; + +1664 +BIT_STRING_t + * +¡ + = (BIT_STRING_ˆ*)* +¥Œ +; + +1665 +ssize_t + +cÚsumed_my£lf + = 0; + +1666  +»³© +; + +1668 +OS__BPC_BIT + = 0, + +1669 +OS__BPC_CHAR + = 1, + +1670 +OS__BPC_U16 + = 2, + +1671 +OS__BPC_U32 + = 4 + +1672 } +bpc +; + +1673  +un™_b™s +; + +1674  +ÿnÚiÿl_un™_b™s +; + +1676 () +Ýt_codec_ùx +; + +1678 if( +pc +) { + +1679 +cv® + = & +pc +-> +v®ue +; + +1680 +csiz + = & +pc +-> +size +; + +1682 +cv® + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +v®ue +; + +1683 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1686  +¥ecs +-> +subv¬ŸÁ +) { + +1692  +ASN_OSUBV_BIT +: + +1693 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 1; + +1694 +bpc + = +OS__BPC_BIT +; + +1696  +ASN_OSUBV_ANY +: + +1697  +ASN_OSUBV_STR +: + +1698 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 8; + +1702 +bpc + = +OS__BPC_CHAR +; + +1704  +ASN_OSUBV_U16 +: + +1705 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 16; + +1706 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1707 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1708 +bpc + = +OS__BPC_U16 +; + +1710  +ASN_OSUBV_U32 +: + +1711 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 32; + +1712 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1713 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1714 +bpc + = +OS__BPC_U32 +; + +1721 if(! +¡ +) { + +1722 +¡ + = ( +BIT_STRING_t + *)(* +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +)); + +1723 if(! +¡ +è + `RETURN +( +RC_FAIL +); + +1726 + `ASN_DEBUG +("PER Decoding %s size %ld .. %ld bits %d", + +1727 +csiz +-> +æags + & +APC_EXTENSIBLE + ? "extensible" : "non-extensible", + +1728 +csiz +-> +low”_bound +, csiz-> +uµ”_bound +, csiz-> +efãùive_b™s +); + +1730 if( +csiz +-> +æags + & +APC_EXTENSIBLE +) { + +1731  +šext + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +1732 if( +šext + < 0è + `RETURN +( +RC_WMORE +); + +1733 if( +šext +) { + +1734 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1735 +cv® + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +v®ue +; + +1736 +un™_b™s + = +ÿnÚiÿl_un™_b™s +; + +1740 if( +csiz +-> +efãùive_b™s + >= 0) { + +1741 + `FREEMEM +( +¡ +-> +buf +); + +1742 if( +bpc +) { + +1743 +¡ +-> +size + = +csiz +-> +uµ”_bound + * +bpc +; + +1745 +¡ +-> +size + = ( +csiz +-> +uµ”_bound + + 7) >> 3; + +1747 +¡ +-> +buf + = ( +ušt8_t + *) + `MALLOC +(¡-> +size + + 1); + +1748 if(! +¡ +-> +buf +è{ st-> +size + = 0; + `RETURN +( +RC_FAIL +); } + +1754 if( +csiz +-> +efãùive_b™s + == 0) { + +1755  +»t +; + +1756 ià( +¡ +-> +size + > 2) { + +1757 ià( + `­”_g‘_®ign +( +pd +) < 0) + +1758 + `RETURN +( +RC_FAIL +); + +1760 if( +bpc +) { + +1761 + `ASN_DEBUG +("Decoding OCTET STRING size %ld", + +1762 +csiz +-> +uµ”_bound +); + +1763 +»t + = + `OCTET_STRING_³r_g‘_ch¬aù”s +( +pd +, +¡ +-> +buf +, + +1764 +csiz +-> +uµ”_bound +, +bpc +, +un™_b™s +, + +1765 +cv® +-> +low”_bound +, cv®-> +uµ”_bound +, +pc +); + +1766 if( +»t + > 0è + `RETURN +( +RC_FAIL +); + +1768 + `ASN_DEBUG +("Decoding BIT STRING size %ld", + +1769 +csiz +-> +uµ”_bound +); + +1770 +»t + = + `³r_g‘_mªy_b™s +( +pd +, +¡ +-> +buf +, 0, + +1771 +un™_b™s + * +csiz +-> +uµ”_bound +); + +1773 if( +»t + < 0è + `RETURN +( +RC_WMORE +); + +1774 +cÚsumed_my£lf + +ð +un™_b™s + * +csiz +-> +uµ”_bound +; + +1775 +¡ +-> +buf +[¡-> +size +] = 0; + +1776 if( +bpc + == 0) { + +1777  +ubs + = ( +csiz +-> +uµ”_bound + & 0x7); + +1778 +¡ +-> +b™s_unu£d + = +ubs + ? 8 - ubs : 0; + +1780 + `RETURN +( +RC_OK +); + +1783 +¡ +-> +size + = 0; + +1785 +ssize_t + +¿w_Ën +; + +1786 +ssize_t + +Ën_by‹s +; + +1787 +ssize_t + +Ën_b™s +; + +1788 * +p +; + +1789  +»t +; + +1792 ià( +csiz +-> +uµ”_bound + - csiz-> +low”_bound + == 0) + +1794 +¿w_Ën + = + `­”_g‘_Ëngth +( +pd +, -1, +csiz +-> +efãùive_b™s +, & +»³© +); + +1796 +¿w_Ën + = + `­”_g‘_Ëngth +( +pd +, +csiz +-> +uµ”_bound + - csiz-> +low”_bound + + 1, csiz-> +efãùive_b™s +, & +»³© +); + +1797 +»³© + = 0; + +1798 if( +¿w_Ën + < 0è + `RETURN +( +RC_WMORE +); + +1799 +¿w_Ën + +ð +csiz +-> +low”_bound +; + +1801 + `ASN_DEBUG +("Got PER†engthƒb %ld,†en %ld, %s (%s)", + +1802 () +csiz +-> +efãùive_b™s +, () +¿w_Ën +, + +1803 +»³© + ? "»³©" : "Úû", +td +-> +Çme +); + +1805 ià( +¿w_Ën + > 2) { + +1806 ià( + `­”_g‘_®ign +( +pd +) < 0) + +1807 + `RETURN +( +RC_FAIL +); + +1810 if( +bpc +) { + +1811 +Ën_by‹s + = +¿w_Ën + * +bpc +; + +1812 +Ën_b™s + = +Ën_by‹s + * +un™_b™s +; + +1814 +Ën_b™s + = +¿w_Ën +; + +1815 +Ën_by‹s + = ( +Ën_b™s + + 7) >> 3; + +1816 if( +Ën_b™s + & 0x7) + +1817 +¡ +-> +b™s_unu£d + = 8 - ( +Ën_b™s + & 0x7); + +1820 +p + = + `REALLOC +( +¡ +-> +buf +, st-> +size + + +Ën_by‹s + + 1); + +1821 if(! +p +è + `RETURN +( +RC_FAIL +); + +1822 +¡ +-> +buf + = ( +ušt8_t + *) +p +; + +1824 if( +bpc +) { + +1825 +»t + = + `OCTET_STRING_³r_g‘_ch¬aù”s +( +pd +, + +1826 & +¡ +-> +buf +[¡-> +size +], +¿w_Ën +, +bpc +, +un™_b™s +, + +1827 +cv® +-> +low”_bound +, cv®-> +uµ”_bound +, +pc +); + +1828 if( +»t + > 0è + `RETURN +( +RC_FAIL +); + +1830 +»t + = + `³r_g‘_mªy_b™s +( +pd +, & +¡ +-> +buf +[¡-> +size +], + +1831 0, +Ën_b™s +); + +1833 if( +»t + < 0è + `RETURN +( +RC_WMORE +); + +1834 +¡ +-> +size + +ð +Ën_by‹s +; + +1835 }  +»³© +); + +1836 +¡ +-> +buf +[¡-> +size +] = 0; + +1838  +rv® +; + +1839 + } +} + +1841 +a¢_’c_rv®_t + + +1842 + $OCTET_STRING_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1843 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +1844 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +1846 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +1847 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +1848 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +1849 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +pc + = +cÚ¡¿šts + ? constraints + +1850 : +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +; + +1851 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +cv® +; + +1852 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +csiz +; + +1853 cÚ¡ +BIT_STRING_t + * +¡ + = (cÚ¡ BIT_STRING_ˆ*) +¥Œ +; + +1854 +a¢_’c_rv®_t + +” + = { 0, 0, 0 }; + +1855  +šext + = 0; + +1856  +un™_b™s +; + +1857  +ÿnÚiÿl_un™_b™s +; + +1858  +sizešun™s +; + +1859 cÚ¡ +ušt8_t + * +buf +; + +1860  +»t +; + +1862 +OS__BPC_BIT + = 0, + +1863 +OS__BPC_CHAR + = 1, + +1864 +OS__BPC_U16 + = 2, + +1865 +OS__BPC_U32 + = 4 + +1866 } +bpc +; + +1867  +ù_ex‹nsibË +; + +1869 if(! +¡ + || (!¡-> +buf + && st-> +size +)) + +1870 +ASN__ENCODE_FAILED +; + +1872 if( +pc +) { + +1873 +cv® + = & +pc +-> +v®ue +; + +1874 +csiz + = & +pc +-> +size +; + +1876 +cv® + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +v®ue +; + +1877 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1879 +ù_ex‹nsibË + = +csiz +-> +æags + & +APC_EXTENSIBLE +; + +1881  +¥ecs +-> +subv¬ŸÁ +) { + +1886  +ASN_OSUBV_BIT +: + +1887 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 1; + +1888 +bpc + = +OS__BPC_BIT +; + +1889 +sizešun™s + = +¡ +-> +size + * 8 - (¡-> +b™s_unu£d + & 0x07); + +1890 + `ASN_DEBUG +("BIT STRING of %d bytes", + +1891 +sizešun™s +); + +1893  +ASN_OSUBV_ANY +: + +1894  +ASN_OSUBV_STR +: + +1895 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 8; + +1899 +bpc + = +OS__BPC_CHAR +; + +1900 +sizešun™s + = +¡ +-> +size +; + +1902  +ASN_OSUBV_U16 +: + +1903 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 16; + +1904 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1905 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1906 +bpc + = +OS__BPC_U16 +; + +1907 +sizešun™s + = +¡ +-> +size + / 2; + +1909  +ASN_OSUBV_U32 +: + +1910 +ÿnÚiÿl_un™_b™s + = +un™_b™s + = 32; + +1911 if( +cv® +-> +æags + & +APC_CONSTRAINED +) + +1912 +un™_b™s + = +cv® +-> +¿nge_b™s +; + +1913 +bpc + = +OS__BPC_U32 +; + +1914 +sizešun™s + = +¡ +-> +size + / 4; + +1918 + `ASN_DEBUG +("Encoding %s into %d units of %d bits" + +1920 +td +-> +Çme +, +sizešun™s +, +un™_b™s +, + +1921 +csiz +-> +low”_bound +, csiz-> +uµ”_bound +, + +1922 +csiz +-> +efãùive_b™s +, +ù_ex‹nsibË + ? " EXT" : ""); + +1926 if( +csiz +-> +efãùive_b™s + >= 0) { + +1927 if(() +sizešun™s + < +csiz +-> +low”_bound + + +1928 || () +sizešun™s + > +csiz +-> +uµ”_bound +) { + +1929 if( +ù_ex‹nsibË +) { + +1930 +cv® + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +v®ue +; + +1931 +csiz + = & +a¢_DEF_OCTET_STRING_cÚ¡¿šts +. +size +; + +1932 +un™_b™s + = +ÿnÚiÿl_un™_b™s +; + +1933 +šext + = 1; + +1935 +ASN__ENCODE_FAILED +; + +1938 +šext + = 0; + +1942 if( +ù_ex‹nsibË +) { + +1944 if( + `³r_put_ãw_b™s +( +po +, +šext +, 1)) + +1945 +ASN__ENCODE_FAILED +; + +1951 if( +csiz +-> +efãùive_b™s + >= 0) { + +1952 + `ASN_DEBUG +("Encoding %lu bytes (%ld),†ength in %d bits", + +1953 +¡ +-> +size +, +sizešun™s + - +csiz +-> +low”_bound +, + +1954 +csiz +-> +efãùive_b™s +); + +1955 ià( +csiz +-> +efãùive_b™s + > 0) { + +1956 +»t + = + `­”_put_Ëngth +( +po +, +csiz +-> +uµ”_bound + - csiz-> +low”_bound + + 1, +sizešun™s + - csiz->lower_bound); + +1957 if( +»t +è +ASN__ENCODE_FAILED +; + +1961 ià(( +¡ +-> +size + > 2è|| ( +csiz +-> +low”_bound + !ðcsiz-> +uµ”_bound +)) { + +1962 ià( + `­”_put_®ign +( +po +) < 0) + +1963 +ASN__ENCODE_FAILED +; + +1965 if( +bpc +) { + +1966 +»t + = + `OCTET_STRING_³r_put_ch¬aù”s +( +po +, +¡ +-> +buf +, + +1967 +sizešun™s +, +bpc +, +un™_b™s +, + +1968 +cv® +-> +low”_bound +, cv®-> +uµ”_bound +, +pc +); + +1970 +»t + = + `³r_put_mªy_b™s +( +po +, +¡ +-> +buf +, + +1971 +sizešun™s + * +un™_b™s +); + +1973 if( +»t +è +ASN__ENCODE_FAILED +; + +1974 + `ASN__ENCODED_OK +( +” +); + +1977 + `ASN_DEBUG +("Encodšg %lu by‹s", +¡ +-> +size +); + +1979 if( +sizešun™s + == 0) { + +1980 if( + `­”_put_Ëngth +( +po +, -1, 0)) + +1981 +ASN__ENCODE_FAILED +; + +1982 + `ASN__ENCODED_OK +( +” +); + +1985 +buf + = +¡ +->buf; + +1986  +sizešun™s +) { + +1987 +ssize_t + +maySave + = + `­”_put_Ëngth +( +po +, -1, +sizešun™s +); + +1989 if( +maySave + < 0è +ASN__ENCODE_FAILED +; + +1991 + `ASN_DEBUG +("Encoding %ld of %ld", + +1992 () +maySave +, () +sizešun™s +); + +1994 if( +bpc +) { + +1995 +»t + = + `OCTET_STRING_³r_put_ch¬aù”s +( +po +, +buf +, + +1996 +maySave +, +bpc +, +un™_b™s +, + +1997 +cv® +-> +low”_bound +, cv®-> +uµ”_bound +, +pc +); + +1999 +»t + = + `³r_put_mªy_b™s +( +po +, +buf +, +maySave + * +un™_b™s +); + +2001 if( +»t +è +ASN__ENCODE_FAILED +; + +2003 if( +bpc +) + +2004 +buf + +ð +maySave + * +bpc +; + +2006 +buf + +ð +maySave + >> 3; + +2007 +sizešun™s + -ð +maySave +; + +2008 + `as£¹ +(!( +maySave + & 0x07è|| ! +sizešun™s +); + +2011 + `ASN__ENCODED_OK +( +” +); + +2012 + } +} + +2017 + $OCTET_STRING_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +2018  +žev– +, +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +2019 cÚ¡ * cÚ¡ +h2c + = "0123456789ABCDEF"; + +2020 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +2021  +sü©ch +[16 * 3 + 4]; + +2022 * +p + = +sü©ch +; + +2023 +ušt8_t + * +buf +; + +2024 +ušt8_t + * +’d +; + +2025 +size_t + +i +; + +2027 () +td +; + +2029 if(! +¡ + || (!¡-> +buf + && st-> +size +)) + +2030  ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +2035 +buf + = +¡ +->buf; + +2036 +’d + = +buf + + +¡ +-> +size +; + +2037  +i + = 0; +buf + < +’d +; buf++, i++) { + +2038 if(!( +i + % 16è&& (˜|| +¡ +-> +size + > 16)) { + +2039 if( + `cb +( +sü©ch +, +p + - sü©ch, +­p_key +) < 0) + +2041 + `_i_INDENT +(1); + +2042 +p + = +sü©ch +; + +2044 * +p +++ = +h2c +[(* +buf + >> 4) & 0x0F]; + +2045 * +p +++ = +h2c +[* +buf + & 0x0F]; + +2046 * +p +++ = 0x20; + +2049 if( +p + > +sü©ch +) { + +2050 +p +--; + +2051 if( + `cb +( +sü©ch +, +p + - sü©ch, +­p_key +) < 0) + +2056 + } +} + +2059 + $OCTET_STRING_´št_utf8 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +2060  +žev– +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +2061 * +­p_key +) { + +2062 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +2064 () +td +; + +2065 () +žev– +; + +2067 if( +¡ + && (¡-> +buf + || !¡-> +size +)) { + +2068  ( + `cb +( +¡ +-> +buf +, st-> +size +, +­p_key +) < 0) ? -1 : 0; + +2070  ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +2072 + } +} + +2075 + $OCTET_STRING_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +2076 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +2077 +OCTET_STRING_t + * +¡ + = (OCTET_STRING_ˆ*) +¥Œ +; + +2078 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs +; + +2079 +a¢_¡ruù_ùx_t + * +ùx +; + +2080  +_¡ack + * +¡ck +; + +2082 if(! +td + || ! +¡ +) + +2085 +¥ecs + = +td +-> +¥ecifics + + +2086 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +2087 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +2088 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +2090 + `ASN_DEBUG +("F»ešg % a OCTET STRING", +td +-> +Çme +); + +2092 if( +¡ +-> +buf +) { + +2093 + `FREEMEM +( +¡ +-> +buf +); + +2094 +¡ +-> +buf + = 0; + +2100 +¡ck + = ( +_¡ack + *) +ùx +-> +±r +; + +2101 if( +¡ck +) { + +2102  +¡ck +-> +ž +) { + +2103  +_¡ack_– + * +£l + = +¡ck +-> +ž +; + +2104 +¡ck +-> +ž + = +£l +-> +´ev +; + +2105 + `FREEMEM +( +£l +); + +2107 + `FREEMEM +( +¡ck +); + +2110  +m‘hod +) { + +2111  +ASFM_FREE_EVERYTHING +: + +2112 + `FREEMEM +( +¥Œ +); + +2114  +ASFM_FREE_UNDERLYING +: + +2116  +ASFM_FREE_UNDERLYING_AND_RESET +: + +2117 + `mem£t +( +¥Œ +, 0, + +2118 +td +-> +¥ecifics + + +2119 ? ((cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *)( +td +-> +¥ecifics +)) + +2120 -> +¡ruù_size + + +2121 : ( +OCTET_STRING_t +)); + +2124 + } +} + +2130 + $OCTET_STRING_äomBuf +( +OCTET_STRING_t + * +¡ +, cÚ¡ * +¡r +,  +Ën +) { + +2131 * +buf +; + +2133 if( +¡ + =ð0 || ( +¡r + =ð0 && +Ën +)) { + +2134 +”ºo + = +EINVAL +; + +2141 if( +¡r + =ð +NULL +) { + +2142 + `FREEMEM +( +¡ +-> +buf +); + +2143 +¡ +-> +buf + = 0; + +2144 +¡ +-> +size + = 0; + +2149 if( +Ën + < 0) + +2150 +Ën + = + `¡¾’ +( +¡r +); + +2153 +buf + = + `MALLOC +( +Ën + + 1); + +2154 if( +buf + =ð +NULL +) + +2157 + `memýy +( +buf +, +¡r +, +Ën +); + +2158 (( +ušt8_t + *) +buf +)[ +Ën +] = '\0'; + +2159 + `FREEMEM +( +¡ +-> +buf +); + +2160 +¡ +-> +buf + = ( +ušt8_t + *)buf; + +2161 +¡ +-> +size + = +Ën +; + +2164 + } +} + +2166 +OCTET_STRING_t + * + +2167 + $OCTET_STRING_Ãw_äomBuf +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¡r +, + +2168  +Ën +) { + +2169 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = + +2170 +td +-> +¥ecifics + ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *)td->specifics + +2171 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +2172 +OCTET_STRING_t + * +¡ +; + +2174 +¡ + = ( +OCTET_STRING_t + *) + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +2175 if( +¡ + && +¡r + && + `OCTET_STRING_äomBuf +(¡, sŒ, +Ën +)) { + +2176 + `FREEMEM +( +¡ +); + +2177 +¡ + = +NULL +; + +2180  +¡ +; + +2181 + } +} + +2188 + $OCTET_STRING_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +2189 cÚ¡ * +b±r +) { + +2190 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics +; + +2191 cÚ¡ +OCTET_STRING_t + * +a + = +­Œ +; + +2192 cÚ¡ +OCTET_STRING_t + * +b + = +b±r +; + +2194 + `as£¹ +(! +¥ecs + || s³cs-> +subv¬ŸÁ + !ð +ASN_OSUBV_BIT +); + +2196 if( +a + && +b +) { + +2197 +size_t + +commÚ_´efix_size + = +a +-> +size + <ð +b +->size ?‡->size : b->size; + +2198  +»t + = + `memcmp +( +a +-> +buf +, +b +->buf, +commÚ_´efix_size +); + +2199 if( +»t + == 0) { + +2201 if( +a +-> +size + < +b +->size) { + +2203 } if( +a +-> +size + > +b +->size) { + +2209  +»t + < 0 ? -1 : 1; + +2211 } if(! +a + && ! +b +) { + +2213 } if(! +a +) { + +2219 + } +} + +2224  +ušt32_t + + +2225 + $OCTET_STRING__¿ndom_ch¬ +( +lb +,  +ub +) { + +2226 + `as£¹ +( +lb + <ð +ub +); + +2227  + `a¢_¿ndom_b‘w“n +(0, 16)) { + +2229 if( +lb + < +ub +) †b + 1; + +2232  +lb +; + +2234 if( +lb + < +ub +)  ub - 1; + +2237  +ub +; + +2239  + `a¢_¿ndom_b‘w“n +( +lb +, +ub +); + +2241 + } +} + +2244 +size_t + + +2245 + $OCTET_STRING_¿ndom_Ëngth_cÚ¡¿šed +( + +2246 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +2247 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, +size_t + +max_Ëngth +) { + +2248 cÚ¡  +Ëngths +[] = {0, 1, 2, 3, 4, 8, + +2251 +size_t + +ºd_Ën +; + +2254 +ºd_Ën + = +Ëngths +[ + `a¢_¿ndom_b‘w“n +( + +2255 0, ( +Ëngths +) / (lengths[0]) - 1)]; + +2257 if(! +cÚ¡¿šts + || !cÚ¡¿šts-> +³r_cÚ¡¿šts +) + +2258 +cÚ¡¿šts + = & +td +-> +’codšg_cÚ¡¿šts +; + +2259 if( +cÚ¡¿šts +-> +³r_cÚ¡¿šts +) { + +2260 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +pc + = & +cÚ¡¿šts +-> +³r_cÚ¡¿šts +-> +size +; + +2261 if( +pc +-> +æags + & +APC_CONSTRAINED +) { + +2262  +sugge¡ed_uµ”_bound + = +pc +-> +uµ”_bound + < ( +ssize_t +) +max_Ëngth + + +2263 ? +pc +-> +uµ”_bound + + +2264 : ( +ssize_t +) +max_Ëngth +; + +2265 if( +max_Ëngth + <ð( +size_t +) +pc +-> +low”_bound +) { + +2266  +pc +-> +low”_bound +; + +2268 if( +pc +-> +æags + & +APC_EXTENSIBLE +) { + +2269  + `a¢_¿ndom_b‘w“n +(0, 5)) { + +2271 if( +pc +-> +low”_bound + > 0) { + +2272 +ºd_Ën + = +pc +-> +low”_bound + - 1; + +2277 +ºd_Ën + = +pc +-> +uµ”_bound + + 1; + +2281 if( +ºd_Ën + <ð +max_Ëngth +) { + +2286 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +( +pc +-> +low”_bound +, + +2287 +sugge¡ed_uµ”_bound +); + +2290 +ºd_Ën + = + +2291 + `a¢_¿ndom_b‘w“n +( +pc +-> +low”_bound +, +sugge¡ed_uµ”_bound +); + +2294 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +(0, +max_Ëngth +); + +2296 } if( +ºd_Ën + > +max_Ëngth +) { + +2297 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +(0, +max_Ëngth +); + +2300  +ºd_Ën +; + +2301 + } +} + +2303 +a¢_¿ndom_fžl_»suÉ_t + + +2304 + $OCTET_STRING_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +2305 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +2306 +size_t + +max_Ëngth +) { + +2307 cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + * +¥ecs + = +td +-> +¥ecifics + + +2308 ? (cÚ¡ +a¢_OCTET_STRING_¥ecifics_t + *) +td +-> +¥ecifics + + +2309 : & +a¢_SPC_OCTET_STRING_¥ecs +; + +2310 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 1}; + +2311 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +2312 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +2313  +un™_by‹s + = 1; + +2314  +þb + = 0; + +2315  +cub + = 255; + +2316 +ušt8_t + * +buf +; + +2317 +ušt8_t + * +b’d +; + +2318 +ušt8_t + * +b +; + +2319 +size_t + +ºd_Ën +; + +2320 +OCTET_STRING_t + * +¡ +; + +2322 if( +max_Ëngth + =ð0 && !* +¥Œ +è +»suÉ_sk³d +; + +2324  +¥ecs +-> +subv¬ŸÁ +) { + +2326  +ASN_OSUBV_ANY +: + +2327  +»suÉ_çžed +; + +2328  +ASN_OSUBV_BIT +: + +2330  +»suÉ_çžed +; + +2331  +ASN_OSUBV_STR +: + +2332 +un™_by‹s + = 1; + +2333 +þb + = 0; + +2334 +cub + = 255; + +2336  +ASN_OSUBV_U16 +: + +2337 +un™_by‹s + = 2; + +2338 +þb + = 0; + +2339 +cub + = 65535; + +2341  +ASN_OSUBV_U32 +: + +2342 +un™_by‹s + = 4; + +2343 +þb + = 0; + +2344 +cub + = 0x10FFFF; + +2348 if(! +cÚ¡¿šts + || !cÚ¡¿šts-> +³r_cÚ¡¿šts +) + +2349 +cÚ¡¿šts + = & +td +-> +’codšg_cÚ¡¿šts +; + +2350 if( +cÚ¡¿šts +-> +³r_cÚ¡¿šts +) { + +2351 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +pc + = & +cÚ¡¿šts +-> +³r_cÚ¡¿šts +-> +v®ue +; + +2352 if( +pc +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +2353 +þb + = +pc +-> +low”_bound +; + +2354 } if( +pc +-> +æags + & +APC_CONSTRAINED +) { + +2355 +þb + = +pc +-> +low”_bound +; + +2356 +cub + = +pc +-> +uµ”_bound +; + +2360 +ºd_Ën + = + +2361 + `OCTET_STRING_¿ndom_Ëngth_cÚ¡¿šed +( +td +, +cÚ¡¿šts +, +max_Ëngth +); + +2363 +buf + = + `CALLOC +( +un™_by‹s +, +ºd_Ën + + 1); + +2364 if(! +buf +è +»suÉ_çžed +; + +2366 +b’d + = & +buf +[ +un™_by‹s + * +ºd_Ën +]; + +2368  +un™_by‹s +) { + +2370  +b + = +buf +; b < +b’d +; b +ð +un™_by‹s +) { + +2371 *( +ušt8_t + *) +b + = + `OCTET_STRING__¿ndom_ch¬ +( +þb +, +cub +); + +2373 *( +ušt8_t + *) +b + = 0; + +2376  +b + = +buf +; b < +b’d +; b +ð +un™_by‹s +) { + +2377 +ušt32_t + +code + = + `OCTET_STRING__¿ndom_ch¬ +( +þb +, +cub +); + +2378 +b +[0] = +code + >> 8; + +2379 +b +[1] = +code +; + +2381 *( +ušt16_t + *) +b + = 0; + +2384  +b + = +buf +; b < +b’d +; b +ð +un™_by‹s +) { + +2385 +ušt32_t + +code + = + `OCTET_STRING__¿ndom_ch¬ +( +þb +, +cub +); + +2386 +b +[0] = +code + >> 24; + +2387 +b +[1] = +code + >> 16; + +2388 +b +[2] = +code + >> 8; + +2389 +b +[3] = +code +; + +2391 *( +ušt32_t + *) +b + = 0; + +2395 if(* +¥Œ +) { + +2396 +¡ + = * +¥Œ +; + +2397 + `FREEMEM +( +¡ +-> +buf +); + +2399 +¡ + = ( +OCTET_STRING_t + *)(* +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +)); + +2400 if(! +¡ +) { + +2401 + `FREEMEM +( +buf +); + +2402  +»suÉ_çžed +; + +2406 +¡ +-> +buf + = buf; + +2407 +¡ +-> +size + = +un™_by‹s + * +ºd_Ën +; + +2409 +»suÉ_ok +. +Ëngth + = +¡ +-> +size +; + +2410  +»suÉ_ok +; + +2411 + } +} + + @OPEN_TYPE.c + +5  + ~ + +6  + ~ + +7  + ~ + +8  + ~<³r_ݒty³.h +> + +9  + ~<”ºo.h +> + +11 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_OPEN_TYPE + = { + +12 +OPEN_TYPE_ä“ +, + +13 +OPEN_TYPE_´št +, + +14 +OPEN_TYPE_com·» +, + +15 +OPEN_TYPE_decode_b” +, + +16 +OPEN_TYPE_’code_d” +, + +17 +OPEN_TYPE_decode_x” +, + +18 +OPEN_TYPE_’code_x” +, + +19 #ifdeà +ASN_DISABLE_OER_SUPPORT + + +22 +OPEN_TYPE_decode_Ûr +, + +23 +OPEN_TYPE_’code_Ûr +, + +25 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +28 +OPEN_TYPE_decode_u³r +, + +29 +OPEN_TYPE_’code_u³r +, + +30 +OPEN_TYPE_decode_­” +, + +31 +OPEN_TYPE_’code_­” +, + +37 #undeà +ADVANCE + + +38  + #ADVANCE +( +num_by‹s +) \ + +40 +size_t + +num + = +num_by‹s +; \ + +41 +±r + = ((cÚ¡ *íŒè+ +num +; \ + +42 +size + -ð +num +; \ + +43 +cÚsumed_my£lf + +ð +num +; \ + +44 } 0) + + ) + +46 +a¢_dec_rv®_t + + +47 + $OPEN_TYPE_b”_g‘ +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +48 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +49 cÚ¡ +a¢_TYPE_memb”_t + * +–m +, cÚ¡ * +±r +, +size_t + +size +) { + +50 +size_t + +cÚsumed_my£lf + = 0; + +51 +a¢_ty³_£ËùÜ_»suÉ_t + +£Ëùed +; + +52 * +memb_±r +; + +53 ** +memb_±r2 +; + +54 * +šÃr_v®ue +; + +55 +a¢_dec_rv®_t + +rv +; + +57 if(!( +–m +-> +æags + & +ATF_OPEN_TYPE +)) { + +58 +ASN__DECODE_FAILED +; + +61 if(! +–m +-> +ty³_£ËùÜ +) { + +62 + `ASN_DEBUG +("Type selector is‚ot defined for Open Type %s->%s->%s", + +63 +td +-> +Çme +, +–m +->Çme,ƒlm-> +ty³ +->name); + +64 +ASN__DECODE_FAILED +; + +67 +£Ëùed + = +–m +-> + `ty³_£ËùÜ +( +td +, +¥Œ +); + +68 if(! +£Ëùed +. +´e£nû_šdex +) { + +69 +ASN__DECODE_FAILED +; + +73 if( +–m +-> +æags + & +ATF_POINTER +) { + +74 +memb_±r2 + = (**)((*) +¥Œ + + +–m +-> +memb_off£t +); + +76 +memb_±r + = (*) +¥Œ + + +–m +-> +memb_off£t +; + +77 +memb_±r2 + = & +memb_±r +; + +79 if(* +memb_±r2 + !ð +NULL +) { + +81 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, 0) != 0) { + +82 +ASN__DECODE_FAILED +; + +86 +šÃr_v®ue + = + +87 (*)* +memb_±r2 + + +88 + +–m +-> +ty³ +-> +–em’ts +[ +£Ëùed +. +´e£nû_šdex + - 1]. +memb_off£t +; + +90 + `ASN_DEBUG +("´e£nû %d\n", +£Ëùed +. +´e£nû_šdex +); + +92 +rv + = +£Ëùed +. +ty³_desütÜ +-> +Ý +-> + `b”_decod” +( + +93 +Ýt_codec_ùx +, +£Ëùed +. +ty³_desütÜ +, & +šÃr_v®ue +, +±r +, +size +, + +94 +–m +-> +g_mode +); + +95 + `ADVANCE +( +rv +. +cÚsumed +); + +96 +rv +. +cÚsumed + = 0; + +97  +rv +. +code +) { + +98  +RC_OK +: + +99 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, + +100 +£Ëùed +. +´e£nû_šdex +) + +102 +rv +. +code + = +RC_OK +; + +103 +rv +. +cÚsumed + = +cÚsumed_my£lf +; + +104  +rv +; + +109  +RC_FAIL +: + +110 +rv +. +cÚsumed + = +cÚsumed_my£lf +; + +112  +RC_WMORE +: + +116 if(* +memb_±r2 +) { + +117 if( +–m +-> +æags + & +ATF_POINTER +) { + +118 + `ASN_STRUCT_FREE +(* +£Ëùed +. +ty³_desütÜ +, +šÃr_v®ue +); + +119 * +memb_±r2 + = +NULL +; + +121 + `ASN_STRUCT_RESET +(* +£Ëùed +. +ty³_desütÜ +, + +122 +šÃr_v®ue +); + +125  +rv +; + +126 + } +} + +128 +a¢_dec_rv®_t + + +129 + $OPEN_TYPE_x”_g‘ +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +130 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +131 cÚ¡ +a¢_TYPE_memb”_t + * +–m +, cÚ¡ * +±r +, +size_t + +size +) { + +132 +size_t + +cÚsumed_my£lf + = 0; + +133 +a¢_ty³_£ËùÜ_»suÉ_t + +£Ëùed +; + +134 * +memb_±r +; + +135 ** +memb_±r2 +; + +136 * +šÃr_v®ue +; + +137 +a¢_dec_rv®_t + +rv +; + +139  +x”_cڋxt + = 0; + +140 +ssize_t + +ch_size +; + +141 +px”_chunk_ty³_e + +ch_ty³ +; + +143 if(!( +–m +-> +æags + & +ATF_OPEN_TYPE +)) { + +144 +ASN__DECODE_FAILED +; + +147 if(! +–m +-> +ty³_£ËùÜ +) { + +148 + `ASN_DEBUG +("Type selector is‚ot defined for Open Type %s->%s->%s", + +149 +td +-> +Çme +, +–m +->Çme,ƒlm-> +ty³ +->name); + +150 +ASN__DECODE_FAILED +; + +153 +£Ëùed + = +–m +-> + `ty³_£ËùÜ +( +td +, +¥Œ +); + +154 if(! +£Ëùed +. +´e£nû_šdex +) { + +155 +ASN__DECODE_FAILED +; + +159 + `as£¹ +( +–m +-> +æags + =ð +ATF_OPEN_TYPE +); + +160 if( +–m +-> +æags + & +ATF_POINTER +) { + +161 +memb_±r2 + = (**)((*) +¥Œ + + +–m +-> +memb_off£t +); + +163 +memb_±r + = (*) +¥Œ + + +–m +-> +memb_off£t +; + +164 +memb_±r2 + = & +memb_±r +; + +166 if(* +memb_±r2 + !ð +NULL +) { + +168 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, 0) + +170 +ASN__DECODE_FAILED +; + +178 +ch_size + = + `x”_Ãxt_tok’ +(& +x”_cڋxt +, +±r +, +size +, & +ch_ty³ +); + +179 if( +ch_size + < 0) { + +180 +ASN__DECODE_FAILED +; + +182  +ch_ty³ +) { + +183  +PXER_WMORE +: + +184 +ASN__DECODE_STARVED +; + +185  +PXER_COMMENT +: + +186  +PXER_TEXT +: + +187 + `ADVANCE +( +ch_size +); + +189  +PXER_TAG +: + +199  + `x”_check_g +( +±r +, +ch_size +, +–m +-> +Çme +)) { + +200  +XCT_OPENING +: + +201 + `ADVANCE +( +ch_size +); + +203  +XCT_BROKEN +: + +205 +ASN__DECODE_FAILED +; + +208 +šÃr_v®ue + = + +209 (*)* +memb_±r2 + + +210 + +–m +-> +ty³ +-> +–em’ts +[ +£Ëùed +. +´e£nû_šdex + - 1]. +memb_off£t +; + +212 +rv + = +£Ëùed +. +ty³_desütÜ +-> +Ý +-> + `x”_decod” +( + +213 +Ýt_codec_ùx +, +£Ëùed +. +ty³_desütÜ +, & +šÃr_v®ue +, +NULL +, +±r +, +size +); + +214 + `ADVANCE +( +rv +. +cÚsumed +); + +215 +rv +. +cÚsumed + = 0; + +216  +rv +. +code +) { + +217  +RC_OK +: + +218 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, + +219 +£Ëùed +. +´e£nû_šdex +) + +223 +rv +. +code + = +RC_FAIL +; + +226  +RC_FAIL +: + +228 +rv +. +cÚsumed + = +cÚsumed_my£lf +; + +230  +RC_WMORE +: + +235 if(* +memb_±r2 +) { + +236 if( +–m +-> +æags + & +ATF_POINTER +) { + +237 + `ASN_STRUCT_FREE +(* +£Ëùed +. +ty³_desütÜ +, +šÃr_v®ue +); + +238 * +memb_±r2 + = +NULL +; + +240 + `ASN_STRUCT_RESET +(* +£Ëùed +. +ty³_desütÜ +, + +241 +šÃr_v®ue +); + +244  +rv +; + +251 +ch_size + = + `x”_Ãxt_tok’ +(& +x”_cڋxt +, +±r +, +size +, & +ch_ty³ +); + +252 if( +ch_size + < 0) { + +253 +ASN__DECODE_FAILED +; + +255  +ch_ty³ +) { + +256  +PXER_WMORE +: + +257 +ASN__DECODE_STARVED +; + +258  +PXER_COMMENT +: + +259  +PXER_TEXT +: + +260 + `ADVANCE +( +ch_size +); + +262  +PXER_TAG +: + +272  + `x”_check_g +( +±r +, +ch_size +, +–m +-> +Çme +)) { + +273  +XCT_CLOSING +: + +274 + `ADVANCE +( +ch_size +); + +276  +XCT_BROKEN +: + +278 +ASN__DECODE_FAILED +; + +281 +rv +. +cÚsumed + +ð +cÚsumed_my£lf +; + +283  +rv +; + +284 + } +} + +287 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +289 +a¢_dec_rv®_t + + +290 + $OPEN_TYPE_u³r_g‘ +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +291 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +292 cÚ¡ +a¢_TYPE_memb”_t + * +–m +, +a¢_³r_d©a_t + * +pd +) { + +293 +a¢_ty³_£ËùÜ_»suÉ_t + +£Ëùed +; + +294 * +memb_±r +; + +295 ** +memb_±r2 +; + +296 * +šÃr_v®ue +; + +297 +a¢_dec_rv®_t + +rv +; + +299 if(!( +–m +-> +æags + & +ATF_OPEN_TYPE +)) { + +300 +ASN__DECODE_FAILED +; + +303 if(! +–m +-> +ty³_£ËùÜ +) { + +304 + `ASN_DEBUG +("Type selector is‚ot defined for Open Type %s->%s->%s", + +305 +td +-> +Çme +, +–m +->Çme,ƒlm-> +ty³ +->name); + +306 +ASN__DECODE_FAILED +; + +309 +£Ëùed + = +–m +-> + `ty³_£ËùÜ +( +td +, +¥Œ +); + +310 if(! +£Ëùed +. +´e£nû_šdex +) { + +311 +ASN__DECODE_FAILED +; + +315 + `as£¹ +( +–m +-> +æags + =ð +ATF_OPEN_TYPE +); + +316 if( +–m +-> +æags + & +ATF_POINTER +) { + +317 +memb_±r2 + = (**)((*) +¥Œ + + +–m +-> +memb_off£t +); + +319 +memb_±r + = (*) +¥Œ + + +–m +-> +memb_off£t +; + +320 +memb_±r2 + = & +memb_±r +; + +322 if(* +memb_±r2 + !ð +NULL +) { + +324 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, 0) + +326 +ASN__DECODE_FAILED +; + +330 +šÃr_v®ue + = + +331 (*)* +memb_±r2 + + +332 + +–m +-> +ty³ +-> +–em’ts +[ +£Ëùed +. +´e£nû_šdex + - 1]. +memb_off£t +; + +334 +rv + = + `u³r_ݒ_ty³_g‘ +( +Ýt_codec_ùx +, +£Ëùed +. +ty³_desütÜ +, +NULL +, + +335 & +šÃr_v®ue +, +pd +); + +336  +rv +. +code +) { + +337  +RC_OK +: + +338 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, + +339 +£Ëùed +. +´e£nû_šdex +) + +343 +rv +. +code + = +RC_FAIL +; + +346  +RC_WMORE +: + +347  +RC_FAIL +: + +348 if(* +memb_±r2 +) { + +349 if( +–m +-> +æags + & +ATF_POINTER +) { + +350 + `ASN_STRUCT_FREE +(* +£Ëùed +. +ty³_desütÜ +, +šÃr_v®ue +); + +351 * +memb_±r2 + = +NULL +; + +353 + `ASN_STRUCT_RESET +(* +£Ëùed +. +ty³_desütÜ +, + +354 +šÃr_v®ue +); + +358  +rv +; + +359 + } +} + +361 +a¢_’c_rv®_t + + +362 + $OPEN_TYPE_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +363 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +364 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +365 cÚ¡ * +memb_±r +; + +366 +a¢_TYPE_memb”_t + * +–m +; + +367 +a¢_’c_rv®_t + +” + = {0,0,0}; + +368  +´e£Á +; + +370 () +cÚ¡¿šts +; + +372 +´e£Á + = + `CHOICE_v¬ŸÁ_g‘_´e£nû +( +td +, +¥Œ +); + +373 if( +´e£Á + =ð0 ||…»£Á > +td +-> +–em’ts_couÁ +) { + +374 +ASN__ENCODE_FAILED +; + +376 +´e£Á +--; + +379 + `ASN_DEBUG +("Encodšg % OPEN TYPEƒËm’ˆ%d", +td +-> +Çme +, +´e£Á +); + +381 +–m + = & +td +-> +–em’ts +[ +´e£Á +]; + +382 if( +–m +-> +æags + & +ATF_POINTER +) { + +384 +memb_±r + = + +385 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +386 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +388 +memb_±r + = (cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +; + +391 if( + `u³r_ݒ_ty³_put +( +–m +-> +ty³ +, +NULL +, +memb_±r +, +po +) < 0) { + +392 +ASN__ENCODE_FAILED +; + +395 +” +. +’coded + = 0; + +396 + `ASN__ENCODED_OK +( +” +); + +397 + } +} + +399 +a¢_dec_rv®_t + + +400 + $OPEN_TYPE_­”_g‘ +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +401 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +402 cÚ¡ +a¢_TYPE_memb”_t + * +–m +, +a¢_³r_d©a_t + * +pd +) { + +403 +a¢_ty³_£ËùÜ_»suÉ_t + +£Ëùed +; + +404 * +memb_±r +; + +405 ** +memb_±r2 +; + +406 * +šÃr_v®ue +; + +407 +a¢_dec_rv®_t + +rv +; + +409 if(!( +–m +-> +æags + & +ATF_OPEN_TYPE +)) { + +410 +ASN__DECODE_FAILED +; + +413 if(! +–m +-> +ty³_£ËùÜ +) { + +414 + `ASN_DEBUG +("Type selector is‚ot defined for Open Type %s->%s->%s", + +415 +td +-> +Çme +, +–m +->Çme,ƒlm-> +ty³ +->name); + +416 +ASN__DECODE_FAILED +; + +419 +£Ëùed + = +–m +-> + `ty³_£ËùÜ +( +td +, +¥Œ +); + +420 if(! +£Ëùed +. +´e£nû_šdex +) { + +421 +ASN__DECODE_FAILED +; + +425 + `as£¹ +( +–m +-> +æags + =ð +ATF_OPEN_TYPE +); + +426 if( +–m +-> +æags + & +ATF_POINTER +) { + +427 +memb_±r2 + = (**)((*) +¥Œ + + +–m +-> +memb_off£t +); + +429 +memb_±r + = (*) +¥Œ + + +–m +-> +memb_off£t +; + +430 +memb_±r2 + = & +memb_±r +; + +432 if(* +memb_±r2 + !ð +NULL +) { + +434 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, 0) + +436 +ASN__DECODE_FAILED +; + +440 +šÃr_v®ue + = + +441 (*)* +memb_±r2 + + +442 + +–m +-> +ty³ +-> +–em’ts +[ +£Ëùed +. +´e£nû_šdex + - 1]. +memb_off£t +; + +444 +rv + = + `­”_ݒ_ty³_g‘ +( +Ýt_codec_ùx +, +£Ëùed +. +ty³_desütÜ +, +NULL +, + +445 & +šÃr_v®ue +, +pd +); + +446  +rv +. +code +) { + +447  +RC_OK +: + +448 if( + `CHOICE_v¬ŸÁ_£t_´e£nû +( +–m +-> +ty³ +, * +memb_±r2 +, + +449 +£Ëùed +. +´e£nû_šdex +) + +453 +rv +. +code + = +RC_FAIL +; + +456  +RC_WMORE +: + +457  +RC_FAIL +: + +458 if(* +memb_±r2 +) { + +459 if( +–m +-> +æags + & +ATF_POINTER +) { + +460 + `ASN_STRUCT_FREE +(* +£Ëùed +. +ty³_desütÜ +, +šÃr_v®ue +); + +461 * +memb_±r2 + = +NULL +; + +463 + `ASN_STRUCT_RESET +(* +£Ëùed +. +ty³_desütÜ +, + +464 +šÃr_v®ue +); + +468  +rv +; + +469 + } +} + +471 +a¢_’c_rv®_t + + +472 + $OPEN_TYPE_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +473 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +474 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +475 cÚ¡ * +memb_±r +; + +476 +a¢_TYPE_memb”_t + * +–m +; + +477 +a¢_’c_rv®_t + +” + = {0,0,0}; + +478  +´e£Á +; + +480 () +cÚ¡¿šts +; + +482 +´e£Á + = + `CHOICE_v¬ŸÁ_g‘_´e£nû +( +td +, +¥Œ +); + +483 if( +´e£Á + =ð0 ||…»£Á > +td +-> +–em’ts_couÁ +) { + +484 +ASN__ENCODE_FAILED +; + +486 +´e£Á +--; + +489 + `ASN_DEBUG +("Encodšg % OPEN TYPEƒËm’ˆ%d", +td +-> +Çme +, +´e£Á +); + +491 +–m + = & +td +-> +–em’ts +[ +´e£Á +]; + +492 if( +–m +-> +æags + & +ATF_POINTER +) { + +494 +memb_±r + = + +495 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +496 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +498 +memb_±r + = (cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +; + +501 if( + `­”_ݒ_ty³_put +( +–m +-> +ty³ +, +NULL +, +memb_±r +, +po +) < 0) { + +502 +ASN__ENCODE_FAILED +; + +505 +” +. +’coded + = 0; + +506 + `ASN__ENCODED_OK +( +” +); + +507 + } +} + + @PLMNIdentity.c + +8  + ~"PLMNId’t™y.h +" + +11 + $PLMNId’t™y_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 3)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_PLMNId’t™y_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 3, 3 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_PLMNId’t™y_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_PLMNId’t™y + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_PLMNId’t™y_gs_1 +, + +53 ( +a¢_DEF_PLMNId’t™y_gs_1 +) + +54 /( +a¢_DEF_PLMNId’t™y_gs_1 +[0]), + +55 +a¢_DEF_PLMNId’t™y_gs_1 +, + +56 ( +a¢_DEF_PLMNId’t™y_gs_1 +) + +57 /( +a¢_DEF_PLMNId’t™y_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_PLMNId’t™y_cÚ¡r_1 +, +PLMNId’t™y_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @PrintableString.c + +6  + ~ + +7  + ~ + +12 cÚ¡  + g_PršbËSŒšg_®phab‘ +[256] = { + +22 cÚ¡  + g_PršbËSŒšg_code2v®ue +[74] = { + +32 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_PršbËSŒšg_gs +[] = { + +33 ( +ASN_TAG_CLASS_UNIVERSAL + | (19 << 2)), + +34 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +36  + $a¢_DEF_PršbËSŒšg_v2c +( +v®ue +) { + +37  +_PršbËSŒšg_®phab‘ +[ +v®ue + > 255 ? 0 : value] - 1; + +38 + } +} + +39  + $a¢_DEF_PršbËSŒšg_c2v +( +code +) { + +40 if( +code + < 74) + +41  +_PršbËSŒšg_code2v®ue +[ +code +]; + +43 + } +} + +44  +a¢_³r_cÚ¡¿šts_t + + ga¢_DEF_PršbËSŒšg_³r_cÚ¡¿šts + = { + +45 { +APC_CONSTRAINED +, 4, 4, 0x20, 0x39 }, + +46 { +APC_SEMI_CONSTRAINED +, -1, -1, 0, 0 }, + +47 +a¢_DEF_PršbËSŒšg_v2c +, + +48 +a¢_DEF_PršbËSŒšg_c2v + + +50 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_PršbËSŒšg + = { + +51 +OCTET_STRING_ä“ +, + +52 +OCTET_STRING_´št_utf8 +, + +53 +OCTET_STRING_com·» +, + +54 +OCTET_STRING_decode_b” +, + +55 +OCTET_STRING_’code_d” +, + +56 +OCTET_STRING_decode_x”_utf8 +, + +57 +OCTET_STRING_’code_x”_utf8 +, + +58 #ifdef +ASN_DISABLE_OER_SUPPORT + + +62 +OCTET_STRING_decode_Ûr +, + +63 +OCTET_STRING_’code_Ûr +, + +65 #ifdef +ASN_DISABLE_PER_SUPPORT + + +71 +OCTET_STRING_decode_u³r +, + +72 +OCTET_STRING_’code_u³r +, + +73 +OCTET_STRING_decode_­” +, + +74 +OCTET_STRING_’code_­” +, + +76 +OCTET_STRING_¿ndom_fžl +, + +79 +a¢_TYPE_desütÜ_t + + ga¢_DEF_PršbËSŒšg + = { + +82 & +a¢_OP_PršbËSŒšg +, + +83 +a¢_DEF_PršbËSŒšg_gs +, + +84 ( +a¢_DEF_PršbËSŒšg_gs +) + +85 / ( +a¢_DEF_PršbËSŒšg_gs +[0]) - 1, + +86 +a¢_DEF_PršbËSŒšg_gs +, + +87 ( +a¢_DEF_PršbËSŒšg_gs +) + +88 / ( +a¢_DEF_PršbËSŒšg_gs +[0]), + +89 { 0, & +a¢_DEF_PršbËSŒšg_³r_cÚ¡¿šts +, +PršbËSŒšg_cÚ¡¿št + }, + +96 + $PršbËSŒšg_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +97 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, + +98 * +­p_key +) { + +99 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +101 if( +¡ + && st-> +buf +) { + +102 +ušt8_t + * +buf + = +¡ +->buf; + +103 +ušt8_t + * +’d + = +buf + + +¡ +-> +size +; + +109 ; +buf + < +’d +; buf++) { + +110 if(! +_PršbËSŒšg_®phab‘ +[* +buf +]) { + +111 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +115 +td +-> +Çme +, + +116 ()(( +buf + - +¡ +->buf) + 1), + +117 * +buf +, + +118 +__FILE__ +, +__LINE__ +); + +123 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +125 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +130 + } +} + + @QCI.c + +8  + ~"QCI.h +" + +11 + $QCI_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 255)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_QCI_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED +, 8, 8, 0, 255 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_QCI_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_QCI + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_QCI_gs_1 +, + +52 ( +a¢_DEF_QCI_gs_1 +) + +53 /( +a¢_DEF_QCI_gs_1 +[0]), + +54 +a¢_DEF_QCI_gs_1 +, + +55 ( +a¢_DEF_QCI_gs_1 +) + +56 /( +a¢_DEF_QCI_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_QCI_cÚ¡r_1 +, +QCI_cÚ¡¿št + }, + + @QoSID.c + +8  + ~"QoSID.h +" + +10  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_QoSID_cÚ¡r_1 + + gCC_NOTUSED + = { + +11 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +15  +a¢_TYPE_memb”_t + + ga¢_MBR_QoSID_1 +[] = { + +16 { +ATF_NOFLAGS +, 0, +off£tof +( +QoSID +, +choiû +. +fiveGC +), + +17 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +19 & +a¢_DEF_FiveQI +, + +25 { +ATF_NOFLAGS +, 0, +off£tof +( +QoSID +, +choiû +. +ePC +), + +26 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +28 & +a¢_DEF_QCI +, + +35 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_QoSID_g2–_1 +[] = { + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +37 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +39  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_QoSID_¥ecs_1 + = { + +40 ( +QoSID +), + +41 +off£tof +( +QoSID +, +_a¢_ùx +), + +42 +off£tof +( +QoSID +, +´e£Á +), + +43 ((( +QoSID + *)0)-> +´e£Á +), + +44 +a¢_MAP_QoSID_g2–_1 +, + +49 +a¢_TYPE_desütÜ_t + + ga¢_DEF_QoSID + = { + +52 & +a¢_OP_CHOICE +, + +57 { 0, & +a¢_PER_ty³_QoSID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +58 +a¢_MBR_QoSID_1 +, + +60 & +a¢_SPC_QoSID_¥ecs_1 + + + @QosFlowIdentifier.c + +8  + ~"QosFlowId’tif›r.h +" + +11 + $QosFlowId’tif›r_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 0 && value <= 63)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_QosFlowId’tif›r_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 6, 6, 0, 63 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_QosFlowId’tif›r_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_QosFlowId’tif›r + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_QosFlowId’tif›r_gs_1 +, + +52 ( +a¢_DEF_QosFlowId’tif›r_gs_1 +) + +53 /( +a¢_DEF_QosFlowId’tif›r_gs_1 +[0]), + +54 +a¢_DEF_QosFlowId’tif›r_gs_1 +, + +55 ( +a¢_DEF_QosFlowId’tif›r_gs_1 +) + +56 /( +a¢_DEF_QosFlowId’tif›r_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_QosFlowId’tif›r_cÚ¡r_1 +, +QosFlowId’tif›r_cÚ¡¿št + }, + + @RANUEID.c + +8  + ~"RANUEID.h +" + +11 + $RANUEID_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 8)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_RANUEID_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 8, 8 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RANUEID_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RANUEID + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_RANUEID_gs_1 +, + +53 ( +a¢_DEF_RANUEID_gs_1 +) + +54 /( +a¢_DEF_RANUEID_gs_1 +[0]), + +55 +a¢_DEF_RANUEID_gs_1 +, + +56 ( +a¢_DEF_RANUEID_gs_1 +) + +57 /( +a¢_DEF_RANUEID_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_RANUEID_cÚ¡r_1 +, +RANUEID_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @RANfunction-Name.c + +8  + ~"RANfunùiÚ-Name.h +" + +10 cÚ¡  + g³rm™‹d_®phab‘_bË_2 +[256] = { + +20 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_2 +[74] = { + +28  + $check_³rm™‹d_®phab‘_2 +(cÚ¡ * +¥Œ +) { + +29 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_2 +; + +31 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +32 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +33 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +35 ; +ch + < +’d +; ch++) { + +36 +ušt8_t + +cv + = * +ch +; + +37 if(! +bË +[ +cv +])  -1; + +40 + } +} + +42 cÚ¡  + g³rm™‹d_®phab‘_bË_3 +[256] = { + +52 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_3 +[74] = { + +60  + $check_³rm™‹d_®phab‘_3 +(cÚ¡ * +¥Œ +) { + +61 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_3 +; + +63 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +64 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +65 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +67 ; +ch + < +’d +; ch++) { + +68 +ušt8_t + +cv + = * +ch +; + +69 if(! +bË +[ +cv +])  -1; + +72 + } +} + +74 cÚ¡  + g³rm™‹d_®phab‘_bË_4 +[256] = { + +84 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_4 +[74] = { + +92  + $check_³rm™‹d_®phab‘_4 +(cÚ¡ * +¥Œ +) { + +93 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_4 +; + +95 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +96 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +97 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +99 ; +ch + < +’d +; ch++) { + +100 +ušt8_t + +cv + = * +ch +; + +101 if(! +bË +[ +cv +])  -1; + +104 + } +} + +107 + $memb_¿nFunùiÚ_ShÜtName_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +108 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +109 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +110 +size_t + +size +; + +112 if(! +¥Œ +) { + +113 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +115 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +119 +size + = +¡ +->size; + +121 if(( +size + >= 1 && size <= 150) + +122 && ! + `check_³rm™‹d_®phab‘_2 +( +¡ +)) { + +126 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +128 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +131 + } +} + +133  + $a¢_PER_MAP_¿nFunùiÚ_ShÜtName_2_v2c +( +v®ue +) { + +134 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_2 +)/(permitted_alphabet_table_2[0])) + +136  +³rm™‹d_®phab‘_bË_2 +[ +v®ue +] - 1; + +137 + } +} + +138  + $a¢_PER_MAP_¿nFunùiÚ_ShÜtName_2_c2v +( +code +) { + +139 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_2 +)/(permitted_alphabet_code2value_2[0])) + +141  +³rm™‹d_®phab‘_code2v®ue_2 +[ +code +]; + +142 + } +} + +144 + $memb_¿nFunùiÚ_E2SM_OID_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +145 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +146 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +147 +size_t + +size +; + +149 if(! +¥Œ +) { + +150 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +152 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +156 +size + = +¡ +->size; + +158 if(( +size + >= 1 && size <= 1000) + +159 && ! + `check_³rm™‹d_®phab‘_3 +( +¡ +)) { + +163 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +165 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +168 + } +} + +170  + $a¢_PER_MAP_¿nFunùiÚ_E2SM_OID_3_v2c +( +v®ue +) { + +171 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_3 +)/(permitted_alphabet_table_3[0])) + +173  +³rm™‹d_®phab‘_bË_3 +[ +v®ue +] - 1; + +174 + } +} + +175  + $a¢_PER_MAP_¿nFunùiÚ_E2SM_OID_3_c2v +( +code +) { + +176 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_3 +)/(permitted_alphabet_code2value_3[0])) + +178  +³rm™‹d_®phab‘_code2v®ue_3 +[ +code +]; + +179 + } +} + +181 + $memb_¿nFunùiÚ_DesütiÚ_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +182 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +183 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +184 +size_t + +size +; + +186 if(! +¥Œ +) { + +187 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +189 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +193 +size + = +¡ +->size; + +195 if(( +size + >= 1 && size <= 150) + +196 && ! + `check_³rm™‹d_®phab‘_4 +( +¡ +)) { + +200 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +202 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +205 + } +} + +207  + $a¢_PER_MAP_¿nFunùiÚ_DesütiÚ_4_v2c +( +v®ue +) { + +208 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_4 +)/(permitted_alphabet_table_4[0])) + +210  +³rm™‹d_®phab‘_bË_4 +[ +v®ue +] - 1; + +211 + } +} + +212  + $a¢_PER_MAP_¿nFunùiÚ_DesütiÚ_4_c2v +( +code +) { + +213 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_4 +)/(permitted_alphabet_code2value_4[0])) + +215  +³rm™‹d_®phab‘_code2v®ue_4 +[ +code +]; + +216 + } +} + +217  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_¿nFunùiÚ_ShÜtName_cÚ¡r_2 + + gCC_NOTUSED + = { + +218 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +219 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 8, 8, 1, 150 } , + +220 +a¢_PER_MAP_¿nFunùiÚ_ShÜtName_2_v2c +, + +221 +a¢_PER_MAP_¿nFunùiÚ_ShÜtName_2_c2v + + +223  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_¿nFunùiÚ_E2SM_OID_cÚ¡r_3 + + gCC_NOTUSED + = { + +224 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +225 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 10, 10, 1, 1000 } , + +226 +a¢_PER_MAP_¿nFunùiÚ_E2SM_OID_3_v2c +, + +227 +a¢_PER_MAP_¿nFunùiÚ_E2SM_OID_3_c2v + + +229  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_¿nFunùiÚ_DesütiÚ_cÚ¡r_4 + + gCC_NOTUSED + = { + +230 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +231 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 8, 8, 1, 150 } , + +232 +a¢_PER_MAP_¿nFunùiÚ_DesütiÚ_4_v2c +, + +233 +a¢_PER_MAP_¿nFunùiÚ_DesütiÚ_4_c2v + + +235 +a¢_TYPE_memb”_t + + ga¢_MBR_RANfunùiÚ_Name_1 +[] = { + +236 { +ATF_NOFLAGS +, 0, +off£tof +( +RANfunùiÚ_Name +, +¿nFunùiÚ_ShÜtName +), + +237 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +239 & +a¢_DEF_PršbËSŒšg +, + +241 { 0, & +a¢_PER_memb_¿nFunùiÚ_ShÜtName_cÚ¡r_2 +, +memb_¿nFunùiÚ_ShÜtName_cÚ¡¿št_1 + }, + +245 { +ATF_NOFLAGS +, 0, +off£tof +( +RANfunùiÚ_Name +, +¿nFunùiÚ_E2SM_OID +), + +246 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +248 & +a¢_DEF_PršbËSŒšg +, + +250 { 0, & +a¢_PER_memb_¿nFunùiÚ_E2SM_OID_cÚ¡r_3 +, +memb_¿nFunùiÚ_E2SM_OID_cÚ¡¿št_1 + }, + +254 { +ATF_NOFLAGS +, 0, +off£tof +( +RANfunùiÚ_Name +, +¿nFunùiÚ_DesütiÚ +), + +255 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +257 & +a¢_DEF_PršbËSŒšg +, + +259 { 0, & +a¢_PER_memb_¿nFunùiÚ_DesütiÚ_cÚ¡r_4 +, +memb_¿nFunùiÚ_DesütiÚ_cÚ¡¿št_1 + }, + +263 { +ATF_POINTER +, 1, +off£tof +( +RANfunùiÚ_Name +, +¿nFunùiÚ_In¡ªû +), + +264 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +266 & +a¢_DEF_N©iveIÁeg” +, + +273 cÚ¡  + ga¢_MAP_RANfunùiÚ_Name_oms_1 +[] = { 3 }; + +274 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RANfunùiÚ_Name_gs_1 +[] = { + +275 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +277 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_RANfunùiÚ_Name_g2–_1 +[] = { + +278 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +279 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +280 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +281 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 } + +283 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_RANfunùiÚ_Name_¥ecs_1 + = { + +284 ( +RANfunùiÚ_Name +), + +285 +off£tof +( +RANfunùiÚ_Name +, +_a¢_ùx +), + +286 +a¢_MAP_RANfunùiÚ_Name_g2–_1 +, + +288 +a¢_MAP_RANfunùiÚ_Name_oms_1 +, + +292 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RANfunùiÚ_Name + = { + +295 & +a¢_OP_SEQUENCE +, + +296 +a¢_DEF_RANfunùiÚ_Name_gs_1 +, + +297 ( +a¢_DEF_RANfunùiÚ_Name_gs_1 +) + +298 /( +a¢_DEF_RANfunùiÚ_Name_gs_1 +[0]), + +299 +a¢_DEF_RANfunùiÚ_Name_gs_1 +, + +300 ( +a¢_DEF_RANfunùiÚ_Name_gs_1 +) + +301 /( +a¢_DEF_RANfunùiÚ_Name_gs_1 +[0]), + +302 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +303 +a¢_MBR_RANfunùiÚ_Name_1 +, + +305 & +a¢_SPC_RANfunùiÚ_Name_¥ecs_1 + + + @REAL.c + +5  + #_ISOC99_SOURCE + + + ) + +6 #iâdeà +_BSD_SOURCE + + +7  + #_BSD_SOURCE + + + ) + +9  + ~ + +10 #if +defšed +( +__®pha +) + +11  + ~ + +13  + ~<¡dlib.h +> + +14  + ~ + +15  + ~<æßt.h +> + +16  + ~<”ºo.h +> + +17  + ~ + +18  + ~ + +20 #undeà +INT_MAX + + +21  + #INT_MAX + (()((()-1è>> 1)) + + ) + +23 #if !( +defšed +( +NAN +è|| defšed( +INFINITY +)) + +24 vÞ©ž +»®_z”o + + gCC_NOTUSED + = 0.0; + +26 #iâdef +NAN + + +27  + #NAN + (0.0/0.0) + + ) + +29 #iâdef +INFINITY + + +30  + #INFINITY + (1.0/0.0) + + ) + +33 #ià +defšed +( +__þªg__ +) + +41 #´agm¨ +þªg + +dŸgno¡ic + +push + + +42 #´agm¨ +þªg + +dŸgno¡ic + +ignÜed + "-Wc11-extensions" + +43  + $a¢_i¢ª +( +d +) { + +44  + `i¢ª +( +d +); + +45 + } +} + +46  + $a¢_isfš™e +( +d +) { + +47 #ifdeà +isfš™e + + +48  + `isfš™e +( +d +); + +50  + `fš™e +( +d +); + +52 + } +} + +53 #´agm¨ +þªg + +dŸgno¡ic + +pÝ + + +55  + #a¢_i¢ª +( +v +è + `i¢ª +(v) + + ) + +56 #ifdeà +isfš™e + + +57  + #a¢_isfš™e +( +d +è + `isfš™e +(dè + + ) + +59  + #a¢_isfš™e +( +d +è + `fš™e +(dè + + ) + +66 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_REAL_gs +[] = { + +67 ( +ASN_TAG_CLASS_UNIVERSAL + | (9 << 2)) + +69 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_REAL + = { + +70 +ASN__PRIMITIVE_TYPE_ä“ +, + +71 +REAL_´št +, + +72 +REAL_com·» +, + +73 +b”_decode_´im™ive +, + +74 +d”_’code_´im™ive +, + +75 +REAL_decode_x” +, + +76 +REAL_’code_x” +, + +77 #ifdef +ASN_DISABLE_OER_SUPPORT + + +81 +REAL_decode_Ûr +, + +82 +REAL_’code_Ûr +, + +84 #ifdef +ASN_DISABLE_PER_SUPPORT + + +90 +REAL_decode_u³r +, + +91 +REAL_’code_u³r +, + +92 +REAL_decode_­” +, + +93 +REAL_’code_­” +, + +95 +REAL_¿ndom_fžl +, + +98 +a¢_TYPE_desütÜ_t + + ga¢_DEF_REAL + = { + +101 & +a¢_OP_REAL +, + +102 +a¢_DEF_REAL_gs +, + +103 ( +a¢_DEF_REAL_gs +) / (asn_DEF_REAL_tags[0]), + +104 +a¢_DEF_REAL_gs +, + +105 ( +a¢_DEF_REAL_gs +) / (asn_DEF_REAL_tags[0]), + +106 { 0, 0, +a¢_g’”ic_no_cÚ¡¿št + }, + +112  + e¥ecŸlR—lV®ue + { + +113 + mSRV__NOT_A_NUMBER +, + +114 + mSRV__MINUS_INFINITY +, + +115 + mSRV__PLUS_INFINITY + + +116 } + t¥ecŸlR—lV®ue_e +; + +117  + s¥ecŸlR—lV®ue_s + { + +118 * + m¡ršg +; + +119 +size_t + + mËngth +; + +120  + mdv +; + +121 } + g¥ecŸlR—lV®ue +[] = { + +122  + #SRV_SET +( +foo +, +v® +è{ foo, (fooè- 1, v® } + + ) + +123 +SRV_SET +("", 0), + +124 +SRV_SET +("", -1), + +125 +SRV_SET +("", 1), + +126 #undeà +SRV_SET + + +129 +ssize_t + + +130 + $REAL__dump +( +d +,  +ÿnÚiÿl +, +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +131  +loÿl_buf +[64]; + +132 * +buf + = +loÿl_buf +; + +133 +ssize_t + +buæ’ + = ( +loÿl_buf +); + +134 cÚ¡ * +fmt + = +ÿnÚiÿl + ? "%.17E" : "%.15f" ; + +135 +ssize_t + +»t +; + +141 if( + `a¢_i¢ª +( +d +)) { + +142 +buf + = +¥ecŸlR—lV®ue +[ +SRV__NOT_A_NUMBER +]. +¡ršg +; + +143 +buæ’ + = +¥ecŸlR—lV®ue +[ +SRV__NOT_A_NUMBER +]. +Ëngth +; + +144  ( + `cb +( +buf +, +buæ’ +, +­p_key +) < 0) ? -1 : buflen; + +145 } if(! + `a¢_isfš™e +( +d +)) { + +146 if( + `cÝysign +(1.0, +d +) < 0.0) { + +147 +buf + = +¥ecŸlR—lV®ue +[ +SRV__MINUS_INFINITY +]. +¡ršg +; + +148 +buæ’ + = +¥ecŸlR—lV®ue +[ +SRV__MINUS_INFINITY +]. +Ëngth +; + +150 +buf + = +¥ecŸlR—lV®ue +[ +SRV__PLUS_INFINITY +]. +¡ršg +; + +151 +buæ’ + = +¥ecŸlR—lV®ue +[ +SRV__PLUS_INFINITY +]. +Ëngth +; + +153  ( + `cb +( +buf +, +buæ’ +, +­p_key +) < 0) ? -1 : buflen; + +154 } if( + `žogb +( +d +è<ð- +INT_MAX +) { + +155 if( + `cÝysign +(1.0, +d +) < 0.0) { + +156 +buf + = "-0"; + +157 +buæ’ + = 2; + +159 +buf + = "0"; + +160 +buæ’ + = 1; + +162  ( + `cb +( +buf +, +buæ’ +, +­p_key +) < 0) ? -1 : buflen; + +169 +»t + = + `¢´štf +( +buf +, +buæ’ +, +fmt +, +d +); + +170 if( +»t + < 0) { + +172 +buæ’ + <<= 1; + +173 if( +buæ’ + > 4096) { + +175 if( +buf + !ð +loÿl_buf +è + `FREEMEM +(buf); + +178 } if( +»t + >ð +buæ’ +) { + +179 +buæ’ + = +»t + + 1; + +181 +buæ’ + = +»t +; + +184 if( +buf + !ð +loÿl_buf +è + `FREEMEM +(buf); + +185 +buf + = (*) + `MALLOC +( +buæ’ +); + +186 if(! +buf +)  -1; + +189 if( +ÿnÚiÿl +) { + +194 * +dÙ +; + +195 * +’d + = +buf + + +buæ’ +; + +196 * +Ï¡_z”o +; + +197 * +fœ¡_z”o_š_run +; + +198 * +s +; + +201 +LZSTATE_NOTHING +, + +202 +LZSTATE_ZEROES + + +203 } +lz_¡©e + = +LZSTATE_NOTHING +; + +205 +dÙ + = ( +buf +[0] == 0x2d ) ? (buf + 2) : (buf + 1); + +206 if(* +dÙ + >= 0x30) { + +207 if( +buf + !ð +loÿl_buf +è + `FREEMEM +(buf); + +208 +”ºo + = +EINVAL +; + +211 * +dÙ + = 0x2e; + +213  +fœ¡_z”o_š_run + = +Ï¡_z”o + = +s + = +dÙ + + 2; s < +’d +; s++) { + +214 * +s +) { + +216 if( +lz_¡©e + =ð +LZSTATE_ZEROES +è +Ï¡_z”o + = +fœ¡_z”o_š_run +; + +219 if( +lz_¡©e + =ð +LZSTATE_NOTHING +è +fœ¡_z”o_š_run + = +s +; + +220 +lz_¡©e + = +LZSTATE_ZEROES +; + +223 +lz_¡©e + = +LZSTATE_NOTHING +; + +229 if( +s + =ð +’d +) { + +230 if( +buf + !ð +loÿl_buf +è + `FREEMEM +(buf); + +231 +”ºo + = +EINVAL +; + +235 + `as£¹ +(* +s + == 0x45); + +237 * +E + = +s +; + +238 * +exµŒ + = ++ +E +; + +239 * +s + = +exµŒ +; + +240  +sign +; + +242 if(* +exµŒ + == 0x2b ) { + +244 +buæ’ + -= 1; + +245 +sign + = 0; + +247 +sign + = 1; + +248 +s +++; + +250 +exµŒ +++; + +251 if( +exµŒ + > +’d +) { + +252 if( +buf + !ð +loÿl_buf +è + `FREEMEM +(buf); + +253 +”ºo + = +EINVAL +; + +256 if(* +exµŒ + == 0x30) { + +257 +buæ’ +--; + +258 +exµŒ +++; + +260 if( +lz_¡©e + =ð +LZSTATE_ZEROES +) { + +261 * +Ï¡_z”o + = 0x45; + +262 +buæ’ + -ð +s + - ( +Ï¡_z”o + + 1); + +263 +s + = +Ï¡_z”o + + 1; + +264 if( +sign +) { + +265 * +s +++ = 0x2d ; + +266 +buæ’ +++; + +269 ; +exµŒ + <ð +’d +; +s +++,ƒxpptr++) + +270 * +s + = * +exµŒ +; + +276 * +’d + = +buf + + +buæ’ +; + +277 * +Ï¡_z”o + = +’d +; + +278  +¡Ýlookšg + = 0; + +279 * +z +; + +280  +z + = +’d + - 1; z > +buf +; z--) { + +281 * +z +) { + +283 if(! +¡Ýlookšg +) + +284 +Ï¡_z”o + = +z +; + +288 +¡Ýlookšg + = 1; + +295 * +z + = 0x2e; + +296 if( +Ï¡_z”o + =ð +z + + 1) { + +297 +Ï¡_z”o +++; + +299 +buæ’ + = +Ï¡_z”o + - +buf +; + +300 * +Ï¡_z”o + = '\0'; + +307 +»t + = + `cb +( +buf +, +buæ’ +, +­p_key +); + +308 if( +buf + !ð +loÿl_buf +è + `FREEMEM +(buf); + +309  ( +»t + < 0è? -1 : +buæ’ +; + +310 + } +} + +313 + $REAL_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +314 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +315 cÚ¡ +REAL_t + * +¡ + = (cÚ¡ REAL_ˆ*) +¥Œ +; + +316 +ssize_t + +»t +; + +317  +d +; + +319 () +td +; + +320 () +žev– +; + +322 if(! +¡ + || !¡-> +buf +) + +323 +»t + = + `cb +("", 8, +­p_key +); + +324 if( + `a¢_REAL2doubË +( +¡ +, & +d +)) + +325 +»t + = + `cb +("<”rÜ>", 7, +­p_key +); + +327 +»t + = + `REAL__dump +( +d +, 0, +cb +, +­p_key +); + +329  ( +»t + < 0) ? -1 : 0; + +330 + } +} + +333 + $REAL_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +334 cÚ¡ * +b±r +) { + +335 cÚ¡ +REAL_t + * +a + = +­Œ +; + +336 cÚ¡ +REAL_t + * +b + = +b±r +; + +338 () +td +; + +340 if( +a + && +b +) { + +341  +adbl +, +bdbl +; + +342  +¿ +, +rb +; + +343 +¿ + = + `a¢_REAL2doubË +( +a +, & +adbl +); + +344 +rb + = + `a¢_REAL2doubË +( +b +, & +bdbl +); + +345 if( +¿ + =ð0 && +rb + == 0) { + +346 if( + `a¢_i¢ª +( +adbl +)) { + +347 if( + `a¢_i¢ª +( +bdbl +)) { + +352 } if( + `a¢_i¢ª +( +bdbl +)) { + +356 if( +adbl + < +bdbl +) { + +358 } if( +adbl + > +bdbl +) { + +363 } if( +¿ +) { + +368 } if(! +a +) { + +373 + } +} + +375 +a¢_’c_rv®_t + + +376 + $REAL_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +377 +x”_’cod”_æags_e + +æags +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +378 * +­p_key +) { + +379 cÚ¡ +REAL_t + * +¡ + = (cÚ¡ REAL_ˆ*) +¥Œ +; + +380 +a¢_’c_rv®_t + +” + = {0,0,0}; + +381  +d +; + +383 () +žev– +; + +385 if(! +¡ + || !¡-> +buf + || + `a¢_REAL2doubË +(¡, & +d +)) + +386 +ASN__ENCODE_FAILED +; + +388 +” +. +’coded + = + `REAL__dump +( +d +, +æags + & +XER_F_CANONICAL +, +cb +, +­p_key +); + +389 if( +” +. +’coded + < 0è +ASN__ENCODE_FAILED +; + +391 + `ASN__ENCODED_OK +( +” +); + +392 + } +} + +398  +x”_pbd_rv® + + +399 + $REAL__x”_body_decode +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +400 cÚ¡ * +chunk_buf +, +size_t + +chunk_size +) { + +401 +REAL_t + * +¡ + = (REAL_ˆ*) +¥Œ +; + +402  +v®ue +; + +403 cÚ¡ * +x”d©a + = (cÚ¡ *) +chunk_buf +; + +404 * +’d±r + = 0; + +405 * +b +; + +407 () +td +; + +409 if(! +chunk_size +è +XPBD_BROKEN_ENCODING +; + +414 if( +x”d©a +[0] == 0x3c ) { + +415 +size_t + +i +; + +416  +i + = 0; i < ( +¥ecŸlR—lV®ue +) + +417 / ( +¥ecŸlR—lV®ue +[0]); +i +++) { + +418  +¥ecŸlR—lV®ue_s + * +¤v + = & +¥ecŸlR—lV®ue +[ +i +]; + +419  +dv +; + +421 if( +¤v +-> +Ëngth + !ð +chunk_size + + +422 || + `memcmp +( +¤v +-> +¡ršg +, +chunk_buf +, +chunk_size +)) + +430  +¤v +-> +dv +) { + +431 -1: +dv + = - +INFINITY +; ; + +432 0: +dv + = +NAN +; ; + +433 1: +dv + = +INFINITY +; ; + +434 :  +XPBD_SYSTEM_FAILURE +; + +437 if( + `a¢_doubË2REAL +( +¡ +, +dv +)) + +438  +XPBD_SYSTEM_FAILURE +; + +440  +XPBD_BODY_CONSUMED +; + +442 + `ASN_DEBUG +("Unknown XMLSpecialRealValue"); + +443  +XPBD_BROKEN_ENCODING +; + +449 +b + = (*) + `MALLOC +( +chunk_size + + 1); + +450 if(! +b +è +XPBD_SYSTEM_FAILURE +; + +451 + `memýy +( +b +, +chunk_buf +, +chunk_size +); + +452 +b +[ +chunk_size +] = 0; + +454 +v®ue + = + `¡¹od +( +b +, & +’d±r +); + +455 + `FREEMEM +( +b +); + +456 if( +’d±r + =ð +b +è +XPBD_BROKEN_ENCODING +; + +458 if( + `a¢_doubË2REAL +( +¡ +, +v®ue +)) + +459  +XPBD_SYSTEM_FAILURE +; + +461  +XPBD_BODY_CONSUMED +; + +462 + } +} + +464 +a¢_dec_rv®_t + + +465 + $REAL_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +466 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +467 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +) { + +468  + `x”_decode_´im™ive +( +Ýt_codec_ùx +, +td +, + +469 +¥Œ +, ( +REAL_t +), +Ýt_mÇme +, + +470 +buf_±r +, +size +, +REAL__x”_body_decode +); + +471 + } +} + +474 + $a¢_REAL2doubË +(cÚ¡ +REAL_t + * +¡ +, * +dbl_v®ue +) { + +475  +oùv +; + +477 if(! +¡ + || !¡-> +buf +) { + +478 +”ºo + = +EINVAL +; + +482 if( +¡ +-> +size + == 0) { + +483 * +dbl_v®ue + = 0; + +487 +oùv + = +¡ +-> +buf +[0]; + +489  +oùv + & 0xC0) { + +498  +¡ +-> +buf +[0]) { + +500 * +dbl_v®ue + = +INFINITY +; + +503 * +dbl_v®ue + = - +INFINITY +; + +506 * +dbl_v®ue + = +NAN +; + +509 * +dbl_v®ue + = -0.0; + +513 +”ºo + = +EINVAL +; + +522  +d +; + +523 * +sourû + = 0; + +524 * +’d±r +; + +525  +u£d_m®loc + = 0; + +527 if( +oùv + == 0 || (octv & 0x3C)) { + +529 +”ºo + = +EINVAL +; + +539 if( +¡ +-> +buf +[¡-> +size +] !ð'\0' || + `memchr +(st->buf, ',', st->size)) { + +540 cÚ¡ +ušt8_t + * +p +, * +’d +; + +541 * +b +; + +543 +b + = +sourû + = (*) + `MALLOC +( +¡ +-> +size + + 1); + +544 if(! +sourû +)  -1; + +545 +u£d_m®loc + = 1; + +548  +p + = +¡ +-> +buf + + 1, +’d + = st->buà+ st-> +size +; + +549 +p + < +’d +; +b +++,…++) + +550 * +b + = (* +p + == ',') ? '.' : *p; + +551 * +b + = '\0'; + +553 +sourû + = (*)& +¡ +-> +buf +[1]; + +556 +’d±r + = +sourû +; + +557 +d + = + `¡¹od +( +sourû +, & +’d±r +); + +558 if(* +’d±r + != '\0') { + +560 if( +u£d_m®loc +è + `FREEMEM +( +sourû +); + +561 +”ºo + = +EINVAL +; + +564 if( +u£d_m®loc +è + `FREEMEM +( +sourû +); + +565 if( + `a¢_isfš™e +( +d +)) { + +566 * +dbl_v®ue + = +d +; + +569 +”ºo + = +ERANGE +; + +579  +m +; + +580 +št32_t + +expv® +; + +581  +–’ +; + +582  +sÿËF +; + +583  +ba£F +; + +584 +ušt8_t + * +±r +; + +585 +ušt8_t + * +’d +; + +586  +sign +; + +588 ( +oùv + & 0x30) >> 4) { + +589 0x00: +ba£F + = 1; ; + +590 0x01: +ba£F + = 3; ; + +591 0x02: +ba£F + = 4; ; + +594 +”ºo + = +EINVAL +; + +598 +sign + = ( +oùv + & 0x40); + +599 +sÿËF + = ( +oùv + & 0x0C) >> 2; + +601 if( +¡ +-> +size + <ð1 + ( +oùv + & 0x03)) { + +602 +”ºo + = +EINVAL +; + +606 +–’ + = ( +oùv + & 0x03); + +607 if( +–’ + == 0x03) { + +608 +–’ + = +¡ +-> +buf +[1]; + +609 if( +–’ + =ð0 || +¡ +-> +size + <= (2 +ƒlen)) { + +610 +”ºo + = +EINVAL +; + +614 +±r + = & +¡ +-> +buf +[2]; + +616 +±r + = & +¡ +-> +buf +[1]; + +620 +expv® + = ()(*( +št8_t + *) +±r +); + +621 if( +–’ + >ð( +expv® +)-1) { + +622 +”ºo + = +ERANGE +; + +625 +’d + = +±r + + +–’ + + 1; + +626  +±r +++;…Œ < +’d +;…tr++) + +627 +expv® + = (expv® * 256è+ * +±r +; + +629 +m + = 0.0; + +632 +’d + = +¡ +-> +buf + + st-> +size +; + +633 ; +±r + < +’d +;…tr++) + +634 +m + = + `ldexp +(m, 8è+ * +±r +; + +637 + `ASN_DEBUG +("m=%.10f, scF=%d, bF=%d,ƒxpval=%d,†dexp()=%f,†dexp()=%f\n", + +638 +m +, +sÿËF +, +ba£F +, +expv® +, + +639 + `ldexp +( +m +, +expv® + * +ba£F + + +sÿËF +), + +640 + `ldexp +( +m +, +sÿËF +è* + `pow +Õow(2, +ba£F +), +expv® +) + +648 +m + = + `ldexp +(m, +expv® + * +ba£F + + +sÿËF +); + +649 if( + `a¢_isfš™e +( +m +)) { + +650 * +dbl_v®ue + = +sign + ? - +m + : m; + +652 +”ºo + = +ERANGE +; + +659 + } +} + +666 + $a¢_doubË2REAL +( +REAL_t + * +¡ +,  +dbl_v®ue +) { + +667  +‹¡ + = -0.0; + +668  +æßt_big_’dŸn + = *(cÚ¡ *)& +‹¡ + != 0; + +669 +ušt8_t + +buf +[16]; + +670 +ušt8_t + +dsü +[( +dbl_v®ue +)]; + +672  +as£¹iÚ_bufãr1 +[9 - ( +dbl_v®ue +)] +CC_NOTUSED +; + +673  +as£¹iÚ_bufãr2 +[( +dbl_v®ue +è- 7] +CC_NOTUSED +; + +674 +ušt8_t + * +±r + = +buf +; + +675 +ušt8_t + * +m¡Ý +; + +676  +mv® +; + +677  +bmsign +; + +678  +buæ’ +; + +679  +accum +; + +680  +expv® +; + +682 if(! +¡ +) { + +683 +”ºo + = +EINVAL +; + +692 +expv® + = + `žogb +( +dbl_v®ue +); + +693 if( +expv® + <ð- +INT_MAX + + +694 || +expv® + =ð +INT_MAX + + +696 if(! +¡ +-> +buf + || st-> +size + < 2) { + +697 +±r + = ( +ušt8_t + *) + `MALLOC +(2); + +698 if(! +±r +)  -1; + +699 if( +¡ +-> +buf +è + `FREEMEM +(st->buf); + +700 +¡ +-> +buf + = +±r +; + +703 if( + `a¢_i¢ª +( +dbl_v®ue +)) { + +704 +¡ +-> +buf +[0] = 0x42; + +705 +¡ +-> +buf +[1] = 0; + +706 +¡ +-> +size + = 1; + +707 } if(! + `a¢_isfš™e +( +dbl_v®ue +)) { + +708 if( + `cÝysign +(1.0, +dbl_v®ue +) < 0.0) { + +709 +¡ +-> +buf +[0] = 0x41; + +711 +¡ +-> +buf +[0] = 0x40; + +713 +¡ +-> +buf +[1] = 0; + +714 +¡ +-> +size + = 1; + +716 if( + `cÝysign +(1.0, +dbl_v®ue +) >= 0.0) { + +718 +¡ +-> +buf +[0] = 0; + +719 +¡ +-> +size + = 0; + +722 +¡ +-> +buf +[0] = 0x43; + +723 +¡ +-> +buf +[1] = 0; + +724 +¡ +-> +size + = 1; + +730 if( +æßt_big_’dŸn +) { + +731 +ušt8_t + * +s + = ((ušt8_ˆ*)& +dbl_v®ue +) + 1; + +732 +ušt8_t + * +’d + = ((ušt8_ˆ*)& +dbl_v®ue +) + (); + +733 +ušt8_t + * +d +; + +735 +bmsign + = 0x80 | (( +s +[-1] >> 1) & 0x40); + +736  +m¡Ý + = +d + = +dsü +; +s + < +’d +; d++, s++) { + +737 * +d + = * +s +; + +738 if(* +d +è +m¡Ý + = d; + +741 +ušt8_t + * +s + = ((ušt8_ˆ*)& +dbl_v®ue +) + (dbl_value) - 2; + +742 +ušt8_t + * +¡¬t + = ((ušt8_ˆ*)& +dbl_v®ue +); + +743 +ušt8_t + * +d +; + +745 +bmsign + = 0x80 | (( +s +[1] >> 1) & 0x40); + +746  +m¡Ý + = +d + = +dsü +; +s + >ð +¡¬t +; d++, s--) { + +747 * +d + = * +s +; + +748 if(* +d +è +m¡Ý + = d; + +753 +dsü +[0] = 0x10 | (dscr[0] & 0x0f); + +756 +expv® + -ð8 * (( +m¡Ý + - +dsü +) + 1) - 4; + +759 +mv® + = * +m¡Ý +; + +760 if( +mv® + && !(mval & 1)) { + +761  +shiá_couÁ + = 1; + +762  +ishiá +; + +763 +ušt8_t + * +m±r +; + +768 if(!( +mv® + & 0x0f)) + +769 +shiá_couÁ + = 4; + +770 (( +mv® + >> +shiá_couÁ +) & 1) == 0) + +771 +shiá_couÁ +++; + +773 +ishiá + = 8 - +shiá_couÁ +; + +774 +accum + = 0; + +777  +m±r + = +dsü +; m±¸<ð +m¡Ý +; mptr++) { + +778 +mv® + = * +m±r +; + +779 * +m±r + = +accum + | ( +mv® + >> +shiá_couÁ +); + +780 +accum + = +mv® + << +ishiá +; + +784 +expv® + +ð +shiá_couÁ +; + +787 if( +expv® + < 0) { + +788 if(( +expv® + >> 7) == -1) { + +789 * +±r +++ = +bmsign + | 0x00; + +790 * +±r +++ = +expv® +; + +791 } if(( +expv® + >> 15) == -1) { + +792 * +±r +++ = +bmsign + | 0x01; + +793 * +±r +++ = +expv® + >> 8; + +794 * +±r +++ = +expv® +; + +796 * +±r +++ = +bmsign + | 0x02; + +797 * +±r +++ = +expv® + >> 16; + +798 * +±r +++ = +expv® + >> 8; + +799 * +±r +++ = +expv® +; + +801 } if( +expv® + <= 0x7f) { + +802 * +±r +++ = +bmsign + | 0x00; + +803 * +±r +++ = +expv® +; + +804 } if( +expv® + <= 0x7fff) { + +805 * +±r +++ = +bmsign + | 0x01; + +806 * +±r +++ = +expv® + >> 8; + +807 * +±r +++ = +expv® +; + +809 + `as£¹ +( +expv® + <= 0x7fffff); + +810 * +±r +++ = +bmsign + | 0x02; + +811 * +±r +++ = +expv® + >> 16; + +812 * +±r +++ = +expv® + >> 8; + +813 * +±r +++ = +expv® +; + +816 +buæ’ + = ( +m¡Ý + - +dsü +) + 1; + +817 + `memýy +( +±r +, +dsü +, +buæ’ +); + +818 +±r + +ð +buæ’ +; + +819 +buæ’ + = +±r + - +buf +; + +821 +±r + = ( +ušt8_t + *) + `MALLOC +( +buæ’ + + 1); + +822 if(! +±r +)  -1; + +824 + `memýy +( +±r +, +buf +, +buæ’ +); + +825 +buf +[ +buæ’ +] = 0; + +827 if( +¡ +-> +buf +è + `FREEMEM +(st->buf); + +828 +¡ +-> +buf + = +±r +; + +829 +¡ +-> +size + = +buæ’ +; + +832 + } +} + +834  +CC_ATTR_NO_SANITIZE +("float-cast-overflow") + +835 + $a¢_doubË2æßt +( +d +, * +outcome +) { + +836  +f + = +d +; + +838 * +outcome + = +f +; + +840 if( + `a¢_isfš™e +( +d +è=ða¢_isfš™e( +f +)) { + +845 + } +} + +847 #iâdeà +ASN_DISABLE_OER_SUPPORT + + +852 +a¢_’c_rv®_t + + +853 + $REAL_’code_Ûr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +854 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +855 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +856 cÚ¡ +REAL_t + * +¡ + = +¥Œ +; + +857 +a¢_’c_rv®_t + +” + = {0,0,0}; + +858 +ssize_t + +Ën_Ën +; + +860 if(! +¡ + || !¡-> +buf + || ! +td +) + +861 +ASN__ENCODE_FAILED +; + +863 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +Ûr_cÚ¡¿šts +; + +864 if( +cÚ¡¿šts + && cÚ¡¿šts-> +v®ue +. +width + != 0) { + +867 +ASN__ENCODE_FAILED +; + +871 +Ën_Ën + = + `Ûr_£rŸlize_Ëngth +( +¡ +-> +size +, +cb +, +­p_key +); + +872 if( +Ën_Ën + < 0 || + `cb +( +¡ +-> +buf +, st-> +size +, +­p_key +) < 0) { + +873 +ASN__ENCODE_FAILED +; + +875 +” +. +’coded + = +Ën_Ën + + +¡ +-> +size +; + +876 + `ASN__ENCODED_OK +( +” +); + +878 + } +} + +880 +a¢_dec_rv®_t + + +881 + $REAL_decode_Ûr +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +882 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +883 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +884 cÚ¡ * +±r +, +size_t + +size +) { + +885 +a¢_dec_rv®_t + +ok + = { +RC_OK +, 0}; + +886 +REAL_t + * +¡ +; + +887 +ušt8_t + * +buf +; + +888 +ssize_t + +Ën_Ën +; + +889 +size_t + +»®_body_Ën +; + +891 () +Ýt_codec_ùx +; + +893 if(! +cÚ¡¿šts +ècÚ¡¿št ð +td +-> +’codšg_cÚ¡¿šts +. +Ûr_cÚ¡¿šts +; + +894 if( +cÚ¡¿šts + && cÚ¡¿šts-> +v®ue +. +width + != 0) { + +897 +ASN__DECODE_FAILED +; + +900 +Ën_Ën + = + `Ûr_ãtch_Ëngth +( +±r +, +size +, & +»®_body_Ën +); + +901 if( +Ën_Ën + < 0è +ASN__DECODE_FAILED +; + +902 if( +Ën_Ën + =ð0è +ASN__DECODE_STARVED +; + +904 +±r + = (cÚ¡ *íŒ + +Ën_Ën +; + +905 +size + -ð +Ën_Ën +; + +907 if( +»®_body_Ën + > +size +è +ASN__DECODE_STARVED +; + +909 +buf + = + `CALLOC +(1, +»®_body_Ën + + 1); + +910 if(! +buf +è +ASN__DECODE_FAILED +; + +912 if(!( +¡ + = * +¥Œ +)) { + +913 +¡ + = (* +¥Œ + = + `CALLOC +(1, ( +REAL_t +))); + +914 if(! +¡ +) { + +915 + `FREEMEM +( +buf +); + +916 +ASN__DECODE_FAILED +; + +919 + `FREEMEM +( +¡ +-> +buf +); + +922 + `memýy +( +buf +, +±r +, +»®_body_Ën +); + +923 +buf +[ +»®_body_Ën +] = '\0'; + +925 +¡ +-> +buf + = buf; + +926 +¡ +-> +size + = +»®_body_Ën +; + +928 +ok +. +cÚsumed + = +Ën_Ën + + +»®_body_Ën +; + +929  +ok +; + +930 + } +} + +934 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +936 +a¢_dec_rv®_t + + +937 + $REAL_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +938 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +939 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +940 +a¢_³r_d©a_t + * +pd +) { + +941 () +cÚ¡¿šts +; + +942  + `OCTET_STRING_decode_u³r +( +Ýt_codec_ùx +, +td +, 0, +¥Œ +, +pd +); + +943 + } +} + +945 +a¢_’c_rv®_t + + +946 + $REAL_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +947 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +948 +a¢_³r_ou_t + * +po +) { + +949 () +cÚ¡¿šts +; + +950  + `OCTET_STRING_’code_u³r +( +td +, 0, +¥Œ +, +po +); + +951 + } +} + +953 +a¢_dec_rv®_t + + +954 + $REAL_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +955 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +956 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +957 ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +958 () +cÚ¡¿šts +; + +959  + `OCTET_STRING_decode_­” +( +Ýt_codec_ùx +, +td +, 0, +¥Œ +, +pd +); + +960 + } +} + +962 +a¢_’c_rv®_t + + +963 + $REAL_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +964 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +965 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +966 () +cÚ¡¿šts +; + +967  + `OCTET_STRING_’code_­” +( +td +, 0, +¥Œ +, +po +); + +968 + } +} + +972 +a¢_¿ndom_fžl_»suÉ_t + + +973 + $REAL_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +974 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +975 +size_t + +max_Ëngth +) { + +976 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 1}; + +977 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +978 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +979 cÚ¡  +v®ues +[] = { + +980 0, -0.0, -1, 1, - +M_E +, M_E, -3.14, 3.14, - +M_PI +, M_PI, -255, 255, + +987 - +FLT_MIN +, FLT_MIN, + +988 - +FLT_MAX +, FLT_MAX, + +989 - +DBL_MIN +, DBL_MIN, + +990 - +DBL_MAX +, DBL_MAX, + +991 #ifdeà +FLT_TRUE_MIN + + +992 - +FLT_TRUE_MIN +, FLT_TRUE_MIN, + +994 #ifdeà +DBL_TRUE_MIN + + +995 - +DBL_TRUE_MIN +, DBL_TRUE_MIN, + +997 +INFINITY +, -INFINITY, +NAN +}; + +998 +REAL_t + * +¡ +; + +999  +d +; + +1001 () +cÚ¡¿šts +; + +1003 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +1005 +d + = +v®ues +[ + `a¢_¿ndom_b‘w“n +(0, (values) / (values[0]) - 1)]; + +1007 if(* +¥Œ +) { + +1008 +¡ + = * +¥Œ +; + +1010 +¡ + = ( +REAL_t +*)(* +¥Œ + = + `CALLOC +(1, (REAL_t))); + +1011 if(! +¡ +) { + +1012  +»suÉ_çžed +; + +1016 if( + `a¢_doubË2REAL +( +¡ +, +d +)) { + +1017 if( +¡ + =ð* +¥Œ +) { + +1018 + `ASN_STRUCT_RESET +(* +td +, +¡ +); + +1020 + `ASN_STRUCT_FREE +(* +td +, +¡ +); + +1022  +»suÉ_çžed +; + +1025 +»suÉ_ok +. +Ëngth + = +¡ +-> +size +; + +1026  +»suÉ_ok +; + +1027 + } +} + + @RIC-EventTriggerStyle-Item.c + +8  + ~"RIC-Ev’tTrigg”StyË-I‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_RIC_Ev’tTrigg”StyË_I‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_Ev’tTrigg”StyË_I‹m +, +ric_Ev’tTrigg”StyË_Ty³ +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_RIC_StyË_Ty³ +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_Ev’tTrigg”StyË_I‹m +, +ric_Ev’tTrigg”StyË_Name +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_RIC_StyË_Name +, + +29 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_Ev’tTrigg”StyË_I‹m +, +ric_Ev’tTrigg”FÜm©_Ty³ +), + +30 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +32 & +a¢_DEF_RIC_FÜm©_Ty³ +, + +39 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RIC_Ev’tTrigg”StyË_I‹m_gs_1 +[] = { + +40 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +42 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_RIC_Ev’tTrigg”StyË_I‹m_g2–_1 +[] = { + +43 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +44 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +47 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_RIC_Ev’tTrigg”StyË_I‹m_¥ecs_1 + = { + +48 ( +RIC_Ev’tTrigg”StyË_I‹m +), + +49 +off£tof +( +RIC_Ev’tTrigg”StyË_I‹m +, +_a¢_ùx +), + +50 +a¢_MAP_RIC_Ev’tTrigg”StyË_I‹m_g2–_1 +, + +55 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RIC_Ev’tTrigg”StyË_I‹m + = { + +58 & +a¢_OP_SEQUENCE +, + +59 +a¢_DEF_RIC_Ev’tTrigg”StyË_I‹m_gs_1 +, + +60 ( +a¢_DEF_RIC_Ev’tTrigg”StyË_I‹m_gs_1 +) + +61 /( +a¢_DEF_RIC_Ev’tTrigg”StyË_I‹m_gs_1 +[0]), + +62 +a¢_DEF_RIC_Ev’tTrigg”StyË_I‹m_gs_1 +, + +63 ( +a¢_DEF_RIC_Ev’tTrigg”StyË_I‹m_gs_1 +) + +64 /( +a¢_DEF_RIC_Ev’tTrigg”StyË_I‹m_gs_1 +[0]), + +65 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +66 +a¢_MBR_RIC_Ev’tTrigg”StyË_I‹m_1 +, + +68 & +a¢_SPC_RIC_Ev’tTrigg”StyË_I‹m_¥ecs_1 + + + @RIC-Format-Type.c + +8  + ~"RIC-FÜm©-Ty³.h +" + +14 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RIC_FÜm©_Ty³_gs_1 +[] = { + +15 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +17 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RIC_FÜm©_Ty³ + = { + +20 & +a¢_OP_N©iveIÁeg” +, + +21 +a¢_DEF_RIC_FÜm©_Ty³_gs_1 +, + +22 ( +a¢_DEF_RIC_FÜm©_Ty³_gs_1 +) + +23 /( +a¢_DEF_RIC_FÜm©_Ty³_gs_1 +[0]), + +24 +a¢_DEF_RIC_FÜm©_Ty³_gs_1 +, + +25 ( +a¢_DEF_RIC_FÜm©_Ty³_gs_1 +) + +26 /( +a¢_DEF_RIC_FÜm©_Ty³_gs_1 +[0]), + +27 { 0, 0, +N©iveIÁeg”_cÚ¡¿št + }, + + @RIC-ReportStyle-Item.c + +8  + ~"RIC-R•ÜtStyË-I‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_RIC_R•ÜtStyË_I‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_R•ÜtStyË_I‹m +, +ric_R•ÜtStyË_Ty³ +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_RIC_StyË_Ty³ +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_R•ÜtStyË_I‹m +, +ric_R•ÜtStyË_Name +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_RIC_StyË_Name +, + +29 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_R•ÜtStyË_I‹m +, +ric_AùiÚFÜm©_Ty³ +), + +30 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +32 & +a¢_DEF_RIC_FÜm©_Ty³ +, + +38 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_R•ÜtStyË_I‹m +, +m—sInfo_AùiÚ_Li¡ +), + +39 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +41 & +a¢_DEF_M—su»m’tInfo_AùiÚ_Li¡ +, + +47 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_R•ÜtStyË_I‹m +, +ric_IndiÿtiÚH—d”FÜm©_Ty³ +), + +48 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +50 & +a¢_DEF_RIC_FÜm©_Ty³ +, + +56 { +ATF_NOFLAGS +, 0, +off£tof +( +RIC_R•ÜtStyË_I‹m +, +ric_IndiÿtiÚMes§geFÜm©_Ty³ +), + +57 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +59 & +a¢_DEF_RIC_FÜm©_Ty³ +, + +66 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RIC_R•ÜtStyË_I‹m_gs_1 +[] = { + +67 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +69 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_RIC_R•ÜtStyË_I‹m_g2–_1 +[] = { + +70 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +71 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +72 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +73 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +74 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +75 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 } + +77 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_RIC_R•ÜtStyË_I‹m_¥ecs_1 + = { + +78 ( +RIC_R•ÜtStyË_I‹m +), + +79 +off£tof +( +RIC_R•ÜtStyË_I‹m +, +_a¢_ùx +), + +80 +a¢_MAP_RIC_R•ÜtStyË_I‹m_g2–_1 +, + +85 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RIC_R•ÜtStyË_I‹m + = { + +88 & +a¢_OP_SEQUENCE +, + +89 +a¢_DEF_RIC_R•ÜtStyË_I‹m_gs_1 +, + +90 ( +a¢_DEF_RIC_R•ÜtStyË_I‹m_gs_1 +) + +91 /( +a¢_DEF_RIC_R•ÜtStyË_I‹m_gs_1 +[0]), + +92 +a¢_DEF_RIC_R•ÜtStyË_I‹m_gs_1 +, + +93 ( +a¢_DEF_RIC_R•ÜtStyË_I‹m_gs_1 +) + +94 /( +a¢_DEF_RIC_R•ÜtStyË_I‹m_gs_1 +[0]), + +95 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +96 +a¢_MBR_RIC_R•ÜtStyË_I‹m_1 +, + +98 & +a¢_SPC_RIC_R•ÜtStyË_I‹m_¥ecs_1 + + + @RIC-Style-Name.c + +8  + ~"RIC-StyË-Name.h +" + +10 cÚ¡  + g³rm™‹d_®phab‘_bË_1 +[256] = { + +20 cÚ¡  + g³rm™‹d_®phab‘_code2v®ue_1 +[74] = { + +28  + $check_³rm™‹d_®phab‘_1 +(cÚ¡ * +¥Œ +) { + +29 cÚ¡ * +bË + = +³rm™‹d_®phab‘_bË_1 +; + +31 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +32 cÚ¡ +ušt8_t + * +ch + = +¡ +-> +buf +; + +33 cÚ¡ +ušt8_t + * +’d + = +ch + + +¡ +-> +size +; + +35 ; +ch + < +’d +; ch++) { + +36 +ušt8_t + +cv + = * +ch +; + +37 if(! +bË +[ +cv +])  -1; + +40 + } +} + +43 + $RIC_StyË_Name_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +44 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +45 cÚ¡ +PršbËSŒšg_t + * +¡ + = (cÚ¡ PršbËSŒšg_ˆ*) +¥Œ +; + +46 +size_t + +size +; + +48 if(! +¥Œ +) { + +49 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +51 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +55 +size + = +¡ +->size; + +57 if(( +size + >= 1 && size <= 150) + +58 && ! + `check_³rm™‹d_®phab‘_1 +( +¡ +)) { + +62 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +64 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +67 + } +} + +69  + $a¢_PER_MAP_RIC_StyË_Name_1_v2c +( +v®ue +) { + +70 if( +v®ue + >ð( +³rm™‹d_®phab‘_bË_1 +)/(permitted_alphabet_table_1[0])) + +72  +³rm™‹d_®phab‘_bË_1 +[ +v®ue +] - 1; + +73 + } +} + +74  + $a¢_PER_MAP_RIC_StyË_Name_1_c2v +( +code +) { + +75 if( +code + >ð( +³rm™‹d_®phab‘_code2v®ue_1 +)/(permitted_alphabet_code2value_1[0])) + +77  +³rm™‹d_®phab‘_code2v®ue_1 +[ +code +]; + +78 + } +} + +83 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_RIC_StyË_Name_cÚ¡r_1 + + gCC_NOTUSED + = { + +84 { +APC_CONSTRAINED +, 7, 7, 32, 122 } , + +85 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 8, 8, 1, 150 } , + +86 +a¢_PER_MAP_RIC_StyË_Name_1_v2c +, + +87 +a¢_PER_MAP_RIC_StyË_Name_1_c2v + + +89 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RIC_StyË_Name_gs_1 +[] = { + +90 ( +ASN_TAG_CLASS_UNIVERSAL + | (19 << 2)) + +92 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RIC_StyË_Name + = { + +95 & +a¢_OP_PršbËSŒšg +, + +96 +a¢_DEF_RIC_StyË_Name_gs_1 +, + +97 ( +a¢_DEF_RIC_StyË_Name_gs_1 +) + +98 /( +a¢_DEF_RIC_StyË_Name_gs_1 +[0]), + +99 +a¢_DEF_RIC_StyË_Name_gs_1 +, + +100 ( +a¢_DEF_RIC_StyË_Name_gs_1 +) + +101 /( +a¢_DEF_RIC_StyË_Name_gs_1 +[0]), + +102 { 0, & +a¢_PER_ty³_RIC_StyË_Name_cÚ¡r_1 +, +RIC_StyË_Name_cÚ¡¿št + }, + + @RIC-Style-Type.c + +8  + ~"RIC-StyË-Ty³.h +" + +14 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RIC_StyË_Ty³_gs_1 +[] = { + +15 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +17 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RIC_StyË_Ty³ + = { + +20 & +a¢_OP_N©iveIÁeg” +, + +21 +a¢_DEF_RIC_StyË_Ty³_gs_1 +, + +22 ( +a¢_DEF_RIC_StyË_Ty³_gs_1 +) + +23 /( +a¢_DEF_RIC_StyË_Ty³_gs_1 +[0]), + +24 +a¢_DEF_RIC_StyË_Ty³_gs_1 +, + +25 ( +a¢_DEF_RIC_StyË_Ty³_gs_1 +) + +26 /( +a¢_DEF_RIC_StyË_Ty³_gs_1 +[0]), + +27 { 0, 0, +N©iveIÁeg”_cÚ¡¿št + }, + + @RRC-MessageID.c + +8  + ~"RRC-Mes§geID.h +" + +10  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_¼cTy³_cÚ¡r_2 + + gCC_NOTUSED + = { + +11 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +15  +a¢_TYPE_memb”_t + + ga¢_MBR_¼cTy³_2 +[] = { + +16 { +ATF_NOFLAGS +, 0, +off£tof +( +RRC_Mes§geID__¼cTy³ +, +choiû +. +lTE +), + +17 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +19 & +a¢_DEF_RRCþass_LTE +, + +25 { +ATF_NOFLAGS +, 0, +off£tof +( +RRC_Mes§geID__¼cTy³ +, +choiû +. +nR +), + +26 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +28 & +a¢_DEF_RRCþass_NR +, + +35 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_¼cTy³_g2–_2 +[] = { + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +37 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +39  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_¼cTy³_¥ecs_2 + = { + +40 ( +RRC_Mes§geID__¼cTy³ +), + +41 +off£tof +( +RRC_Mes§geID__¼cTy³ +, +_a¢_ùx +), + +42 +off£tof +( +RRC_Mes§geID__¼cTy³ +, +´e£Á +), + +43 ((( +RRC_Mes§geID__¼cTy³ + *)0)-> +´e£Á +), + +44 +a¢_MAP_¼cTy³_g2–_2 +, + +50 +a¢_TYPE_desütÜ_t + + ga¢_DEF_¼cTy³_2 + = { + +53 & +a¢_OP_CHOICE +, + +58 { 0, & +a¢_PER_ty³_¼cTy³_cÚ¡r_2 +, +CHOICE_cÚ¡¿št + }, + +59 +a¢_MBR_¼cTy³_2 +, + +61 & +a¢_SPC_¼cTy³_¥ecs_2 + + +64  +a¢_TYPE_memb”_t + + ga¢_MBR_RRC_Mes§geID_1 +[] = { + +65 { +ATF_NOFLAGS +, 0, +off£tof +( +RRC_Mes§geID +, +¼cTy³ +), + +66 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +68 & +a¢_DEF_¼cTy³_2 +, + +74 { +ATF_NOFLAGS +, 0, +off£tof +( +RRC_Mes§geID +, +mes§geID +), + +75 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +77 & +a¢_DEF_N©iveIÁeg” +, + +84 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RRC_Mes§geID_gs_1 +[] = { + +85 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +87 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_RRC_Mes§geID_g2–_1 +[] = { + +88 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +89 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +91  +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_RRC_Mes§geID_¥ecs_1 + = { + +92 ( +RRC_Mes§geID +), + +93 +off£tof +( +RRC_Mes§geID +, +_a¢_ùx +), + +94 +a¢_MAP_RRC_Mes§geID_g2–_1 +, + +99 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RRC_Mes§geID + = { + +102 & +a¢_OP_SEQUENCE +, + +103 +a¢_DEF_RRC_Mes§geID_gs_1 +, + +104 ( +a¢_DEF_RRC_Mes§geID_gs_1 +) + +105 /( +a¢_DEF_RRC_Mes§geID_gs_1 +[0]), + +106 +a¢_DEF_RRC_Mes§geID_gs_1 +, + +107 ( +a¢_DEF_RRC_Mes§geID_gs_1 +) + +108 /( +a¢_DEF_RRC_Mes§geID_gs_1 +[0]), + +109 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +110 +a¢_MBR_RRC_Mes§geID_1 +, + +112 & +a¢_SPC_RRC_Mes§geID_¥ecs_1 + + + @RRCclass-LTE.c + +8  + ~"RRCþass-LTE.h +" + +14 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_RRCþass_LTE_cÚ¡r_1 + + gCC_NOTUSED + = { + +15 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 4, 4, 0, 11 } , + +16 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +19 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_RRCþass_LTE_v®ue2’um_1 +[] = { + +34 cÚ¡  + ga¢_MAP_RRCþass_LTE_’um2v®ue_1 +[] = { + +49 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_RRCþass_LTE_¥ecs_1 + = { + +50 +a¢_MAP_RRCþass_LTE_v®ue2’um_1 +, + +51 +a¢_MAP_RRCþass_LTE_’um2v®ue_1 +, + +58 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RRCþass_LTE_gs_1 +[] = { + +59 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +61 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RRCþass_LTE + = { + +64 & +a¢_OP_N©iveEnum”©ed +, + +65 +a¢_DEF_RRCþass_LTE_gs_1 +, + +66 ( +a¢_DEF_RRCþass_LTE_gs_1 +) + +67 /( +a¢_DEF_RRCþass_LTE_gs_1 +[0]), + +68 +a¢_DEF_RRCþass_LTE_gs_1 +, + +69 ( +a¢_DEF_RRCþass_LTE_gs_1 +) + +70 /( +a¢_DEF_RRCþass_LTE_gs_1 +[0]), + +71 { 0, & +a¢_PER_ty³_RRCþass_LTE_cÚ¡r_1 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +73 & +a¢_SPC_RRCþass_LTE_¥ecs_1 + + + @RRCclass-NR.c + +8  + ~"RRCþass-NR.h +" + +14 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_RRCþass_NR_cÚ¡r_1 + + gCC_NOTUSED + = { + +15 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 3, 3, 0, 7 } , + +16 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +19 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_RRCþass_NR_v®ue2’um_1 +[] = { + +30 cÚ¡  + ga¢_MAP_RRCþass_NR_’um2v®ue_1 +[] = { + +41 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_RRCþass_NR_¥ecs_1 + = { + +42 +a¢_MAP_RRCþass_NR_v®ue2’um_1 +, + +43 +a¢_MAP_RRCþass_NR_’um2v®ue_1 +, + +50 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_RRCþass_NR_gs_1 +[] = { + +51 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +53 +a¢_TYPE_desütÜ_t + + ga¢_DEF_RRCþass_NR + = { + +56 & +a¢_OP_N©iveEnum”©ed +, + +57 +a¢_DEF_RRCþass_NR_gs_1 +, + +58 ( +a¢_DEF_RRCþass_NR_gs_1 +) + +59 /( +a¢_DEF_RRCþass_NR_gs_1 +[0]), + +60 +a¢_DEF_RRCþass_NR_gs_1 +, + +61 ( +a¢_DEF_RRCþass_NR_gs_1 +) + +62 /( +a¢_DEF_RRCþass_NR_gs_1 +[0]), + +63 { 0, & +a¢_PER_ty³_RRCþass_NR_cÚ¡r_1 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +65 & +a¢_SPC_RRCþass_NR_¥ecs_1 + + + @S-NSSAI.c + +8  + ~"S-NSSAI.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_S_NSSAI_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +S_NSSAI +, +sST +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_SST +, + +20 { +ATF_POINTER +, 1, +off£tof +( +S_NSSAI +, +sD +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_SD +, + +30 cÚ¡  + ga¢_MAP_S_NSSAI_oms_1 +[] = { 1 }; + +31 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_S_NSSAI_gs_1 +[] = { + +32 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +34 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_S_NSSAI_g2–_1 +[] = { + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +38 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_S_NSSAI_¥ecs_1 + = { + +39 ( +S_NSSAI +), + +40 +off£tof +( +S_NSSAI +, +_a¢_ùx +), + +41 +a¢_MAP_S_NSSAI_g2–_1 +, + +43 +a¢_MAP_S_NSSAI_oms_1 +, + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_S_NSSAI + = { + +50 & +a¢_OP_SEQUENCE +, + +51 +a¢_DEF_S_NSSAI_gs_1 +, + +52 ( +a¢_DEF_S_NSSAI_gs_1 +) + +53 /( +a¢_DEF_S_NSSAI_gs_1 +[0]), + +54 +a¢_DEF_S_NSSAI_gs_1 +, + +55 ( +a¢_DEF_S_NSSAI_gs_1 +) + +56 /( +a¢_DEF_S_NSSAI_gs_1 +[0]), + +57 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +58 +a¢_MBR_S_NSSAI_1 +, + +60 & +a¢_SPC_S_NSSAI_¥ecs_1 + + + @SD.c + +8  + ~"SD.h +" + +11 + $SD_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 3)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_SD_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 3, 3 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_SD_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_SD + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_SD_gs_1 +, + +53 ( +a¢_DEF_SD_gs_1 +) + +54 /( +a¢_DEF_SD_gs_1 +[0]), + +55 +a¢_DEF_SD_gs_1 +, + +56 ( +a¢_DEF_SD_gs_1 +) + +57 /( +a¢_DEF_SD_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_SD_cÚ¡r_1 +, +SD_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @SST.c + +8  + ~"SST.h +" + +11 + $SST_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 1)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_SST_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 1, 1 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_SST_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_SST + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_SST_gs_1 +, + +53 ( +a¢_DEF_SST_gs_1 +) + +54 /( +a¢_DEF_SST_gs_1 +[0]), + +55 +a¢_DEF_SST_gs_1 +, + +56 ( +a¢_DEF_SST_gs_1 +) + +57 /( +a¢_DEF_SST_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_SST_cÚ¡r_1 +, +SST_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @ServingCell-ARFCN.c + +8  + ~"S”všgC–l-ARFCN.h +" + +10  + ~"NR-ARFCN.h +" + +11  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_S”všgC–l_ARFCN_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +13 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +16  +a¢_TYPE_memb”_t + + ga¢_MBR_S”všgC–l_ARFCN_1 +[] = { + +17 { +ATF_POINTER +, 0, +off£tof +( +S”všgC–l_ARFCN +, +choiû +. +nR +), + +18 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +20 & +a¢_DEF_NR_ARFCN +, + +26 { +ATF_NOFLAGS +, 0, +off£tof +( +S”všgC–l_ARFCN +, +choiû +. +eUTRA +), + +27 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +29 & +a¢_DEF_E_UTRA_ARFCN +, + +36 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_S”všgC–l_ARFCN_g2–_1 +[] = { + +37 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +38 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +40  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_S”všgC–l_ARFCN_¥ecs_1 + = { + +41 ( +S”všgC–l_ARFCN +), + +42 +off£tof +( +S”všgC–l_ARFCN +, +_a¢_ùx +), + +43 +off£tof +( +S”všgC–l_ARFCN +, +´e£Á +), + +44 ((( +S”všgC–l_ARFCN + *)0)-> +´e£Á +), + +45 +a¢_MAP_S”všgC–l_ARFCN_g2–_1 +, + +50 +a¢_TYPE_desütÜ_t + + ga¢_DEF_S”všgC–l_ARFCN + = { + +53 & +a¢_OP_CHOICE +, + +58 { 0, & +a¢_PER_ty³_S”všgC–l_ARFCN_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +59 +a¢_MBR_S”všgC–l_ARFCN_1 +, + +61 & +a¢_SPC_S”všgC–l_ARFCN_¥ecs_1 + + + @ServingCell-PCI.c + +8  + ~"S”všgC–l-PCI.h +" + +10  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_S”všgC–l_PCI_cÚ¡r_1 + + gCC_NOTUSED + = { + +11 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 1, 1, 0, 1 } , + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +15  +a¢_TYPE_memb”_t + + ga¢_MBR_S”všgC–l_PCI_1 +[] = { + +16 { +ATF_NOFLAGS +, 0, +off£tof +( +S”všgC–l_PCI +, +choiû +. +nR +), + +17 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +19 & +a¢_DEF_NR_PCI +, + +25 { +ATF_NOFLAGS +, 0, +off£tof +( +S”všgC–l_PCI +, +choiû +. +eUTRA +), + +26 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +28 & +a¢_DEF_E_UTRA_PCI +, + +35 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_S”všgC–l_PCI_g2–_1 +[] = { + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +37 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +39  +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_S”všgC–l_PCI_¥ecs_1 + = { + +40 ( +S”všgC–l_PCI +), + +41 +off£tof +( +S”všgC–l_PCI +, +_a¢_ùx +), + +42 +off£tof +( +S”všgC–l_PCI +, +´e£Á +), + +43 ((( +S”všgC–l_PCI + *)0)-> +´e£Á +), + +44 +a¢_MAP_S”všgC–l_PCI_g2–_1 +, + +49 +a¢_TYPE_desütÜ_t + + ga¢_DEF_S”všgC–l_PCI + = { + +52 & +a¢_OP_CHOICE +, + +57 { 0, & +a¢_PER_ty³_S”všgC–l_PCI_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +58 +a¢_MBR_S”všgC–l_PCI_1 +, + +60 & +a¢_SPC_S”všgC–l_PCI_¥ecs_1 + + + @SubscriberProfileIDforRFP.c + +8  + ~"Subsüib”ProfžeIDfÜRFP.h +" + +11 + $Subsüib”ProfžeIDfÜRFP_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 256)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +39  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_Subsüib”ProfžeIDfÜRFP_cÚ¡r_1 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED +, 8, 8, 1, 256 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Subsüib”ProfžeIDfÜRFP_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (2 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Subsüib”ProfžeIDfÜRFP + = { + +50 & +a¢_OP_N©iveIÁeg” +, + +51 +a¢_DEF_Subsüib”ProfžeIDfÜRFP_gs_1 +, + +52 ( +a¢_DEF_Subsüib”ProfžeIDfÜRFP_gs_1 +) + +53 /( +a¢_DEF_Subsüib”ProfžeIDfÜRFP_gs_1 +[0]), + +54 +a¢_DEF_Subsüib”ProfžeIDfÜRFP_gs_1 +, + +55 ( +a¢_DEF_Subsüib”ProfžeIDfÜRFP_gs_1 +) + +56 /( +a¢_DEF_Subsüib”ProfžeIDfÜRFP_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_Subsüib”ProfžeIDfÜRFP_cÚ¡r_1 +, +Subsüib”ProfžeIDfÜRFP_cÚ¡¿št + }, + + @SupportedSULBandList.c + +8  + ~"SuµÜ‹dSULBªdLi¡.h +" + +10  + ~"SuµÜ‹dSULF»qBªdI‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_SuµÜ‹dSULBªdLi¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 6, 6, 0, 32 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_SuµÜ‹dSULBªdLi¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_SuµÜ‹dSULF»qBªdI‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_SuµÜ‹dSULBªdLi¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_SuµÜ‹dSULBªdLi¡_¥ecs_1 + = { + +31 ( +SuµÜ‹dSULBªdLi¡ +), + +32 +off£tof +( +SuµÜ‹dSULBªdLi¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_SuµÜ‹dSULBªdLi¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_SuµÜ‹dSULBªdLi¡_gs_1 +, + +40 ( +a¢_DEF_SuµÜ‹dSULBªdLi¡_gs_1 +) + +41 /( +a¢_DEF_SuµÜ‹dSULBªdLi¡_gs_1 +[0]), + +42 +a¢_DEF_SuµÜ‹dSULBªdLi¡_gs_1 +, + +43 ( +a¢_DEF_SuµÜ‹dSULBªdLi¡_gs_1 +) + +44 /( +a¢_DEF_SuµÜ‹dSULBªdLi¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_SuµÜ‹dSULBªdLi¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_SuµÜ‹dSULBªdLi¡_1 +, + +48 & +a¢_SPC_SuµÜ‹dSULBªdLi¡_¥ecs_1 + + + @SupportedSULFreqBandItem.c + +8  + ~"SuµÜ‹dSULF»qBªdI‹m.h +" + +11 + $memb_äeqBªdIndiÿtÜNr_cÚ¡¿št_1 +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13  +v®ue +; + +15 if(! +¥Œ +) { + +16 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +18 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +22 +v®ue + = *(cÚ¡ *) +¥Œ +; + +24 if(( +v®ue + >= 1 && value <= 1024)) { + +28 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +30 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +33 + } +} + +35  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_memb_äeqBªdIndiÿtÜNr_cÚ¡r_2 + + gCC_NOTUSED + = { + +36 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 10, 10, 1, 1024 } , + +37 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +40 +a¢_TYPE_memb”_t + + ga¢_MBR_SuµÜ‹dSULF»qBªdI‹m_1 +[] = { + +41 { +ATF_NOFLAGS +, 0, +off£tof +( +SuµÜ‹dSULF»qBªdI‹m +, +äeqBªdIndiÿtÜNr +), + +42 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +44 & +a¢_DEF_N©iveIÁeg” +, + +46 { 0, & +a¢_PER_memb_äeqBªdIndiÿtÜNr_cÚ¡r_2 +, +memb_äeqBªdIndiÿtÜNr_cÚ¡¿št_1 + }, + +51 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_SuµÜ‹dSULF»qBªdI‹m_gs_1 +[] = { + +52 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +54 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_SuµÜ‹dSULF»qBªdI‹m_g2–_1 +[] = { + +55 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +57 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_SuµÜ‹dSULF»qBªdI‹m_¥ecs_1 + = { + +58 ( +SuµÜ‹dSULF»qBªdI‹m +), + +59 +off£tof +( +SuµÜ‹dSULF»qBªdI‹m +, +_a¢_ùx +), + +60 +a¢_MAP_SuµÜ‹dSULF»qBªdI‹m_g2–_1 +, + +65 +a¢_TYPE_desütÜ_t + + ga¢_DEF_SuµÜ‹dSULF»qBªdI‹m + = { + +68 & +a¢_OP_SEQUENCE +, + +69 +a¢_DEF_SuµÜ‹dSULF»qBªdI‹m_gs_1 +, + +70 ( +a¢_DEF_SuµÜ‹dSULF»qBªdI‹m_gs_1 +) + +71 /( +a¢_DEF_SuµÜ‹dSULF»qBªdI‹m_gs_1 +[0]), + +72 +a¢_DEF_SuµÜ‹dSULF»qBªdI‹m_gs_1 +, + +73 ( +a¢_DEF_SuµÜ‹dSULF»qBªdI‹m_gs_1 +) + +74 /( +a¢_DEF_SuµÜ‹dSULF»qBªdI‹m_gs_1 +[0]), + +75 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +76 +a¢_MBR_SuµÜ‹dSULF»qBªdI‹m_1 +, + +78 & +a¢_SPC_SuµÜ‹dSULF»qBªdI‹m_¥ecs_1 + + + @TestCond-Expression.c + +8  + ~"Te¡CÚd-Ex´essiÚ.h +" + +14 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_Te¡CÚd_Ex´essiÚ_cÚ¡r_1 + + gCC_NOTUSED + = { + +15 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 3, 3, 0, 4 } , + +16 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +19 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_Te¡CÚd_Ex´essiÚ_v®ue2’um_1 +[] = { + +27 cÚ¡  + ga¢_MAP_Te¡CÚd_Ex´essiÚ_’um2v®ue_1 +[] = { + +35 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_Te¡CÚd_Ex´essiÚ_¥ecs_1 + = { + +36 +a¢_MAP_Te¡CÚd_Ex´essiÚ_v®ue2’um_1 +, + +37 +a¢_MAP_Te¡CÚd_Ex´essiÚ_’um2v®ue_1 +, + +44 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Te¡CÚd_Ex´essiÚ_gs_1 +[] = { + +45 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Te¡CÚd_Ex´essiÚ + = { + +50 & +a¢_OP_N©iveEnum”©ed +, + +51 +a¢_DEF_Te¡CÚd_Ex´essiÚ_gs_1 +, + +52 ( +a¢_DEF_Te¡CÚd_Ex´essiÚ_gs_1 +) + +53 /( +a¢_DEF_Te¡CÚd_Ex´essiÚ_gs_1 +[0]), + +54 +a¢_DEF_Te¡CÚd_Ex´essiÚ_gs_1 +, + +55 ( +a¢_DEF_Te¡CÚd_Ex´essiÚ_gs_1 +) + +56 /( +a¢_DEF_Te¡CÚd_Ex´essiÚ_gs_1 +[0]), + +57 { 0, & +a¢_PER_ty³_Te¡CÚd_Ex´essiÚ_cÚ¡r_1 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +59 & +a¢_SPC_Te¡CÚd_Ex´essiÚ_¥ecs_1 + + + @TestCond-Type.c + +8  + ~"Te¡CÚd-Ty³.h +" + +34  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_gBR_cÚ¡r_2 + + gCC_NOTUSED + = { + +35 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +36 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +39  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_aMBR_cÚ¡r_5 + + gCC_NOTUSED + = { + +40 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +44  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_isSt_cÚ¡r_8 + + gCC_NOTUSED + = { + +45 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +46 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +49  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_isC©M_cÚ¡r_11 + + gCC_NOTUSED + = { + +50 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +51 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +54  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_rSRP_cÚ¡r_14 + + gCC_NOTUSED + = { + +55 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +56 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +59  +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_rSRQ_cÚ¡r_17 + + gCC_NOTUSED + = { + +60 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 0, 0, 0, 0 } , + +61 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +64 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_Te¡CÚd_Ty³_cÚ¡r_1 + + gCC_NOTUSED + = { + +65 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 3, 3, 0, 5 } , + +66 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +69 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_gBR_v®ue2’um_2 +[] = { + +73 cÚ¡  + ga¢_MAP_gBR_’um2v®ue_2 +[] = { + +77 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_gBR_¥ecs_2 + = { + +78 +a¢_MAP_gBR_v®ue2’um_2 +, + +79 +a¢_MAP_gBR_’um2v®ue_2 +, + +86 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_gBR_gs_2 +[] = { + +87 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +88 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +91 +a¢_TYPE_desütÜ_t + + ga¢_DEF_gBR_2 + = { + +94 & +a¢_OP_N©iveEnum”©ed +, + +95 +a¢_DEF_gBR_gs_2 +, + +96 ( +a¢_DEF_gBR_gs_2 +) + +97 /( +a¢_DEF_gBR_gs_2 +[0]) - 1, + +98 +a¢_DEF_gBR_gs_2 +, + +99 ( +a¢_DEF_gBR_gs_2 +) + +100 /( +a¢_DEF_gBR_gs_2 +[0]), + +101 { 0, & +a¢_PER_ty³_gBR_cÚ¡r_2 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +103 & +a¢_SPC_gBR_¥ecs_2 + + +106 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_aMBR_v®ue2’um_5 +[] = { + +110 cÚ¡  + ga¢_MAP_aMBR_’um2v®ue_5 +[] = { + +114 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_aMBR_¥ecs_5 + = { + +115 +a¢_MAP_aMBR_v®ue2’um_5 +, + +116 +a¢_MAP_aMBR_’um2v®ue_5 +, + +123 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_aMBR_gs_5 +[] = { + +124 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +125 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +128 +a¢_TYPE_desütÜ_t + + ga¢_DEF_aMBR_5 + = { + +131 & +a¢_OP_N©iveEnum”©ed +, + +132 +a¢_DEF_aMBR_gs_5 +, + +133 ( +a¢_DEF_aMBR_gs_5 +) + +134 /( +a¢_DEF_aMBR_gs_5 +[0]) - 1, + +135 +a¢_DEF_aMBR_gs_5 +, + +136 ( +a¢_DEF_aMBR_gs_5 +) + +137 /( +a¢_DEF_aMBR_gs_5 +[0]), + +138 { 0, & +a¢_PER_ty³_aMBR_cÚ¡r_5 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +140 & +a¢_SPC_aMBR_¥ecs_5 + + +143 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_isSt_v®ue2’um_8 +[] = { + +147 cÚ¡  + ga¢_MAP_isSt_’um2v®ue_8 +[] = { + +151 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_isSt_¥ecs_8 + = { + +152 +a¢_MAP_isSt_v®ue2’um_8 +, + +153 +a¢_MAP_isSt_’um2v®ue_8 +, + +160 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_isSt_gs_8 +[] = { + +161 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +162 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +165 +a¢_TYPE_desütÜ_t + + ga¢_DEF_isSt_8 + = { + +168 & +a¢_OP_N©iveEnum”©ed +, + +169 +a¢_DEF_isSt_gs_8 +, + +170 ( +a¢_DEF_isSt_gs_8 +) + +171 /( +a¢_DEF_isSt_gs_8 +[0]) - 1, + +172 +a¢_DEF_isSt_gs_8 +, + +173 ( +a¢_DEF_isSt_gs_8 +) + +174 /( +a¢_DEF_isSt_gs_8 +[0]), + +175 { 0, & +a¢_PER_ty³_isSt_cÚ¡r_8 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +177 & +a¢_SPC_isSt_¥ecs_8 + + +180 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_isC©M_v®ue2’um_11 +[] = { + +184 cÚ¡  + ga¢_MAP_isC©M_’um2v®ue_11 +[] = { + +188 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_isC©M_¥ecs_11 + = { + +189 +a¢_MAP_isC©M_v®ue2’um_11 +, + +190 +a¢_MAP_isC©M_’um2v®ue_11 +, + +197 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_isC©M_gs_11 +[] = { + +198 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +199 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +202 +a¢_TYPE_desütÜ_t + + ga¢_DEF_isC©M_11 + = { + +205 & +a¢_OP_N©iveEnum”©ed +, + +206 +a¢_DEF_isC©M_gs_11 +, + +207 ( +a¢_DEF_isC©M_gs_11 +) + +208 /( +a¢_DEF_isC©M_gs_11 +[0]) - 1, + +209 +a¢_DEF_isC©M_gs_11 +, + +210 ( +a¢_DEF_isC©M_gs_11 +) + +211 /( +a¢_DEF_isC©M_gs_11 +[0]), + +212 { 0, & +a¢_PER_ty³_isC©M_cÚ¡r_11 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +214 & +a¢_SPC_isC©M_¥ecs_11 + + +217 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_rSRP_v®ue2’um_14 +[] = { + +221 cÚ¡  + ga¢_MAP_rSRP_’um2v®ue_14 +[] = { + +225 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_rSRP_¥ecs_14 + = { + +226 +a¢_MAP_rSRP_v®ue2’um_14 +, + +227 +a¢_MAP_rSRP_’um2v®ue_14 +, + +234 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_rSRP_gs_14 +[] = { + +235 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +236 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +239 +a¢_TYPE_desütÜ_t + + ga¢_DEF_rSRP_14 + = { + +242 & +a¢_OP_N©iveEnum”©ed +, + +243 +a¢_DEF_rSRP_gs_14 +, + +244 ( +a¢_DEF_rSRP_gs_14 +) + +245 /( +a¢_DEF_rSRP_gs_14 +[0]) - 1, + +246 +a¢_DEF_rSRP_gs_14 +, + +247 ( +a¢_DEF_rSRP_gs_14 +) + +248 /( +a¢_DEF_rSRP_gs_14 +[0]), + +249 { 0, & +a¢_PER_ty³_rSRP_cÚ¡r_14 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +251 & +a¢_SPC_rSRP_¥ecs_14 + + +254 cÚ¡ +a¢_INTEGER_’um_m­_t + + ga¢_MAP_rSRQ_v®ue2’um_17 +[] = { + +258 cÚ¡  + ga¢_MAP_rSRQ_’um2v®ue_17 +[] = { + +262 cÚ¡ +a¢_INTEGER_¥ecifics_t + + ga¢_SPC_rSRQ_¥ecs_17 + = { + +263 +a¢_MAP_rSRQ_v®ue2’um_17 +, + +264 +a¢_MAP_rSRQ_’um2v®ue_17 +, + +271 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_rSRQ_gs_17 +[] = { + +272 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +273 ( +ASN_TAG_CLASS_UNIVERSAL + | (10 << 2)) + +276 +a¢_TYPE_desütÜ_t + + ga¢_DEF_rSRQ_17 + = { + +279 & +a¢_OP_N©iveEnum”©ed +, + +280 +a¢_DEF_rSRQ_gs_17 +, + +281 ( +a¢_DEF_rSRQ_gs_17 +) + +282 /( +a¢_DEF_rSRQ_gs_17 +[0]) - 1, + +283 +a¢_DEF_rSRQ_gs_17 +, + +284 ( +a¢_DEF_rSRQ_gs_17 +) + +285 /( +a¢_DEF_rSRQ_gs_17 +[0]), + +286 { 0, & +a¢_PER_ty³_rSRQ_cÚ¡r_17 +, +N©iveEnum”©ed_cÚ¡¿št + }, + +288 & +a¢_SPC_rSRQ_¥ecs_17 + + +291 +a¢_TYPE_memb”_t + + ga¢_MBR_Te¡CÚd_Ty³_1 +[] = { + +292 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_Ty³ +, +choiû +. +gBR +), + +293 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +295 & +a¢_DEF_gBR_2 +, + +301 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_Ty³ +, +choiû +. +aMBR +), + +302 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +304 & +a¢_DEF_aMBR_5 +, + +310 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_Ty³ +, +choiû +. +isSt +), + +311 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +313 & +a¢_DEF_isSt_8 +, + +319 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_Ty³ +, +choiû +. +isC©M +), + +320 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +322 & +a¢_DEF_isC©M_11 +, + +328 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_Ty³ +, +choiû +. +rSRP +), + +329 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +331 & +a¢_DEF_rSRP_14 +, + +337 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_Ty³ +, +choiû +. +rSRQ +), + +338 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +340 & +a¢_DEF_rSRQ_17 +, + +347 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Te¡CÚd_Ty³_g2–_1 +[] = { + +348 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +349 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +350 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +351 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +352 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +353 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 } + +355 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_Te¡CÚd_Ty³_¥ecs_1 + = { + +356 ( +Te¡CÚd_Ty³ +), + +357 +off£tof +( +Te¡CÚd_Ty³ +, +_a¢_ùx +), + +358 +off£tof +( +Te¡CÚd_Ty³ +, +´e£Á +), + +359 ((( +Te¡CÚd_Ty³ + *)0)-> +´e£Á +), + +360 +a¢_MAP_Te¡CÚd_Ty³_g2–_1 +, + +365 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Te¡CÚd_Ty³ + = { + +368 & +a¢_OP_CHOICE +, + +373 { 0, & +a¢_PER_ty³_Te¡CÚd_Ty³_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +374 +a¢_MBR_Te¡CÚd_Ty³_1 +, + +376 & +a¢_SPC_Te¡CÚd_Ty³_¥ecs_1 + + + @TestCond-Value.c + +8  + ~"Te¡CÚd-V®ue.h +" + +10 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_Te¡CÚd_V®ue_cÚ¡r_1 + + gCC_NOTUSED + = { + +11 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 3, 3, 0, 5 } , + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +15 +a¢_TYPE_memb”_t + + ga¢_MBR_Te¡CÚd_V®ue_1 +[] = { + +16 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_V®ue +, +choiû +. +v®ueIÁ +), + +17 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +19 & +a¢_DEF_N©iveIÁeg” +, + +25 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_V®ue +, +choiû +. +v®ueEnum +), + +26 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +28 & +a¢_DEF_N©iveIÁeg” +, + +34 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_V®ue +, +choiû +. +v®ueBoÞ +), + +35 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +37 & +a¢_DEF_BOOLEAN +, + +43 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_V®ue +, +choiû +. +v®ueB™S +), + +44 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +46 & +a¢_DEF_BIT_STRING +, + +52 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_V®ue +, +choiû +. +v®ueOùS +), + +53 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +55 & +a¢_DEF_OCTET_STRING +, + +61 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚd_V®ue +, +choiû +. +v®ueP¹S +), + +62 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +64 & +a¢_DEF_PršbËSŒšg +, + +71 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Te¡CÚd_V®ue_g2–_1 +[] = { + +72 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +73 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +74 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +75 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +76 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +77 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 } + +79 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_Te¡CÚd_V®ue_¥ecs_1 + = { + +80 ( +Te¡CÚd_V®ue +), + +81 +off£tof +( +Te¡CÚd_V®ue +, +_a¢_ùx +), + +82 +off£tof +( +Te¡CÚd_V®ue +, +´e£Á +), + +83 ((( +Te¡CÚd_V®ue + *)0)-> +´e£Á +), + +84 +a¢_MAP_Te¡CÚd_V®ue_g2–_1 +, + +89 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Te¡CÚd_V®ue + = { + +92 & +a¢_OP_CHOICE +, + +97 { 0, & +a¢_PER_ty³_Te¡CÚd_V®ue_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +98 +a¢_MBR_Te¡CÚd_V®ue_1 +, + +100 & +a¢_SPC_Te¡CÚd_V®ue_¥ecs_1 + + + @TestCondInfo.c + +8  + ~"Te¡CÚdInfo.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_Te¡CÚdInfo_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚdInfo +, +‹¡Ty³ +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_Te¡CÚd_Ty³ +, + +20 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚdInfo +, +‹¡Ex´ +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_Te¡CÚd_Ex´essiÚ +, + +29 { +ATF_NOFLAGS +, 0, +off£tof +( +Te¡CÚdInfo +, +‹¡V®ue +), + +30 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +32 & +a¢_DEF_Te¡CÚd_V®ue +, + +39 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_Te¡CÚdInfo_gs_1 +[] = { + +40 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +42 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_Te¡CÚdInfo_g2–_1 +[] = { + +43 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +44 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +45 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 } + +47 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_Te¡CÚdInfo_¥ecs_1 + = { + +48 ( +Te¡CÚdInfo +), + +49 +off£tof +( +Te¡CÚdInfo +, +_a¢_ùx +), + +50 +a¢_MAP_Te¡CÚdInfo_g2–_1 +, + +55 +a¢_TYPE_desütÜ_t + + ga¢_DEF_Te¡CÚdInfo + = { + +58 & +a¢_OP_SEQUENCE +, + +59 +a¢_DEF_Te¡CÚdInfo_gs_1 +, + +60 ( +a¢_DEF_Te¡CÚdInfo_gs_1 +) + +61 /( +a¢_DEF_Te¡CÚdInfo_gs_1 +[0]), + +62 +a¢_DEF_Te¡CÚdInfo_gs_1 +, + +63 ( +a¢_DEF_Te¡CÚdInfo_gs_1 +) + +64 /( +a¢_DEF_Te¡CÚdInfo_gs_1 +[0]), + +65 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +66 +a¢_MBR_Te¡CÚdInfo_1 +, + +68 & +a¢_SPC_Te¡CÚdInfo_¥ecs_1 + + + @TimeStamp.c + +8  + ~"TimeSmp.h +" + +11 + $TimeSmp_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +12 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +13 cÚ¡ +OCTET_STRING_t + * +¡ + = (cÚ¡ OCTET_STRING_ˆ*) +¥Œ +; + +14 +size_t + +size +; + +16 if(! +¥Œ +) { + +17 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +19 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +23 +size + = +¡ +->size; + +25 if(( +size + == 4)) { + +29 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +31 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +34 + } +} + +40 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_TimeSmp_cÚ¡r_1 + + gCC_NOTUSED + = { + +41 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +42 { +APC_CONSTRAINED +, 0, 0, 4, 4 } , + +45 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_TimeSmp_gs_1 +[] = { + +46 ( +ASN_TAG_CLASS_UNIVERSAL + | (4 << 2)) + +48 +a¢_TYPE_desütÜ_t + + ga¢_DEF_TimeSmp + = { + +51 & +a¢_OP_OCTET_STRING +, + +52 +a¢_DEF_TimeSmp_gs_1 +, + +53 ( +a¢_DEF_TimeSmp_gs_1 +) + +54 /( +a¢_DEF_TimeSmp_gs_1 +[0]), + +55 +a¢_DEF_TimeSmp_gs_1 +, + +56 ( +a¢_DEF_TimeSmp_gs_1 +) + +57 /( +a¢_DEF_TimeSmp_gs_1 +[0]), + +58 { 0, & +a¢_PER_ty³_TimeSmp_cÚ¡r_1 +, +TimeSmp_cÚ¡¿št + }, + +60 & +a¢_SPC_OCTET_STRING_¥ecs + + + @UEID-EN-GNB.c + +8  + ~"UEID-EN-GNB.h +" + +10  + ~"UEID-GNB-CU-CP-E1AP-ID-Li¡.h +" + +11 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_EN_GNB_1 +[] = { + +12 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_EN_GNB +, +m_eNB_UE_X2AP_ID +), + +13 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +15 & +a¢_DEF_ENB_UE_X2AP_ID +, + +21 { +ATF_POINTER +, 1, +off£tof +( +UEID_EN_GNB +, +m_eNB_UE_X2AP_ID_Ex‹nsiÚ +), + +22 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +24 & +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ +, + +30 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_EN_GNB +, +glob®ENB_ID +), + +31 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +33 & +a¢_DEF_Glob®ENB_ID +, + +39 { +ATF_POINTER +, 3, +off£tof +( +UEID_EN_GNB +, +gNB_CU_UE_F1AP_ID +), + +40 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +42 & +a¢_DEF_GNB_CU_UE_F1AP_ID +, + +48 { +ATF_POINTER +, 2, +off£tof +( +UEID_EN_GNB +, +gNB_CU_CP_UE_E1AP_ID_Li¡ +), + +49 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +51 & +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡ +, + +57 { +ATF_POINTER +, 1, +off£tof +( +UEID_EN_GNB +, +¿n_UEID +), + +58 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +60 & +a¢_DEF_RANUEID +, + +67 cÚ¡  + ga¢_MAP_UEID_EN_GNB_oms_1 +[] = { 1, 3, 4, 5 }; + +68 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_EN_GNB_gs_1 +[] = { + +69 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +71 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_EN_GNB_g2–_1 +[] = { + +72 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +73 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +74 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +75 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +76 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +77 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 } + +79 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_EN_GNB_¥ecs_1 + = { + +80 ( +UEID_EN_GNB +), + +81 +off£tof +( +UEID_EN_GNB +, +_a¢_ùx +), + +82 +a¢_MAP_UEID_EN_GNB_g2–_1 +, + +84 +a¢_MAP_UEID_EN_GNB_oms_1 +, + +88 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_EN_GNB + = { + +91 & +a¢_OP_SEQUENCE +, + +92 +a¢_DEF_UEID_EN_GNB_gs_1 +, + +93 ( +a¢_DEF_UEID_EN_GNB_gs_1 +) + +94 /( +a¢_DEF_UEID_EN_GNB_gs_1 +[0]), + +95 +a¢_DEF_UEID_EN_GNB_gs_1 +, + +96 ( +a¢_DEF_UEID_EN_GNB_gs_1 +) + +97 /( +a¢_DEF_UEID_EN_GNB_gs_1 +[0]), + +98 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +99 +a¢_MBR_UEID_EN_GNB_1 +, + +101 & +a¢_SPC_UEID_EN_GNB_¥ecs_1 + + + @UEID-ENB.c + +8  + ~"UEID-ENB.h +" + +10  + ~"Glob®ENB-ID.h +" + +11 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_ENB_1 +[] = { + +12 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_ENB +, +mME_UE_S1AP_ID +), + +13 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +15 & +a¢_DEF_MME_UE_S1AP_ID +, + +21 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_ENB +, +gUMMEI +), + +22 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +24 & +a¢_DEF_GUMMEI +, + +30 { +ATF_POINTER +, 3, +off£tof +( +UEID_ENB +, +m_eNB_UE_X2AP_ID +), + +31 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +33 & +a¢_DEF_ENB_UE_X2AP_ID +, + +39 { +ATF_POINTER +, 2, +off£tof +( +UEID_ENB +, +m_eNB_UE_X2AP_ID_Ex‹nsiÚ +), + +40 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +42 & +a¢_DEF_ENB_UE_X2AP_ID_Ex‹nsiÚ +, + +48 { +ATF_POINTER +, 1, +off£tof +( +UEID_ENB +, +glob®ENB_ID +), + +49 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +51 & +a¢_DEF_Glob®ENB_ID +, + +58 cÚ¡  + ga¢_MAP_UEID_ENB_oms_1 +[] = { 2, 3, 4 }; + +59 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_ENB_gs_1 +[] = { + +60 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +62 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_ENB_g2–_1 +[] = { + +63 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +64 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +65 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +66 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +67 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 } + +69 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_ENB_¥ecs_1 + = { + +70 ( +UEID_ENB +), + +71 +off£tof +( +UEID_ENB +, +_a¢_ùx +), + +72 +a¢_MAP_UEID_ENB_g2–_1 +, + +74 +a¢_MAP_UEID_ENB_oms_1 +, + +78 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_ENB + = { + +81 & +a¢_OP_SEQUENCE +, + +82 +a¢_DEF_UEID_ENB_gs_1 +, + +83 ( +a¢_DEF_UEID_ENB_gs_1 +) + +84 /( +a¢_DEF_UEID_ENB_gs_1 +[0]), + +85 +a¢_DEF_UEID_ENB_gs_1 +, + +86 ( +a¢_DEF_UEID_ENB_gs_1 +) + +87 /( +a¢_DEF_UEID_ENB_gs_1 +[0]), + +88 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +89 +a¢_MBR_UEID_ENB_1 +, + +91 & +a¢_SPC_UEID_ENB_¥ecs_1 + + + @UEID-GNB-CU-CP-E1AP-ID-Item.c + +8  + ~"UEID-GNB-CU-CP-E1AP-ID-I‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_GNB_CU_CP_E1AP_ID_I‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_GNB_CU_CP_E1AP_ID_I‹m +, +gNB_CU_CP_UE_E1AP_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_GNB_CU_CP_UE_E1AP_ID +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_GNB_CU_CP_E1AP_ID_I‹m_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_GNB_CU_CP_E1AP_ID_I‹m_¥ecs_1 + = { + +28 ( +UEID_GNB_CU_CP_E1AP_ID_I‹m +), + +29 +off£tof +( +UEID_GNB_CU_CP_E1AP_ID_I‹m +, +_a¢_ùx +), + +30 +a¢_MAP_UEID_GNB_CU_CP_E1AP_ID_I‹m_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m_gs_1 +, + +40 ( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m_gs_1 +) + +41 /( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m_gs_1 +[0]), + +42 +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m_gs_1 +, + +43 ( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m_gs_1 +) + +44 /( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_UEID_GNB_CU_CP_E1AP_ID_I‹m_1 +, + +48 & +a¢_SPC_UEID_GNB_CU_CP_E1AP_ID_I‹m_¥ecs_1 + + + @UEID-GNB-CU-CP-E1AP-ID-List.c + +8  + ~"UEID-GNB-CU-CP-E1AP-ID-Li¡.h +" + +10  + ~"UEID-GNB-CU-CP-E1AP-ID-I‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_UEID_GNB_CU_CP_E1AP_ID_Li¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 16, 16, 1, 65535 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_GNB_CU_CP_E1AP_ID_Li¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_I‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_UEID_GNB_CU_CP_E1AP_ID_Li¡_¥ecs_1 + = { + +31 ( +UEID_GNB_CU_CP_E1AP_ID_Li¡ +), + +32 +off£tof +( +UEID_GNB_CU_CP_E1AP_ID_Li¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡_gs_1 +, + +40 ( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡_gs_1 +) + +41 /( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡_gs_1 +[0]), + +42 +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡_gs_1 +, + +43 ( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡_gs_1 +) + +44 /( +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_UEID_GNB_CU_CP_E1AP_ID_Li¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_UEID_GNB_CU_CP_E1AP_ID_Li¡_1 +, + +48 & +a¢_SPC_UEID_GNB_CU_CP_E1AP_ID_Li¡_¥ecs_1 + + + @UEID-GNB-CU-CP-F1AP-ID-Item.c + +8  + ~"UEID-GNB-CU-CP-F1AP-ID-I‹m.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_GNB_CU_CP_F1AP_ID_I‹m_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_GNB_CU_CP_F1AP_ID_I‹m +, +gNB_CU_UE_F1AP_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_GNB_CU_UE_F1AP_ID +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_GNB_CU_CP_F1AP_ID_I‹m_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_GNB_CU_CP_F1AP_ID_I‹m_¥ecs_1 + = { + +28 ( +UEID_GNB_CU_CP_F1AP_ID_I‹m +), + +29 +off£tof +( +UEID_GNB_CU_CP_F1AP_ID_I‹m +, +_a¢_ùx +), + +30 +a¢_MAP_UEID_GNB_CU_CP_F1AP_ID_I‹m_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m_gs_1 +, + +40 ( +a¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m_gs_1 +) + +41 /( +a¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m_gs_1 +[0]), + +42 +a¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m_gs_1 +, + +43 ( +a¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m_gs_1 +) + +44 /( +a¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_UEID_GNB_CU_CP_F1AP_ID_I‹m_1 +, + +48 & +a¢_SPC_UEID_GNB_CU_CP_F1AP_ID_I‹m_¥ecs_1 + + + @UEID-GNB-CU-F1AP-ID-List.c + +8  + ~"UEID-GNB-CU-F1AP-ID-Li¡.h +" + +10  + ~"UEID-GNB-CU-CP-F1AP-ID-I‹m.h +" + +11 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_UEID_GNB_CU_F1AP_ID_Li¡_cÚ¡r_1 + + gCC_NOTUSED + = { + +12 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +13 { +APC_CONSTRAINED +, 2, 2, 1, 4 } , + +16 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_GNB_CU_F1AP_ID_Li¡_1 +[] = { + +17 { +ATF_POINTER +, 0, 0, + +18 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)), + +20 & +a¢_DEF_UEID_GNB_CU_CP_F1AP_ID_I‹m +, + +27 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡_gs_1 +[] = { + +28 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +30 +a¢_SET_OF_¥ecifics_t + + ga¢_SPC_UEID_GNB_CU_F1AP_ID_Li¡_¥ecs_1 + = { + +31 ( +UEID_GNB_CU_F1AP_ID_Li¡ +), + +32 +off£tof +( +UEID_GNB_CU_F1AP_ID_Li¡ +, +_a¢_ùx +), + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡ + = { + +38 & +a¢_OP_SEQUENCE_OF +, + +39 +a¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡_gs_1 +, + +40 ( +a¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡_gs_1 +) + +41 /( +a¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡_gs_1 +[0]), + +42 +a¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡_gs_1 +, + +43 ( +a¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡_gs_1 +) + +44 /( +a¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡_gs_1 +[0]), + +45 { 0, & +a¢_PER_ty³_UEID_GNB_CU_F1AP_ID_Li¡_cÚ¡r_1 +, +SEQUENCE_OF_cÚ¡¿št + }, + +46 +a¢_MBR_UEID_GNB_CU_F1AP_ID_Li¡_1 +, + +48 & +a¢_SPC_UEID_GNB_CU_F1AP_ID_Li¡_¥ecs_1 + + + @UEID-GNB-CU-UP.c + +8  + ~"UEID-GNB-CU-UP.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_GNB_CU_UP_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_GNB_CU_UP +, +gNB_CU_CP_UE_E1AP_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_GNB_CU_CP_UE_E1AP_ID +, + +20 { +ATF_POINTER +, 1, +off£tof +( +UEID_GNB_CU_UP +, +¿n_UEID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_RANUEID +, + +30 cÚ¡  + ga¢_MAP_UEID_GNB_CU_UP_oms_1 +[] = { 1 }; + +31 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_GNB_CU_UP_gs_1 +[] = { + +32 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +34 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_GNB_CU_UP_g2–_1 +[] = { + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +38 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_GNB_CU_UP_¥ecs_1 + = { + +39 ( +UEID_GNB_CU_UP +), + +40 +off£tof +( +UEID_GNB_CU_UP +, +_a¢_ùx +), + +41 +a¢_MAP_UEID_GNB_CU_UP_g2–_1 +, + +43 +a¢_MAP_UEID_GNB_CU_UP_oms_1 +, + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_GNB_CU_UP + = { + +50 & +a¢_OP_SEQUENCE +, + +51 +a¢_DEF_UEID_GNB_CU_UP_gs_1 +, + +52 ( +a¢_DEF_UEID_GNB_CU_UP_gs_1 +) + +53 /( +a¢_DEF_UEID_GNB_CU_UP_gs_1 +[0]), + +54 +a¢_DEF_UEID_GNB_CU_UP_gs_1 +, + +55 ( +a¢_DEF_UEID_GNB_CU_UP_gs_1 +) + +56 /( +a¢_DEF_UEID_GNB_CU_UP_gs_1 +[0]), + +57 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +58 +a¢_MBR_UEID_GNB_CU_UP_1 +, + +60 & +a¢_SPC_UEID_GNB_CU_UP_¥ecs_1 + + + @UEID-GNB-DU.c + +8  + ~"UEID-GNB-DU.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_GNB_DU_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_GNB_DU +, +gNB_CU_UE_F1AP_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_GNB_CU_UE_F1AP_ID +, + +20 { +ATF_POINTER +, 1, +off£tof +( +UEID_GNB_DU +, +¿n_UEID +), + +21 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +23 & +a¢_DEF_RANUEID +, + +30 cÚ¡  + ga¢_MAP_UEID_GNB_DU_oms_1 +[] = { 1 }; + +31 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_GNB_DU_gs_1 +[] = { + +32 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +34 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_GNB_DU_g2–_1 +[] = { + +35 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +36 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 } + +38 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_GNB_DU_¥ecs_1 + = { + +39 ( +UEID_GNB_DU +), + +40 +off£tof +( +UEID_GNB_DU +, +_a¢_ùx +), + +41 +a¢_MAP_UEID_GNB_DU_g2–_1 +, + +43 +a¢_MAP_UEID_GNB_DU_oms_1 +, + +47 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_GNB_DU + = { + +50 & +a¢_OP_SEQUENCE +, + +51 +a¢_DEF_UEID_GNB_DU_gs_1 +, + +52 ( +a¢_DEF_UEID_GNB_DU_gs_1 +) + +53 /( +a¢_DEF_UEID_GNB_DU_gs_1 +[0]), + +54 +a¢_DEF_UEID_GNB_DU_gs_1 +, + +55 ( +a¢_DEF_UEID_GNB_DU_gs_1 +) + +56 /( +a¢_DEF_UEID_GNB_DU_gs_1 +[0]), + +57 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +58 +a¢_MBR_UEID_GNB_DU_1 +, + +60 & +a¢_SPC_UEID_GNB_DU_¥ecs_1 + + + @UEID-GNB.c + +8  + ~"UEID-GNB.h +" + +10  + ~"UEID-GNB-CU-F1AP-ID-Li¡.h +" + +11  + ~"UEID-GNB-CU-CP-E1AP-ID-Li¡.h +" + +12  + ~"Glob®GNB-ID.h +" + +13  + ~"Glob®NGRANNodeID.h +" + +14 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_GNB_1 +[] = { + +15 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_GNB +, +amf_UE_NGAP_ID +), + +16 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +18 & +a¢_DEF_AMF_UE_NGAP_ID +, + +24 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_GNB +, +guami +), + +25 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +27 & +a¢_DEF_GUAMI +, + +33 { +ATF_POINTER +, 6, +off£tof +( +UEID_GNB +, +gNB_CU_UE_F1AP_ID_Li¡ +), + +34 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +36 & +a¢_DEF_UEID_GNB_CU_F1AP_ID_Li¡ +, + +42 { +ATF_POINTER +, 5, +off£tof +( +UEID_GNB +, +gNB_CU_CP_UE_E1AP_ID_Li¡ +), + +43 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +45 & +a¢_DEF_UEID_GNB_CU_CP_E1AP_ID_Li¡ +, + +51 { +ATF_POINTER +, 4, +off£tof +( +UEID_GNB +, +¿n_UEID +), + +52 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +54 & +a¢_DEF_RANUEID +, + +60 { +ATF_POINTER +, 3, +off£tof +( +UEID_GNB +, +m_NG_RAN_UE_XnAP_ID +), + +61 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +63 & +a¢_DEF_NG_RANnodeUEXnAPID +, + +69 { +ATF_POINTER +, 2, +off£tof +( +UEID_GNB +, +glob®GNB_ID +), + +70 ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), + +72 & +a¢_DEF_Glob®GNB_ID +, + +78 { +ATF_POINTER +, 1, +off£tof +( +UEID_GNB +, +glob®NG_RANNode_ID +), + +79 ( +ASN_TAG_CLASS_CONTEXT + | (7 << 2)), + +81 & +a¢_DEF_Glob®NGRANNodeID +, + +88 cÚ¡  + ga¢_MAP_UEID_GNB_oms_1 +[] = { 2, 3, 4, 5, 6, 7 }; + +89 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_GNB_gs_1 +[] = { + +90 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +92 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_GNB_g2–_1 +[] = { + +93 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +94 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +95 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +96 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +97 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +98 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 }, + +99 { ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), 6, 0, 0 }, + +100 { ( +ASN_TAG_CLASS_CONTEXT + | (7 << 2)), 7, 0, 0 } + +102 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_GNB_¥ecs_1 + = { + +103 ( +UEID_GNB +), + +104 +off£tof +( +UEID_GNB +, +_a¢_ùx +), + +105 +a¢_MAP_UEID_GNB_g2–_1 +, + +107 +a¢_MAP_UEID_GNB_oms_1 +, + +111 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_GNB + = { + +114 & +a¢_OP_SEQUENCE +, + +115 +a¢_DEF_UEID_GNB_gs_1 +, + +116 ( +a¢_DEF_UEID_GNB_gs_1 +) + +117 /( +a¢_DEF_UEID_GNB_gs_1 +[0]), + +118 +a¢_DEF_UEID_GNB_gs_1 +, + +119 ( +a¢_DEF_UEID_GNB_gs_1 +) + +120 /( +a¢_DEF_UEID_GNB_gs_1 +[0]), + +121 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +122 +a¢_MBR_UEID_GNB_1 +, + +124 & +a¢_SPC_UEID_GNB_¥ecs_1 + + + @UEID-NG-ENB-DU.c + +8  + ~"UEID-NG-ENB-DU.h +" + +10 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_NG_ENB_DU_1 +[] = { + +11 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_NG_ENB_DU +, +ng_eNB_CU_UE_W1AP_ID +), + +12 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +14 & +a¢_DEF_NGENB_CU_UE_W1AP_ID +, + +21 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_NG_ENB_DU_gs_1 +[] = { + +22 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +24 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_NG_ENB_DU_g2–_1 +[] = { + +25 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 } + +27 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_NG_ENB_DU_¥ecs_1 + = { + +28 ( +UEID_NG_ENB_DU +), + +29 +off£tof +( +UEID_NG_ENB_DU +, +_a¢_ùx +), + +30 +a¢_MAP_UEID_NG_ENB_DU_g2–_1 +, + +35 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_NG_ENB_DU + = { + +38 & +a¢_OP_SEQUENCE +, + +39 +a¢_DEF_UEID_NG_ENB_DU_gs_1 +, + +40 ( +a¢_DEF_UEID_NG_ENB_DU_gs_1 +) + +41 /( +a¢_DEF_UEID_NG_ENB_DU_gs_1 +[0]), + +42 +a¢_DEF_UEID_NG_ENB_DU_gs_1 +, + +43 ( +a¢_DEF_UEID_NG_ENB_DU_gs_1 +) + +44 /( +a¢_DEF_UEID_NG_ENB_DU_gs_1 +[0]), + +45 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +46 +a¢_MBR_UEID_NG_ENB_DU_1 +, + +48 & +a¢_SPC_UEID_NG_ENB_DU_¥ecs_1 + + + @UEID-NG-ENB.c + +8  + ~"UEID-NG-ENB.h +" + +10  + ~"Glob®NgENB-ID.h +" + +11  + ~"Glob®NGRANNodeID.h +" + +12 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_NG_ENB_1 +[] = { + +13 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_NG_ENB +, +amf_UE_NGAP_ID +), + +14 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +16 & +a¢_DEF_AMF_UE_NGAP_ID +, + +22 { +ATF_NOFLAGS +, 0, +off£tof +( +UEID_NG_ENB +, +guami +), + +23 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +25 & +a¢_DEF_GUAMI +, + +31 { +ATF_POINTER +, 4, +off£tof +( +UEID_NG_ENB +, +ng_eNB_CU_UE_W1AP_ID +), + +32 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +34 & +a¢_DEF_NGENB_CU_UE_W1AP_ID +, + +40 { +ATF_POINTER +, 3, +off£tof +( +UEID_NG_ENB +, +m_NG_RAN_UE_XnAP_ID +), + +41 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +43 & +a¢_DEF_NG_RANnodeUEXnAPID +, + +49 { +ATF_POINTER +, 2, +off£tof +( +UEID_NG_ENB +, +glob®NgENB_ID +), + +50 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +52 & +a¢_DEF_Glob®NgENB_ID +, + +58 { +ATF_POINTER +, 1, +off£tof +( +UEID_NG_ENB +, +glob®NG_RANNode_ID +), + +59 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +61 & +a¢_DEF_Glob®NGRANNodeID +, + +68 cÚ¡  + ga¢_MAP_UEID_NG_ENB_oms_1 +[] = { 2, 3, 4, 5 }; + +69 cÚ¡ +b”_Žv_g_t + + ga¢_DEF_UEID_NG_ENB_gs_1 +[] = { + +70 ( +ASN_TAG_CLASS_UNIVERSAL + | (16 << 2)) + +72 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_NG_ENB_g2–_1 +[] = { + +73 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +74 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +75 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +76 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +77 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +78 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 } + +80 +a¢_SEQUENCE_¥ecifics_t + + ga¢_SPC_UEID_NG_ENB_¥ecs_1 + = { + +81 ( +UEID_NG_ENB +), + +82 +off£tof +( +UEID_NG_ENB +, +_a¢_ùx +), + +83 +a¢_MAP_UEID_NG_ENB_g2–_1 +, + +85 +a¢_MAP_UEID_NG_ENB_oms_1 +, + +89 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID_NG_ENB + = { + +92 & +a¢_OP_SEQUENCE +, + +93 +a¢_DEF_UEID_NG_ENB_gs_1 +, + +94 ( +a¢_DEF_UEID_NG_ENB_gs_1 +) + +95 /( +a¢_DEF_UEID_NG_ENB_gs_1 +[0]), + +96 +a¢_DEF_UEID_NG_ENB_gs_1 +, + +97 ( +a¢_DEF_UEID_NG_ENB_gs_1 +) + +98 /( +a¢_DEF_UEID_NG_ENB_gs_1 +[0]), + +99 { 0, 0, +SEQUENCE_cÚ¡¿št + }, + +100 +a¢_MBR_UEID_NG_ENB_1 +, + +102 & +a¢_SPC_UEID_NG_ENB_¥ecs_1 + + + @UEID.c + +8  + ~"UEID.h +" + +10  + ~"UEID-GNB.h +" + +11  + ~"UEID-GNB-DU.h +" + +12  + ~"UEID-GNB-CU-UP.h +" + +13  + ~"UEID-NG-ENB.h +" + +14  + ~"UEID-NG-ENB-DU.h +" + +15  + ~"UEID-EN-GNB.h +" + +16  + ~"UEID-ENB.h +" + +17 +a¢_³r_cÚ¡¿šts_t + +a¢_PER_ty³_UEID_cÚ¡r_1 + + gCC_NOTUSED + = { + +18 { +APC_CONSTRAINED + | +APC_EXTENSIBLE +, 3, 3, 0, 6 } , + +19 { +APC_UNCONSTRAINED +, -1, -1, 0, 0 }, + +22 +a¢_TYPE_memb”_t + + ga¢_MBR_UEID_1 +[] = { + +23 { +ATF_POINTER +, 0, +off£tof +( +UEID +, +choiû +. +gNB_UEID +), + +24 ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), + +26 & +a¢_DEF_UEID_GNB +, + +32 { +ATF_POINTER +, 0, +off£tof +( +UEID +, +choiû +. +gNB_DU_UEID +), + +33 ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), + +35 & +a¢_DEF_UEID_GNB_DU +, + +41 { +ATF_POINTER +, 0, +off£tof +( +UEID +, +choiû +. +gNB_CU_UP_UEID +), + +42 ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), + +44 & +a¢_DEF_UEID_GNB_CU_UP +, + +50 { +ATF_POINTER +, 0, +off£tof +( +UEID +, +choiû +. +ng_eNB_UEID +), + +51 ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), + +53 & +a¢_DEF_UEID_NG_ENB +, + +59 { +ATF_POINTER +, 0, +off£tof +( +UEID +, +choiû +. +ng_eNB_DU_UEID +), + +60 ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), + +62 & +a¢_DEF_UEID_NG_ENB_DU +, + +68 { +ATF_POINTER +, 0, +off£tof +( +UEID +, +choiû +. +’_gNB_UEID +), + +69 ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), + +71 & +a¢_DEF_UEID_EN_GNB +, + +77 { +ATF_POINTER +, 0, +off£tof +( +UEID +, +choiû +. +eNB_UEID +), + +78 ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), + +80 & +a¢_DEF_UEID_ENB +, + +87 cÚ¡ +a¢_TYPE_g2memb”_t + + ga¢_MAP_UEID_g2–_1 +[] = { + +88 { ( +ASN_TAG_CLASS_CONTEXT + | (0 << 2)), 0, 0, 0 }, + +89 { ( +ASN_TAG_CLASS_CONTEXT + | (1 << 2)), 1, 0, 0 }, + +90 { ( +ASN_TAG_CLASS_CONTEXT + | (2 << 2)), 2, 0, 0 }, + +91 { ( +ASN_TAG_CLASS_CONTEXT + | (3 << 2)), 3, 0, 0 }, + +92 { ( +ASN_TAG_CLASS_CONTEXT + | (4 << 2)), 4, 0, 0 }, + +93 { ( +ASN_TAG_CLASS_CONTEXT + | (5 << 2)), 5, 0, 0 }, + +94 { ( +ASN_TAG_CLASS_CONTEXT + | (6 << 2)), 6, 0, 0 } + +96 +a¢_CHOICE_¥ecifics_t + + ga¢_SPC_UEID_¥ecs_1 + = { + +97 ( +UEID +), + +98 +off£tof +( +UEID +, +_a¢_ùx +), + +99 +off£tof +( +UEID +, +´e£Á +), + +100 ((( +UEID + *)0)-> +´e£Á +), + +101 +a¢_MAP_UEID_g2–_1 +, + +106 +a¢_TYPE_desütÜ_t + + ga¢_DEF_UEID + = { + +109 & +a¢_OP_CHOICE +, + +114 { 0, & +a¢_PER_ty³_UEID_cÚ¡r_1 +, +CHOICE_cÚ¡¿št + }, + +115 +a¢_MBR_UEID_1 +, + +117 & +a¢_SPC_UEID_¥ecs_1 + + + @asn_SEQUENCE_OF.c + +5  + ~ + +6  + ~ + +8  + $A_SEQUENCE_OF +(è + ta¢_£qu’û +; + +11 + $a¢_£qu’û_d– +(* +a¢_£qu’û_of_x +,  +numb” +,  +_do_ä“ +) { + +12 +a¢_£qu’û + * +as + = (a¢_£qu’û *) +a¢_£qu’û_of_x +; + +14 if( +as +) { + +15 * +±r +; + +16  +n +; + +18 if( +numb” + < 0 ||‚umb” >ð +as +-> +couÁ +) + +21 if( +_do_ä“ + && +as +-> +ä“ +) { + +22 +±r + = +as +-> +¬¿y +[ +numb” +]; + +24 +±r + = 0; + +30 -- +as +-> +couÁ +; + +31  +n + = +numb” +;‚ < +as +-> +couÁ +;‚++) + +32 +as +-> +¬¿y +[ +n +] =‡s->array[n+1]; + +38 if( +±r +è +as +-> + `ä“ +(ptr); + +40 + } +} + + @asn_SET_OF.c + +5  + ~ + +6  + ~ + +7  + ~<”ºo.h +> + +13 + $a¢_£t_add +(* +a¢_£t_of_x +, * +±r +) { + +14 +a¢_ªÚymous_£t_ + * +as + = + `_A_SET_FROM_VOID +( +a¢_£t_of_x +); + +16 if( +as + =ð0 || +±r + == 0) { + +17 +”ºo + = +EINVAL +; + +24 if( +as +-> +couÁ + =ðas-> +size +) { + +25  +_Ãwsize + = +as +-> +size + ? (as->size << 1) : 4; + +26 * +_Ãw_¬r +; + +27 +_Ãw_¬r + = + `REALLOC +( +as +-> +¬¿y +, +_Ãwsize + * (as->array[0])); + +28 if( +_Ãw_¬r +) { + +29 +as +-> +¬¿y + = (**) +_Ãw_¬r +; + +30 +as +-> +size + = +_Ãwsize +; + +37 +as +-> +¬¿y +[as-> +couÁ +++] = +±r +; + +40 + } +} + +43 + $a¢_£t_d– +(* +a¢_£t_of_x +,  +numb” +,  +_do_ä“ +) { + +44 +a¢_ªÚymous_£t_ + * +as + = + `_A_SET_FROM_VOID +( +a¢_£t_of_x +); + +46 if( +as +) { + +47 * +±r +; + +48 if( +numb” + < 0 ||‚umb” >ð +as +-> +couÁ +) + +51 if( +_do_ä“ + && +as +-> +ä“ +) { + +52 +±r + = +as +-> +¬¿y +[ +numb” +]; + +54 +±r + = 0; + +57 +as +-> +¬¿y +[ +numb” +] =‡s->¬¿y[--as-> +couÁ +]; + +63 if( +±r +è +as +-> + `ä“ +(ptr); + +65 + } +} + +71 + $a¢_£t_em±y +(* +a¢_£t_of_x +) { + +72 +a¢_ªÚymous_£t_ + * +as + = + `_A_SET_FROM_VOID +( +a¢_£t_of_x +); + +74 if( +as +) { + +75 if( +as +-> +¬¿y +) { + +76 if( +as +-> +ä“ +) { + +77  +as +-> +couÁ +--) + +78 +as +-> + `ä“ +×s-> +¬¿y +[as-> +couÁ +]); + +80 + `FREEMEM +( +as +-> +¬¿y +); + +81 +as +-> +¬¿y + = 0; + +83 +as +-> +couÁ + = 0; + +84 +as +-> +size + = 0; + +87 + } +} + + @asn_application.c + +5  + ~ + +6  + ~ + +7  + ~<”ºo.h +> + +9  +a¢_’c_rv®_t + +a¢_’code_š‹º® +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +10 +a¢_Œªsãr_syÁax + +syÁax +, + +11 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +12 cÚ¡ * +¥Œ +, + +13 +a¢_­p_cÚsume_by‹s_f + * +ÿÎback +, + +14 * +ÿÎback_key +); + +17  + sÿÎback_couÁ_by‹s_key + { + +18 +a¢_­p_cÚsume_by‹s_f + * + mÿÎback +; + +19 * + mÿÎback_key +; + +20 +size_t + + mcompu‹d_size +; + +27 + $ÿÎback_couÁ_by‹s_cb +(cÚ¡ * +d©a +, +size_t + +size +, * +keyp +) { + +28  +ÿÎback_couÁ_by‹s_key + * +key + = +keyp +; + +29  +»t +; + +31 +»t + = +key +-> + `ÿÎback +( +d©a +, +size +, key-> +ÿÎback_key +); + +32 if( +»t + >= 0) { + +33 +key +-> +compu‹d_size + +ð +size +; + +36  +»t +; + +37 + } +} + +39  + sov”run_’cod”_key + { + +40 * + mbufãr +; + +41 +size_t + + mbufãr_size +; + +42 +size_t + + mcompu‹d_size +; + +45  + sdyÇmic_’cod”_key + { + +46 * + mbufãr +; + +47 +size_t + + mbufãr_size +; + +48 +size_t + + mcompu‹d_size +; + +51  + sÿÎback_çžu»_ÿtch_key + { + +52 +a¢_­p_cÚsume_by‹s_f + * + mÿÎback +; + +53 * + mÿÎback_key +; + +54  + mÿÎback_çžed +; + +62 + $ov”run_’cod”_cb +(cÚ¡ * +d©a +, +size_t + +size +, * +keyp +) { + +63  +ov”run_’cod”_key + * +key + = +keyp +; + +65 if( +key +-> +compu‹d_size + + +size + > key-> +bufãr_size +) { + +70 +key +-> +bufãr_size + = 0; + +72 + `memýy +((*) +key +-> +bufãr + + key-> +compu‹d_size +, +d©a +, +size +); + +74 +key +-> +compu‹d_size + +ð +size +; + +77 + } +} + +84 + $dyÇmic_’cod”_cb +(cÚ¡ * +d©a +, +size_t + +size +, * +keyp +) { + +85  +dyÇmic_’cod”_key + * +key + = +keyp +; + +87 if( +key +-> +bufãr +) { + +88 if( +key +-> +compu‹d_size + + +size + >ðkey-> +bufãr_size +) { + +89 * +p +; + +90 +size_t + +Ãw_size + = +key +-> +bufãr_size +; + +93 +Ãw_size + *= 2; + +94 }  +Ãw_size + <ð +key +-> +compu‹d_size + + +size +); + +96 +p + = + `REALLOC +( +key +-> +bufãr +, +Ãw_size +); + +97 if( +p +) { + +98 +key +-> +bufãr + = +p +; + +99 +key +-> +bufãr_size + = +Ãw_size +; + +101 + `FREEMEM +( +key +-> +bufãr +); + +102 +key +-> +bufãr + = 0; + +103 +key +-> +bufãr_size + = 0; + +104 +key +-> +compu‹d_size + +ð +size +; + +108 + `memýy +((*) +key +-> +bufãr + + key-> +compu‹d_size +, +d©a +, +size +); + +111 +key +-> +compu‹d_size + +ð +size +; + +114 + } +} + +120 + $ÿÎback_çžu»_ÿtch_cb +(cÚ¡ * +d©a +, +size_t + +size +, * +keyp +) { + +121  +ÿÎback_çžu»_ÿtch_key + * +key + = +keyp +; + +122  +»t +; + +124 +»t + = +key +-> + `ÿÎback +( +d©a +, +size +, key-> +ÿÎback_key +); + +125 if( +»t + < 0) { + +126 +key +-> +ÿÎback_çžed + = 1; + +129  +»t +; + +130 + } +} + +132 +a¢_’c_rv®_t + + +133 + $a¢_’code +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +134 +a¢_Œªsãr_syÁax + +syÁax +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +135 cÚ¡ * +¥Œ +, +a¢_­p_cÚsume_by‹s_f + * +ÿÎback +, * +ÿÎback_key +) { + +136  +ÿÎback_çžu»_ÿtch_key + +cb_key +; + +137 +a¢_’c_rv®_t + +” + = {0,0,0}; + +139 if(! +ÿÎback +) { + +140 +”ºo + = +EINVAL +; + +141 +ASN__ENCODE_FAILED +; + +144 +cb_key +. +ÿÎback + = callback; + +145 +cb_key +. +ÿÎback_key + = callback_key; + +146 +cb_key +. +ÿÎback_çžed + = 0; + +148 +” + = + `a¢_’code_š‹º® +( +Ýt_codec_ùx +, +syÁax +, +td +, +¥Œ +, + +149 +ÿÎback_çžu»_ÿtch_cb +, & +cb_key +); + +150 if( +cb_key +. +ÿÎback_çžed +) { + +151 + `as£¹ +( +” +. +’coded + == -1); + +152 + `as£¹ +( +”ºo + =ð +EBADF +); + +153 +”ºo + = +EIO +; + +156  +” +; + +157 + } +} + +159 +a¢_’c_rv®_t + + +160 + $a¢_’code_to_bufãr +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +161 +a¢_Œªsãr_syÁax + +syÁax +, + +162 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +163 * +bufãr +, +size_t + +bufãr_size +) { + +164  +ov”run_’cod”_key + +buf_key +; + +165 +a¢_’c_rv®_t + +” + = {0,0,0}; + +167 if( +bufãr_size + > 0 && ! +bufãr +) { + +168 +”ºo + = +EINVAL +; + +169 +ASN__ENCODE_FAILED +; + +172 +buf_key +. +bufãr + = buffer; + +173 +buf_key +. +bufãr_size + = buffer_size; + +174 +buf_key +. +compu‹d_size + = 0; + +176 +” + = + `a¢_’code_š‹º® +( +Ýt_codec_ùx +, +syÁax +, +td +, +¥Œ +, + +177 +ov”run_’cod”_cb +, & +buf_key +); + +179 if( +” +. +’coded + >ð0 && ( +size_t +ër.’coded !ð +buf_key +. +compu‹d_size +) { + +180 + `ASN_DEBUG +("a¢_’code(è»tuºed %" +ASN_PRI_SSIZE + + +181 " y‘…roduûd %" +ASN_PRI_SIZE + " bytes", + +182 +” +. +’coded +, +buf_key +. +compu‹d_size +); + +183 + `as£¹ +( +” +. +’coded + < 0 || ( +size_t +ër.’coded =ð +buf_key +. +compu‹d_size +); + +186  +” +; + +187 + } +} + +189 +a¢_’code_to_Ãw_bufãr_»suÉ_t + + +190 + $a¢_’code_to_Ãw_bufãr +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +191 +a¢_Œªsãr_syÁax + +syÁax +, + +192 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +) { + +193  +dyÇmic_’cod”_key + +buf_key +; + +194 +a¢_’code_to_Ãw_bufãr_»suÉ_t + +»s +; + +196 +buf_key +. +bufãr_size + = 16; + +197 +buf_key +. +bufãr + = + `MALLOC +(buf_key. +bufãr_size +); + +198 +buf_key +. +compu‹d_size + = 0; + +200 +»s +. +»suÉ + = + `a¢_’code_š‹º® +( +Ýt_codec_ùx +, +syÁax +, +td +, +¥Œ +, + +201 +dyÇmic_’cod”_cb +, & +buf_key +); + +203 if( +»s +. +»suÉ +. +’coded + >= 0 + +204 && ( +size_t +) +»s +. +»suÉ +. +’coded + !ð +buf_key +. +compu‹d_size +) { + +205 + `ASN_DEBUG +("a¢_’code(è»tuºed %" +ASN_PRI_SSIZE + + +206 " y‘…roduûd %" +ASN_PRI_SIZE + " bytes", + +207 +»s +. +»suÉ +. +’coded +, +buf_key +. +compu‹d_size +); + +208 + `as£¹ +( +»s +. +»suÉ +. +’coded + < 0 + +209 || ( +size_t +) +»s +. +»suÉ +. +’coded + =ð +buf_key +. +compu‹d_size +); + +212 +»s +. +bufãr + = +buf_key +.buffer; + +215 if( +»s +. +bufãr +) { + +216 + `as£¹ +( +buf_key +. +compu‹d_size + < buf_key. +bufãr_size +); + +217 ((*) +»s +. +bufãr +)[ +buf_key +. +compu‹d_size +] = '\0'; + +220  +»s +; + +221 + } +} + +223  +a¢_’c_rv®_t + + +224 + $a¢_’code_š‹º® +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +225 +a¢_Œªsãr_syÁax + +syÁax +, + +226 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +227 +a¢_­p_cÚsume_by‹s_f + * +ÿÎback +, * +ÿÎback_key +) { + +228 +a¢_’c_rv®_t + +” + = {0,0,0}; + +229 +x”_’cod”_æags_e + +x”_æags + = +XER_F_CANONICAL +; + +231 () +Ýt_codec_ùx +; + +233 if(! +td + || ! +¥Œ +) { + +234 +”ºo + = +EINVAL +; + +235 +ASN__ENCODE_FAILED +; + +238  +syÁax +) { + +239  +ATS_NONSTANDARD_PLAINTEXT +: + +240 if( +td +-> +Ý +-> +´št_¡ruù +) { + +241  +ÿÎback_couÁ_by‹s_key + +cb_key +; + +242 +cb_key +. +ÿÎback + = callback; + +243 +cb_key +. +ÿÎback_key + = callback_key; + +244 +cb_key +. +compu‹d_size + = 0; + +245 if( +td +-> +Ý +-> + `´št_¡ruù +Ñd, +¥Œ +, 1, +ÿÎback_couÁ_by‹s_cb +, + +246 & +cb_key +) + +248 || + `ÿÎback_couÁ_by‹s_cb +("\n", 1, & +cb_key +) < 0) { + +249 +”ºo + = +EBADF +; + +250 +” +. +’coded + = -1; + +251 +” +. +çžed_ty³ + = +td +; + +252 +” +. +¡ruùu»_±r + = +¥Œ +; + +254 +” +. +’coded + = +cb_key +. +compu‹d_size +; + +255 +” +. +çžed_ty³ + = 0; + +256 +” +. +¡ruùu»_±r + = 0; + +259 +”ºo + = +ENOENT +; + +260 +ASN__ENCODE_FAILED +; + +264  +ATS_RANDOM +: + +265 +”ºo + = +ENOENT +; + +266 +ASN__ENCODE_FAILED +; + +268  +ATS_BER +: + +271  +ATS_DER +: + +272 if( +td +-> +Ý +-> +d”_’cod” +) { + +273 +” + = + `d”_’code +( +td +, +¥Œ +, +ÿÎback +, +ÿÎback_key +); + +274 if( +” +. +’coded + == -1) { + +275 if( +” +. +çžed_ty³ + &&ƒr.çžed_ty³-> +Ý +-> +d”_’cod” +) { + +276 +”ºo + = +EBADF +; + +278 +”ºo + = +ENOENT +; + +282 +”ºo + = +ENOENT +; + +283 +ASN__ENCODE_FAILED +; + +286  +ATS_CER +: + +287 +”ºo + = +ENOENT +; + +288 +ASN__ENCODE_FAILED +; + +290 #ifdeà +ASN_DISABLE_OER_SUPPORT + + +291  +ATS_BASIC_OER +: + +292  +ATS_CANONICAL_OER +: + +293 +”ºo + = +ENOENT +; + +294 +ASN__ENCODE_FAILED +; + +297  +ATS_BASIC_OER +: + +300  +ATS_CANONICAL_OER +: + +301 if( +td +-> +Ý +-> +Ûr_’cod” +) { + +302 +” + = + `Ûr_’code +( +td +, +¥Œ +, +ÿÎback +, +ÿÎback_key +); + +303 if( +” +. +’coded + == -1) { + +304 if( +” +. +çžed_ty³ + &&ƒr.çžed_ty³-> +Ý +-> +Ûr_’cod” +) { + +305 +”ºo + = +EBADF +; + +307 +”ºo + = +ENOENT +; + +311 +”ºo + = +ENOENT +; + +312 +ASN__ENCODE_FAILED +; + +317 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +318  +ATS_UNALIGNED_BASIC_PER +: + +319  +ATS_UNALIGNED_CANONICAL_PER +: + +320  +ATS_ALIGNED_BASIC_PER +: + +321  +ATS_ALIGNED_CANONICAL_PER +: + +322 +”ºo + = +ENOENT +; + +323 +ASN__ENCODE_FAILED +; + +326  +ATS_UNALIGNED_BASIC_PER +: + +329  +ATS_UNALIGNED_CANONICAL_PER +: + +330 if( +td +-> +Ý +-> +u³r_’cod” +) { + +331 +” + = + `u³r_’code +( +td +, 0, +¥Œ +, +ÿÎback +, +ÿÎback_key +); + +332 if( +” +. +’coded + == -1) { + +333 if( +” +. +çžed_ty³ + &&ƒr.çžed_ty³-> +Ý +-> +u³r_’cod” +) { + +334 +”ºo + = +EBADF +; + +336 +”ºo + = +ENOENT +; + +339 + `ASN_DEBUG +("Com¶‘’coded iÀ%ld b™s", () +” +. +’coded +); + +340 if( +” +. +’coded + == 0) { + +342 if( + `ÿÎback +("\0", 1, +ÿÎback_key +) < 0) { + +343 +”ºo + = +EBADF +; + +344 +ASN__ENCODE_FAILED +; + +346 +” +. +’coded + = 8; + +349 +” +. +’coded + = (er.encoded + 7) >> 3; + +352 +”ºo + = +ENOENT +; + +353 +ASN__ENCODE_FAILED +; + +356  +ATS_ALIGNED_BASIC_PER +: + +359  +ATS_ALIGNED_CANONICAL_PER +: + +360 if( +td +-> +Ý +-> +­”_’cod” +) { + +361 +” + = + `­”_’code +( +td +, 0, +¥Œ +, +ÿÎback +, +ÿÎback_key +); + +362 if( +” +. +’coded + == -1) { + +363 if( +” +. +çžed_ty³ + &&ƒr.çžed_ty³-> +Ý +-> +­”_’cod” +) { + +364 +”ºo + = +EBADF +; + +366 +”ºo + = +ENOENT +; + +369 + `ASN_DEBUG +("Com¶‘’coded iÀ%ld b™s", () +” +. +’coded +); + +370 if( +” +. +’coded + == 0) { + +372 if( + `ÿÎback +("\0", 1, +ÿÎback_key +) < 0) { + +373 +”ºo + = +EBADF +; + +374 +ASN__ENCODE_FAILED +; + +376 +” +. +’coded + = 8; + +379 +” +. +’coded + = (er.encoded + 7) >> 3; + +382 +”ºo + = +ENOENT +; + +383 +ASN__ENCODE_FAILED +; + +388  +ATS_BASIC_XER +: + +390 +x”_æags + &ð~ +XER_F_CANONICAL +; + +391 +x”_æags + |ð +XER_F_BASIC +; + +393  +ATS_CANONICAL_XER +: + +394 if( +td +-> +Ý +-> +x”_’cod” +) { + +395 +” + = + `x”_’code +( +td +, +¥Œ +, +x”_æags +, +ÿÎback +, +ÿÎback_key +); + +396 if( +” +. +’coded + == -1) { + +397 if( +” +. +çžed_ty³ + &&ƒr.çžed_ty³-> +Ý +-> +x”_’cod” +) { + +398 +”ºo + = +EBADF +; + +400 +”ºo + = +ENOENT +; + +404 +”ºo + = +ENOENT +; + +405 +ASN__ENCODE_FAILED +; + +410 +”ºo + = +ENOENT +; + +411 +ASN__ENCODE_FAILED +; + +414  +” +; + +415 + } +} + +417 +a¢_dec_rv®_t + + +418 + $a¢_decode +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +419 +a¢_Œªsãr_syÁax + +syÁax +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +420 ** +¥Œ +, cÚ¡ * +bufãr +, +size_t + +size +) { + +421 if(! +td + || !td-> +Ý + || ! +¥Œ + || ( +size + && ! +bufãr +)) { + +422 +ASN__DECODE_FAILED +; + +425  +syÁax +) { + +426  +ATS_CER +: + +427  +ATS_NONSTANDARD_PLAINTEXT +: + +429 +”ºo + = +ENOENT +; + +430 +ASN__DECODE_FAILED +; + +432  +ATS_RANDOM +: + +433 if(! +td +-> +Ý +-> +¿ndom_fžl +) { + +434 +ASN__DECODE_FAILED +; + +436 if( + `a¢_¿ndom_fžl +( +td +, +¥Œ +, 16000) == 0) { + +437 +a¢_dec_rv®_t + +»t + = { +RC_OK +, 0}; + +438  +»t +; + +440 +ASN__DECODE_FAILED +; + +445  +ATS_DER +: + +446  +ATS_BER +: + +447  + `b”_decode +( +Ýt_codec_ùx +, +td +, +¥Œ +, +bufãr +, +size +); + +449  +ATS_BASIC_OER +: + +450  +ATS_CANONICAL_OER +: + +451 #ifdeà +ASN_DISABLE_OER_SUPPORT + + +452 +”ºo + = +ENOENT +; + +453 +ASN__DECODE_FAILED +; + +455  + `Ûr_decode +( +Ýt_codec_ùx +, +td +, +¥Œ +, +bufãr +, +size +); + +458  +ATS_UNALIGNED_BASIC_PER +: + +459  +ATS_UNALIGNED_CANONICAL_PER +: + +460 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +461 +”ºo + = +ENOENT +; + +462 +ASN__DECODE_FAILED +; + +464  + `u³r_decode_com¶‘e +( +Ýt_codec_ùx +, +td +, +¥Œ +, +bufãr +, +size +); + +467  +ATS_ALIGNED_BASIC_PER +: + +468  +ATS_ALIGNED_CANONICAL_PER +: + +469 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +470 +”ºo + = +ENOENT +; + +471 +ASN__DECODE_FAILED +; + +473  + `­”_decode_com¶‘e +( +Ýt_codec_ùx +, +td +, +¥Œ +, +bufãr +, +size +); + +476  +ATS_BASIC_XER +: + +477  +ATS_CANONICAL_XER +: + +478  + `x”_decode +( +Ýt_codec_ùx +, +td +, +¥Œ +, +bufãr +, +size +); + +480 + } +} + + @asn_bit_data.c + +6  + ~ + +7  + ~ + +8  + ~ + +14 +a¢_b™_d©a_t + * + +15 + $a¢_b™_d©a_Ãw_cÚtiguous +(cÚ¡ * +d©a +, +size_t + +size_b™s +) { + +16 +size_t + +size_by‹s + = ( +size_b™s + + 7) / 8; + +17 +a¢_b™_d©a_t + * +pd +; + +18 +ušt8_t + * +by‹s +; + +21 +pd + = + `CALLOC +(1, (*pdè+ +size_by‹s + + 1); + +22 if(! +pd +) { + +23  +NULL +; + +25 +by‹s + = (*)(((*) +pd +) + (*pd)); + +26 + `memýy +( +by‹s +, +d©a +, +size_by‹s +); + +27 +by‹s +[ +size_by‹s +] = 0; + +28 +pd +-> +bufãr + = +by‹s +; + +29 +pd +-> +nboff + = 0; + +30 +pd +-> +nb™s + = +size_b™s +; + +32  +pd +; + +33 + } +} + +37 + $a¢_b™_d©a_¡ršg +( +a¢_b™_d©a_t + * +pd +) { + +38  +buf +[2][32]; + +39  +n +; + +40 +n + = (n+1) % 2; + +41 + `¢´štf +( +buf +[ +n +], (buf[n]), + +42 "{m=%" +ASN_PRI_SIZE + " span %" ASN_PRI_SIZE "[%" ASN_PRI_SIZE + +43 "..%" +ASN_PRI_SIZE + "] (%" ASN_PRI_SIZE ")}", + +44 +pd +-> +moved +, (( +ušŒ_t +)Õd-> +bufãr +è& 0xf),…d-> +nboff +,…d-> +nb™s +, + +45 +pd +-> +nb™s + -…d-> +nboff +); + +46  +buf +[ +n +]; + +47 + } +} + +50 + $a¢_g‘_undo +( +a¢_b™_d©a_t + * +pd +,  +nb™s +) { + +51 if(( +ssize_t +) +pd +-> +nboff + < +nb™s +) { + +52 + `as£¹ +(( +ssize_t +) +pd +-> +nboff + < +nb™s +); + +54 +pd +-> +nboff + -ð +nb™s +; + +55 +pd +-> +moved + -ð +nb™s +; + +57 + } +} + +62 +št32_t + + +63 + $a¢_g‘_ãw_b™s +( +a¢_b™_d©a_t + * +pd +,  +nb™s +) { + +64 +size_t + +off +; + +65 +ssize_t + +Æeá +; + +66 +ušt32_t + +accum +; + +67 cÚ¡ +ušt8_t + * +buf +; + +69 if( +nb™s + < 0) + +72 +Æeá + = +pd +-> +nb™s + -…d-> +nboff +; + +73 if( +nb™s + > +Æeá +) { + +74 +št32_t + +žv +, +vh—d +; + +75 if(! +pd +-> +»fžl + || +nb™s + > 31)  -1; + +77 + `ASN_DEBUG +("Obtainhe„est %d bits (want %d)", + +78 () +Æeá +, () +nb™s +); + +79 +žv + = + `a¢_g‘_ãw_b™s +( +pd +, +Æeá +); + +80 if( +žv + < 0)  -1; + +82 if( +pd +-> + `»fžl +(pd)) + +84 +nb™s + -ð +Æeá +; + +85 +vh—d + = + `a¢_g‘_ãw_b™s +( +pd +, +nb™s +); + +87 +žv + = (žv << +nb™s +è| +vh—d +; + +88  +žv +; + +94 if( +pd +-> +nboff + >= 8) { + +95 +pd +-> +bufãr + +ðÕd-> +nboff + >> 3); + +96 +pd +-> +nb™s + -ðÕd-> +nboff + & ~0x07); + +97 +pd +-> +nboff + &= 0x07; + +99 +pd +-> +moved + +ð +nb™s +; + +100 +pd +-> +nboff + +ð +nb™s +; + +101 +off + = +pd +-> +nboff +; + +102 +buf + = +pd +-> +bufãr +; + +107 if( +off + <= 8) + +108 +accum + = +nb™s + ? ( +buf +[0]è>> (8 - +off +) : 0; + +109 if( +off + <= 16) + +110 +accum + = (( +buf +[0] << 8è+ buf[1]è>> (16 - +off +); + +111 if( +off + <= 24) + +112 +accum + = (( +buf +[0] << 16è+ (buf[1] << 8è+ buf[2]è>> (24 - +off +); + +113 if( +off + <= 31) + +114 +accum + = ((( +ušt32_t +) +buf +[0] << 24) + (buf[1] << 16) + +115 + ( +buf +[2] << 8è+ (buf[3])è>> (32 - +off +); + +116 if( +nb™s + <= 31) { + +117 +a¢_b™_d©a_t + +d + = * +pd +; + +119 + `a¢_g‘_undo +(& +d +, +nb™s +); + +123 +accum + = + `a¢_g‘_ãw_b™s +(& +d +, +nb™s + - 24) << 24; + +124 +accum + |ð + `a¢_g‘_ãw_b™s +(& +d +, 24); + +126 + `a¢_g‘_undo +( +pd +, +nb™s +); + +130 +accum + &ð((( +ušt32_t +)1 << +nb™s +) - 1); + +132 + `ASN_DEBUG +(" [PER got %2d<=%2d bits => span %d %+ld[%d..%d]:%02x (%d) => 0x%x]", + +133 () +nb™s +, () +Æeá +, + +134 () +pd +-> +moved +, + +135 ((() +pd +-> +bufãr +) & 0xf), + +136 () +pd +-> +nboff +, (íd-> +nb™s +, + +137 (( +pd +-> +bufãr + !ð +NULL +)?pd->buffer[0]:0), + +138 ()( +pd +-> +nb™s + -…d-> +nboff +), + +139 () +accum +); + +141  +accum +; + +142 + } +} + +148 + $a¢_g‘_mªy_b™s +( +a¢_b™_d©a_t + * +pd +, +ušt8_t + * +d¡ +,  +®right +,  +nb™s +) { + +149 +št32_t + +v®ue +; + +151 if( +®right + && ( +nb™s + & 7)) { + +153 +v®ue + = + `a¢_g‘_ãw_b™s +( +pd +, +nb™s + & 0x07); + +154 if( +v®ue + < 0)  -1; + +155 * +d¡ +++ = +v®ue +; + +156 +nb™s + &= ~7; + +159  +nb™s +) { + +160 if( +nb™s + >= 24) { + +161 +v®ue + = + `a¢_g‘_ãw_b™s +( +pd +, 24); + +162 if( +v®ue + < 0)  -1; + +163 *( +d¡ +++èð +v®ue + >> 16; + +164 *( +d¡ +++èð +v®ue + >> 8; + +165 *( +d¡ +++èð +v®ue +; + +166 +nb™s + -= 24; + +168 +v®ue + = + `a¢_g‘_ãw_b™s +( +pd +, +nb™s +); + +169 if( +v®ue + < 0)  -1; + +170 if( +nb™s + & 7) { + +171 +v®ue + <<ð8 - ( +nb™s + & 7), + +172 +nb™s + += 8 - (nbits & 7); + +173 if( +nb™s + > 24) + +174 * +d¡ +++ = +v®ue + >> 24; + +176 if( +nb™s + > 16) + +177 * +d¡ +++ = +v®ue + >> 16; + +178 if( +nb™s + > 8) + +179 * +d¡ +++ = +v®ue + >> 8; + +180 * +d¡ +++ = +v®ue +; + +186 + } +} + +192 + $a¢_put_ãw_b™s +( +a¢_b™_ou_t + * +po +, +ušt32_t + +b™s +,  +ob™s +) { + +193 +size_t + +off +; + +194 +size_t + +omsk +; + +195 +ušt8_t + * +buf +; + +197 if( +ob™s + <= 0 || obits >= 32)  obits ? -1 : 0; + +199 + `ASN_DEBUG +("[PER…ut %d bits %xo %p+%d bits]", + +200 +ob™s +, () +b™s +, (*) +po +-> +bufãr +, (ío-> +nboff +); + +205 if( +po +-> +nboff + >= 8) { + +206 +po +-> +bufãr + +ðÕo-> +nboff + >> 3); + +207 +po +-> +nb™s + -ðÕo-> +nboff + & ~0x07); + +208 +po +-> +nboff + &= 0x07; + +214 if( +po +-> +nboff + + +ob™s + >…o-> +nb™s +) { + +215 +size_t + +com¶‘e_by‹s +; + +216 if(! +po +-> +bufãr +èpo->bufã¸ðpo-> +tmp¥aû +; + +217 +com¶‘e_by‹s + = ( +po +-> +bufãr + -…o-> +tmp¥aû +); + +218 + `ASN_DEBUG +("[PER output %ld complete + %ld]", + +219 () +com¶‘e_by‹s +, () +po +-> +æushed_by‹s +); + +220 if( +po +-> + `ouut +Õo-> +tmp¥aû +, +com¶‘e_by‹s +,…o-> +Ý_key +) < 0) + +222 if( +po +-> +nboff +) + +223 +po +-> +tmp¥aû +[0] =…o-> +bufãr +[0]; + +224 +po +-> +bufãr + =…o-> +tmp¥aû +; + +225 +po +-> +nb™s + = 8 * Õo-> +tmp¥aû +); + +226 +po +-> +æushed_by‹s + +ð +com¶‘e_by‹s +; + +232 +buf + = +po +-> +bufãr +; + +233 +omsk + = ~((1 << (8 - +po +-> +nboff +)) - 1); + +234 +off + = ( +po +-> +nboff + + +ob™s +); + +237 +b™s + &ð((( +ušt32_t +)1 << +ob™s +) - 1); + +239 + `ASN_DEBUG +("[PER ouˆ%d %u/%x (t=%d,o=%dè%x&%x=%x]", +ob™s +, + +240 () +b™s +, ()bits, + +241 () +po +-> +nboff +, () +off +, + +242 +buf +[0], ()( +omsk +&0xff), + +243 ()( +buf +[0] & +omsk +)); + +245 if( +off + <= 8) + +246 +po +-> +nboff + = +off +, + +247 +b™s + <<ð(8 - +off +), + +248 +buf +[0] = (buf[0] & +omsk +è| +b™s +; + +249 if( +off + <= 16) + +250 +po +-> +nboff + = +off +, + +251 +b™s + <<ð(16 - +off +), + +252 +buf +[0] = (buf[0] & +omsk +è| ( +b™s + >> 8), + +253 +buf +[1] = +b™s +; + +254 if( +off + <= 24) + +255 +po +-> +nboff + = +off +, + +256 +b™s + <<ð(24 - +off +), + +257 +buf +[0] = (buf[0] & +omsk +è| ( +b™s + >> 16), + +258 +buf +[1] = +b™s + >> 8, + +259 +buf +[2] = +b™s +; + +260 if( +off + <= 31) + +261 +po +-> +nboff + = +off +, + +262 +b™s + <<ð(32 - +off +), + +263 +buf +[0] = (buf[0] & +omsk +è| ( +b™s + >> 24), + +264 +buf +[1] = +b™s + >> 16, + +265 +buf +[2] = +b™s + >> 8, + +266 +buf +[3] = +b™s +; + +268 if( + `a¢_put_ãw_b™s +( +po +, +b™s + >> ( +ob™s + - 24), 24))  -1; + +269 if( + `a¢_put_ãw_b™s +( +po +, +b™s +, +ob™s + - 24))  -1; + +272 + `ASN_DEBUG +("[PER out %u/%x => %02x buf+%ld]", + +273 () +b™s +, ()b™s, +buf +[0], + +274 ()( +po +-> +bufãr + -…o-> +tmp¥aû +)); + +277 + } +} + +284 + $a¢_put_mªy_b™s +( +a¢_b™_ou_t + * +po +, cÚ¡ +ušt8_t + * +¤c +,  +nb™s +) { + +286  +nb™s +) { + +287 +ušt32_t + +v®ue +; + +289 if( +nb™s + >= 24) { + +290 +v®ue + = ( +¤c +[0] << 16) | (src[1] << 8) | src[2]; + +291 +¤c + += 3; + +292 +nb™s + -= 24; + +293 if( + `a¢_put_ãw_b™s +( +po +, +v®ue +, 24)) + +296 +v®ue + = +¤c +[0]; + +297 if( +nb™s + > 8) + +298 +v®ue + = (v®u<< 8è| +¤c +[1]; + +299 if( +nb™s + > 16) + +300 +v®ue + = (v®u<< 8è| +¤c +[2]; + +301 if( +nb™s + & 0x07) + +302 +v®ue + >>ð(8 - ( +nb™s + & 0x07)); + +303 if( + `a¢_put_ãw_b™s +( +po +, +v®ue +, +nb™s +)) + +310 + } +} + +314 + $a¢_put_®igÃd_æush +( +a¢_b™_ou_t + * +po +) { + +315 +ušt32_t + +unu£d_b™s + = (0x7 & (8 - ( +po +-> +nboff + & 0x07))); + +316 +size_t + +com¶‘e_by‹s + = + +317 ( +po +-> +bufãr + ?…o->bufã¸-…o-> +tmp¥aû + : 0è+ (Õo-> +nboff + + 7) >> 3); + +319 if( +unu£d_b™s +) { + +320 +po +-> +bufãr +[po-> +nboff + >> 3] &ð~0u << +unu£d_b™s +; + +323 if( +po +-> + `ouut +Õo-> +tmp¥aû +, +com¶‘e_by‹s +,…o-> +Ý_key +) < 0) { + +326 +po +-> +bufãr + =…o-> +tmp¥aû +; + +327 +po +-> +nboff + = 0; + +328 +po +-> +nb™s + = 8 * Õo-> +tmp¥aû +); + +329 +po +-> +æushed_by‹s + +ð +com¶‘e_by‹s +; + +332 + } +} + + @asn_codecs_prim.c + +5  + ~ + +6  + ~ + +7  + ~<”ºo.h +> + +12 +a¢_dec_rv®_t + + +13 + $b”_decode_´im™ive +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +14 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +15 cÚ¡ * +buf_±r +, +size_t + +size +,  +g_mode +) { + +16 +ASN__PRIMITIVE_TYPE_t + * +¡ + = (ASN__PRIMITIVE_TYPE_ˆ*)* +¥Œ +; + +17 +a¢_dec_rv®_t + +rv® +; + +18 +b”_Žv_Ën_t + +Ëngth + = 0; + +23 if( +¡ + =ð +NULL +) { + +24 +¡ + = ( +ASN__PRIMITIVE_TYPE_t + *) + `CALLOC +(1, (*st)); + +25 if( +¡ + =ð +NULL +è +ASN__DECODE_FAILED +; + +26 * +¥Œ + = (*) +¡ +; + +29 + `ASN_DEBUG +("Decoding %s‡s…lain…rimitive (tm=%d)", + +30 +td +-> +Çme +, +g_mode +); + +35 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, 0, +buf_±r +, +size +, + +36 +g_mode +, 0, & +Ëngth +, 0); + +37 if( +rv® +. +code + !ð +RC_OK +) + +38  +rv® +; + +40 + `ASN_DEBUG +("% Ëngth i %d by‹s", +td +-> +Çme +, () +Ëngth +); + +45 +buf_±r + = ((cÚ¡ *)buf_±rè+ +rv® +. +cÚsumed +; + +46 +size + -ð +rv® +. +cÚsumed +; + +47 if( +Ëngth + > ( +b”_Žv_Ën_t +) +size +) { + +48 +rv® +. +code + = +RC_WMORE +; + +49 +rv® +. +cÚsumed + = 0; + +50  +rv® +; + +53 +¡ +-> +size + = () +Ëngth +; + +55 if(( +¡ +-> +size +è!ð( +Ëngth +) + +56 && ( +b”_Žv_Ën_t +) +¡ +-> +size + !ð +Ëngth +) { + +57 +¡ +-> +size + = 0; + +58 +ASN__DECODE_FAILED +; + +61 +¡ +-> +buf + = ( +ušt8_t + *) + `MALLOC +( +Ëngth + + 1); + +62 if(! +¡ +-> +buf +) { + +63 +¡ +-> +size + = 0; + +64 +ASN__DECODE_FAILED +; + +67 + `memýy +( +¡ +-> +buf +, +buf_±r +, +Ëngth +); + +68 +¡ +-> +buf +[ +Ëngth +] = '\0'; + +70 +rv® +. +code + = +RC_OK +; + +71 +rv® +. +cÚsumed + +ð +Ëngth +; + +73 + `ASN_DEBUG +("Took %ld/%ld bytesoƒncode %s", + +74 () +rv® +. +cÚsumed +, + +75 () +Ëngth +, +td +-> +Çme +); + +77  +rv® +; + +78 + } +} + +83 +a¢_’c_rv®_t + + +84 + $d”_’code_´im™ive +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +85  +g_mode +, +b”_Žv_g_t + +g +, + +86 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +87 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +88 cÚ¡ +ASN__PRIMITIVE_TYPE_t + * +¡ + = (cÚ¡ ASN__PRIMITIVE_TYPE_ˆ*) +¥Œ +; + +90 + `ASN_DEBUG +("%s %s‡s‡…rimitiveype (tm=%d)", + +91 +cb +?"Encodšg":"E¡im©šg", +td +-> +Çme +, +g_mode +); + +93 +”v® +. +’coded + = + `d”_wr™e_gs +( +td +, +¡ +-> +size +, +g_mode +, 0, +g +, + +94 +cb +, +­p_key +); + +95 + `ASN_DEBUG +("% wrِg %d", +td +-> +Çme +, () +”v® +. +’coded +); + +96 if( +”v® +. +’coded + == -1) { + +97 +”v® +. +çžed_ty³ + = +td +; + +98 +”v® +. +¡ruùu»_±r + = +¥Œ +; + +99  +”v® +; + +102 if( +cb + && +¡ +-> +buf +) { + +103 if( + `cb +( +¡ +-> +buf +, st-> +size +, +­p_key +) < 0) { + +104 +”v® +. +’coded + = -1; + +105 +”v® +. +çžed_ty³ + = +td +; + +106 +”v® +. +¡ruùu»_±r + = +¥Œ +; + +107  +”v® +; + +110 + `as£¹ +( +¡ +-> +buf + || st-> +size + == 0); + +113 +”v® +. +’coded + +ð +¡ +-> +size +; + +114 + `ASN__ENCODED_OK +( +”v® +); + +115 + } +} + +118 + $ASN__PRIMITIVE_TYPE_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +119 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +120 +ASN__PRIMITIVE_TYPE_t + * +¡ + = (ASN__PRIMITIVE_TYPE_ˆ*) +¥Œ +; + +122 if(! +td + || ! +¥Œ +) + +125 + `ASN_DEBUG +("F»ešg % a ¨´im™ivty³", +td +-> +Çme +); + +127 if( +¡ +-> +buf +) + +128 + `FREEMEM +( +¡ +-> +buf +); + +130  +m‘hod +) { + +131  +ASFM_FREE_EVERYTHING +: + +132 + `FREEMEM +( +¥Œ +); + +134  +ASFM_FREE_UNDERLYING +: + +136  +ASFM_FREE_UNDERLYING_AND_RESET +: + +137 + `mem£t +( +¥Œ +, 0, ( +ASN__PRIMITIVE_TYPE_t +)); + +140 + } +} + +146  + sxdp_¬g_s + { + +147 cÚ¡ +a¢_TYPE_desütÜ_t + * + mty³_desütÜ +; + +148 * + m¡ruù_key +; + +149 +x”_´im™ive_body_decod”_f + * + m´im_body_decod” +; + +150  + mdecoded_som‘hšg +; + +151  + mwªt_mÜe +; + +160 + $x”_decode__uÃx³ùed_g +(* +key +, cÚ¡ * +chunk_buf +, +size_t + +chunk_size +) { + +161  +xdp_¬g_s + * +¬g + = (xdp_¬g_ *) +key +; + +162 +x”_pbd_rv® + +b»t +; + +167 + `as£¹ +( +chunk_size + && ((cÚ¡ *) +chunk_buf +)[0] == 0x3c); + +172 if( +¬g +-> +decoded_som‘hšg +) + +175 +b»t + = +¬g +-> + `´im_body_decod” +×rg-> +ty³_desütÜ +, + +176 +¬g +-> +¡ruù_key +, +chunk_buf +, +chunk_size +); + +177  +b»t +) { + +178  +XPBD_SYSTEM_FAILURE +: + +179  +XPBD_DECODER_LIMIT +: + +180  +XPBD_BROKEN_ENCODING +: + +182  +XPBD_BODY_CONSUMED +: + +184 +¬g +-> +decoded_som‘hšg + = 1; + +186  +XPBD_NOT_BODY_IGNORE +: + +191 + } +} + +193  +ssize_t + + +194 + $x”_decode__´im™ive_body +(* +key +, cÚ¡ * +chunk_buf +, +size_t + +chunk_size +,  +have_mÜe +) { + +195  +xdp_¬g_s + * +¬g + = (xdp_¬g_ *) +key +; + +196 +x”_pbd_rv® + +b»t +; + +197 +size_t + +Ëad_w¥_size +; + +199 if( +¬g +-> +decoded_som‘hšg +) { + +200 if( + `x”_wh™e¥aû_¥ª +( +chunk_buf +, +chunk_size +) == chunk_size) { + +206  +chunk_size +; + +214 if(! +have_mÜe +) { + +223 +¬g +-> +wªt_mÜe + = 1; + +227 +Ëad_w¥_size + = + `x”_wh™e¥aû_¥ª +( +chunk_buf +, +chunk_size +); + +228 +chunk_buf + = (cÚ¡ *)chunk_buà+ +Ëad_w¥_size +; + +229 +chunk_size + -ð +Ëad_w¥_size +; + +231 +b»t + = +¬g +-> + `´im_body_decod” +×rg-> +ty³_desütÜ +, + +232 +¬g +-> +¡ruù_key +, +chunk_buf +, +chunk_size +); + +233  +b»t +) { + +234  +XPBD_SYSTEM_FAILURE +: + +235  +XPBD_DECODER_LIMIT +: + +236  +XPBD_BROKEN_ENCODING +: + +238  +XPBD_BODY_CONSUMED +: + +240 +¬g +-> +decoded_som‘hšg + = 1; + +242  +XPBD_NOT_BODY_IGNORE +: + +243  +Ëad_w¥_size + + +chunk_size +; + +247 + } +} + +250 +a¢_dec_rv®_t + + +251 + $x”_decode_´im™ive +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +252 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +253 +size_t + +¡ruù_size +, cÚ¡ * +Ýt_mÇme +, + +254 cÚ¡ * +buf_±r +, +size_t + +size +, + +255 +x”_´im™ive_body_decod”_f + * +´im_body_decod” +) { + +256 cÚ¡ * +xml_g + = +Ýt_mÇme + ? o±_mÇm: +td +->xml_tag; + +257 +a¢_¡ruù_ùx_t + +s_ùx +; + +258  +xdp_¬g_s + +s_¬g +; + +259 +a¢_dec_rv®_t + +rc +; + +264 if(!* +¥Œ +) { + +265 * +¥Œ + = + `CALLOC +(1, +¡ruù_size +); + +266 if(!* +¥Œ +è +ASN__DECODE_FAILED +; + +269 + `mem£t +(& +s_ùx +, 0, (s_ctx)); + +270 +s_¬g +. +ty³_desütÜ + = +td +; + +271 +s_¬g +. +¡ruù_key + = * +¥Œ +; + +272 +s_¬g +. +´im_body_decod” + =…rim_body_decoder; + +273 +s_¬g +. +decoded_som‘hšg + = 0; + +274 +s_¬g +. +wªt_mÜe + = 0; + +276 +rc + = + `x”_decode_g’”® +( +Ýt_codec_ùx +, & +s_ùx +, & +s_¬g +, + +277 +xml_g +, +buf_±r +, +size +, + +278 +x”_decode__uÃx³ùed_g +, +x”_decode__´im™ive_body +); + +279  +rc +. +code +) { + +280  +RC_OK +: + +281 if(! +s_¬g +. +decoded_som‘hšg +) { + +282  +ch +; + +283 + `ASN_DEBUG +("Primitive body is‚ot„ecognized, " + +290 if( + `´im_body_decod” +( +s_¬g +. +ty³_desütÜ +, + +291 +s_¬g +. +¡ruù_key +, & +ch +, 0) + +292 !ð +XPBD_BODY_CONSUMED +) { + +296 +ASN__DECODE_FAILED +; + +300  +RC_WMORE +: + +305 +rc +. +cÚsumed + = 0; + +307  +RC_FAIL +: + +308 +rc +. +cÚsumed + = 0; + +309 if( +s_¬g +. +wªt_mÜe +) + +310 +rc +. +code + = +RC_WMORE +; + +312 +ASN__DECODE_FAILED +; + +315  +rc +; + +316 + } +} + + @asn_internal.c + +1  + ~ + +3 +ssize_t + + +4 + $a¢__fÜm©_to_ÿÎback +((* +cb +)(cÚ¡ *, +size_t +, * +key +), *key, + +5 cÚ¡ * +fmt +, ...) { + +6  +sü©ch +[64]; + +7 * +buf + = +sü©ch +; + +8 +size_t + +buf_size + = ( +sü©ch +); + +9  +wrÙe +; + +10  +cb_»t +; + +13 +va_li¡ + +¬gs +; + +14 + `va_¡¬t +( +¬gs +, +fmt +); + +16 +wrÙe + = + `v¢´štf +( +buf +, +buf_size +, +fmt +, +¬gs +); + +17 if( +wrÙe + < ( +ssize_t +) +buf_size +) { + +18 if( +wrÙe + < 0) { + +19 if( +buf + !ð +sü©ch +è + `FREEMEM +(buf); + +20 + `va_’d +( +¬gs +); + +26 +buf_size + <<= 1; + +27 if( +buf + =ð +sü©ch +) { + +28 +buf + = + `MALLOC +( +buf_size +); + +29 if(! +buf +è{ + `va_’d +( +¬gs +);  -1; } + +31 * +p + = + `REALLOC +( +buf +, +buf_size +); + +32 if(! +p +) { + +33 + `FREEMEM +( +buf +); + +34 + `va_’d +( +¬gs +); + +37 +buf + = +p +; + +41 +cb_»t + = + `cb +( +buf +, +wrÙe +, +key +); + +42 if( +buf + !ð +sü©ch +è + `FREEMEM +(buf); + +43 if( +cb_»t + < 0) { + +47  +wrÙe +; + +48 + } +} + + @asn_random_fill.c + +6  + ~ + +7  + ~ + +8  + ~ + +11 + $a¢_¿ndom_fžl +(cÚ¡  +a¢_TYPE_desütÜ_s + * +td +, ** +¡ruù_±r +, + +12 +size_t + +Ëngth +) { + +14 if( +td + &&d-> +Ý +-> +¿ndom_fžl +) { + +15 +a¢_¿ndom_fžl_»suÉ_t + +»s + = + +16 +td +-> +Ý +-> + `¿ndom_fžl +Ñd, +¡ruù_±r +, 0, +Ëngth +); + +17  ( +»s +. +code + =ð +ARFILL_OK +) ? 0 : -1; + +21 + } +} + +23  +uštmax_t + + +24 + $a¢__štmax_¿nge +( +štmax_t + +lb +, iÁmax_ˆ +ub +) { + +25 + `as£¹ +( +lb + <ð +ub +); + +26 if(( +ub + < 0è=ð( +lb + < 0)) { + +27  +ub + - +lb +; + +28 } if( +lb + < 0) { + +29  1 + (( +uštmax_t +) +ub + + (uštmax_t)-( +lb + + 1)); + +31 + `as£¹ +(!"Unreachable"); + +34 + } +} + +36 +štmax_t + + +37 + $a¢_¿ndom_b‘w“n +( +štmax_t + +lb +, iÁmax_ˆ +rb +) { + +38 if( +lb + =ð +rb +) { + +39  +lb +; + +41 cÚ¡ +uštmax_t + +štmax_max + = ((~(uintmax_t)0) >> 1); + +42 +uštmax_t + +¿nge + = + `a¢__štmax_¿nge +( +lb +, +rb +); + +43 +uštmax_t + +v®ue + = 0; + +44 +uštmax_t + +gÙ_’ŒÝy + = 0; + +46 + `as£¹ +( +RAND_MAX + > 0xffffff); + +47 + `as£¹ +( +¿nge + < +štmax_max +); + +49 ; +gÙ_’ŒÝy + < +¿nge +;) { + +50 +gÙ_’ŒÝy + = (got_entropy << 24) | 0xffffff; + +51 +v®ue + = (v®u<< 24è| ( + `¿ndom +() % 0xffffff); + +54  +lb + + ( +štmax_t +)( +v®ue + % ( +¿nge + + 1)); + +56 + } +} + + @ber_decoder.c + +5  + ~ + +7 #undeà +ADVANCE + + +8  + #ADVANCE +( +num_by‹s +) do { \ + +9 +size_t + +num + = +num_by‹s +; \ + +10 +±r + = ((cÚ¡ *íŒè+ +num +; \ + +11 +size + -ð +num +; \ + +12 +cÚsumed_my£lf + +ð +num +; \ + +13 } 0) + + ) + +14 #undeà +RETURN + + +15  + #RETURN +( +_code +) do { \ + +16 +a¢_dec_rv®_t + +rv® +; \ + +17 +rv® +. +code + = +_code +; \ + +18 if( +Ýt_ùx +èÝt_ùx-> +¡• + = step; \ + +19 if( +_code + =ð +RC_OK + || +Ýt_ùx +) \ + +20 +rv® +. +cÚsumed + = +cÚsumed_my£lf +; \ + +22 +rv® +. +cÚsumed + = 0; \ + +23  +rv® +; \ + +24 } 0) + + ) + +29 +a¢_dec_rv®_t + + +30 + $b”_decode +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +31 cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, ** +¡ruù_±r +, + +32 cÚ¡ * +±r +, +size_t + +size +) { + +33 +a¢_codec_ùx_t + +s_codec_ùx +; + +39 if( +Ýt_codec_ùx +) { + +40 if( +Ýt_codec_ùx +-> +max_¡ack_size +) { + +41 +s_codec_ùx + = * +Ýt_codec_ùx +; + +42 +Ýt_codec_ùx + = & +s_codec_ùx +; + +46 + `mem£t +(& +s_codec_ùx +, 0, (s_codec_ctx)); + +47 +s_codec_ùx +. +max_¡ack_size + = +ASN__DEFAULT_STACK_MAX +; + +48 +Ýt_codec_ùx + = & +s_codec_ùx +; + +54  +ty³_desütÜ +-> +Ý +-> + `b”_decod” +( +Ýt_codec_ùx +,ype_descriptor, + +55 +¡ruù_±r +, + +56 +±r +, +size +, + +59 + } +} + +64 +a¢_dec_rv®_t + + +65 + $b”_check_gs +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +66 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, +a¢_¡ruù_ùx_t + * +Ýt_ùx +, + +67 cÚ¡ * +±r +, +size_t + +size +,  +g_mode +,  +Ï¡_g_fÜm +, + +68 +b”_Žv_Ën_t + * +Ï¡_Ëngth +, * +Ýt_Žv_fÜm +) { + +69 +ssize_t + +cÚsumed_my£lf + = 0; + +70 +ssize_t + +g_Ën +; + +71 +ssize_t + +Ën_Ën +; + +72 +b”_Žv_g_t + +Žv_g +; + +73 +b”_Žv_Ën_t + +Žv_Ën +; + +74 +b”_Žv_Ën_t + +lim™_Ën + = -1; + +75  +ex³ù_00_‹rmš©Üs + = 0; + +76  +Žv_cÚ¡r + = -1; + +77  +¡• + = +Ýt_ùx + ? opt_ctx->step : 0; + +78  +gno +; + +83 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +84 + `RETURN +( +RC_FAIL +); + +108 +gno + = +¡• + + +109 + ( +g_mode +==1?-1:0) + +111 + `ASN_DEBUG +("ber_check_tags(%s, size=%ld,m=%d, step=%d,agno=%d)", + +112 +td +-> +Çme +, () +size +, +g_mode +, +¡• +, +gno +); + +115 if( +g_mode + =ð0 && +gno + =ð() +td +-> +gs_couÁ +) { + +121 +g_Ën + = + `b”_ãtch_g +( +±r +, +size +, & +Žv_g +); + +122  +g_Ën +) { + +123 -1: + `RETURN +( +RC_FAIL +); + +124 0: + `RETURN +( +RC_WMORE +); + +126 +Žv_cÚ¡r + = + `BER_TLV_CONSTRUCTED +( +±r +); + +127 +Ën_Ën + = + `b”_ãtch_Ëngth +( +Žv_cÚ¡r +, + +128 (cÚ¡ *) +±r + + +g_Ën +, +size + -ag_Ën, & +Žv_Ën +); + +129  +Ën_Ën +) { + +130 -1: + `RETURN +( +RC_FAIL +); + +131 0: + `RETURN +( +RC_WMORE +); + +133 + `ASN_DEBUG +("Advancing %ld in ANY case", + +134 ()( +g_Ën + + +Ën_Ën +)); + +135 + `ADVANCE +( +g_Ën + + +Ën_Ën +); + +137 + `as£¹ +( +gno + < () +td +-> +gs_couÁ +); + +139 () +gno +;agnØ< () +td +-> +gs_couÁ +;agno++, +¡• +++) { + +144 +g_Ën + = + `b”_ãtch_g +( +±r +, +size +, & +Žv_g +); + +145 + `ASN_DEBUG +("Fetchingag from {%p,%ld}: " + +147 +±r +, () +size +, + +148 () +g_Ën +, +¡• +, +gno +, + +149 + `b”_Žv_g_¡ršg +( +Žv_g +)); + +150  +g_Ën +) { + +151 -1: + `RETURN +( +RC_FAIL +); + +152 0: + `RETURN +( +RC_WMORE +); + +155 +Žv_cÚ¡r + = + `BER_TLV_CONSTRUCTED +( +±r +); + +161 if( +g_mode + !ð0 && +¡• + == 0) { + +168 + `as£¹ +( +gno + >= 0); + +169 if( +Žv_g + !ð +td +-> +gs +[ +gno +]) { + +173 + `ASN_DEBUG +("Expected: %s, " + +175 + `b”_Žv_g_¡ršg +( +td +-> +gs +[ +gno +]), + +176 +gno +, +g_mode + + +178 + `RETURN +( +RC_FAIL +); + +189 if( +gno + < (() +td +-> +gs_couÁ + - 1)) { + +190 if( +Žv_cÚ¡r + == 0) { + +191 + `ASN_DEBUG +("tlv_constr = %d,ƒxpfail", + +192 +Žv_cÚ¡r +); + +193 + `RETURN +( +RC_FAIL +); + +196 if( +Ï¡_g_fÜm + !ð +Žv_cÚ¡r + + +197 && +Ï¡_g_fÜm + != -1) { + +198 + `ASN_DEBUG +("last_tag_form %d != %d", + +199 +Ï¡_g_fÜm +, +Žv_cÚ¡r +); + +200 + `RETURN +( +RC_FAIL +); + +207 +Ën_Ën + = + `b”_ãtch_Ëngth +( +Žv_cÚ¡r +, + +208 (cÚ¡ *) +±r + + +g_Ën +, +size + -ag_Ën, & +Žv_Ën +); + +209 + `ASN_DEBUG +("F‘chšg†’ = %ld", () +Ën_Ën +); + +210  +Ën_Ën +) { + +211 -1: + `RETURN +( +RC_FAIL +); + +212 0: + `RETURN +( +RC_WMORE +); + +222 if( +Žv_Ën + == -1) { + +226 if( +lim™_Ën + == -1) { + +227 +ex³ù_00_‹rmš©Üs +++; + +229 + `ASN_DEBUG +("Unexpected indefinite†ength " + +231 + `RETURN +( +RC_FAIL +); + +233 + `ADVANCE +( +g_Ën + + +Ën_Ën +); + +236 if( +ex³ù_00_‹rmš©Üs +) { + +237 + `ASN_DEBUG +("Unexpected definite†ength " + +239 + `RETURN +( +RC_FAIL +); + +247 if( +lim™_Ën + == -1) { + +248 +lim™_Ën + = +Žv_Ën + + +g_Ën + + +Ën_Ën +; + +249 if( +lim™_Ën + < 0) { + +251 + `RETURN +( +RC_FAIL +); + +253 } if( +lim™_Ën + !ð +Žv_Ën + + +g_Ën + + +Ën_Ën +) { + +258 + `ASN_DEBUG +("Outer TLV is %ld‡nd inner is %ld", + +259 () +lim™_Ën +, () +Žv_Ën +); + +260 + `RETURN +( +RC_FAIL +); + +263 + `ADVANCE +( +g_Ën + + +Ën_Ën +); + +265 +lim™_Ën + -ð( +g_Ën + + +Ën_Ën +); + +266 if(( +ssize_t +) +size + > +lim™_Ën +) { + +271 +size + = +lim™_Ën +; + +275 if( +Ýt_Žv_fÜm +) + +276 * +Ýt_Žv_fÜm + = +Žv_cÚ¡r +; + +277 if( +ex³ù_00_‹rmš©Üs +) + +278 * +Ï¡_Ëngth + = - +ex³ù_00_‹rmš©Üs +; + +280 * +Ï¡_Ëngth + = +Žv_Ën +; + +282 + `RETURN +( +RC_OK +); + +283 + } +} + + @ber_tlv_length.c + +5  + ~ + +6  + ~ + +7  + ~ + +9 +ssize_t + + +10 + $b”_ãtch_Ëngth +( +_is_cÚ¡ruùed +, cÚ¡ * +buåŒ +, +size_t + +size +, + +11 +b”_Žv_Ën_t + * +Ën_r +) { + +12 cÚ¡ +ušt8_t + * +buf + = (cÚ¡ ušt8_ˆ*) +buåŒ +; + +13  +où +; + +15 if( +size + == 0) + +18 +où + = *(cÚ¡ +ušt8_t + *) +buf +; + +19 if(( +où + & 0x80) == 0) { + +23 * +Ën_r + = +où +; + +26 +b”_Žv_Ën_t + +Ën +; + +27 +size_t + +sk³d +; + +29 if( +_is_cÚ¡ruùed + && +où + == 0x80) { + +30 * +Ën_r + = -1; + +34 if( +où + == 0xff) { + +39 +où + &= 0x7F; + +40  +Ën + = 0, +buf +++, +sk³d + = 1; + +41 +où + && (++ +sk³d + <ð +size +); +buf +++, oct--) { + +44 if(!( +Ën + >> ((8 * (len)) - (8+1)))) { + +45 +Ën + = (ËÀ<< 8è| * +buf +; + +52 if( +où + == 0) { + +53 if( +Ën + < 0 ||†’ > +RSSIZE_MAX +) { + +58 * +Ën_r + = +Ën +; + +59  +sk³d +; + +65 + } +} + +67 +ssize_t + + +68 + $b”_sk_Ëngth +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +69  +_is_cÚ¡ruùed +, cÚ¡ * +±r +, +size_t + +size +) { + +70 +b”_Žv_Ën_t + +vËn +; + +71 +ssize_t + +Ž +; + +72 +ssize_t + +Î +; + +73 +size_t + +sk +; + +78 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +84 +Î + = + `b”_ãtch_Ëngth +( +_is_cÚ¡ruùed +, +±r +, +size +, & +vËn +); + +85 if( +Î + <= 0) †l; + +90 if( +vËn + >= 0) { + +91 +sk + = +Î + + +vËn +; + +92 if( +sk + > +size +) + +94  +sk +; + +100 + `ASN_DEBUG +("Skipping indefinite†ength"); + +101  +sk + = +Î +, +±r + = ((cÚ¡ *íŒè+†l, +size + -=†l;;) { + +102 +b”_Žv_g_t + +g +; + +105 +Ž + = + `b”_ãtch_g +( +±r +, +size +, & +g +); + +106 if( +Ž + <= 0) l; + +108 +Î + = + `b”_sk_Ëngth +( +Ýt_codec_ùx +, + +109 + `BER_TLV_CONSTRUCTED +( +±r +), + +110 ((cÚ¡ *) +±r +è+ +Ž +, +size + -l); + +111 if( +Î + <= 0) †l; + +113 +sk + +ð +Ž + + +Î +; + +120 if(((cÚ¡ +ušt8_t + *) +±r +)[0] == 0 + +121 && ((cÚ¡ +ušt8_t + *) +±r +)[1] == 0) + +122  +sk +; + +124 +±r + = ((cÚ¡ *íŒè+ +Ž + + +Î +; + +125 +size + -ð +Ž + + +Î +; + +129 + } +} + +131 +size_t + + +132 + $d”_Žv_Ëngth_£rŸlize +( +b”_Žv_Ën_t + +Ën +, * +buå +, +size_t + +size +) { + +133 +size_t + +»quœed_size +; + +134 +ušt8_t + * +buf + = (ušt8_ˆ*) +buå +; + +135 +ušt8_t + * +’d +; + +136  +i +; + +138 if( +Ën + <= 127) { + +140 if( +size +è* +buf + = ( +ušt8_t +) +Ën +; + +147  +»quœed_size + = 1, +i + = 8; i < 8 * ()( +Ën +); i += 8) { + +148 if( +Ën + >> +i +) + +149 +»quœed_size +++; + +154 if( +size + <ð +»quœed_size +) + +155  +»quœed_size + + 1; + +157 * +buf +++ = ( +ušt8_t +)(0x80 | +»quœed_size +); + +162 +’d + = +buf + + +»quœed_size +; + +163  +i + -ð8; +buf + < +’d +; i -= 8, buf++) + +164 * +buf + = ( +ušt8_t +)( +Ën + >> +i +); + +166  +»quœed_size + + 1; + +167 + } +} + + @ber_tlv_tag.c + +5  + ~ + +6  + ~ + +7  + ~<”ºo.h +> + +9 +ssize_t + + +10 + $b”_ãtch_g +(cÚ¡ * +±r +, +size_t + +size +, +b”_Žv_g_t + * +g_r +) { + +11 +b”_Žv_g_t + +v® +; + +12 +b”_Žv_g_t + +tþass +; + +13 +size_t + +sk³d +; + +15 if( +size + == 0) + +18 +v® + = *(cÚ¡ +ušt8_t + *) +±r +; + +19 +tþass + = ( +v® + >> 6); + +20 if(( +v® + &= 0x1F) != 0x1F) { + +25 * +g_r + = ( +v® + << 2è| +tþass +; + +33  +v® + = 0, +±r + = ((cÚ¡ *íŒè+ 1, +sk³d + = 2; + +34 +sk³d + <ð +size +; + +35 +±r + = ((cÚ¡ *íŒè+ 1, +sk³d +++) { + +36  +où + = *(cÚ¡ +ušt8_t + *) +±r +; + +37 if( +où + & 0x80) { + +38 +v® + = (v® << 7è| ( +où + & 0x7F); + +43 if( +v® + >> ((8 * (val)) - 9)) { + +51 +v® + = (v® << 7è| +où +; + +52 * +g_r + = ( +v® + << 2è| +tþass +; + +53  +sk³d +; + +58 + } +} + +61 +ssize_t + + +62 + $b”_Žv_g_fwr™e +( +b”_Žv_g_t + +g +, +FILE + * +f +) { + +63  +buf +[("[APPLICATION ]") + 32]; + +64 +ssize_t + +»t +; + +66 +»t + = + `b”_Žv_g_¢´št +( +g +, +buf +, (buf)); + +67 if( +»t + >ð( +ssize_t +)( +buf +) ||„et < 2) { + +68 +”ºo + = +EPERM +; + +72  + `fwr™e +( +buf +, 1, +»t +, +f +); + +73 + } +} + +75 +ssize_t + + +76 + $b”_Žv_g_¢´št +( +b”_Žv_g_t + +g +, * +buf +, +size_t + +size +) { + +77 cÚ¡ * +ty³ + = 0; + +78  +»t +; + +80  +g + & 0x3) { + +81  +ASN_TAG_CLASS_UNIVERSAL +: +ty³ + = "UNIVERSAL "; ; + +82  +ASN_TAG_CLASS_APPLICATION +: +ty³ + = "APPLICATION "; ; + +83  +ASN_TAG_CLASS_CONTEXT +: +ty³ + = ""; ; + +84  +ASN_TAG_CLASS_PRIVATE +: +ty³ + = "PRIVATE "; ; + +87 +»t + = + `¢´štf +( +buf +, +size +, "[%s%u]", +ty³ +, (() +g +) >> 2); + +88 if( +»t + <ð0 && +size +è +buf +[0] = '\0'; + +90  +»t +; + +91 + } +} + +94 + $b”_Žv_g_¡ršg +( +b”_Žv_g_t + +g +) { + +95  +buf +[("[APPLICATION ]") + 32]; + +97 () + `b”_Žv_g_¢´št +( +g +, +buf +, (buf)); + +99  +buf +; + +100 + } +} + +103 +size_t + + +104 + $b”_Žv_g_£rŸlize +( +b”_Žv_g_t + +g +, * +buå +, +size_t + +size +) { + +105  +tþass + = + `BER_TAG_CLASS +( +g +); + +106 +b”_Žv_g_t + +tv® + = + `BER_TAG_VALUE +( +g +); + +107 +ušt8_t + * +buf + = (ušt8_ˆ*) +buå +; + +108 +ušt8_t + * +’d +; + +109 +size_t + +»quœed_size +; + +110 +size_t + +i +; + +112 if( +tv® + <= 30) { + +114 if( +size +è +buf +[0] = ( +tþass + << 6è| +tv® +; + +116 } if( +size +) { + +117 * +buf +++ = ( +tþass + << 6) | 0x1F; + +118 +size +--; + +124  +»quœed_size + = 1, +i + = 7; i < 8 * ( +tv® +); i += 7) { + +125 if( +tv® + >> +i +) + +126 +»quœed_size +++; + +131 if( +size + < +»quœed_size +) + +132  +»quœed_size + + 1; + +137 +’d + = +buf + + +»quœed_size + - 1; + +138  +i + -ð7; +buf + < +’d +; i -= 7, buf++) + +139 * +buf + = 0x80 | (( +tv® + >> +i +) & 0x7F); + +140 * +buf + = ( +tv® + & 0x7F); + +142  +»quœed_size + + 1; + +143 + } +} + + @constr_CHOICE.c + +5  + ~ + +6  + ~ + +7  + ~<³r_ݒty³.h +> + +14  + #LEFT + (( +size +<( +size_t +) +ùx +-> +Ëá +)?size:(size_t)ùx->Ëá) + + ) + +27  + #SIZE_VIOLATION + ( +ùx +-> +Ëá + >ð0 && ( +size_t +)ùx->Ëá <ð +size +) + + ) + +33 #undeà +ADVANCE + + +34  + #ADVANCE +( +num_by‹s +) do { \ + +35 +size_t + +num + = +num_by‹s +; \ + +36 +±r + = ((cÚ¡ *íŒè+ +num +;\ + +37 +size + -ð +num +; \ + +38 if( +ùx +-> +Ëá + >= 0) \ + +39 +ùx +-> +Ëá + -ð +num +; \ + +40 +cÚsumed_my£lf + +ð +num +; \ + +41 } 0) + + ) + +46 #undeà +NEXT_PHASE + + +47  + #NEXT_PHASE +( +ùx +) do { \ + +48 +ùx +-> +pha£ +++; \ + +49 +ùx +-> +¡• + = 0; \ + +50 } 0) + + ) + +55 #undeà +RETURN + + +56  + #RETURN +( +_code +) do { \ + +57 +rv® +. +code + = +_code +; \ + +58 +rv® +. +cÚsumed + = +cÚsumed_my£lf +;\ + +59  +rv® +; \ + +60 } 0) + + ) + +65  +_ãtch_´e£Á_idx +(cÚ¡ * +¡ruù_±r +,  +off +, + +66  +size +); + +67  +_£t_´e£Á_idx +(* +¥Œ +,  +off£t +,  +size +, + +68  +´es +); + +69 cÚ¡ * +_g‘_memb”_±r +(cÚ¡ +a¢_TYPE_desütÜ_t + *, + +70 cÚ¡ * +¥Œ +, +a¢_TYPE_memb”_t + ** +–m +, + +71 * +´e£Á +); + +77 + $_£¬ch4g +(cÚ¡ * +­ +, cÚ¡ * +bp +) { + +78 cÚ¡ +a¢_TYPE_g2memb”_t + * +a + = (cÚ¡‡¢_TYPE_g2memb”_ˆ*) +­ +; + +79 cÚ¡ +a¢_TYPE_g2memb”_t + * +b + = (cÚ¡‡¢_TYPE_g2memb”_ˆ*) +bp +; + +81  +a_þass + = + `BER_TAG_CLASS +( +a +-> +–_g +); + +82  +b_þass + = + `BER_TAG_CLASS +( +b +-> +–_g +); + +84 if( +a_þass + =ð +b_þass +) { + +85 +b”_Žv_g_t + +a_v®ue + = + `BER_TAG_VALUE +( +a +-> +–_g +); + +86 +b”_Žv_g_t + +b_v®ue + = + `BER_TAG_VALUE +( +b +-> +–_g +); + +88 if( +a_v®ue + =ð +b_v®ue +) + +90 if( +a_v®ue + < +b_v®ue +) + +94 } if( +a_þass + < +b_þass +) { + +99 + } +} + +104 +a¢_dec_rv®_t + + +105 + $CHOICE_decode_b” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +106 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¡ruù_±r +, + +107 cÚ¡ * +±r +, +size_t + +size +,  +g_mode +) { + +111 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +112 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +113 +a¢_TYPE_memb”_t + * +–em’ts + = +td +->elements; + +118 * +¡ + = * +¡ruù_±r +; + +119 +a¢_¡ruù_ùx_t + * +ùx +; + +121 +b”_Žv_g_t + +Žv_g +; + +122 +ssize_t + +g_Ën +; + +123 +a¢_dec_rv®_t + +rv® +; + +125 +ssize_t + +cÚsumed_my£lf + = 0; + +127 + `ASN_DEBUG +("Decodšg % a CHOICE", +td +-> +Çme +); + +132 if( +¡ + == 0) { + +133 +¡ + = * +¡ruù_±r + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +134 if( +¡ + == 0) { + +135 + `RETURN +( +RC_FAIL +); + +142 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +147  +ùx +-> +pha£ +) { + +155 if( +g_mode + || +td +-> +gs_couÁ +) { + +156 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, +ùx +, +±r +, +size +, + +157 +g_mode +, -1, & +ùx +-> +Ëá +, 0); + +158 if( +rv® +. +code + !ð +RC_OK +) { + +159 + `ASN_DEBUG +("%sagging check failed: %d", + +160 +td +-> +Çme +, +rv® +. +code +); + +161  +rv® +; + +164 if( +ùx +-> +Ëá + >= 0) { + +166 +ùx +-> +Ëá + +ð +rv® +. +cÚsumed +; + +168 + `ADVANCE +( +rv® +. +cÚsumed +); + +170 +ùx +-> +Ëá + = -1; + +173 + `NEXT_PHASE +( +ùx +); + +175 + `ASN_DEBUG +("Structure consumes %ld bytes, buffer %ld", + +176 () +ùx +-> +Ëá +, () +size +); + +183 +g_Ën + = + `b”_ãtch_g +( +±r +, +LEFT +, & +Žv_g +); + +184 + `ASN_DEBUG +("IÀ% CHOICEag†’gth %d", +td +-> +Çme +, () +g_Ën +); + +185  +g_Ën +) { + +186 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +188 -1: + `RETURN +( +RC_FAIL +); + +192 cÚ¡ +a¢_TYPE_g2memb”_t + * +t2m +; + +193 +a¢_TYPE_g2memb”_t + +key +; + +195 +key +. +–_g + = +Žv_g +; + +196 +t2m + = (cÚ¡ +a¢_TYPE_g2memb”_t + *) + `b£¬ch +(& +key +, + +197 +¥ecs +-> +g2– +, s³cs-> +g2–_couÁ +, + +198 ( +¥ecs +-> +g2– +[0]), +_£¬ch4g +); + +199 if( +t2m +) { + +203 + `NEXT_PHASE +( +ùx +); + +204 +ùx +-> +¡• + = +t2m +-> +–_no +; + +206 } if( +¥ecs +-> +ext_¡¬t + == -1) { + +207 + `ASN_DEBUG +("Unexpectedag %s " + +209 + `b”_Žv_g_¡ršg +( +Žv_g +), +td +-> +Çme +); + +210 + `RETURN +( +RC_FAIL +); + +213 +ssize_t + +sk +; + +215 + `ASN_DEBUG +("Skipping unknownag %s", + +216 + `b”_Žv_g_¡ršg +( +Žv_g +)); + +218 +sk + = + `b”_sk_Ëngth +( +Ýt_codec_ùx +, + +219 + `BER_TLV_CONSTRUCTED +( +±r +), + +220 (cÚ¡ *) +±r + + +g_Ën +, + +221 +LEFT + - +g_Ën +); + +223  +sk +) { + +224 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +226 -1: + `RETURN +( +RC_FAIL +); + +229 + `ADVANCE +( +sk + + +g_Ën +); + +230 + `RETURN +( +RC_OK +); + +240 +a¢_TYPE_memb”_t + * +–m +; + +241 * +memb_±r +; + +242 ** +memb_±r2 +; + +244 +–m + = & +–em’ts +[ +ùx +-> +¡• +]; + +251 if( +–m +-> +æags + & +ATF_POINTER +) { + +253 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +259 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +260 +memb_±r2 + = & +memb_±r +; + +263 + `_£t_´e£Á_idx +( +¡ +, +¥ecs +-> +´es_off£t +, + +264 +¥ecs +-> +´es_size +, +ùx +-> +¡• + + 1); + +268 +rv® + = +–m +-> +ty³ +-> +Ý +-> + `b”_decod” +( +Ýt_codec_ùx +,ƒlm->type, + +269 +memb_±r2 +, +±r +, +LEFT +, +–m +-> +g_mode +); + +270  +rv® +. +code +) { + +271  +RC_OK +: + +273  +RC_WMORE +: + +274 if(! +SIZE_VIOLATION +) { + +275 + `ADVANCE +( +rv® +. +cÚsumed +); + +276 + `RETURN +( +RC_WMORE +); + +278 + `RETURN +( +RC_FAIL +); + +279  +RC_FAIL +: + +280 + `RETURN +( +rv® +. +code +); + +283 + `ADVANCE +( +rv® +. +cÚsumed +); + +286 + `NEXT_PHASE +( +ùx +); + +290 + `ASN_DEBUG +("CHOICE %s Leftover: %ld, size = %ld,m=%d,c=%d", + +291 +td +-> +Çme +, () +ùx +-> +Ëá +, () +size +, + +292 +g_mode +, +td +-> +gs_couÁ +); + +294 if( +ùx +-> +Ëá + > 0) { + +299 + `RETURN +( +RC_FAIL +); + +302 if( +ùx +-> +Ëá + == -1 + +303 && !( +g_mode + || +td +-> +gs_couÁ +)) { + +310 + `NEXT_PHASE +( +ùx +); + +317  +ùx +-> +Ëá + < 0) { + +318 +ssize_t + +Ž +; + +320 +Ž + = + `b”_ãtch_g +( +±r +, +LEFT +, & +Žv_g +); + +321  +Ž +) { + +322 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +324 -1: + `RETURN +( +RC_FAIL +); + +330 if(((cÚ¡ +ušt8_t + *) +±r +)[0] == 0) { + +331 if( +LEFT + < 2) { + +332 if( +SIZE_VIOLATION +) + +333 + `RETURN +( +RC_FAIL +); + +335 + `RETURN +( +RC_WMORE +); + +336 } if(((cÚ¡ +ušt8_t + *) +±r +)[1] == 0) { + +340 + `ADVANCE +(2); + +341 +ùx +-> +Ëá +++; + +345 + `ASN_DEBUG +("Unexpected continuation in %s", + +346 +td +-> +Çme +); + +347 + `RETURN +( +RC_FAIL +); + +353 + `NEXT_PHASE +( +ùx +); + +359 + `RETURN +( +RC_OK +); + +360 + } +} + +362 +a¢_’c_rv®_t + + +363 + $CHOICE_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +364  +g_mode +, +b”_Žv_g_t + +g +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +365 * +­p_key +) { + +366 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_CHOICE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +367 +a¢_TYPE_memb”_t + * +–m +; + +368 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +369 cÚ¡ * +memb_±r +; + +370 +size_t + +compu‹d_size + = 0; + +371  +´e£Á +; + +373 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +375 + `ASN_DEBUG +("%s %s‡s CHOICE", + +376 +cb +?"Encodšg":"E¡im©šg", +td +-> +Çme +); + +378 +´e£Á + = + `_ãtch_´e£Á_idx +( +¥Œ +, + +379 +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +385 if( +´e£Á + =ð0 ||…»£Á > +td +-> +–em’ts_couÁ +) { + +386 if( +´e£Á + =ð0 && +td +-> +–em’ts_couÁ + == 0) { + +388 +”v® +. +’coded + = 0; + +389 + `ASN__ENCODED_OK +( +”v® +); + +391 +ASN__ENCODE_FAILED +; + +397 +–m + = & +td +-> +–em’ts +[ +´e£Á +-1]; + +398 if( +–m +-> +æags + & +ATF_POINTER +) { + +399 +memb_±r + = + +400 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +401 if( +memb_±r + == 0) { + +402 if( +–m +-> +ÝtiÚ® +) { + +403 +”v® +. +’coded + = 0; + +404 + `ASN__ENCODED_OK +( +”v® +); + +407 +ASN__ENCODE_FAILED +; + +410 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +418 if( +g_mode + =ð1 || +td +-> +gs_couÁ +) { + +422 +ssize_t + +»t +; + +425 +”v® + = +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, +memb_±r +, + +426 +–m +-> +g_mode +,ƒlm-> +g +, 0, 0); + +427 if( +”v® +. +’coded + == -1) + +428  +”v® +; + +431 +»t + = + `d”_wr™e_gs +( +td +, +”v® +. +’coded +, +g_mode +, 1, +g +, + +432 +cb +, +­p_key +); + +433 if( +»t + == -1) + +434 +ASN__ENCODE_FAILED +; + +435 +compu‹d_size + +ð +»t +; + +441 +”v® + = +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, +memb_±r +, + +442 +–m +-> +g_mode +,ƒlm-> +g +, +cb +, +­p_key +); + +443 if( +”v® +. +’coded + == -1) + +444  +”v® +; + +446 + `ASN_DEBUG +("Encoded CHOICE member in %ld bytes (+%ld)", + +447 () +”v® +. +’coded +, () +compu‹d_size +); + +449 +”v® +. +’coded + +ð +compu‹d_size +; + +451  +”v® +; + +452 + } +} + +454 +b”_Žv_g_t + + +455 + $CHOICE_outmo¡_g +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +±r +,  +g_mode +, +b”_Žv_g_t + +g +) { + +456 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_CHOICE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +457  +´e£Á +; + +459 + `as£¹ +( +g_mode + == 0); ()tag_mode; + +460 + `as£¹ +( +g + == 0); ()tag; + +465 +´e£Á + = + `_ãtch_´e£Á_idx +( +±r +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +467 if( +´e£Á + > 0 &&…»£Á <ð +td +-> +–em’ts_couÁ +) { + +468 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +´e£Á +-1]; + +469 cÚ¡ * +memb_±r +; + +471 if( +–m +-> +æags + & +ATF_POINTER +) { + +472 +memb_±r + = *(const * const *) + +473 ((cÚ¡ *) +±r + + +–m +-> +memb_off£t +); + +475 +memb_±r + = (const *) + +476 ((cÚ¡ *) +±r + + +–m +-> +memb_off£t +); + +479  + `a¢_TYPE_outmo¡_g +( +–m +-> +ty³ +, +memb_±r +, + +480 +–m +-> +g_mode +,ƒlm-> +g +); + +482  ( +b”_Žv_g_t +)-1; + +484 + } +} + +487 + $CHOICE_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +488 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +489 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +490 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +491  +´e£Á +; + +493 if(! +¥Œ +) { + +494 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +496 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +503 +´e£Á + = + `_ãtch_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +,¥ecs-> +´es_size +); + +504 if( +´e£Á + > 0 &&…»£Á <ð +td +-> +–em’ts_couÁ +) { + +505 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +´e£Á +-1]; + +506 cÚ¡ * +memb_±r +; + +508 if( +–m +-> +æags + & +ATF_POINTER +) { + +509 +memb_±r + = *(cÚ¡ * cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +510 if(! +memb_±r +) { + +511 if( +–m +-> +ÝtiÚ® +) + +513 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +515 +td +-> +Çme +, +–m +->Çme, +__FILE__ +, +__LINE__ +); + +519 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +522 if( +–m +-> +’codšg_cÚ¡¿šts +. +g’”®_cÚ¡¿šts +) { + +523  +–m +-> +’codšg_cÚ¡¿šts +. + `g’”®_cÚ¡¿šts +Ólm-> +ty³ +, +memb_±r +, + +524 +ùçžcb +, +­p_key +); + +526  +–m +-> +ty³ +-> +’codšg_cÚ¡¿šts +. + `g’”®_cÚ¡¿šts +(elm->type, + +527 +memb_±r +, +ùçžcb +, +­p_key +); + +530 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +532 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +535 + } +} + +537 #undeà +XER_ADVANCE + + +538  + #XER_ADVANCE +( +num_by‹s +) do { \ + +539 +size_t + +num + = +num_by‹s +; \ + +540 +buf_±r + = (cÚ¡ *)(((cÚ¡ *)buf_±rè+ +num +); \ + +541 +size + -ð +num +; \ + +542 +cÚsumed_my£lf + +ð +num +; \ + +543 } 0) + + ) + +548 +a¢_dec_rv®_t + + +549 + $CHOICE_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +550 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¡ruù_±r +, + +551 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +) { + +555 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_CHOICE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +556 cÚ¡ * +xml_g + = +Ýt_mÇme + ? o±_mÇm: +td +->xml_tag; + +561 * +¡ + = * +¡ruù_±r +; + +562 +a¢_¡ruù_ùx_t + * +ùx +; + +564 +a¢_dec_rv®_t + +rv® +; + +565 +ssize_t + +cÚsumed_my£lf + = 0; + +566 +size_t + +edx +; + +571 if( +¡ + == 0) { + +572 +¡ + = * +¡ruù_±r + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +573 if( +¡ + =ð0è + `RETURN +( +RC_FAIL +); + +579 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +580 if( +ùx +-> +pha£ + =ð0 && !* +xml_g +) + +581 +ùx +-> +pha£ + = 1; + +592  +edx + = +ùx +-> +¡• +; ctx-> +pha£ + <= 4;) { + +593 +px”_chunk_ty³_e + +ch_ty³ +; + +594 +ssize_t + +ch_size +; + +595 +x”_check_g_e + +tcv +; + +596 +a¢_TYPE_memb”_t + * +–m +; + +601 if( +ùx +-> +pha£ + == 2) { + +602 +a¢_dec_rv®_t + +tm´v® +; + +603 * +memb_±r +; + +604 ** +memb_±r2 +; + +605  +Þd_´e£Á +; + +607 +–m + = & +td +-> +–em’ts +[ +edx +]; + +609 if( +–m +-> +æags + & +ATF_POINTER +) { + +611 +memb_±r2 + = (**)((*) +¡ + + +612 + +–m +-> +memb_off£t +); + +614 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +615 +memb_±r2 + = & +memb_±r +; + +619 +tm´v® + = +–m +-> +ty³ +-> +Ý +-> + `x”_decod” +( +Ýt_codec_ùx +, + +620 +–m +-> +ty³ +, +memb_±r2 +,ƒlm-> +Çme +, + +621 +buf_±r +, +size +); + +622 + `XER_ADVANCE +( +tm´v® +. +cÚsumed +); + +623 + `ASN_DEBUG +("XER/CHOICE: itdf: [%s] code=%d", + +624 +–m +-> +ty³ +-> +Çme +, +tm´v® +. +code +); + +625 +Þd_´e£Á + = + `_ãtch_´e£Á_idx +( +¡ +, + +626 +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +627 + `as£¹ +( +Þd_´e£Á + =ð0 || old_´e£Á =ð +edx + + 1); + +629 + `_£t_´e£Á_idx +( +¡ +, + +630 +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +, +edx + + 1); + +631 if( +tm´v® +. +code + !ð +RC_OK +) + +632 + `RETURN +( +tm´v® +. +code +); + +633 +ùx +-> +pha£ + = 3; + +638 if( +ùx +-> +pha£ + =ð3 && !* +xml_g +) { + +639 +ùx +-> +pha£ + = 5; + +640 + `RETURN +( +RC_OK +); + +646 +ch_size + = + `x”_Ãxt_tok’ +(& +ùx +-> +cڋxt +, +buf_±r +, +size +, & +ch_ty³ +); + +647 if( +ch_size + == -1) { + +648 + `RETURN +( +RC_FAIL +); + +650  +ch_ty³ +) { + +651  +PXER_WMORE +: + +652 + `RETURN +( +RC_WMORE +); + +653  +PXER_COMMENT +: + +654  +PXER_TEXT +: + +655 + `XER_ADVANCE +( +ch_size +); + +657  +PXER_TAG +: + +662 +tcv + = + `x”_check_g +( +buf_±r +, +ch_size +, +xml_g +); + +663 + `ASN_DEBUG +("XER/CHOICE checked [%c%c%c%c] vs [%s],cv=%d", + +664 +ch_size +>0?((cÚ¡ +ušt8_t + *) +buf_±r +)[0]:'?', + +665 +ch_size +>1?((cÚ¡ +ušt8_t + *) +buf_±r +)[1]:'?', + +666 +ch_size +>2?((cÚ¡ +ušt8_t + *) +buf_±r +)[2]:'?', + +667 +ch_size +>3?((cÚ¡ +ušt8_t + *) +buf_±r +)[3]:'?', + +668 +xml_g +, +tcv +); + +671 if( +ùx +-> +pha£ + == 4) { + +672 + `ASN_DEBUG +("skip_unknown(%d, %ld)", + +673 +tcv +, () +ùx +-> +Ëá +); + +674  + `x”_sk_unknown +( +tcv +, & +ùx +-> +Ëá +)) { + +676 +ùx +-> +pha£ + = 5; + +677 + `RETURN +( +RC_FAIL +); + +679 +ùx +-> +pha£ + = 3; + +682 + `XER_ADVANCE +( +ch_size +); + +685 +ùx +-> +pha£ + = 3; + +690  +tcv +) { + +691  +XCT_BOTH +: + +693  +XCT_CLOSING +: + +694 if( +ùx +-> +pha£ + != 3) + +696 + `XER_ADVANCE +( +ch_size +); + +697 +ùx +-> +pha£ + = 5; + +698 + `RETURN +( +RC_OK +); + +699  +XCT_OPENING +: + +700 if( +ùx +-> +pha£ + == 0) { + +701 + `XER_ADVANCE +( +ch_size +); + +702 +ùx +-> +pha£ + = 1; + +706  +XCT_UNKNOWN_OP +: + +707  +XCT_UNKNOWN_BO +: + +709 if( +ùx +-> +pha£ + != 1) + +715  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +716 +–m + = & +td +-> +–em’ts +[ +edx +]; + +717 +tcv + = + `x”_check_g +( +buf_±r +, +ch_size +, +–m +-> +Çme +); + +718  +tcv +) { + +719  +XCT_BOTH +: + +720  +XCT_OPENING +: + +724 +ùx +-> +¡• + = +edx +; + +725 +ùx +-> +pha£ + = 2; + +727  +XCT_UNKNOWN_OP +: + +728  +XCT_UNKNOWN_BO +: + +731 +edx + = +td +-> +–em’ts_couÁ +; + +736 if( +edx + !ð +td +-> +–em’ts_couÁ +) + +740 if( +¥ecs +-> +ext_¡¬t + != -1) { + +741 + `ASN_DEBUG +("Got‡nticipatedƒxtension"); + +747 if( +tcv + & +XCT_CLOSING +) { + +749 +ùx +-> +pha£ + = 3; + +751 +ùx +-> +Ëá + = 1; + +752 +ùx +-> +pha£ + = 4; + +754 + `XER_ADVANCE +( +ch_size +); + +763 + `ASN_DEBUG +("Unexpected XMLag [%c%c%c%c] in CHOICE [%s]" + +765 +ch_size +>0?((cÚ¡ +ušt8_t + *) +buf_±r +)[0]:'?', + +766 +ch_size +>1?((cÚ¡ +ušt8_t + *) +buf_±r +)[1]:'?', + +767 +ch_size +>2?((cÚ¡ +ušt8_t + *) +buf_±r +)[2]:'?', + +768 +ch_size +>3?((cÚ¡ +ušt8_t + *) +buf_±r +)[3]:'?', + +769 +td +-> +Çme +, +ùx +-> +pha£ +, +xml_g +); + +773 +ùx +-> +pha£ + = 5; + +774 + `RETURN +( +RC_FAIL +); + +775 + } +} + +778 +a¢_’c_rv®_t + + +779 + $CHOICE_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +780 +x”_’cod”_æags_e + +æags +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +781 * +­p_key +) { + +782 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +783 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +784 +a¢_’c_rv®_t + +” + = {0,0,0}; + +785  +´e£Á + = 0; + +787 if(! +¥Œ +) + +788 +ASN__ENCODE_FAILED +; + +793 +´e£Á + = + `_ãtch_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +,¥ecs-> +´es_size +); + +795 if( +´e£Á + =ð0 ||…»£Á > +td +-> +–em’ts_couÁ +) { + +796 +ASN__ENCODE_FAILED +; + +798 +a¢_’c_rv®_t + +tm³r + = {0,0,0}; + +799 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +´e£Á +-1]; + +800 cÚ¡ * +memb_±r + = +NULL +; + +801 cÚ¡ * +mÇme + = +–m +-> +Çme +; + +802  +mËn + = + `¡¾’ +( +mÇme +); + +804 if( +–m +-> +æags + & +ATF_POINTER +) { + +805 +memb_±r + = + +806 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +807 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +809 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +812 +” +. +’coded + = 0; + +814 if(!( +æags + & +XER_F_CANONICAL +)è + `ASN__TEXT_INDENT +(1, +žev– +); + +815 + `ASN__CALLBACK3 +("<", 1, +mÇme +, +mËn +, ">", 1); + +817 +tm³r + = +–m +-> +ty³ +-> +Ý +-> + `x”_’cod” +Ólm->ty³, +memb_±r +, + +818 +žev– + + 1, +æags +, +cb +, +­p_key +); + +819 if( +tm³r +. +’coded + == -1) mper; + +820 +” +. +’coded + +ð +tm³r +.encoded; + +822 + `ASN__CALLBACK3 +("", 1); + +825 if(!( +æags + & +XER_F_CANONICAL +)è + `ASN__TEXT_INDENT +(1, +žev– + - 1); + +827 + `ASN__ENCODED_OK +( +” +); + +828 +cb_çžed +: + +829 +ASN__ENCODE_FAILED +; + +830 + } +} + +832 +a¢_dec_rv®_t + + +833 + $CHOICE_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +834 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +835 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +836 +a¢_³r_d©a_t + * +pd +) { + +837 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +838 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +839 +a¢_dec_rv®_t + +rv +; + +840 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +841 +a¢_TYPE_memb”_t + * +–m +; + +842 * +memb_±r +; + +843 ** +memb_±r2 +; + +844 * +¡ + = * +¥Œ +; + +845  +v®ue +; + +847 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +848 +ASN__DECODE_FAILED +; + +853 if(! +¡ +) { + +854 +¡ + = * +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +855 if(! +¡ +è +ASN__DECODE_FAILED +; + +858 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +859 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +è +ù + = &td->’codšg_cÚ¡¿šts.³r_cÚ¡¿šts-> +v®ue +; + +860 +ù + = 0; + +862 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +863 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +864 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +865 if( +v®ue +è +ù + = 0; + +868 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +869 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +ù +-> +¿nge_b™s +); + +870 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +871 + `ASN_DEBUG +("CHOICE %s got index %d in„ange %d", + +872 +td +-> +Çme +, +v®ue +, +ù +-> +¿nge_b™s +); + +873 if( +v®ue + > +ù +-> +uµ”_bound +) + +874 +ASN__DECODE_FAILED +; + +876 if( +¥ecs +-> +ext_¡¬t + == -1) + +877 +ASN__DECODE_FAILED +; + +878 +v®ue + = + `u³r_g‘_n¢nwn +( +pd +); + +879 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +880 +v®ue + +ð +¥ecs +-> +ext_¡¬t +; + +881 if(() +v®ue + >ð +td +-> +–em’ts_couÁ +) + +882 +ASN__DECODE_FAILED +; + +886 if( +¥ecs +-> +äom_ÿnÚiÿl_Üd” +) { + +887 + `ASN_DEBUG +("CHOICE…»£nû from wœ%d", +v®ue +); + +888 +v®ue + = +¥ecs +-> +äom_ÿnÚiÿl_Üd” +[value]; + +889 + `ASN_DEBUG +("CHOICE…»£nû indexƒfãùiv%d", +v®ue +); + +893 + `_£t_´e£Á_idx +( +¡ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +, +v®ue + + 1); + +895 +–m + = & +td +-> +–em’ts +[ +v®ue +]; + +896 if( +–m +-> +æags + & +ATF_POINTER +) { + +898 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +900 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +901 +memb_±r2 + = & +memb_±r +; + +903 + `ASN_DEBUG +("Discov”ed CHOICE % ’code %s", +td +-> +Çme +, +–m +->name); + +905 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +906 +rv + = +–m +-> +ty³ +-> +Ý +-> + `u³r_decod” +( +Ýt_codec_ùx +,ƒlm->type, + +907 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r2 +, +pd +); + +909 +rv + = + `u³r_ݒ_ty³_g‘ +( +Ýt_codec_ùx +, +–m +-> +ty³ +, + +910 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r2 +, +pd +); + +913 if( +rv +. +code + !ð +RC_OK +) + +914 + `ASN_DEBUG +("Failedo decode %s in %s (CHOICE) %d", + +915 +–m +-> +Çme +, +td +->Çme, +rv +. +code +); + +916  +rv +; + +917 + } +} + +919 +a¢_’c_rv®_t + + +920 + $CHOICE_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +921 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +922 +a¢_³r_ou_t + * +po +) { + +923 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_CHOICE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +924 +a¢_TYPE_memb”_t + * +–m +; + +925 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +926 cÚ¡ * +memb_±r +; + +927  +´e£Á +; + +928  +´e£Á_’c +; + +930 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +932 + `ASN_DEBUG +("Encodšg % a CHOICE", +td +-> +Çme +); + +934 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +935 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +936 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +v®ue +; + +937 +ù + = 0; + +939 +´e£Á + = + `_ãtch_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +945 if( +´e£Á + =ð0 ||…»£Á > +td +-> +–em’ts_couÁ +) + +946 +ASN__ENCODE_FAILED +; + +948 +´e£Á +--; + +950 + `ASN_DEBUG +("Encodšg % CHOICEƒËm’ˆ%d", +td +-> +Çme +, +´e£Á +); + +953 if( +¥ecs +-> +to_ÿnÚiÿl_Üd” +) + +954 +´e£Á_’c + = +¥ecs +-> +to_ÿnÚiÿl_Üd” +[ +´e£Á +]; + +956 +´e£Á_’c + = +´e£Á +; + +958 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +959 if( +´e£Á_’c + < +ù +-> +low”_bound + + +960 || +´e£Á_’c + > +ù +-> +uµ”_bound +) { + +961 if( +ù +-> +æags + & +APC_EXTENSIBLE +) { + +962 + `ASN_DEBUG +( + +964 +´e£Á +, +´e£Á_’c +, +ù +-> +low”_bound +, ct-> +uµ”_bound +); + +965 if( + `³r_put_ãw_b™s +( +po +, 1, 1)) + +966 +ASN__ENCODE_FAILED +; + +968 +ASN__ENCODE_FAILED +; + +970 +ù + = 0; + +973 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +974 + `ASN_DEBUG +("CHOICE member %d (enc %d) is‚ot‡nƒxtension (%ld..%ld)", + +975 +´e£Á +, +´e£Á_’c +, +ù +-> +low”_bound +, ct-> +uµ”_bound +); + +976 if( + `³r_put_ãw_b™s +( +po +, 0, 1)) + +977 +ASN__ENCODE_FAILED +; + +981 +–m + = & +td +-> +–em’ts +[ +´e£Á +]; + +982 + `ASN_DEBUG +("CHOICE memb” \"%s\" %d (a %d)", +–m +-> +Çme +, +´e£Á +, + +983 +´e£Á_’c +); + +984 if( +–m +-> +æags + & +ATF_POINTER +) { + +986 +memb_±r + = + +987 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +988 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +990 +memb_±r + = (cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +; + +993 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +994 if( + `³r_put_ãw_b™s +( +po +, +´e£Á_’c +, +ù +-> +¿nge_b™s +)) + +995 +ASN__ENCODE_FAILED +; + +997  +–m +-> +ty³ +-> +Ý +-> + `u³r_’cod” +( + +998 +–m +-> +ty³ +,ƒlm-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r +, +po +); + +1000 +a¢_’c_rv®_t + +rv® + = {0,0,0}; + +1001 if( +¥ecs +-> +ext_¡¬t + =ð-1è +ASN__ENCODE_FAILED +; + +1002 if( + `u³r_put_n¢nwn +( +po +, +´e£Á_’c + - +¥ecs +-> +ext_¡¬t +)) + +1003 +ASN__ENCODE_FAILED +; + +1004 if( + `u³r_ݒ_ty³_put +( +–m +-> +ty³ +, + +1005 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, + +1006 +memb_±r +, +po +)) + +1007 +ASN__ENCODE_FAILED +; + +1008 +rv® +. +’coded + = 0; + +1009 + `ASN__ENCODED_OK +( +rv® +); + +1011 + } +} + +1013 +a¢_dec_rv®_t + + +1014 + $CHOICE_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1015 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1016 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +1017 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_CHOICE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +1018 +a¢_dec_rv®_t + +rv +; + +1019 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +1020 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ext_ù + = +NULL +; + +1021 +a¢_TYPE_memb”_t + * +–m +; + +1022 * +memb_±r +; + +1023 ** +memb_±r2 +; + +1024 * +¡ + = * +¥Œ +; + +1025  +v®ue +; + +1027 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +1028 +ASN__DECODE_FAILED +; + +1033 if(! +¡ +) { + +1034 +¡ + = * +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +1035 if(! +¡ +è +ASN__DECODE_FAILED +; + +1038 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +1039 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +1040 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +v®ue +; + +1041 +ù + = 0; + +1043 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +1044 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +1045 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +1046 if( +v®ue +) { + +1047 +ext_ù + = +ù +; + +1048 +ù + = 0; + +1053 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +1054 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +ù +-> +¿nge_b™s +); + +1055 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +1056 + `ASN_DEBUG +("CHOICE %s got index %d in„ange %d", + +1057 +td +-> +Çme +, +v®ue +, +ù +-> +¿nge_b™s +); + +1058 if( +v®ue + > +ù +-> +uµ”_bound +) + +1059 +ASN__DECODE_FAILED +; + +1061 if( +¥ecs +-> +ext_¡¬t + == -1) + +1062 +ASN__DECODE_FAILED +; + +1063 +v®ue + = + `­”_g‘_n¢nwn +( +pd +, +ext_ù +-> +¿nge_b™s +); + +1064 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +1065 +v®ue + +ð +¥ecs +-> +ext_¡¬t +; + +1066 if(() +v®ue + >ð +td +-> +–em’ts_couÁ +) + +1067 +ASN__DECODE_FAILED +; + +1071 if( +¥ecs +-> +äom_ÿnÚiÿl_Üd” +) + +1072 +v®ue + = +¥ecs +-> +äom_ÿnÚiÿl_Üd” +[value]; + +1075 + `_£t_´e£Á_idx +( +¡ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +, +v®ue + + 1); + +1077 +–m + = & +td +-> +–em’ts +[ +v®ue +]; + +1078 if( +–m +-> +æags + & +ATF_POINTER +) { + +1080 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +1082 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +1083 +memb_±r2 + = & +memb_±r +; + +1085 + `ASN_DEBUG +("Discov”ed CHOICE % ’code %s", +td +-> +Çme +, +–m +->name); + +1087 if( +ù + && ct-> +¿nge_b™s + >= 0) { + +1088 +rv + = +–m +-> +ty³ +-> +Ý +-> + `­”_decod” +( +Ýt_codec_ùx +,ƒlm->type, + +1089 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r2 +, +pd +); + +1091 +rv + = + `­”_ݒ_ty³_g‘ +( +Ýt_codec_ùx +, +–m +-> +ty³ +, + +1092 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r2 +, +pd +); + +1095 if( +rv +. +code + !ð +RC_OK +) + +1096 + `ASN_DEBUG +("Failedo decode %s in %s (CHOICE) %d", + +1097 +–m +-> +Çme +, +td +->Çme, +rv +. +code +); + +1098  +rv +; + +1099 + } +} + +1101 +a¢_’c_rv®_t + + +1102 + $CHOICE_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1103 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +1104 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +1105 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_CHOICE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +1106 cÚ¡ +a¢_TYPE_memb”_t + * +–m +; + +1107 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù + = +NULL +; + +1108 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ext_ù + = +NULL +; + +1109 cÚ¡ * +memb_±r +; + +1110  +´e£Á +; + +1111  +´e£Á_’c +; + +1113 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +1115 + `ASN_DEBUG +("Encodšg % a CHOICE usšg ALIGNED PER", +td +-> +Çme +); + +1117 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +v®ue +; + +1118 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +1119 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +v®ue +; + +1120 +ù + = +NULL +; + +1122 +´e£Á + = + `_ãtch_´e£Á_idx +( +¥Œ +, + +1123 +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +1129 if( +´e£Á + <ð0 || (í»£Á > +td +-> +–em’ts_couÁ +) + +1130 +ASN__ENCODE_FAILED +; + +1132 +´e£Á +--; + +1135 if( +¥ecs +-> +to_ÿnÚiÿl_Üd” +) + +1136 +´e£Á_’c + = +¥ecs +-> +to_ÿnÚiÿl_Üd” +[ +´e£Á +]; + +1138 +´e£Á_’c + = +´e£Á +; + +1140 + `ASN_DEBUG +("Encodšg % CHOICEƒËm’ˆ%d", +td +-> +Çme +, +´e£Á +); + +1142 if( +ù + && (ù-> +¿nge_b™s + >= 0)) { + +1144 if( +´e£Á + < +ù +-> +low”_bound + ||…»£Á > ct-> +uµ”_bound +) { + +1145 if( +ù +-> +æags + & +APC_EXTENSIBLE +) { + +1146 + `ASN_DEBUG +("CHOICE member %d (enc %d) is‡nƒxtension (%ld..%ld)", + +1147 +´e£Á +, +´e£Á_’c +, +ù +-> +low”_bound +, ct-> +uµ”_bound +); + +1149 if( + `³r_put_ãw_b™s +( +po +, 1, 1)) { + +1150 +ASN__ENCODE_FAILED +; + +1153 +ASN__ENCODE_FAILED +; + +1156 +ext_ù + = +ù +; + +1157 +ù + = +NULL +; + +1161 if( +ù + && (ù-> +æags + & +APC_EXTENSIBLE +)) { + +1162 + `ASN_DEBUG +("CHOICE member %d (enc %d) is‚ot‡nƒxtension (%ld..%ld)", + +1163 +´e£Á +,…»£Á, +ù +-> +low”_bound +, ct-> +uµ”_bound +); + +1165 if( + `³r_put_ãw_b™s +( +po +, 0, 1)) { + +1166 +ASN__ENCODE_FAILED +; + +1170 +–m + = & +td +-> +–em’ts +[ +´e£Á +]; + +1171 if( +–m +-> +æags + & +ATF_POINTER +) { + +1173 +memb_±r + = *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1174 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +1176 +memb_±r + = (cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +; + +1179 if( +ù + && (ù-> +¿nge_b™s + >= 0)) { + +1182 if( + `³r_put_ãw_b™s +( +po +, +´e£Á_’c +, +ù +-> +¿nge_b™s +)) + +1183 +ASN__ENCODE_FAILED +; + +1185  +–m +-> +ty³ +-> +Ý +-> + `­”_’cod” +Ólm->ty³,ƒlm-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, + +1186 +memb_±r +, +po +); + +1188 +a¢_’c_rv®_t + +rv® + = {0,0,0}; + +1189 if( +¥ecs +-> +ext_¡¬t + == -1) + +1190 +ASN__ENCODE_FAILED +; + +1193 if( +ext_ù + && + `­”_put_n¢nwn +( +po +,ƒxt_ù-> +¿nge_b™s +, +´e£Á_’c + - +¥ecs +-> +ext_¡¬t +)) + +1194 +ASN__ENCODE_FAILED +; + +1195 if( + `­”_ݒ_ty³_put +( +–m +-> +ty³ +,ƒlm-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, + +1196 +memb_±r +, +po +)) + +1197 +ASN__ENCODE_FAILED +; + +1198 +rv® +. +’coded + = 0; + +1199 + `ASN__ENCODED_OK +( +rv® +); + +1201 + } +} + +1204 + $CHOICE_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +1205 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +1206 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_CHOICE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +1207  +´e£Á +; + +1209 if(! +¥Œ +è ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +1214 +´e£Á + = + `_ãtch_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +,¥ecs-> +´es_size +); + +1219 if( +´e£Á + > 0 &&…»£Á <ð +td +-> +–em’ts_couÁ +) { + +1220 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +´e£Á +-1]; + +1221 cÚ¡ * +memb_±r +; + +1223 if( +–m +-> +æags + & +ATF_POINTER +) { + +1224 +memb_±r + = *(cÚ¡ * cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1225 if(! +memb_±r +è ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +1227 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1232 if( + `cb +( +–m +-> +Çme +, + `¡¾’ +Ólm->Çme), +­p_key +) < 0 + +1233 || + `cb +(": ", 2, +­p_key +) < 0) + +1237  +–m +-> +ty³ +-> +Ý +-> + `´št_¡ruù +Ólm->ty³, +memb_±r +, +žev– +, + +1238 +cb +, +­p_key +); + +1240  ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +1242 + } +} + +1245 + $CHOICE_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +±r +, + +1246 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +1247 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +1248 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1249  +´e£Á +; + +1251 if(! +td + || ! +±r +) + +1254 + `ASN_DEBUG +("F»ešg % a CHOICE", +td +-> +Çme +); + +1259 +´e£Á + = + `_ãtch_´e£Á_idx +( +±r +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +1264 if( +´e£Á + > 0 &&…»£Á <ð +td +-> +–em’ts_couÁ +) { + +1265 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +´e£Á +-1]; + +1266 * +memb_±r +; + +1268 if( +–m +-> +æags + & +ATF_POINTER +) { + +1269 +memb_±r + = *(**)((*) +±r + + +–m +-> +memb_off£t +); + +1270 if( +memb_±r +) + +1271 + `ASN_STRUCT_FREE +(* +–m +-> +ty³ +, +memb_±r +); + +1273 +memb_±r + = (*)((*) +±r + + +–m +-> +memb_off£t +); + +1274 + `ASN_STRUCT_FREE_CONTENTS_ONLY +(* +–m +-> +ty³ +, +memb_±r +); + +1278  +m‘hod +) { + +1279  +ASFM_FREE_EVERYTHING +: + +1280 + `FREEMEM +( +±r +); + +1282  +ASFM_FREE_UNDERLYING +: + +1284  +ASFM_FREE_UNDERLYING_AND_RESET +: + +1285 + `mem£t +( +±r +, 0, +¥ecs +-> +¡ruù_size +); + +1288 + } +} + +1301 + $_ãtch_´e£Á_idx +(cÚ¡ * +¡ruù_±r +,  +´es_off£t +, + +1302  +´es_size +) { + +1303 cÚ¡ * +´e£Á_±r +; + +1304  +´e£Á +; + +1306 +´e£Á_±r + = ((cÚ¡ *) +¡ruù_±r +è+ +´es_off£t +; + +1308  +´es_size +) { + +1309 (): +´e£Á + = *(cÚ¡ *) +´e£Á_±r +; ; + +1310 (): +´e£Á + = *(cÚ¡ *) +´e£Á_±r +; ; + +1311 (): +´e£Á + = *(cÚ¡ *) +´e£Á_±r +; ; + +1314 + `as£¹ +( +´es_size + != ()); + +1318  +´e£Á +; + +1319 + } +} + +1322 + $_£t_´e£Á_idx +(* +¡ruù_±r +,  +´es_off£t +,  +´es_size +, + +1323  +´e£Á +) { + +1324 * +´e£Á_±r +; + +1325 +´e£Á_±r + = ((*) +¡ruù_±r +è+ +´es_off£t +; + +1327  +´es_size +) { + +1328 (): *(*) +´e£Á_±r + = +´e£Á +; ; + +1329 (): *(*) +´e£Á_±r + = +´e£Á +; ; + +1330 (): *(*) +´e£Á_±r + = +´e£Á +; ; + +1333 + `as£¹ +( +´es_size + != ()); + +1335 + } +} + +1338 + $_g‘_memb”_±r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +1339 +a¢_TYPE_memb”_t + ** +–m_±r +, * +´e£Á_out +) { + +1340 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +1341 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1342  +´e£Á +; + +1344 if(! +¥Œ +) { + +1345 * +–m_±r + = +NULL +; + +1346 * +´e£Á_out + = 0; + +1347  +NULL +; + +1353 +´e£Á + = + `_ãtch_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +1354 * +´e£Á_out + = +´e£Á +; + +1360 if( +´e£Á + > 0 &&…»£Á <ð +td +-> +–em’ts_couÁ +) { + +1361 +a¢_TYPE_memb”_t + *cÚ¡ +–m + = & +td +-> +–em’ts +[ +´e£Á + - 1]; + +1362 cÚ¡ * +memb_±r +; + +1364 if( +–m +-> +æags + & +ATF_POINTER +) { + +1365 +memb_±r + = + +1366 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1368 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1370 * +–m_±r + = +–m +; + +1371  +memb_±r +; + +1373 * +–m_±r + = +NULL +; + +1374  +NULL +; + +1377 + } +} + +1380 + $CHOICE_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, cÚ¡ * +b±r +) { + +1381 +a¢_TYPE_memb”_t + * +«lm +; + +1382 +a¢_TYPE_memb”_t + * +b–m +; + +1383  +­»£Á + = 0; + +1384  +b´e£Á + = 0; + +1385 cÚ¡ * +amemb” + = + `_g‘_memb”_±r +( +td +, +­Œ +, & +«lm +, & +­»£Á +); + +1386 cÚ¡ * +bmemb” + = + `_g‘_memb”_±r +( +td +, +b±r +, & +b–m +, & +b´e£Á +); + +1388 if( +amemb” + && +bmemb” +) { + +1389 if( +­»£Á + =ð +b´e£Á +) { + +1390 + `as£¹ +( +«lm + =ð +b–m +); + +1391  +«lm +-> +ty³ +-> +Ý +-> + `com·»_¡ruù +זm->ty³, +amemb” +, +bmemb” +); + +1392 } if( +­»£Á + < +b´e£Á +) { + +1397 } if(! +amemb” +) { + +1402 + } +} + +1409 + $CHOICE_v¬ŸÁ_g‘_´e£nû +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +) { + +1410 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +1411 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1412  + `_ãtch_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +1413 + } +} + +1422 + $CHOICE_v¬ŸÁ_£t_´e£nû +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +1423  +´e£Á +) { + +1424 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +1425 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1426  +Þd_´e£Á +; + +1428 if(! +¥Œ +) { + +1432 if( +´e£Á + > +td +-> +–em’ts_couÁ +) + +1435 +Þd_´e£Á + = + +1436 + `_ãtch_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +); + +1437 if( +´e£Á + =ð +Þd_´e£Á +) + +1440 if( +Þd_´e£Á + != 0) { + +1441 + `as£¹ +( +Þd_´e£Á + <ð +td +-> +–em’ts_couÁ +); + +1442 + `ASN_STRUCT_RESET +(* +td +, +¥Œ +); + +1445 + `_£t_´e£Á_idx +( +¥Œ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +, +´e£Á +); + +1448 + } +} + +1451 +a¢_¿ndom_fžl_»suÉ_t + + +1452 + $CHOICE_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +1453 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡r +, + +1454 +size_t + +max_Ëngth +) { + +1455 cÚ¡ +a¢_CHOICE_¥ecifics_t + * +¥ecs + = + +1456 (cÚ¡ +a¢_CHOICE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1457 +a¢_¿ndom_fžl_»suÉ_t + +»s +; + +1458 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +1459 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +1460 cÚ¡ +a¢_TYPE_memb”_t + * +–m +; + +1461  +´e£Á +; + +1462 * +memb_±r +; + +1463 ** +memb_±r2 +; + +1464 * +¡ + = * +¥Œ +; + +1466 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +1468 () +cÚ¡r +; + +1470 if( +¡ + =ð +NULL +) { + +1471 +¡ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +1472 if( +¡ + =ð +NULL +) { + +1473  +»suÉ_çžed +; + +1477 +´e£Á + = + `a¢_¿ndom_b‘w“n +(1, +td +-> +–em’ts_couÁ +); + +1478 +–m + = & +td +-> +–em’ts +[ +´e£Á + - 1]; + +1480 if( +–m +-> +æags + & +ATF_POINTER +) { + +1482 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +1484 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +1485 +memb_±r2 + = & +memb_±r +; + +1488 +»s + = +–m +-> +ty³ +-> +Ý +-> + `¿ndom_fžl +Ólm->ty³, +memb_±r2 +, + +1489 & +–m +-> +’codšg_cÚ¡¿šts +, +max_Ëngth +); + +1490 + `_£t_´e£Á_idx +( +¡ +, +¥ecs +-> +´es_off£t +, s³cs-> +´es_size +, +´e£Á +); + +1491 if( +»s +. +code + =ð +ARFILL_OK +) { + +1492 * +¥Œ + = +¡ +; + +1494 if( +¡ + =ð* +¥Œ +) { + +1495 + `ASN_STRUCT_RESET +(* +td +, +¡ +); + +1497 + `ASN_STRUCT_FREE +(* +td +, +¡ +); + +1501  +»s +; + +1502 + } +} + +1505 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_CHOICE + = { + +1506 +CHOICE_ä“ +, + +1507 +CHOICE_´št +, + +1508 +CHOICE_com·» +, + +1509 +CHOICE_decode_b” +, + +1510 +CHOICE_’code_d” +, + +1511 +CHOICE_decode_x” +, + +1512 +CHOICE_’code_x” +, + +1513 #ifdef +ASN_DISABLE_OER_SUPPORT + + +1517 +CHOICE_decode_Ûr +, + +1518 +CHOICE_’code_Ûr +, + +1520 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +1526 +CHOICE_decode_u³r +, + +1527 +CHOICE_’code_u³r +, + +1528 +CHOICE_decode_­” +, + +1529 +CHOICE_’code_­” +, + +1531 +CHOICE_¿ndom_fžl +, + +1532 +CHOICE_outmo¡_g + + + @constr_SEQUENCE.c + +6  + ~ + +7  + ~ + +8  + ~ + +9  + ~<³r_ݒty³.h +> + +16  + #LEFT + (( +size +<( +size_t +) +ùx +-> +Ëá +)?size:(size_t)ùx->Ëá) + + ) + +29  + #SIZE_VIOLATION + ( +ùx +-> +Ëá + >ð0 && ( +size_t +)ùx->Ëá <ð +size +) + + ) + +35 #undeà +ADVANCE + + +36  + #ADVANCE +( +num_by‹s +) do { \ + +37 +size_t + +num + = +num_by‹s +; \ + +38 +±r + = ((cÚ¡ *íŒè+ +num +; \ + +39 +size + -ð +num +; \ + +40 if( +ùx +-> +Ëá + >= 0) \ + +41 +ùx +-> +Ëá + -ð +num +; \ + +42 +cÚsumed_my£lf + +ð +num +; \ + +43 } 0) + + ) + +48 #undeà +NEXT_PHASE + + +49 #undeà +PHASE_OUT + + +50  + #NEXT_PHASE +( +ùx +) do { \ + +51 +ùx +-> +pha£ +++; \ + +52 +ùx +-> +¡• + = 0; \ + +53 } 0) + + ) + +54  + #PHASE_OUT +( +ùx +èdØ{ ctx-> +pha£ + = 10; } 0) + + ) + +59 #undeà +RETURN + + +60  + #RETURN +( +_code +) do { \ + +61 +rv® +. +code + = +_code +; \ + +62 +rv® +. +cÚsumed + = +cÚsumed_my£lf +;\ + +63  +rv® +; \ + +64 } 0) + + ) + +69  + #IN_EXTENSION_GROUP +( +¥ecs +, +memb_idx +) \ + +70 (( +¥ecs +)-> +fœ¡_ex‹nsiÚ + >= 0 \ + +71 && ()( +¥ecs +)-> +fœ¡_ex‹nsiÚ + <ð( +memb_idx +)) + + ) + +77 + $_t2e_cmp +(cÚ¡ * +­ +, cÚ¡ * +bp +) { + +78 cÚ¡ +a¢_TYPE_g2memb”_t + * +a + = (cÚ¡‡¢_TYPE_g2memb”_ˆ*) +­ +; + +79 cÚ¡ +a¢_TYPE_g2memb”_t + * +b + = (cÚ¡‡¢_TYPE_g2memb”_ˆ*) +bp +; + +81  +a_þass + = + `BER_TAG_CLASS +( +a +-> +–_g +); + +82  +b_þass + = + `BER_TAG_CLASS +( +b +-> +–_g +); + +84 if( +a_þass + =ð +b_þass +) { + +85 +b”_Žv_g_t + +a_v®ue + = + `BER_TAG_VALUE +( +a +-> +–_g +); + +86 +b”_Žv_g_t + +b_v®ue + = + `BER_TAG_VALUE +( +b +-> +–_g +); + +88 if( +a_v®ue + =ð +b_v®ue +) { + +89 if( +a +-> +–_no + > +b +->el_no) + +96 } if( +a_v®ue + < +b_v®ue +) + +100 } if( +a_þass + < +b_þass +) { + +105 + } +} + +111 +a¢_dec_rv®_t + + +112 + $SEQUENCE_decode_b” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +113 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¡ruù_±r +, + +114 cÚ¡ * +±r +, +size_t + +size +,  +g_mode +) { + +118 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SEQUENCE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +119 cÚ¡ +a¢_TYPE_memb”_t + * +–em’ts + = +td +->elements; + +124 * +¡ + = * +¡ruù_±r +; + +125 +a¢_¡ruù_ùx_t + * +ùx +; + +127 +b”_Žv_g_t + +Žv_g +; + +128 +a¢_dec_rv®_t + +rv® +; + +130 +ssize_t + +cÚsumed_my£lf + = 0; + +131 +size_t + +edx +; + +133 + `ASN_DEBUG +("Decodšg % a SEQUENCE", +td +-> +Çme +); + +138 if( +¡ + == 0) { + +139 +¡ + = * +¡ruù_±r + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +140 if( +¡ + == 0) { + +141 + `RETURN +( +RC_FAIL +); + +148 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +153  +ùx +-> +pha£ +) { + +161 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, +ùx +, +±r +, +size +, + +162 +g_mode +, 1, & +ùx +-> +Ëá +, 0); + +163 if( +rv® +. +code + !ð +RC_OK +) { + +164 + `ASN_DEBUG +("%sagging check failed: %d", + +165 +td +-> +Çme +, +rv® +. +code +); + +166  +rv® +; + +169 if( +ùx +-> +Ëá + >= 0) + +170 +ùx +-> +Ëá + +ð +rv® +. +cÚsumed +; + +171 + `ADVANCE +( +rv® +. +cÚsumed +); + +173 + `NEXT_PHASE +( +ùx +); + +175 + `ASN_DEBUG +("Structure consumes %ld bytes, buffer %ld", + +176 () +ùx +-> +Ëá +, () +size +); + +190  +edx + = (( +size_t +) +ùx +-> +¡• + >> 1);ƒdx < +td +-> +–em’ts_couÁ +; + +191 +edx +++, +ùx +-> +¡• + = (ctx->step & ~1) + 2) { + +192 * +memb_±r +; + +193 ** +memb_±r2 +; + +194 +ssize_t + +g_Ën +; + +195 +size_t + +Ýt_edx_’d +; + +196 +size_t + +n +; + +197  +u£_b£¬ch +; + +199 if( +ùx +-> +¡• + & 1) + +200  +miüÝha£2 +; + +205 + `ASN_DEBUG +("IÀ% SEQUENCE†eá %d,ƒdx=%" +ASN_PRI_SIZE + " flags=%d" + +207 +td +-> +Çme +, () +ùx +-> +Ëá +, +edx +, + +208 +–em’ts +[ +edx +]. +æags +,ƒËm’ts[edx]. +ÝtiÚ® +, + +209 +td +-> +–em’ts_couÁ +); + +211 if( +ùx +-> +Ëá + == 0 + +214 ( +edx + + +–em’ts +[edx]. +ÝtiÚ® + =ð +td +-> +–em’ts_couÁ +) || + +216 + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +))) { + +217 + `ASN_DEBUG +("End oàSEQUENCE %s", +td +-> +Çme +); + +221 + `PHASE_OUT +( +ùx +); + +222 + `RETURN +( +RC_OK +); + +228 +g_Ën + = + `b”_ãtch_g +( +±r +, +LEFT +, & +Žv_g +); + +229 + `ASN_DEBUG +("Cu¼’ˆg iÀ% SEQUENCE f܃Ëm’ˆ%" +ASN_PRI_SIZE + " " + +231 +td +-> +Çme +, +edx +, +–em’ts +[edx].name, + +232 + `b”_Žv_g_¡ršg +( +Žv_g +), () +g_Ën +, () +LEFT +); + +233  +g_Ën +) { + +234 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +236 -1: + `RETURN +( +RC_FAIL +); + +239 if( +ùx +-> +Ëá + < 0 && ((cÚ¡ +ušt8_t + *) +±r +)[0] == 0) { + +240 if( +LEFT + < 2) { + +241 if( +SIZE_VIOLATION +) { + +242 + `RETURN +( +RC_FAIL +); + +244 + `RETURN +( +RC_WMORE +); + +246 } if(((cÚ¡ +ušt8_t + *) +±r +)[1] == 0) { + +247 + `ASN_DEBUG +("edx = %" +ASN_PRI_SIZE + ", o± = %d,ƒc=%d", +edx +, + +248 +–em’ts +[ +edx +]. +ÝtiÚ® +, +td +-> +–em’ts_couÁ +); + +249 if(( +edx + + +–em’ts +[edx]. +ÝtiÚ® + =ð +td +-> +–em’ts_couÁ +) + +250 || + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +)) { + +260  +pha£3 +; + +268 +u£_b£¬ch + = 0; + +269 +Ýt_edx_’d + = +edx + + +–em’ts +[edx]. +ÝtiÚ® + + 1; + +270 if( +Ýt_edx_’d + > +td +-> +–em’ts_couÁ +) + +271 +Ýt_edx_’d + = +td +-> +–em’ts_couÁ +; + +272 if( +Ýt_edx_’d + - +edx + > 8) { + +274 +Ýt_edx_’d + = +edx + + 8; + +275 +u£_b£¬ch + = 1; + +278  +n + = +edx +;‚ < +Ýt_edx_’d +;‚++) { + +279 if( + `BER_TAGS_EQUAL +( +Žv_g +, +–em’ts +[ +n +]. +g +)) { + +285 +edx + = +n +; + +286 +ùx +-> +¡• + = 1 + 2 * +edx +; + +287  +miüÝha£2 +; + +288 } if( +–em’ts +[ +n +]. +æags + & +ATF_ANY_TYPE +) { + +293 +edx + = +n +; + +294 +ùx +-> +¡• + = 1 + 2 * +edx +; + +295  +miüÝha£2 +; + +296 } if( +–em’ts +[ +n +]. +g + =ð( +b”_Žv_g_t +)-1) { + +297 +u£_b£¬ch + = 1; + +301 if( +u£_b£¬ch +) { + +306 cÚ¡ +a¢_TYPE_g2memb”_t + * +t2m +; + +307 +a¢_TYPE_g2memb”_t + +key + = {0, 0, 0, 0}; + +308 +key +. +–_g + = +Žv_g +; + +309 +key +. +–_no + = +edx +; + +310 +t2m + = (cÚ¡ +a¢_TYPE_g2memb”_t + *) + `b£¬ch +(& +key +, + +311 +¥ecs +-> +g2– +, s³cs-> +g2–_couÁ +, + +312 ( +¥ecs +-> +g2– +[0]), +_t2e_cmp +); + +313 if( +t2m +) { + +314 cÚ¡ +a¢_TYPE_g2memb”_t + * +be¡ + = 0; + +315 cÚ¡ +a¢_TYPE_g2memb”_t + * +t2m_f +, * +t2m_l +; + +316 +size_t + +edx_max + = +edx + + +–em’ts +[edx]. +ÝtiÚ® +; + +321 +t2m_f + = +t2m + +2m-> +toff_fœ¡ +; + +322 +t2m_l + = +t2m + +2m-> +toff_Ï¡ +; + +323  +t2m + = +t2m_f +;2m <ð +t2m_l +;2m++) { + +324 if( +t2m +-> +–_no + > +edx_max +) ; + +325 if( +t2m +-> +–_no + < +edx +) ; + +326 +be¡ + = +t2m +; + +328 if( +be¡ +) { + +329 +edx + = +be¡ +-> +–_no +; + +330 +ùx +-> +¡• + = 1 + 2 * +edx +; + +331  +miüÝha£2 +; + +334 +n + = +Ýt_edx_’d +; + +336 if( +n + =ð +Ýt_edx_’d +) { + +343 if(! + `IN_EXTENSION_GROUP +( +¥ecs +, + +344 +edx + + +–em’ts +[edx]. +ÝtiÚ® +)) { + +345 + `ASN_DEBUG +("UÃx³ùedag % ×ˆ%" +ASN_PRI_SIZE + ")", + +346 + `b”_Žv_g_¡ršg +( +Žv_g +), +edx +); + +347 + `ASN_DEBUG +("Expectedag %s (%s)%s", + +348 + `b”_Žv_g_¡ršg +( +–em’ts +[ +edx +]. +g +), + +349 +–em’ts +[ +edx +]. +Çme +, + +350 +–em’ts +[ +edx +]. +ÝtiÚ® + + +352 + `RETURN +( +RC_FAIL +); + +355 +ssize_t + +sk +; + +356 +edx + +ð +–em’ts +[edx]. +ÝtiÚ® +; + +358 + `ASN_DEBUG +("Skpšg uÃx³ùed % ×ˆ%" +ASN_PRI_SIZE + ")", + +359 + `b”_Žv_g_¡ršg +( +Žv_g +), +edx +); + +360 +sk + = + `b”_sk_Ëngth +( +Ýt_codec_ùx +, + +361 + `BER_TLV_CONSTRUCTED +( +±r +), + +362 (cÚ¡ *) +±r + + +g_Ën +, + +363 +LEFT + - +g_Ën +); + +364 + `ASN_DEBUG +("Skip†ength %d in %s", + +365 () +sk +, +td +-> +Çme +); + +366  +sk +) { + +367 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +369 -1: + `RETURN +( +RC_FAIL +); + +372 + `ADVANCE +( +sk + + +g_Ën +); + +373 +ùx +-> +¡• + -= 2; + +374 +edx +--; + +382 +ùx +-> +¡• + |= 1; + +383 +miüÝha£2 +: + +384 + `ASN_DEBUG +("InsidSEQUENCE % MF2", +td +-> +Çme +); + +391 if( +–em’ts +[ +edx +]. +æags + & +ATF_POINTER +) { + +393 +memb_±r2 + = (**)((*) +¡ + + +–em’ts +[ +edx +]. +memb_off£t +); + +399 +memb_±r + = (*) +¡ + + +–em’ts +[ +edx +]. +memb_off£t +; + +400 +memb_±r2 + = & +memb_±r +; + +405 if( +–em’ts +[ +edx +]. +æags + & +ATF_OPEN_TYPE +) { + +406 +rv® + = + `OPEN_TYPE_b”_g‘ +( +Ýt_codec_ùx +, +td +, +¡ +, & +–em’ts +[ +edx +], +±r +, +LEFT +); + +408 +rv® + = +–em’ts +[ +edx +]. +ty³ +-> +Ý +-> + `b”_decod” +( +Ýt_codec_ùx +, + +409 +–em’ts +[ +edx +]. +ty³ +, + +410 +memb_±r2 +, +±r +, +LEFT +, + +411 +–em’ts +[ +edx +]. +g_mode +); + +413 + `ASN_DEBUG +("IÀ% SEQUENCE decoded %" +ASN_PRI_SIZE + " %s of %d " + +415 +td +-> +Çme +, +edx +, +–em’ts +[edx]. +ty³ +->name, + +416 () +LEFT +, () +rv® +. +cÚsumed +,„v®. +code +, () +size +); + +417  +rv® +. +code +) { + +418  +RC_OK +: + +420  +RC_WMORE +: + +421 if(! +SIZE_VIOLATION +) { + +422 + `ADVANCE +( +rv® +. +cÚsumed +); + +423 + `RETURN +( +RC_WMORE +); + +425 + `ASN_DEBUG +("Size violation (c->l=%ld <= s=%ld)", + +426 () +ùx +-> +Ëá +, () +size +); + +428  +RC_FAIL +: + +429 + `RETURN +( +RC_FAIL +); + +432 + `ADVANCE +( +rv® +. +cÚsumed +); + +435 +pha£3 +: + +436 +ùx +-> +pha£ + = 3; + +441 + `ASN_DEBUG +("SEQUENCE %s Leftover: %ld, size = %ld", + +442 +td +-> +Çme +, () +ùx +-> +Ëá +, () +size +); + +447  +ùx +-> +Ëá +) { + +448 +ssize_t + +Ž +, +Î +; + +450 +Ž + = + `b”_ãtch_g +( +±r +, +LEFT +, & +Žv_g +); + +451  +Ž +) { + +452 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +454 -1: + `RETURN +( +RC_FAIL +); + +460 if( +ùx +-> +Ëá + < 0 + +461 && ((cÚ¡ +ušt8_t + *) +±r +)[0] == 0) { + +462 if( +LEFT + < 2) { + +463 if( +SIZE_VIOLATION +) + +464 + `RETURN +( +RC_FAIL +); + +466 + `RETURN +( +RC_WMORE +); + +467 } if(((cÚ¡ +ušt8_t + *) +±r +)[1] == 0) { + +471 + `ADVANCE +(2); + +472 +ùx +-> +Ëá +++; + +473 +ùx +-> +pha£ + = 4; + +478 if(! + `IN_EXTENSION_GROUP +( +¥ecs +, +td +-> +–em’ts_couÁ +) + +479 || +ùx +-> +pha£ + == 4) { + +480 + `ASN_DEBUG +("Unexpected continuation " + +483 +td +-> +Çme +, + +484 + `b”_Žv_g_¡ršg +( +Žv_g +)); + +485 + `RETURN +( +RC_FAIL +); + +488 +Î + = + `b”_sk_Ëngth +( +Ýt_codec_ùx +, + +489 + `BER_TLV_CONSTRUCTED +( +±r +), + +490 (cÚ¡ *) +±r + + +Ž +, +LEFT + -l); + +491  +Î +) { + +492 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +494 -1: + `RETURN +( +RC_FAIL +); + +497 + `ADVANCE +( +Ž + + +Î +); + +500 + `PHASE_OUT +( +ùx +); + +503 + `RETURN +( +RC_OK +); + +504 + } +} + +510 +a¢_’c_rv®_t + + +511 + $SEQUENCE_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +512  +g_mode +, +b”_Žv_g_t + +g +, + +513 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +514 +size_t + +compu‹d_size + = 0; + +515 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +516 +ssize_t + +»t +; + +517 +size_t + +edx +; + +519 + `ASN_DEBUG +("%s %s‡s SEQUENCE", + +520 +cb +?"Encodšg":"E¡im©šg", +td +-> +Çme +); + +525  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +526 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +528 cÚ¡ * +memb_±r +; + +529 cÚ¡ *cÚ¡ * +memb_±r2 +; + +531 if( +–m +-> +æags + & +ATF_POINTER +) { + +532 +memb_±r2 + = + +533 (cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +534 if(!* +memb_±r2 +) { + +535 + `ASN_DEBUG +("EËm’ˆ% %" +ASN_PRI_SIZE + "‚ot…resent", + +536 +–m +-> +Çme +, +edx +); + +537 if( +–m +-> +ÝtiÚ® +) + +540 +ASN__ENCODE_FAILED +; + +543 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +544 +memb_±r2 + = & +memb_±r +; + +548 if( +–m +-> +deçuÉ_v®ue_cmp + &&ƒlm-> + `deçuÉ_v®ue_cmp +(* +memb_±r2 +) == 0) + +551 +”v® + = +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, * +memb_±r2 +, + +552 +–m +-> +g_mode +,ƒlm-> +g +, + +554 if( +”v® +. +’coded + == -1) + +555  +”v® +; + +556 +compu‹d_size + +ð +”v® +. +’coded +; + +557 + `ASN_DEBUG +("Memb” %" +ASN_PRI_SIZE + " %sƒstimated %ld bytes", + +558 +edx +, +–m +-> +Çme +, () +”v® +. +’coded +); + +564 +»t + = + `d”_wr™e_gs +( +td +, +compu‹d_size +, +g_mode +, 1, +g +, +cb +, +­p_key +); + +565 + `ASN_DEBUG +("Wrِgs: %ld (+%ld)", () +»t +, () +compu‹d_size +); + +566 if( +»t + == -1) + +567 +ASN__ENCODE_FAILED +; + +568 +”v® +. +’coded + = +compu‹d_size + + +»t +; + +570 if(! +cb +è + `ASN__ENCODED_OK +( +”v® +); + +575  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +576 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +577 +a¢_’c_rv®_t + +tm³rv® + = {0,0,0}; + +578 cÚ¡ * +memb_±r +; + +579 cÚ¡ *cÚ¡ * +memb_±r2 +; + +581 if( +–m +-> +æags + & +ATF_POINTER +) { + +582 +memb_±r2 + = + +583 (cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +584 if(!* +memb_±r2 +) ; + +586 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +587 +memb_±r2 + = & +memb_±r +; + +591 if( +–m +-> +deçuÉ_v®ue_cmp + &&ƒlm-> + `deçuÉ_v®ue_cmp +(* +memb_±r2 +) == 0) + +594 +tm³rv® + = +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, * +memb_±r2 +, + +595 +–m +-> +g_mode +,ƒlm-> +g +, +cb +, +­p_key +); + +596 if( +tm³rv® +. +’coded + == -1) + +597  +tm³rv® +; + +598 +compu‹d_size + -ð +tm³rv® +. +’coded +; + +599 + `ASN_DEBUG +("Memb” %" +ASN_PRI_SIZE + " %s of SEQUENCE %sƒncoded in %ld bytes", + +600 +edx +, +–m +-> +Çme +, +td +->Çme, () +tm³rv® +. +’coded +); + +603 if( +compu‹d_size + != 0) + +607 +ASN__ENCODE_FAILED +; + +609 + `ASN__ENCODED_OK +( +”v® +); + +610 + } +} + +613 #undeà +XER_ADVANCE + + +614  + #XER_ADVANCE +( +num_by‹s +) \ + +616 +size_t + +num + = ( +num_by‹s +); \ + +617 +±r + = ((cÚ¡ *íŒè+ +num +; \ + +618 +size + -ð +num +; \ + +619 +cÚsumed_my£lf + +ð +num +; \ + +620 } 0) + + ) + +625 +a¢_dec_rv®_t + + +626 + $SEQUENCE_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +627 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¡ruù_±r +, + +628 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +±r +, +size_t + +size +) { + +632 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + + +633 ð(cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *) +td +-> +¥ecifics +; + +634 +a¢_TYPE_memb”_t + * +–em’ts + = +td +->elements; + +635 cÚ¡ * +xml_g + = +Ýt_mÇme + ? o±_mÇm: +td +->xml_tag; + +640 * +¡ + = * +¡ruù_±r +; + +641 +a¢_¡ruù_ùx_t + * +ùx +; + +643 +a¢_dec_rv®_t + +rv® +; + +644 +ssize_t + +cÚsumed_my£lf + = 0; + +645 +size_t + +edx +; + +650 if( +¡ + == 0) { + +651 +¡ + = * +¡ruù_±r + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +652 if( +¡ + =ð0è + `RETURN +( +RC_FAIL +); + +658 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +669  +edx + = +ùx +-> +¡• +; ctx-> +pha£ + <= 3;) { + +670 +px”_chunk_ty³_e + +ch_ty³ +; + +671 +ssize_t + +ch_size +; + +672 +x”_check_g_e + +tcv +; + +673 +a¢_TYPE_memb”_t + * +–m +; + +678 if( +ùx +-> +pha£ + == 2) { + +679 +a¢_dec_rv®_t + +tm´v® +; + +680 * +memb_±r_dÚtu£ +; + +681 ** +memb_±r2 +; + +683 +–m + = & +td +-> +–em’ts +[ +edx +]; + +685 if( +–m +-> +æags + & +ATF_POINTER +) { + +687 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +689 +memb_±r_dÚtu£ + = (*) +¡ + + +–m +-> +memb_off£t +; + +690 +memb_±r2 + = & +memb_±r_dÚtu£ +; + +693 if( +–m +-> +æags + & +ATF_OPEN_TYPE +) { + +694 +tm´v® + = + `OPEN_TYPE_x”_g‘ +( +Ýt_codec_ùx +, +td +, +¡ +, +–m +, +±r +, +size +); + +697 +tm´v® + = +–m +-> +ty³ +-> +Ý +-> + `x”_decod” +( +Ýt_codec_ùx +, + +698 +–m +-> +ty³ +, +memb_±r2 +,ƒlm-> +Çme +, + +699 +±r +, +size +); + +701 + `XER_ADVANCE +( +tm´v® +. +cÚsumed +); + +702 if( +tm´v® +. +code + !ð +RC_OK +) + +703 + `RETURN +( +tm´v® +. +code +); + +704 +ùx +-> +pha£ + = 1; + +705 +ùx +-> +¡• + = ++ +edx +; + +706 + `ASN_DEBUG +("XER/SEQUENCE…hase => %d, step => %d", + +707 +ùx +-> +pha£ +, ctx-> +¡• +); + +714 +ch_size + = + `x”_Ãxt_tok’ +(& +ùx +-> +cڋxt +, +±r +, +size +, + +715 & +ch_ty³ +); + +716 if( +ch_size + == -1) { + +717 + `RETURN +( +RC_FAIL +); + +719  +ch_ty³ +) { + +720  +PXER_WMORE +: + +721 + `RETURN +( +RC_WMORE +); + +722  +PXER_COMMENT +: + +723  +PXER_TEXT +: + +724 + `XER_ADVANCE +( +ch_size +); + +726  +PXER_TAG +: + +731 +tcv + = + `x”_check_g +( +±r +, +ch_size +, +xml_g +); + +732 + `ASN_DEBUG +("XER/SEQUENCE:cv = %d,…h=%d [%s]", + +733 +tcv +, +ùx +-> +pha£ +, +xml_g +); + +736 if( +ùx +-> +pha£ + == 3) { + +737  + `x”_sk_unknown +( +tcv +, & +ùx +-> +Ëá +)) { + +739 +ùx +-> +pha£ + = 4; + +740 + `RETURN +( +RC_FAIL +); + +742 + `XER_ADVANCE +( +ch_size +); + +745 + `XER_ADVANCE +( +ch_size +); + +746 +ùx +-> +pha£ + = 1; + +749 +ùx +-> +pha£ + = 1; + +754  +tcv +) { + +755  +XCT_CLOSING +: + +756 if( +ùx +-> +pha£ + == 0) ; + +757 +ùx +-> +pha£ + = 0; + +759  +XCT_BOTH +: + +760 if( +ùx +-> +pha£ + == 0) { + +761 if( +edx + >ð +td +-> +–em’ts_couÁ + || + +763 ( +edx + + +–em’ts +[edx]. +ÝtiÚ® + =ð +td +-> +–em’ts_couÁ +) || + +765 + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +)) { + +766 + `XER_ADVANCE +( +ch_size +); + +767 +ùx +-> +pha£ + = 4; + +768 + `RETURN +( +RC_OK +); + +770 + `ASN_DEBUG +("Prematureƒnd of XER SEQUENCE"); + +771 + `RETURN +( +RC_FAIL +); + +775  +XCT_OPENING +: + +776 if( +ùx +-> +pha£ + == 0) { + +777 + `XER_ADVANCE +( +ch_size +); + +778 +ùx +-> +pha£ + = 1; + +782  +XCT_UNKNOWN_OP +: + +783  +XCT_UNKNOWN_BO +: + +785 + `ASN_DEBUG +("XER/SEQUENCE:cv=%d,…h=%d,ƒdx=%" +ASN_PRI_SIZE + "", + +786 +tcv +, +ùx +-> +pha£ +, +edx +); + +787 if( +ùx +-> +pha£ + != 1) { + +791 if( +edx + < +td +-> +–em’ts_couÁ +) { + +795 +size_t + +n +; + +796 +size_t + +edx_’d + = +edx + + +–em’ts +[edx]. +ÝtiÚ® + + 1; + +797 if( +edx_’d + > +td +-> +–em’ts_couÁ +) + +798 +edx_’d + = +td +-> +–em’ts_couÁ +; + +799  +n + = +edx +;‚ < +edx_’d +;‚++) { + +800 +–m + = & +td +-> +–em’ts +[ +n +]; + +801 +tcv + = + `x”_check_g +( +±r +, +ch_size +, +–m +-> +Çme +); + +802  +tcv +) { + +803  +XCT_BOTH +: + +804  +XCT_OPENING +: + +808 +ùx +-> +¡• + = +edx + = +n +; + +809 +ùx +-> +pha£ + = 2; + +811  +XCT_UNKNOWN_OP +: + +812  +XCT_UNKNOWN_BO +: + +815 +n + = +edx_’d +; + +820 if( +n + !ð +edx_’d +) + +823 + `ASN_DEBUG +("Ouˆoàdefšed memb”s: %" +ASN_PRI_SIZE + "/%u", + +824 +edx +, +td +-> +–em’ts_couÁ +); + +828 if( + `IN_EXTENSION_GROUP +( +¥ecs +, + +829 +edx + + (edx < +td +-> +–em’ts_couÁ + + +830 ? +–em’ts +[ +edx +]. +ÝtiÚ® + : 0))) { + +831 + `ASN_DEBUG +("GهÁic©edƒx‹nsiڇˆ%" +ASN_PRI_SIZE + "", + +832 +edx +); + +838 if( +tcv + & +XCT_CLOSING +) { + +841 +ùx +-> +Ëá + = 1; + +842 +ùx +-> +pha£ + = 3; + +844 + `XER_ADVANCE +( +ch_size +); + +853 + `ASN_DEBUG +("Unexpected XMLag in SEQUENCE [%c%c%c%c%c%c]", + +854 +size +>0?((cÚ¡ *) +±r +)[0]:'.', + +855 +size +>1?((cÚ¡ *) +±r +)[1]:'.', + +856 +size +>2?((cÚ¡ *) +±r +)[2]:'.', + +857 +size +>3?((cÚ¡ *) +±r +)[3]:'.', + +858 +size +>4?((cÚ¡ *) +±r +)[4]:'.', + +859 +size +>5?((cÚ¡ *) +±r +)[5]:'.'); + +863 +ùx +-> +pha£ + = 4; + +864 + `RETURN +( +RC_FAIL +); + +865 + } +} + +867 +a¢_’c_rv®_t + + +868 + $SEQUENCE_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +869  +žev– +, +x”_’cod”_æags_e + +æags +, + +870 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +871 +a¢_’c_rv®_t + +” + = {0,0,0}; + +872  +xÿn + = ( +æags + & +XER_F_CANONICAL +); + +873 +a¢_TYPE_desütÜ_t + * +tmp_def_v®_td + = 0; + +874 * +tmp_def_v® + = 0; + +875 +size_t + +edx +; + +877 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +879 +” +. +’coded + = 0; + +881  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +882 +a¢_’c_rv®_t + +tm³r + = {0,0,0}; + +883 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +884 cÚ¡ * +memb_±r +; + +885 cÚ¡ * +mÇme + = +–m +-> +Çme +; + +886  +mËn + = + `¡¾’ +( +mÇme +); + +888 if( +–m +-> +æags + & +ATF_POINTER +) { + +889 +memb_±r + = + +890 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +891 if(! +memb_±r +) { + +892 + `as£¹ +( +tmp_def_v® + == 0); + +893 if( +–m +-> +deçuÉ_v®ue_£t +) { + +894 if( +–m +-> + `deçuÉ_v®ue_£t +(& +tmp_def_v® +)) { + +895 +ASN__ENCODE_FAILED +; + +897 +memb_±r + = +tmp_def_v® +; + +898 +tmp_def_v®_td + = +–m +-> +ty³ +; + +900 } if( +–m +-> +ÝtiÚ® +) { + +904 +ASN__ENCODE_FAILED +; + +908 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +911 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– +); + +912 + `ASN__CALLBACK3 +("<", 1, +mÇme +, +mËn +, ">", 1); + +915 +tm³r + = +–m +-> +ty³ +-> +Ý +-> + `x”_’cod” +Ólm->ty³, +memb_±r +, +žev– + + 1, + +916 +æags +, +cb +, +­p_key +); + +917 if( +tmp_def_v® +) { + +918 + `ASN_STRUCT_FREE +(* +tmp_def_v®_td +, +tmp_def_v® +); + +919 +tmp_def_v® + = 0; + +921 if( +tm³r +. +’coded + == -1) mper; + +922 +” +. +’coded + +ð +tm³r +.encoded; + +924 + `ASN__CALLBACK3 +("", 1); + +927 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– + - 1); + +929 + `ASN__ENCODED_OK +( +” +); + +930 +cb_çžed +: + +931 if( +tmp_def_v® +è + `ASN_STRUCT_FREE +(* +tmp_def_v®_td +,mp_def_val); + +932 +ASN__ENCODE_FAILED +; + +933 + } +} + +936 + $SEQUENCE_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +937 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +938 +size_t + +edx +; + +939  +»t +; + +941 if(! +¥Œ +è ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +944 if( + `cb +( +td +-> +Çme +, + `¡¾’ +Ñd->Çme), +­p_key +) < 0 + +945 || + `cb +(" ::ð{", 6, +­p_key +) < 0) + +948  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +949 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +950 cÚ¡ * +memb_±r +; + +952 if( +–m +-> +æags + & +ATF_POINTER +) { + +953 +memb_±r + = *(cÚ¡ * cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +954 if(! +memb_±r +) { + +955 if( +–m +-> +ÝtiÚ® +) ; + +960 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +964 + `_i_INDENT +(1); + +967 if( + `cb +( +–m +-> +Çme +, + `¡¾’ +Ólm->Çme), +­p_key +) < 0 + +968 || + `cb +(": ", 2, +­p_key +) < 0) + +972 +»t + = +–m +-> +ty³ +-> +Ý +-> + `´št_¡ruù +Ólm->ty³, +memb_±r +, +žev– + + 1, + +973 +cb +, +­p_key +); + +974 if( +»t +) „et; + +977 +žev– +--; + +978 + `_i_INDENT +(1); + +980  ( + `cb +("}", 1, +­p_key +) < 0) ? -1 : 0; + +981 + } +} + +984 + $SEQUENCE_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +¥Œ +, + +985 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +986 +size_t + +edx +; + +987 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + = + +988 (cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *) +td +-> +¥ecifics +; + +989 +a¢_¡ruù_ùx_t + * +ùx +; + +991 if(! +td + || ! +¥Œ +) + +994 + `ASN_DEBUG +("F»ešg % a SEQUENCE", +td +-> +Çme +); + +996  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +997 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +998 * +memb_±r +; + +999 if( +–m +-> +æags + & +ATF_POINTER +) { + +1000 +memb_±r + = *(**)((*) +¥Œ + + +–m +-> +memb_off£t +); + +1001 if( +memb_±r +) + +1002 + `ASN_STRUCT_FREE +(* +–m +-> +ty³ +, +memb_±r +); + +1004 +memb_±r + = (*)((*) +¥Œ + + +–m +-> +memb_off£t +); + +1005 + `ASN_STRUCT_FREE_CONTENTS_ONLY +(* +–m +-> +ty³ +, +memb_±r +); + +1010 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¥Œ + + +¥ecs +-> +ùx_off£t +); + +1011 + `FREEMEM +( +ùx +-> +±r +); + +1013  +m‘hod +) { + +1014  +ASFM_FREE_EVERYTHING +: + +1015 + `FREEMEM +( +¥Œ +); + +1017  +ASFM_FREE_UNDERLYING +: + +1019  +ASFM_FREE_UNDERLYING_AND_RESET +: + +1020 + `mem£t +( + +1021 +¥Œ +, 0, + +1022 ((cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *)( +td +-> +¥ecifics +))-> +¡ruù_size +); + +1025 + } +} + +1028 + $SEQUENCE_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +1029 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +1030 +size_t + +edx +; + +1032 if(! +¥Œ +) { + +1033 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +1035 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +1042  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +1043 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1044 cÚ¡ * +memb_±r +; + +1046 if( +–m +-> +æags + & +ATF_POINTER +) { + +1047 +memb_±r + = *(cÚ¡ * cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1048 if(! +memb_±r +) { + +1049 if( +–m +-> +ÝtiÚ® +) + +1051 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +1053 +td +-> +Çme +, +–m +->Çme, +__FILE__ +, +__LINE__ +); + +1057 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1060 if( +–m +-> +’codšg_cÚ¡¿šts +. +g’”®_cÚ¡¿šts +) { + +1061  +»t + = +–m +-> +’codšg_cÚ¡¿šts +. + `g’”®_cÚ¡¿šts +Ólm-> +ty³ +, +memb_±r +, + +1062 +ùçžcb +, +­p_key +); + +1063 if( +»t +) „et; + +1065  +–m +-> +ty³ +-> +’codšg_cÚ¡¿šts +. + `g’”®_cÚ¡¿šts +(elm->type, + +1066 +memb_±r +, +ùçžcb +, +­p_key +); + +1071 + } +} + +1073 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +1075 +a¢_dec_rv®_t + + +1076 + $SEQUENCE_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1077 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1078 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +1079 +a¢_³r_d©a_t + * +pd +) { + +1080 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SEQUENCE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +1081 * +¡ + = * +¥Œ +; + +1082  +ex»£Á +; + +1083 +ušt8_t + * +Ý»s +; + +1084 +a¢_³r_d©a_t + +Ýmd +; + +1085 +a¢_dec_rv®_t + +rv +; + +1086 +size_t + +edx +; + +1088 () +cÚ¡¿šts +; + +1090 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +1091 +ASN__DECODE_FAILED +; + +1093 if(! +¡ +) { + +1094 +¡ + = * +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +1095 if(! +¡ +è +ASN__DECODE_FAILED +; + +1098 + `ASN_DEBUG +("Decodšg % a SEQUENCE (UPER)", +td +-> +Çme +); + +1101 if( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0) { + +1102 +ex»£Á + = 0; + +1104 +ex»£Á + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +1105 if( +ex»£Á + < 0è +ASN__DECODE_STARVED +; + +1109 + `mem£t +(& +Ýmd +, 0, (opmd)); + +1110 if( +¥ecs +-> +roms_couÁ +) { + +1111 +Ý»s + = ( +ušt8_t + *) + `MALLOC +((( +¥ecs +-> +roms_couÁ + + 7) >> 3) + 1); + +1112 if(! +Ý»s +è +ASN__DECODE_FAILED +; + +1114 if( + `³r_g‘_mªy_b™s +( +pd +, +Ý»s +, 0, +¥ecs +-> +roms_couÁ +)) { + +1115 + `FREEMEM +( +Ý»s +); + +1116 +ASN__DECODE_STARVED +; + +1118 +Ýmd +. +bufãr + = +Ý»s +; + +1119 +Ýmd +. +nb™s + = +¥ecs +-> +roms_couÁ +; + +1120 + `ASN_DEBUG +("Read in…resence bitmap for %s of %d bits (%x..)", + +1121 +td +-> +Çme +, +¥ecs +-> +roms_couÁ +, * +Ý»s +); + +1123 +Ý»s + = 0; + +1129  +edx + = 0; + +1130 +edx + < ( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0 ? +td +-> +–em’ts_couÁ + + +1131 : ( +size_t +) +¥ecs +-> +fœ¡_ex‹nsiÚ +); + +1132 +edx +++) { + +1133 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1134 * +memb_±r +; + +1135 ** +memb_±r2 +; + +1137 + `as£¹ +(! + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +)); + +1140 if( +–m +-> +æags + & +ATF_POINTER +) { + +1141 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +1143 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +1144 +memb_±r2 + = & +memb_±r +; + +1148 if( +–m +-> +ÝtiÚ® +) { + +1149  +´e£Á + = + `³r_g‘_ãw_b™s +(& +Ýmd +, 1); + +1150 + `ASN_DEBUG +("Member %s->%s is optional,…=%d (%d->%d)", + +1151 +td +-> +Çme +, +–m +->Çme, +´e£Á +, + +1152 () +Ýmd +. +nboff +, ()Ýmd. +nb™s +); + +1153 if( +´e£Á + == 0) { + +1155 if( +–m +-> +deçuÉ_v®ue_£t +) { + +1157 if( +–m +-> + `deçuÉ_v®ue_£t +( +memb_±r2 +)) { + +1158 + `FREEMEM +( +Ý»s +); + +1159 +ASN__DECODE_FAILED +; + +1161 + `ASN_DEBUG +("Filled-in default"); + +1170 + `ASN_DEBUG +("Decodšg memb” \"%s\" iÀ%s", +–m +-> +Çme +, +td +->name); + +1172 if( +–m +-> +æags + & +ATF_OPEN_TYPE +) { + +1173 +rv + = + `OPEN_TYPE_u³r_g‘ +( +Ýt_codec_ùx +, +td +, +¡ +, +–m +, +pd +); + +1175 +rv + = +–m +-> +ty³ +-> +Ý +-> + `u³r_decod” +( +Ýt_codec_ùx +,ƒlm->type, + +1176 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r2 +, +pd +); + +1178 if( +rv +. +code + !ð +RC_OK +) { + +1179 + `ASN_DEBUG +("Failed decode %s in %s", + +1180 +–m +-> +Çme +, +td +->name); + +1181 + `FREEMEM +( +Ý»s +); + +1182  +rv +; + +1187 + `FREEMEM +( +Ý»s +); + +1192 if( +ex»£Á +) { + +1193 +ssize_t + +bmËngth +; + +1194 +ušt8_t + * +•»s +; + +1195 +a¢_³r_d©a_t + +•md +; + +1197 +bmËngth + = + `u³r_g‘_n¦’gth +( +pd +); + +1198 if( +bmËngth + < 0è +ASN__DECODE_STARVED +; + +1200 + `ASN_DEBUG +("Ex‹nsiÚ %" +ASN_PRI_SSIZE + "…»£Á iÀ%s", +bmËngth +, +td +-> +Çme +); + +1202 +•»s + = ( +ušt8_t + *) + `MALLOC +(( +bmËngth + + 15) >> 3); + +1203 if(! +•»s +è +ASN__DECODE_STARVED +; + +1206 if( + `³r_g‘_mªy_b™s +( +pd +, +•»s +, 0, +bmËngth +)) { + +1207 + `FREEMEM +( +•»s +); + +1208 +ASN__DECODE_STARVED +; + +1211 + `mem£t +(& +•md +, 0, (epmd)); + +1212 +•md +. +bufãr + = +•»s +; + +1213 +•md +. +nb™s + = +bmËngth +; + +1214 + `ASN_DEBUG +("Read inƒxtensions bitmap for %s of %ld bits (%x..)", + +1215 +td +-> +Çme +, () +bmËngth +, * +•»s +); + +1218  +edx + = +¥ecs +-> +fœ¡_ex‹nsiÚ +;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +1219 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1220 * +memb_±r +; + +1221 ** +memb_±r2 +; + +1222  +´e£Á +; + +1225 if( +–m +-> +æags + & +ATF_POINTER +) { + +1226 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +1228 +memb_±r + = (*)((*) +¡ + + +–m +-> +memb_off£t +); + +1229 +memb_±r2 + = & +memb_±r +; + +1232 +´e£Á + = + `³r_g‘_ãw_b™s +(& +•md +, 1); + +1233 if( +´e£Á + <= 0) { + +1234 if( +´e£Á + < 0) ; + +1238 + `ASN_DEBUG +("Decodšg memb” % š % %p", +–m +-> +Çme +, +td +->name, + +1239 * +memb_±r2 +); + +1240 +rv + = + `u³r_ݒ_ty³_g‘ +( +Ýt_codec_ùx +, +–m +-> +ty³ +, + +1241 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, + +1242 +memb_±r2 +, +pd +); + +1243 if( +rv +. +code + !ð +RC_OK +) { + +1244 + `FREEMEM +( +•»s +); + +1245  +rv +; + +1252 + `ASN_DEBUG +("Getting overflowƒxtensions"); + +1253  + `³r_g‘_ãw_b™s +(& +•md +, 1)) { + +1257 if( + `u³r_ݒ_ty³_sk +( +Ýt_codec_ùx +, +pd +)) { + +1258 + `FREEMEM +( +•»s +); + +1259 +ASN__DECODE_STARVED +; + +1261 + `ASN_DEBUG +("Skipped overflowƒxtension"); + +1267 + `FREEMEM +( +•»s +); + +1270 if( +¥ecs +-> +fœ¡_ex‹nsiÚ + >= 0) { + +1271  +i +; + +1273  +i + = +¥ecs +-> +roms_couÁ +; i < s³cs->roms_couÁ + s³cs-> +aoms_couÁ +; + +1274 +i +++) { + +1275 +a¢_TYPE_memb”_t + * +–m +; + +1276 ** +memb_±r2 +; + +1278 +edx + = +¥ecs +-> +oms +[ +i +]; + +1279 +–m + = & +td +-> +–em’ts +[ +edx +]; + +1281 if(! +–m +-> +deçuÉ_v®ue_£t +) ; + +1284 if( +–m +-> +æags + & +ATF_POINTER +) { + +1285 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +1286 if(* +memb_±r2 +) ; + +1292 if( +–m +-> + `deçuÉ_v®ue_£t +( +memb_±r2 +)) { + +1293 +ASN__DECODE_FAILED +; + +1298 +rv +. +cÚsumed + = 0; + +1299 +rv +. +code + = +RC_OK +; + +1300  +rv +; + +1301 + } +} + +1304 + $SEQUENCE__hªdË_ex‹nsiÚs +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +1305 +a¢_³r_ou_t + * +po1 +,‡¢_³r_ou_ˆ* +po2 +) { + +1306 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + = + +1307 (cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1308  +exts_´e£Á + = 0; + +1309  +exts_couÁ + = 0; + +1310 +size_t + +edx +; + +1312 if( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0) { + +1317  +edx + = +¥ecs +-> +fœ¡_ex‹nsiÚ +;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +1318 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1319 cÚ¡ * +memb_±r +; + +1320 cÚ¡ *cÚ¡ * +memb_±r2 +; + +1321  +´e£Á +; + +1324 if( +–m +-> +æags + & +ATF_POINTER +) { + +1325 +memb_±r2 + = + +1326 (cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1327 +´e£Á + = (* +memb_±r2 + != 0); + +1329 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1330 +memb_±r2 + = & +memb_±r +; + +1331 +´e£Á + = 1; + +1334 + `ASN_DEBUG +("checkšg %s:% (@%" +ASN_PRI_SIZE + "è´e£Á => %d", +–m +-> +Çme +, + +1335 +–m +-> +ty³ +-> +Çme +, +edx +, +´e£Á +); + +1336 +exts_couÁ +++; + +1337 +exts_´e£Á + +ð +´e£Á +; + +1340 if( +po1 + && + `³r_put_ãw_b™s +Õo1, +´e£Á +, 1)) { + +1344 if( +po2 + && +´e£Á + + +1345 && + `u³r_ݒ_ty³_put +( +–m +-> +ty³ +, + +1346 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, + +1347 * +memb_±r2 +, +po2 +)) + +1351  +exts_´e£Á + ? +exts_couÁ + : 0; + +1352 + } +} + +1354 +a¢_’c_rv®_t + + +1355 + $SEQUENCE_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1356 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +1357 +a¢_³r_ou_t + * +po +) { + +1358 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + + +1359 ð(cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1360 +a¢_’c_rv®_t + +” + = {0,0,0}; + +1361  +n_ex‹nsiÚs +; + +1362 +size_t + +edx +; + +1363 +size_t + +i +; + +1365 () +cÚ¡¿šts +; + +1367 if(! +¥Œ +) + +1368 +ASN__ENCODE_FAILED +; + +1370 +” +. +’coded + = 0; + +1372 + `ASN_DEBUG +("Encodšg % a SEQUENCE (UPER)", +td +-> +Çme +); + +1378 if( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0) { + +1379 +n_ex‹nsiÚs + = 0; + +1381 +n_ex‹nsiÚs + = + `SEQUENCE__hªdË_ex‹nsiÚs +( +td +, +¥Œ +, 0, 0); + +1382 if( +n_ex‹nsiÚs + < 0è +ASN__ENCODE_FAILED +; + +1383 if( + `³r_put_ãw_b™s +( +po +, +n_ex‹nsiÚs + ? 1 : 0, 1)) { + +1384 +ASN__ENCODE_FAILED +; + +1389  +i + = 0; i < +¥ecs +-> +roms_couÁ +; i++) { + +1390 +a¢_TYPE_memb”_t + * +–m +; + +1391 cÚ¡ * +memb_±r +; + +1392 cÚ¡ *cÚ¡ * +memb_±r2 +; + +1393  +´e£Á +; + +1395 +edx + = +¥ecs +-> +oms +[ +i +]; + +1396 +–m + = & +td +-> +–em’ts +[ +edx +]; + +1399 if( +–m +-> +æags + & +ATF_POINTER +) { + +1400 +memb_±r2 + = + +1401 (cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1402 +´e£Á + = (* +memb_±r2 + != 0); + +1404 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1405 +memb_±r2 + = & +memb_±r +; + +1406 +´e£Á + = 1; + +1410 if( +´e£Á + && +–m +-> +deçuÉ_v®ue_cmp + + +1411 && +–m +-> + `deçuÉ_v®ue_cmp +(* +memb_±r2 +) == 0) + +1412 +´e£Á + = 0; + +1414 + `ASN_DEBUG +("Element %s %s %s->%s is %s", + +1415 +–m +-> +æags + & +ATF_POINTER + ? "ptr" : "inline", + +1416 +–m +-> +deçuÉ_v®ue_cmp + ? "def" : "wtv", + +1417 +td +-> +Çme +, +–m +->Çme, +´e£Á + ? "present" : "absent"); + +1418 if( + `³r_put_ãw_b™s +( +po +, +´e£Á +, 1)) + +1419 +ASN__ENCODE_FAILED +; + +1425 + `ASN_DEBUG +("fœ¡_ex‹nsiÚ = %d,ƒËm’t ð%d", +¥ecs +-> +fœ¡_ex‹nsiÚ +, + +1426 +td +-> +–em’ts_couÁ +); + +1427  +edx + = 0; + +1428 +edx + < (( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0è? +td +-> +–em’ts_couÁ + + +1429 : ( +size_t +) +¥ecs +-> +fœ¡_ex‹nsiÚ +); + +1430 +edx +++) { + +1431 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1432 cÚ¡ * +memb_±r +; + +1433 cÚ¡ *cÚ¡ * +memb_±r2 +; + +1435 + `ASN_DEBUG +("Abouˆtؒcod%s", +–m +-> +ty³ +-> +Çme +); + +1438 if( +–m +-> +æags + & +ATF_POINTER +) { + +1439 +memb_±r2 + = + +1440 (cÚ¡ *cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1441 if(!* +memb_±r2 +) { + +1442 + `ASN_DEBUG +("EËm’ˆ% %" +ASN_PRI_SIZE + "‚ot…resent", + +1443 +–m +-> +Çme +, +edx +); + +1444 if( +–m +-> +ÝtiÚ® +) + +1447 +ASN__ENCODE_FAILED +; + +1450 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1451 +memb_±r2 + = & +memb_±r +; + +1455 if( +–m +-> +deçuÉ_v®ue_cmp + &&ƒlm-> + `deçuÉ_v®ue_cmp +(* +memb_±r2 +) == 0) + +1458 + `ASN_DEBUG +("Encodšg %s->%s:%s", +td +-> +Çme +, +–m +->Çme,ƒlm-> +ty³ +->name); + +1459 +” + = +–m +-> +ty³ +-> +Ý +-> + `u³r_’cod” +( + +1460 +–m +-> +ty³ +,ƒlm-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, * +memb_±r2 +, + +1461 +po +); + +1462 if( +” +. +’coded + == -1) ƒr; + +1466 if(! +n_ex‹nsiÚs +è + `ASN__ENCODED_OK +( +” +); + +1468 + `ASN_DEBUG +("L’gth oàex‹nsiÚ %d b™-m­", +n_ex‹nsiÚs +); + +1470 if( + `u³r_put_n¦’gth +( +po +, +n_ex‹nsiÚs +)) + +1471 +ASN__ENCODE_FAILED +; + +1473 + `ASN_DEBUG +("B™-m­ oà%dƒËm’ts", +n_ex‹nsiÚs +); + +1476 if( + `SEQUENCE__hªdË_ex‹nsiÚs +( +td +, +¥Œ +, +po +, 0è!ð +n_ex‹nsiÚs +) + +1477 +ASN__ENCODE_FAILED +; + +1479 + `ASN_DEBUG +("Wr™šg %dƒx‹nsiÚs", +n_ex‹nsiÚs +); + +1481 if( + `SEQUENCE__hªdË_ex‹nsiÚs +( +td +, +¥Œ +, 0, +po +è!ð +n_ex‹nsiÚs +) + +1482 +ASN__ENCODE_FAILED +; + +1484 + `ASN__ENCODED_OK +( +” +); + +1485 + } +} + +1487 +a¢_dec_rv®_t + + +1488 + $SEQUENCE_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1489 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1490 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +1491 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SEQUENCE_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +1492 * +¡ + = * +¥Œ +; + +1493  +ex»£Á +; + +1494 +ušt8_t + * +Ý»s +; + +1495 +a¢_³r_d©a_t + +Ýmd +; + +1496 +a¢_dec_rv®_t + +rv +; + +1497 +size_t + +edx +; + +1499 () +cÚ¡¿šts +; + +1501 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +1502 +ASN__DECODE_FAILED +; + +1504 if(! +¡ +) { + +1505 +¡ + = * +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +1506 if(! +¡ +è +ASN__DECODE_FAILED +; + +1509 + `ASN_DEBUG +("Decodšg % a SEQUENCE (APER)", +td +-> +Çme +); + +1512 if( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0) { + +1513 +ex»£Á + = 0; + +1515 +ex»£Á + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +1516 if( +ex»£Á + < 0è +ASN__DECODE_STARVED +; + +1520 + `mem£t +(& +Ýmd +, 0, (opmd)); + +1521 if( +¥ecs +-> +roms_couÁ +) { + +1522 +Ý»s + = ( +ušt8_t + *) + `MALLOC +((( +¥ecs +-> +roms_couÁ + + 7) >> 3) + 1); + +1523 if(! +Ý»s +è +ASN__DECODE_FAILED +; + +1525 if( + `³r_g‘_mªy_b™s +( +pd +, +Ý»s +, 0, +¥ecs +-> +roms_couÁ +)) { + +1526 + `FREEMEM +( +Ý»s +); + +1527 +ASN__DECODE_STARVED +; + +1529 +Ýmd +. +bufãr + = +Ý»s +; + +1530 +Ýmd +. +nb™s + = +¥ecs +-> +roms_couÁ +; + +1531 + `ASN_DEBUG +("Read in…resence bitmap for %s of %d bits (%x..)", + +1532 +td +-> +Çme +, +¥ecs +-> +roms_couÁ +, * +Ý»s +); + +1534 +Ý»s + = 0; + +1540  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +1541 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1542 * +memb_±r +; + +1543 ** +memb_±r2 +; + +1545  +·ddšg +; + +1548 if( + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +)) + +1552 if( +–m +-> +æags + & +ATF_POINTER +) { + +1553 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +1555 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +1556 +memb_±r2 + = & +memb_±r +; + +1560 +·ddšg + = (8 - ( +pd +-> +moved + % 8)) % 8; + +1561 if( +·ddšg + > 0) + +1562 + `ASN_DEBUG +("F܃Ëm’ˆ%s,off£tð%ld Paddšg b™ ð%d", +td +-> +Çme +, +pd +-> +moved +, +·ddšg +); + +1564 + `³r_g‘_ãw_b™s +( +pd +, +·ddšg +); + +1566 if( +edx + !ð( +td +-> +–em’ts_couÁ +-1)) + +1567 + `³r_g‘_ãw_b™s +( +pd +, +·ddšg +); + +1569 if( +¥ecs +-> +roms_couÁ + && ( +·ddšg + > 0)) + +1570 + `ASN_DEBUG +(">>>>>‚Ù skpšg…addšg oà%d b™ f܃Ëm’t:%ld ouˆoà%d", +·ddšg +, +edx +, +td +-> +–em’ts_couÁ +); + +1572 + `³r_g‘_ãw_b™s +( +pd +, +·ddšg +); + +1577 if( +–m +-> +ÝtiÚ® +) { + +1578  +´e£Á + = + `³r_g‘_ãw_b™s +(& +Ýmd +, 1); + +1579 + `ASN_DEBUG +("Member %s->%s is optional,…=%d (%d->%d)", + +1580 +td +-> +Çme +, +–m +->Çme, +´e£Á +, + +1581 () +Ýmd +. +nboff +, ()Ýmd. +nb™s +); + +1582 if( +´e£Á + == 0) { + +1584 if( +–m +-> +deçuÉ_v®ue_£t +) { + +1586 if( +–m +-> + `deçuÉ_v®ue_£t +( +memb_±r2 +)) { + +1587 + `FREEMEM +( +Ý»s +); + +1588 +ASN__DECODE_FAILED +; + +1590 + `ASN_DEBUG +("Filled-in default"); + +1599 + `ASN_DEBUG +("Decodšg memb” \"%s\" iÀ%s", +–m +-> +Çme +, +td +->name); + +1601 if( +–m +-> +æags + & +ATF_OPEN_TYPE +) { + +1602 +rv + = + `OPEN_TYPE_­”_g‘ +( +Ýt_codec_ùx +, +td +, +¡ +, +–m +, +pd +); + +1604 +rv + = +–m +-> +ty³ +-> +Ý +-> + `­”_decod” +( +Ýt_codec_ùx +,ƒlm->type, + +1605 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r2 +, +pd +); + +1607 if( +rv +. +code + !ð +RC_OK +) { + +1608 + `ASN_DEBUG +("Failed decode %s in %s", + +1609 +–m +-> +Çme +, +td +->name); + +1610 + `FREEMEM +( +Ý»s +); + +1611  +rv +; + +1616 + `FREEMEM +( +Ý»s +); + +1621 if( +ex»£Á +) { + +1622 +ssize_t + +bmËngth +; + +1623 +ušt8_t + * +•»s +; + +1624 +a¢_³r_d©a_t + +•md +; + +1626 +bmËngth + = + `­”_g‘_n¦’gth +( +pd +); + +1627 if( +bmËngth + < 0è +ASN__DECODE_STARVED +; + +1629 + `ASN_DEBUG +("Ex‹nsiÚ %" +ASN_PRI_SSIZE + "…»£Á iÀ%s", +bmËngth +, +td +-> +Çme +); + +1631 +•»s + = ( +ušt8_t + *) + `MALLOC +(( +bmËngth + + 15) >> 3); + +1632 if(! +•»s +è +ASN__DECODE_STARVED +; + +1635 if( + `³r_g‘_mªy_b™s +( +pd +, +•»s +, 0, +bmËngth +)) + +1636 +ASN__DECODE_STARVED +; + +1638 + `mem£t +(& +•md +, 0, (epmd)); + +1639 +•md +. +bufãr + = +•»s +; + +1640 +•md +. +nb™s + = +bmËngth +; + +1641 + `ASN_DEBUG +("Read inƒxtensions bitmap for %s of %ld bits (%x..)", + +1642 +td +-> +Çme +, +bmËngth +, * +•»s +); + +1645  +edx + = +¥ecs +-> +fœ¡_ex‹nsiÚ +;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +1646 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1647 * +memb_±r +; + +1648 ** +memb_±r2 +; + +1649  +´e£Á +; + +1651 if(! + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +)) { + +1652 + `ASN_DEBUG +("%ld i nكx‹nsiÚ", +edx +); + +1657 if( +–m +-> +æags + & +ATF_POINTER +) { + +1658 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +1660 +memb_±r + = (*)((*) +¡ + + +–m +-> +memb_off£t +); + +1661 +memb_±r2 + = & +memb_±r +; + +1664 +´e£Á + = + `³r_g‘_ãw_b™s +(& +•md +, 1); + +1665 if( +´e£Á + <= 0) { + +1666 if( +´e£Á + < 0) ; + +1670 + `ASN_DEBUG +("Decodšg memb” % š % %p", +–m +-> +Çme +, +td +->Çme, * +memb_±r2 +); + +1671 +rv + = + `­”_ݒ_ty³_g‘ +( +Ýt_codec_ùx +, +–m +-> +ty³ +, + +1672 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r2 +, +pd +); + +1673 if( +rv +. +code + !ð +RC_OK +) { + +1674 + `FREEMEM +( +•»s +); + +1675  +rv +; + +1682 + `ASN_DEBUG +("Getting overflowƒxtensions"); + +1683  + `³r_g‘_ãw_b™s +(& +•md +, 1)) { + +1689 if( + `­”_ݒ_ty³_sk +( +Ýt_codec_ùx +, +pd +)) { + +1690 + `FREEMEM +( +•»s +); + +1691 +ASN__DECODE_STARVED +; + +1697 + `FREEMEM +( +•»s +); + +1701  +edx + = +¥ecs +-> +roms_couÁ +;ƒdx < specs->roms_count + +1702 + +¥ecs +-> +aoms_couÁ +; +edx +++) { + +1703 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1704 ** +memb_±r2 +; + +1706 if(! +–m +-> +deçuÉ_v®ue_£t +) ; + +1709 if( +–m +-> +æags + & +ATF_POINTER +) { + +1710 +memb_±r2 + = (**)((*) +¡ + + +1711 + +–m +-> +memb_off£t +); + +1712 if(* +memb_±r2 +) ; + +1718 if( +–m +-> + `deçuÉ_v®ue_£t +( +memb_±r2 +)) { + +1719 +ASN__DECODE_FAILED +; + +1723 +rv +. +cÚsumed + = 0; + +1724 +rv +. +code + = +RC_OK +; + +1725  +rv +; + +1726 + } +} + +1729 + $SEQUENCE_hªdË_ex‹nsiÚs_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1730 cÚ¡ * +¥Œ +, + +1731 +a¢_³r_ou_t + * +po1 +,‡¢_³r_ou_ˆ* +po2 +) { + +1732 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + + +1733 ð(cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1734  +exts_´e£Á + = 0; + +1735  +exts_couÁ + = 0; + +1736 +size_t + +edx +; + +1738 if( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0) { + +1743  +edx + = +¥ecs +-> +fœ¡_ex‹nsiÚ +;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +1744 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1745 cÚ¡ * +memb_±r +; + +1746 cÚ¡ * cÚ¡ * +memb_±r2 +; + +1747  +´e£Á +; + +1749 if(! + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +)) { + +1750 + `ASN_DEBUG +("% (@%ldèi nكx‹nsiÚ", +–m +-> +ty³ +-> +Çme +, +edx +); + +1755 if( +–m +-> +æags + & +ATF_POINTER +) { + +1756 +memb_±r2 + = (cÚ¡ * cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1757 +´e£Á + = (* +memb_±r2 + != 0); + +1759 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1760 +memb_±r2 + = & +memb_±r +; + +1761 +´e£Á + = 1; + +1764 + `ASN_DEBUG +("checking %s (@%ld)…resent => %d", + +1765 +–m +-> +ty³ +-> +Çme +, +edx +, +´e£Á +); + +1766 +exts_couÁ +++; + +1767 +exts_´e£Á + +ð +´e£Á +; + +1770 if( +po1 + && + `³r_put_ãw_b™s +Õo1, +´e£Á +, 1)) + +1773 if( +po2 + && +´e£Á + && + `­”_ݒ_ty³_put +( +–m +-> +ty³ +, + +1774 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, * +memb_±r2 +, +po2 +)) + +1779  +exts_´e£Á + ? +exts_couÁ + : 0; + +1780 + } +} + +1782 +a¢_’c_rv®_t + + +1783 + $SEQUENCE_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1784 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +1785 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +1786 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + + +1787 ð(cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1788 +a¢_’c_rv®_t + +” + = {0,0,0}; + +1789  +n_ex‹nsiÚs +; + +1790 +size_t + +edx +; + +1791 +size_t + +i +; + +1793 () +cÚ¡¿šts +; + +1795 if(! +¥Œ +) + +1796 +ASN__ENCODE_FAILED +; + +1798 +” +. +’coded + = 0; + +1800 + `ASN_DEBUG +("Encodšg % a SEQUENCE (APER)", +td +-> +Çme +); + +1806 if( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0) { + +1807 +n_ex‹nsiÚs + = 0; + +1809 +n_ex‹nsiÚs + = + `SEQUENCE_hªdË_ex‹nsiÚs_­” +( +td +, +¥Œ +, 0, 0); + +1810 if( +n_ex‹nsiÚs + < 0è +ASN__ENCODE_FAILED +; + +1811 if( + `³r_put_ãw_b™s +( +po +, +n_ex‹nsiÚs + ? 1 : 0, 1)) { + +1812 +ASN__ENCODE_FAILED +; + +1817  +i + = 0; i < +¥ecs +-> +roms_couÁ +; i++) { + +1818 +a¢_TYPE_memb”_t + * +–m +; + +1819 cÚ¡ * +memb_±r +; + +1820 cÚ¡ * cÚ¡ * +memb_±r2 +; + +1821  +´e£Á +; + +1823 +edx + = +¥ecs +-> +oms +[ +i +]; + +1824 +–m + = & +td +-> +–em’ts +[ +edx +]; + +1827 if( +–m +-> +æags + & +ATF_POINTER +) { + +1828 +memb_±r2 + = (cÚ¡ * cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1829 +´e£Á + = (* +memb_±r2 + != 0); + +1831 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1832 +memb_±r2 + = & +memb_±r +; + +1833 +´e£Á + = 1; + +1837 if( +´e£Á + && +–m +-> +deçuÉ_v®ue_cmp + + +1838 && +–m +-> + `deçuÉ_v®ue_cmp +( +memb_±r2 +) == 1) + +1839 +´e£Á + = 0; + +1841 + `ASN_DEBUG +("Element %s %s %s->%s is %s", + +1842 +–m +-> +æags + & +ATF_POINTER + ? "ptr" : "inline", + +1843 +–m +-> +deçuÉ_v®ue_cmp + ? "def" : "wtv", + +1844 +td +-> +Çme +, +–m +->Çme, +´e£Á + ? "present" : "absent"); + +1845 if( + `³r_put_ãw_b™s +( +po +, +´e£Á +, 1)) + +1846 +ASN__ENCODE_FAILED +; + +1852 + `ASN_DEBUG +("fœ¡_ex‹nsiÚ = %d,ƒËm’t ð%d", +¥ecs +-> +fœ¡_ex‹nsiÚ +, + +1853 +td +-> +–em’ts_couÁ +); + +1854  +edx + = 0; + +1855 +edx + < (( +¥ecs +-> +fœ¡_ex‹nsiÚ + < 0è? +td +-> +–em’ts_couÁ + + +1856 : ( +size_t +) +¥ecs +-> +fœ¡_ex‹nsiÚ +); + +1857 +edx +++) { + +1858 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1859 cÚ¡ * +memb_±r +; + +1860 cÚ¡ * cÚ¡ * +memb_±r2 +; + +1862 if( + `IN_EXTENSION_GROUP +( +¥ecs +, +edx +)) + +1865 + `ASN_DEBUG +("Abouˆtؒcod%s", +–m +-> +ty³ +-> +Çme +); + +1868 if( +–m +-> +æags + & +ATF_POINTER +) { + +1869 +memb_±r2 + = (cÚ¡ * cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1870 if(!* +memb_±r2 +) { + +1871 + `ASN_DEBUG +("Element %s %ld‚ot…resent", + +1872 +–m +-> +Çme +, +edx +); + +1873 if( +–m +-> +ÝtiÚ® +) + +1876 +ASN__ENCODE_FAILED +; + +1879 +memb_±r + = (cÚ¡ *)((cÚ¡ *) +¥Œ + + +–m +-> +memb_off£t +); + +1880 +memb_±r2 + = & +memb_±r +; + +1884 if( +–m +-> +deçuÉ_v®ue_cmp + &&ƒlm-> + `deçuÉ_v®ue_cmp +( +memb_±r2 +) == 1) + +1887 + `ASN_DEBUG +("Encodšg %s->%s", +td +-> +Çme +, +–m +->name); + +1888 +” + = +–m +-> +ty³ +-> +Ý +-> + `­”_’cod” +Ólm->ty³,ƒlm-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, + +1889 * +memb_±r2 +, +po +); + +1890 if( +” +. +’coded + == -1) + +1891  +” +; + +1895 if(! +n_ex‹nsiÚs +è + `ASN__ENCODED_OK +( +” +); + +1897 + `ASN_DEBUG +("L’gth oà%d b™-m­", +n_ex‹nsiÚs +); + +1899 if( + `­”_put_n¦’gth +( +po +, +n_ex‹nsiÚs +)) + +1900 +ASN__ENCODE_FAILED +; + +1902 + `ASN_DEBUG +("B™-m­ oà%dƒËm’ts", +n_ex‹nsiÚs +); + +1905 if( + `SEQUENCE_hªdË_ex‹nsiÚs_­” +( +td +, +¥Œ +, +po +, 0è!ð +n_ex‹nsiÚs +) + +1906 +ASN__ENCODE_FAILED +; + +1908 + `ASN_DEBUG +("Wr™šg %dƒx‹nsiÚs", +n_ex‹nsiÚs +); + +1910 if( + `SEQUENCE_hªdË_ex‹nsiÚs_­” +( +td +, +¥Œ +, 0, +po +è!ð +n_ex‹nsiÚs +) + +1911 +ASN__ENCODE_FAILED +; + +1913 + `ASN__ENCODED_OK +( +” +); + +1914 + } +} + +1919 + $SEQUENCE_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +1920 cÚ¡ * +b±r +) { + +1921 +size_t + +edx +; + +1923  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +1924 +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +1925 cÚ¡ * +amemb +; + +1926 cÚ¡ * +bmemb +; + +1927  +»t +; + +1929 if( +–m +-> +æags + & +ATF_POINTER +) { + +1930 +amemb + = + +1931 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +­Œ + + +–m +-> +memb_off£t +); + +1932 +bmemb + = + +1933 *(cÚ¡ *cÚ¡ *)((cÚ¡ *) +b±r + + +–m +-> +memb_off£t +); + +1934 if(! +amemb +) { + +1935 if(! +bmemb +) ; + +1936 if( +–m +-> +deçuÉ_v®ue_cmp + + +1937 && +–m +-> + `deçuÉ_v®ue_cmp +( +bmemb +) == 0) { + +1942 } if(! +bmemb +) { + +1943 if( +–m +-> +deçuÉ_v®ue_cmp + + +1944 && +–m +-> + `deçuÉ_v®ue_cmp +( +amemb +) == 0) { + +1951 +amemb + = (cÚ¡ *)((cÚ¡ *) +­Œ + + +–m +-> +memb_off£t +); + +1952 +bmemb + = (cÚ¡ *)((cÚ¡ *) +b±r + + +–m +-> +memb_off£t +); + +1955 +»t + = +–m +-> +ty³ +-> +Ý +-> + `com·»_¡ruù +Ólm->ty³, +amemb +, +bmemb +); + +1956 if( +»t + != 0) „et; + +1960 + } +} + +1962 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_SEQUENCE + = { + +1963 +SEQUENCE_ä“ +, + +1964 +SEQUENCE_´št +, + +1965 +SEQUENCE_com·» +, + +1966 +SEQUENCE_decode_b” +, + +1967 +SEQUENCE_’code_d” +, + +1968 +SEQUENCE_decode_x” +, + +1969 +SEQUENCE_’code_x” +, + +1970 #ifdef +ASN_DISABLE_OER_SUPPORT + + +1974 +SEQUENCE_decode_Ûr +, + +1975 +SEQUENCE_’code_Ûr +, + +1977 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +1983 +SEQUENCE_decode_u³r +, + +1984 +SEQUENCE_’code_u³r +, + +1985 +SEQUENCE_decode_­” +, + +1986 +SEQUENCE_’code_­” +, + +1988 +SEQUENCE_¿ndom_fžl +, + +1993 +a¢_¿ndom_fžl_»suÉ_t + + +1994 + $SEQUENCE_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +1995 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡r +, + +1996 +size_t + +max_Ëngth +) { + +1997 cÚ¡ +a¢_SEQUENCE_¥ecifics_t + * +¥ecs + = + +1998 (cÚ¡ +a¢_SEQUENCE_¥ecifics_t + *) +td +-> +¥ecifics +; + +1999 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_ok + = { +ARFILL_OK +, 0}; + +2000 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +2001 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +2002 * +¡ + = * +¥Œ +; + +2003 +size_t + +edx +; + +2005 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +2007 () +cÚ¡r +; + +2009 if( +¡ + =ð +NULL +) { + +2010 +¡ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +2011 if( +¡ + =ð +NULL +) { + +2012  +»suÉ_çžed +; + +2016  +edx + = 0;ƒdx < +td +-> +–em’ts_couÁ +;ƒdx++) { + +2017 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = & +td +-> +–em’ts +[ +edx +]; + +2018 * +memb_±r +; + +2019 ** +memb_±r2 +; + +2020 +a¢_¿ndom_fžl_»suÉ_t + +tm´es +; + +2022 if( +–m +-> +ÝtiÚ® + && + `a¢_¿ndom_b‘w“n +(0, 4) == 2) { + +2027 if( +–m +-> +æags + & +ATF_POINTER +) { + +2029 +memb_±r2 + = (**)((*) +¡ + + +–m +-> +memb_off£t +); + +2031 +memb_±r + = (*) +¡ + + +–m +-> +memb_off£t +; + +2032 +memb_±r2 + = & +memb_±r +; + +2035 +tm´es + = +–m +-> +ty³ +-> +Ý +-> + `¿ndom_fžl +( + +2036 +–m +-> +ty³ +, +memb_±r2 +, &–m-> +’codšg_cÚ¡¿šts +, + +2037 +max_Ëngth + > +»suÉ_ok +. +Ëngth + ? max_length -„esult_ok.length : 0); + +2038  +tm´es +. +code +) { + +2039  +ARFILL_OK +: + +2040 +»suÉ_ok +. +Ëngth + +ð +tm´es +.length; + +2042  +ARFILL_SKIPPED +: + +2043 + `as£¹ +(!( +–m +-> +æags + & +ATF_POINTER +è|| * +memb_±r2 + =ð +NULL +); + +2045  +ARFILL_FAILED +: + +2046 if( +¡ + =ð* +¥Œ +) { + +2047 + `ASN_STRUCT_RESET +(* +td +, +¡ +); + +2049 + `ASN_STRUCT_FREE +(* +td +, +¡ +); + +2051  +tm´es +; + +2055 * +¥Œ + = +¡ +; + +2057  +»suÉ_ok +; + +2058 + } +} + + @constr_SEQUENCE_OF.c + +6  + ~ + +7  + ~ + +8  + ~ + +13 +a¢_’c_rv®_t + + +14 + $SEQUENCE_OF_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +±r +, + +15  +g_mode +, +b”_Žv_g_t + +g +, + +16 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +17 +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +18 cÚ¡ +a¢_ªÚymous_£qu’û_ + * +li¡ + = + `_A_CSEQUENCE_FROM_VOID +( +±r +); + +19 +size_t + +compu‹d_size + = 0; + +20 +ssize_t + +’codšg_size + = 0; + +21 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +22  +edx +; + +24 + `ASN_DEBUG +("E¡im©šg sizoàSEQUENCE OF %s", +td +-> +Çme +); + +29  +edx + = 0;ƒdx < +li¡ +-> +couÁ +;ƒdx++) { + +30 * +memb_±r + = +li¡ +-> +¬¿y +[ +edx +]; + +31 if(! +memb_±r +) ; + +32 +”v® + = +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, +memb_±r +, + +33 0, +–m +-> +g +, + +35 if( +”v® +. +’coded + == -1) + +36  +”v® +; + +37 +compu‹d_size + +ð +”v® +. +’coded +; + +43 +’codšg_size + = + `d”_wr™e_gs +( +td +, +compu‹d_size +, +g_mode +, 1, +g +, + +44 +cb +, +­p_key +); + +45 if( +’codšg_size + == -1) { + +46 +”v® +. +’coded + = -1; + +47 +”v® +. +çžed_ty³ + = +td +; + +48 +”v® +. +¡ruùu»_±r + = +±r +; + +49  +”v® +; + +52 +compu‹d_size + +ð +’codšg_size +; + +53 if(! +cb +) { + +54 +”v® +. +’coded + = +compu‹d_size +; + +55 + `ASN__ENCODED_OK +( +”v® +); + +58 + `ASN_DEBUG +("Encodšg memb” oàSEQUENCE OF %s", +td +-> +Çme +); + +63  +edx + = 0;ƒdx < +li¡ +-> +couÁ +;ƒdx++) { + +64 * +memb_±r + = +li¡ +-> +¬¿y +[ +edx +]; + +65 if(! +memb_±r +) ; + +66 +”v® + = +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, +memb_±r +, + +67 0, +–m +-> +g +, + +68 +cb +, +­p_key +); + +69 if( +”v® +. +’coded + == -1) + +70  +”v® +; + +71 +’codšg_size + +ð +”v® +. +’coded +; + +74 if( +compu‹d_size + !ð( +size_t +) +’codšg_size +) { + +78 +”v® +. +’coded + = -1; + +79 +”v® +. +çžed_ty³ + = +td +; + +80 +”v® +. +¡ruùu»_±r + = +±r +; + +82 +”v® +. +’coded + = +compu‹d_size +; + +83 +”v® +. +¡ruùu»_±r + = 0; + +84 +”v® +. +çžed_ty³ + = 0; + +87  +”v® +; + +88 + } +} + +90 +a¢_’c_rv®_t + + +91 + $SEQUENCE_OF_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +92  +žev– +, +x”_’cod”_æags_e + +æags +, + +93 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +94 +a¢_’c_rv®_t + +” + = {0,0,0}; + +95 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SET_OF_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +96 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +97 cÚ¡ +a¢_ªÚymous_£qu’û_ + * +li¡ + = + `_A_CSEQUENCE_FROM_VOID +( +¥Œ +); + +98 cÚ¡ * +mÇme + = +¥ecs +-> +as_XMLV®ueLi¡ + + +100 : ((* +–m +-> +Çme +è?ƒlm->Çm:ƒlm-> +ty³ +-> +xml_g +); + +101 +size_t + +mËn + = +mÇme + ? + `¡¾’ +(mname) : 0; + +102  +xÿn + = ( +æags + & +XER_F_CANONICAL +); + +103  +i +; + +105 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +107 +” +. +’coded + = 0; + +109  +i + = 0; i < +li¡ +-> +couÁ +; i++) { + +110 +a¢_’c_rv®_t + +tm³r + = {0,0,0}; + +111 * +memb_±r + = +li¡ +-> +¬¿y +[ +i +]; + +112 if(! +memb_±r +) ; + +114 if( +mÇme +) { + +115 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– +); + +116 + `ASN__CALLBACK3 +("<", 1, +mÇme +, +mËn +, ">", 1); + +119 +tm³r + = +–m +-> +ty³ +-> +Ý +-> + `x”_’cod” +Ólm->ty³, +memb_±r +, +žev– + + 1, + +120 +æags +, +cb +, +­p_key +); + +121 if( +tm³r +. +’coded + == -1) mper; + +122 +” +. +’coded + +ð +tm³r +.encoded; + +123 if( +tm³r +. +’coded + =ð0 && +¥ecs +-> +as_XMLV®ueLi¡ +) { + +124 cÚ¡ * +Çme + = +–m +-> +ty³ +-> +xml_g +; + +125 +size_t + +Ën + = + `¡¾’ +( +Çme +); + +126 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– + + 1); + +127 + `ASN__CALLBACK3 +("<", 1, +Çme +, +Ën +, "/>", 2); + +130 if( +mÇme +) { + +131 + `ASN__CALLBACK3 +("", 1); + +135 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– + - 1); + +137 + `ASN__ENCODED_OK +( +” +); + +138 +cb_çžed +: + +139 +ASN__ENCODE_FAILED +; + +140 + } +} + +142 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +144 +a¢_’c_rv®_t + + +145 + $SEQUENCE_OF_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +146 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +147 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +148 cÚ¡ +a¢_ªÚymous_£qu’û_ + * +li¡ +; + +149 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +150 +a¢_’c_rv®_t + +” + = {0,0,0}; + +151 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +152 +size_t + +’coded_edx +; + +154 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +155 +li¡ + = + `_A_CSEQUENCE_FROM_VOID +( +¥Œ +); + +157 +” +. +’coded + = 0; + +159 + `ASN_DEBUG +("Encodšg % a SEQUENCE OF (%d)", +td +-> +Çme +, +li¡ +-> +couÁ +); + +161 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +size +; + +162 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +163 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +size +; + +164 +ù + = 0; + +167 if( +ù +) { + +168  +nÙ_š_roÙ + = + +169 ( +li¡ +-> +couÁ + < +ù +-> +low”_bound + ||†i¡->couÁ > ct-> +uµ”_bound +); + +170 + `ASN_DEBUG +("lb %ld ub %ld %s", +ù +-> +low”_bound +, ct-> +uµ”_bound +, + +171 +ù +-> +æags + & +APC_EXTENSIBLE + ? "ext" : "fix"); + +172 if( +ù +-> +æags + & +APC_EXTENSIBLE +) { + +174 if( + `³r_put_ãw_b™s +( +po +, +nÙ_š_roÙ +, 1)è +ASN__ENCODE_FAILED +; + +175 if( +nÙ_š_roÙ +è +ù + = 0; + +176 } if( +nÙ_š_roÙ + && +ù +-> +efãùive_b™s + >= 0) { + +177 +ASN__ENCODE_FAILED +; + +182 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +184 if( + `³r_put_ãw_b™s +( +po +, +li¡ +-> +couÁ + - +ù +-> +low”_bound +, + +185 +ù +-> +efãùive_b™s +)) + +186 +ASN__ENCODE_FAILED +; + +187 } if( +li¡ +-> +couÁ + == 0) { + +191 ià( + `u³r_put_Ëngth +( +po +, 0, 0)) { + +192 +ASN__ENCODE_FAILED +; + +194 + `ASN__ENCODED_OK +( +” +); + +197  +’coded_edx + = 0; ( +ssize_t +ëncoded_edx < +li¡ +-> +couÁ +;) { + +198 +ssize_t + +may_’code +; + +199 +size_t + +edx +; + +200  +Ãed_eom + = 0; + +202 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +203 +may_’code + = +li¡ +-> +couÁ +; + +205 +may_’code + = + +206 + `u³r_put_Ëngth +( +po +, +li¡ +-> +couÁ + - +’coded_edx +, & +Ãed_eom +); + +207 if( +may_’code + < 0è +ASN__ENCODE_FAILED +; + +210  +edx + = +’coded_edx +;ƒdx <ƒncoded_edx + +may_’code +;ƒdx++) { + +211 * +memb_±r + = +li¡ +-> +¬¿y +[ +edx +]; + +212 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +213 +” + = +–m +-> +ty³ +-> +Ý +-> + `u³r_’cod” +( + +214 +–m +-> +ty³ +,ƒlm-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r +, + +215 +po +); + +216 if( +” +. +’coded + =ð-1è +ASN__ENCODE_FAILED +; + +219 if( +Ãed_eom + && + `u³r_put_Ëngth +( +po +, 0, 0)) + +220 +ASN__ENCODE_FAILED +; + +222 +’coded_edx + +ð +may_’code +; + +225 + `ASN__ENCODED_OK +( +” +); + +226 + } +} + +228 +a¢_’c_rv®_t + + +229 + $SEQUENCE_OF_’code_­” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +230 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +231 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +232 cÚ¡ +a¢_ªÚymous_£qu’û_ + * +li¡ +; + +233 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +234 +a¢_’c_rv®_t + +” + = {0,0,0}; + +235 +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +236  +£q +; + +238 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +239 +li¡ + = + `_A_CSEQUENCE_FROM_VOID +( +¥Œ +); + +241 +” +. +’coded + = 0; + +243 + `ASN_DEBUG +("Encodšg % a SEQUENCE OF siz(%dèusšg ALIGNED PER", +td +-> +Çme +, +li¡ +-> +couÁ +); + +245 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +size +; + +246 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +247 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +size +; + +248 +ù + = 0; + +251 if( +ù +) { + +252  +nÙ_š_roÙ + = ( +li¡ +-> +couÁ + < +ù +-> +low”_bound + + +253 || +li¡ +-> +couÁ + > +ù +-> +uµ”_bound +); + +254 + `ASN_DEBUG +("lb %ld ub %ld %s", + +255 +ù +-> +low”_bound +, ct-> +uµ”_bound +, + +256 +ù +-> +æags + & +APC_EXTENSIBLE + ? "ext" : "fix"); + +257 if( +ù +-> +æags + & +APC_EXTENSIBLE +) { + +259 if( + `³r_put_ãw_b™s +( +po +, +nÙ_š_roÙ +, 1)) + +260 +ASN__ENCODE_FAILED +; + +261 if( +nÙ_š_roÙ +è +ù + = 0; + +262 } if( +nÙ_š_roÙ + && +ù +-> +efãùive_b™s + >= 0) + +263 +ASN__ENCODE_FAILED +; + +266 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +272 ià( + `­”_put_Ëngth +( +po +, +ù +-> +uµ”_bound + - ct-> +low”_bound + + 1, +li¡ +-> +couÁ + - ct->lower_bound) < 0) + +273 +ASN__ENCODE_FAILED +; + +276  +£q + = -1; seq < +li¡ +-> +couÁ +;) { + +277 +ssize_t + +mayEncode +; + +278 if( +£q + < 0) seq = 0; + +279 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +280 +mayEncode + = +li¡ +-> +couÁ +; + +282 +mayEncode + = + `­”_put_Ëngth +( +po +, -1, +li¡ +-> +couÁ + - +£q +); + +283 if( +mayEncode + < 0è +ASN__ENCODE_FAILED +; + +286  +mayEncode +--) { + +287 * +memb_±r + = +li¡ +-> +¬¿y +[ +£q +++]; + +288 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +289 +” + = +–m +-> +ty³ +-> +Ý +-> + `­”_’cod” +(elm->type, + +290 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, +memb_±r +, +po +); + +291 if( +” +. +’coded + == -1) + +292 +ASN__ENCODE_FAILED +; + +296 + `ASN__ENCODED_OK +( +” +); + +297 + } +} + +301 + $SEQUENCE_OF_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +302 cÚ¡ * +b±r +) { + +303 cÚ¡ +a¢_ªÚymous_£qu’û_ + * +a + = + `_A_CSEQUENCE_FROM_VOID +( +­Œ +); + +304 cÚ¡ +a¢_ªÚymous_£qu’û_ + * +b + = + `_A_CSEQUENCE_FROM_VOID +( +b±r +); + +305 +ssize_t + +idx +; + +307 if( +a + && +b +) { + +308 +ssize_t + +commÚ_Ëngth + = ( +a +-> +couÁ + < +b +->count ?‡->count : b->count); + +309  +idx + = 0; idx < +commÚ_Ëngth +; idx++) { + +310  +»t + = +td +-> +–em’ts +-> +ty³ +-> +Ý +-> + `com·»_¡ruù +( + +311 +td +-> +–em’ts +-> +ty³ +, +a +-> +¬¿y +[ +idx +], +b +->array[idx]); + +312 if( +»t +) „et; + +315 if( +idx + < +b +-> +couÁ +) + +317 if( +idx + < +a +-> +couÁ +)  1; + +319 } if(! +a +) { + +321 } if(! +b +) { + +326 + } +} + +329 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_SEQUENCE_OF + = { + +330 +SEQUENCE_OF_ä“ +, + +331 +SEQUENCE_OF_´št +, + +332 +SEQUENCE_OF_com·» +, + +333 +SEQUENCE_OF_decode_b” +, + +334 +SEQUENCE_OF_’code_d” +, + +335 +SEQUENCE_OF_decode_x” +, + +336 +SEQUENCE_OF_’code_x” +, + +337 #ifdef +ASN_DISABLE_OER_SUPPORT + + +341 +SEQUENCE_OF_decode_Ûr +, + +342 +SEQUENCE_OF_’code_Ûr +, + +344 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +350 +SEQUENCE_OF_decode_u³r +, + +351 +SEQUENCE_OF_’code_u³r +, + +352 +SEQUENCE_OF_decode_­” +, + +353 +SEQUENCE_OF_’code_­” +, + +355 +SEQUENCE_OF_¿ndom_fžl +, + + @constr_SET_OF.c + +6  + ~ + +7  + ~ + +8  + ~ + +15  + #LEFT + (( +size +<( +size_t +) +ùx +-> +Ëá +)?size:(size_t)ùx->Ëá) + + ) + +28  + #SIZE_VIOLATION + ( +ùx +-> +Ëá + >ð0 && ( +size_t +)ùx->Ëá <ð +size +) + + ) + +34 #undeà +ADVANCE + + +35  + #ADVANCE +( +num_by‹s +) do { \ + +36 +size_t + +num + = +num_by‹s +; \ + +37 +±r + = ((cÚ¡ *íŒè+ +num +;\ + +38 +size + -ð +num +; \ + +39 if( +ùx +-> +Ëá + >= 0) \ + +40 +ùx +-> +Ëá + -ð +num +; \ + +41 +cÚsumed_my£lf + +ð +num +; \ + +42 } 0) + + ) + +47 #undeà +NEXT_PHASE + + +48 #undeà +PHASE_OUT + + +49  + #NEXT_PHASE +( +ùx +) do { \ + +50 +ùx +-> +pha£ +++; \ + +51 +ùx +-> +¡• + = 0; \ + +52 } 0) + + ) + +53  + #PHASE_OUT +( +ùx +èdØ{ ctx-> +pha£ + = 10; } 0) + + ) + +58 #undeà +RETURN + + +59  + #RETURN +( +_code +) do { \ + +60 +rv® +. +code + = +_code +; \ + +61 +rv® +. +cÚsumed + = +cÚsumed_my£lf +;\ + +62  +rv® +; \ + +63 } 0) + + ) + +68 +a¢_dec_rv®_t + + +69 + $SET_OF_decode_b” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +70 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¡ruù_±r +, + +71 cÚ¡ * +±r +, +size_t + +size +,  +g_mode +) { + +75 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SET_OF_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +76 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +81 * +¡ + = * +¡ruù_±r +; + +82 +a¢_¡ruù_ùx_t + * +ùx +; + +84 +b”_Žv_g_t + +Žv_g +; + +85 +a¢_dec_rv®_t + +rv® +; + +87 +ssize_t + +cÚsumed_my£lf + = 0; + +89 + `ASN_DEBUG +("Decodšg % a SET OF", +td +-> +Çme +); + +94 if( +¡ + == 0) { + +95 +¡ + = * +¡ruù_±r + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +96 if( +¡ + == 0) { + +97 + `RETURN +( +RC_FAIL +); + +104 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +109  +ùx +-> +pha£ +) { + +117 +rv® + = + `b”_check_gs +( +Ýt_codec_ùx +, +td +, +ùx +, +±r +, +size +, + +118 +g_mode +, 1, & +ùx +-> +Ëá +, 0); + +119 if( +rv® +. +code + !ð +RC_OK +) { + +120 + `ASN_DEBUG +("%sagging check failed: %d", + +121 +td +-> +Çme +, +rv® +. +code +); + +122  +rv® +; + +125 if( +ùx +-> +Ëá + >= 0) + +126 +ùx +-> +Ëá + +ð +rv® +. +cÚsumed +; + +127 + `ADVANCE +( +rv® +. +cÚsumed +); + +129 + `ASN_DEBUG +("Structure consumes %ld bytes, " + +130 "bufã¸%ld", () +ùx +-> +Ëá +, () +size +); + +132 + `NEXT_PHASE +( +ùx +); + +140 ;; +ùx +-> +¡• + = 0) { + +141 +ssize_t + +g_Ën +; + +143 if( +ùx +-> +¡• + & 1) + +144  +miüÝha£2 +; + +150 if( +ùx +-> +Ëá + == 0) { + +151 + `ASN_DEBUG +("End oàSET OF %s", +td +-> +Çme +); + +156 + `PHASE_OUT +( +ùx +); + +157 + `RETURN +( +RC_OK +); + +163 +g_Ën + = + `b”_ãtch_g +( +±r +, +LEFT +, & +Žv_g +); + +164  +g_Ën +) { + +165 0: if(! +SIZE_VIOLATION +è + `RETURN +( +RC_WMORE +); + +167 -1: + `RETURN +( +RC_FAIL +); + +170 if( +ùx +-> +Ëá + < 0 && ((cÚ¡ +ušt8_t + *) +±r +)[0] == 0) { + +171 if( +LEFT + < 2) { + +172 if( +SIZE_VIOLATION +) + +173 + `RETURN +( +RC_FAIL +); + +175 + `RETURN +( +RC_WMORE +); + +176 } if(((cÚ¡ +ušt8_t + *) +±r +)[1] == 0) { + +186 if( +–m +-> +g + !ð( +b”_Žv_g_t +)-1) { + +187 if( + `BER_TAGS_EQUAL +( +Žv_g +, +–m +-> +g +)) { + +192 + `ASN_DEBUG +("Unexpectedag %s fixed SET OF %s", + +193 + `b”_Žv_g_¡ršg +( +Žv_g +), +td +-> +Çme +); + +194 + `ASN_DEBUG +("%s SET OF hasag %s", + +195 +td +-> +Çme +, + `b”_Žv_g_¡ršg +( +–m +-> +g +)); + +196 + `RETURN +( +RC_FAIL +); + +203 +ùx +-> +¡• + |= 1; + +204 +miüÝha£2 +: + +209 +rv® + = +–m +-> +ty³ +-> +Ý +-> + `b”_decod” +( +Ýt_codec_ùx +, + +210 +–m +-> +ty³ +, & +ùx +-> +±r +,…Œ, +LEFT +, 0); + +211 + `ASN_DEBUG +("In %s SET OF %s code %d consumed %d", + +212 +td +-> +Çme +, +–m +-> +ty³ +->name, + +213 +rv® +. +code +, (ìv®. +cÚsumed +); + +214  +rv® +. +code +) { + +215  +RC_OK +: + +217 +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_SET_FROM_VOID +( +¡ +); + +218 if( + `ASN_SET_ADD +( +li¡ +, +ùx +-> +±r +) != 0) + +219 + `RETURN +( +RC_FAIL +); + +221 +ùx +-> +±r + = 0; + +224  +RC_WMORE +: + +225 if(! +SIZE_VIOLATION +) { + +226 + `ADVANCE +( +rv® +. +cÚsumed +); + +227 + `RETURN +( +RC_WMORE +); + +230  +RC_FAIL +: + +231 + `ASN_STRUCT_FREE +(* +–m +-> +ty³ +, +ùx +-> +±r +); + +232 +ùx +-> +±r + = 0; + +233 + `RETURN +( +RC_FAIL +); + +236 + `ADVANCE +( +rv® +. +cÚsumed +); + +239 + `NEXT_PHASE +( +ùx +); + +244  +ùx +-> +Ëá + < 0) { + +245 if( +LEFT + < 2) { + +246 if( +LEFT + > 0 && ((cÚ¡ *) +±r +)[0] != 0) { + +248 + `RETURN +( +RC_FAIL +); + +250 + `RETURN +( +RC_WMORE +); + +253 if(((cÚ¡ *) +±r +)[0] == 0 + +254 && ((cÚ¡ *) +±r +)[1] == 0) { + +255 + `ADVANCE +(2); + +256 +ùx +-> +Ëá +++; + +258 + `RETURN +( +RC_FAIL +); + +262 + `PHASE_OUT +( +ùx +); + +265 + `RETURN +( +RC_OK +); + +266 + } +} + +271  + s_–_bufãr + { + +272 +ušt8_t + * + mbuf +; + +273 +size_t + + mËngth +; + +274 +size_t + + m®loÿ‹d_size +; + +275  + mb™s_unu£d +; + +278  + $_–_addby‹s +(cÚ¡ * +bufãr +, +size_t + +size +, * +–_buf_±r +) { + +279  +_–_bufãr + * +–_buf + = (_–_bufã¸*) +–_buf_±r +; + +281 if( +–_buf +-> +Ëngth + + +size + >ƒl_buf-> +®loÿ‹d_size +) { + +282 +size_t + +Ãw_size + = +–_buf +-> +®loÿ‹d_size + ?ƒl_buf->allocated_size : 8; + +283 * +p +; + +286 +Ãw_size + <<= 2; + +287 }  +–_buf +-> +Ëngth + + +size + > +Ãw_size +); + +289 +p + = + `REALLOC +( +–_buf +-> +buf +, +Ãw_size +); + +290 if( +p +) { + +291 +–_buf +-> +buf + = +p +; + +292 +–_buf +-> +®loÿ‹d_size + = +Ãw_size +; + +298 + `memýy +( +–_buf +-> +buf + +ƒl_buf-> +Ëngth +, +bufãr +, +size +); + +300 +–_buf +-> +Ëngth + +ð +size +; + +302 + } +} + +304  + $as£¹_unu£d_b™s +(cÚ¡  +_–_bufãr +* +p +) { + +305 if( +p +-> +Ëngth +) { + +306 + `as£¹ +(( +p +-> +buf +[p-> +Ëngth +-1] & ~(0xfà<<…-> +b™s_unu£d +)) == 0); + +308 + `as£¹ +( +p +-> +b™s_unu£d + == 0); + +310 + } +} + +312  + $_–_buf_cmp +(cÚ¡ * +­ +, cÚ¡ * +bp +) { + +313 cÚ¡  +_–_bufãr + * +a + = (cÚ¡ _–_bufã¸*) +­ +; + +314 cÚ¡  +_–_bufãr + * +b + = (cÚ¡ _–_bufã¸*) +bp +; + +315 +size_t + +commÚ_Ën +; + +316  +»t + = 0; + +318 if( +a +-> +Ëngth + < +b +->length) + +319 +commÚ_Ën + = +a +-> +Ëngth +; + +321 +commÚ_Ën + = +b +-> +Ëngth +; + +323 ià( +a +-> +buf + && +b +->buf) { + +324 +»t + = + `memcmp +( +a +-> +buf +, +b +->buf, +commÚ_Ën +); + +326 if( +»t + == 0) { + +327 if( +a +-> +Ëngth + < +b +->length) + +328 +»t + = -1; + +329 if( +a +-> +Ëngth + > +b +->length) + +330 +»t + = 1; + +332 + `as£¹_unu£d_b™s +( +a +); + +333 + `as£¹_unu£d_b™s +( +b +); + +336  +»t +; + +337 + } +} + +340 + $SET_OF__’code_s܋d_ä“ +( +_–_bufãr + * +–_buf +, +size_t + +couÁ +) { + +341 +size_t + +i +; + +343  +i + = 0; i < +couÁ +; i++) { + +344 + `FREEMEM +( +–_buf +[ +i +]. +buf +); + +347 + `FREEMEM +( +–_buf +); + +348 + } +} + +350 + eSET_OF__’code_m‘hod + { + +351 + mSOES_DER +, + +352 + mSOES_CUPER + + +355  +_–_bufãr + * + +356 + $SET_OF__’code_s܋d +(cÚ¡ +a¢_TYPE_memb”_t + * +–m +, + +357 cÚ¡ +a¢_ªÚymous_£t_ + * +li¡ +, + +358 +SET_OF__’code_m‘hod + +m‘hod +) { + +359  +_–_bufãr + * +’coded_–s +; + +360  +edx +; + +362 +’coded_–s + = + +363 ( +_–_bufãr + *) + `CALLOC +( +li¡ +-> +couÁ +, ( +’coded_–s +[0])); + +364 if( +’coded_–s + =ð +NULL +) { + +365  +NULL +; + +371  +edx + = 0;ƒdx < +li¡ +-> +couÁ +;ƒdx++) { + +372 cÚ¡ * +memb_±r + = +li¡ +-> +¬¿y +[ +edx +]; + +373  +_–_bufãr + * +’codšg_– + = & +’coded_–s +[ +edx +]; + +374 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +376 if(! +memb_±r +) ; + +381  +m‘hod +) { + +382  +SOES_DER +: + +383 +”v® + = +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, +memb_±r +, 0,ƒlm-> +g +, + +384 +_–_addby‹s +, +’codšg_– +); + +386  +SOES_CUPER +: + +387 +”v® + = + `u³r_’code +( +–m +-> +ty³ +, + +388 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, + +389 +memb_±r +, +_–_addby‹s +, +’codšg_– +); + +390 if( +”v® +. +’coded + != -1) { + +391 +size_t + +exŒa_b™s + = +”v® +. +’coded + % 8; + +392 + `as£¹ +( +’codšg_– +-> +Ëngth + =ð( +size_t +)( +”v® +. +’coded + + 7) / 8); + +393 +’codšg_– +-> +b™s_unu£d + = (8 - +exŒa_b™s +) & 0x7; + +397 + `as£¹ +(!"Unreachable"); + +400 if( +”v® +. +’coded + < 0) ; + +403 if( +edx + =ð +li¡ +-> +couÁ +) { + +407 + `qsÜt +( +’coded_–s +, +li¡ +-> +couÁ +, Óncoded_–s[0]), +_–_buf_cmp +); + +409  +’coded_–s +; + +411 + `SET_OF__’code_s܋d_ä“ +( +’coded_–s +, +edx +); + +412  +NULL +; + +414 + } +} + +420 +a¢_’c_rv®_t + + +421 + $SET_OF_’code_d” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +422  +g_mode +, +b”_Žv_g_t + +g +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +423 * +­p_key +) { + +424 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +425 cÚ¡ +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_CSET_FROM_VOID +( +¥Œ +); + +426 +size_t + +compu‹d_size + = 0; + +427 +ssize_t + +’codšg_size + = 0; + +428  +_–_bufãr + * +’coded_–s +; + +429  +edx +; + +431 + `ASN_DEBUG +("E¡im©šg sizfÜ SET OF %s", +td +-> +Çme +); + +436  +edx + = 0;ƒdx < +li¡ +-> +couÁ +;ƒdx++) { + +437 * +memb_±r + = +li¡ +-> +¬¿y +[ +edx +]; + +438 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +440 if(! +memb_±r +è +ASN__ENCODE_FAILED +; + +442 +”v® + = + +443 +–m +-> +ty³ +-> +Ý +-> + `d”_’cod” +Ólm->ty³, +memb_±r +, 0,ƒlm-> +g +, 0, 0); + +444 if( +”v® +. +’coded + == -1) ƒrval; + +445 +compu‹d_size + +ð +”v® +. +’coded +; + +452 +’codšg_size + = + +453 + `d”_wr™e_gs +( +td +, +compu‹d_size +, +g_mode +, 1, +g +, +cb +, +­p_key +); + +454 if( +’codšg_size + < 0) { + +455 +ASN__ENCODE_FAILED +; + +457 +compu‹d_size + +ð +’codšg_size +; + +459 if(! +cb + || +li¡ +-> +couÁ + == 0) { + +460 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +461 +”v® +. +’coded + = +compu‹d_size +; + +462 + `ASN__ENCODED_OK +( +”v® +); + +465 + `ASN_DEBUG +("Encodšg memb” oà% SET OF", +td +-> +Çme +); + +472 +’coded_–s + = + `SET_OF__’code_s܋d +( +–m +, +li¡ +, +SOES_DER +); + +478  +edx + = 0;ƒdx < +li¡ +-> +couÁ +;ƒdx++) { + +479  +_–_bufãr + * +’coded_– + = & +’coded_–s +[ +edx +]; + +481 if( + `cb +( +’coded_– +-> +buf +,ƒncoded_–-> +Ëngth +, +­p_key +) < 0) { + +484 +’codšg_size + +ð +’coded_– +-> +Ëngth +; + +488 + `SET_OF__’code_s܋d_ä“ +( +’coded_–s +, +li¡ +-> +couÁ +); + +490 if( +edx + =ð +li¡ +-> +couÁ +) { + +491 +a¢_’c_rv®_t + +”v® + = {0,0,0}; + +492 + `as£¹ +( +compu‹d_size + =ð( +size_t +) +’codšg_size +); + +493 +”v® +. +’coded + = +compu‹d_size +; + +494 + `ASN__ENCODED_OK +( +”v® +); + +496 +ASN__ENCODE_FAILED +; + +498 + } +} + +500 #undeà +XER_ADVANCE + + +501  + #XER_ADVANCE +( +num_by‹s +) do { \ + +502 +size_t + +num + = +num_by‹s +; \ + +503 +buf_±r + = ((cÚ¡ *)buf_±rè+ +num +;\ + +504 +size + -ð +num +; \ + +505 +cÚsumed_my£lf + +ð +num +; \ + +506 } 0) + + ) + +511 +a¢_dec_rv®_t + + +512 + $SET_OF_decode_x” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +513 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¡ruù_±r +, + +514 cÚ¡ * +Ýt_mÇme +, cÚ¡ * +buf_±r +, +size_t + +size +) { + +518 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SET_OF_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +519 cÚ¡ +a¢_TYPE_memb”_t + * +–em’t + = +td +-> +–em’ts +; + +520 cÚ¡ * +–m_g +; + +521 cÚ¡ * +xml_g + = +Ýt_mÇme + ? o±_mÇm: +td +->xml_tag; + +526 * +¡ + = * +¡ruù_±r +; + +527 +a¢_¡ruù_ùx_t + * +ùx +; + +529 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0}; + +530 +ssize_t + +cÚsumed_my£lf + = 0; + +535 if( +¡ + == 0) { + +536 +¡ + = * +¡ruù_±r + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +537 if( +¡ + =ð0è + `RETURN +( +RC_FAIL +); + +541 if( +¥ecs +-> +as_XMLV®ueLi¡ +) { + +542 +–m_g + = ( +¥ecs +-> +as_XMLV®ueLi¡ + == 1) ? 0 : ""; + +544 +–m_g + = (* +–em’t +-> +Çme +) + +545 ? +–em’t +-> +Çme + :ƒËm’t-> +ty³ +-> +xml_g +; + +551 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +¡ + + +¥ecs +-> +ùx_off£t +); + +559 ; +ùx +-> +pha£ + <= 2;) { + +560 +px”_chunk_ty³_e + +ch_ty³ +; + +561 +ssize_t + +ch_size +; + +562 +x”_check_g_e + +tcv +; + +567 if( +ùx +-> +pha£ + == 2) { + +568 +a¢_dec_rv®_t + +tm´v® + = { +RC_OK +, 0}; + +571 + `ASN_DEBUG +("XER/SET OFƒËm’ˆ[%s]", +–m_g +); + +572 +tm´v® + = +–em’t +-> +ty³ +-> +Ý +-> + `x”_decod” +( +Ýt_codec_ùx +, + +573 +–em’t +-> +ty³ +, & +ùx +-> +±r +, +–m_g +, + +574 +buf_±r +, +size +); + +575 if( +tm´v® +. +code + =ð +RC_OK +) { + +576 +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_SET_FROM_VOID +( +¡ +); + +577 if( + `ASN_SET_ADD +( +li¡ +, +ùx +-> +±r +) != 0) + +578 + `RETURN +( +RC_FAIL +); + +579 +ùx +-> +±r + = 0; + +580 + `XER_ADVANCE +( +tm´v® +. +cÚsumed +); + +582 + `XER_ADVANCE +( +tm´v® +. +cÚsumed +); + +583 + `RETURN +( +tm´v® +. +code +); + +585 +ùx +-> +pha£ + = 1; + +586 + `ASN_DEBUG +("XER/SET OF…ha£ => %d", +ùx +-> +pha£ +); + +593 +ch_size + = + `x”_Ãxt_tok’ +(& +ùx +-> +cڋxt +, + +594 +buf_±r +, +size +, & +ch_ty³ +); + +595 if( +ch_size + == -1) { + +596 + `RETURN +( +RC_FAIL +); + +598  +ch_ty³ +) { + +599  +PXER_WMORE +: + +600 + `RETURN +( +RC_WMORE +); + +601  +PXER_COMMENT +: + +602  +PXER_TEXT +: + +603 + `XER_ADVANCE +( +ch_size +); + +605  +PXER_TAG +: + +610 +tcv + = + `x”_check_g +( +buf_±r +, +ch_size +, +xml_g +); + +611 + `ASN_DEBUG +("XER/SET OF:cv = %d,…h=%d=%s", + +612 +tcv +, +ùx +-> +pha£ +, +xml_g +); + +613  +tcv +) { + +614  +XCT_CLOSING +: + +615 if( +ùx +-> +pha£ + == 0) ; + +616 +ùx +-> +pha£ + = 0; + +618  +XCT_BOTH +: + +619 if( +ùx +-> +pha£ + == 0) { + +621 + `XER_ADVANCE +( +ch_size +); + +622 +ùx +-> +pha£ + = 3; + +623 + `RETURN +( +RC_OK +); + +626  +XCT_OPENING +: + +627 if( +ùx +-> +pha£ + == 0) { + +628 + `XER_ADVANCE +( +ch_size +); + +629 +ùx +-> +pha£ + = 1; + +633  +XCT_UNKNOWN_OP +: + +634  +XCT_UNKNOWN_BO +: + +636 + `ASN_DEBUG +("XER/SET OF:cv=%d,…h=%d", +tcv +, +ùx +-> +pha£ +); + +637 if( +ùx +-> +pha£ + == 1) { + +641 +ùx +-> +pha£ + = 2; + +649 + `ASN_DEBUG +("Unexpected XMLag in SET OF"); + +653 +ùx +-> +pha£ + = 3; + +654 + `RETURN +( +RC_FAIL +); + +655 + } +} + +659  + sx”_tmp_’c_s + { + +660 * + mbufãr +; + +661 +size_t + + moff£t +; + +662 +size_t + + msize +; + +663 } + tx”_tmp_’c_t +; + +665 + $SET_OF_’code_x”_ÿÎback +(cÚ¡ * +bufãr +, +size_t + +size +, * +key +) { + +666 +x”_tmp_’c_t + * +t + = (x”_tmp_’c_ˆ*) +key +; + +667 if( +t +-> +off£t + + +size + >=->size) { + +668 +size_t + +Ãwsize + = ( +t +-> +size + << 2) + size; + +669 * +p + = + `REALLOC +( +t +-> +bufãr +, +Ãwsize +); + +670 if(! +p +)  -1; + +671 +t +-> +bufãr + = +p +; + +672 +t +-> +size + = +Ãwsize +; + +674 + `memýy +((*) +t +-> +bufãr + +-> +off£t +, bufãr, +size +); + +675 +t +-> +off£t + +ð +size +; + +677 + } +} + +679 + $SET_OF_x”_Üd” +(cÚ¡ * +­Œ +, cÚ¡ * +b±r +) { + +680 cÚ¡ +x”_tmp_’c_t + * +a + = (cÚ¡ x”_tmp_’c_ˆ*) +­Œ +; + +681 cÚ¡ +x”_tmp_’c_t + * +b + = (cÚ¡ x”_tmp_’c_ˆ*) +b±r +; + +682 +size_t + +mšËn + = +a +-> +off£t +; + +683  +»t +; + +684 if( +b +-> +off£t + < +mšËn +) minlen = b->offset; + +686 +»t + = + `memcmp +( +a +-> +bufãr +, +b +->bufãr, +mšËn +); + +687 if( +»t + != 0) „et; + +688 if( +a +-> +off£t + =ð +b +->offset) + +690 if( +a +-> +off£t + =ð +mšËn +) + +693 + } +} + +696 +a¢_’c_rv®_t + + +697 + $SET_OF_’code_x” +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +698 +x”_’cod”_æags_e + +æags +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +699 * +­p_key +) { + +700 +a¢_’c_rv®_t + +” + = {0,0,0}; + +701 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SET_OF_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +702 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +703 cÚ¡ +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_CSET_FROM_VOID +( +¥Œ +); + +704 cÚ¡ * +mÇme + = +¥ecs +-> +as_XMLV®ueLi¡ + + +705 ? 0 : ((* +–m +-> +Çme +è?ƒlm->Çm:ƒlm-> +ty³ +-> +xml_g +); + +706 +size_t + +mËn + = +mÇme + ? + `¡¾’ +(mname) : 0; + +707  +xÿn + = ( +æags + & +XER_F_CANONICAL +); + +708 +x”_tmp_’c_t + * +’cs + = 0; + +709 +size_t + +’cs_couÁ + = 0; + +710 * +Üigš®_­p_key + = +­p_key +; + +711 +a¢_­p_cÚsume_by‹s_f + * +Üigš®_cb + = +cb +; + +712  +i +; + +714 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +716 if( +xÿn +) { + +717 +’cs + = ( +x”_tmp_’c_t + *) + `MALLOC +( +li¡ +-> +couÁ + * (encs[0])); + +718 if(! +’cs +è +ASN__ENCODE_FAILED +; + +719 +cb + = +SET_OF_’code_x”_ÿÎback +; + +722 +” +. +’coded + = 0; + +724  +i + = 0; i < +li¡ +-> +couÁ +; i++) { + +725 +a¢_’c_rv®_t + +tm³r + = {0,0,0}; + +727 * +memb_±r + = +li¡ +-> +¬¿y +[ +i +]; + +728 if(! +memb_±r +) ; + +730 if( +’cs +) { + +731 + `mem£t +(& +’cs +[ +’cs_couÁ +], 0, (encs[0])); + +732 +­p_key + = & +’cs +[ +’cs_couÁ +]; + +733 +’cs_couÁ +++; + +736 if( +mÇme +) { + +737 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– +); + +738 + `ASN__CALLBACK3 +("<", 1, +mÇme +, +mËn +, ">", 1); + +741 if(! +xÿn + && +¥ecs +-> +as_XMLV®ueLi¡ + == 1) + +742 + `ASN__TEXT_INDENT +(1, +žev– + + 1); + +743 +tm³r + = +–m +-> +ty³ +-> +Ý +-> + `x”_’cod” +Ólm->ty³, +memb_±r +, + +744 +žev– + + ( +¥ecs +-> +as_XMLV®ueLi¡ + != 2), + +745 +æags +, +cb +, +­p_key +); + +746 if( +tm³r +. +’coded + == -1) mper; + +747 +” +. +’coded + +ð +tm³r +.encoded; + +748 if( +tm³r +. +’coded + =ð0 && +¥ecs +-> +as_XMLV®ueLi¡ +) { + +749 cÚ¡ * +Çme + = +–m +-> +ty³ +-> +xml_g +; + +750 +size_t + +Ën + = + `¡¾’ +( +Çme +); + +751 + `ASN__CALLBACK3 +("<", 1, +Çme +, +Ën +, "/>", 2); + +754 if( +mÇme +) { + +755 + `ASN__CALLBACK3 +("", 1); + +760 if(! +xÿn +è + `ASN__TEXT_INDENT +(1, +žev– + - 1); + +762 if( +’cs +) { + +763 +x”_tmp_’c_t + * +’c + = +’cs +; + +764 +x”_tmp_’c_t + * +’d + = +’cs + + +’cs_couÁ +; + +765 +ssize_t + +cڌÞ_size + = 0; + +767 +” +. +’coded + = 0; + +768 +cb + = +Üigš®_cb +; + +769 +­p_key + = +Üigš®_­p_key +; + +770 + `qsÜt +( +’cs +, +’cs_couÁ +, Óncs[0]), +SET_OF_x”_Üd” +); + +772 ; +’c + < +’d +;ƒnc++) { + +773 + `ASN__CALLBACK +( +’c +-> +bufãr +,ƒnc-> +off£t +); + +774 + `FREEMEM +( +’c +-> +bufãr +); + +775 +’c +-> +bufãr + = 0; + +776 +cڌÞ_size + +ð +’c +-> +off£t +; + +778 + `as£¹ +( +cڌÞ_size + =ð +” +. +’coded +); + +781  +þ—nup +; + +782 +cb_çžed +: + +783 +ASN__ENCODE_FAILED +; + +784 +þ—nup +: + +785 if( +’cs +) { + +786 +size_t + +n +; + +787  +n + = 0;‚ < +’cs_couÁ +;‚++) { + +788 + `FREEMEM +( +’cs +[ +n +]. +bufãr +); + +790 + `FREEMEM +( +’cs +); + +792 + `ASN__ENCODED_OK +( +” +); + +793 + } +} + +796 + $SET_OF_´št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +,  +žev– +, + +797 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +798 +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +799 cÚ¡ +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_CSET_FROM_VOID +( +¥Œ +); + +800  +»t +; + +801  +i +; + +803 if(! +¥Œ +è ( + `cb +("", 8, +­p_key +) < 0) ? -1 : 0; + +806 if( + `cb +( +td +-> +Çme +, + `¡¾’ +Ñd->Çme), +­p_key +) < 0 + +807 || + `cb +(" ::ð{", 6, +­p_key +) < 0) + +810  +i + = 0; i < +li¡ +-> +couÁ +; i++) { + +811 cÚ¡ * +memb_±r + = +li¡ +-> +¬¿y +[ +i +]; + +812 if(! +memb_±r +) ; + +814 + `_i_INDENT +(1); + +816 +»t + = +–m +-> +ty³ +-> +Ý +-> + `´št_¡ruù +Ólm->ty³, +memb_±r +, + +817 +žev– + + 1, +cb +, +­p_key +); + +818 if( +»t +) „et; + +821 +žev– +--; + +822 + `_i_INDENT +(1); + +824  ( + `cb +("}", 1, +­p_key +) < 0) ? -1 : 0; + +825 + } +} + +828 + $SET_OF_ä“ +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, * +±r +, + +829 +a¢_¡ruù_ä“_m‘hod + +m‘hod +) { + +830 if( +td + && +±r +) { + +831 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs +; + +832 +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +833 +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_SET_FROM_VOID +( +±r +); + +834 +a¢_¡ruù_ùx_t + * +ùx +; + +835  +i +; + +841  +i + = 0; i < +li¡ +-> +couÁ +; i++) { + +842 * +memb_±r + = +li¡ +-> +¬¿y +[ +i +]; + +843 if( +memb_±r +) + +844 + `ASN_STRUCT_FREE +(* +–m +-> +ty³ +, +memb_±r +); + +846 +li¡ +-> +couÁ + = 0; + +848 + `a¢_£t_em±y +( +li¡ +); + +850 +¥ecs + = (cÚ¡ +a¢_SET_OF_¥ecifics_t + *) +td +-> +¥ecifics +; + +851 +ùx + = ( +a¢_¡ruù_ùx_t + *)((*) +±r + + +¥ecs +-> +ùx_off£t +); + +852 if( +ùx +-> +±r +) { + +853 + `ASN_STRUCT_FREE +(* +–m +-> +ty³ +, +ùx +-> +±r +); + +854 +ùx +-> +±r + = 0; + +857  +m‘hod +) { + +858  +ASFM_FREE_EVERYTHING +: + +859 + `FREEMEM +( +±r +); + +861  +ASFM_FREE_UNDERLYING +: + +863  +ASFM_FREE_UNDERLYING_AND_RESET +: + +864 + `mem£t +( +±r +, 0, +¥ecs +-> +¡ruù_size +); + +868 + } +} + +871 + $SET_OF_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +872 +a¢_­p_cÚ¡¿št_çžed_f + * +ùçžcb +, * +­p_key +) { + +873 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +874 +a¢_cÚ¡r_check_f + * +cÚ¡r +; + +875 cÚ¡ +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_CSET_FROM_VOID +( +¥Œ +); + +876  +i +; + +878 if(! +¥Œ +) { + +879 + `ASN__CTFAIL +( +­p_key +, +td +, +¥Œ +, + +881 +td +-> +Çme +, +__FILE__ +, +__LINE__ +); + +885 +cÚ¡r + = +–m +-> +’codšg_cÚ¡¿šts +. +g’”®_cÚ¡¿šts +; + +886 if(! +cÚ¡r +ècÚ¡¸ð +–m +-> +ty³ +-> +’codšg_cÚ¡¿šts +. +g’”®_cÚ¡¿šts +; + +892  +i + = 0; i < +li¡ +-> +couÁ +; i++) { + +893 cÚ¡ * +memb_±r + = +li¡ +-> +¬¿y +[ +i +]; + +894  +»t +; + +896 if(! +memb_±r +) ; + +898 +»t + = + `cÚ¡r +( +–m +-> +ty³ +, +memb_±r +, +ùçžcb +, +­p_key +); + +899 if( +»t +) „et; + +903 + } +} + +905 #iâdeà +ASN_DISABLE_PER_SUPPORT + + +907 +a¢_dec_rv®_t + + +908 + $SET_OF_decode_u³r +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +909 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +910 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +911 +a¢_³r_d©a_t + * +pd +) { + +912 +a¢_dec_rv®_t + +rv + = { +RC_OK +, 0}; + +913 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SET_OF_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +914 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +915 * +¡ + = * +¥Œ +; + +916 +a¢_ªÚymous_£t_ + * +li¡ +; + +917 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +918  +»³© + = 0; + +919 +ssize_t + +ÃËms +; + +921 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +922 +ASN__DECODE_FAILED +; + +927 if(! +¡ +) { + +928 +¡ + = * +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +929 if(! +¡ +è +ASN__DECODE_FAILED +; + +931 +li¡ + = + `_A_SET_FROM_VOID +( +¡ +); + +934 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +size +; + +935 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +936 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +size +; + +937 +ù + = 0; + +939 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +940  +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +941 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +942 if( +v®ue +è +ù + = 0; + +945 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +947 +ÃËms + = + `³r_g‘_ãw_b™s +( +pd +, +ù +-> +efãùive_b™s +); + +948 + `ASN_DEBUG +("Preparingo fetch %ld+%ldƒlements from %s", + +949 () +ÃËms +, +ù +-> +low”_bound +, +td +-> +Çme +); + +950 if( +ÃËms + < 0è +ASN__DECODE_STARVED +; + +951 +ÃËms + +ð +ù +-> +low”_bound +; + +953 +ÃËms + = -1; + +957  +i +; + +958 if( +ÃËms + < 0) { + +959 +ÃËms + = + `u³r_g‘_Ëngth +( +pd +, -1, 0, & +»³© +); + +960 + `ASN_DEBUG +("GفØdecod%" +ASN_PRI_SSIZE + "ƒlements (eff %d)", + +961 +ÃËms +, ()( +ù + ? ct-> +efãùive_b™s + : -1)); + +962 if( +ÃËms + < 0è +ASN__DECODE_STARVED +; + +965  +i + = 0; i < +ÃËms +; i++) { + +966 * +±r + = 0; + +967 + `ASN_DEBUG +("SET OF % decodšg", +–m +-> +ty³ +-> +Çme +); + +968 +rv + = +–m +-> +ty³ +-> +Ý +-> + `u³r_decod” +( +Ýt_codec_ùx +,ƒlm->type, + +969 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, & +±r +, +pd +); + +970 + `ASN_DEBUG +("%s SET OF %s decoded %d, %p", + +971 +td +-> +Çme +, +–m +-> +ty³ +->Çme, +rv +. +code +, +±r +); + +972 if( +rv +. +code + =ð +RC_OK +) { + +973 if( + `ASN_SET_ADD +( +li¡ +, +±r +) == 0) { + +974 if( +rv +. +cÚsumed + =ð0 && +ÃËms + > 200) { + +976 +ASN__DECODE_FAILED +; + +980 + `ASN_DEBUG +("Failedo‡ddƒlement into %s", + +981 +td +-> +Çme +); + +983 +rv +. +code + = +RC_FAIL +; + +985 + `ASN_DEBUG +("Failed decoding %s of %s (SET OF)", + +986 +–m +-> +ty³ +-> +Çme +, +td +->name); + +988 if( +±r +è + `ASN_STRUCT_FREE +(* +–m +-> +ty³ +,…tr); + +989  +rv +; + +992 +ÃËms + = -1; + +993 }  +»³© +); + +995 + `ASN_DEBUG +("Decoded % a SET OF", +td +-> +Çme +); + +997 +rv +. +code + = +RC_OK +; + +998 +rv +. +cÚsumed + = 0; + +999  +rv +; + +1000 + } +} + +1002 +a¢_’c_rv®_t + + +1003 + $SET_OF_’code_u³r +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1004 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +1005 +a¢_³r_ou_t + * +po +) { + +1006 cÚ¡ +a¢_ªÚymous_£t_ + * +li¡ +; + +1007 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +1008 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +1009  +_–_bufãr + * +’coded_–s +; + +1010 +a¢_’c_rv®_t + +” + = {0,0,0}; + +1011 +size_t + +’coded_edx +; + +1013 if(! +¥Œ +è +ASN__ENCODE_FAILED +; + +1015 +li¡ + = + `_A_CSET_FROM_VOID +( +¥Œ +); + +1017 +” +. +’coded + = 0; + +1019 + `ASN_DEBUG +("Encodšg % a SEQUENCE OF (%d)", +td +-> +Çme +, +li¡ +-> +couÁ +); + +1021 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +size +; + +1022 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +1023 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +size +; + +1024 +ù + = 0; + +1027 if( +ù +) { + +1028  +nÙ_š_roÙ + = + +1029 ( +li¡ +-> +couÁ + < +ù +-> +low”_bound + ||†i¡->couÁ > ct-> +uµ”_bound +); + +1030 + `ASN_DEBUG +("lb %ld ub %ld %s", +ù +-> +low”_bound +, ct-> +uµ”_bound +, + +1031 +ù +-> +æags + & +APC_EXTENSIBLE + ? "ext" : "fix"); + +1032 if( +ù +-> +æags + & +APC_EXTENSIBLE +) { + +1034 if( + `³r_put_ãw_b™s +( +po +, +nÙ_š_roÙ +, 1)è +ASN__ENCODE_FAILED +; + +1035 if( +nÙ_š_roÙ +è +ù + = 0; + +1036 } if( +nÙ_š_roÙ + && +ù +-> +efãùive_b™s + >= 0) { + +1037 +ASN__ENCODE_FAILED +; + +1042 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +1044 if( + `³r_put_ãw_b™s +( +po +, +li¡ +-> +couÁ + - +ù +-> +low”_bound +, + +1045 +ù +-> +efãùive_b™s +)) + +1046 +ASN__ENCODE_FAILED +; + +1047 } if( +li¡ +-> +couÁ + == 0) { + +1051 ià( + `u³r_put_Ëngth +( +po +, 0, 0)) { + +1052 +ASN__ENCODE_FAILED +; + +1054 + `ASN__ENCODED_OK +( +” +); + +1062 +’coded_–s + = + `SET_OF__’code_s܋d +( +–m +, +li¡ +, +SOES_CUPER +); + +1064  +’coded_edx + = 0; ( +ssize_t +ëncoded_edx < +li¡ +-> +couÁ +;) { + +1065 +ssize_t + +may_’code +; + +1066 +size_t + +edx +; + +1067  +Ãed_eom + = 0; + +1069 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +1070 +may_’code + = +li¡ +-> +couÁ +; + +1072 +may_’code + = + +1073 + `u³r_put_Ëngth +( +po +, +li¡ +-> +couÁ + - +’coded_edx +, & +Ãed_eom +); + +1074 if( +may_’code + < 0è +ASN__ENCODE_FAILED +; + +1077  +edx + = +’coded_edx +;ƒdx <ƒncoded_edx + +may_’code +;ƒdx++) { + +1078 cÚ¡  +_–_bufãr + * +– + = & +’coded_–s +[ +edx +]; + +1079 if( + `a¢_put_mªy_b™s +( +po +, +– +-> +buf +, + +1080 (8 * +– +-> +Ëngth +è-ƒl-> +b™s_unu£d +) < 0) { + +1085 if( +Ãed_eom + && + `u³r_put_Ëngth +( +po +, 0, 0)) + +1086 +ASN__ENCODE_FAILED +; + +1088 +’coded_edx + +ð +may_’code +; + +1091 + `SET_OF__’code_s܋d_ä“ +( +’coded_–s +, +li¡ +-> +couÁ +); + +1093 if(( +ssize_t +) +’coded_edx + =ð +li¡ +-> +couÁ +) { + +1094 + `ASN__ENCODED_OK +( +” +); + +1096 +ASN__ENCODE_FAILED +; + +1098 + } +} + +1100 +a¢_dec_rv®_t + + +1101 + $SET_OF_decode_­” +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +1102 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +1103 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +1104 +a¢_dec_rv®_t + +rv + = { +RC_OK +, 0}; + +1105 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs + = (cÚ¡‡¢_SET_OF_¥ecifics_ˆ*) +td +-> +¥ecifics +; + +1106 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +1107 * +¡ + = * +¥Œ +; + +1108 +a¢_ªÚymous_£t_ + * +li¡ +; + +1109 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +ù +; + +1110  +»³© + = 0; + +1111 +ssize_t + +ÃËms +; + +1113 if( + `ASN__STACK_OVERFLOW_CHECK +( +Ýt_codec_ùx +)) + +1114 +ASN__DECODE_FAILED +; + +1119 if(! +¡ +) { + +1120 +¡ + = * +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +); + +1121 if(! +¡ +è +ASN__DECODE_FAILED +; + +1123 +li¡ + = + `_A_SET_FROM_VOID +( +¡ +); + +1126 if( +cÚ¡¿šts +è +ù + = &cÚ¡¿šts-> +size +; + +1127 if( +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +) + +1128 +ù + = & +td +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +-> +size +; + +1129 +ù + = 0; + +1131 if( +ù + && ct-> +æags + & +APC_EXTENSIBLE +) { + +1132  +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 1); + +1133 if( +v®ue + < 0è +ASN__DECODE_STARVED +; + +1134 if( +v®ue +è +ù + = 0; + +1137 if( +ù + && ct-> +efãùive_b™s + >= 0) { + +1139 +ÃËms + = + `­”_g‘_n¢nwn +( +pd +, +ù +-> +uµ”_bound + - ct-> +low”_bound + + 1); + +1140 + `ASN_DEBUG +("Preparingo fetch %ld+%ldƒlements from %s", + +1141 () +ÃËms +, +ù +-> +low”_bound +, +td +-> +Çme +); + +1142 if( +ÃËms + < 0è +ASN__DECODE_STARVED +; + +1143 +ÃËms + +ð +ù +-> +low”_bound +; + +1145 +ÃËms + = -1; + +1149  +i +; + +1150 if( +ÃËms + < 0) { + +1151 +ÃËms + = + `­”_g‘_Ëngth +( +pd +, +ù + ? ct-> +uµ”_bound + - ct-> +low”_bound + + 1 : -1, + +1152 +ù + ? ct-> +efãùive_b™s + : -1, & +»³© +); + +1153 + `ASN_DEBUG +("Goto decode %dƒlements (eff %d)", + +1154 () +ÃËms +, ()( +ù + ? ct-> +efãùive_b™s + : -1)); + +1155 if( +ÃËms + < 0è +ASN__DECODE_STARVED +; + +1158  +i + = 0; i < +ÃËms +; i++) { + +1159 * +±r + = 0; + +1160 + `ASN_DEBUG +("SET OF % decodšg", +–m +-> +ty³ +-> +Çme +); + +1161 +rv + = +–m +-> +ty³ +-> +Ý +-> + `­”_decod” +( +Ýt_codec_ùx +,ƒlm->type, + +1162 +–m +-> +’codšg_cÚ¡¿šts +. +³r_cÚ¡¿šts +, & +±r +, +pd +); + +1163 + `ASN_DEBUG +("%s SET OF %s decoded %d, %p", + +1164 +td +-> +Çme +, +–m +-> +ty³ +->Çme, +rv +. +code +, +±r +); + +1165 if( +rv +. +code + =ð +RC_OK +) { + +1166 if( + `ASN_SET_ADD +( +li¡ +, +±r +) == 0) + +1168 + `ASN_DEBUG +("Failedo‡ddƒlement into %s", + +1169 +td +-> +Çme +); + +1171 +rv +. +code + = +RC_FAIL +; + +1173 + `ASN_DEBUG +("Failed decoding %s of %s (SET OF)", + +1174 +–m +-> +ty³ +-> +Çme +, +td +->name); + +1176 if( +±r +è + `ASN_STRUCT_FREE +(* +–m +-> +ty³ +,…tr); + +1177  +rv +; + +1180 +ÃËms + = -1; + +1181 }  +»³© +); + +1183 + `ASN_DEBUG +("Decoded % a SET OF", +td +-> +Çme +); + +1185 +rv +. +code + = +RC_OK +; + +1186 +rv +. +cÚsumed + = 0; + +1187  +rv +; + +1188 + } +} + +1192  + scom·¿bË_±r + { + +1193 cÚ¡ +a¢_TYPE_desütÜ_t + * + mtd +; + +1194 cÚ¡ * + m¥Œ +; + +1198 + $SET_OF__com·»_cb +(cÚ¡ * +­Œ +, cÚ¡ * +b±r +) { + +1199 cÚ¡  +com·¿bË_±r + * +a + = +­Œ +; + +1200 cÚ¡  +com·¿bË_±r + * +b + = +b±r +; + +1201 + `as£¹ +( +a +-> +td + =ð +b +->td); + +1202  +a +-> +td +-> +Ý +-> + `com·»_¡ruù +×->td,‡-> +¥Œ +, +b +->sptr); + +1203 + } +} + +1206 + $SET_OF_com·» +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +­Œ +, + +1207 cÚ¡ * +b±r +) { + +1208 cÚ¡ +a¢_ªÚymous_£t_ + * +a + = + `_A_CSET_FROM_VOID +( +­Œ +); + +1209 cÚ¡ +a¢_ªÚymous_£t_ + * +b + = + `_A_CSET_FROM_VOID +( +b±r +); + +1211 if( +a + && +b +) { + +1212  +com·¿bË_±r + * +as܋d +; + +1213  +com·¿bË_±r + * +bs܋d +; + +1214 +ssize_t + +commÚ_Ëngth +; + +1215 +ssize_t + +idx +; + +1217 if( +a +-> +couÁ + == 0) { + +1218 if( +b +-> +couÁ +)  -1; + +1220 } if( +b +-> +couÁ + == 0) { + +1224 +as܋d + = + `MALLOC +( +a +-> +couÁ + * (asorted[0])); + +1225 +bs܋d + = + `MALLOC +( +b +-> +couÁ + * (bsorted[0])); + +1226 if(! +as܋d + || ! +bs܋d +) { + +1227 + `FREEMEM +( +as܋d +); + +1228 + `FREEMEM +( +bs܋d +); + +1232  +idx + = 0; idx < +a +-> +couÁ +; idx++) { + +1233 +as܋d +[ +idx +]. +td + =d-> +–em’ts +-> +ty³ +; + +1234 +as܋d +[ +idx +]. +¥Œ + = +a +-> +¬¿y +[idx]; + +1237  +idx + = 0; idx < +b +-> +couÁ +; idx++) { + +1238 +bs܋d +[ +idx +]. +td + =d-> +–em’ts +-> +ty³ +; + +1239 +bs܋d +[ +idx +]. +¥Œ + = +b +-> +¬¿y +[idx]; + +1242 + `qsÜt +( +as܋d +, +a +-> +couÁ +, ×s܋d[0]), +SET_OF__com·»_cb +); + +1243 + `qsÜt +( +bs܋d +, +b +-> +couÁ +, (bs܋d[0]), +SET_OF__com·»_cb +); + +1245 +commÚ_Ëngth + = ( +a +-> +couÁ + < +b +->count ?‡->count : b->count); + +1246  +idx + = 0; idx < +commÚ_Ëngth +; idx++) { + +1247  +»t + = +td +-> +–em’ts +-> +ty³ +-> +Ý +-> + `com·»_¡ruù +( + +1248 +td +-> +–em’ts +-> +ty³ +, +as܋d +[ +idx +]. +¥Œ +, +bs܋d +[idx].sptr); + +1249 if( +»t +) { + +1250 + `FREEMEM +( +as܋d +); + +1251 + `FREEMEM +( +bs܋d +); + +1252  +»t +; + +1256 + `FREEMEM +( +as܋d +); + +1257 + `FREEMEM +( +bs܋d +); + +1259 if( +idx + < +b +-> +couÁ +) + +1261 if( +idx + < +a +-> +couÁ +)  1; + +1262 } if(! +a +) { + +1264 } if(! +b +) { + +1269 + } +} + +1272 +a¢_TYPE_ݔ©iÚ_t + + ga¢_OP_SET_OF + = { + +1273 +SET_OF_ä“ +, + +1274 +SET_OF_´št +, + +1275 +SET_OF_com·» +, + +1276 +SET_OF_decode_b” +, + +1277 +SET_OF_’code_d” +, + +1278 +SET_OF_decode_x” +, + +1279 +SET_OF_’code_x” +, + +1280 #ifdeà +ASN_DISABLE_OER_SUPPORT + + +1284 +SET_OF_decode_Ûr +, + +1285 +SET_OF_’code_Ûr +, + +1287 #ifdeà +ASN_DISABLE_PER_SUPPORT + + +1293 +SET_OF_decode_u³r +, + +1294 +SET_OF_’code_u³r +, + +1295 +SET_OF_decode_­” +, + +1298 +SET_OF_¿ndom_fžl +, + +1303 +a¢_¿ndom_fžl_»suÉ_t + + +1304 + $SET_OF_¿ndom_fžl +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +1305 cÚ¡ +a¢_’codšg_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +1306 +size_t + +max_Ëngth +) { + +1307 cÚ¡ +a¢_SET_OF_¥ecifics_t + * +¥ecs + = + +1308 (cÚ¡ +a¢_SET_OF_¥ecifics_t + *) +td +-> +¥ecifics +; + +1309 +a¢_¿ndom_fžl_»suÉ_t + +»s_ok + = { +ARFILL_OK +, 0}; + +1310 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_çžed + = { +ARFILL_FAILED +, 0}; + +1311 +a¢_¿ndom_fžl_»suÉ_t + +»suÉ_sk³d + = { +ARFILL_SKIPPED +, 0}; + +1312 cÚ¡ +a¢_TYPE_memb”_t + * +–m + = +td +-> +–em’ts +; + +1313 * +¡ + = * +¥Œ +; + +1314  +max_–em’ts + = 5; + +1315  +¦b + = 0; + +1316  +sub + = 0; + +1317 +size_t + +ºd_Ën +; + +1319 if( +max_Ëngth + =ð0è +»suÉ_sk³d +; + +1321 if( +¡ + =ð +NULL +) { + +1322 +¡ + = (* +¥Œ + = + `CALLOC +(1, +¥ecs +-> +¡ruù_size +)); + +1323 if( +¡ + =ð +NULL +) { + +1324  +»suÉ_çžed +; + +1328  + `a¢_¿ndom_b‘w“n +(0, 6)) { + +1329 0: +max_–em’ts + = 0; ; + +1330 1: +max_–em’ts + = 1; ; + +1331 2: +max_–em’ts + = 5; ; + +1332 3: +max_–em’ts + = +max_Ëngth +; ; + +1333 4: +max_–em’ts + = +max_Ëngth + / 2; ; + +1334 5: +max_–em’ts + = +max_Ëngth + / 4; ; + +1337 +sub + = +¦b + + +max_–em’ts +; + +1339 if(! +cÚ¡¿šts + || !cÚ¡¿šts-> +³r_cÚ¡¿šts +) + +1340 +cÚ¡¿šts + = & +td +-> +’codšg_cÚ¡¿šts +; + +1341 if( +cÚ¡¿šts +-> +³r_cÚ¡¿šts +) { + +1342 cÚ¡ +a¢_³r_cÚ¡¿št_t + * +pc + = & +cÚ¡¿šts +-> +³r_cÚ¡¿šts +-> +size +; + +1343 if( +pc +-> +æags + & +APC_SEMI_CONSTRAINED +) { + +1344 +¦b + = +pc +-> +low”_bound +; + +1345 +sub + = +pc +-> +low”_bound + + +max_–em’ts +; + +1346 } if( +pc +-> +æags + & +APC_CONSTRAINED +) { + +1347 +¦b + = +pc +-> +low”_bound +; + +1348 +sub + = +pc +-> +uµ”_bound +; + +1349 if( +sub + - +¦b + > +max_–em’ts +) sub = slb + max_elements; + +1354  + `a¢_¿ndom_b‘w“n +(-1, 4)) { + +1358 if( +cÚ¡¿šts +-> +³r_cÚ¡¿šts + + +1359 && ( +cÚ¡¿šts +-> +³r_cÚ¡¿šts +-> +size +. +æags + & +APC_EXTENSIBLE +)) { + +1360  + `a¢_¿ndom_b‘w“n +(0, 5)) { + +1363 +ºd_Ën + = 0; + +1366 if( +¦b + > 0) { + +1367 +ºd_Ën + = +¦b + - 1; + +1369 +ºd_Ën + = 0; + +1373 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +(0, +¦b +); + +1376 if( +sub + < ( +ssize_t +) +max_Ëngth +) { + +1377 +ºd_Ën + = +sub + + 1; + +1379 +ºd_Ën + = +max_Ëngth +; + +1383 if( +sub + < ( +ssize_t +) +max_Ëngth +) { + +1384 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +( +sub + + 1, +max_Ëngth +); + +1386 +ºd_Ën + = +max_Ëngth +; + +1390 +ºd_Ën + = +max_Ëngth +; + +1397 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +( +¦b +, +sub +); + +1400 if( +¦b + < +sub +) { + +1401 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +( +¦b + + 1, +sub +); + +1406 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +( +¦b +, slb); + +1409 if( +¦b + < +sub +) { + +1410 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +( +¦b +, +sub + - 1); + +1415 +ºd_Ën + = + `a¢_¿ndom_b‘w“n +( +sub +, sub); + +1419 ; +ºd_Ën + > 0;„nd_len--) { + +1420 +a¢_ªÚymous_£t_ + * +li¡ + = + `_A_SET_FROM_VOID +( +¡ +); + +1421 * +±r + = 0; + +1422 +a¢_¿ndom_fžl_»suÉ_t + +tm´es + = +–m +-> +ty³ +-> +Ý +-> + `¿ndom_fžl +( + +1423 +–m +-> +ty³ +, & +±r +, &–m-> +’codšg_cÚ¡¿šts +, + +1424 ( +max_Ëngth + > +»s_ok +. +Ëngth + ? max_length -„es_ok.length : 0) + +1425 / +ºd_Ën +); + +1426  +tm´es +. +code +) { + +1427  +ARFILL_OK +: + +1428 + `ASN_SET_ADD +( +li¡ +, +±r +); + +1429 +»s_ok +. +Ëngth + +ð +tm´es +.length; + +1431  +ARFILL_SKIPPED +: + +1433  +ARFILL_FAILED +: + +1434 + `as£¹ +( +±r + == 0); + +1435  +tm´es +; + +1439  +»s_ok +; + +1440 + } +} + + @constr_TYPE.c + +5  + ~ + +6  + ~ + +7  + ~<”ºo.h +> + +12  + $g‘_a¢1c_’vœÚm’t_v”siÚ +(è{  +ASN1C_ENVIRONMENT_VERSION +; + } +} + +14  +a¢_­p_cÚsume_by‹s_f + + g_´št2å +; + +19 +b”_Žv_g_t + + +20 + $a¢_TYPE_outmo¡_g +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, + +21 cÚ¡ * +¡ruù_±r +,  +g_mode +, +b”_Žv_g_t + +g +) { + +23 if( +g_mode +) + +24  +g +; + +26 if( +ty³_desütÜ +-> +gs_couÁ +) + +27  +ty³_desütÜ +-> +gs +[0]; + +29  +ty³_desütÜ +-> +Ý +-> + `outmo¡_g +Ñy³_desütÜ, +¡ruù_±r +, 0, 0); + +30 + } +} + +36 + $a¢_åršt +( +FILE + * +¡»am +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +37 cÚ¡ * +¡ruù_±r +) { + +38 if(! +¡»am +è¡»am = +¡dout +; + +39 if(! +td + || ! +¡ruù_±r +) { + +40 +”ºo + = +EINVAL +; + +45 if( +td +-> +Ý +-> + `´št_¡ruù +Ñd, +¡ruù_±r +, 1, +_´št2å +, +¡»am +)) { + +50 if( + `_´št2å +("\n", 1, +¡»am +)) { + +54  + `fæush +( +¡»am +); + +55 + } +} + +59 + $_´št2å +(cÚ¡ * +bufãr +, +size_t + +size +, * +­p_key +) { + +60 +FILE + * +¡»am + = (FILE *) +­p_key +; + +62 if( + `fwr™e +( +bufãr +, 1, +size +, +¡»am +) != size) + +66 + } +} + +73  +ASN_DEBUG_f +(cÚ¡ * +fmt +, ...); + +74  + $ASN_DEBUG_f +(cÚ¡ * +fmt +, ...) { + +75 +va_li¡ + +­ +; + +76 + `va_¡¬t +( +­ +, +fmt +); + +77 + `vårštf +( +¡d”r +, +fmt +, +­ +); + +78 + `årštf +( +¡d”r +, "\n"); + +79 + `va_’d +( +­ +); + +80 + } +} + + @constraints.c + +1  + ~ + +2  + ~ + +5 + $a¢_g’”ic_no_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, + +6 cÚ¡ * +¡ruù_±r +, + +7 +a¢_­p_cÚ¡¿št_çžed_f + * +cb +, * +key +) { + +8 () +ty³_desütÜ +; + +9 () +¡ruù_±r +; + +10 () +cb +; + +11 () +key +; + +15 + } +} + +18 + $a¢_g’”ic_unknown_cÚ¡¿št +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, + +19 cÚ¡ * +¡ruù_±r +, + +20 +a¢_­p_cÚ¡¿št_çžed_f + * +cb +, * +key +) { + +21 () +ty³_desütÜ +; + +22 () +¡ruù_±r +; + +23 () +cb +; + +24 () +key +; + +28 + } +} + +30  + s”rbufDesc + { + +31 cÚ¡ +a¢_TYPE_desütÜ_t + * + mçžed_ty³ +; + +32 cÚ¡ * + mçžed_¡ruù_±r +; + +33 * + m”rbuf +; + +34 +size_t + + m”¾’ +; + +38 + $_a¢_i_ùçžcb +(* +key +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +39 cÚ¡ * +fmt +, ...) { + +40  +”rbufDesc + * +¬g + = +key +; + +41 +va_li¡ + +­ +; + +42 +ssize_t + +vËn +; + +43 +ssize_t + +maxËn +; + +45 +¬g +-> +çžed_ty³ + = +td +; + +46 +¬g +-> +çžed_¡ruù_±r + = +¥Œ +; + +48 +maxËn + = +¬g +-> +”¾’ +; + +49 if( +maxËn + <= 0) + +52 + `va_¡¬t +( +­ +, +fmt +); + +53 +vËn + = + `v¢´štf +( +¬g +-> +”rbuf +, +maxËn +, +fmt +, +­ +); + +54 + `va_’d +( +­ +); + +55 if( +vËn + >ð +maxËn +) { + +56 +¬g +-> +”rbuf +[ +maxËn +-1] = '\0'; + +57 +¬g +-> +”¾’ + = +maxËn + - 1; + +59 } if( +vËn + >= 0) { + +60 +¬g +-> +”rbuf +[ +vËn +] = '\0'; + +61 +¬g +-> +”¾’ + = +vËn +; + +66 +vËn + = ("") - 1; + +67 +maxËn +--; + +68 +¬g +-> +”¾’ + = +vËn + < +maxËn + ? vlen : maxlen; + +69 + `memýy +( +¬g +-> +”rbuf +, "",‡rg-> +”¾’ +); + +70 +¬g +-> +”rbuf +[¬g-> +”¾’ +] = 0; + +74 + } +} + +77 + $a¢_check_cÚ¡¿šts +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, + +78 cÚ¡ * +¡ruù_±r +, * +”rbuf +, +size_t + * +”¾’ +) { + +79  +”rbufDesc + +¬g +; + +80  +»t +; + +82 +¬g +. +çžed_ty³ + = 0; + +83 +¬g +. +çžed_¡ruù_±r + = 0; + +84 +¬g +. +”rbuf + =ƒrrbuf; + +85 +¬g +. +”¾’ + =ƒrrlen ? *errlen : 0; + +87 +»t + = +ty³_desütÜ +-> +’codšg_cÚ¡¿šts +. + `g’”®_cÚ¡¿šts +( + +88 +ty³_desütÜ +, +¡ruù_±r +, +_a¢_i_ùçžcb +, & +¬g +); + +89 if( +»t + =ð-1 && +”¾’ +è*”¾’ = +¬g +.errlen; + +91  +»t +; + +92 + } +} + + @der_encoder.c + +5  + ~ + +6  + ~<”ºo.h +> + +8  +ssize_t + +d”_wr™e_TL +( +b”_Žv_g_t + +g +, +b”_Žv_Ën_t + +Ën +, + +9 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +,  +cÚ¡ruùed +); + +14 +a¢_’c_rv®_t + + +15 + $d”_’code +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, cÚ¡ * +¡ruù_±r +, + +16 +a¢_­p_cÚsume_by‹s_f + * +cÚsume_by‹s +, * +­p_key +) { + +17 + `ASN_DEBUG +("DERƒncoder invoked for %s", + +18 +ty³_desütÜ +-> +Çme +); + +23  +ty³_desütÜ +-> +Ý +-> + `d”_’cod” +( + +24 +ty³_desütÜ +, +¡ruù_±r +, + +25 0, 0, +cÚsume_by‹s +, +­p_key +); + +26 + } +} + +31  + s’c_to_buf_¬g + { + +32 * + mbufãr +; + +33 +size_t + + mËá +; + +34 } + t’c_to_buf_¬g +; + +35  + $’code_to_bufãr_cb +(cÚ¡ * +bufãr +, +size_t + +size +, * +key +) { + +36 +’c_to_buf_¬g + * +¬g + = (’c_to_buf_¬g *) +key +; + +38 if( +¬g +-> +Ëá + < +size +) + +41 + `memýy +( +¬g +-> +bufãr +, bufãr, +size +); + +42 +¬g +-> +bufãr + = ((*ïrg->bufãrè+ +size +; + +43 +¬g +-> +Ëá + -ð +size +; + +46 + } +} + +51 +a¢_’c_rv®_t + + +52 + $d”_’code_to_bufãr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, + +53 cÚ¡ * +¡ruù_±r +, * +bufãr +, +size_t + +bufãr_size +) { + +54 +’c_to_buf_¬g + +¬g +; + +55 +a¢_’c_rv®_t + +ec +; + +57 +¬g +. +bufãr + = buffer; + +58 +¬g +. +Ëá + = +bufãr_size +; + +60 +ec + = +ty³_desütÜ +-> +Ý +-> + `d”_’cod” +(type_descriptor, + +61 +¡ruù_±r +, + +62 0, 0, +’code_to_bufãr_cb +, & +¬g +); + +63 if( +ec +. +’coded + != -1) { + +64 + `as£¹ +( +ec +. +’coded + =ð( +ssize_t +)( +bufãr_size + - +¬g +. +Ëá +)); + +67  +ec +; + +68 + } +} + +74 +ssize_t + + +75 + $d”_wr™e_gs +(cÚ¡ +a¢_TYPE_desütÜ_t + * +sd +, +size_t + +¡ruù_Ëngth +, + +76  +g_mode +,  +Ï¡_g_fÜm +, + +77 +b”_Žv_g_t + +g +, + +78 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +79  + #ASN1_DER_MAX_TAGS_COUNT + 4 + + ) + +80 +b”_Žv_g_t + + +81 +gs_buf_sü©ch +[ +ASN1_DER_MAX_TAGS_COUNT + * ( +b”_Žv_g_t +)]; + +82 +ssize_t + +Ëns +[ +ASN1_DER_MAX_TAGS_COUNT + * (ssize_t)]; + +83 cÚ¡ +b”_Žv_g_t + * +gs +; + +84  +gs_couÁ +; + +85 +size_t + +ov”®l_Ëngth +; + +86  +i +; + +88 + `ASN_DEBUG +("Writingags (%s,m=%d,c=%d,ag=%s, mtc=%d)", + +89 +sd +-> +Çme +, +g_mode +, sd-> +gs_couÁ +, + +90 + `b”_Žv_g_¡ršg +( +g +), + +91 +g_mode + + +92 ?( +sd +-> +gs_couÁ ++1 + +93 -(( +g_mode + =ð-1è&& +sd +-> +gs_couÁ +)) + +94 : +sd +-> +gs_couÁ + + +97 if( +sd +-> +gs_couÁ + + 1 > +ASN1_DER_MAX_TAGS_COUNT +) { + +98 + `ASN_DEBUG +("Sy¡em†im™ %d oÀg couÁ", +ASN1_DER_MAX_TAGS_COUNT +); + +102 if( +g_mode +) { + +108  +¡ag_off£t +; + +109 +b”_Žv_g_t + * +gs_buf + = +gs_buf_sü©ch +; + +110 +gs_couÁ + = +sd +->tags_count + +112 - (( +g_mode + =ð-1è&& +sd +-> +gs_couÁ +); + +114 +gs_buf +[0] = +g +; + +115 +¡ag_off£t + = -1 + (( +g_mode + =ð-1è&& +sd +-> +gs_couÁ +); + +116  +i + = 1; i < +gs_couÁ +; i++) + +117 +gs_buf +[ +i +] = +sd +-> +gs +[˜+ +¡ag_off£t +]; + +118 +gs + = +gs_buf +; + +120 +gs + = +sd +->tags; + +121 +gs_couÁ + = +sd +->tags_count; + +125 if( +gs_couÁ + == 0) + +132 +ov”®l_Ëngth + = +¡ruù_Ëngth +; + +133  +i + = +gs_couÁ + - 1; i >= 0; --i) { + +134 +Ëns +[ +i +] = + `d”_wr™e_TL +( +gs +[i], +ov”®l_Ëngth +, 0, 0, 0); + +135 if( +Ëns +[ +i +] == -1)  -1; + +136 +ov”®l_Ëngth + +ð +Ëns +[ +i +]; + +137 +Ëns +[ +i +] = +ov”®l_Ëngth + -†ens[i]; + +140 if(! +cb +è +ov”®l_Ëngth + - +¡ruù_Ëngth +; + +142 + `ASN_DEBUG +("Encodšg % TL sequ’û (%dƒËm’ts)", +sd +-> +Çme +, + +143 +gs_couÁ +); + +148  +i + = 0; i < +gs_couÁ +; i++) { + +149 +ssize_t + +Ën +; + +150  +_cÚ¡r +; + +153 +_cÚ¡r + = ( +Ï¡_g_fÜm + || +i + < ( +gs_couÁ + - 1)); + +155 +Ën + = + `d”_wr™e_TL +( +gs +[ +i +], +Ëns +[i], +cb +, +­p_key +, +_cÚ¡r +); + +156 if( +Ën + == -1)  -1; + +159  +ov”®l_Ëngth + - +¡ruù_Ëngth +; + +160 + } +} + +162  +ssize_t + + +163 + $d”_wr™e_TL +( +b”_Žv_g_t + +g +, +b”_Žv_Ën_t + +Ën +, + +164 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +, + +165  +cÚ¡ruùed +) { + +166 +ušt8_t + +buf +[32]; + +167 +size_t + +size + = 0; + +168  +buf_size + = +cb +?( +buf +):0; + +169 +ssize_t + +tmp +; + +172 +tmp + = + `b”_Žv_g_£rŸlize +( +g +, +buf +, +buf_size +); + +173 if( +tmp + =ð-1 ||m°> ( +ssize_t +)( +buf +))  -1; + +174 +size + +ð +tmp +; + +177 +tmp + = + `d”_Žv_Ëngth_£rŸlize +( +Ën +, +buf ++ +size +, +buf_size +?buf_size-size:0); + +178 if( +tmp + == -1)  -1; + +179 +size + +ð +tmp +; + +181 if( +size + > ( +buf +)) + +187 if( +cb +) { + +188 if( +cÚ¡ruùed +è* +buf + |= 0x20; + +189 if( + `cb +( +buf +, +size +, +­p_key +) < 0) + +193  +size +; + +194 + } +} + + @oer_decoder.c + +5  + ~ + +6  + ~ + +11 +a¢_dec_rv®_t + + +12 + $Ûr_decode +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +13 cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, ** +¡ruù_±r +, + +14 cÚ¡ * +±r +, +size_t + +size +) { + +15 +a¢_codec_ùx_t + +s_codec_ùx +; + +21 if( +Ýt_codec_ùx +) { + +22 if( +Ýt_codec_ùx +-> +max_¡ack_size +) { + +23 +s_codec_ùx + = * +Ýt_codec_ùx +; + +24 +Ýt_codec_ùx + = & +s_codec_ùx +; + +28 + `mem£t +(& +s_codec_ùx +, 0, (s_codec_ctx)); + +29 +s_codec_ùx +. +max_¡ack_size + = +ASN__DEFAULT_STACK_MAX +; + +30 +Ýt_codec_ùx + = & +s_codec_ùx +; + +36  +ty³_desütÜ +-> +Ý +-> + `Ûr_decod” +( +Ýt_codec_ùx +,ype_descriptor, 0, + +37 +¡ruù_±r +, + +38 +±r +, +size + + +40 + } +} + +46 +ssize_t + + +47 + $Ûr_ݒ_ty³_sk +(cÚ¡ * +buåŒ +, +size_t + +size +) { + +48 +size_t + +Ën + = 0; + +49  + `Ûr_ãtch_Ëngth +( +buåŒ +, +size +, & +Ën +); + +50 + } +} + +59 +ssize_t + + +60 + $Ûr_ݒ_ty³_g‘ +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +61 cÚ¡  +a¢_TYPE_desütÜ_s + * +td +, + +62 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¡ruù_±r +, + +63 cÚ¡ * +buåŒ +, +size_t + +size +) { + +64 +a¢_dec_rv®_t + +dr +; + +65 +size_t + +cڏš”_Ën + = 0; + +66 +ssize_t + +Ën_Ën +; + +67 +a¢_¡ruù_ä“_m‘hod + +di¥o£_m‘hod + = + +68 (* +¡ruù_±r +è? +ASFM_FREE_UNDERLYING_AND_RESET + : +ASFM_FREE_EVERYTHING +; + +71 +Ën_Ën + = + `Ûr_ãtch_Ëngth +( +buåŒ +, +size +, & +cڏš”_Ën +); + +72 if( +Ën_Ën + <= 0) { + +73  +Ën_Ën +; + +80 if( +size + - +Ën_Ën + < +cڏš”_Ën +) { + +85 +dr + = +td +-> +Ý +-> + `Ûr_decod” +( +Ýt_codec_ùx +,d, +cÚ¡¿šts +, +¡ruù_±r +, + +86 (cÚ¡ +ušt8_t + *) +buåŒ + + +Ën_Ën +, +cڏš”_Ën +); + +87 if( +dr +. +code + =ð +RC_OK +) { + +88  +Ën_Ën + + +cڏš”_Ën +; + +91 +td +-> +Ý +-> + `ä“_¡ruù +Ñd, * +¡ruù_±r +, +di¥o£_m‘hod +); + +92 * +¡ruù_±r + = +NULL +; + +95 + } +} + +98 +a¢_dec_rv®_t + + +99 + $Ûr_decode_´im™ive +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +100 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +101 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +102 cÚ¡ * +±r +, +size_t + +size +) { + +103 +ASN__PRIMITIVE_TYPE_t + * +¡ + = (ASN__PRIMITIVE_TYPE_ˆ*)* +¥Œ +; + +104 +a¢_dec_rv®_t + +rv® + = { +RC_OK +, 0}; + +105 +size_t + +ex³ùed_Ëngth + = 0; + +106 +ssize_t + +Ën_Ën +; + +108 () +td +; + +109 () +Ýt_codec_ùx +; + +110 () +cÚ¡¿šts +; + +112 if(! +¡ +) { + +113 +¡ + = ( +ASN__PRIMITIVE_TYPE_t + *)(* +¥Œ + = + `CALLOC +( + +114 1, ( +ASN__PRIMITIVE_TYPE_t +))); + +115 if(! +¡ +è +ASN__DECODE_FAILED +; + +124 +Ën_Ën + = + `Ûr_ãtch_Ëngth +( +±r +, +size +, & +ex³ùed_Ëngth +); + +125 if( +Ën_Ën + > 0) { + +126 +rv® +. +cÚsumed + = +Ën_Ën +; + +127 +±r + = (cÚ¡ *íŒ + +Ën_Ën +; + +128 +size + -ð +Ën_Ën +; + +129 } if( +Ën_Ën + == 0) { + +130 +ASN__DECODE_STARVED +; + +131 } if( +Ën_Ën + < 0) { + +132 +ASN__DECODE_FAILED +; + +135 if( +size + < +ex³ùed_Ëngth +) { + +136 +ASN__DECODE_STARVED +; + +138 +ušt8_t + * +buf + = + `MALLOC +( +ex³ùed_Ëngth + + 1); + +139 if( +buf + =ð +NULL +) { + +140 +ASN__DECODE_FAILED +; + +142 + `memýy +( +buf +, +±r +, +ex³ùed_Ëngth +); + +143 +buf +[ +ex³ùed_Ëngth +] = '\0'; + +145 + `FREEMEM +( +¡ +-> +buf +); + +146 +¡ +-> +buf + = buf; + +147 +¡ +-> +size + = +ex³ùed_Ëngth +; + +149 +rv® +. +cÚsumed + +ð +ex³ùed_Ëngth +; + +150  +rv® +; + +152 + } +} + + @oer_encoder.c + +5  + ~ + +6  + ~ + +11 +a¢_’c_rv®_t + + +12 + $Ûr_’code +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, cÚ¡ * +¡ruù_±r +, + +13 +a¢_­p_cÚsume_by‹s_f + * +cÚsume_by‹s +, * +­p_key +) { + +14 + `ASN_DEBUG +("OERƒncod” invoked fÜ %s", +ty³_desütÜ +-> +Çme +); + +19  +ty³_desütÜ +-> +Ý +-> + `Ûr_’cod” +( + +20 +ty³_desütÜ +, 0, + +21 +¡ruù_±r +, + +22 +cÚsume_by‹s +, +­p_key +); + +23 + } +} + +28  + s’c_to_buf_¬g + { + +29 * + mbufãr +; + +30 +size_t + + mËá +; + +31 } + t’c_to_buf_¬g +; + +33 + $’code_to_bufãr_cb +(cÚ¡ * +bufãr +, +size_t + +size +, * +key +) { + +34 +’c_to_buf_¬g + * +¬g + = (’c_to_buf_¬g *) +key +; + +36 if( +¬g +-> +Ëá + < +size +)  -1; + +38 + `memýy +( +¬g +-> +bufãr +, bufãr, +size +); + +39 +¬g +-> +bufãr + = ((*ïrg->bufãrè+ +size +; + +40 +¬g +-> +Ëá + -ð +size +; + +43 + } +} + +48 +a¢_’c_rv®_t + + +49 + $Ûr_’code_to_bufãr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +ty³_desütÜ +, + +50 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +51 cÚ¡ * +¡ruù_±r +, + +52 * +bufãr +, + +53 +size_t + +bufãr_size + + +55 +’c_to_buf_¬g + +¬g +; + +56 +a¢_’c_rv®_t + +ec +; + +58 +¬g +. +bufãr + = buffer; + +59 +¬g +. +Ëá + = +bufãr_size +; + +61 if( +ty³_desütÜ +-> +Ý +-> +Ûr_’cod” + =ð +NULL +) { + +62 +ec +. +’coded + = -1; + +63 +ec +. +çžed_ty³ + = +ty³_desütÜ +; + +64 +ec +. +¡ruùu»_±r + = +¡ruù_±r +; + +65 + `ASN_DEBUG +("OERƒncoder is‚ot defined for %s", + +66 +ty³_desütÜ +-> +Çme +); + +68 +ec + = +ty³_desütÜ +-> +Ý +-> + `Ûr_’cod” +( + +69 +ty³_desütÜ +, +cÚ¡¿šts +, + +70 +¡ruù_±r +, + +71 +’code_to_bufãr_cb +, & +¬g +); + +72 if( +ec +. +’coded + != -1) { + +73 + `as£¹ +( +ec +. +’coded + =ð( +ssize_t +)( +bufãr_size + - +¬g +. +Ëá +)); + +77  +ec +; + +78 + } +} + +80 +a¢_’c_rv®_t + + +81 + $Ûr_’code_´im™ive +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +82 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +83 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +84 cÚ¡ +ASN__PRIMITIVE_TYPE_t + * +¡ + = (cÚ¡ ASN__PRIMITIVE_TYPE_ˆ*) +¥Œ +; + +85 +a¢_’c_rv®_t + +” + = {0, 0, 0}; + +86 +ssize_t + +»t +; + +88 () +cÚ¡¿šts +; + +90 if(! +¡ +è +ASN__ENCODE_FAILED +; + +92 + `ASN_DEBUG +("Encodšg % (%" +ASN_PRI_SIZE + " by‹s)", +td + ?d-> +Çme + : "", +¡ +-> +size +); + +97 +»t + = + `Ûr_£rŸlize_Ëngth +( +¡ +-> +size +, +cb +, +­p_key +); + +98 if( +»t + < 0) { + +99 +ASN__ENCODE_FAILED +; + +101 +” +. +’coded + +ð +»t +; + +103 +” +. +’coded + +ð +¡ +-> +size +; + +104 if( + `cb +( +¡ +-> +buf +, st-> +size +, +­p_key +) < 0) { + +105 +ASN__ENCODE_FAILED +; + +107 + `ASN__ENCODED_OK +( +” +); + +109 + } +} + +112 + $Ûr__couÁ_by‹s +(cÚ¡ * +bufãr +, +size_t + +size +, * +by‹s_±r +) { + +113 +size_t + * +by‹s + = +by‹s_±r +; + +114 () +bufãr +; + +115 * +by‹s + +ð +size +; + +117 + } +} + +119 +ssize_t + + +120 + $Ûr_ݒ_ty³_put +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +121 cÚ¡ +a¢_Ûr_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +122 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +123 +size_t + +£rŸlized_by‹_couÁ + = 0; + +124 +a¢_’c_rv®_t + +” + = {0,0,0}; + +125 +ssize_t + +Ën_Ën +; + +127 +” + = +td +-> +Ý +-> + `Ûr_’cod” +Ñd, +cÚ¡¿šts +, +¥Œ +, +Ûr__couÁ_by‹s +, + +128 & +£rŸlized_by‹_couÁ +); + +129 if( +” +. +’coded + < 0)  -1; + +130 + `as£¹ +( +£rŸlized_by‹_couÁ + =ð( +size_t +) +” +. +’coded +); + +132 +Ën_Ën + = + `Ûr_£rŸlize_Ëngth +( +£rŸlized_by‹_couÁ +, +cb +, +­p_key +); + +133 if( +Ën_Ën + == -1)  -1; + +135 +” + = +td +-> +Ý +-> + `Ûr_’cod” +Ñd, +cÚ¡¿šts +, +¥Œ +, +cb +, +­p_key +); + +136 if( +” +. +’coded + < 0)  -1; + +137 + `as£¹ +( +£rŸlized_by‹_couÁ + =ð( +size_t +) +” +. +’coded +); + +139  +Ën_Ën + + +” +. +’coded +; + +140 + } +} + + @oer_support.c + +6  + ~ + +7  + ~ + +9  + ~<Ûr_suµÜt.h +> + +18 +ssize_t + + +19 + $Ûr_ãtch_Ëngth +(cÚ¡ * +buåŒ +, +size_t + +size +, size_ˆ* +Ën_r +) { + +20 +ušt8_t + +fœ¡_by‹ +; + +21 +size_t + +Ën_Ën +; + +22 cÚ¡ +ušt8_t + * +b +; + +23 cÚ¡ +ušt8_t + * +b’d +; + +24 +size_t + +Ën +; + +26 if( +size + == 0) { + +27 * +Ën_r + = 0; + +31 +fœ¡_by‹ + = *(cÚ¡ +ušt8_t + *) +buåŒ +; + +32 if(( +fœ¡_by‹ + & 0x80) == 0) { + +33 * +Ën_r + = +fœ¡_by‹ +; + +37 +Ën_Ën + = ( +fœ¡_by‹ + & 0x7f); + +38 if((1 + +Ën_Ën +è> +size +) { + +39 * +Ën_r + = 0; + +43 +b + = (cÚ¡ +ušt8_t + *) +buåŒ + + 1; + +44 +b’d + = +b + + +Ën_Ën +; + +46 ; +b + < +b’d + && *b == 0; b++) { + +50 if(( +b’d + - +b +è> ( +ssize_t +)( +size_t +)) { + +52 * +Ën_r + = 0; + +56  +Ën + = 0; +b + < +b’d +; b++) { + +57 +Ën + = (ËÀ<< 8è+ * +b +; + +60 if( +Ën + > +RSIZE_MAX +) { + +61 * +Ën_r + = 0; + +65 * +Ën_r + = +Ën +; + +66 + `as£¹ +( +Ën_Ën + + 1 =ð( +size_t +)( +b’d + - (cÚ¡ +ušt8_t + *) +buåŒ +)); + +67  +Ën_Ën + + 1; + +68 + } +} + +75 +ssize_t + + +76 + $Ûr_£rŸlize_Ëngth +( +size_t + +Ëngth +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +77 * +­p_key +) { + +78 +ušt8_t + +sü©ch +[1 + ( +Ëngth +)]; + +79 +ušt8_t + * +¥ + = +sü©ch +; + +80  +l™ŽeEndŸn + = 1; + +81 cÚ¡ +ušt8_t + * +p¡¬t +; + +82 cÚ¡ +ušt8_t + * +³nd +; + +83 cÚ¡ +ušt8_t + * +p +; + +84  +add +; + +86 if( +Ëngth + <= 127) { + +87 +ušt8_t + +b + = +Ëngth +; + +88 if( + `cb +(& +b +, 1, +­p_key +) < 0) { + +94 if(*(*)& +l™ŽeEndŸn +) { + +95 +p¡¬t + = (cÚ¡ +ušt8_t + *)& +Ëngth + + (length) - 1; + +96 +³nd + = (cÚ¡ +ušt8_t + *)& +Ëngth +; + +97 +add + = -1; + +99 +p¡¬t + = (cÚ¡ +ušt8_t + *)& +Ëngth +; + +100 +³nd + = +p¡¬t + + ( +Ëngth +); + +101 +add + = 1; + +104  +p + = +p¡¬t +;… !ð +³nd +;… +ð +add +) { + +106 if(* +p +) ; + +109  +¥ + = +sü©ch + + 1; ; +p + +ð +add +) { + +110 * +¥ +++ = * +p +; + +111 if( +p + =ð +³nd +) ; + +113 + `as£¹ +(( +¥ + - +sü©ch +) - 1 <= 0x7f); + +114 +sü©ch +[0] = 0x80 + (( +¥ + - scratch) - 1); + +116 if( + `cb +( +sü©ch +, +¥ + - sü©ch, +­p_key +) < 0) { + +120  +¥ + - +sü©ch +; + +121 + } +} + + @per_decoder.c + +1  + ~ + +2  + ~ + +3  + ~<³r_decod”.h +> + +10 +a¢_dec_rv®_t + + +11 + $u³r_decode_com¶‘e +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +12 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +13 cÚ¡ * +bufãr +, +size_t + +size +) { + +14 +a¢_dec_rv®_t + +rv® +; + +16 +rv® + = + `u³r_decode +( +Ýt_codec_ùx +, +td +, +¥Œ +, +bufãr +, +size +, 0, 0); + +17 if( +rv® +. +cÚsumed +) { + +22 +rv® +. +cÚsumed + += 7; + +23 +rv® +. +cÚsumed + >>= 3; + +24 } if( +rv® +. +code + =ð +RC_OK +) { + +25 if( +size +) { + +26 if(((cÚ¡ +ušt8_t + *) +bufãr +)[0] == 0) { + +27 +rv® +. +cÚsumed + = 1; + +29 + `ASN_DEBUG +("Expecting single zeroed byte"); + +30 +rv® +. +code + = +RC_FAIL +; + +34 +rv® +. +code + = +RC_WMORE +; + +38  +rv® +; + +39 + } +} + +41 +a¢_dec_rv®_t + + +42 + $u³r_decode +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +43 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, cÚ¡ * +bufãr +, + +44 +size_t + +size +,  +sk_b™s +,  +unu£d_b™s +) { + +45 +a¢_codec_ùx_t + +s_codec_ùx +; + +46 +a¢_dec_rv®_t + +rv® +; + +47 +a¢_³r_d©a_t + +pd +; + +49 if( +sk_b™s + < 0 || skip_bits > 7 + +50 || +unu£d_b™s + < 0 || unused_bits > 7 + +51 || ( +unu£d_b™s + > 0 && ! +size +)) + +52 +ASN__DECODE_FAILED +; + +58 if( +Ýt_codec_ùx +) { + +59 if( +Ýt_codec_ùx +-> +max_¡ack_size +) { + +60 +s_codec_ùx + = * +Ýt_codec_ùx +; + +61 +Ýt_codec_ùx + = & +s_codec_ùx +; + +65 + `mem£t +(& +s_codec_ùx +, 0, (s_codec_ctx)); + +66 +s_codec_ùx +. +max_¡ack_size + = +ASN__DEFAULT_STACK_MAX +; + +67 +Ýt_codec_ùx + = & +s_codec_ùx +; + +71 + `mem£t +(& +pd +, 0, (pd)); + +72 +pd +. +bufãr + = (cÚ¡ +ušt8_t + *)buffer; + +73 +pd +. +nboff + = +sk_b™s +; + +74 +pd +. +nb™s + = 8 * +size + - +unu£d_b™s +; + +75 if( +pd +. +nboff + >…d. +nb™s +) + +76 +ASN__DECODE_FAILED +; + +81 if(! +td +-> +Ý +-> +u³r_decod” +) + +82 +ASN__DECODE_FAILED +; + +83 +rv® + = +td +-> +Ý +-> + `u³r_decod” +( +Ýt_codec_ùx +,d, 0, +¥Œ +, & +pd +); + +84 if( +rv® +. +code + =ð +RC_OK +) { + +86 +rv® +. +cÚsumed + = (( +pd +. +bufãr + - (cÚ¡ +ušt8_t + *)buffer) << 3) + +87 + +pd +. +nboff + - +sk_b™s +; + +88 + `ASN_DEBUG +("PER decoding consumed %ld, counted %ld", + +89 () +rv® +. +cÚsumed +, () +pd +. +moved +); + +90 + `as£¹ +( +rv® +. +cÚsumed + =ð +pd +. +moved +); + +93 +rv® +. +cÚsumed + = 0; + +95  +rv® +; + +96 + } +} + +98 +a¢_dec_rv®_t + + +99 + $­”_decode_com¶‘e +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +100 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, + +101 cÚ¡ * +bufãr +, +size_t + +size +) { + +102 +a¢_dec_rv®_t + +rv® +; + +104 +rv® + = + `­”_decode +( +Ýt_codec_ùx +, +td +, +¥Œ +, +bufãr +, +size +, 0, 0); + +105 if( +rv® +. +cÚsumed +) { + +110 +rv® +. +cÚsumed + += 7; + +111 +rv® +. +cÚsumed + >>= 3; + +112 } if( +rv® +. +code + =ð +RC_OK +) { + +113 if( +size +) { + +114 if(((cÚ¡ +ušt8_t + *) +bufãr +)[0] == 0) { + +115 +rv® +. +cÚsumed + = 1; + +117 + `ASN_DEBUG +("Expecting single zeroed byte"); + +118 +rv® +. +code + = +RC_FAIL +; + +122 +rv® +. +code + = +RC_WMORE +; + +126  +rv® +; + +127 + } +} + +129 +a¢_dec_rv®_t + + +130 + $­”_decode +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +131 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¥Œ +, cÚ¡ * +bufãr +, + +132 +size_t + +size +,  +sk_b™s +,  +unu£d_b™s +) { + +133 +a¢_codec_ùx_t + +s_codec_ùx +; + +134 +a¢_dec_rv®_t + +rv® +; + +135 +a¢_³r_d©a_t + +pd +; + +137 if( +sk_b™s + < 0 || skip_bits > 7 + +138 || +unu£d_b™s + < 0 || unused_bits > 7 + +139 || ( +unu£d_b™s + > 0 && ! +size +)) + +140 +ASN__DECODE_FAILED +; + +146 if( +Ýt_codec_ùx +) { + +147 if( +Ýt_codec_ùx +-> +max_¡ack_size +) { + +148 +s_codec_ùx + = * +Ýt_codec_ùx +; + +149 +Ýt_codec_ùx + = & +s_codec_ùx +; + +153 + `mem£t +(& +s_codec_ùx +, 0, (s_codec_ctx)); + +154 +s_codec_ùx +. +max_¡ack_size + = +ASN__DEFAULT_STACK_MAX +; + +155 +Ýt_codec_ùx + = & +s_codec_ùx +; + +159 + `mem£t +(& +pd +, 0, (pd)); + +160 +pd +. +bufãr + = (cÚ¡ +ušt8_t + *)buffer; + +161 +pd +. +nboff + = +sk_b™s +; + +162 +pd +. +nb™s + = 8 * +size + - +unu£d_b™s +; + +163 if( +pd +. +nboff + >…d. +nb™s +) + +164 +ASN__DECODE_FAILED +; + +169 if(! +td +-> +Ý +-> +­”_decod” +) + +170 +ASN__DECODE_FAILED +; + +171 +rv® + = +td +-> +Ý +-> + `­”_decod” +( +Ýt_codec_ùx +,d, 0, +¥Œ +, & +pd +); + +172 if( +rv® +. +code + =ð +RC_OK +) { + +174 +rv® +. +cÚsumed + = (( +pd +. +bufãr + - (cÚ¡ +ušt8_t + *)buffer) << 3) + +175 + +pd +. +nboff + - +sk_b™s +; + +176 + `ASN_DEBUG +("PER decoding consumed %zu, counted %zu", + +177 +rv® +. +cÚsumed +, +pd +. +moved +); + +178 + `as£¹ +( +rv® +. +cÚsumed + =ð +pd +. +moved +); + +181 +rv® +. +cÚsumed + = 0; + +183  +rv® +; + +184 + } +} + + @per_encoder.c + +1  + ~ + +2  + ~ + +3  + ~<³r_’cod”.h +> + +5  +_u³r_’code_æush_ou +( +a¢_³r_ou_t + * +po +); + +8 + $ignÜe_ouut +(cÚ¡ * +d©a +, +size_t + +size +, * +­p_key +) { + +9 () +d©a +; + +10 () +size +; + +11 () +­p_key +; + +13 + } +} + +15 +a¢_’c_rv®_t + + +16 + $u³r_’code +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +17 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +18 +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +19 +a¢_³r_ou_t + +po +; + +20 +a¢_’c_rv®_t + +” + = {0,0,0}; + +25 if(! +td + || !td-> +Ý +-> +u³r_’cod” +) + +26 +ASN__ENCODE_FAILED +; + +28 +po +. +bufãr + =…o. +tmp¥aû +; + +29 +po +. +nboff + = 0; + +30 +po +. +nb™s + = 8 * Õo. +tmp¥aû +); + +31 +po +. +ouut + = +cb + ? cb : +ignÜe_ouut +; + +32 +po +. +Ý_key + = +­p_key +; + +33 +po +. +æushed_by‹s + = 0; + +35 +” + = +td +-> +Ý +-> + `u³r_’cod” +Ñd, +cÚ¡¿šts +, +¥Œ +, & +po +); + +36 if( +” +. +’coded + != -1) { + +37 +size_t + +b™s_to_æush +; + +39 +b™s_to_æush + = (( +po +. +bufãr + -…o. +tmp¥aû +è<< 3è+…o. +nboff +; + +42 +” +. +’coded + = ( +po +. +æushed_by‹s + << 3è+ +b™s_to_æush +; + +44 if( + `_u³r_’code_æush_ou +(& +po +)è +ASN__ENCODE_FAILED +; + +47  +” +; + +48 + } +} + +53  + s’c_to_buf_¬g + { + +54 * + mbufãr +; + +55 +size_t + + mËá +; + +56 } + t’c_to_buf_¬g +; + +57  + $’code_to_bufãr_cb +(cÚ¡ * +bufãr +, +size_t + +size +, * +key +) { + +58 +’c_to_buf_¬g + * +¬g + = (’c_to_buf_¬g *) +key +; + +60 if( +¬g +-> +Ëá + < +size +) + +63 + `memýy +( +¬g +-> +bufãr +, bufãr, +size +); + +64 +¬g +-> +bufãr + = ((*ïrg->bufãrè+ +size +; + +65 +¬g +-> +Ëá + -ð +size +; + +68 + } +} + +70 +a¢_’c_rv®_t + + +71 + $u³r_’code_to_bufãr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +72 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +73 cÚ¡ * +¥Œ +, * +bufãr +, +size_t + +bufãr_size +) { + +74 +’c_to_buf_¬g + +key +; + +76 +key +. +bufãr + = buffer; + +77 +key +. +Ëá + = +bufãr_size +; + +79 if( +td +è + `ASN_DEBUG +("Encodšg \"%s\" usšg UNALIGNED PER",d-> +Çme +); + +81  + `u³r_’code +( +td +, +cÚ¡¿šts +, +¥Œ +, +’code_to_bufãr_cb +, & +key +); + +82 + } +} + +84  + s’c_dyn_¬g + { + +85 * + mbufãr +; + +86 +size_t + + mËngth +; + +87 +size_t + + m®loÿ‹d +; + +88 } + t’c_dyn_¬g +; + +90 + $’code_dyn_cb +(cÚ¡ * +bufãr +, +size_t + +size +, * +key +) { + +91 +’c_dyn_¬g + * +¬g + = +key +; + +92 if( +¬g +-> +Ëngth + + +size + >ð¬g-> +®loÿ‹d +) { + +93 +size_t + +Ãw_size + = +¬g +-> +®loÿ‹d + ?‡rg->allocated : 8; + +94 * +p +; + +97 +Ãw_size + <<= 2; + +98 }  +¬g +-> +Ëngth + + +size + >ð +Ãw_size +); + +100 +p + = + `REALLOC +( +¬g +-> +bufãr +, +Ãw_size +); + +101 if(! +p +) { + +102 + `FREEMEM +( +¬g +-> +bufãr +); + +103 + `mem£t +( +¬g +, 0, (*arg)); + +106 +¬g +-> +bufãr + = +p +; + +107 +¬g +-> +®loÿ‹d + = +Ãw_size +; + +109 + `memýy +(((*) +¬g +-> +bufãr +è+‡rg-> +Ëngth +, bufãr, +size +); + +110 +¬g +-> +Ëngth + +ð +size +; + +112 + } +} + +113 +ssize_t + + +114 + $u³r_’code_to_Ãw_bufãr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +115 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +116 cÚ¡ * +¥Œ +, ** +bufãr_r +) { + +117 +a¢_’c_rv®_t + +” + = {0,0,0}; + +118 +’c_dyn_¬g + +key +; + +120 + `mem£t +(& +key +, 0, (key)); + +122 +” + = + `u³r_’code +( +td +, +cÚ¡¿šts +, +¥Œ +, +’code_dyn_cb +, & +key +); + +123  +” +. +’coded +) { + +125 + `FREEMEM +( +key +. +bufãr +); + +128 + `FREEMEM +( +key +. +bufãr +); + +129 +key +. +bufãr + = + `MALLOC +(1); + +130 if( +key +. +bufãr +) { + +131 *(*) +key +. +bufãr + = '\0'; + +132 * +bufãr_r + = +key +. +bufãr +; + +138 * +bufãr_r + = +key +. +bufãr +; + +139 + `ASN_DEBUG +("Com¶‘’coded iÀ%ld b™s", () +” +. +’coded +); + +140  (( +” +. +’coded + + 7) >> 3); + +142 + } +} + +150 + $_u³r_’code_æush_ou +( +a¢_³r_ou_t + * +po +) { + +151 +ušt8_t + * +buf +; + +153 if( +po +-> +nboff + =ð0 &&…o-> +bufãr + =ðpo-> +tmp¥aû +) + +156 +buf + = +po +-> +bufãr + + (po-> +nboff + >> 3); + +158 if( +po +-> +nboff + & 0x07) { + +159 +buf +[0] &ð0xfà<< (8 - ( +po +-> +nboff + & 0x07)); + +160 +buf +++; + +163  +po +-> + `ouut +Õo-> +tmp¥aû +, +buf + -…o->tmp¥aû,…o-> +Ý_key +); + +164 + } +} + +166 +a¢_’c_rv®_t + + +167 + $­”_’code_to_bufãr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +168 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +169 cÚ¡ * +¥Œ +, * +bufãr +, +size_t + +bufãr_size +) { + +170 +’c_to_buf_¬g + +key +; + +172 +key +. +bufãr + = buffer; + +173 +key +. +Ëá + = +bufãr_size +; + +175 if( +td +è + `ASN_DEBUG +("Encodšg \"%s\" usšg ALIGNED PER",d-> +Çme +); + +177  + `­”_’code +( +td +, +cÚ¡¿šts +, +¥Œ +, +’code_to_bufãr_cb +, & +key +); + +178 + } +} + +180 +ssize_t + + +181 + $­”_’code_to_Ãw_bufãr +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +182 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +183 cÚ¡ * +¥Œ +, ** +bufãr_r +) { + +184 +a¢_’c_rv®_t + +” + = {0,0,0}; + +185 +’c_dyn_¬g + +key +; + +187 + `mem£t +(& +key +, 0, (key)); + +189 +” + = + `­”_’code +( +td +, +cÚ¡¿šts +, +¥Œ +, +’code_dyn_cb +, & +key +); + +190  +” +. +’coded +) { + +192 + `FREEMEM +( +key +. +bufãr +); + +195 + `FREEMEM +( +key +. +bufãr +); + +196 +key +. +bufãr + = + `MALLOC +(1); + +197 if( +key +. +bufãr +) { + +198 *(*) +key +. +bufãr + = '\0'; + +199 * +bufãr_r + = +key +. +bufãr +; + +205 * +bufãr_r + = +key +. +bufãr +; + +206 + `ASN_DEBUG +("Com¶‘’coded iÀ%ld b™s", () +” +. +’coded +); + +207  (( +” +. +’coded + + 7) >> 3); + +209 + } +} + +212 + $_­”_’code_æush_ou +( +a¢_³r_ou_t + * +po +) { + +213 +ušt8_t + * +buf +; + +215 if( +po +-> +nboff + =ð0 &&…o-> +bufãr + =ðpo-> +tmp¥aû +) + +218 +buf + = +po +-> +bufãr + + (po-> +nboff + >> 3); + +220 if( +po +-> +nboff + & 0x07) { + +221 +buf +[0] &ð0xfà<< (8 - ( +po +-> +nboff + & 0x07)); + +222 +buf +++; + +225 ià( +po +-> +ouut +) { + +226  +po +-> + `ouut +Õo-> +tmp¥aû +, +buf + -…o->tmp¥aû,…o-> +Ý_key +); + +229 + } +} + +231 +a¢_’c_rv®_t + + +232 + $­”_’code +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +233 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +234 cÚ¡ * +¥Œ +, +a¢_­p_cÚsume_by‹s_f + * +cb +, * +­p_key +) { + +235 +a¢_³r_ou_t + +po +; + +236 +a¢_’c_rv®_t + +” + = {0,0,0}; + +241 if(! +td + || !td-> +Ý +-> +­”_’cod” +) + +242 +ASN__ENCODE_FAILED +; + +244 +po +. +bufãr + =…o. +tmp¥aû +; + +245 +po +. +nboff + = 0; + +246 +po +. +nb™s + = 8 * Õo. +tmp¥aû +); + +247 +po +. +ouut + = +cb +; + +248 +po +. +Ý_key + = +­p_key +; + +249 +po +. +æushed_by‹s + = 0; + +251 +” + = +td +-> +Ý +-> + `­”_’cod” +Ñd, +cÚ¡¿šts +, +¥Œ +, & +po +); + +252 if( +” +. +’coded + != -1) { + +253 +size_t + +b™s_to_æush +; + +255 +b™s_to_æush + = (( +po +. +bufãr + -…o. +tmp¥aû +è<< 3è+…o. +nboff +; + +258 +” +. +’coded + = ( +po +. +æushed_by‹s + << 3è+ +b™s_to_æush +; + +260 if( + `_­”_’code_æush_ou +(& +po +)) + +261 +ASN__ENCODE_FAILED +; + +264  +” +; + +265 + } +} + + @per_opentype.c + +5  + ~ + +6  + ~<³r_suµÜt.h +> + +7  + ~ + +8  + ~<³r_ݒty³.h +> + +10  + su³r_ugÙ_key + { + +11 +a¢_³r_d©a_t + + mÞdpd +; + +12 +size_t + + munþaimed +; + +13 +size_t + + mÙ_moved +; + +14  + m»³© +; + +15 } + tu³r_ugÙ_key +; + +17  +u³r_ugÙ_»fžl +( +a¢_³r_d©a_t + * +pd +); + +18  +³r_sk_b™s +( +a¢_³r_d©a_t + * +pd +,  +sk_nb™s +); + +19  +a¢_dec_rv®_t + +u³r_sÙ_suck +(cÚ¡ +a¢_codec_ùx_t + *, + +20 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +21 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +22 ** +¥Œ +, +a¢_³r_d©a_t + * +pd +); + +29 + $u³r_ݒ_ty³_put +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +30 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, cÚ¡ * +¥Œ +, + +31 +a¢_³r_ou_t + * +po +) { + +32 * +buf +; + +33 * +b±r +; + +34 +ssize_t + +size +; + +36 + `ASN_DEBUG +("O³Àty³…uˆ% ...", +td +-> +Çme +); + +38 +size + = + `u³r_’code_to_Ãw_bufãr +( +td +, +cÚ¡¿šts +, +¥Œ +, & +buf +); + +39 if( +size + <= 0)  -1; + +41 + `ASN_DEBUG +("O³Àty³…uˆ% oàËngth %" +ASN_PRI_SSIZE + " + ov”h—d (1by‹?)", +td +-> +Çme +, + +42 +size +); + +44 +b±r + = +buf +; + +46  +Ãed_eom + = 0; + +47 +ssize_t + +may_§ve + = + `u³r_put_Ëngth +( +po +, +size +, & +Ãed_eom +); + +48 + `ASN_DEBUG +("P»³ndšg†’gth %" +ASN_PRI_SSIZE + + +49 "Ø% ªd‡ÎowšgØ§v%" +ASN_PRI_SSIZE +, + +50 +size +, +td +-> +Çme +, +may_§ve +); + +51 if( +may_§ve + < 0) ; + +52 if( + `³r_put_mªy_b™s +( +po +, +b±r +, +may_§ve + * 8)) ; + +53 +b±r + = (*)b±¸+ +may_§ve +; + +54 +size + -ð +may_§ve +; + +55 if( +Ãed_eom + && + `u³r_put_Ëngth +( +po +, 0, 0)) { + +56 + `FREEMEM +( +buf +); + +59 }  +size +); + +61 + `FREEMEM +( +buf +); + +62 if( +size +)  -1; + +65 + } +} + +67  +a¢_dec_rv®_t + + +68 + $u³r_ݒ_ty³_g‘_sim¶e +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, + +69 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +70 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +71 +a¢_³r_d©a_t + * +pd +) { + +72 +a¢_dec_rv®_t + +rv +; + +73 +ssize_t + +chunk_by‹s +; + +74  +»³© +; + +75 +ušt8_t + * +buf + = 0; + +76 +size_t + +bufL’ + = 0; + +77 +size_t + +bufSize + = 0; + +78 +a¢_³r_d©a_t + +¥d +; + +79 +size_t + +·ddšg +; + +81 + `ASN__STACK_OVERFLOW_CHECK +( +ùx +); + +83 + `ASN_DEBUG +("G‘tšg o³Àty³ %s...", +td +-> +Çme +); + +86 +chunk_by‹s + = + `u³r_g‘_Ëngth +( +pd +, -1, 0, & +»³© +); + +87 if( +chunk_by‹s + < 0) { + +88 + `FREEMEM +( +buf +); + +89 +ASN__DECODE_STARVED +; + +91 if( +bufL’ + + +chunk_by‹s + > +bufSize +) { + +92 * +±r +; + +93 +bufSize + = +chunk_by‹s + + (bufSize << 2); + +94 +±r + = + `REALLOC +( +buf +, +bufSize +); + +95 if(! +±r +) { + +96 + `FREEMEM +( +buf +); + +97 +ASN__DECODE_FAILED +; + +99 +buf + = +±r +; + +101 if( + `³r_g‘_mªy_b™s +( +pd +, +buf + + +bufL’ +, 0, +chunk_by‹s + << 3)) { + +102 + `FREEMEM +( +buf +); + +103 +ASN__DECODE_STARVED +; + +105 +bufL’ + +ð +chunk_by‹s +; + +106 }  +»³© +); + +108 + `ASN_DEBUG +("G‘tšg o³Àty³ % ’coded iÀ%ld by‹s", +td +-> +Çme +, + +109 () +bufL’ +); + +111 + `mem£t +(& +¥d +, 0, (spd)); + +112 +¥d +. +bufãr + = +buf +; + +113 +¥d +. +nb™s + = +bufL’ + << 3; + +115 + `ASN_DEBUG_INDENT_ADD +(+4); + +116 +rv + = +td +-> +Ý +-> + `u³r_decod” +( +ùx +,d, +cÚ¡¿šts +, +¥Œ +, & +¥d +); + +117 + `ASN_DEBUG_INDENT_ADD +(-4); + +119 if( +rv +. +code + =ð +RC_OK +) { + +121 +·ddšg + = +¥d +. +nb™s + - spd. +nboff +; + +122 ià((( +·ddšg + > 0 &&…adding < 8) || + +124 ( +¥d +. +nboff + =ð0 && spd. +nb™s + =ð8 && spd. +bufãr + =ð +buf +)) && + +125 + `³r_g‘_ãw_b™s +(& +¥d +, +·ddšg +) == 0) { + +127 + `FREEMEM +( +buf +); + +128  +rv +; + +130 + `FREEMEM +( +buf +); + +131 if( +·ddšg + >= 8) { + +132 + `ASN_DEBUG +("ToØÏrg·ddšg %d iÀݒy³", () +·ddšg +); + +133 +ASN__DECODE_FAILED +; + +135 + `ASN_DEBUG +("No…adding"); + +138 + `FREEMEM +( +buf +); + +140 +rv +. +code + = +RC_FAIL +; + +143  +rv +; + +144 + } +} + +146  +a¢_dec_rv®_t + +CC_NOTUSED + + +147 + $u³r_ݒ_ty³_g‘_com¶ex +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, + +148 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +149 +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +150 +a¢_³r_d©a_t + * +pd +) { + +151 +u³r_ugÙ_key + +¬g +; + +152 +a¢_dec_rv®_t + +rv +; + +153 +ssize_t + +·ddšg +; + +155 + `ASN__STACK_OVERFLOW_CHECK +( +ùx +); + +157 + `ASN_DEBUG +("G‘tšg o³Àty³ % äom %s", +td +-> +Çme +, + +158 + `a¢_b™_d©a_¡ršg +( +pd +)); + +159 +¬g +. +Þdpd + = * +pd +; + +160 +¬g +. +unþaimed + = 0; + +161 +¬g +. +Ù_moved + = 0; + +162 +¬g +. +»³© + = 1; + +163 +pd +-> +»fžl + = +u³r_ugÙ_»fžl +; + +164 +pd +-> +»fžl_key + = & +¬g +; + +165 +pd +-> +nb™s + =…d-> +nboff +; + +166 +pd +-> +moved + = 0; + +168 + `ASN_DEBUG_INDENT_ADD +(+4); + +169 +rv + = +td +-> +Ý +-> + `u³r_decod” +( +ùx +,d, +cÚ¡¿šts +, +¥Œ +, +pd +); + +170 + `ASN_DEBUG_INDENT_ADD +(-4); + +172  + #UPDRESTOREPD + do { \ + +174 +pd +-> +nb™s + = +¬g +. +Þdpd +.nb™ - (pd-> +moved + -‡rg. +Ù_moved +); \ + +175 +pd +-> +moved + = +¬g +. +Þdpd +.moved + (pd->moved -‡rg. +Ù_moved +); \ + +176 +pd +-> +»fžl + = +¬g +. +Þdpd +.refill; \ + +177 +pd +-> +»fžl_key + = +¬g +. +Þdpd +.refill_key; \ + +178 } 0) + + ) + +180 if( +rv +. +code + !ð +RC_OK +) { + +181 +UPDRESTOREPD +; + +182  +rv +; + +185 + `ASN_DEBUG +("O³nTy³ % pd% Þd% unþaimed=%d,„•—t=%d", +td +-> +Çme +, + +186 + `a¢_b™_d©a_¡ršg +( +pd +), + +187 + `a¢_b™_d©a_¡ršg +(& +¬g +. +Þdpd +), + +188 () +¬g +. +unþaimed +, (ïrg. +»³© +); + +190 +·ddšg + = +pd +-> +moved + % 8; + +191 if( +·ddšg +) { + +192 +št32_t + +pv®ue +; + +193 if( +·ddšg + > 7) { + +194 + `ASN_DEBUG +("Too†arge…adding %d in openype", + +195 () +·ddšg +); + +196 +rv +. +code + = +RC_FAIL +; + +197 +UPDRESTOREPD +; + +198  +rv +; + +200 +·ddšg + = 8 -…adding; + +201 + `ASN_DEBUG +("G‘tšg…addšg oà%d b™s", () +·ddšg +); + +202 +pv®ue + = + `³r_g‘_ãw_b™s +( +pd +, +·ddšg +); + +203  +pv®ue +) { + +205 + `ASN_DEBUG +("Padding skip failed"); + +206 +UPDRESTOREPD +; + +207 +ASN__DECODE_STARVED +; + +210 + `ASN_DEBUG +("Non-blank…adding (%d bits 0x%02x)", + +211 () +·ddšg +, () +pv®ue +); + +212 +UPDRESTOREPD +; + +213 +ASN__DECODE_FAILED +; + +216 if( +pd +-> +nboff + !ðpd-> +nb™s +) { + +217 + `ASN_DEBUG +("O³Àty³ % ov”h—d…d% Þd%s", +td +-> +Çme +, + +218 + `a¢_b™_d©a_¡ršg +( +pd +),‡¢_b™_d©a_¡ršg(& +¬g +. +Þdpd +)); + +220 +UPDRESTOREPD +; + +221 +ASN__DECODE_FAILED +; + +223 +¬g +. +unþaimed + +ð +pd +-> +nb™s + -…d-> +nboff +; + +228 +UPDRESTOREPD +; + +231 if( +¬g +. +unþaimed +) { + +232 + `ASN_DEBUG +("G‘tšg unþaimed %d", () +¬g +. +unþaimed +); + +233  + `³r_sk_b™s +( +pd +, +¬g +. +unþaimed +)) { + +235 + `ASN_DEBUG +("CÏim oà%d fažed", () +¬g +. +unþaimed +); + +236 +ASN__DECODE_STARVED +; + +238 + `ASN_DEBUG +("GÙ cÏim oà%d", () +¬g +. +unþaimed +); + +242 + `ASN_DEBUG +("Non-blank unconsumed…adding"); + +243 +ASN__DECODE_FAILED +; + +245 +¬g +. +unþaimed + = 0; + +248 if( +¬g +. +»³© +) { + +249 + `ASN_DEBUG +("Not consumedhe wholehing"); + +250 +rv +. +code + = +RC_FAIL +; + +251  +rv +; + +254  +rv +; + +255 + } +} + +258 +a¢_dec_rv®_t + + +259 + $u³r_ݒ_ty³_g‘ +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +260 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +261 +a¢_³r_d©a_t + * +pd +) { + +262  + `u³r_ݒ_ty³_g‘_sim¶e +( +ùx +, +td +, +cÚ¡¿šts +, +¥Œ +, +pd +); + +263 + } +} + +266 + $u³r_ݒ_ty³_sk +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, +a¢_³r_d©a_t + * +pd +) { + +267 +a¢_TYPE_desütÜ_t + +s_td +; + +268 +a¢_TYPE_ݔ©iÚ_t + +s_Ý +; + +269 +a¢_dec_rv®_t + +rv +; + +271 +s_td +. +Çme + = ""; + +272 +s_td +. +Ý + = & +s_Ý +; + +273 +s_Ý +. +u³r_decod” + = +u³r_sÙ_suck +; + +275 +rv + = + `u³r_ݒ_ty³_g‘ +( +ùx +, & +s_td +, 0, 0, +pd +); + +276 if( +rv +. +code + !ð +RC_OK +) + +280 + } +} + +286  +a¢_dec_rv®_t + + +287 + $u³r_sÙ_suck +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +288 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, + +289 +a¢_³r_d©a_t + * +pd +) { + +290 +a¢_dec_rv®_t + +rv +; + +292 () +ùx +; + +293 () +td +; + +294 () +cÚ¡¿šts +; + +295 () +¥Œ +; + +297  + `³r_g‘_ãw_b™s +( +pd +, 1) >= 0); + +299 +rv +. +code + = +RC_OK +; + +300 +rv +. +cÚsumed + = +pd +-> +moved +; + +302  +rv +; + +303 + } +} + +306 + $u³r_ugÙ_»fžl +( +a¢_³r_d©a_t + * +pd +) { + +307 +u³r_ugÙ_key + * +¬g + = +pd +-> +»fžl_key +; + +308 +ssize_t + +Ãxt_chunk_by‹s +, +Ãxt_chunk_b™s +; + +309 +ssize_t + +avaž +; + +311 +a¢_³r_d©a_t + * +Þdpd + = & +¬g +->oldpd; + +313 + `ASN_DEBUG +("REFILLING…d->moved=%ld, oldpd->moved=%ld", + +314 () +pd +-> +moved +, () +Þdpd +->moved); + +317 +Þdpd +-> +bufãr + = +pd +->buffer; + +318 +Þdpd +-> +nboff + = +pd +->nboff; + +319 +Þdpd +-> +nb™s + -ð +pd +-> +moved + - +¬g +-> +Ù_moved +; + +320 +Þdpd +-> +moved + +ð +pd +->moved - +¬g +-> +Ù_moved +; + +321 +¬g +-> +Ù_moved + = +pd +-> +moved +; + +323 if( +¬g +-> +unþaimed +) { + +325 if( + `³r_g‘_ãw_b™s +( +Þdpd +, 1)) + +327 if( +Þdpd +-> +nboff + == 0) { + +328 + `as£¹ +(0); + +331 +pd +-> +bufãr + = +Þdpd +->buffer; + +332 +pd +-> +nboff + = +Þdpd +->nboff - 1; + +333 +pd +-> +nb™s + = +Þdpd +->nbits; + +334 + `ASN_DEBUG +("UNCLAIMED <-„eturn from (pd->moved=%ld)", + +335 () +pd +-> +moved +); + +339 if(! +¬g +-> +»³© +) { + +340 + `ASN_DEBUG +("Want more but„efill doesn't have it"); + +344 +Ãxt_chunk_by‹s + = + `u³r_g‘_Ëngth +( +Þdpd +, -1, 0, & +¬g +-> +»³© +); + +345 + `ASN_DEBUG +("Openype LENGTH %ld bytes‡t off %ld,„epeat %ld", + +346 () +Ãxt_chunk_by‹s +, () +Þdpd +-> +moved +, () +¬g +-> +»³© +); + +347 if( +Ãxt_chunk_by‹s + < 0)  -1; + +348 if( +Ãxt_chunk_by‹s + == 0) { + +349 +pd +-> +»fžl + = 0; + +350 + `as£¹ +(! +¬g +-> +»³© +); + +352 +Ãxt_chunk_b™s + = +Ãxt_chunk_by‹s + << 3; + +353 +avaž + = +Þdpd +-> +nb™s + - oldpd-> +nboff +; + +354 if( +avaž + >ð +Ãxt_chunk_b™s +) { + +355 +pd +-> +nb™s + = +Þdpd +-> +nboff + + +Ãxt_chunk_b™s +; + +356 +¬g +-> +unþaimed + = 0; + +357 + `ASN_DEBUG +("!+Parent frame %ld bits,‡lloting %ld [%ld..%ld] (%ld)", + +358 () +Ãxt_chunk_b™s +, () +Þdpd +-> +moved +, + +359 () +Þdpd +-> +nboff +, ()Þdpd-> +nb™s +, + +360 ()( +Þdpd +-> +nb™s + - oldpd-> +nboff +)); + +362 +pd +-> +nb™s + = +Þdpd +->nbits; + +363 +¬g +-> +unþaimed + = +Ãxt_chunk_b™s + - +avaž +; + +364 + `ASN_DEBUG +("!-Parent frame %ld,„equire %ld, will claim %ld", + +365 () +avaž +, () +Ãxt_chunk_b™s +, + +366 () +¬g +-> +unþaimed +); + +368 +pd +-> +bufãr + = +Þdpd +->buffer; + +369 +pd +-> +nboff + = +Þdpd +->nboff; + +370 + `ASN_DEBUG +("Refilled…d%s old%s", + +371 + `a¢_b™_d©a_¡ršg +( +pd +),‡¢_b™_d©a_¡ršg( +Þdpd +)); + +373 + } +} + +376 + $³r_sk_b™s +( +a¢_³r_d©a_t + * +pd +,  +sk_nb™s +) { + +377  +hasNÚZ”oB™s + = 0; + +378  +sk_nb™s + > 0) { + +379  +sk +; + +382 if( +sk_nb™s + < 24) + +383 +sk + = +sk_nb™s +; + +385 +sk + = 24; + +386 +sk_nb™s + -ð +sk +; + +388  + `³r_g‘_ãw_b™s +( +pd +, +sk +)) { + +391 : +hasNÚZ”oB™s + = 1; ; + +394  +hasNÚZ”oB™s +; + +395 + } +} + +397  +a¢_dec_rv®_t + + +398 + $­”_ݒ_ty³_g‘_sim¶e +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, + +399 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +400 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +401 +a¢_dec_rv®_t + +rv +; + +402 +ssize_t + +chunk_by‹s +; + +403  +»³© +; + +404 +ušt8_t + * +buf + = 0; + +405 +size_t + +bufL’ + = 0; + +406 +size_t + +bufSize + = 0; + +407 +a¢_³r_d©a_t + +¥d +; + +408 +size_t + +·ddšg +; + +410 + `ASN__STACK_OVERFLOW_CHECK +( +ùx +); + +412 + `ASN_DEBUG +("G‘tšg o³Àty³ %s...", +td +-> +Çme +); + +415 +chunk_by‹s + = + `­”_g‘_Ëngth +( +pd +, -1, -1, & +»³© +); + +416 if( +chunk_by‹s + < 0) { + +417 + `FREEMEM +( +buf +); + +418 +ASN__DECODE_STARVED +; + +420 if( +bufL’ + + +chunk_by‹s + > +bufSize +) { + +421 * +±r +; + +422 +bufSize + = +chunk_by‹s + + (bufSize << 2); + +423 +±r + = + `REALLOC +( +buf +, +bufSize +); + +424 if(! +±r +) { + +425 + `FREEMEM +( +buf +); + +426 +ASN__DECODE_FAILED +; + +428 +buf + = +±r +; + +430 if( + `³r_g‘_mªy_b™s +( +pd +, +buf + + +bufL’ +, 0, +chunk_by‹s + << 3)) { + +431 + `FREEMEM +( +buf +); + +432 +ASN__DECODE_STARVED +; + +434 +bufL’ + +ð +chunk_by‹s +; + +435 }  +»³© +); + +437 + `ASN_DEBUG +("G‘tšg o³Àty³ % ’coded iÀ%ld by‹s", +td +-> +Çme +, + +438 () +bufL’ +); + +440 + `mem£t +(& +¥d +, 0, (spd)); + +441 +¥d +. +bufãr + = +buf +; + +442 +¥d +. +nb™s + = +bufL’ + << 3; + +444 + `ASN_DEBUG_INDENT_ADD +(+4); + +445 +rv + = +td +-> +Ý +-> + `­”_decod” +( +ùx +,d, +cÚ¡¿šts +, +¥Œ +, & +¥d +); + +446 + `ASN_DEBUG_INDENT_ADD +(-4); + +448 if( +rv +. +code + =ð +RC_OK +) { + +450 +·ddšg + = +¥d +. +nb™s + - spd. +nboff +; + +451 ià((( +·ddšg + > 0 &&…adding < 8) || + +453 ( +¥d +. +nboff + =ð0 && spd. +nb™s + =ð8 && spd. +bufãr + =ð +buf +)) && + +454 + `³r_g‘_ãw_b™s +(& +¥d +, +·ddšg +) == 0) { + +456 + `FREEMEM +( +buf +); + +457  +rv +; + +459 + `FREEMEM +( +buf +); + +460 if( +·ddšg + >= 8) { + +461 + `ASN_DEBUG +("ToØÏrg·ddšg %d iÀݒy³", () +·ddšg +); + +462 +ASN__DECODE_FAILED +; + +464 + `ASN_DEBUG +("No…adding"); + +467 + `FREEMEM +( +buf +); + +469 +rv +. +code + = +RC_FAIL +; + +472  +rv +; + +473 + } +} + +476 + $­”_ݒ_ty³_put +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +477 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +478 cÚ¡ * +¥Œ +, +a¢_³r_ou_t + * +po +) { + +479 * +buf +; + +480 * +b±r +; + +481 +ssize_t + +size +; + +482 +size_t + +toGo +; + +484 + `ASN_DEBUG +("O³Àty³…uˆ% ...", +td +-> +Çme +); + +486 +size + = + `­”_’code_to_Ãw_bufãr +( +td +, +cÚ¡¿šts +, +¥Œ +, & +buf +); + +487 if( +size + <= 0)  -1; + +489  +b±r + = +buf +, +toGo + = +size +;oGo;) { + +490 +ssize_t + +maySave + = + `­”_put_Ëngth +( +po +, -1, +toGo +); + +491 if( +maySave + < 0) ; + +492 if( + `³r_put_mªy_b™s +( +po +, +b±r +, +maySave + * 8)) ; + +493 +b±r + = (*)b±¸+ +maySave +; + +494 +toGo + -ð +maySave +; + +497 + `FREEMEM +( +buf +); + +498 if( +toGo +)  -1; + +500 + `ASN_DEBUG +("Openype…ut %s of†ength %ld + overhead (1byte?)", + +501 +td +-> +Çme +, +size +); + +504 + } +} + +506 +a¢_dec_rv®_t + + +507 + $­”_ݒ_ty³_g‘ +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, + +508 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, + +509 cÚ¡ +a¢_³r_cÚ¡¿šts_t + * +cÚ¡¿šts +, + +510 ** +¥Œ +, +a¢_³r_d©a_t + * +pd +) { + +512  + `­”_ݒ_ty³_g‘_sim¶e +( +ùx +, +td +, +cÚ¡¿šts +, +¥Œ +, +pd +); + +513 + } +} + +516 + $­”_ݒ_ty³_sk +(cÚ¡ +a¢_codec_ùx_t + * +ùx +, +a¢_³r_d©a_t + * +pd +) { + +517 +a¢_TYPE_desütÜ_t + +s_td +; + +518 +a¢_dec_rv®_t + +rv +; + +519 +a¢_TYPE_ݔ©iÚ_t + +Ý_t +; + +521 + `mem£t +(& +Ý_t +, 0, (op_t)); + +522 +s_td +. +Çme + = ""; + +523 +s_td +. +Ý + = & +Ý_t +; + +524 +s_td +. +Ý +-> +­”_decod” + = +u³r_sÙ_suck +; + +526 +rv + = + `­”_ݒ_ty³_g‘ +( +ùx +, & +s_td +, 0, 0, +pd +); + +527 if( +rv +. +code + !ð +RC_OK +) + +531 + } +} + + @per_support.c + +5  + ~ + +6  + ~ + +7  + ~<³r_suµÜt.h +> + +13 +ssize_t + + +14 + $u³r_g‘_Ëngth +( +a¢_³r_d©a_t + * +pd +,  +eb™s +, +size_t + +low”_bound +, + +15 * +»³© +) { + +16 +ssize_t + +v®ue +; + +18 * +»³© + = 0; + +21 if( +eb™s + >= 0 &&ƒbits <= 16) { + +22 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +eb™s +); + +23 if( +v®ue + >ð0èv®u+ð +low”_bound +; + +24  +v®ue +; + +27 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 8); + +28 if(( +v®ue + & 0x80) == 0) { + +29  ( +v®ue + & 0x7F); + +30 } if(( +v®ue + & 0x40) == 0) { + +32 +v®ue + = ((v®u& 0x3fè<< 8è| + `³r_g‘_ãw_b™s +( +pd +, 8); + +33  +v®ue +; + +34 } if( +v®ue + < 0) { + +35 + `ASN_DEBUG +("END of stream„eached for PER"); + +38 +v®ue + &= 0x3f; + +39 if( +v®ue + < 1 || value > 4) { + +42 * +»³© + = 1; + +43  (16384 * +v®ue +); + +44 + } +} + +51 +ssize_t + + +52 + $u³r_g‘_n¦’gth +( +a¢_³r_d©a_t + * +pd +) { + +53 +ssize_t + +Ëngth +; + +55 + `ASN_DEBUG +("Getting‚ormally small†ength"); + +57 if( + `³r_g‘_ãw_b™s +( +pd +, 1) == 0) { + +58 +Ëngth + = + `³r_g‘_ãw_b™s +( +pd +, 6) + 1; + +59 if( +Ëngth + <= 0)  -1; + +60 + `ASN_DEBUG +("l=%d", () +Ëngth +); + +61  +Ëngth +; + +63  +»³© +; + +64 +Ëngth + = + `u³r_g‘_Ëngth +( +pd +, -1, 0, & +»³© +); + +65 if( +Ëngth + >ð0 && ! +»³© +) †ength; + +68 + } +} + +74 +ssize_t + + +75 + $u³r_g‘_n¢nwn +( +a¢_³r_d©a_t + * +pd +) { + +76 +ssize_t + +v®ue +; + +78 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 7); + +79 if( +v®ue + & 64) { + +80 +v®ue + &= 63; + +81 +v®ue + <<= 2; + +82 +v®ue + |ð + `³r_g‘_ãw_b™s +( +pd +, 2); + +83 if( +v®ue + & 128) + +85 if( +v®ue + == 0) + +87 if( +v®ue + >= 3) + +89 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 8 * value); + +90  +v®ue +; + +93  +v®ue +; + +94 + } +} + +101 + $u³r_put_n¢nwn +( +a¢_³r_ou_t + * +po +,  +n +) { + +102  +by‹s +; + +104 if( +n + <= 63) { + +105 if( +n + < 0)  -1; + +106  + `³r_put_ãw_b™s +( +po +, +n +, 7); + +108 if( +n + < 256) + +109 +by‹s + = 1; + +110 if( +n + < 65536) + +111 +by‹s + = 2; + +112 if( +n + < 256 * 65536) + +113 +by‹s + = 3; + +116 if( + `³r_put_ãw_b™s +( +po +, +by‹s +, 8)) + +119  + `³r_put_ãw_b™s +( +po +, +n +, 8 * +by‹s +); + +120 + } +} + +124  + $u³r_g‘_cÚ¡¿šed_whÞe_numb” +( +a¢_³r_d©a_t + * +pd +, * +out_v®ue +,  +nb™s +) { + +125  +lh®f +; + +126  +h®f +; + +128 if( +nb™s + <= 31) { + +129 +h®f + = + `³r_g‘_ãw_b™s +( +pd +, +nb™s +); + +130 if( +h®f + < 0)  -1; + +131 * +out_v®ue + = +h®f +; + +135 if(( +size_t +) +nb™s + > 8 * (* +out_v®ue +)) + +138 +h®f + = + `³r_g‘_ãw_b™s +( +pd +, 31); + +139 if( +h®f + < 0)  -1; + +141 if( + `u³r_g‘_cÚ¡¿šed_whÞe_numb” +( +pd +, & +lh®f +, +nb™s + - 31)) + +144 * +out_v®ue + = (() +h®f + << ( +nb™s + - 31)è| +lh®f +; + +146 + } +} + +151 + $u³r_put_cÚ¡¿šed_whÞe_numb”_u +( +a¢_³r_ou_t + * +po +,  +v +, + +152  +nb™s +) { + +153 if( +nb™s + <= 31) { + +154  + `³r_put_ãw_b™s +( +po +, +v +, +nb™s +); + +157 if( + `u³r_put_cÚ¡¿šed_whÞe_numb”_u +( +po +, +v + >> 31, +nb™s + - 31)) + +159  + `³r_put_ãw_b™s +( +po +, +v +, 31); + +161 + } +} + +167 +ssize_t + + +168 + $u³r_put_Ëngth +( +a¢_³r_ou_t + * +po +, +size_t + +Ëngth +, * +Ãed_eom +) { + +169  +dummy + = 0; + +170 if(! +Ãed_eom +èÃed_eom = & +dummy +; + +172 if( +Ëngth + <= 127) { + +173 * +Ãed_eom + = 0; + +174  + `³r_put_ãw_b™s +( +po +, +Ëngth +, 8) + +175 ? -1 : ( +ssize_t +) +Ëngth +; + +176 } if( +Ëngth + < 16384) { + +177 * +Ãed_eom + = 0; + +178  + `³r_put_ãw_b™s +( +po +, +Ëngth +|0x8000, 16) + +179 ? -1 : ( +ssize_t +) +Ëngth +; + +182 * +Ãed_eom + = 0 =ð( +Ëngth + & 16383); + +183 +Ëngth + >>= 14; + +184 if( +Ëngth + > 4) { + +185 * +Ãed_eom + = 0; + +186 +Ëngth + = 4; + +189  + `³r_put_ãw_b™s +( +po +, 0xC0 | +Ëngth +, 8) + +190 ? -1 : ( +ssize_t +)( +Ëngth + << 14); + +192 + } +} + +201 + $u³r_put_n¦’gth +( +a¢_³r_ou_t + * +po +, +size_t + +Ëngth +) { + +202 if( +Ëngth + <= 64) { + +204 if( +Ëngth + == 0)  -1; + +205  + `³r_put_ãw_b™s +( +po +, +Ëngth + - 1, 7) ? -1 : 0; + +207  +Ãed_eom + = 0; + +208 if( + `u³r_put_Ëngth +( +po +, +Ëngth +, & +Ãed_eom +è!ð( +ssize_t +)length + +209 || +Ãed_eom +) { + +216 + } +} + +219 + $³r__lÚg_¿nge +( +lb +,  +ub +, * +¿nge_r +) { + +220  +bounds_¿nge +; + +221 if(( +ub + < 0è=ð( +lb + < 0)) { + +222 +bounds_¿nge + = +ub + - +lb +; + +223 } if( +lb + < 0) { + +224 + `as£¹ +( +ub + >= 0); + +225 +bounds_¿nge + = 1 + (() +ub + + ()-( +lb + + 1)); + +227 + `as£¹ +(!"Unreachable"); + +230 * +¿nge_r + = +bounds_¿nge +; + +232 + } +} + +235 + $³r_lÚg_¿nge_»ba£ +( +v +,  +lb +,  +ub +, * +ouut +) { + +236  +¿nge +; + +238 + `as£¹ +( +lb + <ð +ub +); + +240 if( +v + < +lb + || v > +ub + || + `³r__lÚg_¿nge +Öb, ub, & +¿nge +) < 0) { + +252 if(( +v + < 0è=ð( +lb + < 0)) { + +253 * +ouut + = +v +- +lb +; + +255 } if( +v + < 0) { + +256  +»ba£d + = 1 + ()-( +v ++1è+ () +lb +; + +257 + `as£¹ +( +»ba£d + <ð +¿nge +); + +258 * +ouut + = +»ba£d +; + +260 } if( +lb + < 0) { + +261  +»ba£d + = 1 + ()-( +lb ++1è+ () +v +; + +262 + `as£¹ +( +»ba£d + <ð +¿nge +); + +263 * +ouut + = +»ba£d +; + +266 + `as£¹ +(!"Unreachable"); + +269 + } +} + +272 + $³r_lÚg_¿nge_uÄeba£ +( +šp +,  +lb +,  +ub +, * +ou +) { + +273  +¿nge +; + +275 if( + `³r__lÚg_¿nge +( +lb +, +ub +, & +¿nge +) != 0) { + +279 if( +šp + > +¿nge +) { + +288 if( +šp + <ð +LONG_MAX +) { + +289 * +ou + = () +šp + + +lb +; + +291 * +ou + = ( +lb + + +LONG_MAX + + 1è+ ()(( +šp + - LONG_MAX) - 1); + +295 + } +} + +297 +št32_t + + +298 + $­”_g‘_®ign +( +a¢_³r_d©a_t + * +pd +) { + +300 if( +pd +-> +nboff + & 0x7) { + +301 + `ASN_DEBUG +("Alignšg %ld b™s", 8 - (() +pd +-> +nboff + & 0x7)); + +302  + `³r_g‘_ãw_b™s +( +pd +, 8 - (pd-> +nboff + & 0x7)); + +305 + } +} + +307 +ssize_t + + +308 + $­”_g‘_Ëngth +( +a¢_³r_d©a_t + * +pd +,  +¿nge +,  +eb™s +, * +»³© +) { + +309 +ssize_t + +v®ue +; + +311 * +»³© + = 0; + +314 ià( +eb™s + >= 0) { + +315 ià( +¿nge + <= 65536 &&„ange >= 0) + +316  + `­”_g‘_n¢nwn +( +pd +, +¿nge +); + +319 ià( + `­”_g‘_®ign +( +pd +) < 0) + +322 if( +eb™s + >ð0è + `³r_g‘_ãw_b™s +( +pd +,ƒbits); + +324 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 8); + +325 if( +v®ue + < 0)  -1; + +326 if(( +v®ue + & 128) == 0) + +327  ( +v®ue + & 0x7F); + +328 if(( +v®ue + & 64) == 0) { + +329 +v®ue + = ((v®u& 63è<< 8è| + `³r_g‘_ãw_b™s +( +pd +, 8); + +330 if( +v®ue + < 0)  -1; + +331  +v®ue +; + +333 +v®ue + &= 63; + +334 if( +v®ue + < 1 || value > 4) + +336 * +»³© + = 1; + +337  (16384 * +v®ue +); + +338 + } +} + +340 +ssize_t + + +341 + $­”_g‘_n¦’gth +( +a¢_³r_d©a_t + * +pd +) { + +342 +ssize_t + +Ëngth +; + +344 + `ASN_DEBUG +("Getting‚ormally small†ength"); + +346 if( + `³r_g‘_ãw_b™s +( +pd +, 1) == 0) { + +347 +Ëngth + = + `³r_g‘_ãw_b™s +( +pd +, 6) + 1; + +348 if( +Ëngth + <= 0)  -1; + +349 + `ASN_DEBUG +("l=%ld", +Ëngth +); + +350  +Ëngth +; + +352  +»³© +; + +353 +Ëngth + = + `­”_g‘_Ëngth +( +pd +, -1, -1, & +»³© +); + +354 if( +Ëngth + >ð0 && ! +»³© +) †ength; + +357 + } +} + +359 +ssize_t + + +360 + $­”_g‘_n¢nwn +( +a¢_³r_d©a_t + * +pd +,  +¿nge +) { + +361 +ssize_t + +v®ue +; + +362  +by‹s + = 0; + +364 + `ASN_DEBUG +("g‘tšg‚¢nwÀw™h„ªg%d", +¿nge +); + +366 if( +¿nge + <= 255) { + +367  +i +; + +369 ià( +¿nge + < 0)  -1; + +371  +i + = 1; i <= 8; i++) { + +372  +uµ” + = 1 << +i +; + +373 ià( +uµ” + >ð +¿nge +) + +376 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, +i +); + +377  +v®ue +; + +378 } ià( +¿nge + == 256){ + +380 +by‹s + = 1; + +381 } ià( +¿nge + <= 65536) { + +383 +by‹s + = 2; + +387 ià( + `­”_g‘_®ign +( +pd +) < 0) + +389 +v®ue + = + `³r_g‘_ãw_b™s +( +pd +, 8 * +by‹s +); + +390  +v®ue +; + +391 + } +} + +393  + $­”_put_®ign +( +a¢_³r_ou_t + * +po +) { + +395 if( +po +-> +nboff + & 0x7) { + +396 + `ASN_DEBUG +("Alignšg %ld b™s", 8 - (() +po +-> +nboff + & 0x7)); + +397 if( + `³r_put_ãw_b™s +( +po +, 0x00, (8 - (po-> +nboff + & 0x7)))) + +401 + } +} + +403 +ssize_t + + +404 + $­”_put_Ëngth +( +a¢_³r_ou_t + * +po +,  +¿nge +, +size_t + +Ëngth +) { + +406 + `ASN_DEBUG +("APER…uˆËngth %zu w™h„ªg%d", +Ëngth +, +¿nge +); + +409 ià( +¿nge + <= 65536 &&„ange >= 0) + +410  + `­”_put_n¢nwn +( +po +, +¿nge +, +Ëngth +); + +412 ià( + `­”_put_®ign +( +po +) < 0) + +415 if( +Ëngth + <= 127) { + +416  + `³r_put_ãw_b™s +( +po +, +Ëngth +, 8) + +417 ? -1 : ( +ssize_t +) +Ëngth +; + +419 if( +Ëngth + < 16384) + +420  + `³r_put_ãw_b™s +( +po +, +Ëngth +|0x8000, 16) + +421 ? -1 : ( +ssize_t +) +Ëngth +; + +423 +Ëngth + >>= 14; + +424 if( +Ëngth + > 4)†ength = 4; + +426  + `³r_put_ãw_b™s +( +po +, 0xC0 | +Ëngth +, 8) + +427 ? -1 : ( +ssize_t +)( +Ëngth + << 14); + +428 + } +} + +432 + $­”_put_n¦’gth +( +a¢_³r_ou_t + * +po +, +size_t + +Ëngth +) { + +434 if( +Ëngth + <= 64) { + +436 if( +Ëngth + == 0)  -1; + +437  + `³r_put_ãw_b™s +( +po +, +Ëngth +-1, 7) ? -1 : 0; + +439 if( + `­”_put_Ëngth +( +po +, -1, +Ëngth +è!ð( +ssize_t +)length) { + +446 + } +} + +449 + $­”_put_n¢nwn +( +a¢_³r_ou_t + * +po +,  +¿nge +,  +numb” +) { + +450  +by‹s +; + +452 + `ASN_DEBUG +("­”…uˆn¢nwÀ%d w™h„ªg%d", +numb” +, +¿nge +); + +454 if( +¿nge + < 0) { + +455  +i +; + +456  +i + = 1; ; i++) { + +457  +b™s + = 1 << (8 * +i +); + +458 ià( +numb” + <ð +b™s +) + +461 +by‹s + = +i +; + +462 + `as£¹ +( +i + <= 4); + +464 if( +¿nge + <= 255) { + +465  +i +; + +466  +i + = 1; i <= 8; i++) { + +467  +b™s + = 1 << +i +; + +468 ià( +¿nge + <ð +b™s +) + +471  + `³r_put_ãw_b™s +( +po +, +numb” +, +i +); + +472 } if( +¿nge + == 256) { + +473 +by‹s + = 1; + +474 } if( +¿nge + <= 65536) { + +475 +by‹s + = 2; + +477  +i +; + +478  +i + = 1; ; i++) { + +479  +b™s + = 1 << (8 * +i +); + +480 ià( +¿nge + <ð +b™s +) + +483 + `as£¹ +( +i + <= 4); + +484 +by‹s + = +i +; + +486 if( + `­”_put_®ign +( +po +) < 0) + +491  + `³r_put_ãw_b™s +( +po +, +numb” +, 8 * +by‹s +); + +492 + } +} + + @xer_decoder.c + +5  + ~ + +6  + ~ + +7  + ~ + +13 +a¢_dec_rv®_t + + +14 + $x”_decode +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +15 cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, ** +¡ruù_±r +, + +16 cÚ¡ * +bufãr +, +size_t + +size +) { + +17 +a¢_codec_ùx_t + +s_codec_ùx +; + +23 if( +Ýt_codec_ùx +) { + +24 if( +Ýt_codec_ùx +-> +max_¡ack_size +) { + +25 +s_codec_ùx + = * +Ýt_codec_ùx +; + +26 +Ýt_codec_ùx + = & +s_codec_ùx +; + +30 + `mem£t +(& +s_codec_ùx +, 0, (s_codec_ctx)); + +31 +s_codec_ùx +. +max_¡ack_size + = +ASN__DEFAULT_STACK_MAX +; + +32 +Ýt_codec_ùx + = & +s_codec_ùx +; + +38  +td +-> +Ý +-> + `x”_decod” +( +Ýt_codec_ùx +,d, +¡ruù_±r +, 0, +bufãr +, +size +); + +39 + } +} + +43  + sx”__cb_¬g + { + +44 +pxml_chunk_ty³_e + + mchunk_ty³ +; + +45 +size_t + + mchunk_size +; + +46 cÚ¡ * + mchunk_buf +; + +47  + mÿÎback_nÙ_švoked +; + +51 + $x”__tok’_cb +( +pxml_chunk_ty³_e + +ty³ +, cÚ¡ * +_chunk_d©a +, +size_t + +_chunk_size +, * +key +) { + +52  +x”__cb_¬g + * +¬g + = (x”__cb_¬g *) +key +; + +53 +¬g +-> +chunk_ty³ + = +ty³ +; + +54 +¬g +-> +chunk_size + = +_chunk_size +; + +55 +¬g +-> +chunk_buf + = +_chunk_d©a +; + +56 +¬g +-> +ÿÎback_nÙ_švoked + = 0; + +58 + } +} + +63 +ssize_t + + +64 + $x”_Ãxt_tok’ +(* +¡©eCڋxt +, cÚ¡ * +bufãr +, +size_t + +size +, +px”_chunk_ty³_e + * +ch_ty³ +) { + +65  +x”__cb_¬g + +¬g +; + +66  +Ãw_¡©eCڋxt + = * +¡©eCڋxt +; + +67 +ssize_t + +»t +; + +69 +¬g +. +ÿÎback_nÙ_švoked + = 1; + +70 +»t + = + `pxml_·r£ +(& +Ãw_¡©eCڋxt +, +bufãr +, +size +, +x”__tok’_cb +, & +¬g +); + +71 if( +»t + < 0)  -1; + +72 if( +¬g +. +ÿÎback_nÙ_švoked +) { + +73 + `as£¹ +( +»t + == 0); + +74 * +ch_ty³ + = +PXER_WMORE +; + +77 + `as£¹ +( +¬g +. +chunk_size +); + +78 + `as£¹ +( +¬g +. +chunk_buf + =ð +bufãr +); + +84  +¬g +. +chunk_ty³ +) { + +85  +PXML_TEXT +: + +86 * +ch_ty³ + = +PXER_TEXT +; + +88  +PXML_TAG +: + +89 * +ch_ty³ + = +PXER_WMORE +; + +91  +PXML_TAG_END +: + +92 * +ch_ty³ + = +PXER_TAG +; + +94  +PXML_COMMENT +: + +95  +PXML_COMMENT_END +: + +96 * +ch_ty³ + = +PXER_COMMENT +; + +100 * +¡©eCڋxt + = +Ãw_¡©eCڋxt +; + +101  +¬g +. +chunk_size +; + +102 + } +} + +104  + #CSLASH + 0x2à + + ) + +105  + #LANGLE + 0x3ø + + ) + +106  + #RANGLE + 0x3 + + ) + +108 +x”_check_g_e + + +109 + $x”_check_g +(cÚ¡ * +buf_±r +,  +size +, cÚ¡ * +Ãed_g +) { + +110 cÚ¡ * +buf + = (cÚ¡ *) +buf_±r +; + +111 cÚ¡ * +’d +; + +112 +x”_check_g_e + +ù + = +XCT_OPENING +; + +114 if( +size + < 2 || +buf +[0] !ð +LANGLE + || buf[size-1] !ð +RANGLE +) { + +115 if( +size + >= 2) + +116 + `ASN_DEBUG +("Broken XMLag: \"%c...%c\"", + +117 +buf +[0], buf[ +size + - 1]); + +118  +XCT_BROKEN +; + +124 if( +buf +[1] =ð +CSLASH +) { + +125 +buf + += 2; + +126 +size + -= 3; + +127 +ù + = +XCT_CLOSING +; + +128 if( +size + > 0 && +buf +[size-1] =ð +CSLASH +) + +129  +XCT_BROKEN +; + +131 +buf +++; + +132 +size + -= 2; + +133 if( +size + > 0 && +buf +[size-1] =ð +CSLASH +) { + +134 +ù + = +XCT_BOTH +; + +135 +size +--; + +140 if(! +Ãed_g + || !*need_tag) + +141  ( +x”_check_g_e +)( +XCT__UNK__MASK + | +ù +); + +146  +’d + = +buf + + +size +; buà<ƒnd; buf++, +Ãed_g +++) { + +147  +b + = * +buf +, +n + = * +Ãed_g +; + +148 if( +b + !ð +n +) { + +149 if( +n + == 0) { + +150  +b +) { + +154  +ù +; + +157  ( +x”_check_g_e +)( +XCT__UNK__MASK + | +ù +); + +159 if( +b + == 0) + +160  +XCT_BROKEN +; + +162 if(* +Ãed_g +) + +163  ( +x”_check_g_e +)( +XCT__UNK__MASK + | +ù +); + +165  +ù +; + +166 + } +} + +169 #undeà +ADVANCE + + +170  + #ADVANCE +( +num_by‹s +) do { \ + +171 +size_t + +num + = ( +num_by‹s +); \ + +172 +buf_±r + = ((cÚ¡ *)buf_±rè+ +num +; \ + +173 +size + -ð +num +; \ + +174 +cÚsumed_my£lf + +ð +num +; \ + +175 } 0) + + ) + +177 #undeà +RETURN + + +178  + #RETURN +( +_code +) do { \ + +179 +rv® +. +code + = +_code +; \ + +180 +rv® +. +cÚsumed + = +cÚsumed_my£lf +; \ + +181 if( +rv® +. +code + !ð +RC_OK +) \ + +182 + `ASN_DEBUG +("Fažed w™h %d", +rv® +. +code +); \ + +183  +rv® +; \ + +184 } 0) + + ) + +186  + #XER_GOT_BODY +( +chunk_buf +, +chunk_size +, +size +) do { \ + +187 +ssize_t + +cÚv”‹d_size + = +body_»ûiv” + \ + +188 ( +¡ruù_key +, +chunk_buf +, +chunk_size +, \ + +189 ( +size_t +) +chunk_size + < +size +); \ + +190 if( +cÚv”‹d_size + =ð-1è + `RETURN +( +RC_FAIL +); \ + +191 if( +cÚv”‹d_size + == 0 \ + +192 && +size + =ð( +size_t +) +chunk_size +) \ + +193 + `RETURN +( +RC_WMORE +); \ + +194 +chunk_size + = +cÚv”‹d_size +; \ + +195 } 0) + + ) + +196  + #XER_GOT_EMPTY +() do { \ + +197 if( + `body_»ûiv” +( +¡ruù_key +, 0, 0, +size + > 0) == -1) \ + +198 + `RETURN +( +RC_FAIL +); \ + +199 } 0) + + ) + +204 +a¢_dec_rv®_t + + +205 +x”_decode_g’”® +(cÚ¡ +a¢_codec_ùx_t + * +Ýt_codec_ùx +, + +206 +a¢_¡ruù_ùx_t + * +ùx +, + +207 * +¡ruù_key +, + +208 cÚ¡ * +xml_g +, + +209 cÚ¡ * +buf_±r +, +size_t + +size +, + +210 (* +Ýt_uÃx³ùed_g_decod” +) + +211 (* +¡ruù_key +, cÚ¡ * +chunk_buf +, +size_t + +chunk_size +), + +212 + $ssize_t + (* +body_»ûiv” +) + +213 (* +¡ruù_key +, cÚ¡ * +chunk_buf +, +size_t + +chunk_size +, + +214  +have_mÜe +) + +217 +a¢_dec_rv®_t + +rv® +; + +218 +ssize_t + +cÚsumed_my£lf + = 0; + +220 () +Ýt_codec_ùx +; + +227 if( +ùx +-> +pha£ + > 1è + `RETURN +( +RC_FAIL +); + +229 +px”_chunk_ty³_e + +ch_ty³ +; + +230 +ssize_t + +ch_size +; + +231 +x”_check_g_e + +tcv +; + +236 +ch_size + = + `x”_Ãxt_tok’ +(& +ùx +-> +cڋxt +, +buf_±r +, +size +, + +237 & +ch_ty³ +); + +238 if( +ch_size + == -1) { + +239 + `RETURN +( +RC_FAIL +); + +241  +ch_ty³ +) { + +242  +PXER_WMORE +: + +243 + `RETURN +( +RC_WMORE +); + +244  +PXER_COMMENT +: + +245 + `ADVANCE +( +ch_size +); + +247  +PXER_TEXT +: + +248 if( +ùx +-> +pha£ + == 0) { + +256 + `XER_GOT_BODY +( +buf_±r +, +ch_size +, +size +); + +258 + `ADVANCE +( +ch_size +); + +260  +PXER_TAG +: + +265 + `as£¹ +( +ch_ty³ + =ð +PXER_TAG + && +size +); + +267 +tcv + = + `x”_check_g +( +buf_±r +, +ch_size +, +xml_g +); + +275  +tcv +) { + +276  +XCT_BOTH +: + +277 if( +ùx +-> +pha£ +) ; + +279 + `XER_GOT_EMPTY +(); + +280 + `ADVANCE +( +ch_size +); + +281 +ùx +-> +pha£ + = 2; + +282 + `RETURN +( +RC_OK +); + +283  +XCT_OPENING +: + +284 if( +ùx +-> +pha£ +) ; + +285 + `ADVANCE +( +ch_size +); + +286 +ùx +-> +pha£ + = 1; + +288  +XCT_CLOSING +: + +289 if(! +ùx +-> +pha£ +) ; + +290 + `ADVANCE +( +ch_size +); + +291 +ùx +-> +pha£ + = 2; + +292 + `RETURN +( +RC_OK +); + +293  +XCT_UNKNOWN_BO +: + +297 if( +Ýt_uÃx³ùed_g_decod” + + +298 && + `Ýt_uÃx³ùed_g_decod” +( +¡ruù_key +, + +299 +buf_±r +, +ch_size +) >= 0) { + +301 + `ADVANCE +( +ch_size +); + +302 if(! +ùx +-> +pha£ +) { + +305 +ùx +-> +pha£ + = 2; + +306 + `RETURN +( +RC_OK +); + +315 + `ASN_DEBUG +("UÃx³ùed XMLag (ex³ùed \"%s\")", +xml_g +); + +319 + `RETURN +( +RC_FAIL +); + +320 + } +} + +323 +size_t + + +324 + $x”_wh™e¥aû_¥ª +(cÚ¡ * +chunk_buf +, +size_t + +chunk_size +) { + +325 cÚ¡ * +p + = (cÚ¡ *) +chunk_buf +; + +326 cÚ¡ * +³nd + = +p + + +chunk_size +; + +328 ; +p + < +³nd +;…++) { + +329 * +p +) { + +343  ( +p + - (cÚ¡ *) +chunk_buf +); + +344 + } +} + +350 + $x”_sk_unknown +( +x”_check_g_e + +tcv +, +b”_Žv_Ën_t + * +d•th +) { + +351 + `as£¹ +(* +d•th + > 0); + +352  +tcv +) { + +353  +XCT_BOTH +: + +354  +XCT_UNKNOWN_BO +: + +357  +XCT_OPENING +: + +358  +XCT_UNKNOWN_OP +: + +359 ++(* +d•th +); + +361  +XCT_CLOSING +: + +362  +XCT_UNKNOWN_CL +: + +363 if(--(* +d•th +) == 0) + +364  ( +tcv + =ð +XCT_CLOSING +) ? 2 : 1; + +369 + } +} + + @xer_encoder.c + +5  + ~ + +6  + ~<¡dio.h +> + +7  + ~<”ºo.h +> + +12 +a¢_’c_rv®_t + + +13 + $x”_’code +(cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +, + +14 +x”_’cod”_æags_e + +x”_æags +, +a¢_­p_cÚsume_by‹s_f + * +cb +, + +15 * +­p_key +) { + +16 +a¢_’c_rv®_t + +” + = {0, 0, 0}; + +17 +a¢_’c_rv®_t + +tm³r +; + +18 cÚ¡ * +mÇme +; + +19 +size_t + +mËn +; + +20  +xÿn + = ( +x”_æags + & +XER_F_CANONICAL +) ? 1 : 2; + +22 if(! +td + || ! +¥Œ +è +cb_çžed +; + +24 +mÇme + = +td +-> +xml_g +; + +25 +mËn + = + `¡¾’ +( +mÇme +); + +27 + `ASN__CALLBACK3 +("<", 1, +mÇme +, +mËn +, ">", 1); + +29 +tm³r + = +td +-> +Ý +-> + `x”_’cod” +Ñd, +¥Œ +, 1, +x”_æags +, +cb +, +­p_key +); + +30 if( +tm³r +. +’coded + == -1) mper; + +31 +” +. +’coded + +ð +tm³r +.encoded; + +33 + `ASN__CALLBACK3 +("\n", +xÿn +); + +35 + `ASN__ENCODED_OK +( +” +); + +36 +cb_çžed +: + +37 +ASN__ENCODE_FAILED +; + +38 + } +} + +45 + $x”__´št2å +(cÚ¡ * +bufãr +, +size_t + +size +, * +­p_key +) { + +46 +FILE + * +¡»am + = (FILE *) +­p_key +; + +48 if( + `fwr™e +( +bufãr +, 1, +size +, +¡»am +) != size) + +52 + } +} + +55 + $x”_åršt +( +FILE + * +¡»am +, cÚ¡ +a¢_TYPE_desütÜ_t + * +td +, cÚ¡ * +¥Œ +) { + +56 +a¢_’c_rv®_t + +” + = {0,0,0}; + +58 if(! +¡»am +è¡»am = +¡dout +; + +59 if(! +td + || ! +¥Œ +) + +62 +” + = + `x”_’code +( +td +, +¥Œ +, +XER_F_BASIC +, +x”__´št2å +, +¡»am +); + +63 if( +” +. +’coded + == -1) + +66  + `fæush +( +¡»am +); + +67 + } +} + +69  + sx”_bufãr + { + +70 * + mbufãr +; + +71 +size_t + + mbufãr_size +; + +72 +size_t + + m®loÿ‹d_size +; + +76 + $x”__bufãr_­³nd +(cÚ¡ * +bufãr +, +size_t + +size +, * +­p_key +) { + +77  +x”_bufãr + * +xb + = +­p_key +; + +79  +xb +-> +bufãr_size + + +size + + 1 > xb-> +®loÿ‹d_size +) { + +80 +size_t + +Ãw_size + = 2 * ( +xb +-> +®loÿ‹d_size + ? xb->allocated_size : 64); + +81 * +Ãw_buf + = + `MALLOC +( +Ãw_size +); + +82 if(! +Ãw_buf +)  -1; + +83 ià( +xb +-> +bufãr +) { + +84 + `memýy +( +Ãw_buf +, +xb +-> +bufãr +, xb-> +bufãr_size +); + +86 + `FREEMEM +( +xb +-> +bufãr +); + +87 +xb +-> +bufãr + = +Ãw_buf +; + +88 +xb +-> +®loÿ‹d_size + = +Ãw_size +; + +91 + `memýy +( +xb +-> +bufãr + + xb-> +bufãr_size +, bufãr, +size +); + +92 +xb +-> +bufãr_size + +ð +size +; + +93 +xb +-> +bufãr +[xb-> +bufãr_size +] = '\0'; + +95 + } +} + +97 +x”_equiv®’û_e + + +98 + $x”_equiv®’t +(cÚ¡  +a¢_TYPE_desütÜ_s + * +td +, cÚ¡ * +¡ruù1 +, + +99 cÚ¡ * +¡ruù2 +, +FILE + * +Ýt_debug_¡»am +) { + +100  +x”_bufãr + +xb1 + = {0, 0, 0}; + +101  +x”_bufãr + +xb2 + = {0, 0, 0}; + +102 +a¢_’c_rv®_t + +e1 +, +e2 +; + +103 +a¢_dec_rv®_t + +rv® +; + +104 * +¥Œ + = +NULL +; + +106 if(! +td + || ! +¡ruù1 + || ! +¡ruù2 +) { + +107 if( +Ýt_debug_¡»am +) { + +108 if(! +td +è + `årštf +( +Ýt_debug_¡»am +, "Type descriptor missing\n"); + +109 if(! +¡ruù1 +è + `årštf +( +Ýt_debug_¡»am +, "Structure 1 missing\n"); + +110 if(! +¡ruù2 +è + `årštf +( +Ýt_debug_¡»am +, "Structure 2 missing\n"); + +112  +XEQ_FAILURE +; + +115 +e1 + = + `x”_’code +( +td +, +¡ruù1 +, +XER_F_BASIC +, +x”__bufãr_­³nd +, & +xb1 +); + +116 if( +e1 +. +’coded + == -1) { + +117 if( +Ýt_debug_¡»am +) { + +118 + `årštf +( +¡d”r +, "XER Encodšg oà% çžed\n", +td +-> +Çme +); + +120 + `FREEMEM +( +xb1 +. +bufãr +); + +121  +XEQ_ENCODE1_FAILED +; + +124 +e2 + = + `x”_’code +( +td +, +¡ruù2 +, +XER_F_BASIC +, +x”__bufãr_­³nd +, & +xb2 +); + +125 if( +e2 +. +’coded + == -1) { + +126 if( +Ýt_debug_¡»am +) { + +127 + `årštf +( +¡d”r +, "XER Encodšg oà% çžed\n", +td +-> +Çme +); + +129 + `FREEMEM +( +xb1 +. +bufãr +); + +130 + `FREEMEM +( +xb2 +. +bufãr +); + +131  +XEQ_ENCODE1_FAILED +; + +134 if( +xb1 +. +bufãr_size + !ð +xb2 +.buffer_size + +135 || + `memcmp +( +xb1 +. +bufãr +, +xb2 +.bufãr, xb1. +bufãr_size +) != 0) { + +136 if( +Ýt_debug_¡»am +) { + +137 + `årštf +( +Ýt_debug_¡»am +, + +140 +xb1 +. +bufãr +, +xb2 +.buffer); + +142 + `FREEMEM +( +xb1 +. +bufãr +); + +143 + `FREEMEM +( +xb2 +. +bufãr +); + +144  +XEQ_DIFFERENT +; + +146 if( +Ýt_debug_¡»am +) { + +147 + `årštf +( +Ýt_debug_¡»am +, + +149 "oàsiz%" +ASN_PRI_SIZE + ":\n%s", + +150 +xb1 +. +bufãr_size +, xb1. +bufãr +); + +154 +rv® + = + `x”_decode +( +NULL +, +td +, (**)& +¥Œ +, +xb1 +. +bufãr +, + +155 +xb1 +. +bufãr_size +); + +156  +rv® +. +code +) { + +157  +RC_OK +: + +159  +RC_WMORE +: + +160 if( +Ýt_debug_¡»am +) { + +161 + `årštf +( +Ýt_debug_¡»am +, + +164 +td +-> +Çme +, +xb1 +. +bufãr +); + +167  +RC_FAIL +: + +169 if( +Ýt_debug_¡»am +) { + +170 + `årštf +( +Ýt_debug_¡»am +, + +172 +td +-> +Çme +); + +174 + `ASN_STRUCT_FREE +(* +td +, +¥Œ +); + +175 + `FREEMEM +( +xb1 +. +bufãr +); + +176 + `FREEMEM +( +xb2 +. +bufãr +); + +177  +XEQ_DECODE_FAILED +; + +180 if( +rv® +. +cÚsumed + !ð +xb1 +. +bufãr_size + + +181 && (( +rv® +. +cÚsumed + > +xb1 +. +bufãr_size +) + +182 || + `x”_wh™e¥aû_¥ª +( +xb1 +. +bufãr + + +rv® +. +cÚsumed +, + +183 +xb1 +. +bufãr_size + - +rv® +. +cÚsumed +) + +184 !ð( +xb1 +. +bufãr_size + - +rv® +. +cÚsumed +))) { + +185 if( +Ýt_debug_¡»am +) { + +186 + `årštf +( +Ýt_debug_¡»am +, + +187 "Round-Œ decodoà% »quœed†es by‹ (%" +ASN_PRI_SIZE + ")han " + +188 "’coded (%" +ASN_PRI_SIZE + ")\n", + +189 +td +-> +Çme +, +rv® +. +cÚsumed +, +xb1 +. +bufãr_size +); + +191 + `ASN_STRUCT_FREE +(* +td +, +¥Œ +); + +192 + `FREEMEM +( +xb1 +. +bufãr +); + +193 + `FREEMEM +( +xb2 +. +bufãr +); + +194  +XEQ_ROUND_TRIP_FAILED +; + +200 + `FREEMEM +( +xb2 +. +bufãr +); + +201 + `mem£t +(& +xb2 +, 0, (xb2)); + +203 +e2 + = + `x”_’code +( +td +, +¥Œ +, +XER_F_BASIC +, +x”__bufãr_­³nd +, & +xb2 +); + +204 if( +e2 +. +’coded + == -1) { + +205 if( +Ýt_debug_¡»am +) { + +206 + `årštf +( +¡d”r +, "XER Encoding of„ound-trip decode of %s failed\n", + +207 +td +-> +Çme +); + +209 + `ASN_STRUCT_FREE +(* +td +, +¥Œ +); + +210 + `FREEMEM +( +xb1 +. +bufãr +); + +211 + `FREEMEM +( +xb2 +. +bufãr +); + +212  +XEQ_ROUND_TRIP_FAILED +; + +215 + `ASN_STRUCT_FREE +(* +td +, +¥Œ +); + +216 +¥Œ + = 0; + +218 if( +xb1 +. +bufãr_size + !ð +xb2 +.buffer_size + +219 || + `memcmp +( +xb1 +. +bufãr +, +xb2 +.bufãr, xb1. +bufãr_size +) != 0) { + +220 if( +Ýt_debug_¡»am +) { + +221 + `årštf +( +Ýt_debug_¡»am +, + +226 +xb1 +. +bufãr +, +xb2 +.bufãr, +td +-> +Çme +); + +228 + `FREEMEM +( +xb1 +. +bufãr +); + +229 + `FREEMEM +( +xb2 +. +bufãr +); + +230  +XEQ_ROUND_TRIP_FAILED +; + +233 + `FREEMEM +( +xb1 +. +bufãr +); + +234 + `FREEMEM +( +xb2 +. +bufãr +); + +235  +XEQ_SUCCESS +; + +236 + } +} + + @xer_support.c + +7  + ~ + +8  + ~ + +12 + mST_TEXT +, + +13 + mST_TAG_START +, + +14 + mST_TAG_BODY +, + +15 + mST_TAG_QUOTE_WAIT +, + +16 + mST_TAG_QUOTED_STRING +, + +17 + mST_TAG_UNQUOTED_STRING +, + +18 + mST_COMMENT_WAIT_DASH1 +, + +19 + mST_COMMENT_WAIT_DASH2 +, + +20 + mST_COMMENT +, + +21 + mST_COMMENT_CLO_DASH2 +, + +22 + mST_COMMENT_CLO_RT + + +23 } + tp¡©e_e +; + +26 + g_ch¬þass +[256] = { + +36  + #WHITESPACE +( +c +è( +_ch¬þass +[()(c)] =ð1) + + ) + +37  + #ALNUM +( +c +è( +_ch¬þass +[()(c)] >ð2) + + ) + +38  + #ALPHA +( +c +è( +_ch¬þass +[()(c)] =ð3) + + ) + +41  + #EXCLAM + 0x21 + + ) + +42  + #CQUOTE + 0x22 + + ) + +43  + #CDASH + 0x2d + + ) + +44  + #CSLASH + 0x2à + + ) + +45  + #LANGLE + 0x3ø + + ) + +46  + #CEQUAL + 0x3d + + ) + +47  + #RANGLE + 0x3 + + ) + +48  + #CQUEST + 0x3à + + ) + +51  + #TOKEN_CB_CALL +( +ty³ +, +_ns +, +_cu¼’t_too +, +_fš® +) do { \ + +52  +_»t +; \ + +53 +p¡©e_e + +ns + = +_ns +; \ + +54 +ssize_t + +_sz + = ( +p + - +chunk_¡¬t +è+ +_cu¼’t_too +; \ + +55 ià(! +_sz +) { \ + +57 +¡©e + = +_ns +; \ + +60 +_»t + = + `cb +( +ty³ +, +chunk_¡¬t +, +_sz +, +key +); \ + +61 if( +_»t + < +_sz +) { \ + +62 if( +_cu¼’t_too + && +_»t + == -1) \ + +63 +¡©e + = +ns +; \ + +64  +fšish +; \ + +66 +chunk_¡¬t + = +p + + +_cu¼’t_too +; \ + +67 +¡©e + = +ns +; \ + +68 } 0) + + ) + +70  + #TOKEN_CB +( +_ty³ +, +_ns +, +_cu¼’t_too +) \ + +71 + `TOKEN_CB_CALL +( +_ty³ +, +_ns +, +_cu¼’t_too +, 0) + + ) + +73  + #PXML_TAG_FINAL_CHUNK_TYPE + +PXML_TAG_END + + + ) + +74  + #PXML_COMMENT_FINAL_CHUNK_TYPE + +PXML_COMMENT_END + + + ) + +76  + #TOKEN_CB_FINAL +( +_ty³ +, +_ns +, +_cu¼’t_too +) \ + +77 + `TOKEN_CB_CALL +Ð +_ty³ + ## +_FINAL_CHUNK_TYPE + , +_ns +, +_cu¼’t_too +, 1) + + ) + +82 +ssize_t + + $pxml_·r£ +(* +¡©eCڋxt +, cÚ¡ * +xmlbuf +, +size_t + +size +, +pxml_ÿÎback_f + * +cb +, * +key +) { + +83 +p¡©e_e + +¡©e + = (p¡©e_e)* +¡©eCڋxt +; + +84 cÚ¡ * +chunk_¡¬t + = (cÚ¡ *) +xmlbuf +; + +85 cÚ¡ * +p + = +chunk_¡¬t +; + +86 cÚ¡ * +’d + = +p + + +size +; + +88 ; +p + < +’d +;…++) { + +89  +C + = *(cÚ¡ *) +p +; + +90  +¡©e +) { + +91  +ST_TEXT +: + +96 ià( +C + =ð +LANGLE +) + +98 + `TOKEN_CB +( +PXML_TEXT +, +ST_TAG_START +, 0); + +100  +ST_TAG_START +: + +101 ià( + `ALPHA +( +C +è|| (C =ð +CSLASH +)) + +102 +¡©e + = +ST_TAG_BODY +; + +103 ià( +C + =ð +EXCLAM +) + +104 +¡©e + = +ST_COMMENT_WAIT_DASH1 +; + +110 + `TOKEN_CB +( +PXML_TEXT +, +ST_TEXT +, 1); + +112  +ST_TAG_BODY +: + +113  +C +) { + +114  +RANGLE +: + +116 + `TOKEN_CB_FINAL +( +PXML_TAG +, +ST_TEXT +, 1); + +118  +LANGLE +: + +123 + `TOKEN_CB_FINAL +( +PXML_TAG +, +ST_TAG_START +, 0); + +125  +CEQUAL +: + +126 +¡©e + = +ST_TAG_QUOTE_WAIT +; + +130  +ST_TAG_QUOTE_WAIT +: + +134  +C +) { + +135  +CQUOTE +: + +136 +¡©e + = +ST_TAG_QUOTED_STRING +; + +138  +RANGLE +: + +140 + `TOKEN_CB_FINAL +( +PXML_TAG +, +ST_TEXT +, 1); + +143 if(! + `WHITESPACE +( +C +)) + +145 +¡©e + = +ST_TAG_UNQUOTED_STRING +; + +148  +ST_TAG_QUOTED_STRING +: + +152 if( +C + =ð +CQUOTE +) { + +154 +¡©e + = +ST_TAG_BODY +; + +157  +ST_TAG_UNQUOTED_STRING +: + +158 if( +C + =ð +RANGLE +) { + +160 + `TOKEN_CB_FINAL +( +PXML_TAG +, +ST_TEXT +, 1); + +161 } if( + `WHITESPACE +( +C +)) { + +163 +¡©e + = +ST_TAG_BODY +; + +166  +ST_COMMENT_WAIT_DASH1 +: + +167 if( +C + =ð +CDASH +) { + +168 +¡©e + = +ST_COMMENT_WAIT_DASH2 +; + +171 +¡©e + = +ST_TAG_BODY +; + +174  +ST_COMMENT_WAIT_DASH2 +: + +175 if( +C + =ð +CDASH +) { + +177 +¡©e + = +ST_COMMENT +; + +180 +¡©e + = +ST_TAG_BODY +; + +183  +ST_COMMENT +: + +184 if( +C + =ð +CDASH +) { + +185 +¡©e + = +ST_COMMENT_CLO_DASH2 +; + +188  +ST_COMMENT_CLO_DASH2 +: + +189 if( +C + =ð +CDASH +) { + +190 +¡©e + = +ST_COMMENT_CLO_RT +; + +193 +¡©e + = +ST_COMMENT +; + +196  +ST_COMMENT_CLO_RT +: + +197 if( +C + =ð +RANGLE +) { + +198 + `TOKEN_CB_FINAL +( +PXML_COMMENT +, +ST_TEXT +, 1); + +199 } if( +C + =ð +CDASH +) { + +202 +¡©e + = +ST_COMMENT +; + +211 if( +p + - +chunk_¡¬t +) { + +212  +¡©e +) { + +213  +ST_COMMENT +: + +214 + `TOKEN_CB +( +PXML_COMMENT +, +¡©e +, 0); + +216  +ST_TEXT +: + +217 + `TOKEN_CB +( +PXML_TEXT +, +¡©e +, 0); + +223 +fšish +: + +224 * +¡©eCڋxt + = () +¡©e +; + +225  +chunk_¡¬t + - (cÚ¡ *) +xmlbuf +; + +226 + } +} + + @/usr/include/errno.h + +22 #iâdef +_ERRNO_H + + +23  + #_ERRNO_H + 1 + + ) + +25  + ~<ã©u»s.h +> + +28  + ~ + +32 #iâdeà +__ASSEMBLER__ + + +34 +__BEGIN_DECLS + + +37 * + $__”ºo_loÿtiÚ + (è +__THROW + +__©Œibu‹_cÚ¡__ +; + +38  + #”ºo + (* + `__”ºo_loÿtiÚ + ()) + + ) + +40 #ifdeà +__USE_GNU + + +45 * +´og¿m_švoÿtiÚ_Çme +; + +46 * +´og¿m_švoÿtiÚ_shÜt_Çme +; + +50 #iâdeà +__”rÜ_t_defšed + + +51  + #__”rÜ_t_defšed + 1 + + ) + +52  + t”rÜ_t +; + +57 +__END_DECLS + + + @/usr/include/math.h + +23 #iâdef +_MATH_H + + +24  + #_MATH_H + 1 + + ) + +26  + #__GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION + + + ) + +27  + ~ + +29 #ià +defšed + +log + && defšed +__GNUC__ + + +30 #w¬nšg +A + +maüo + +ÿÎed + +log + +was + +®»ady + +defšed + +wh’ + < +m©h +. +h +> wa  +šþuded +. + +31 #w¬nšg +This + +wžl + +ÿu£ + +compž©iÚ + +´obËms +. + +34 + g__BEGIN_DECLS + + +37  + ~ + +40  + ~ + +43  + ~ + +47 #ià +__GNUC_PREREQ + (3, 3) + +48  + #HUGE_VAL + ( + `__bužtš_huge_v® + ()) + + ) + +55  + #HUGE_VAL + 1e10000 + + ) + +57 #ifdeà +__USE_ISOC99 + + +58 #ià +__GNUC_PREREQ + (3, 3) + +59  + #HUGE_VALF + ( + `__bužtš_huge_v®f + ()) + + ) + +60  + #HUGE_VALL + ( + `__bužtš_huge_v®l + ()) + + ) + +62  + #HUGE_VALF + 1e10000f + + ) + +63  + #HUGE_VALL + 1e10000L + + ) + +66 #ià +__HAVE_FLOAT16 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +67  + #HUGE_VAL_F16 + ( + `__bužtš_huge_v®f16 + ()) + + ) + +69 #ià +__HAVE_FLOAT32 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +70  + #HUGE_VAL_F32 + ( + `__bužtš_huge_v®f32 + ()) + + ) + +72 #ià +__HAVE_FLOAT64 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +73  + #HUGE_VAL_F64 + ( + `__bužtš_huge_v®f64 + ()) + + ) + +75 #ià +__HAVE_FLOAT128 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +76  + #HUGE_VAL_F128 + ( + `__bužtš_huge_v®f128 + ()) + + ) + +78 #ià +__HAVE_FLOAT32X + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +79  + #HUGE_VAL_F32X + ( + `__bužtš_huge_v®f32x + ()) + + ) + +81 #ià +__HAVE_FLOAT64X + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +82  + #HUGE_VAL_F64X + ( + `__bužtš_huge_v®f64x + ()) + + ) + +84 #ià +__HAVE_FLOAT128X + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +85  + #HUGE_VAL_F128X + ( + `__bužtš_huge_v®f128x + ()) + + ) + +88 #ifdeà +__USE_ISOC99 + + +90 #ià +__GNUC_PREREQ + (3, 3) + +91  + #INFINITY + ( + `__bužtš_šff + ()) + + ) + +93  + #INFINITY + +HUGE_VALF + + + ) + +97 #ià +__GNUC_PREREQ + (3, 3) + +98  + #NAN + ( + `__bužtš_Çnf + ("")) + + ) + +103  + #NAN + (0.0à/ 0.0f) + + ) + +107 #ià +__GLIBC_USE + ( +IEC_60559_BFP_EXT +) + +109 #ià +__GNUC_PREREQ + (3, 3) + +110  + #SNANF + ( + `__bužtš_Çnsf + ("")) + + ) + +111  + #SNAN + ( + `__bužtš_Çns + ("")) + + ) + +112  + #SNANL + ( + `__bužtš_Çn¦ + ("")) + + ) + +115 #ià +__HAVE_FLOAT16 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +116  + #SNANF16 + ( + `__bužtš_Çnsf16 + ("")) + + ) + +118 #ià +__HAVE_FLOAT32 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +119  + #SNANF32 + ( + `__bužtš_Çnsf32 + ("")) + + ) + +121 #ià +__HAVE_FLOAT64 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +122  + #SNANF64 + ( + `__bužtš_Çnsf64 + ("")) + + ) + +124 #ià +__HAVE_FLOAT128 + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +125  + #SNANF128 + ( + `__bužtš_Çnsf128 + ("")) + + ) + +127 #ià +__HAVE_FLOAT32X + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +128  + #SNANF32X + ( + `__bužtš_Çnsf32x + ("")) + + ) + +130 #ià +__HAVE_FLOAT64X + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +131  + #SNANF64X + ( + `__bužtš_Çnsf64x + ("")) + + ) + +133 #ià +__HAVE_FLOAT128X + && +__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +134  + #SNANF128X + ( + `__bužtš_Çnsf128x + ("")) + + ) + +138  + ~ + +140 #ifdeà +__USE_ISOC99 + + +148 #ià +__GLIBC_FLT_EVAL_METHOD + == 0 || __GLIBC_FLT_EVAL_METHOD == 16 + +149  + tæßt_t +; + +150  + tdoubË_t +; + +151 #–ià +__GLIBC_FLT_EVAL_METHOD + == 1 + +152  + tæßt_t +; + +153  + tdoubË_t +; + +154 #–ià +__GLIBC_FLT_EVAL_METHOD + == 2 + +155  + tæßt_t +; + +156  + tdoubË_t +; + +157 #–ià +__GLIBC_FLT_EVAL_METHOD + == 32 + +158  +_Flßt32 + + tæßt_t +; + +159  + tdoubË_t +; + +160 #–ià +__GLIBC_FLT_EVAL_METHOD + == 33 + +161  +_Flßt32x + + tæßt_t +; + +162  +_Flßt32x + + tdoubË_t +; + +163 #–ià +__GLIBC_FLT_EVAL_METHOD + == 64 + +164  +_Flßt64 + + tæßt_t +; + +165  +_Flßt64 + + tdoubË_t +; + +166 #–ià +__GLIBC_FLT_EVAL_METHOD + == 65 + +167  +_Flßt64x + + tæßt_t +; + +168  +_Flßt64x + + tdoubË_t +; + +169 #–ià +__GLIBC_FLT_EVAL_METHOD + == 128 + +170  +_Flßt128 + + tæßt_t +; + +171  +_Flßt128 + + tdoubË_t +; + +172 #–ià +__GLIBC_FLT_EVAL_METHOD + == 129 + +173  +_Flßt128x + + tæßt_t +; + +174  +_Flßt128x + + tdoubË_t +; + +190  + ~ + +191 #ifdeà +__USE_ISOC99 + + +192 #ià +__FP_LOGB0_IS_MIN + + +193  + #FP_ILOGB0 + (-2147483647 - 1) + + ) + +195  + #FP_ILOGB0 + (-2147483647) + + ) + +197 #ià +__FP_LOGBNAN_IS_MIN + + +198  + #FP_ILOGBNAN + (-2147483647 - 1) + + ) + +200  + #FP_ILOGBNAN + 2147483647 + + ) + +203 #ià +__GLIBC_USE + ( +IEC_60559_BFP_EXT +) + +204 #ià +__WORDSIZE + == 32 + +205  + #__FP_LONG_MAX + 0x7fffffffL + + ) + +207  + #__FP_LONG_MAX + 0x7fffffffffffffffL + + ) + +209 #ià +__FP_LOGB0_IS_MIN + + +210  + #FP_LLOGB0 + (- +__FP_LONG_MAX + - 1) + + ) + +212  + #FP_LLOGB0 + (- +__FP_LONG_MAX +) + + ) + +214 #ià +__FP_LOGBNAN_IS_MIN + + +215  + #FP_LLOGBNAN + (- +__FP_LONG_MAX + - 1) + + ) + +217  + #FP_LLOGBNAN + +__FP_LONG_MAX + + + ) + +233  + ~ + +235 #ià +__GLIBC_USE + ( +IEC_60559_BFP_EXT +) + +239 + mFP_INT_UPWARD + = + +240  + #FP_INT_UPWARD + 0 + + ) + +241 +FP_INT_UPWARD +, + +242 + mFP_INT_DOWNWARD + = + +243  + #FP_INT_DOWNWARD + 1 + + ) + +244 +FP_INT_DOWNWARD +, + +245 + mFP_INT_TOWARDZERO + = + +246  + #FP_INT_TOWARDZERO + 2 + + ) + +247 +FP_INT_TOWARDZERO +, + +248 + mFP_INT_TONEARESTFROMZERO + = + +249  + #FP_INT_TONEARESTFROMZERO + 3 + + ) + +250 +FP_INT_TONEARESTFROMZERO +, + +251 + mFP_INT_TONEAREST + = + +252  + #FP_INT_TONEAREST + 4 + + ) + +253 +FP_INT_TONEAREST +, + +262  + #__SIMD_DECL +( +funùiÚ +è + `__CONCAT + ( +__DECL_SIMD_ +, funùiÚ) + + ) + +264  + #__MATHCALL_VEC +( +funùiÚ +, +suffix +, +¬gs +) \ + +265 + `__SIMD_DECL + ( + `__MATH_PRECNAME + ( +funùiÚ +, +suffix +)) \ + +266 + `__MATHCALL + ( +funùiÚ +, +suffix +, +¬gs +) + + ) + +268  + #__MATHDECL_VEC +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +) \ + +269 + `__SIMD_DECL + ( + `__MATH_PRECNAME + ( +funùiÚ +, +suffix +)) \ + +270 + `__MATHDECL +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +) + + ) + +272  + #__MATHCALL +( +funùiÚ +, +suffix +, +¬gs +) \ + +273 + `__MATHDECL + ( +_MdoubË_ +, +funùiÚ +, +suffix +, +¬gs +) + + ) + +274  + #__MATHDECL +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +) \ + +275 + `__MATHDECL_1 +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +); \ + +276 + `__MATHDECL_1 +( +ty³ +, + `__CONCAT +( +__ +, +funùiÚ +), +suffix +, +¬gs +) + + ) + +277  + #__MATHCALLX +( +funùiÚ +, +suffix +, +¬gs +, +©Œib +) \ + +278 + `__MATHDECLX + ( +_MdoubË_ +, +funùiÚ +, +suffix +, +¬gs +, +©Œib +) + + ) + +279  + #__MATHDECLX +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +, +©Œib +) \ + +280 + `__MATHDECL_1 +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +è + `__©Œibu‹__ + ( +©Œib +); \ + +281 + `__MATHDECL_1 +( +ty³ +, + `__CONCAT +( +__ +, +funùiÚ +), +suffix +, +¬gs +è + `__©Œibu‹__ + ( +©Œib +) + + ) + +282  + #__MATHDECL_1 +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +) \ + +283 +ty³ + + `__MATH_PRECNAME +( +funùiÚ +, +suffix +è +¬gs + +__THROW + + + ) + +285  + #_MdoubË_ +  + + ) + +286  + #__MATH_PRECNAME +( +Çme +, +r +è + `__CONCAT +Òame,r) + + ) + +287  + #__MATH_DECLARING_DOUBLE + 1 + + ) + +288  + #__MATH_DECLARING_FLOATN + 0 + + ) + +289  + ~ + +290  + ~ + +291 #undeà +_MdoubË_ + + +292 #undeà +__MATH_PRECNAME + + +293 #undeà +__MATH_DECLARING_DOUBLE + + +294 #undeà +__MATH_DECLARING_FLOATN + + +296 #ifdeà +__USE_ISOC99 + + +302  + #_MdoubË_ +  + + ) + +303  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f +## + ) +r + +304  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +305  + #__MATH_DECLARING_FLOATN + 0 + + ) + +306  + ~ + +307  + ~ + +308 #undeà +_MdoubË_ + + +309 #undeà +__MATH_PRECNAME + + +310 #undeà +__MATH_DECLARING_DOUBLE + + +311 #undeà +__MATH_DECLARING_FLOATN + + +313 #ià!( +defšed + +__NO_LONG_DOUBLE_MATH + && defšed +_LIBC +) \ + +314 || +defšed + +__LDBL_COMPAT + \ + +315 || +defšed + +_LIBC_TEST + + +316 #ifdeà +__LDBL_COMPAT + + +318 #ifdeà +__USE_ISOC99 + + +319  + $__Ædbl_Ãx‰ow¬df + ( +__x +,  +__y +) + +320 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡__ +)); + +321 #ifdeà +__REDIRECT_NTH + + +322  + `__REDIRECT_NTH + ( +Ãx‰ow¬df +, ( +__x +,  +__y +), + +323 +__Ædbl_Ãx‰ow¬df +) + +324 + `__©Œibu‹__ + (( +__cÚ¡__ +)); + +325  + `__REDIRECT_NTH + ( +Ãx‰ow¬d +, ( +__x +,  +__y +), + +326 +Ãxá” +è + `__©Œibu‹__ + (( +__cÚ¡__ +)); + +327  + `__REDIRECT_NTH + ( +Ãx‰ow¬dl +, + +328 ( +__x +,  +__y +), + +329 +Ãxá” +è + `__©Œibu‹__ + (( +__cÚ¡__ +)); + +333 #undeà +__MATHDECL_1 + + +334  + #__MATHDECL_2 +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +, +®Ÿs +) \ + +335 +ty³ + + `__REDIRECT_NTH +( + `__MATH_PRECNAME +( +funùiÚ +, +suffix +), \ + +336 +¬gs +, +®Ÿs +) + + ) + +337  + #__MATHDECL_1 +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +) \ + +338 + `__MATHDECL_2 +( +ty³ +, +funùiÚ +, +suffix +, +¬gs +, + `__CONCAT +(funùiÚ,suffix)) + + ) + +344  + #_MdoubË_ +  + + ) + +345  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +l +## + ) +r + +346  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +347  + #__MATH_DECLARING_FLOATN + 0 + + ) + +348  + #__MATH_DECLARE_LDOUBLE + 1 + + ) + +349  + ~ + +350  + ~ + +351 #undeà +_MdoubË_ + + +352 #undeà +__MATH_PRECNAME + + +353 #undeà +__MATH_DECLARING_DOUBLE + + +354 #undeà +__MATH_DECLARING_FLOATN + + +363 #ià +__HAVE_DISTINCT_FLOAT16 + || ( +__HAVE_FLOAT16 + && ! +defšed + +_LIBC +) + +364  + #_MdoubË_ + +_Flßt16 + + + ) + +365  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f16 +## + ) +r + +366  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +367  + #__MATH_DECLARING_FLOATN + 1 + + ) + +368 #ià +__HAVE_DISTINCT_FLOAT16 + + +369  + ~ + +371 #ià + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +372  + ~ + +374 #undeà +_MdoubË_ + + +375 #undeà +__MATH_PRECNAME + + +376 #undeà +__MATH_DECLARING_DOUBLE + + +377 #undeà +__MATH_DECLARING_FLOATN + + +380 #ià +__HAVE_DISTINCT_FLOAT32 + || ( +__HAVE_FLOAT32 + && ! +defšed + +_LIBC +) + +381  + #_MdoubË_ + +_Flßt32 + + + ) + +382  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f32 +## + ) +r + +383  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +384  + #__MATH_DECLARING_FLOATN + 1 + + ) + +385 #ià +__HAVE_DISTINCT_FLOAT32 + + +386  + ~ + +388 #ià + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +389  + ~ + +391 #undeà +_MdoubË_ + + +392 #undeà +__MATH_PRECNAME + + +393 #undeà +__MATH_DECLARING_DOUBLE + + +394 #undeà +__MATH_DECLARING_FLOATN + + +397 #ià +__HAVE_DISTINCT_FLOAT64 + || ( +__HAVE_FLOAT64 + && ! +defšed + +_LIBC +) + +398  + #_MdoubË_ + +_Flßt64 + + + ) + +399  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f64 +## + ) +r + +400  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +401  + #__MATH_DECLARING_FLOATN + 1 + + ) + +402 #ià +__HAVE_DISTINCT_FLOAT64 + + +403  + ~ + +405 #ià + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +406  + ~ + +408 #undeà +_MdoubË_ + + +409 #undeà +__MATH_PRECNAME + + +410 #undeà +__MATH_DECLARING_DOUBLE + + +411 #undeà +__MATH_DECLARING_FLOATN + + +414 #ià +__HAVE_DISTINCT_FLOAT128 + || ( +__HAVE_FLOAT128 + && ! +defšed + +_LIBC +) + +415  + #_MdoubË_ + +_Flßt128 + + + ) + +416  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f128 +## + ) +r + +417  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +418  + #__MATH_DECLARING_FLOATN + 1 + + ) + +419 #ià +__HAVE_DISTINCT_FLOAT128 + + +420  + ~ + +422 #ià + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +423  + ~ + +425 #undeà +_MdoubË_ + + +426 #undeà +__MATH_PRECNAME + + +427 #undeà +__MATH_DECLARING_DOUBLE + + +428 #undeà +__MATH_DECLARING_FLOATN + + +431 #ià +__HAVE_DISTINCT_FLOAT32X + || ( +__HAVE_FLOAT32X + && ! +defšed + +_LIBC +) + +432  + #_MdoubË_ + +_Flßt32x + + + ) + +433  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f32x +## + ) +r + +434  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +435  + #__MATH_DECLARING_FLOATN + 1 + + ) + +436 #ià +__HAVE_DISTINCT_FLOAT32X + + +437  + ~ + +439 #ià + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +440  + ~ + +442 #undeà +_MdoubË_ + + +443 #undeà +__MATH_PRECNAME + + +444 #undeà +__MATH_DECLARING_DOUBLE + + +445 #undeà +__MATH_DECLARING_FLOATN + + +448 #ià +__HAVE_DISTINCT_FLOAT64X + || ( +__HAVE_FLOAT64X + && ! +defšed + +_LIBC +) + +449  + #_MdoubË_ + +_Flßt64x + + + ) + +450  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f64x +## + ) +r + +451  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +452  + #__MATH_DECLARING_FLOATN + 1 + + ) + +453 #ià +__HAVE_DISTINCT_FLOAT64X + + +454  + ~ + +456 #ià + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +457  + ~ + +459 #undeà +_MdoubË_ + + +460 #undeà +__MATH_PRECNAME + + +461 #undeà +__MATH_DECLARING_DOUBLE + + +462 #undeà +__MATH_DECLARING_FLOATN + + +465 #ià +__HAVE_DISTINCT_FLOAT128X + || ( +__HAVE_FLOAT128X + && ! +defšed + +_LIBC +) + +466  + #_MdoubË_ + +_Flßt128x + + + ) + +467  + #__MATH_PRECNAME +( +Çme +, +r +èÇme## +f128x +## + ) +r + +468  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +469  + #__MATH_DECLARING_FLOATN + 1 + + ) + +470 #ià +__HAVE_DISTINCT_FLOAT128X + + +471  + ~ + +473 #ià + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +474  + ~ + +476 #undeà +_MdoubË_ + + +477 #undeà +__MATH_PRECNAME + + +478 #undeà +__MATH_DECLARING_DOUBLE + + +479 #undeà +__MATH_DECLARING_FLOATN + + +482 #undeà +__MATHDECL_1 + + +483 #undeà +__MATHDECL + + +484 #undeà +__MATHCALL + + +487 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN + + +489  +signgam +; + +492 #ià( +__HAVE_DISTINCT_FLOAT16 + \ + +493 || +__HAVE_DISTINCT_FLOAT32 + \ + +494 || +__HAVE_DISTINCT_FLOAT64 + \ + +495 || +__HAVE_DISTINCT_FLOAT32X + \ + +496 || +__HAVE_DISTINCT_FLOAT64X + \ + +497 || +__HAVE_DISTINCT_FLOAT128X +) + +510 #ifdeà +__NO_LONG_DOUBLE_MATH + + +511 #ià +__HAVE_DISTINCT_FLOAT128 + + +514  + #__MATH_TG +( +TG_ARG +, +FUNC +, +ARGS +) \ + +515 ( ( +TG_ARG +è=ð (è? +FUNC + ## +f + +ARGS + : FUNC ARGS) + + ) + +516 #–ià +__HAVE_DISTINCT_FLOAT128 + + +517 #ià +__HAVE_GENERIC_SELECTION + + +518 #ià +__HAVE_FLOATN_NOT_TYPEDEF + && +__HAVE_FLOAT32 + + +519  + #__MATH_TG_F32 +( +FUNC +, +ARGS +è +_Flßt32 +: FUNC ## +f + ARGS, + + ) + +521  + #__MATH_TG_F32 +( +FUNC +, +ARGS +) + + ) + +523 #ià +__HAVE_FLOATN_NOT_TYPEDEF + && +__HAVE_FLOAT64X + + +524 #ià +__HAVE_FLOAT64X_LONG_DOUBLE + + +525  + #__MATH_TG_F64X +( +FUNC +, +ARGS +è +_Flßt64x +: FUNC ## +l + ARGS, + + ) + +527  + #__MATH_TG_F64X +( +FUNC +, +ARGS +è +_Flßt64x +: FUNC ## +f128 + ARGS, + + ) + +530  + #__MATH_TG_F64X +( +FUNC +, +ARGS +) + + ) + +532  + #__MATH_TG +( +TG_ARG +, +FUNC +, +ARGS +) \ + +533 + `_G’”ic + (( +TG_ARG +), \ + +534 : +FUNC + ## +f + +ARGS +, \ + +535 + `__MATH_TG_F32 + ( +FUNC +, +ARGS +) \ + +536 : +FUNC + +ARGS +, \ + +537 : +FUNC + ## +l + +ARGS +, \ + +538 + `__MATH_TG_F64X + ( +FUNC +, +ARGS +) \ + +539 +_Flßt128 +: +FUNC + ## +f128 + +ARGS +) + + ) + +541 #ià +__HAVE_FLOATN_NOT_TYPEDEF + + +544  + #__MATH_TG +( +TG_ARG +, +FUNC +, +ARGS +) \ + +545 +__bužtš_choo£_ex´ + \ + +546 ( + `__bužtš_ty³s_com·tibË_p + ( + `__ty³of + ( +TG_ARG +), ), \ + +547 +FUNC + ## +f + +ARGS +, \ + +548 +__bužtš_choo£_ex´ + \ + +549 ( + `__bužtš_ty³s_com·tibË_p + ( + `__ty³of + ( +TG_ARG +), ), \ + +550 +FUNC + +ARGS +, \ + +551 +__bužtš_choo£_ex´ + \ + +552 ( + `__bužtš_ty³s_com·tibË_p + ( + `__ty³of + ( +TG_ARG +), ), \ + +553 +FUNC + ## +l + +ARGS +, \ + +554 +FUNC + ## +f128 + +ARGS +))) + + ) + +557  + #__MATH_TG +( +TG_ARG +, +FUNC +, +ARGS +) \ + +558 ( ( +TG_ARG +) ==  () \ + +559 ? +FUNC + ## +f + +ARGS + \ + +560 :  ( +TG_ARG +) ==  () \ + +561 ? +FUNC + +ARGS + \ + +562 : +FUNC + ## +l + +ARGS +) + + ) + +566 #ifdeà +__USE_ISOC99 + + +571 +FP_NAN + = + +572  + #FP_NAN + 0 + + ) + +573 +FP_NAN +, + +574 +FP_INFINITE + = + +575  + #FP_INFINITE + 1 + + ) + +576 +FP_INFINITE +, + +577 +FP_ZERO + = + +578  + #FP_ZERO + 2 + + ) + +579 +FP_ZERO +, + +580 +FP_SUBNORMAL + = + +581  + #FP_SUBNORMAL + 3 + + ) + +582 +FP_SUBNORMAL +, + +583 +FP_NORMAL + = + +584  + #FP_NORMAL + 4 + + ) + +585 +FP_NORMAL + + +593 #ià + `__GNUC_PREREQ + (4,4è&& ! +defšed + +__SUPPORT_SNAN__ + \ + +594 && (! +defšed + +__OPTIMIZE_SIZE__ + || defšed +__ýlu¥lus +) + +601  + #åþassify +( +x +è + `__bužtš_åþassify + ( +FP_NAN +, +FP_INFINITE +, \ + +602 +FP_NORMAL +, +FP_SUBNORMAL +, +FP_ZERO +, +x +) + + ) + +604  + #åþassify +( +x +è + `__MATH_TG + ((x), +__åþassify +, (x)) + + ) + +608 #ià + `__GNUC_PREREQ + (6,0) + +609  + #signb™ +( +x +è + `__bužtš_signb™ + (x) + + ) + +610 #–ià +defšed + +__ýlu¥lus + + +618  + #signb™ +( +x +è + `__bužtš_signb™l + (x) + + ) + +619 #–ià + `__GNUC_PREREQ + (4,0) + +620  + #signb™ +( +x +è + `__MATH_TG + ((x), +__bužtš_signb™ +, (x)) + + ) + +622  + #signb™ +( +x +è + `__MATH_TG + ((x), +__signb™ +, (x)) + + ) + +626 #ià + `__GNUC_PREREQ + (4,4è&& ! +defšed + +__SUPPORT_SNAN__ + + +627  + #isfš™e +( +x +è + `__bužtš_isfš™e + (x) + + ) + +629  + #isfš™e +( +x +è + `__MATH_TG + ((x), +__fš™e +, (x)) + + ) + +633 #ià + `__GNUC_PREREQ + (4,4è&& ! +defšed + +__SUPPORT_SNAN__ + + +634  + #i¢Üm® +( +x +è + `__bužtš_i¢Üm® + (x) + + ) + +636  + #i¢Üm® +( +x +è( + `åþassify + (xè=ð +FP_NORMAL +) + + ) + +641 #ià + `__GNUC_PREREQ + (4,4è&& ! +defšed + +__SUPPORT_SNAN__ + + +642  + #i¢ª +( +x +è + `__bužtš_i¢ª + (x) + + ) + +644  + #i¢ª +( +x +è + `__MATH_TG + ((x), +__i¢ª +, (x)) + + ) + +648 #ià +__HAVE_DISTINCT_FLOAT128 + && ! + `__GNUC_PREREQ + (7,0) \ + +649 && ! +defšed + +__SUPPORT_SNAN__ + && !defšed +__ýlu¥lus + + +655  + #isšf +( +x +) \ + +656 ( + `__bužtš_ty³s_com·tibË_p + ( + `__ty³of + ( +x +), +_Flßt128 +) \ + +657 ? + `__isšff128 + ( +x +è: + `__bužtš_isšf_sign + (x)) + + ) + +658 #–ià + `__GNUC_PREREQ + (4,4è&& ! +defšed + +__SUPPORT_SNAN__ + + +659  + #isšf +( +x +è + `__bužtš_isšf_sign + (x) + + ) + +661  + #isšf +( +x +è + `__MATH_TG + ((x), +__isšf +, (x)) + + ) + +665  + #MATH_ERRNO + 1 + + ) + +666  + #MATH_ERREXCEPT + 2 + + ) + +673 #ifdeà +__FAST_MATH__ + + +674  + #m©h_”rhªdlšg + 0 + + ) + +675 #–ià +defšed + +__NO_MATH_ERRNO__ + + +676  + #m©h_”rhªdlšg + ( +MATH_ERREXCEPT +) + + ) + +678  + #m©h_”rhªdlšg + ( +MATH_ERRNO + | +MATH_ERREXCEPT +) + + ) + +683 #ià + `__GLIBC_USE + ( +IEC_60559_BFP_EXT +) + +684  + ~ + +687 #iâdeà +__ýlu¥lus + + +688  + #issigÇlšg +( +x +è + `__MATH_TG + ((x), +__issigÇlšg +, (x)) + + ) + +697 +šlše +  + `issigÇlšg + ( +__v® +è{  + `__issigÇlšgf + (__val); } + +698 +šlše +  + `issigÇlšg + ( +__v® +è{  + `__issigÇlšg + (__val); } + +699 +šlše +  + +700 + `issigÇlšg + ( +__v® +) + +702 #ifdeà +__NO_LONG_DOUBLE_MATH + + +703  + `__issigÇlšg + ( +__v® +); + +705  + `__issigÇlšgl + ( +__v® +); + +708 #ià +__HAVE_DISTINCT_FLOAT128 + + +709 +šlše +  + `issigÇlšg + ( +_Flßt128 + +__v® +è{  + `__issigÇlšgf128 + (__val); } + +711 + } +} + +715  + #issubnÜm® +( +x +è( + `åþassify + (xè=ð +FP_SUBNORMAL +) + + ) + +718 #iâdeà +__ýlu¥lus + + +719 #ifdeà +__SUPPORT_SNAN__ + + +720  + #isz”o +( +x +è( + `åþassify + (xè=ð +FP_ZERO +) + + ) + +722  + #isz”o +( +x +è((( + `__ty³of + (x)è(x)è=ð0) + + ) + +726 #ifdeà +__SUPPORT_SNAN__ + + +727 +šlše +  + +728 +isz”o + ( +__v® +) + +730  +__åþassifyf + ( +__v® +è=ð +FP_ZERO +; + +732 +šlše +  + +733 +isz”o + ( +__v® +) + +735  +__åþassify + ( +__v® +è=ð +FP_ZERO +; + +737 +šlše +  + +738 +isz”o + ( +__v® +) + +740 #ifdeà +__NO_LONG_DOUBLE_MATH + + +741  +__åþassify + ( +__v® +è=ð +FP_ZERO +; + +743  +__åþassifyl + ( +__v® +è=ð +FP_ZERO +; + +746 #ià +__HAVE_DISTINCT_FLOAT128 + + +747 +šlše +  + +748 +isz”o + ( +_Flßt128 + +__v® +) + +750  +__åþassifyf128 + ( +__v® +è=ð +FP_ZERO +; + +754 +‹m¶©e + < +þass + +__T +> +šlše + +boÞ + + +755 +isz”o + ( +__T + +__v® +) + +757  +__v® + == 0; + +764 #ifdeà +__USE_XOPEN + + +766  + #MAXFLOAT + 3.40282347e+38F + + ) + +771 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN + + +772  + #M_E + 2.7182818284590452354 + + ) + +773  + #M_LOG2E + 1.4426950408889634074 + + ) + +774  + #M_LOG10E + 0.43429448190325182765 + + ) + +775  + #M_LN2 + 0.69314718055994530942 + + ) + +776  + #M_LN10 + 2.30258509299404568402 + + ) + +777  + #M_PI + 3.14159265358979323846 + + ) + +778  + #M_PI_2 + 1.57079632679489661923 + + ) + +779  + #M_PI_4 + 0.78539816339744830962 + + ) + +780  + #M_1_PI + 0.31830988618379067154 + + ) + +781  + #M_2_PI + 0.63661977236758134308 + + ) + +782  + #M_2_SQRTPI + 1.12837916709551257390 + + ) + +783  + #M_SQRT2 + 1.41421356237309504880 + + ) + +784  + #M_SQRT1_2 + 0.70710678118654752440 + + ) + +790 #ifdeà +__USE_GNU + + +791  + #M_El + 2.718281828459045235360287471352662498L + + ) + +792  + #M_LOG2El + 1.442695040888963407359924681001892137L + + ) + +793  + #M_LOG10El + 0.434294481903251827651128918916605082L + + ) + +794  + #M_LN2l + 0.693147180559945309417232121458176568L + + ) + +795  + #M_LN10l + 2.302585092994045684017991454684364208L + + ) + +796  + #M_PIl + 3.141592653589793238462643383279502884L + + ) + +797  + #M_PI_2l + 1.570796326794896619231321691639751442L + + ) + +798  + #M_PI_4l + 0.785398163397448309615660845819875721L + + ) + +799  + #M_1_PIl + 0.318309886183790671537767526745028724L + + ) + +800  + #M_2_PIl + 0.636619772367581343075535053490057448L + + ) + +801  + #M_2_SQRTPIl + 1.128379167095512573896158903121545172L + + ) + +802  + #M_SQRT2l + 1.414213562373095048801688724209698079L + + ) + +803  + #M_SQRT1_2l + 0.707106781186547524400844362104849039L + + ) + +806 #ià +__HAVE_FLOAT16 + && +defšed + +__USE_GNU + + +807  + #M_Ef16 + + `__f16 + (2.718281828459045235360287471352662498è + + ) + +808  + #M_LOG2Ef16 + + `__f16 + (1.442695040888963407359924681001892137è + + ) + +809  + #M_LOG10Ef16 + + `__f16 + (0.434294481903251827651128918916605082è + + ) + +810  + #M_LN2f16 + + `__f16 + (0.693147180559945309417232121458176568è + + ) + +811  + #M_LN10f16 + + `__f16 + (2.302585092994045684017991454684364208è + + ) + +812  + #M_PIf16 + + `__f16 + (3.141592653589793238462643383279502884è + + ) + +813  + #M_PI_2f16 + + `__f16 + (1.570796326794896619231321691639751442è + + ) + +814  + #M_PI_4f16 + + `__f16 + (0.785398163397448309615660845819875721è + + ) + +815  + #M_1_PIf16 + + `__f16 + (0.318309886183790671537767526745028724è + + ) + +816  + #M_2_PIf16 + + `__f16 + (0.636619772367581343075535053490057448è + + ) + +817  + #M_2_SQRTPIf16 + + `__f16 + (1.128379167095512573896158903121545172è + + ) + +818  + #M_SQRT2f16 + + `__f16 + (1.414213562373095048801688724209698079è + + ) + +819  + #M_SQRT1_2f16 + + `__f16 + (0.707106781186547524400844362104849039è + + ) + +822 #ià +__HAVE_FLOAT32 + && +defšed + +__USE_GNU + + +823  + #M_Ef32 + + `__f32 + (2.718281828459045235360287471352662498è + + ) + +824  + #M_LOG2Ef32 + + `__f32 + (1.442695040888963407359924681001892137è + + ) + +825  + #M_LOG10Ef32 + + `__f32 + (0.434294481903251827651128918916605082è + + ) + +826  + #M_LN2f32 + + `__f32 + (0.693147180559945309417232121458176568è + + ) + +827  + #M_LN10f32 + + `__f32 + (2.302585092994045684017991454684364208è + + ) + +828  + #M_PIf32 + + `__f32 + (3.141592653589793238462643383279502884è + + ) + +829  + #M_PI_2f32 + + `__f32 + (1.570796326794896619231321691639751442è + + ) + +830  + #M_PI_4f32 + + `__f32 + (0.785398163397448309615660845819875721è + + ) + +831  + #M_1_PIf32 + + `__f32 + (0.318309886183790671537767526745028724è + + ) + +832  + #M_2_PIf32 + + `__f32 + (0.636619772367581343075535053490057448è + + ) + +833  + #M_2_SQRTPIf32 + + `__f32 + (1.128379167095512573896158903121545172è + + ) + +834  + #M_SQRT2f32 + + `__f32 + (1.414213562373095048801688724209698079è + + ) + +835  + #M_SQRT1_2f32 + + `__f32 + (0.707106781186547524400844362104849039è + + ) + +838 #ià +__HAVE_FLOAT64 + && +defšed + +__USE_GNU + + +839  + #M_Ef64 + + `__f64 + (2.718281828459045235360287471352662498è + + ) + +840  + #M_LOG2Ef64 + + `__f64 + (1.442695040888963407359924681001892137è + + ) + +841  + #M_LOG10Ef64 + + `__f64 + (0.434294481903251827651128918916605082è + + ) + +842  + #M_LN2f64 + + `__f64 + (0.693147180559945309417232121458176568è + + ) + +843  + #M_LN10f64 + + `__f64 + (2.302585092994045684017991454684364208è + + ) + +844  + #M_PIf64 + + `__f64 + (3.141592653589793238462643383279502884è + + ) + +845  + #M_PI_2f64 + + `__f64 + (1.570796326794896619231321691639751442è + + ) + +846  + #M_PI_4f64 + + `__f64 + (0.785398163397448309615660845819875721è + + ) + +847  + #M_1_PIf64 + + `__f64 + (0.318309886183790671537767526745028724è + + ) + +848  + #M_2_PIf64 + + `__f64 + (0.636619772367581343075535053490057448è + + ) + +849  + #M_2_SQRTPIf64 + + `__f64 + (1.128379167095512573896158903121545172è + + ) + +850  + #M_SQRT2f64 + + `__f64 + (1.414213562373095048801688724209698079è + + ) + +851  + #M_SQRT1_2f64 + + `__f64 + (0.707106781186547524400844362104849039è + + ) + +854 #ià +__HAVE_FLOAT128 + && +defšed + +__USE_GNU + + +855  + #M_Ef128 + + `__f128 + (2.718281828459045235360287471352662498è + + ) + +856  + #M_LOG2Ef128 + + `__f128 + (1.442695040888963407359924681001892137è + + ) + +857  + #M_LOG10Ef128 + + `__f128 + (0.434294481903251827651128918916605082è + + ) + +858  + #M_LN2f128 + + `__f128 + (0.693147180559945309417232121458176568è + + ) + +859  + #M_LN10f128 + + `__f128 + (2.302585092994045684017991454684364208è + + ) + +860  + #M_PIf128 + + `__f128 + (3.141592653589793238462643383279502884è + + ) + +861  + #M_PI_2f128 + + `__f128 + (1.570796326794896619231321691639751442è + + ) + +862  + #M_PI_4f128 + + `__f128 + (0.785398163397448309615660845819875721è + + ) + +863  + #M_1_PIf128 + + `__f128 + (0.318309886183790671537767526745028724è + + ) + +864  + #M_2_PIf128 + + `__f128 + (0.636619772367581343075535053490057448è + + ) + +865  + #M_2_SQRTPIf128 + + `__f128 + (1.128379167095512573896158903121545172è + + ) + +866  + #M_SQRT2f128 + + `__f128 + (1.414213562373095048801688724209698079è + + ) + +867  + #M_SQRT1_2f128 + + `__f128 + (0.707106781186547524400844362104849039è + + ) + +870 #ià +__HAVE_FLOAT32X + && +defšed + +__USE_GNU + + +871  + #M_Ef32x + + `__f32x + (2.718281828459045235360287471352662498è + + ) + +872  + #M_LOG2Ef32x + + `__f32x + (1.442695040888963407359924681001892137è + + ) + +873  + #M_LOG10Ef32x + + `__f32x + (0.434294481903251827651128918916605082è + + ) + +874  + #M_LN2f32x + + `__f32x + (0.693147180559945309417232121458176568è + + ) + +875  + #M_LN10f32x + + `__f32x + (2.302585092994045684017991454684364208è + + ) + +876  + #M_PIf32x + + `__f32x + (3.141592653589793238462643383279502884è + + ) + +877  + #M_PI_2f32x + + `__f32x + (1.570796326794896619231321691639751442è + + ) + +878  + #M_PI_4f32x + + `__f32x + (0.785398163397448309615660845819875721è + + ) + +879  + #M_1_PIf32x + + `__f32x + (0.318309886183790671537767526745028724è + + ) + +880  + #M_2_PIf32x + + `__f32x + (0.636619772367581343075535053490057448è + + ) + +881  + #M_2_SQRTPIf32x + + `__f32x + (1.128379167095512573896158903121545172è + + ) + +882  + #M_SQRT2f32x + + `__f32x + (1.414213562373095048801688724209698079è + + ) + +883  + #M_SQRT1_2f32x + + `__f32x + (0.707106781186547524400844362104849039è + + ) + +886 #ià +__HAVE_FLOAT64X + && +defšed + +__USE_GNU + + +887  + #M_Ef64x + + `__f64x + (2.718281828459045235360287471352662498è + + ) + +888  + #M_LOG2Ef64x + + `__f64x + (1.442695040888963407359924681001892137è + + ) + +889  + #M_LOG10Ef64x + + `__f64x + (0.434294481903251827651128918916605082è + + ) + +890  + #M_LN2f64x + + `__f64x + (0.693147180559945309417232121458176568è + + ) + +891  + #M_LN10f64x + + `__f64x + (2.302585092994045684017991454684364208è + + ) + +892  + #M_PIf64x + + `__f64x + (3.141592653589793238462643383279502884è + + ) + +893  + #M_PI_2f64x + + `__f64x + (1.570796326794896619231321691639751442è + + ) + +894  + #M_PI_4f64x + + `__f64x + (0.785398163397448309615660845819875721è + + ) + +895  + #M_1_PIf64x + + `__f64x + (0.318309886183790671537767526745028724è + + ) + +896  + #M_2_PIf64x + + `__f64x + (0.636619772367581343075535053490057448è + + ) + +897  + #M_2_SQRTPIf64x + + `__f64x + (1.128379167095512573896158903121545172è + + ) + +898  + #M_SQRT2f64x + + `__f64x + (1.414213562373095048801688724209698079è + + ) + +899  + #M_SQRT1_2f64x + + `__f64x + (0.707106781186547524400844362104849039è + + ) + +902 #ià +__HAVE_FLOAT128X + && +defšed + +__USE_GNU + + +909 #ià +defšed + +__STRICT_ANSI__ + && !defšed +__NO_MATH_INLINES + + +910  + #__NO_MATH_INLINES + 1 + + ) + +913 #ifdeà +__USE_ISOC99 + + +914 #ià +__GNUC_PREREQ + (3, 1) + +921  + #isg»©” +( +x +, +y +è + `__bužtš_isg»©” +(x, y) + + ) + +922  + #isg»©”equ® +( +x +, +y +è + `__bužtš_isg»©”equ® +(x, y) + + ) + +923  + #i¦ess +( +x +, +y +è + `__bužtš_i¦ess +(x, y) + + ) + +924  + #i¦es£qu® +( +x +, +y +è + `__bužtš_i¦es£qu® +(x, y) + + ) + +925  + #i¦essg»©” +( +x +, +y +è + `__bužtš_i¦essg»©” +(x, y) + + ) + +926  + #isunÜd”ed +( +x +, +y +è + `__bužtš_isunÜd”ed +(x, y) + + ) + +928  + #isg»©” +( +x +, +y +) \ + +929 ( + `__ex‹nsiÚ__ + ({ + `__ty³of__ + ( +x +è +__x + = (x); __ty³of__ ( +y +è +__y + = (y); \ + +930 ! + `isunÜd”ed + ( +__x +, +__y +è&& __x > __y; })) + + ) + +931  + #isg»©”equ® +( +x +, +y +) \ + +932 ( + `__ex‹nsiÚ__ + ({ + `__ty³of__ + ( +x +è +__x + = (x); __ty³of__ ( +y +è +__y + = (y); \ + +933 ! + `isunÜd”ed + ( +__x +, +__y +è&& __x >ð__y; })) + + ) + +934  + #i¦ess +( +x +, +y +) \ + +935 ( + `__ex‹nsiÚ__ + ({ + `__ty³of__ + ( +x +è +__x + = (x); __ty³of__ ( +y +è +__y + = (y); \ + +936 ! + `isunÜd”ed + ( +__x +, +__y +è&& __x < __y; })) + + ) + +937  + #i¦es£qu® +( +x +, +y +) \ + +938 ( + `__ex‹nsiÚ__ + ({ + `__ty³of__ + ( +x +è +__x + = (x); __ty³of__ ( +y +è +__y + = (y); \ + +939 ! + `isunÜd”ed + ( +__x +, +__y +è&& __x <ð__y; })) + + ) + +940  + #i¦essg»©” +( +x +, +y +) \ + +941 ( + `__ex‹nsiÚ__ + ({ + `__ty³of__ + ( +x +è +__x + = (x); __ty³of__ ( +y +è +__y + = (y); \ + +942 ! + `isunÜd”ed + ( +__x +, +__y +è&& __x !ð__y; })) + + ) + +944  + #isunÜd”ed +( +x +, +y +) \ + +945 ( + `__ex‹nsiÚ__ + ({ + `__ty³of__ + ( +x +è +__u + = (x); __ty³of__ ( +y +è +__v + = (y); \ + +946 +__u + !ð +__v + && (__u !ð__u || __v !ð__v); })) + + ) + +951 #ifdeà +__USE_EXTERN_INLINES + + +952  + ~ + +957 #ià +defšed + +__FINITE_MATH_ONLY__ + && __FINITE_MATH_ONLY__ > 0 + +960  + #_MdoubË_ +  + + ) + +961  + #__MATH_DECLARING_DOUBLE + 1 + + ) + +962  + #__MATH_DECLARING_FLOATN + 0 + + ) + +963  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +964 +funùiÚ + ## +»’Œªt + + + ) + +965  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +966 +__ + ## +funùiÚ + ## +»’Œªt + ## +_fš™e + + + ) + +967  + ~ + +968 #undeà +_MdoubË_ + + +969 #undeà +__MATH_DECLARING_DOUBLE + + +970 #undeà +__MATH_DECLARING_FLOATN + + +971 #undeà +__REDIRFROM_X + + +972 #undeà +__REDIRTO_X + + +976 #ifdeà +__USE_ISOC99 + + +979  + #_MdoubË_ +  + + ) + +980  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +981  + #__MATH_DECLARING_FLOATN + 0 + + ) + +982  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +983 +funùiÚ + ## +f + ## +»’Œªt + + + ) + +984  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +985 +__ + ## +funùiÚ + ## +f + ## +»’Œªt + ## +_fš™e + + + ) + +986  + ~ + +987 #undeà +_MdoubË_ + + +988 #undeà +__MATH_DECLARING_DOUBLE + + +989 #undeà +__MATH_DECLARING_FLOATN + + +990 #undeà +__REDIRFROM_X + + +991 #undeà +__REDIRTO_X + + +994 #ifdeà +__MATH_DECLARE_LDOUBLE + + +995  + #_MdoubË_ +  + + ) + +996  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +997  + #__MATH_DECLARING_FLOATN + 0 + + ) + +998  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +999 +funùiÚ + ## +l + ## +»’Œªt + + + ) + +1000 #ifdeà +__NO_LONG_DOUBLE_MATH + + +1001  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1002 +__ + ## +funùiÚ + ## +»’Œªt + ## +_fš™e + + + ) + +1004  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1005 +__ + ## +funùiÚ + ## +l + ## +»’Œªt + ## +_fš™e + + + ) + +1007  + ~ + +1008 #undeà +_MdoubË_ + + +1009 #undeà +__MATH_DECLARING_DOUBLE + + +1010 #undeà +__MATH_DECLARING_FLOATN + + +1011 #undeà +__REDIRFROM_X + + +1012 #undeà +__REDIRTO_X + + +1019 #ià( +__HAVE_DISTINCT_FLOAT16 + || ( +__HAVE_FLOAT16 + && ! +defšed + +_LIBC +)) \ + +1020 && + $__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +1021  + #_MdoubË_ + +_Flßt16 + + + ) + +1022  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +1023  + #__MATH_DECLARING_FLOATN + 1 + + ) + +1024  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +1025 +funùiÚ + ## +f16 + ## +»’Œªt + + + ) + +1026 #ià +__HAVE_DISTINCT_FLOAT16 + + +1027  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1028 +__ + ## +funùiÚ + ## +f16 + ## +»’Œªt + ## +_fš™e + + + ) + +1032  + ~ + +1033 #undeà +_MdoubË_ + + +1034 #undeà +__MATH_DECLARING_DOUBLE + + +1035 #undeà +__MATH_DECLARING_FLOATN + + +1036 #undeà +__REDIRFROM_X + + +1037 #undeà +__REDIRTO_X + + +1040 #ià( +__HAVE_DISTINCT_FLOAT32 + || ( +__HAVE_FLOAT32 + && ! +defšed + +_LIBC +)) \ + +1041 && + $__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +1042  + #_MdoubË_ + +_Flßt32 + + + ) + +1043  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +1044  + #__MATH_DECLARING_FLOATN + 1 + + ) + +1045  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +1046 +funùiÚ + ## +f32 + ## +»’Œªt + + + ) + +1047 #ià +__HAVE_DISTINCT_FLOAT32 + + +1048  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1049 +__ + ## +funùiÚ + ## +f32 + ## +»’Œªt + ## +_fš™e + + + ) + +1051  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1052 +__ + ## +funùiÚ + ## +f + ## +»’Œªt + ## +_fš™e + + + ) + +1054  + ~ + +1055 #undeà +_MdoubË_ + + +1056 #undeà +__MATH_DECLARING_DOUBLE + + +1057 #undeà +__MATH_DECLARING_FLOATN + + +1058 #undeà +__REDIRFROM_X + + +1059 #undeà +__REDIRTO_X + + +1062 #ià( +__HAVE_DISTINCT_FLOAT64 + || ( +__HAVE_FLOAT64 + && ! +defšed + +_LIBC +)) \ + +1063 && + $__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +1064  + #_MdoubË_ + +_Flßt64 + + + ) + +1065  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +1066  + #__MATH_DECLARING_FLOATN + 1 + + ) + +1067  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +1068 +funùiÚ + ## +f64 + ## +»’Œªt + + + ) + +1069 #ià +__HAVE_DISTINCT_FLOAT64 + + +1070  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1071 +__ + ## +funùiÚ + ## +f64 + ## +»’Œªt + ## +_fš™e + + + ) + +1073  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1074 +__ + ## +funùiÚ + ## +»’Œªt + ## +_fš™e + + + ) + +1076  + ~ + +1077 #undeà +_MdoubË_ + + +1078 #undeà +__MATH_DECLARING_DOUBLE + + +1079 #undeà +__MATH_DECLARING_FLOATN + + +1080 #undeà +__REDIRFROM_X + + +1081 #undeà +__REDIRTO_X + + +1084 #ià( +__HAVE_DISTINCT_FLOAT128 + || ( +__HAVE_FLOAT128 + && ! +defšed + +_LIBC +)) \ + +1085 && + $__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +1086  + #_MdoubË_ + +_Flßt128 + + + ) + +1087  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +1088  + #__MATH_DECLARING_FLOATN + 1 + + ) + +1089  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +1090 +funùiÚ + ## +f128 + ## +»’Œªt + + + ) + +1091 #ià +__HAVE_DISTINCT_FLOAT128 + + +1092  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1093 +__ + ## +funùiÚ + ## +f128 + ## +»’Œªt + ## +_fš™e + + + ) + +1095  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1096 +__ + ## +funùiÚ + ## +l + ## +»’Œªt + ## +_fš™e + + + ) + +1098  + ~ + +1099 #undeà +_MdoubË_ + + +1100 #undeà +__MATH_DECLARING_DOUBLE + + +1101 #undeà +__MATH_DECLARING_FLOATN + + +1102 #undeà +__REDIRFROM_X + + +1103 #undeà +__REDIRTO_X + + +1106 #ià( +__HAVE_DISTINCT_FLOAT32X + || ( +__HAVE_FLOAT32X + && ! +defšed + +_LIBC +)) \ + +1107 && + $__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +1108  + #_MdoubË_ + +_Flßt32x + + + ) + +1109  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +1110  + #__MATH_DECLARING_FLOATN + 1 + + ) + +1111  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +1112 +funùiÚ + ## +f32x + ## +»’Œªt + + + ) + +1113 #ià +__HAVE_DISTINCT_FLOAT32X + + +1114  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1115 +__ + ## +funùiÚ + ## +f32x + ## +»’Œªt + ## +_fš™e + + + ) + +1117  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1118 +__ + ## +funùiÚ + ## +»’Œªt + ## +_fš™e + + + ) + +1120  + ~ + +1121 #undeà +_MdoubË_ + + +1122 #undeà +__MATH_DECLARING_DOUBLE + + +1123 #undeà +__MATH_DECLARING_FLOATN + + +1124 #undeà +__REDIRFROM_X + + +1125 #undeà +__REDIRTO_X + + +1128 #ià( +__HAVE_DISTINCT_FLOAT64X + || ( +__HAVE_FLOAT64X + && ! +defšed + +_LIBC +)) \ + +1129 && + $__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +1130  + #_MdoubË_ + +_Flßt64x + + + ) + +1131  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +1132  + #__MATH_DECLARING_FLOATN + 1 + + ) + +1133  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +1134 +funùiÚ + ## +f64x + ## +»’Œªt + + + ) + +1135 #ià +__HAVE_DISTINCT_FLOAT64X + + +1136  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1137 +__ + ## +funùiÚ + ## +f64x + ## +»’Œªt + ## +_fš™e + + + ) + +1138 #–ià +__HAVE_FLOAT64X_LONG_DOUBLE + + +1139  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1140 +__ + ## +funùiÚ + ## +l + ## +»’Œªt + ## +_fš™e + + + ) + +1142  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1143 +__ + ## +funùiÚ + ## +f128 + ## +»’Œªt + ## +_fš™e + + + ) + +1145  + ~ + +1146 #undeà +_MdoubË_ + + +1147 #undeà +__MATH_DECLARING_DOUBLE + + +1148 #undeà +__MATH_DECLARING_FLOATN + + +1149 #undeà +__REDIRFROM_X + + +1150 #undeà +__REDIRTO_X + + +1153 #ià( +__HAVE_DISTINCT_FLOAT128X + || ( +__HAVE_FLOAT128X + && ! +defšed + +_LIBC +)) \ + +1154 && + $__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +1155  + #_MdoubË_ + +_Flßt128x + + + ) + +1156  + #__MATH_DECLARING_DOUBLE + 0 + + ) + +1157  + #__MATH_DECLARING_FLOATN + 1 + + ) + +1158  + #__REDIRFROM_X +( +funùiÚ +, +»’Œªt +) \ + +1159 +funùiÚ + ## +f128x + ## +»’Œªt + + + ) + +1160 #ià +__HAVE_DISTINCT_FLOAT128X + + +1161  + #__REDIRTO_X +( +funùiÚ +, +»’Œªt +) \ + +1162 +__ + ## +funùiÚ + ## +f128x + ## +»’Œªt + ## +_fš™e + + + ) + +1166  + ~ + +1167 #undeà +_MdoubË_ + + +1168 #undeà +__MATH_DECLARING_DOUBLE + + +1169 #undeà +__MATH_DECLARING_FLOATN + + +1170 #undeà +__REDIRFROM_X + + +1171 #undeà +__REDIRTO_X + + +1176 #ià + `__GLIBC_USE + ( +IEC_60559_BFP_EXT +) + +1179 #ià +__FLT_EVAL_METHOD__ + == 2 || __FLT_EVAL_METHOD__ > 64 + +1180  + #__MATH_EVAL_FMT2 +( +x +, +y +è((xè+ (yè+ 0.0L) + + ) + +1181 #–ià +__FLT_EVAL_METHOD__ + == 1 || __FLT_EVAL_METHOD__ > 32 + +1182  + #__MATH_EVAL_FMT2 +( +x +, +y +è((xè+ (yè+ 0.0) + + ) + +1183 #–ià +__FLT_EVAL_METHOD__ + == 0 || __FLT_EVAL_METHOD__ == 32 + +1184  + #__MATH_EVAL_FMT2 +( +x +, +y +è((xè+ (yè+ 0.0f) + + ) + +1186  + #__MATH_EVAL_FMT2 +( +x +, +y +è((xè+ (y)) + + ) + +1191 #ià! +defšed + +__ýlu¥lus + || (__ýlu¥lu < 201103L && !defšed +__GNUC__ +) + +1192  + #i£qsig +( +x +, +y +) \ + +1193 + `__MATH_TG + ( + `__MATH_EVAL_FMT2 + ( +x +, +y +), +__i£qsig +, ((x), (y))) + + ) + +1206 +‹m¶©e +< +ty³Çme +>  +__i£qsig_ty³ +; + +1208 +‹m¶©e +<>  +__i£qsig_ty³ +<> + +1210  + `__ÿÎ + ( +__x +,  +__y +è + `throw + () + +1212  + `__i£qsigf + ( +__x +, +__y +); + +1216 +‹m¶©e +<>  +__i£qsig_ty³ +<> + +1218  + `__ÿÎ + ( +__x +,  +__y +è + `throw + () + +1220  + `__i£qsig + ( +__x +, +__y +); + +1224 +‹m¶©e +<>  +__i£qsig_ty³ +<> + +1226  + `__ÿÎ + ( +__x +,  +__y +è + `throw + () + +1228 #iâdeà +__NO_LONG_DOUBLE_MATH + + +1229  + `__i£qsigl + ( +__x +, +__y +); + +1231  + `__i£qsig + ( +__x +, +__y +); + +1236 #ià +__HAVE_DISTINCT_FLOAT128 + + +1237 +‹m¶©e +<>  +__i£qsig_ty³ +< +_Flßt128 +> + +1239  + `__ÿÎ + ( +_Flßt128 + +__x +, _Flßt128 +__y +è + `throw + () + +1241  + `__i£qsigf128 + ( +__x +, +__y +); + +1246 +‹m¶©e +< +ty³Çme + +_T1 +,y³Çm +_T2 +> + +1247 +šlše +  + +1248 + `i£qsig + ( +_T1 + +__x +, +_T2 + +__y +è + `throw + () + +1250 #ià +__ýlu¥lus + >= 201103L + +1251  + `deþty³ + ( + t__MATH_EVAL_FMT2 + ( + t__x +, + t__y +)è + t_T3 +; + +1253  + `__ty³of + ( + t__MATH_EVAL_FMT2 + ( + t__x +, + t__y +)è + t_T3 +; + +1255  +__i£qsig_ty³ +< +_T3 +>:: + `__ÿÎ + ( +__x +, +__y +); + +1258 + } +} + +1263 +__END_DECLS + + + @/usr/include/stdio.h + +23 #iâdeà +_STDIO_H + + +24  + #_STDIO_H + 1 + + ) + +26  + #__GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION + + + ) + +27  + ~ + +29 + g__BEGIN_DECLS + + +31  + #__Ãed_size_t + + + ) + +32  + #__Ãed_NULL + + + ) + +33  + ~<¡ddef.h +> + +35  + ~ + +36  + ~ + +37  + ~ + +39  + #_STDIO_USES_IOSTREAM + + + ) + +41  + ~ + +43 #ià +defšed + +__USE_XOPEN + || defšed +__USE_XOPEN2K8 + + +44 #ifdeà +__GNUC__ + + +45 #iâdeà +_VA_LIST_DEFINED + + +46  +_G_va_li¡ + + tva_li¡ +; + +47  + #_VA_LIST_DEFINED + + + ) + +50  + ~<¡d¬g.h +> + +54 #ià +defšed + +__USE_UNIX98 + || defšed +__USE_XOPEN2K + + +55 #iâdeà +__off_t_defšed + + +56 #iâdeà +__USE_FILE_OFFSET64 + + +57  +__off_t + + toff_t +; + +59  +__off64_t + + toff_t +; + +61  + #__off_t_defšed + + + ) + +63 #ià +defšed + +__USE_LARGEFILE64 + && !defšed +__off64_t_defšed + + +64  +__off64_t + + toff64_t +; + +65  + #__off64_t_defšed + + + ) + +69 #ifdeà +__USE_XOPEN2K8 + + +70 #iâdeà +__ssize_t_defšed + + +71  +__ssize_t + + tssize_t +; + +72  + #__ssize_t_defšed + + + ) + +77 #iâdeà +__USE_FILE_OFFSET64 + + +78  +_G_åos_t + + tåos_t +; + +80  +_G_åos64_t + + tåos_t +; + +82 #ifdeà +__USE_LARGEFILE64 + + +83  +_G_åos64_t + + tåos64_t +; + +87  + #_IOFBF + 0 + + ) + +88  + #_IOLBF + 1 + + ) + +89  + #_IONBF + 2 + + ) + +93 #iâdeà +BUFSIZ + + +94  + #BUFSIZ + +_IO_BUFSIZ + + + ) + +100 #iâdeà +EOF + + +101  + #EOF + (-1) + + ) + +107  + #SEEK_SET + 0 + + ) + +108  + #SEEK_CUR + 1 + + ) + +109  + #SEEK_END + 2 + + ) + +110 #ifdeà +__USE_GNU + + +111  + #SEEK_DATA + 3 + + ) + +112  + #SEEK_HOLE + 4 + + ) + +116 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN + + +118  + #P_tmpdœ + "/tmp" + + ) + +131  + ~ + +135  +_IO_FILE + * +¡dš +; + +136  +_IO_FILE + * +¡dout +; + +137  +_IO_FILE + * +¡d”r +; + +139  + #¡dš + +¡dš + + + ) + +140  + #¡dout + +¡dout + + + ) + +141  + #¡d”r + +¡d”r + + + ) + +144  + $»move + (cÚ¡ * +__fž’ame +è +__THROW +; + +146  + $»Çme + (cÚ¡ * +__Þd +, cÚ¡ * +__Ãw +è +__THROW +; + +148 #ifdeà +__USE_ATFILE + + +150  + $»Çm—t + ( +__Þdfd +, cÚ¡ * +__Þd +,  +__Ãwfd +, + +151 cÚ¡ * +__Ãw +è +__THROW +; + +158 #iâdeà +__USE_FILE_OFFSET64 + + +159 +FILE + * + $tmpfže + (è +__wur +; + +161 #ifdeà +__REDIRECT + + +162 +FILE + * + `__REDIRECT + ( +tmpfže +, (), +tmpfže64 +è +__wur +; + +164  + #tmpfže + +tmpfže64 + + + ) + +168 #ifdeà +__USE_LARGEFILE64 + + +169 +FILE + * + $tmpfže64 + (è +__wur +; + +173 * + $tm²am + (* +__s +è +__THROW + +__wur +; + +175 #ifdeà +__USE_MISC + + +178 * + $tm²am_r + (* +__s +è +__THROW + +__wur +; + +182 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN + + +190 * + $‹m²am + (cÚ¡ * +__dœ +, cÚ¡ * +__pfx +) + +191 +__THROW + +__©Œibu‹_m®loc__ + +__wur +; + +199  + `fþo£ + ( +FILE + * +__¡»am +); + +204  + `fæush + ( +FILE + * +__¡»am +); + +206 #ifdeà +__USE_MISC + + +213  + `fæush_uÆocked + ( +FILE + * +__¡»am +); + +216 #ifdeà +__USE_GNU + + +223  + `fþo£®l + (); + +227 #iâdeà +__USE_FILE_OFFSET64 + + +232 +FILE + * + $fݒ + (cÚ¡ * +__»¡riù + +__fž’ame +, + +233 cÚ¡ * +__»¡riù + +__modes +è +__wur +; + +238 +FILE + * + $äeݒ + (cÚ¡ * +__»¡riù + +__fž’ame +, + +239 cÚ¡ * +__»¡riù + +__modes +, + +240 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +242 #ifdeà +__REDIRECT + + +243 +FILE + * + `__REDIRECT + ( +fݒ +, (cÚ¡ * +__»¡riù + +__fž’ame +, + +244 cÚ¡ * +__»¡riù + +__modes +), +fݒ64 +) + +245 +__wur +; + +246 +FILE + * + `__REDIRECT + ( +äeݒ +, (cÚ¡ * +__»¡riù + +__fž’ame +, + +247 cÚ¡ * +__»¡riù + +__modes +, + +248 +FILE + * +__»¡riù + +__¡»am +), +äeݒ64 +) + +249 +__wur +; + +251  + #fݒ + +fݒ64 + + + ) + +252  + #äeݒ + +äeݒ64 + + + ) + +255 #ifdeà +__USE_LARGEFILE64 + + +256 +FILE + * + $fݒ64 + (cÚ¡ * +__»¡riù + +__fž’ame +, + +257 cÚ¡ * +__»¡riù + +__modes +è +__wur +; + +258 +FILE + * + $äeݒ64 + (cÚ¡ * +__»¡riù + +__fž’ame +, + +259 cÚ¡ * +__»¡riù + +__modes +, + +260 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +263 #ifdef +__USE_POSIX + + +265 +FILE + * + $fdݒ + ( +__fd +, cÚ¡ * +__modes +è +__THROW + +__wur +; + +268 #ifdef +__USE_GNU + + +271 +FILE + * + $fݒcook› + (* +__»¡riù + +__magic_cook› +, + +272 cÚ¡ * +__»¡riù + +__modes +, + +273 +_IO_cook›_io_funùiÚs_t + +__io_funcs +è +__THROW + +__wur +; + +276 #ià +defšed + +__USE_XOPEN2K8 + || + `__GLIBC_USE + ( +LIB_EXT2 +) + +278 +FILE + * + $fmemݒ + (* +__s +, +size_t + +__Ën +, cÚ¡ * +__modes +) + +279 +__THROW + +__wur +; + +284 +FILE + * + $ݒ_mem¡»am + (** +__buæoc +, +size_t + * +__siz–oc +è +__THROW + +__wur +; + +290  + $£tbuf + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +è +__THROW +; + +294  + $£tvbuf + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +, + +295  +__modes +, +size_t + +__n +è +__THROW +; + +297 #ifdef +__USE_MISC + + +300  + $£tbufãr + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +, + +301 +size_t + +__size +è +__THROW +; + +304  + $£Žšebuf + ( +FILE + * +__¡»am +è +__THROW +; + +312  + `årštf + ( +FILE + * +__»¡riù + +__¡»am +, + +313 cÚ¡ * +__»¡riù + +__fÜm© +, ...); + +318  + `´štf + (cÚ¡ * +__»¡riù + +__fÜm© +, ...); + +320  + $¥rštf + (* +__»¡riù + +__s +, + +321 cÚ¡ * +__»¡riù + +__fÜm© +, ...è +__THROWNL +; + +327  + `vårštf + ( +FILE + * +__»¡riù + +__s +, cÚ¡ *__»¡riù +__fÜm© +, + +328 +_G_va_li¡ + +__¬g +); + +333  + `v´štf + (cÚ¡ * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +); + +335  + $v¥rštf + (* +__»¡riù + +__s +, cÚ¡ *__»¡riù +__fÜm© +, + +336 +_G_va_li¡ + +__¬g +è +__THROWNL +; + +338 #ià +defšed + +__USE_ISOC99 + || defšed +__USE_UNIX98 + + +340  + $¢´štf + (* +__»¡riù + +__s +, +size_t + +__maxËn +, + +341 cÚ¡ * +__»¡riù + +__fÜm© +, ...) + +342 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 3, 4))); + +344  + $v¢´štf + (* +__»¡riù + +__s +, +size_t + +__maxËn +, + +345 cÚ¡ * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +346 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 3, 0))); + +349 #ià + `__GLIBC_USE + ( +LIB_EXT2 +) + +352  + $va¥rštf + (** +__»¡riù + +__±r +, cÚ¡ *__»¡riù +__f +, + +353 +_G_va_li¡ + +__¬g +) + +354 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 0))è +__wur +; + +355  + $__a¥rštf + (** +__»¡riù + +__±r +, + +356 cÚ¡ * +__»¡riù + +__fmt +, ...) + +357 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 3))è +__wur +; + +358  + $a¥rštf + (** +__»¡riù + +__±r +, + +359 cÚ¡ * +__»¡riù + +__fmt +, ...) + +360 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 3))è +__wur +; + +363 #ifdeà +__USE_XOPEN2K8 + + +365  + $vd´štf + ( +__fd +, cÚ¡ * +__»¡riù + +__fmt +, + +366 +_G_va_li¡ + +__¬g +) + +367 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 0))); + +368  + $d´štf + ( +__fd +, cÚ¡ * +__»¡riù + +__fmt +, ...) + +369 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 3))); + +377  + $fsÿnf + ( +FILE + * +__»¡riù + +__¡»am +, + +378 cÚ¡ * +__»¡riù + +__fÜm© +, ...è +__wur +; + +383  + $sÿnf + (cÚ¡ * +__»¡riù + +__fÜm© +, ...è +__wur +; + +385  + $ssÿnf + (cÚ¡ * +__»¡riù + +__s +, + +386 cÚ¡ * +__»¡riù + +__fÜm© +, ...è +__THROW +; + +388 #ià +defšed + +__USE_ISOC99 + && !defšed +__USE_GNU + \ + +389 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +390 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +391 #ifdeà +__REDIRECT + + +395  + `__REDIRECT + ( +fsÿnf +, ( +FILE + * +__»¡riù + +__¡»am +, + +396 cÚ¡ * +__»¡riù + +__fÜm© +, ...), + +397 +__isoc99_fsÿnf +è +__wur +; + +398  + `__REDIRECT + ( +sÿnf +, (cÚ¡ * +__»¡riù + +__fÜm© +, ...), + +399 +__isoc99_sÿnf +è +__wur +; + +400  + `__REDIRECT_NTH + ( +ssÿnf +, (cÚ¡ * +__»¡riù + +__s +, + +401 cÚ¡ * +__»¡riù + +__fÜm© +, ...), + +402 +__isoc99_ssÿnf +); + +404  + $__isoc99_fsÿnf + ( +FILE + * +__»¡riù + +__¡»am +, + +405 cÚ¡ * +__»¡riù + +__fÜm© +, ...è +__wur +; + +406  + $__isoc99_sÿnf + (cÚ¡ * +__»¡riù + +__fÜm© +, ...è +__wur +; + +407  + $__isoc99_ssÿnf + (cÚ¡ * +__»¡riù + +__s +, + +408 cÚ¡ * +__»¡riù + +__fÜm© +, ...è +__THROW +; + +409  + #fsÿnf + +__isoc99_fsÿnf + + + ) + +410  + #sÿnf + +__isoc99_sÿnf + + + ) + +411  + #ssÿnf + +__isoc99_ssÿnf + + + ) + +415 #ifdef +__USE_ISOC99 + + +420  + $vfsÿnf + ( +FILE + * +__»¡riù + +__s +, cÚ¡ *__»¡riù +__fÜm© +, + +421 +_G_va_li¡ + +__¬g +) + +422 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 2, 0))è +__wur +; + +428  + $vsÿnf + (cÚ¡ * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +429 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 1, 0))è +__wur +; + +432  + $vssÿnf + (cÚ¡ * +__»¡riù + +__s +, + +433 cÚ¡ * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +434 +__THROW + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__sÿnf__ +, 2, 0))); + +436 #ià! +defšed + +__USE_GNU + \ + +437 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +438 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +439 #ifdeà +__REDIRECT + + +443  + `__REDIRECT + ( +vfsÿnf +, + +444 ( +FILE + * +__»¡riù + +__s +, + +445 cÚ¡ * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +), + +446 +__isoc99_vfsÿnf +) + +447 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 2, 0))è +__wur +; + +448  + `__REDIRECT + ( +vsÿnf +, (cÚ¡ * +__»¡riù + +__fÜm© +, + +449 +_G_va_li¡ + +__¬g +), +__isoc99_vsÿnf +) + +450 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 1, 0))è +__wur +; + +451  + `__REDIRECT_NTH + ( +vssÿnf +, + +452 (cÚ¡ * +__»¡riù + +__s +, + +453 cÚ¡ * +__»¡riù + +__fÜm© +, + +454 +_G_va_li¡ + +__¬g +), +__isoc99_vssÿnf +) + +455 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__sÿnf__ +, 2, 0))); + +457  + $__isoc99_vfsÿnf + ( +FILE + * +__»¡riù + +__s +, + +458 cÚ¡ * +__»¡riù + +__fÜm© +, + +459 +_G_va_li¡ + +__¬g +è +__wur +; + +460  + $__isoc99_vsÿnf + (cÚ¡ * +__»¡riù + +__fÜm© +, + +461 +_G_va_li¡ + +__¬g +è +__wur +; + +462  + $__isoc99_vssÿnf + (cÚ¡ * +__»¡riù + +__s +, + +463 cÚ¡ * +__»¡riù + +__fÜm© +, + +464 +_G_va_li¡ + +__¬g +è +__THROW +; + +465  + #vfsÿnf + +__isoc99_vfsÿnf + + + ) + +466  + #vsÿnf + +__isoc99_vsÿnf + + + ) + +467  + #vssÿnf + +__isoc99_vssÿnf + + + ) + +477  + `fg‘c + ( +FILE + * +__¡»am +); + +478  + `g‘c + ( +FILE + * +__¡»am +); + +484  + `g‘ch¬ + (); + +488  + #g‘c +( +_å +è + `_IO_g‘c + (_å) + + ) + +490 #ifdeà +__USE_POSIX199506 + + +495  + `g‘c_uÆocked + ( +FILE + * +__¡»am +); + +496  + `g‘ch¬_uÆocked + (); + +499 #ifdeà +__USE_MISC + + +506  + `fg‘c_uÆocked + ( +FILE + * +__¡»am +); + +517  + `åutc + ( +__c +, +FILE + * +__¡»am +); + +518  + `putc + ( +__c +, +FILE + * +__¡»am +); + +524  + `putch¬ + ( +__c +); + +528  + #putc +( +_ch +, +_å +è + `_IO_putc + (_ch, _å) + + ) + +530 #ifdeà +__USE_MISC + + +537  + `åutc_uÆocked + ( +__c +, +FILE + * +__¡»am +); + +540 #ifdeà +__USE_POSIX199506 + + +545  + `putc_uÆocked + ( +__c +, +FILE + * +__¡»am +); + +546  + `putch¬_uÆocked + ( +__c +); + +550 #ià +defšed + +__USE_MISC + \ + +551 || ( +defšed + +__USE_XOPEN + && !defšed +__USE_XOPEN2K +) + +553  + `g‘w + ( +FILE + * +__¡»am +); + +556  + `putw + ( +__w +, +FILE + * +__¡»am +); + +564 * + $fg‘s + (* +__»¡riù + +__s +,  +__n +, +FILE + *__»¡riù +__¡»am +) + +565 +__wur +; + +567 #ià + `__GLIBC_USE + ( +DEPRECATED_GETS +) + +577 * + $g‘s + (* +__s +è +__wur + +__©Œibu‹_d•»ÿ‹d__ +; + +580 #ifdeà +__USE_GNU + + +587 * + $fg‘s_uÆocked + (* +__»¡riù + +__s +,  +__n +, + +588 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +592 #ià +defšed + +__USE_XOPEN2K8 + || + `__GLIBC_USE + ( +LIB_EXT2 +) + +603 +_IO_ssize_t + + $__g‘d–im + (** +__»¡riù + +__lš•Œ +, + +604 +size_t + * +__»¡riù + +__n +,  +__d–im™” +, + +605 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +606 +_IO_ssize_t + + $g‘d–im + (** +__»¡riù + +__lš•Œ +, + +607 +size_t + * +__»¡riù + +__n +,  +__d–im™” +, + +608 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +616 +_IO_ssize_t + + $g‘lše + (** +__»¡riù + +__lš•Œ +, + +617 +size_t + * +__»¡riù + +__n +, + +618 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +626  + `åuts + (cÚ¡ * +__»¡riù + +__s +, +FILE + *__»¡riù +__¡»am +); + +632  + `puts + (cÚ¡ * +__s +); + +639  + `ung‘c + ( +__c +, +FILE + * +__¡»am +); + +646 +size_t + + $ä—d + (* +__»¡riù + +__±r +, +size_t + +__size +, + +647 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +652 +size_t + + `fwr™e + (cÚ¡ * +__»¡riù + +__±r +, size_ˆ +__size +, + +653 +size_t + +__n +, +FILE + * +__»¡riù + +__s +); + +655 #ifdeà +__USE_GNU + + +662  + `åuts_uÆocked + (cÚ¡ * +__»¡riù + +__s +, + +663 +FILE + * +__»¡riù + +__¡»am +); + +666 #ifdeà +__USE_MISC + + +673 +size_t + + $ä—d_uÆocked + (* +__»¡riù + +__±r +, +size_t + +__size +, + +674 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +675 +size_t + + `fwr™e_uÆocked + (cÚ¡ * +__»¡riù + +__±r +, size_ˆ +__size +, + +676 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +); + +684  + `f£ek + ( +FILE + * +__¡»am +,  +__off +,  +__wh’û +); + +689  + $á–l + ( +FILE + * +__¡»am +è +__wur +; + +694  + `»wšd + ( +FILE + * +__¡»am +); + +701 #ià +defšed + +__USE_LARGEFILE + || defšed +__USE_XOPEN2K + + +702 #iâdeà +__USE_FILE_OFFSET64 + + +707  + `f£eko + ( +FILE + * +__¡»am +, +__off_t + +__off +,  +__wh’û +); + +712 +__off_t + + $á–lo + ( +FILE + * +__¡»am +è +__wur +; + +714 #ifdeà +__REDIRECT + + +715  + `__REDIRECT + ( +f£eko +, + +716 ( +FILE + * +__¡»am +, +__off64_t + +__off +,  +__wh’û +), + +717 +f£eko64 +); + +718 +__off64_t + + `__REDIRECT + ( +á–lo +, ( +FILE + * +__¡»am +), +á–lo64 +); + +720  + #f£eko + +f£eko64 + + + ) + +721  + #á–lo + +á–lo64 + + + ) + +726 #iâdeà +__USE_FILE_OFFSET64 + + +731  + `fg‘pos + ( +FILE + * +__»¡riù + +__¡»am +, +åos_t + *__»¡riù +__pos +); + +736  + `f£os + ( +FILE + * +__¡»am +, cÚ¡ +åos_t + * +__pos +); + +738 #ifdeà +__REDIRECT + + +739  + `__REDIRECT + ( +fg‘pos +, ( +FILE + * +__»¡riù + +__¡»am +, + +740 +åos_t + * +__»¡riù + +__pos +), +fg‘pos64 +); + +741  + `__REDIRECT + ( +f£os +, + +742 ( +FILE + * +__¡»am +, cÚ¡ +åos_t + * +__pos +), +f£os64 +); + +744  + #fg‘pos + +fg‘pos64 + + + ) + +745  + #f£os + +f£os64 + + + ) + +749 #ifdeà +__USE_LARGEFILE64 + + +750  + `f£eko64 + ( +FILE + * +__¡»am +, +__off64_t + +__off +,  +__wh’û +); + +751 +__off64_t + + $á–lo64 + ( +FILE + * +__¡»am +è +__wur +; + +752  + `fg‘pos64 + ( +FILE + * +__»¡riù + +__¡»am +, +åos64_t + *__»¡riù +__pos +); + +753  + `f£os64 + ( +FILE + * +__¡»am +, cÚ¡ +åos64_t + * +__pos +); + +757  + $þ—»¼ + ( +FILE + * +__¡»am +è +__THROW +; + +759  + $ãof + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +761  + $ã¼Ü + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +763 #ifdeà +__USE_MISC + + +765  + $þ—»¼_uÆocked + ( +FILE + * +__¡»am +è +__THROW +; + +766  + $ãof_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +767  + $ã¼Ü_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +775  + `³¼Ü + (cÚ¡ * +__s +); + +781  + ~ + +784 #ifdef +__USE_POSIX + + +786  + $fž’o + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +789 #ifdeà +__USE_MISC + + +791  + $fž’o_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +795 #ifdeà +__USE_POSIX2 + + +800 +FILE + * + $pݒ + (cÚ¡ * +__commªd +, cÚ¡ * +__modes +è +__wur +; + +806  + `pþo£ + ( +FILE + * +__¡»am +); + +810 #ifdef +__USE_POSIX + + +812 * + $ù”mid + (* +__s +è +__THROW +; + +816 #ià( +defšed + +__USE_XOPEN + && !defšed +__USE_XOPEN2K +è|| defšed +__USE_GNU + + +818 * + `cu£rid + (* +__s +); + +822 #ifdef +__USE_GNU + + +823  +ob¡ack +; + +826  + $ob¡ack_´štf + ( +ob¡ack + * +__»¡riù + +__ob¡ack +, + +827 cÚ¡ * +__»¡riù + +__fÜm© +, ...) + +828 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 3))); + +829  + $ob¡ack_v´štf + ( +ob¡ack + * +__»¡riù + +__ob¡ack +, + +830 cÚ¡ * +__»¡riù + +__fÜm© +, + +831 +_G_va_li¡ + +__¬gs +) + +832 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 0))); + +836 #ifdeà +__USE_POSIX199506 + + +840  + $æockfže + ( +FILE + * +__¡»am +è +__THROW +; + +844  + $árylockfže + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +847  + $fuÆockfže + ( +FILE + * +__¡»am +è +__THROW +; + +850 #ià +defšed + +__USE_XOPEN + && !defšed +__USE_XOPEN2K + && !defšed +__USE_GNU + + +853  + ~ + +858 #ifdeà +__USE_EXTERN_INLINES + + +859  + ~ + +861 #ià +__USE_FORTIFY_LEVEL + > 0 && +defšed + +__fÜtify_funùiÚ + + +862  + ~ + +864 #ifdeà +__LDBL_COMPAT + + +865  + ~ + +868 +__END_DECLS + + + @/usr/include/stdlib.h + +22 #iâdef +_STDLIB_H + + +24  + #__GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION + + + ) + +25  + ~ + +28  + #__Ãed_size_t + + + ) + +29  + #__Ãed_wch¬_t + + + ) + +30  + #__Ãed_NULL + + + ) + +31  + ~<¡ddef.h +> + +33 + g__BEGIN_DECLS + + +35  + #_STDLIB_H + 1 + + ) + +37 #ià( +defšed + +__USE_XOPEN + || defšed +__USE_XOPEN2K8 +è&& !defšed +_SYS_WAIT_H + + +39  + ~ + +40  + ~ + +43  + #WEXITSTATUS +( +¡©us +è + `__WEXITSTATUS + (¡©us) + + ) + +44  + #WTERMSIG +( +¡©us +è + `__WTERMSIG + (¡©us) + + ) + +45  + #WSTOPSIG +( +¡©us +è + `__WSTOPSIG + (¡©us) + + ) + +46  + #WIFEXITED +( +¡©us +è + `__WIFEXITED + (¡©us) + + ) + +47  + #WIFSIGNALED +( +¡©us +è + `__WIFSIGNALED + (¡©us) + + ) + +48  + #WIFSTOPPED +( +¡©us +è + `__WIFSTOPPED + (¡©us) + + ) + +49 #ifdeà +__WIFCONTINUED + + +50  + #WIFCONTINUED +( +¡©us +è + `__WIFCONTINUED + (¡©us) + + ) + +55  + ~ + +60  + mquÙ +; + +61  + m»m +; + +62 } + tdiv_t +; + +65 #iâdeà +__ldiv_t_defšed + + +68  + mquÙ +; + +69  + m»m +; + +70 } + tldiv_t +; + +71  + #__ldiv_t_defšed + 1 + + ) + +74 #ià +defšed + +__USE_ISOC99 + && !defšed +__Îdiv_t_defšed + + +76 +__ex‹nsiÚ__ + struct + +78  + mquÙ +; + +79  + m»m +; + +80 } + tÎdiv_t +; + +81  + #__Îdiv_t_defšed + 1 + + ) + +86  + #RAND_MAX + 2147483647 + + ) + +91  + #EXIT_FAILURE + 1 + + ) + +92  + #EXIT_SUCCESS + 0 + + ) + +96  + #MB_CUR_MAX + ( + `__ùy³_g‘_mb_cur_max + ()) + + ) + +97 +size_t + + $__ùy³_g‘_mb_cur_max + (è +__THROW + +__wur +; + +101  + $©of + (cÚ¡ * +__Ō +) + +102 +__THROW + +__©Œibu‹_pu»__ + + `__nÚnuÎ + ((1)è +__wur +; + +104  + $©oi + (cÚ¡ * +__Ō +) + +105 +__THROW + +__©Œibu‹_pu»__ + + `__nÚnuÎ + ((1)è +__wur +; + +107  + $©Þ + (cÚ¡ * +__Ō +) + +108 +__THROW + +__©Œibu‹_pu»__ + + `__nÚnuÎ + ((1)è +__wur +; + +110 #ifdeà +__USE_ISOC99 + + +112 +__ex‹nsiÚ__ +  + $©Þl + (cÚ¡ * +__Ō +) + +113 +__THROW + +__©Œibu‹_pu»__ + + `__nÚnuÎ + ((1)è +__wur +; + +117  + $¡¹od + (cÚ¡ * +__»¡riù + +__Ō +, + +118 ** +__»¡riù + +__’d±r +) + +119 +__THROW + + `__nÚnuÎ + ((1)); + +121 #ifdef +__USE_ISOC99 + + +123  + $¡¹of + (cÚ¡ * +__»¡riù + +__Ō +, + +124 ** +__»¡riù + +__’d±r +è +__THROW + + `__nÚnuÎ + ((1)); + +126  + $¡¹Þd + (cÚ¡ * +__»¡riù + +__Ō +, + +127 ** +__»¡riù + +__’d±r +) + +128 +__THROW + + `__nÚnuÎ + ((1)); + +133 #ià +__HAVE_FLOAT16 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +134 +_Flßt16 + + $¡¹of16 + (cÚ¡ * +__»¡riù + +__Ō +, + +135 ** +__»¡riù + +__’d±r +) + +136 +__THROW + + `__nÚnuÎ + ((1)); + +139 #ià +__HAVE_FLOAT32 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +140 +_Flßt32 + + $¡¹of32 + (cÚ¡ * +__»¡riù + +__Ō +, + +141 ** +__»¡riù + +__’d±r +) + +142 +__THROW + + `__nÚnuÎ + ((1)); + +145 #ià +__HAVE_FLOAT64 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +146 +_Flßt64 + + $¡¹of64 + (cÚ¡ * +__»¡riù + +__Ō +, + +147 ** +__»¡riù + +__’d±r +) + +148 +__THROW + + `__nÚnuÎ + ((1)); + +151 #ià +__HAVE_FLOAT128 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +152 +_Flßt128 + + $¡¹of128 + (cÚ¡ * +__»¡riù + +__Ō +, + +153 ** +__»¡riù + +__’d±r +) + +154 +__THROW + + `__nÚnuÎ + ((1)); + +157 #ià +__HAVE_FLOAT32X + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +158 +_Flßt32x + + $¡¹of32x + (cÚ¡ * +__»¡riù + +__Ō +, + +159 ** +__»¡riù + +__’d±r +) + +160 +__THROW + + `__nÚnuÎ + ((1)); + +163 #ià +__HAVE_FLOAT64X + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +164 +_Flßt64x + + $¡¹of64x + (cÚ¡ * +__»¡riù + +__Ō +, + +165 ** +__»¡riù + +__’d±r +) + +166 +__THROW + + `__nÚnuÎ + ((1)); + +169 #ià +__HAVE_FLOAT128X + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +170 +_Flßt128x + + $¡¹of128x + (cÚ¡ * +__»¡riù + +__Ō +, + +171 ** +__»¡riù + +__’d±r +) + +172 +__THROW + + `__nÚnuÎ + ((1)); + +176  + $¡¹Þ + (cÚ¡ * +__»¡riù + +__Ō +, + +177 ** +__»¡riù + +__’d±r +,  +__ba£ +) + +178 +__THROW + + `__nÚnuÎ + ((1)); + +180  + $¡¹oul + (cÚ¡ * +__»¡riù + +__Ō +, + +181 ** +__»¡riù + +__’d±r +,  +__ba£ +) + +182 +__THROW + + `__nÚnuÎ + ((1)); + +184 #ifdeà +__USE_MISC + + +186 +__ex‹nsiÚ__ + + +187  + $¡¹oq + (cÚ¡ * +__»¡riù + +__Ō +, + +188 ** +__»¡riù + +__’d±r +,  +__ba£ +) + +189 +__THROW + + `__nÚnuÎ + ((1)); + +191 +__ex‹nsiÚ__ + + +192  + $¡¹ouq + (cÚ¡ * +__»¡riù + +__Ō +, + +193 ** +__»¡riù + +__’d±r +,  +__ba£ +) + +194 +__THROW + + `__nÚnuÎ + ((1)); + +197 #ifdeà +__USE_ISOC99 + + +199 +__ex‹nsiÚ__ + + +200  + $¡¹Þl + (cÚ¡ * +__»¡riù + +__Ō +, + +201 ** +__»¡riù + +__’d±r +,  +__ba£ +) + +202 +__THROW + + `__nÚnuÎ + ((1)); + +204 +__ex‹nsiÚ__ + + +205  + $¡¹ouÎ + (cÚ¡ * +__»¡riù + +__Ō +, + +206 ** +__»¡riù + +__’d±r +,  +__ba£ +) + +207 +__THROW + + `__nÚnuÎ + ((1)); + +211 #ià + `__GLIBC_USE + ( +IEC_60559_BFP_EXT +) + +212  + $¡räomd + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +213  +__f +) + +214 +__THROW + + `__nÚnuÎ + ((3)); + +216  + $¡räomf + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +217  +__f +) + +218 +__THROW + + `__nÚnuÎ + ((3)); + +220  + $¡räoml + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +221  +__f +) + +222 +__THROW + + `__nÚnuÎ + ((3)); + +225 #ià +__HAVE_FLOAT16 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +226  + $¡räomf16 + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +227 +_Flßt16 + +__f +) + +228 +__THROW + + `__nÚnuÎ + ((3)); + +231 #ià +__HAVE_FLOAT32 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +232  + $¡räomf32 + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +233 +_Flßt32 + +__f +) + +234 +__THROW + + `__nÚnuÎ + ((3)); + +237 #ià +__HAVE_FLOAT64 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +238  + $¡räomf64 + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +239 +_Flßt64 + +__f +) + +240 +__THROW + + `__nÚnuÎ + ((3)); + +243 #ià +__HAVE_FLOAT128 + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +244  + $¡räomf128 + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +245 +_Flßt128 + +__f +) + +246 +__THROW + + `__nÚnuÎ + ((3)); + +249 #ià +__HAVE_FLOAT32X + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +250  + $¡räomf32x + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +251 +_Flßt32x + +__f +) + +252 +__THROW + + `__nÚnuÎ + ((3)); + +255 #ià +__HAVE_FLOAT64X + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +256  + $¡räomf64x + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +257 +_Flßt64x + +__f +) + +258 +__THROW + + `__nÚnuÎ + ((3)); + +261 #ià +__HAVE_FLOAT128X + && + `__GLIBC_USE + ( +IEC_60559_TYPES_EXT +) + +262  + $¡räomf128x + (* +__de¡ +, +size_t + +__size +, cÚ¡ * +__fÜm© +, + +263 +_Flßt128x + +__f +) + +264 +__THROW + + `__nÚnuÎ + ((3)); + +268 #ifdeà +__USE_GNU + + +272  + ~ + +274  + $¡¹Þ_l + (cÚ¡ * +__»¡riù + +__Ō +, + +275 ** +__»¡riù + +__’d±r +,  +__ba£ +, + +276 +loÿË_t + +__loc +è +__THROW + + `__nÚnuÎ + ((1, 4)); + +278  + $¡¹oul_l + (cÚ¡ * +__»¡riù + +__Ō +, + +279 ** +__»¡riù + +__’d±r +, + +280  +__ba£ +, +loÿË_t + +__loc +) + +281 +__THROW + + `__nÚnuÎ + ((1, 4)); + +283 +__ex‹nsiÚ__ + + +284  + $¡¹Þl_l + (cÚ¡ * +__»¡riù + +__Ō +, + +285 ** +__»¡riù + +__’d±r +,  +__ba£ +, + +286 +loÿË_t + +__loc +) + +287 +__THROW + + `__nÚnuÎ + ((1, 4)); + +289 +__ex‹nsiÚ__ + + +290  + $¡¹ouÎ_l + (cÚ¡ * +__»¡riù + +__Ō +, + +291 ** +__»¡riù + +__’d±r +, + +292  +__ba£ +, +loÿË_t + +__loc +) + +293 +__THROW + + `__nÚnuÎ + ((1, 4)); + +295  + $¡¹od_l + (cÚ¡ * +__»¡riù + +__Ō +, + +296 ** +__»¡riù + +__’d±r +, +loÿË_t + +__loc +) + +297 +__THROW + + `__nÚnuÎ + ((1, 3)); + +299  + $¡¹of_l + (cÚ¡ * +__»¡riù + +__Ō +, + +300 ** +__»¡riù + +__’d±r +, +loÿË_t + +__loc +) + +301 +__THROW + + `__nÚnuÎ + ((1, 3)); + +303  + $¡¹Þd_l + (cÚ¡ * +__»¡riù + +__Ō +, + +304 ** +__»¡riù + +__’d±r +, + +305 +loÿË_t + +__loc +) + +306 +__THROW + + `__nÚnuÎ + ((1, 3)); + +308 #ià +__HAVE_FLOAT16 + + +309 +_Flßt16 + + $¡¹of16_l + (cÚ¡ * +__»¡riù + +__Ō +, + +310 ** +__»¡riù + +__’d±r +, + +311 +loÿË_t + +__loc +) + +312 +__THROW + + `__nÚnuÎ + ((1, 3)); + +315 #ià +__HAVE_FLOAT32 + + +316 +_Flßt32 + + $¡¹of32_l + (cÚ¡ * +__»¡riù + +__Ō +, + +317 ** +__»¡riù + +__’d±r +, + +318 +loÿË_t + +__loc +) + +319 +__THROW + + `__nÚnuÎ + ((1, 3)); + +322 #ià +__HAVE_FLOAT64 + + +323 +_Flßt64 + + $¡¹of64_l + (cÚ¡ * +__»¡riù + +__Ō +, + +324 ** +__»¡riù + +__’d±r +, + +325 +loÿË_t + +__loc +) + +326 +__THROW + + `__nÚnuÎ + ((1, 3)); + +329 #ià +__HAVE_FLOAT128 + + +330 +_Flßt128 + + $¡¹of128_l + (cÚ¡ * +__»¡riù + +__Ō +, + +331 ** +__»¡riù + +__’d±r +, + +332 +loÿË_t + +__loc +) + +333 +__THROW + + `__nÚnuÎ + ((1, 3)); + +336 #ià +__HAVE_FLOAT32X + + +337 +_Flßt32x + + $¡¹of32x_l + (cÚ¡ * +__»¡riù + +__Ō +, + +338 ** +__»¡riù + +__’d±r +, + +339 +loÿË_t + +__loc +) + +340 +__THROW + + `__nÚnuÎ + ((1, 3)); + +343 #ià +__HAVE_FLOAT64X + + +344 +_Flßt64x + + $¡¹of64x_l + (cÚ¡ * +__»¡riù + +__Ō +, + +345 ** +__»¡riù + +__’d±r +, + +346 +loÿË_t + +__loc +) + +347 +__THROW + + `__nÚnuÎ + ((1, 3)); + +350 #ià +__HAVE_FLOAT128X + + +351 +_Flßt128x + + $¡¹of128x_l + (cÚ¡ * +__»¡riù + +__Ō +, + +352 ** +__»¡riù + +__’d±r +, + +353 +loÿË_t + +__loc +) + +354 +__THROW + + `__nÚnuÎ + ((1, 3)); + +359 #ifdeà +__USE_EXTERN_INLINES + + +360 +__ex‹º_šlše +  + +361 + `__NTH + ( + $©oi + (cÚ¡ * +__Ō +)) + +363  (è + `¡¹Þ + ( +__Ō +, (**è +NULL +, 10); + +364 + } +} + +365 +__ex‹º_šlše +  + +366 +__NTH + ( + $©Þ + (cÚ¡ * +__Ō +)) + +368  + `¡¹Þ + ( +__Ō +, (**è +NULL +, 10); + +369 + } +} + +371 #ifdeà +__USE_ISOC99 + + +372 +__ex‹nsiÚ__ + +__ex‹º_šlše +  + +373 +__NTH + ( + $©Þl + (cÚ¡ * +__Ō +)) + +375  + `¡¹Þl + ( +__Ō +, (**è +NULL +, 10); + +376 + } +} + +381 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN_EXTENDED + + +385 * + $l64a + ( +__n +è +__THROW + +__wur +; + +388  + $a64l + (cÚ¡ * +__s +) + +389 +__THROW + +__©Œibu‹_pu»__ + + `__nÚnuÎ + ((1)è +__wur +; + +393 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN_EXTENDED + + +394  + ~ + +401  + $¿ndom + (è +__THROW +; + +404  + $¤ªdom + ( +__£ed +è +__THROW +; + +410 * + $š™¡©e + ( +__£ed +, * +__¡©ebuf +, + +411 +size_t + +__¡©–’ +è +__THROW + + `__nÚnuÎ + ((2)); + +415 * + $£t¡©e + (* +__¡©ebuf +è +__THROW + + `__nÚnuÎ + ((1)); + +418 #ifdeà +__USE_MISC + + +423  + s¿ndom_d©a + + +425 +št32_t + * +åŒ +; + +426 +št32_t + * +½Œ +; + +427 +št32_t + * +¡©e +; + +428  +¿nd_ty³ +; + +429  +¿nd_deg +; + +430  +¿nd_£p +; + +431 +št32_t + * +’d_±r +; + +434  + $¿ndom_r + ( +¿ndom_d©a + * +__»¡riù + +__buf +, + +435 +št32_t + * +__»¡riù + +__»suÉ +è +__THROW + + `__nÚnuÎ + ((1, 2)); + +437  + $¤ªdom_r + ( +__£ed +,  +¿ndom_d©a + * +__buf +) + +438 +__THROW + + `__nÚnuÎ + ((2)); + +440  + $š™¡©e_r + ( +__£ed +, * +__»¡riù + +__¡©ebuf +, + +441 +size_t + +__¡©–’ +, + +442  +¿ndom_d©a + * +__»¡riù + +__buf +) + +443 +__THROW + + `__nÚnuÎ + ((2, 4)); + +445  + $£t¡©e_r + (* +__»¡riù + +__¡©ebuf +, + +446  +¿ndom_d©a + * +__»¡riù + +__buf +) + +447 +__THROW + + `__nÚnuÎ + ((1, 2)); + +453  + $¿nd + (è +__THROW +; + +455  + $¤ªd + ( +__£ed +è +__THROW +; + +457 #ifdeà +__USE_POSIX199506 + + +459  + $¿nd_r + (* +__£ed +è +__THROW +; + +463 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN + + +467  + $d¿nd48 + (è +__THROW +; + +468  + $”ªd48 + ( +__xsubi +[3]è +__THROW + + `__nÚnuÎ + ((1)); + +471  + $̪d48 + (è +__THROW +; + +472  + $Īd48 + ( +__xsubi +[3]) + +473 +__THROW + + `__nÚnuÎ + ((1)); + +476  + $m¿nd48 + (è +__THROW +; + +477  + $j¿nd48 + ( +__xsubi +[3]) + +478 +__THROW + + `__nÚnuÎ + ((1)); + +481  + $¤ªd48 + ( +__£edv® +è +__THROW +; + +482 * + $£ed48 + ( +__£ed16v +[3]) + +483 +__THROW + + `__nÚnuÎ + ((1)); + +484  + $lcÚg48 + ( +__·¿m +[7]è +__THROW + + `__nÚnuÎ + ((1)); + +486 #ifdeà +__USE_MISC + + +490  + sd¿nd48_d©a + + +492  +__x +[3]; + +493  +__Þd_x +[3]; + +494  +__c +; + +495  +__š™ +; + +496 +__ex‹nsiÚ__ +  +__a +; + +501  + $d¿nd48_r + ( +d¿nd48_d©a + * +__»¡riù + +__bufãr +, + +502 * +__»¡riù + +__»suÉ +è +__THROW + + `__nÚnuÎ + ((1, 2)); + +503  + $”ªd48_r + ( +__xsubi +[3], + +504  +d¿nd48_d©a + * +__»¡riù + +__bufãr +, + +505 * +__»¡riù + +__»suÉ +è +__THROW + + `__nÚnuÎ + ((1, 2)); + +508  + $̪d48_r + ( +d¿nd48_d©a + * +__»¡riù + +__bufãr +, + +509 * +__»¡riù + +__»suÉ +) + +510 +__THROW + + `__nÚnuÎ + ((1, 2)); + +511  + $Īd48_r + ( +__xsubi +[3], + +512  +d¿nd48_d©a + * +__»¡riù + +__bufãr +, + +513 * +__»¡riù + +__»suÉ +) + +514 +__THROW + + `__nÚnuÎ + ((1, 2)); + +517  + $m¿nd48_r + ( +d¿nd48_d©a + * +__»¡riù + +__bufãr +, + +518 * +__»¡riù + +__»suÉ +) + +519 +__THROW + + `__nÚnuÎ + ((1, 2)); + +520  + $j¿nd48_r + ( +__xsubi +[3], + +521  +d¿nd48_d©a + * +__»¡riù + +__bufãr +, + +522 * +__»¡riù + +__»suÉ +) + +523 +__THROW + + `__nÚnuÎ + ((1, 2)); + +526  + $¤ªd48_r + ( +__£edv® +,  +d¿nd48_d©a + * +__bufãr +) + +527 +__THROW + + `__nÚnuÎ + ((2)); + +529  + $£ed48_r + ( +__£ed16v +[3], + +530  +d¿nd48_d©a + * +__bufãr +è +__THROW + + `__nÚnuÎ + ((1, 2)); + +532  + $lcÚg48_r + ( +__·¿m +[7], + +533  +d¿nd48_d©a + * +__bufãr +) + +534 +__THROW + + `__nÚnuÎ + ((1, 2)); + +539 * + $m®loc + ( +size_t + +__size +è +__THROW + +__©Œibu‹_m®loc__ + +__wur +; + +541 * + $ÿÎoc + ( +size_t + +__nmemb +, size_ˆ +__size +) + +542 +__THROW + +__©Œibu‹_m®loc__ + +__wur +; + +549 * + $»®loc + (* +__±r +, +size_t + +__size +) + +550 +__THROW + +__©Œibu‹_w¬n_unu£d_»suÉ__ +; + +552 #ifdeà +__USE_GNU + + +558 * + $»®loÿ¼ay + (* +__±r +, +size_t + +__nmemb +, size_ˆ +__size +) + +559 +__THROW + +__©Œibu‹_w¬n_unu£d_»suÉ__ +; + +563  + $ä“ + (* +__±r +è +__THROW +; + +565 #ifdeà +__USE_MISC + + +566  + ~<®loÿ.h +> + +569 #ià( +defšed + +__USE_XOPEN_EXTENDED + && !defšed +__USE_XOPEN2K +) \ + +570 || +defšed + +__USE_MISC + + +572 * + $v®loc + ( +size_t + +__size +è +__THROW + +__©Œibu‹_m®loc__ + +__wur +; + +575 #ifdeà +__USE_XOPEN2K + + +577  + $posix_mem®ign + (** +__mem±r +, +size_t + +__®ignm’t +, size_ˆ +__size +) + +578 +__THROW + + `__nÚnuÎ + ((1)è +__wur +; + +581 #ifdeà +__USE_ISOC11 + + +583 * + $®igÃd_®loc + ( +size_t + +__®ignm’t +, size_ˆ +__size +) + +584 +__THROW + +__©Œibu‹_m®loc__ + + `__©Œibu‹_®loc_size__ + ((2)è +__wur +; + +588  + $abÜt + (è +__THROW + + `__©Œibu‹__ + (( +__nܑuº__ +)); + +592  + $©ex™ + ((* +__func +è()è +__THROW + + `__nÚnuÎ + ((1)); + +594 #ià +defšed + +__USE_ISOC11 + || defšed +__USE_ISOCXX11 + + +596 #ifdeà +__ýlu¥lus + + +597 "C++"  + $©_quick_ex™ + ((* +__func +) ()) + +598 +__THROW + + `__asm + ("©_quick_ex™"è + `__nÚnuÎ + ((1)); + +600  + $©_quick_ex™ + ((* +__func +è()è +__THROW + + `__nÚnuÎ + ((1)); + +604 #ifdef +__USE_MISC + + +607  + $Ú_ex™ + ((* +__func +è( +__¡©us +, * +__¬g +), *__arg) + +608 +__THROW + + `__nÚnuÎ + ((1)); + +614  + $ex™ + ( +__¡©us +è +__THROW + + `__©Œibu‹__ + (( +__nܑuº__ +)); + +616 #ià +defšed + +__USE_ISOC11 + || defšed +__USE_ISOCXX11 + + +620  + $quick_ex™ + ( +__¡©us +è +__THROW + + `__©Œibu‹__ + (( +__nܑuº__ +)); + +623 #ifdeà +__USE_ISOC99 + + +626  + $_Ex™ + ( +__¡©us +è +__THROW + + `__©Œibu‹__ + (( +__nܑuº__ +)); + +631 * + $g‘’v + (cÚ¡ * +__Çme +è +__THROW + + `__nÚnuÎ + ((1)è +__wur +; + +633 #ifdeà +__USE_GNU + + +636 * + $£cu»_g‘’v + (cÚ¡ * +__Çme +) + +637 +__THROW + + `__nÚnuÎ + ((1)è +__wur +; + +640 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN + + +644  + $pu‹nv + (* +__¡ršg +è +__THROW + + `__nÚnuÎ + ((1)); + +647 #ifdeà +__USE_XOPEN2K + + +650  + $£‹nv + (cÚ¡ * +__Çme +, cÚ¡ * +__v®ue +,  +__»¶aû +) + +651 +__THROW + + `__nÚnuÎ + ((2)); + +654  + $un£‹nv + (cÚ¡ * +__Çme +è +__THROW + + `__nÚnuÎ + ((1)); + +657 #ifdef +__USE_MISC + + +661  + $þ—»nv + (è +__THROW +; + +665 #ià +defšed + +__USE_MISC + \ + +666 || ( +defšed + +__USE_XOPEN_EXTENDED + && !defšed +__USE_XOPEN2K8 +) + +672 * + $mk‹mp + (* +__‹m¶©e +è +__THROW + + `__nÚnuÎ + ((1)); + +675 #ià +defšed + +__USE_XOPEN_EXTENDED + || defšed +__USE_XOPEN2K8 + + +684 #iâdeà +__USE_FILE_OFFSET64 + + +685  + $mk¡emp + (* +__‹m¶©e +è + `__nÚnuÎ + ((1)è +__wur +; + +687 #ifdeà +__REDIRECT + + +688  + `__REDIRECT + ( +mk¡emp +, (* +__‹m¶©e +), +mk¡emp64 +) + +689 + `__nÚnuÎ + ((1)è +__wur +; + +691  + #mk¡emp + +mk¡emp64 + + + ) + +694 #ifdeà +__USE_LARGEFILE64 + + +695  + $mk¡emp64 + (* +__‹m¶©e +è + `__nÚnuÎ + ((1)è +__wur +; + +699 #ifdeà +__USE_MISC + + +706 #iâdeà +__USE_FILE_OFFSET64 + + +707  + $mk¡emps + (* +__‹m¶©e +,  +__suffixËn +è + `__nÚnuÎ + ((1)è +__wur +; + +709 #ifdeà +__REDIRECT + + +710  + `__REDIRECT + ( +mk¡emps +, (* +__‹m¶©e +,  +__suffixËn +), + +711 +mk¡emps64 +è + `__nÚnuÎ + ((1)è +__wur +; + +713  + #mk¡emps + +mk¡emps64 + + + ) + +716 #ifdeà +__USE_LARGEFILE64 + + +717  + $mk¡emps64 + (* +__‹m¶©e +,  +__suffixËn +) + +718 + `__nÚnuÎ + ((1)è +__wur +; + +722 #ifdeà +__USE_XOPEN2K8 + + +728 * + $mkd‹mp + (* +__‹m¶©e +è +__THROW + + `__nÚnuÎ + ((1)è +__wur +; + +731 #ifdeà +__USE_GNU + + +738 #iâdeà +__USE_FILE_OFFSET64 + + +739  + $mko¡emp + (* +__‹m¶©e +,  +__æags +è + `__nÚnuÎ + ((1)è +__wur +; + +741 #ifdeà +__REDIRECT + + +742  + `__REDIRECT + ( +mko¡emp +, (* +__‹m¶©e +,  +__æags +), +mko¡emp64 +) + +743 + `__nÚnuÎ + ((1)è +__wur +; + +745  + #mko¡emp + +mko¡emp64 + + + ) + +748 #ifdeà +__USE_LARGEFILE64 + + +749  + $mko¡emp64 + (* +__‹m¶©e +,  +__æags +è + `__nÚnuÎ + ((1)è +__wur +; + +758 #iâdeà +__USE_FILE_OFFSET64 + + +759  + $mko¡emps + (* +__‹m¶©e +,  +__suffixËn +,  +__æags +) + +760 + `__nÚnuÎ + ((1)è +__wur +; + +762 #ifdeà +__REDIRECT + + +763  + `__REDIRECT + ( +mko¡emps +, (* +__‹m¶©e +,  +__suffixËn +, + +764  +__æags +), +mko¡emps64 +) + +765 + `__nÚnuÎ + ((1)è +__wur +; + +767  + #mko¡emps + +mko¡emps64 + + + ) + +770 #ifdeà +__USE_LARGEFILE64 + + +771  + $mko¡emps64 + (* +__‹m¶©e +,  +__suffixËn +,  +__æags +) + +772 + `__nÚnuÎ + ((1)è +__wur +; + +781  + $sy¡em + (cÚ¡ * +__commªd +è +__wur +; + +784 #ifdef +__USE_GNU + + +787 * + $ÿnÚiÿlize_fže_Çme + (cÚ¡ * +__Çme +) + +788 +__THROW + + `__nÚnuÎ + ((1)è +__wur +; + +791 #ià +defšed + +__USE_MISC + || defšed +__USE_XOPEN_EXTENDED + + +797 * + $»®·th + (cÚ¡ * +__»¡riù + +__Çme +, + +798 * +__»¡riù + +__»sÞved +è +__THROW + +__wur +; + +803 #iâdeà +__COMPAR_FN_T + + +804  + #__COMPAR_FN_T + + + ) + +805 (* + t__com·r_â_t +) (const *, const *); + +807 #ifdef +__USE_GNU + + +808  +__com·r_â_t + + tcom·risÚ_â_t +; + +811 #ifdeà +__USE_GNU + + +812 (* + t__com·r_d_â_t +) (const *, const *, *); + +817 * + $b£¬ch + (cÚ¡ * +__key +, cÚ¡ * +__ba£ +, + +818 +size_t + +__nmemb +, size_ˆ +__size +, +__com·r_â_t + +__com·r +) + +819 + `__nÚnuÎ + ((1, 2, 5)è +__wur +; + +821 #ifdeà +__USE_EXTERN_INLINES + + +822  + ~ + +827  + $qsÜt + (* +__ba£ +, +size_t + +__nmemb +, size_ˆ +__size +, + +828 +__com·r_â_t + +__com·r +è + `__nÚnuÎ + ((1, 4)); + +829 #ifdeà +__USE_GNU + + +830  + $qsÜt_r + (* +__ba£ +, +size_t + +__nmemb +, size_ˆ +__size +, + +831 +__com·r_d_â_t + +__com·r +, * +__¬g +) + +832 + `__nÚnuÎ + ((1, 4)); + +837  + $abs + ( +__x +è +__THROW + + `__©Œibu‹__ + (( +__cÚ¡__ +)è +__wur +; + +838  + $Ïbs + ( +__x +è +__THROW + + `__©Œibu‹__ + (( +__cÚ¡__ +)è +__wur +; + +840 #ifdeà +__USE_ISOC99 + + +841 +__ex‹nsiÚ__ +  + $Îabs + ( +__x +) + +842 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡__ +)è +__wur +; + +849 +div_t + + $div + ( +__num” +,  +__d’om +) + +850 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡__ +)è +__wur +; + +851 +ldiv_t + + $ldiv + ( +__num” +,  +__d’om +) + +852 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡__ +)è +__wur +; + +854 #ifdeà +__USE_ISOC99 + + +855 +__ex‹nsiÚ__ + +Îdiv_t + + $Îdiv + ( +__num” +, + +856  +__d’om +) + +857 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡__ +)è +__wur +; + +861 #ià( +defšed + +__USE_XOPEN_EXTENDED + && !defšed +__USE_XOPEN2K8 +) \ + +862 || +defšed + +__USE_MISC + + +869 * + $ecvt + ( +__v®ue +,  +__ndig™ +, * +__»¡riù + +__deýt +, + +870 * +__»¡riù + +__sign +è +__THROW + + `__nÚnuÎ + ((3, 4)è +__wur +; + +875 * + $fcvt + ( +__v®ue +,  +__ndig™ +, * +__»¡riù + +__deýt +, + +876 * +__»¡riù + +__sign +è +__THROW + + `__nÚnuÎ + ((3, 4)è +__wur +; + +881 * + $gcvt + ( +__v®ue +,  +__ndig™ +, * +__buf +) + +882 +__THROW + + `__nÚnuÎ + ((3)è +__wur +; + +885 #ifdeà +__USE_MISC + + +887 * + $qecvt + ( +__v®ue +,  +__ndig™ +, + +888 * +__»¡riù + +__deýt +, *__»¡riù +__sign +) + +889 +__THROW + + `__nÚnuÎ + ((3, 4)è +__wur +; + +890 * + $qfcvt + ( +__v®ue +,  +__ndig™ +, + +891 * +__»¡riù + +__deýt +, *__»¡riù +__sign +) + +892 +__THROW + + `__nÚnuÎ + ((3, 4)è +__wur +; + +893 * + $qgcvt + ( +__v®ue +,  +__ndig™ +, * +__buf +) + +894 +__THROW + + `__nÚnuÎ + ((3)è +__wur +; + +899  + $ecvt_r + ( +__v®ue +,  +__ndig™ +, * +__»¡riù + +__deýt +, + +900 * +__»¡riù + +__sign +, *__»¡riù +__buf +, + +901 +size_t + +__Ën +è +__THROW + + `__nÚnuÎ + ((3, 4, 5)); + +902  + $fcvt_r + ( +__v®ue +,  +__ndig™ +, * +__»¡riù + +__deýt +, + +903 * +__»¡riù + +__sign +, *__»¡riù +__buf +, + +904 +size_t + +__Ën +è +__THROW + + `__nÚnuÎ + ((3, 4, 5)); + +906  + $qecvt_r + ( +__v®ue +,  +__ndig™ +, + +907 * +__»¡riù + +__deýt +, *__»¡riù +__sign +, + +908 * +__»¡riù + +__buf +, +size_t + +__Ën +) + +909 +__THROW + + `__nÚnuÎ + ((3, 4, 5)); + +910  + $qfcvt_r + ( +__v®ue +,  +__ndig™ +, + +911 * +__»¡riù + +__deýt +, *__»¡riù +__sign +, + +912 * +__»¡riù + +__buf +, +size_t + +__Ën +) + +913 +__THROW + + `__nÚnuÎ + ((3, 4, 5)); + +919  + $mbËn + (cÚ¡ * +__s +, +size_t + +__n +è +__THROW +; + +922  + $mbtowc + ( +wch¬_t + * +__»¡riù + +__pwc +, + +923 cÚ¡ * +__»¡riù + +__s +, +size_t + +__n +è +__THROW +; + +926  + $wùomb + (* +__s +, +wch¬_t + +__wch¬ +è +__THROW +; + +930 +size_t + + $mb¡owcs + ( +wch¬_t + * +__»¡riù + +__pwcs +, + +931 cÚ¡ * +__»¡riù + +__s +, +size_t + +__n +è +__THROW +; + +933 +size_t + + $wc¡ombs + (* +__»¡riù + +__s +, + +934 cÚ¡ +wch¬_t + * +__»¡riù + +__pwcs +, +size_t + +__n +) + +935 +__THROW +; + +938 #ifdeà +__USE_MISC + + +943  + $½m©ch + (cÚ¡ * +__»¥Ú£ +è +__THROW + + `__nÚnuÎ + ((1)è +__wur +; + +947 #ià +defšed + +__USE_XOPEN_EXTENDED + || defšed +__USE_XOPEN2K8 + + +954  + $g‘subÝt + (** +__»¡riù + +__ÝtiÚp +, + +955 *cÚ¡ * +__»¡riù + +__tok’s +, + +956 ** +__»¡riù + +__v®u• +) + +957 +__THROW + + `__nÚnuÎ + ((1, 2, 3)è +__wur +; + +961 #ifdeà +__USE_XOPEN + + +963  + $£tkey + (cÚ¡ * +__key +è +__THROW + + `__nÚnuÎ + ((1)); + +969 #ifdeà +__USE_XOPEN2KXSI + + +971  + $posix_ݒ± + ( +__oæag +è +__wur +; + +974 #ifdeà +__USE_XOPEN_EXTENDED + + +979  + $g¿Á± + ( +__fd +è +__THROW +; + +983  + $uÆock± + ( +__fd +è +__THROW +; + +988 * + $±¢ame + ( +__fd +è +__THROW + +__wur +; + +991 #ifdeà +__USE_GNU + + +995  + $±¢ame_r + ( +__fd +, * +__buf +, +size_t + +__buæ’ +) + +996 +__THROW + + `__nÚnuÎ + ((2)); + +999  + `g‘± + (); + +1002 #ifdeà +__USE_MISC + + +1006  + $g‘lßdavg + ( +__lßdavg +[],  +__ÃËm +) + +1007 +__THROW + + `__nÚnuÎ + ((1)); + +1010 #ià +defšed + +__USE_XOPEN_EXTENDED + && !defšed +__USE_XOPEN2K + + +1013  + $‰y¦Ù + (è +__THROW +; + +1016  + ~ + +1019 #ià +__USE_FORTIFY_LEVEL + > 0 && +defšed + +__fÜtify_funùiÚ + + +1020  + ~ + +1022 #ifdeà +__LDBL_COMPAT + + +1023  + ~ + +1026 +__END_DECLS + + + @/usr/include/alloca.h + +18 #iâdef +_ALLOCA_H + + +19  + #_ALLOCA_H + 1 + + ) + +21  + ~<ã©u»s.h +> + +23  + #__Ãed_size_t + + + ) + +24  + ~<¡ddef.h +> + +26 + g__BEGIN_DECLS + + +29 #undeà +®loÿ + + +32 * + $®loÿ + ( +size_t + +__size +è +__THROW +; + +34 #ifdef +__GNUC__ + + +35  + #®loÿ +( +size +è + `__bužtš_®loÿ + (size) + + ) + +38 +__END_DECLS + + + @/usr/include/features.h + +18 #iâdef +_FEATURES_H + + +19  + #_FEATURES_H + 1 + + ) + +119 #undeà +__USE_ISOC11 + + +120 #undeà +__USE_ISOC99 + + +121 #undeà +__USE_ISOC95 + + +122 #undeà +__USE_ISOCXX11 + + +123 #undeà +__USE_POSIX + + +124 #undeà +__USE_POSIX2 + + +125 #undeà +__USE_POSIX199309 + + +126 #undeà +__USE_POSIX199506 + + +127 #undeà +__USE_XOPEN + + +128 #undeà +__USE_XOPEN_EXTENDED + + +129 #undeà +__USE_UNIX98 + + +130 #undeà +__USE_XOPEN2K + + +131 #undeà +__USE_XOPEN2KXSI + + +132 #undeà +__USE_XOPEN2K8 + + +133 #undeà +__USE_XOPEN2K8XSI + + +134 #undeà +__USE_LARGEFILE + + +135 #undeà +__USE_LARGEFILE64 + + +136 #undeà +__USE_FILE_OFFSET64 + + +137 #undeà +__USE_MISC + + +138 #undeà +__USE_ATFILE + + +139 #undeà +__USE_GNU + + +140 #undeà +__USE_FORTIFY_LEVEL + + +141 #undeà +__KERNEL_STRICT_NAMES + + +142 #undeà +__GLIBC_USE_DEPRECATED_GETS + + +146 #iâdeà +_LOOSE_KERNEL_NAMES + + +147  + #__KERNEL_STRICT_NAMES + + + ) + +157 #ià +defšed + +__GNUC__ + && defšed +__GNUC_MINOR__ + + +158  + #__GNUC_PREREQ +( +maj +, +mš +) \ + +159 (( +__GNUC__ + << 16è+ +__GNUC_MINOR__ + >ð(( +maj +è<< 16è+ ( +mš +)) + + ) + +161  + #__GNUC_PREREQ +( +maj +, +mš +è0 + + ) + +168 #ià +defšed + +__þªg_majÜ__ + && defšed +__þªg_mšÜ__ + + +169  + #__glibc_þªg_´”eq +( +maj +, +mš +) \ + +170 (( +__þªg_majÜ__ + << 16è+ +__þªg_mšÜ__ + >ð(( +maj +è<< 16è+ ( +mš +)) + + ) + +172  + #__glibc_þªg_´”eq +( +maj +, +mš +è0 + + ) + +176  + #__GLIBC_USE +( +F +è +__GLIBC_USE_ + ## + ) +F + +182 #ià( +defšed + +_BSD_SOURCE + || defšed +_SVID_SOURCE +) \ + +183 && ! +defšed + + g_DEFAULT_SOURCE + + +185 #undeà +_DEFAULT_SOURCE + + +186  + #_DEFAULT_SOURCE + 1 + + ) + +190 #ifdeà +_GNU_SOURCE + + +191 #undeà +_ISOC95_SOURCE + + +192  + #_ISOC95_SOURCE + 1 + + ) + +193 #undeà +_ISOC99_SOURCE + + +194  + #_ISOC99_SOURCE + 1 + + ) + +195 #undeà +_ISOC11_SOURCE + + +196  + #_ISOC11_SOURCE + 1 + + ) + +197 #undeà +_POSIX_SOURCE + + +198  + #_POSIX_SOURCE + 1 + + ) + +199 #undeà +_POSIX_C_SOURCE + + +200  + #_POSIX_C_SOURCE + 200809L + + ) + +201 #undeà +_XOPEN_SOURCE + + +202  + #_XOPEN_SOURCE + 700 + + ) + +203 #undeà +_XOPEN_SOURCE_EXTENDED + + +204  + #_XOPEN_SOURCE_EXTENDED + 1 + + ) + +205 #undeà +_LARGEFILE64_SOURCE + + +206  + #_LARGEFILE64_SOURCE + 1 + + ) + +207 #undeà +_DEFAULT_SOURCE + + +208  + #_DEFAULT_SOURCE + 1 + + ) + +209 #undeà +_ATFILE_SOURCE + + +210  + #_ATFILE_SOURCE + 1 + + ) + +215 #ià( +defšed + +_DEFAULT_SOURCE + \ + +216 || (! +defšed + + g__STRICT_ANSI__ + \ + +217 && ! +defšed + + g_ISOC99_SOURCE + \ + +218 && ! +defšed + + g_POSIX_SOURCE + && !defšed + g_POSIX_C_SOURCE + \ + +219 && ! +defšed + + g_XOPEN_SOURCE +)) + +220 #undeà +_DEFAULT_SOURCE + + +221  + #_DEFAULT_SOURCE + 1 + + ) + +225 #ià( +defšed + +_ISOC11_SOURCE + \ + +226 || ( +defšed + + g__STDC_VERSION__ + && __STDC_VERSION__ >= 201112L)) + +227  + #__USE_ISOC11 + 1 + + ) + +231 #ià( +defšed + +_ISOC99_SOURCE + || defšed +_ISOC11_SOURCE + \ + +232 || ( +defšed + +__STDC_VERSION__ + && __STDC_VERSION__ >= 199901L)) + +233  + #__USE_ISOC99 + 1 + + ) + +237 #ià( +defšed + +_ISOC99_SOURCE + || defšed +_ISOC11_SOURCE + \ + +238 || ( +defšed + +__STDC_VERSION__ + && __STDC_VERSION__ >= 199409L)) + +239  + #__USE_ISOC95 + 1 + + ) + +242 #ifdeà +__ýlu¥lus + + +244 #ià +__ýlu¥lus + >= 201703L + +245  + #__USE_ISOC11 + 1 + + ) + +249 #ià +__ýlu¥lus + >ð201103L || +defšed + +__GXX_EXPERIMENTAL_CXX0X__ + + +250  + #__USE_ISOCXX11 + 1 + + ) + +251  + #__USE_ISOC99 + 1 + + ) + +258 #ifdeà +_DEFAULT_SOURCE + + +259 #ià! +defšed + +_POSIX_SOURCE + && !defšed +_POSIX_C_SOURCE + + +260  + #__USE_POSIX_IMPLICITLY + 1 + + ) + +262 #undeà +_POSIX_SOURCE + + +263  + #_POSIX_SOURCE + 1 + + ) + +264 #undeà +_POSIX_C_SOURCE + + +265  + #_POSIX_C_SOURCE + 200809L + + ) + +268 #ià((! +defšed + +__STRICT_ANSI__ + \ + +269 || ( +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) >= 500)) \ + +270 && ! +defšed + +_POSIX_SOURCE + && !defšed +_POSIX_C_SOURCE +) + +271  + #_POSIX_SOURCE + 1 + + ) + +272 #ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 500 + +273  + #_POSIX_C_SOURCE + 2 + + ) + +274 #–ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 600 + +275  + #_POSIX_C_SOURCE + 199506L + + ) + +276 #–ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 700 + +277  + #_POSIX_C_SOURCE + 200112L + + ) + +279  + #_POSIX_C_SOURCE + 200809L + + ) + +281  + #__USE_POSIX_IMPLICITLY + 1 + + ) + +290 #ià((! +defšed + +_POSIX_C_SOURCE + || (_POSIX_C_SOURCE - 0) < 199506L) \ + +291 && ( +defšed + +_REENTRANT + || defšed +_THREAD_SAFE +)) + +292  + #_POSIX_SOURCE + 1 + + ) + +293 #undeà +_POSIX_C_SOURCE + + +294  + #_POSIX_C_SOURCE + 199506L + + ) + +297 #ià( +defšed + +_POSIX_SOURCE + \ + +298 || ( +defšed + +_POSIX_C_SOURCE + && _POSIX_C_SOURCE >= 1) \ + +299 || +defšed + +_XOPEN_SOURCE +) + +300  + #__USE_POSIX + 1 + + ) + +303 #ià +defšed + +_POSIX_C_SOURCE + && _POSIX_C_SOURCE >ð2 || defšed +_XOPEN_SOURCE + + +304  + #__USE_POSIX2 + 1 + + ) + +307 #ià +defšed + +_POSIX_C_SOURCE + && (_POSIX_C_SOURCE - 0) >= 199309L + +308  + #__USE_POSIX199309 + 1 + + ) + +311 #ià +defšed + +_POSIX_C_SOURCE + && (_POSIX_C_SOURCE - 0) >= 199506L + +312  + #__USE_POSIX199506 + 1 + + ) + +315 #ià +defšed + +_POSIX_C_SOURCE + && (_POSIX_C_SOURCE - 0) >= 200112L + +316  + #__USE_XOPEN2K + 1 + + ) + +317 #undeà +__USE_ISOC95 + + +318  + #__USE_ISOC95 + 1 + + ) + +319 #undeà +__USE_ISOC99 + + +320  + #__USE_ISOC99 + 1 + + ) + +323 #ià +defšed + +_POSIX_C_SOURCE + && (_POSIX_C_SOURCE - 0) >= 200809L + +324  + #__USE_XOPEN2K8 + 1 + + ) + +325 #undeà +_ATFILE_SOURCE + + +326  + #_ATFILE_SOURCE + 1 + + ) + +329 #ifdef +_XOPEN_SOURCE + + +330  + #__USE_XOPEN + 1 + + ) + +331 #ià( +_XOPEN_SOURCE + - 0) >= 500 + +332  + #__USE_XOPEN_EXTENDED + 1 + + ) + +333  + #__USE_UNIX98 + 1 + + ) + +334 #undeà +_LARGEFILE_SOURCE + + +335  + #_LARGEFILE_SOURCE + 1 + + ) + +336 #ià( +_XOPEN_SOURCE + - 0) >= 600 + +337 #ià( +_XOPEN_SOURCE + - 0) >= 700 + +338  + #__USE_XOPEN2K8 + 1 + + ) + +339  + #__USE_XOPEN2K8XSI + 1 + + ) + +341  + #__USE_XOPEN2K + 1 + + ) + +342  + #__USE_XOPEN2KXSI + 1 + + ) + +343 #undeà +__USE_ISOC95 + + +344  + #__USE_ISOC95 + 1 + + ) + +345 #undeà +__USE_ISOC99 + + +346  + #__USE_ISOC99 + 1 + + ) + +349 #ifdeà +_XOPEN_SOURCE_EXTENDED + + +350  + #__USE_XOPEN_EXTENDED + 1 + + ) + +355 #ifdeà +_LARGEFILE_SOURCE + + +356  + #__USE_LARGEFILE + 1 + + ) + +359 #ifdeà +_LARGEFILE64_SOURCE + + +360  + #__USE_LARGEFILE64 + 1 + + ) + +363 #ià +defšed + +_FILE_OFFSET_BITS + && _FILE_OFFSET_BITS == 64 + +364  + #__USE_FILE_OFFSET64 + 1 + + ) + +367 #ià +defšed + +_DEFAULT_SOURCE + + +368  + #__USE_MISC + 1 + + ) + +371 #ifdef +_ATFILE_SOURCE + + +372  + #__USE_ATFILE + 1 + + ) + +375 #ifdef +_GNU_SOURCE + + +376  + #__USE_GNU + 1 + + ) + +379 #ià +defšed + +_FORTIFY_SOURCE + && _FORTIFY_SOURCE > 0 \ + +380 && +__GNUC_PREREQ + (4, 1è&& +defšed + + g__OPTIMIZE__ + && __OPTIMIZE__ > 0 + +381 #ià +_FORTIFY_SOURCE + > 1 + +382  + #__USE_FORTIFY_LEVEL + 2 + + ) + +384  + #__USE_FORTIFY_LEVEL + 1 + + ) + +387  + #__USE_FORTIFY_LEVEL + 0 + + ) + +394 #ià +defšed + +__ýlu¥lus + ? __ýlu¥lu >ð201402L : defšed +__USE_ISOC11 + + +395  + #__GLIBC_USE_DEPRECATED_GETS + 0 + + ) + +397  + #__GLIBC_USE_DEPRECATED_GETS + 1 + + ) + +402  + ~<¡dc-´edef.h +> + +410 #undeà +__GNU_LIBRARY__ + + +411  + #__GNU_LIBRARY__ + 6 + + ) + +415  + #__GLIBC__ + 2 + + ) + +416  + #__GLIBC_MINOR__ + 27 + + ) + +418  + #__GLIBC_PREREQ +( +maj +, +mš +) \ + +419 (( +__GLIBC__ + << 16è+ +__GLIBC_MINOR__ + >ð(( +maj +è<< 16è+ ( +mš +)) + + ) + +422 #iâdeà +__ASSEMBLER__ + + +423 #iâdeà +_SYS_CDEFS_H + + +424  + ~ + +429 #ià +defšed + +__USE_FILE_OFFSET64 + && !defšed +__REDIRECT + + +430  + #__USE_LARGEFILE + 1 + + ) + +431  + #__USE_LARGEFILE64 + 1 + + ) + +437 #ià +__GNUC_PREREQ + (2, 7è&& +defšed + +__OPTIMIZE__ + \ + +438 && ! +defšed + + g__OPTIMIZE_SIZE__ + && !defšed + g__NO_INLINE__ + \ + +439 && +defšed + + g__ex‹º_šlše + + +440  + #__USE_EXTERN_INLINES + 1 + + ) + +448  + ~ + + @/usr/include/stdc-predef.h + +18 #iâdef +_STDC_PREDEF_H + + +19  + #_STDC_PREDEF_H + 1 + + ) + +36 #ifdeà +__GCC_IEC_559 + + +37 #ià +__GCC_IEC_559 + > 0 + +38  + #__STDC_IEC_559__ + 1 + + ) + +41  + #__STDC_IEC_559__ + 1 + + ) + +44 #ifdeà +__GCC_IEC_559_COMPLEX + + +45 #ià +__GCC_IEC_559_COMPLEX + > 0 + +46  + #__STDC_IEC_559_COMPLEX__ + 1 + + ) + +49  + #__STDC_IEC_559_COMPLEX__ + 1 + + ) + +58  + #__STDC_ISO_10646__ + 201706L + + ) + +61  + #__STDC_NO_THREADS__ + 1 + + ) + + @ +1 +. +1 +/usr/include +176 +3161 +AMF-UE-NGAP-ID.c +AMFPointer.c +AMFRegionID.c +AMFSetID.c +BIT_STRING.c +BOOLEAN.c +CGI.c +CoreCPID.c +E-UTRA-ARFCN.c +E-UTRA-PCI.c +E-UTRA-TAC.c +E2SM-KPM-ActionDefinition-Format1.c +E2SM-KPM-ActionDefinition-Format2.c +E2SM-KPM-ActionDefinition-Format3.c +E2SM-KPM-ActionDefinition.c +E2SM-KPM-EventTriggerDefinition-Format1.c +E2SM-KPM-EventTriggerDefinition.c +E2SM-KPM-IndicationHeader-Format1.c +E2SM-KPM-IndicationHeader.c +E2SM-KPM-IndicationMessage-Format1.c +E2SM-KPM-IndicationMessage-Format2.c +E2SM-KPM-IndicationMessage.c +E2SM-KPM-RANfunction-Description.c +EN-GNB-ID.c +ENB-ID.c +ENB-UE-X2AP-ID-Extension.c +ENB-UE-X2AP-ID.c +EUTRA-CGI.c +EUTRACellIdentity.c +FiveGS-TAC.c +FiveQI.c +FreqBandNrItem.c +GNB-CU-CP-UE-E1AP-ID.c +GNB-CU-UE-F1AP-ID.c +GNB-CU-UP-ID.c +GNB-DU-ID.c +GNB-ID.c +GUAMI.c +GUMMEI.c +GlobalENB-ID.c +GlobalGNB-ID.c +GlobalNGRANNodeID.c +GlobalNgENB-ID.c +GlobalenGNB-ID.c +GranularityPeriod.c +GroupID.c +INTEGER.c +IndexToRFSP.c +Interface-MessageID.c +InterfaceID-E1.c +InterfaceID-F1.c +InterfaceID-NG.c +InterfaceID-S1.c +InterfaceID-W1.c +InterfaceID-X2.c +InterfaceID-Xn.c +InterfaceIdentifier.c +InterfaceType.c +LabelInfoItem.c +LabelInfoList.c +MME-Code.c +MME-Group-ID.c +MME-UE-S1AP-ID.c +MatchingCondItem.c +MatchingCondList.c +MatchingUEidItem.c +MatchingUEidList.c +MeasurementCondItem.c +MeasurementCondList.c +MeasurementCondUEidItem.c +MeasurementCondUEidList.c +MeasurementData.c +MeasurementDataItem.c +MeasurementInfo-Action-Item.c +MeasurementInfo-Action-List.c +MeasurementInfoItem.c +MeasurementInfoList.c +MeasurementLabel.c +MeasurementRecord.c +MeasurementRecordItem.c +MeasurementType.c +MeasurementTypeID.c +MeasurementTypeName.c +NG-RANnodeUEXnAPID.c +NGENB-CU-UE-W1AP-ID.c +NGENB-DU-ID.c +NR-ARFCN.c +NR-CGI.c +NR-PCI.c +NRCellIdentity.c +NRFrequencyBand-List.c +NRFrequencyBandItem.c +NRFrequencyInfo.c +NRFrequencyShift7p5khz.c +NULL.c +NativeEnumerated.c +NativeInteger.c +NativeReal.c +NgENB-ID.c +OCTET_STRING.c +OPEN_TYPE.c +PLMNIdentity.c +PrintableString.c +QCI.c +QoSID.c +QosFlowIdentifier.c +RANUEID.c +RANfunction-Name.c +REAL.c +RIC-EventTriggerStyle-Item.c +RIC-Format-Type.c +RIC-ReportStyle-Item.c +RIC-Style-Name.c +RIC-Style-Type.c +RRC-MessageID.c +RRCclass-LTE.c +RRCclass-NR.c +S-NSSAI.c +SD.c +SST.c +ServingCell-ARFCN.c +ServingCell-PCI.c +SubscriberProfileIDforRFP.c +SupportedSULBandList.c +SupportedSULFreqBandItem.c +TestCond-Expression.c +TestCond-Type.c +TestCond-Value.c +TestCondInfo.c +TimeStamp.c +UEID-EN-GNB.c +UEID-ENB.c +UEID-GNB-CU-CP-E1AP-ID-Item.c +UEID-GNB-CU-CP-E1AP-ID-List.c +UEID-GNB-CU-CP-F1AP-ID-Item.c +UEID-GNB-CU-F1AP-ID-List.c +UEID-GNB-CU-UP.c +UEID-GNB-DU.c +UEID-GNB.c +UEID-NG-ENB-DU.c +UEID-NG-ENB.c +UEID.c +asn_SEQUENCE_OF.c +asn_SET_OF.c +asn_application.c +asn_bit_data.c +asn_codecs_prim.c +asn_internal.c +asn_random_fill.c +ber_decoder.c +ber_tlv_length.c +ber_tlv_tag.c +constr_CHOICE.c +constr_SEQUENCE.c +constr_SEQUENCE_OF.c +constr_SET_OF.c +constr_TYPE.c +constraints.c +der_encoder.c +oer_decoder.c +oer_encoder.c +oer_support.c +per_decoder.c +per_encoder.c +per_opentype.c +per_support.c +xer_decoder.c +xer_encoder.c +xer_support.c +/usr/include/errno.h +/usr/include/math.h +/usr/include/stdio.h +/usr/include/stdlib.h +/usr/include/alloca.h +/usr/include/features.h +/usr/include/stdc-predef.h diff --git a/Bouncer/e2sm_kpm/lib/der_encoder.c b/Bouncer/e2sm_kpm/lib/der_encoder.c new file mode 100644 index 0000000..2c6a6f7 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/der_encoder.c @@ -0,0 +1,194 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +static ssize_t der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len, + asn_app_consume_bytes_f *cb, void *app_key, int constructed); + +/* + * The DER encoder of any type. + */ +asn_enc_rval_t +der_encode(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes, void *app_key) { + ASN_DEBUG("DER encoder invoked for %s", + type_descriptor->name); + + /* + * Invoke type-specific encoder. + */ + return type_descriptor->op->der_encoder( + type_descriptor, struct_ptr, /* Pointer to the destination structure */ + 0, 0, consume_bytes, app_key); +} + +/* + * Argument type and callback necessary for der_encode_to_buffer(). + */ +typedef struct enc_to_buf_arg { + void *buffer; + size_t left; +} enc_to_buf_arg; +static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) { + enc_to_buf_arg *arg = (enc_to_buf_arg *)key; + + if(arg->left < size) + return -1; /* Data exceeds the available buffer size */ + + memcpy(arg->buffer, buffer, size); + arg->buffer = ((char *)arg->buffer) + size; + arg->left -= size; + + return 0; +} + +/* + * A variant of the der_encode() which encodes the data into the provided buffer + */ +asn_enc_rval_t +der_encode_to_buffer(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, void *buffer, size_t buffer_size) { + enc_to_buf_arg arg; + asn_enc_rval_t ec; + + arg.buffer = buffer; + arg.left = buffer_size; + + ec = type_descriptor->op->der_encoder(type_descriptor, + struct_ptr, /* Pointer to the destination structure */ + 0, 0, encode_to_buffer_cb, &arg); + if(ec.encoded != -1) { + assert(ec.encoded == (ssize_t)(buffer_size - arg.left)); + /* Return the encoded contents size */ + } + return ec; +} + + +/* + * Write out leading TL[v] sequence according to the type definition. + */ +ssize_t +der_write_tags(const asn_TYPE_descriptor_t *sd, size_t struct_length, + int tag_mode, int last_tag_form, + ber_tlv_tag_t tag, /* EXPLICIT or IMPLICIT tag */ + asn_app_consume_bytes_f *cb, void *app_key) { +#define ASN1_DER_MAX_TAGS_COUNT 4 + ber_tlv_tag_t + tags_buf_scratch[ASN1_DER_MAX_TAGS_COUNT * sizeof(ber_tlv_tag_t)]; + ssize_t lens[ASN1_DER_MAX_TAGS_COUNT * sizeof(ssize_t)]; + const ber_tlv_tag_t *tags; /* Copy of tags stream */ + int tags_count; /* Number of tags */ + size_t overall_length; + int i; + + ASN_DEBUG("Writing tags (%s, tm=%d, tc=%d, tag=%s, mtc=%d)", + sd->name, tag_mode, sd->tags_count, + ber_tlv_tag_string(tag), + tag_mode + ?(sd->tags_count+1 + -((tag_mode == -1) && sd->tags_count)) + :sd->tags_count + ); + + if(sd->tags_count + 1 > ASN1_DER_MAX_TAGS_COUNT) { + ASN_DEBUG("System limit %d on tags count", ASN1_DER_MAX_TAGS_COUNT); + return -1; + } + + if(tag_mode) { + /* + * Instead of doing shaman dance like we do in ber_check_tags(), + * allocate a small array on the stack + * and initialize it appropriately. + */ + int stag_offset; + ber_tlv_tag_t *tags_buf = tags_buf_scratch; + tags_count = sd->tags_count + + 1 /* EXPLICIT or IMPLICIT tag is given */ + - ((tag_mode == -1) && sd->tags_count); + /* Copy tags over */ + tags_buf[0] = tag; + stag_offset = -1 + ((tag_mode == -1) && sd->tags_count); + for(i = 1; i < tags_count; i++) + tags_buf[i] = sd->tags[i + stag_offset]; + tags = tags_buf; + } else { + tags = sd->tags; + tags_count = sd->tags_count; + } + + /* No tags to write */ + if(tags_count == 0) + return 0; + + /* + * Array of tags is initialized. + * Now, compute the size of the TLV pairs, from right to left. + */ + overall_length = struct_length; + for(i = tags_count - 1; i >= 0; --i) { + lens[i] = der_write_TL(tags[i], overall_length, 0, 0, 0); + if(lens[i] == -1) return -1; + overall_length += lens[i]; + lens[i] = overall_length - lens[i]; + } + + if(!cb) return overall_length - struct_length; + + ASN_DEBUG("Encoding %s TL sequence (%d elements)", sd->name, + tags_count); + + /* + * Encode the TL sequence for real. + */ + for(i = 0; i < tags_count; i++) { + ssize_t len; + int _constr; + + /* Check if this tag happens to be constructed */ + _constr = (last_tag_form || i < (tags_count - 1)); + + len = der_write_TL(tags[i], lens[i], cb, app_key, _constr); + if(len == -1) return -1; + } + + return overall_length - struct_length; +} + +static ssize_t +der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len, + asn_app_consume_bytes_f *cb, void *app_key, + int constructed) { + uint8_t buf[32]; + size_t size = 0; + int buf_size = cb?sizeof(buf):0; + ssize_t tmp; + + /* Serialize tag (T from TLV) into possibly zero-length buffer */ + tmp = ber_tlv_tag_serialize(tag, buf, buf_size); + if(tmp == -1 || tmp > (ssize_t)sizeof(buf)) return -1; + size += tmp; + + /* Serialize length (L from TLV) into possibly zero-length buffer */ + tmp = der_tlv_length_serialize(len, buf+size, buf_size?buf_size-size:0); + if(tmp == -1) return -1; + size += tmp; + + if(size > sizeof(buf)) + return -1; + + /* + * If callback is specified, invoke it, and check its return value. + */ + if(cb) { + if(constructed) *buf |= 0x20; + if(cb(buf, size, app_key) < 0) + return -1; + } + + return size; +} diff --git a/Bouncer/e2sm_kpm/lib/oer_decoder.c b/Bouncer/e2sm_kpm/lib/oer_decoder.c new file mode 100644 index 0000000..0701738 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/oer_decoder.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * The OER decoder of any type. + */ +asn_dec_rval_t +oer_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, + const void *ptr, size_t size) { + asn_codec_ctx_t s_codec_ctx; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* + * Invoke type-specific decoder. + */ + return type_descriptor->op->oer_decoder(opt_codec_ctx, type_descriptor, 0, + struct_ptr, /* Pointer to the destination structure */ + ptr, size /* Buffer and its size */ + ); +} + +/* + * Open Type is encoded as a length (#8.6) followed by that number of bytes. + * Since we're just skipping, reading the length would be enough. + */ +ssize_t +oer_open_type_skip(const void *bufptr, size_t size) { + size_t len = 0; + return oer_fetch_length(bufptr, size, &len); +} + +/* + * Read the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t +oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *bufptr, size_t size) { + asn_dec_rval_t dr; + size_t container_len = 0; + ssize_t len_len; + enum asn_struct_free_method dispose_method = + (*struct_ptr) ? ASFM_FREE_UNDERLYING_AND_RESET : ASFM_FREE_EVERYTHING; + + /* Get the size of a length determinant */ + len_len = oer_fetch_length(bufptr, size, &container_len); + if(len_len <= 0) { + return len_len; /* Error or more data expected */ + } + + /* + * len_len can't be bigger than size, but size without len_len + * should be bigger or equal to container length + */ + if(size - len_len < container_len) { + /* More data is expected */ + return 0; + } + + dr = td->op->oer_decoder(opt_codec_ctx, td, constraints, struct_ptr, + (const uint8_t *)bufptr + len_len, container_len); + if(dr.code == RC_OK) { + return len_len + container_len; + } else { + /* Even if RC_WMORE, we can't get more data into a closed container. */ + td->op->free_struct(td, *struct_ptr, dispose_method); + *struct_ptr = NULL; + return -1; + } +} + + +asn_dec_rval_t +oer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + ssize_t len_len; + + (void)td; + (void)opt_codec_ctx; + (void)constraints; + + if(!st) { + st = (ASN__PRIMITIVE_TYPE_t *)(*sptr = CALLOC( + 1, sizeof(ASN__PRIMITIVE_TYPE_t))); + if(!st) ASN__DECODE_FAILED; + } + + + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + rval.consumed = len_len; + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + + rval.consumed += expected_length; + return rval; + } +} diff --git a/Bouncer/e2sm_kpm/lib/oer_encoder.c b/Bouncer/e2sm_kpm/lib/oer_encoder.c new file mode 100644 index 0000000..a284cc2 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/oer_encoder.c @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * The OER encoder of any type. + */ +asn_enc_rval_t +oer_encode(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes, void *app_key) { + ASN_DEBUG("OER encoder invoked for %s", type_descriptor->name); + + /* + * Invoke type-specific encoder. + */ + return type_descriptor->op->oer_encoder( + type_descriptor, 0, + struct_ptr, /* Pointer to the destination structure */ + consume_bytes, app_key); +} + +/* + * Argument type and callback necessary for oer_encode_to_buffer(). + */ +typedef struct enc_to_buf_arg { + void *buffer; + size_t left; +} enc_to_buf_arg; +static int +encode_to_buffer_cb(const void *buffer, size_t size, void *key) { + enc_to_buf_arg *arg = (enc_to_buf_arg *)key; + + if(arg->left < size) return -1; /* Data exceeds the available buffer size */ + + memcpy(arg->buffer, buffer, size); + arg->buffer = ((char *)arg->buffer) + size; + arg->left -= size; + + return 0; +} + +/* + * A variant of the oer_encode() which encodes the data into the provided buffer + */ +asn_enc_rval_t +oer_encode_to_buffer(const asn_TYPE_descriptor_t *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +) { + enc_to_buf_arg arg; + asn_enc_rval_t ec; + + arg.buffer = buffer; + arg.left = buffer_size; + + if(type_descriptor->op->oer_encoder == NULL) { + ec.encoded = -1; + ec.failed_type = type_descriptor; + ec.structure_ptr = struct_ptr; + ASN_DEBUG("OER encoder is not defined for %s", + type_descriptor->name); + } else { + ec = type_descriptor->op->oer_encoder( + type_descriptor, constraints, + struct_ptr, /* Pointer to the destination structure */ + encode_to_buffer_cb, &arg); + if(ec.encoded != -1) { + assert(ec.encoded == (ssize_t)(buffer_size - arg.left)); + /* Return the encoded contents size */ + } + } + return ec; +} + +asn_enc_rval_t +oer_encode_primitive(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr; + asn_enc_rval_t er = {0, 0, 0}; + ssize_t ret; + + (void)constraints; + + if(!st) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s (%" ASN_PRI_SIZE " bytes)", td ? td->name : "", st->size); + + /* + * X.696 (08/2015) #27.2 + */ + ret = oer_serialize_length(st->size, cb, app_key); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += ret; + + er.encoded += st->size; + if(cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + ASN__ENCODED_OK(er); + } +} + +static int +oer__count_bytes(const void *buffer, size_t size, void *bytes_ptr) { + size_t *bytes = bytes_ptr; + (void)buffer; + *bytes += size; + return 0; +} + +ssize_t +oer_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t serialized_byte_count = 0; + asn_enc_rval_t er = {0,0,0}; + ssize_t len_len; + + er = td->op->oer_encoder(td, constraints, sptr, oer__count_bytes, + &serialized_byte_count); + if(er.encoded < 0) return -1; + assert(serialized_byte_count == (size_t)er.encoded); + + len_len = oer_serialize_length(serialized_byte_count, cb, app_key); + if(len_len == -1) return -1; + + er = td->op->oer_encoder(td, constraints, sptr, cb, app_key); + if(er.encoded < 0) return -1; + assert(serialized_byte_count == (size_t)er.encoded); + + return len_len + er.encoded; +} + diff --git a/Bouncer/e2sm_kpm/lib/oer_support.c b/Bouncer/e2sm_kpm/lib/oer_support.c new file mode 100644 index 0000000..b15a3bc --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/oer_support.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +#include + +/* + * Fetch the length determinant (X.696 08/2015, #8.6) into *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t +oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) { + uint8_t first_byte; + size_t len_len; /* Length of the length determinant */ + const uint8_t *b; + const uint8_t *bend; + size_t len; + + if(size == 0) { + *len_r = 0; + return 0; + } + + first_byte = *(const uint8_t *)bufptr; + if((first_byte & 0x80) == 0) { /* Short form */ + *len_r = first_byte; /* 0..127 */ + return 1; + } + + len_len = (first_byte & 0x7f); + if((1 + len_len) > size) { + *len_r = 0; + return 0; + } + + b = (const uint8_t *)bufptr + 1; + bend = b + len_len; + + for(; b < bend && *b == 0; b++) { + /* Skip the leading 0-bytes */ + } + + if((bend - b) > (ssize_t)sizeof(size_t)) { + /* Length is not representable by the native size_t type */ + *len_r = 0; + return -1; + } + + for(len = 0; b < bend; b++) { + len = (len << 8) + *b; + } + + if(len > RSIZE_MAX) { /* A bit of C11 validation */ + *len_r = 0; + return -1; + } + + *len_r = len; + assert(len_len + 1 == (size_t)(bend - (const uint8_t *)bufptr)); + return len_len + 1; +} + + +/* + * Serialize OER length. Returns the number of bytes serialized + * or -1 if a given callback returned with negative result. + */ +ssize_t +oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, + void *app_key) { + uint8_t scratch[1 + sizeof(length)]; + uint8_t *sp = scratch; + int littleEndian = 1; /* Run-time detection */ + const uint8_t *pstart; + const uint8_t *pend; + const uint8_t *p; + int add; + + if(length <= 127) { + uint8_t b = length; + if(cb(&b, 1, app_key) < 0) { + return -1; + } + return 1; + } + + if(*(char *)&littleEndian) { + pstart = (const uint8_t *)&length + sizeof(length) - 1; + pend = (const uint8_t *)&length; + add = -1; + } else { + pstart = (const uint8_t *)&length; + pend = pstart + sizeof(length); + add = 1; + } + + for(p = pstart; p != pend; p += add) { + /* Skip leading zeros. */ + if(*p) break; + } + + for(sp = scratch + 1; ; p += add) { + *sp++ = *p; + if(p == pend) break; + } + assert((sp - scratch) - 1 <= 0x7f); + scratch[0] = 0x80 + ((sp - scratch) - 1); + + if(cb(scratch, sp - scratch, app_key) < 0) { + return -1; + } + + return sp - scratch; +} + diff --git a/Bouncer/e2sm_kpm/lib/per_decoder.c b/Bouncer/e2sm_kpm/lib/per_decoder.c new file mode 100644 index 0000000..8a3e39d --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/per_decoder.c @@ -0,0 +1,185 @@ +#include +#include +#include + +/* + * Decode a "Production of a complete encoding", X.691#10.1. + * The complete encoding contains at least one byte, and is an integral + * multiple of 8 bytes. + */ +asn_dec_rval_t +uper_decode_complete(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buffer, size_t size) { + asn_dec_rval_t rval; + + rval = uper_decode(opt_codec_ctx, td, sptr, buffer, size, 0, 0); + if(rval.consumed) { + /* + * We've always given 8-aligned data, + * so convert bits to integral bytes. + */ + rval.consumed += 7; + rval.consumed >>= 3; + } else if(rval.code == RC_OK) { + if(size) { + if(((const uint8_t *)buffer)[0] == 0) { + rval.consumed = 1; /* 1 byte */ + } else { + ASN_DEBUG("Expecting single zeroed byte"); + rval.code = RC_FAIL; + } + } else { + /* Must contain at least 8 bits. */ + rval.code = RC_WMORE; + } + } + + return rval; +} + +asn_dec_rval_t +uper_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, + size_t size, int skip_bits, int unused_bits) { + asn_codec_ctx_t s_codec_ctx; + asn_dec_rval_t rval; + asn_per_data_t pd; + + if(skip_bits < 0 || skip_bits > 7 + || unused_bits < 0 || unused_bits > 7 + || (unused_bits > 0 && !size)) + ASN__DECODE_FAILED; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* Fill in the position indicator */ + memset(&pd, 0, sizeof(pd)); + pd.buffer = (const uint8_t *)buffer; + pd.nboff = skip_bits; + pd.nbits = 8 * size - unused_bits; /* 8 is CHAR_BIT from */ + if(pd.nboff > pd.nbits) + ASN__DECODE_FAILED; + + /* + * Invoke type-specific decoder. + */ + if(!td->op->uper_decoder) + ASN__DECODE_FAILED; /* PER is not compiled in */ + rval = td->op->uper_decoder(opt_codec_ctx, td, 0, sptr, &pd); + if(rval.code == RC_OK) { + /* Return the number of consumed bits */ + rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3) + + pd.nboff - skip_bits; + ASN_DEBUG("PER decoding consumed %ld, counted %ld", + (long)rval.consumed, (long)pd.moved); + assert(rval.consumed == pd.moved); + } else { + /* PER codec is not a restartable */ + rval.consumed = 0; + } + return rval; +} + +asn_dec_rval_t +aper_decode_complete(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buffer, size_t size) { + asn_dec_rval_t rval; + + rval = aper_decode(opt_codec_ctx, td, sptr, buffer, size, 0, 0); + if(rval.consumed) { + /* + * We've always given 8-aligned data, + * so convert bits to integral bytes. + */ + rval.consumed += 7; + rval.consumed >>= 3; + } else if(rval.code == RC_OK) { + if(size) { + if(((const uint8_t *)buffer)[0] == 0) { + rval.consumed = 1; /* 1 byte */ + } else { + ASN_DEBUG("Expecting single zeroed byte"); + rval.code = RC_FAIL; + } + } else { + /* Must contain at least 8 bits. */ + rval.code = RC_WMORE; + } + } + + return rval; +} + +asn_dec_rval_t +aper_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, + size_t size, int skip_bits, int unused_bits) { + asn_codec_ctx_t s_codec_ctx; + asn_dec_rval_t rval; + asn_per_data_t pd; + + if(skip_bits < 0 || skip_bits > 7 + || unused_bits < 0 || unused_bits > 7 + || (unused_bits > 0 && !size)) + ASN__DECODE_FAILED; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* Fill in the position indicator */ + memset(&pd, 0, sizeof(pd)); + pd.buffer = (const uint8_t *)buffer; + pd.nboff = skip_bits; + pd.nbits = 8 * size - unused_bits; /* 8 is CHAR_BIT from */ + if(pd.nboff > pd.nbits) + ASN__DECODE_FAILED; + + /* + * Invoke type-specific decoder. + */ + if(!td->op->aper_decoder) + ASN__DECODE_FAILED; /* PER is not compiled in */ + rval = td->op->aper_decoder(opt_codec_ctx, td, 0, sptr, &pd); + if(rval.code == RC_OK) { + /* Return the number of consumed bits */ + rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3) + + pd.nboff - skip_bits; + ASN_DEBUG("PER decoding consumed %zu, counted %zu", + rval.consumed, pd.moved); + assert(rval.consumed == pd.moved); + } else { + /* PER codec is not a restartable */ + rval.consumed = 0; + } + return rval; +} + diff --git a/Bouncer/e2sm_kpm/lib/per_encoder.c b/Bouncer/e2sm_kpm/lib/per_encoder.c new file mode 100644 index 0000000..a35e1f0 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/per_encoder.c @@ -0,0 +1,265 @@ +#include +#include +#include + +static int _uper_encode_flush_outp(asn_per_outp_t *po); + +static int +ignore_output(const void *data, size_t size, void *app_key) { + (void)data; + (void)size; + (void)app_key; + return 0; +} + +asn_enc_rval_t +uper_encode(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_per_outp_t po; + asn_enc_rval_t er = {0,0,0}; + + /* + * Invoke type-specific encoder. + */ + if(!td || !td->op->uper_encoder) + ASN__ENCODE_FAILED; /* PER is not compiled in */ + + po.buffer = po.tmpspace; + po.nboff = 0; + po.nbits = 8 * sizeof(po.tmpspace); + po.output = cb ? cb : ignore_output; + po.op_key = app_key; + po.flushed_bytes = 0; + + er = td->op->uper_encoder(td, constraints, sptr, &po); + if(er.encoded != -1) { + size_t bits_to_flush; + + bits_to_flush = ((po.buffer - po.tmpspace) << 3) + po.nboff; + + /* Set number of bits encoded to a firm value */ + er.encoded = (po.flushed_bytes << 3) + bits_to_flush; + + if(_uper_encode_flush_outp(&po)) ASN__ENCODE_FAILED; + } + + return er; +} + +/* + * Argument type and callback necessary for uper_encode_to_buffer(). + */ +typedef struct enc_to_buf_arg { + void *buffer; + size_t left; +} enc_to_buf_arg; +static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) { + enc_to_buf_arg *arg = (enc_to_buf_arg *)key; + + if(arg->left < size) + return -1; /* Data exceeds the available buffer size */ + + memcpy(arg->buffer, buffer, size); + arg->buffer = ((char *)arg->buffer) + size; + arg->left -= size; + + return 0; +} + +asn_enc_rval_t +uper_encode_to_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void *buffer, size_t buffer_size) { + enc_to_buf_arg key; + + key.buffer = buffer; + key.left = buffer_size; + + if(td) ASN_DEBUG("Encoding \"%s\" using UNALIGNED PER", td->name); + + return uper_encode(td, constraints, sptr, encode_to_buffer_cb, &key); +} + +typedef struct enc_dyn_arg { + void *buffer; + size_t length; + size_t allocated; +} enc_dyn_arg; +static int +encode_dyn_cb(const void *buffer, size_t size, void *key) { + enc_dyn_arg *arg = key; + if(arg->length + size >= arg->allocated) { + size_t new_size = arg->allocated ? arg->allocated : 8; + void *p; + + do { + new_size <<= 2; + } while(arg->length + size >= new_size); + + p = REALLOC(arg->buffer, new_size); + if(!p) { + FREEMEM(arg->buffer); + memset(arg, 0, sizeof(*arg)); + return -1; + } + arg->buffer = p; + arg->allocated = new_size; + } + memcpy(((char *)arg->buffer) + arg->length, buffer, size); + arg->length += size; + return 0; +} +ssize_t +uper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void **buffer_r) { + asn_enc_rval_t er = {0,0,0}; + enc_dyn_arg key; + + memset(&key, 0, sizeof(key)); + + er = uper_encode(td, constraints, sptr, encode_dyn_cb, &key); + switch(er.encoded) { + case -1: + FREEMEM(key.buffer); + return -1; + case 0: + FREEMEM(key.buffer); + key.buffer = MALLOC(1); + if(key.buffer) { + *(char *)key.buffer = '\0'; + *buffer_r = key.buffer; + return 1; + } else { + return -1; + } + default: + *buffer_r = key.buffer; + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + return ((er.encoded + 7) >> 3); + } +} + +/* + * Internally useful functions. + */ + +/* Flush partially filled buffer */ +static int +_uper_encode_flush_outp(asn_per_outp_t *po) { + uint8_t *buf; + + if(po->nboff == 0 && po->buffer == po->tmpspace) + return 0; + + buf = po->buffer + (po->nboff >> 3); + /* Make sure we account for the last, partially filled */ + if(po->nboff & 0x07) { + buf[0] &= 0xff << (8 - (po->nboff & 0x07)); + buf++; + } + + return po->output(po->tmpspace, buf - po->tmpspace, po->op_key); +} + +asn_enc_rval_t +aper_encode_to_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void *buffer, size_t buffer_size) { + enc_to_buf_arg key; + + key.buffer = buffer; + key.left = buffer_size; + + if(td) ASN_DEBUG("Encoding \"%s\" using ALIGNED PER", td->name); + + return aper_encode(td, constraints, sptr, encode_to_buffer_cb, &key); +} + +ssize_t +aper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void **buffer_r) { + asn_enc_rval_t er = {0,0,0}; + enc_dyn_arg key; + + memset(&key, 0, sizeof(key)); + + er = aper_encode(td, constraints, sptr, encode_dyn_cb, &key); + switch(er.encoded) { + case -1: + FREEMEM(key.buffer); + return -1; + case 0: + FREEMEM(key.buffer); + key.buffer = MALLOC(1); + if(key.buffer) { + *(char *)key.buffer = '\0'; + *buffer_r = key.buffer; + return 1; + } else { + return -1; + } + default: + *buffer_r = key.buffer; + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + return ((er.encoded + 7) >> 3); + } +} + +static int +_aper_encode_flush_outp(asn_per_outp_t *po) { + uint8_t *buf; + + if(po->nboff == 0 && po->buffer == po->tmpspace) + return 0; + + buf = po->buffer + (po->nboff >> 3); + /* Make sure we account for the last, partially filled */ + if(po->nboff & 0x07) { + buf[0] &= 0xff << (8 - (po->nboff & 0x07)); + buf++; + } + + if (po->output) { + return po->output(po->tmpspace, buf - po->tmpspace, po->op_key); + } + return 0; +} + +asn_enc_rval_t +aper_encode(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { + asn_per_outp_t po; + asn_enc_rval_t er = {0,0,0}; + + /* + * Invoke type-specific encoder. + */ + if(!td || !td->op->aper_encoder) + ASN__ENCODE_FAILED; /* PER is not compiled in */ + + po.buffer = po.tmpspace; + po.nboff = 0; + po.nbits = 8 * sizeof(po.tmpspace); + po.output = cb; + po.op_key = app_key; + po.flushed_bytes = 0; + + er = td->op->aper_encoder(td, constraints, sptr, &po); + if(er.encoded != -1) { + size_t bits_to_flush; + + bits_to_flush = ((po.buffer - po.tmpspace) << 3) + po.nboff; + + /* Set number of bits encoded to a firm value */ + er.encoded = (po.flushed_bytes << 3) + bits_to_flush; + + if(_aper_encode_flush_outp(&po)) + ASN__ENCODE_FAILED; + } + + return er; +} diff --git a/Bouncer/e2sm_kpm/lib/per_opentype.c b/Bouncer/e2sm_kpm/lib/per_opentype.c new file mode 100644 index 0000000..28f3cb6 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/per_opentype.c @@ -0,0 +1,533 @@ +/* + * Copyright (c) 2007 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +typedef struct uper_ugot_key { + asn_per_data_t oldpd; /* Old per data source */ + size_t unclaimed; + size_t ot_moved; /* Number of bits moved by OT processing */ + int repeat; +} uper_ugot_key; + +static int uper_ugot_refill(asn_per_data_t *pd); +static int per_skip_bits(asn_per_data_t *pd, int skip_nbits); +static asn_dec_rval_t uper_sot_suck(const asn_codec_ctx_t *, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd); + +/* + * Encode an "open type field". + * #10.1, #10.2 + */ +int +uper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + void *buf; + void *bptr; + ssize_t size; + + ASN_DEBUG("Open type put %s ...", td->name); + + size = uper_encode_to_new_buffer(td, constraints, sptr, &buf); + if(size <= 0) return -1; + + ASN_DEBUG("Open type put %s of length %" ASN_PRI_SSIZE " + overhead (1byte?)", td->name, + size); + + bptr = buf; + do { + int need_eom = 0; + ssize_t may_save = uper_put_length(po, size, &need_eom); + ASN_DEBUG("Prepending length %" ASN_PRI_SSIZE + " to %s and allowing to save %" ASN_PRI_SSIZE, + size, td->name, may_save); + if(may_save < 0) break; + if(per_put_many_bits(po, bptr, may_save * 8)) break; + bptr = (char *)bptr + may_save; + size -= may_save; + if(need_eom && uper_put_length(po, 0, 0)) { + FREEMEM(buf); + return -1; + } + } while(size); + + FREEMEM(buf); + if(size) return -1; + + return 0; +} + +static asn_dec_rval_t +uper_open_type_get_simple(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rv; + ssize_t chunk_bytes; + int repeat; + uint8_t *buf = 0; + size_t bufLen = 0; + size_t bufSize = 0; + asn_per_data_t spd; + size_t padding; + + ASN__STACK_OVERFLOW_CHECK(ctx); + + ASN_DEBUG("Getting open type %s...", td->name); + + do { + chunk_bytes = uper_get_length(pd, -1, 0, &repeat); + if(chunk_bytes < 0) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + if(bufLen + chunk_bytes > bufSize) { + void *ptr; + bufSize = chunk_bytes + (bufSize << 2); + ptr = REALLOC(buf, bufSize); + if(!ptr) { + FREEMEM(buf); + ASN__DECODE_FAILED; + } + buf = ptr; + } + if(per_get_many_bits(pd, buf + bufLen, 0, chunk_bytes << 3)) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + bufLen += chunk_bytes; + } while(repeat); + + ASN_DEBUG("Getting open type %s encoded in %ld bytes", td->name, + (long)bufLen); + + memset(&spd, 0, sizeof(spd)); + spd.buffer = buf; + spd.nbits = bufLen << 3; + + ASN_DEBUG_INDENT_ADD(+4); + rv = td->op->uper_decoder(ctx, td, constraints, sptr, &spd); + ASN_DEBUG_INDENT_ADD(-4); + + if(rv.code == RC_OK) { + /* Check padding validity */ + padding = spd.nbits - spd.nboff; + if (((padding > 0 && padding < 8) || + /* X.691#10.1.3 */ + (spd.nboff == 0 && spd.nbits == 8 && spd.buffer == buf)) && + per_get_few_bits(&spd, padding) == 0) { + /* Everything is cool */ + FREEMEM(buf); + return rv; + } + FREEMEM(buf); + if(padding >= 8) { + ASN_DEBUG("Too large padding %d in open type", (int)padding); + ASN__DECODE_FAILED; + } else { + ASN_DEBUG("No padding"); + } + } else { + FREEMEM(buf); + /* rv.code could be RC_WMORE, nonsense in this context */ + rv.code = RC_FAIL; /* Noone would give us more */ + } + + return rv; +} + +static asn_dec_rval_t CC_NOTUSED +uper_open_type_get_complex(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + uper_ugot_key arg; + asn_dec_rval_t rv; + ssize_t padding; + + ASN__STACK_OVERFLOW_CHECK(ctx); + + ASN_DEBUG("Getting open type %s from %s", td->name, + asn_bit_data_string(pd)); + arg.oldpd = *pd; + arg.unclaimed = 0; + arg.ot_moved = 0; + arg.repeat = 1; + pd->refill = uper_ugot_refill; + pd->refill_key = &arg; + pd->nbits = pd->nboff; /* 0 good bits at this point, will refill */ + pd->moved = 0; /* This now counts the open type size in bits */ + + ASN_DEBUG_INDENT_ADD(+4); + rv = td->op->uper_decoder(ctx, td, constraints, sptr, pd); + ASN_DEBUG_INDENT_ADD(-4); + +#define UPDRESTOREPD do { \ + /* buffer and nboff are valid, preserve them. */ \ + pd->nbits = arg.oldpd.nbits - (pd->moved - arg.ot_moved); \ + pd->moved = arg.oldpd.moved + (pd->moved - arg.ot_moved); \ + pd->refill = arg.oldpd.refill; \ + pd->refill_key = arg.oldpd.refill_key; \ + } while(0) + + if(rv.code != RC_OK) { + UPDRESTOREPD; + return rv; + } + + ASN_DEBUG("OpenType %s pd%s old%s unclaimed=%d, repeat=%d", td->name, + asn_bit_data_string(pd), + asn_bit_data_string(&arg.oldpd), + (int)arg.unclaimed, (int)arg.repeat); + + padding = pd->moved % 8; + if(padding) { + int32_t pvalue; + if(padding > 7) { + ASN_DEBUG("Too large padding %d in open type", + (int)padding); + rv.code = RC_FAIL; + UPDRESTOREPD; + return rv; + } + padding = 8 - padding; + ASN_DEBUG("Getting padding of %d bits", (int)padding); + pvalue = per_get_few_bits(pd, padding); + switch(pvalue) { + case -1: + ASN_DEBUG("Padding skip failed"); + UPDRESTOREPD; + ASN__DECODE_STARVED; + case 0: break; + default: + ASN_DEBUG("Non-blank padding (%d bits 0x%02x)", + (int)padding, (int)pvalue); + UPDRESTOREPD; + ASN__DECODE_FAILED; + } + } + if(pd->nboff != pd->nbits) { + ASN_DEBUG("Open type %s overhead pd%s old%s", td->name, + asn_bit_data_string(pd), asn_bit_data_string(&arg.oldpd)); + if(1) { + UPDRESTOREPD; + ASN__DECODE_FAILED; + } else { + arg.unclaimed += pd->nbits - pd->nboff; + } + } + + /* Adjust pd back so it points to original data */ + UPDRESTOREPD; + + /* Skip data not consumed by the decoder */ + if(arg.unclaimed) { + ASN_DEBUG("Getting unclaimed %d", (int)arg.unclaimed); + switch(per_skip_bits(pd, arg.unclaimed)) { + case -1: + ASN_DEBUG("Claim of %d failed", (int)arg.unclaimed); + ASN__DECODE_STARVED; + case 0: + ASN_DEBUG("Got claim of %d", (int)arg.unclaimed); + break; + default: + /* Padding must be blank */ + ASN_DEBUG("Non-blank unconsumed padding"); + ASN__DECODE_FAILED; + } + arg.unclaimed = 0; + } + + if(arg.repeat) { + ASN_DEBUG("Not consumed the whole thing"); + rv.code = RC_FAIL; + return rv; + } + + return rv; +} + + +asn_dec_rval_t +uper_open_type_get(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + return uper_open_type_get_simple(ctx, td, constraints, sptr, pd); +} + +int +uper_open_type_skip(const asn_codec_ctx_t *ctx, asn_per_data_t *pd) { + asn_TYPE_descriptor_t s_td; + asn_TYPE_operation_t s_op; + asn_dec_rval_t rv; + + s_td.name = ""; + s_td.op = &s_op; + s_op.uper_decoder = uper_sot_suck; + + rv = uper_open_type_get(ctx, &s_td, 0, 0, pd); + if(rv.code != RC_OK) + return -1; + else + return 0; +} + +/* + * Internal functions. + */ + +static asn_dec_rval_t +uper_sot_suck(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rv; + + (void)ctx; + (void)td; + (void)constraints; + (void)sptr; + + while(per_get_few_bits(pd, 1) >= 0); + + rv.code = RC_OK; + rv.consumed = pd->moved; + + return rv; +} + +static int +uper_ugot_refill(asn_per_data_t *pd) { + uper_ugot_key *arg = pd->refill_key; + ssize_t next_chunk_bytes, next_chunk_bits; + ssize_t avail; + + asn_per_data_t *oldpd = &arg->oldpd; + + ASN_DEBUG("REFILLING pd->moved=%ld, oldpd->moved=%ld", + (long)pd->moved, (long)oldpd->moved); + + /* Advance our position to where pd is */ + oldpd->buffer = pd->buffer; + oldpd->nboff = pd->nboff; + oldpd->nbits -= pd->moved - arg->ot_moved; + oldpd->moved += pd->moved - arg->ot_moved; + arg->ot_moved = pd->moved; + + if(arg->unclaimed) { + /* Refill the container */ + if(per_get_few_bits(oldpd, 1)) + return -1; + if(oldpd->nboff == 0) { + assert(0); + return -1; + } + pd->buffer = oldpd->buffer; + pd->nboff = oldpd->nboff - 1; + pd->nbits = oldpd->nbits; + ASN_DEBUG("UNCLAIMED <- return from (pd->moved=%ld)", + (long)pd->moved); + return 0; + } + + if(!arg->repeat) { + ASN_DEBUG("Want more but refill doesn't have it"); + return -1; + } + + next_chunk_bytes = uper_get_length(oldpd, -1, 0, &arg->repeat); + ASN_DEBUG("Open type LENGTH %ld bytes at off %ld, repeat %ld", + (long)next_chunk_bytes, (long)oldpd->moved, (long)arg->repeat); + if(next_chunk_bytes < 0) return -1; + if(next_chunk_bytes == 0) { + pd->refill = 0; /* No more refills, naturally */ + assert(!arg->repeat); /* Implementation guarantee */ + } + next_chunk_bits = next_chunk_bytes << 3; + avail = oldpd->nbits - oldpd->nboff; + if(avail >= next_chunk_bits) { + pd->nbits = oldpd->nboff + next_chunk_bits; + arg->unclaimed = 0; + ASN_DEBUG("!+Parent frame %ld bits, alloting %ld [%ld..%ld] (%ld)", + (long)next_chunk_bits, (long)oldpd->moved, + (long)oldpd->nboff, (long)oldpd->nbits, + (long)(oldpd->nbits - oldpd->nboff)); + } else { + pd->nbits = oldpd->nbits; + arg->unclaimed = next_chunk_bits - avail; + ASN_DEBUG("!-Parent frame %ld, require %ld, will claim %ld", + (long)avail, (long)next_chunk_bits, + (long)arg->unclaimed); + } + pd->buffer = oldpd->buffer; + pd->nboff = oldpd->nboff; + ASN_DEBUG("Refilled pd%s old%s", + asn_bit_data_string(pd), asn_bit_data_string(oldpd)); + return 0; +} + +static int +per_skip_bits(asn_per_data_t *pd, int skip_nbits) { + int hasNonZeroBits = 0; + while(skip_nbits > 0) { + int skip; + + /* per_get_few_bits() is more efficient when nbits <= 24 */ + if(skip_nbits < 24) + skip = skip_nbits; + else + skip = 24; + skip_nbits -= skip; + + switch(per_get_few_bits(pd, skip)) { + case -1: return -1; /* Starving */ + case 0: continue; /* Skipped empty space */ + default: hasNonZeroBits = 1; continue; + } + } + return hasNonZeroBits; +} + +static asn_dec_rval_t +aper_open_type_get_simple(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + asn_dec_rval_t rv; + ssize_t chunk_bytes; + int repeat; + uint8_t *buf = 0; + size_t bufLen = 0; + size_t bufSize = 0; + asn_per_data_t spd; + size_t padding; + + ASN__STACK_OVERFLOW_CHECK(ctx); + + ASN_DEBUG("Getting open type %s...", td->name); + + do { + chunk_bytes = aper_get_length(pd, -1, -1, &repeat); + if(chunk_bytes < 0) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + if(bufLen + chunk_bytes > bufSize) { + void *ptr; + bufSize = chunk_bytes + (bufSize << 2); + ptr = REALLOC(buf, bufSize); + if(!ptr) { + FREEMEM(buf); + ASN__DECODE_FAILED; + } + buf = ptr; + } + if(per_get_many_bits(pd, buf + bufLen, 0, chunk_bytes << 3)) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + bufLen += chunk_bytes; + } while(repeat); + + ASN_DEBUG("Getting open type %s encoded in %ld bytes", td->name, + (long)bufLen); + + memset(&spd, 0, sizeof(spd)); + spd.buffer = buf; + spd.nbits = bufLen << 3; + + ASN_DEBUG_INDENT_ADD(+4); + rv = td->op->aper_decoder(ctx, td, constraints, sptr, &spd); + ASN_DEBUG_INDENT_ADD(-4); + + if(rv.code == RC_OK) { + /* Check padding validity */ + padding = spd.nbits - spd.nboff; + if (((padding > 0 && padding < 8) || + /* X.691#10.1.3 */ + (spd.nboff == 0 && spd.nbits == 8 && spd.buffer == buf)) && + per_get_few_bits(&spd, padding) == 0) { + /* Everything is cool */ + FREEMEM(buf); + return rv; + } + FREEMEM(buf); + if(padding >= 8) { + ASN_DEBUG("Too large padding %d in open type", (int)padding); + ASN__DECODE_FAILED; + } else { + ASN_DEBUG("No padding"); + } + } else { + FREEMEM(buf); + /* rv.code could be RC_WMORE, nonsense in this context */ + rv.code = RC_FAIL; /* Noone would give us more */ + } + + return rv; +} + +int +aper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + void *buf; + void *bptr; + ssize_t size; + size_t toGo; + + ASN_DEBUG("Open type put %s ...", td->name); + + size = aper_encode_to_new_buffer(td, constraints, sptr, &buf); + if(size <= 0) return -1; + + for(bptr = buf, toGo = size; toGo;) { + ssize_t maySave = aper_put_length(po, -1, toGo); + if(maySave < 0) break; + if(per_put_many_bits(po, bptr, maySave * 8)) break; + bptr = (char *)bptr + maySave; + toGo -= maySave; + } + + FREEMEM(buf); + if(toGo) return -1; + + ASN_DEBUG("Open type put %s of length %ld + overhead (1byte?)", + td->name, size); + + return 0; +} + +asn_dec_rval_t +aper_open_type_get(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + + return aper_open_type_get_simple(ctx, td, constraints, sptr, pd); +} + +int +aper_open_type_skip(const asn_codec_ctx_t *ctx, asn_per_data_t *pd) { + asn_TYPE_descriptor_t s_td; + asn_dec_rval_t rv; + asn_TYPE_operation_t op_t; + + memset(&op_t, 0, sizeof(op_t)); + s_td.name = ""; + s_td.op = &op_t; + s_td.op->aper_decoder = uper_sot_suck; + + rv = aper_open_type_get(ctx, &s_td, 0, 0, pd); + if(rv.code != RC_OK) + return -1; + else + return 0; +} + + diff --git a/Bouncer/e2sm_kpm/lib/per_support.c b/Bouncer/e2sm_kpm/lib/per_support.c new file mode 100644 index 0000000..2c87a76 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/per_support.c @@ -0,0 +1,492 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * X.691-201508 #10.9 General rules for encoding a length determinant. + * Get the optionally constrained length "n" from the stream. + */ +ssize_t +uper_get_length(asn_per_data_t *pd, int ebits, size_t lower_bound, + int *repeat) { + ssize_t value; + + *repeat = 0; + + /* #11.9.4.1 Encoding if constrained (according to effective bits) */ + if(ebits >= 0 && ebits <= 16) { + value = per_get_few_bits(pd, ebits); + if(value >= 0) value += lower_bound; + return value; + } + + value = per_get_few_bits(pd, 8); + if((value & 0x80) == 0) { /* #11.9.3.6 */ + return (value & 0x7F); + } else if((value & 0x40) == 0) { /* #11.9.3.7 */ + /* bit 8 ... set to 1 and bit 7 ... set to zero */ + value = ((value & 0x3f) << 8) | per_get_few_bits(pd, 8); + return value; /* potential -1 from per_get_few_bits passes through. */ + } else if(value < 0) { + ASN_DEBUG("END of stream reached for PER"); + return -1; + } + value &= 0x3f; /* this is "m" from X.691, #11.9.3.8 */ + if(value < 1 || value > 4) { + return -1; /* Prohibited by #11.9.3.8 */ + } + *repeat = 1; + return (16384 * value); +} + +/* + * Get the normally small length "n". + * This procedure used to decode length of extensions bit-maps + * for SET and SEQUENCE types. + */ +ssize_t +uper_get_nslength(asn_per_data_t *pd) { + ssize_t length; + + ASN_DEBUG("Getting normally small length"); + + if(per_get_few_bits(pd, 1) == 0) { + length = per_get_few_bits(pd, 6) + 1; + if(length <= 0) return -1; + ASN_DEBUG("l=%d", (int)length); + return length; + } else { + int repeat; + length = uper_get_length(pd, -1, 0, &repeat); + if(length >= 0 && !repeat) return length; + return -1; /* Error, or do not support >16K extensions */ + } +} + +/* + * Get the normally small non-negative whole number. + * X.691, #10.6 + */ +ssize_t +uper_get_nsnnwn(asn_per_data_t *pd) { + ssize_t value; + + value = per_get_few_bits(pd, 7); + if(value & 64) { /* implicit (value < 0) */ + value &= 63; + value <<= 2; + value |= per_get_few_bits(pd, 2); + if(value & 128) /* implicit (value < 0) */ + return -1; + if(value == 0) + return 0; + if(value >= 3) + return -1; + value = per_get_few_bits(pd, 8 * value); + return value; + } + + return value; +} + +/* + * X.691-11/2008, #11.6 + * Encoding of a normally small non-negative whole number + */ +int +uper_put_nsnnwn(asn_per_outp_t *po, int n) { + int bytes; + + if(n <= 63) { + if(n < 0) return -1; + return per_put_few_bits(po, n, 7); + } + if(n < 256) + bytes = 1; + else if(n < 65536) + bytes = 2; + else if(n < 256 * 65536) + bytes = 3; + else + return -1; /* This is not a "normally small" value */ + if(per_put_few_bits(po, bytes, 8)) + return -1; + + return per_put_few_bits(po, n, 8 * bytes); +} + + +/* X.691-2008/11, #11.5.6 -> #11.3 */ +int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *out_value, int nbits) { + unsigned long lhalf; /* Lower half of the number*/ + long half; + + if(nbits <= 31) { + half = per_get_few_bits(pd, nbits); + if(half < 0) return -1; + *out_value = half; + return 0; + } + + if((size_t)nbits > 8 * sizeof(*out_value)) + return -1; /* RANGE */ + + half = per_get_few_bits(pd, 31); + if(half < 0) return -1; + + if(uper_get_constrained_whole_number(pd, &lhalf, nbits - 31)) + return -1; + + *out_value = ((unsigned long)half << (nbits - 31)) | lhalf; + return 0; +} + + +/* X.691-2008/11, #11.5.6 -> #11.3 */ +int +uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, + int nbits) { + if(nbits <= 31) { + return per_put_few_bits(po, v, nbits); + } else { + /* Put higher portion first, followed by lower 31-bit */ + if(uper_put_constrained_whole_number_u(po, v >> 31, nbits - 31)) + return -1; + return per_put_few_bits(po, v, 31); + } +} + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Put the length "n" (or part of it) into the stream. + */ +ssize_t +uper_put_length(asn_per_outp_t *po, size_t length, int *need_eom) { + int dummy = 0; + if(!need_eom) need_eom = &dummy; + + if(length <= 127) { /* #11.9.3.6 */ + *need_eom = 0; + return per_put_few_bits(po, length, 8) + ? -1 : (ssize_t)length; + } else if(length < 16384) { /* #10.9.3.7 */ + *need_eom = 0; + return per_put_few_bits(po, length|0x8000, 16) + ? -1 : (ssize_t)length; + } + + *need_eom = 0 == (length & 16383); + length >>= 14; + if(length > 4) { + *need_eom = 0; + length = 4; + } + + return per_put_few_bits(po, 0xC0 | length, 8) + ? -1 : (ssize_t)(length << 14); + +} + + +/* + * Put the normally small length "n" into the stream. + * This procedure used to encode length of extensions bit-maps + * for SET and SEQUENCE types. + */ +int +uper_put_nslength(asn_per_outp_t *po, size_t length) { + if(length <= 64) { + /* #11.9.3.4 */ + if(length == 0) return -1; + return per_put_few_bits(po, length - 1, 7) ? -1 : 0; + } else { + int need_eom = 0; + if(uper_put_length(po, length, &need_eom) != (ssize_t)length + || need_eom) { + /* This might happen in case of >16K extensions */ + return -1; + } + } + + return 0; +} + +static int +per__long_range(long lb, long ub, unsigned long *range_r) { + unsigned long bounds_range; + if((ub < 0) == (lb < 0)) { + bounds_range = ub - lb; + } else if(lb < 0) { + assert(ub >= 0); + bounds_range = 1 + ((unsigned long)ub + (unsigned long)-(lb + 1)); + } else { + assert(!"Unreachable"); + return -1; + } + *range_r = bounds_range; + return 0; +} + +int +per_long_range_rebase(long v, long lb, long ub, unsigned long *output) { + unsigned long range; + + assert(lb <= ub); + + if(v < lb || v > ub || per__long_range(lb, ub, &range) < 0) { + /* Range error. */ + return -1; + } + + /* + * Fundamentally what we're doing is returning (v-lb). + * However, this triggers undefined behavior when the word width + * of signed (v) is the same as the size of unsigned (*output). + * In practice, it triggers the UndefinedSanitizer. Therefore we shall + * compute the ranges accurately to avoid C's undefined behavior. + */ + if((v < 0) == (lb < 0)) { + *output = v-lb; + return 0; + } else if(v < 0) { + unsigned long rebased = 1 + (unsigned long)-(v+1) + (unsigned long)lb; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else if(lb < 0) { + unsigned long rebased = 1 + (unsigned long)-(lb+1) + (unsigned long)v; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else { + assert(!"Unreachable"); + return -1; + } +} + +int +per_long_range_unrebase(unsigned long inp, long lb, long ub, long *outp) { + unsigned long range; + + if(per__long_range(lb, ub, &range) != 0) { + return -1; + } + + if(inp > range) { + /* + * We can encode something in the given number of bits that technically + * exceeds the range. This is an avenue for security errors, + * so we don't allow that. + */ + return -1; + } + + if(inp <= LONG_MAX) { + *outp = (long)inp + lb; + } else { + *outp = (lb + LONG_MAX + 1) + (long)((inp - LONG_MAX) - 1); + } + + return 0; +} + +int32_t +aper_get_align(asn_per_data_t *pd) { + + if(pd->nboff & 0x7) { + ASN_DEBUG("Aligning %ld bits", 8 - ((unsigned long)pd->nboff & 0x7)); + return per_get_few_bits(pd, 8 - (pd->nboff & 0x7)); + } + return 0; +} + +ssize_t +aper_get_length(asn_per_data_t *pd, int range, int ebits, int *repeat) { + ssize_t value; + + *repeat = 0; + + // First check effective_bits parameter. + if (ebits >= 0) { + if (range <= 65536 && range >= 0) + return aper_get_nsnnwn(pd, range); + } + + if (aper_get_align(pd) < 0) + return -1; + + if(ebits >= 0) return per_get_few_bits(pd, ebits); + + value = per_get_few_bits(pd, 8); + if(value < 0) return -1; + if((value & 128) == 0) /* #10.9.3.6 */ + return (value & 0x7F); + if((value & 64) == 0) { /* #10.9.3.7 */ + value = ((value & 63) << 8) | per_get_few_bits(pd, 8); + if(value < 0) return -1; + return value; + } + value &= 63; /* this is "m" from X.691, #10.9.3.8 */ + if(value < 1 || value > 4) + return -1; + *repeat = 1; + return (16384 * value); +} + +ssize_t +aper_get_nslength(asn_per_data_t *pd) { + ssize_t length; + + ASN_DEBUG("Getting normally small length"); + + if(per_get_few_bits(pd, 1) == 0) { + length = per_get_few_bits(pd, 6) + 1; + if(length <= 0) return -1; + ASN_DEBUG("l=%ld", length); + return length; + } else { + int repeat; + length = aper_get_length(pd, -1, -1, &repeat); + if(length >= 0 && !repeat) return length; + return -1; /* Error, or do not support >16K extensions */ + } +} + +ssize_t +aper_get_nsnnwn(asn_per_data_t *pd, int range) { + ssize_t value; + int bytes = 0; + + ASN_DEBUG("getting nsnnwn with range %d", range); + + if(range <= 255) { + int i; + + if (range < 0) return -1; + /* 1 -> 8 bits */ + for (i = 1; i <= 8; i++) { + int upper = 1 << i; + if (upper >= range) + break; + } + value = per_get_few_bits(pd, i); + return value; + } else if (range == 256){ + /* 1 byte */ + bytes = 1; + } else if (range <= 65536) { + /* 2 bytes */ + bytes = 2; + } else { + return -1; + } + if (aper_get_align(pd) < 0) + return -1; + value = per_get_few_bits(pd, 8 * bytes); + return value; +} + +int aper_put_align(asn_per_outp_t *po) { + + if(po->nboff & 0x7) { + ASN_DEBUG("Aligning %ld bits", 8 - ((unsigned long)po->nboff & 0x7)); + if(per_put_few_bits(po, 0x00, (8 - (po->nboff & 0x7)))) + return -1; + } + return 0; +} + +ssize_t +aper_put_length(asn_per_outp_t *po, int range, size_t length) { + + ASN_DEBUG("APER put length %zu with range %d", length, range); + + /* 10.9 X.691 Note 2 */ + if (range <= 65536 && range >= 0) + return aper_put_nsnnwn(po, range, length); + + if (aper_put_align(po) < 0) + return -1; + + if(length <= 127) /* #10.9.3.6 */{ + return per_put_few_bits(po, length, 8) + ? -1 : (ssize_t)length; + } + else if(length < 16384) /* #10.9.3.7 */ + return per_put_few_bits(po, length|0x8000, 16) + ? -1 : (ssize_t)length; + + length >>= 14; + if(length > 4) length = 4; + + return per_put_few_bits(po, 0xC0 | length, 8) + ? -1 : (ssize_t)(length << 14); +} + + +int +aper_put_nslength(asn_per_outp_t *po, size_t length) { + + if(length <= 64) { + /* #10.9.3.4 */ + if(length == 0) return -1; + return per_put_few_bits(po, length-1, 7) ? -1 : 0; + } else { + if(aper_put_length(po, -1, length) != (ssize_t)length) { + /* This might happen in case of >16K extensions */ + return -1; + } + } + + return 0; +} + +int +aper_put_nsnnwn(asn_per_outp_t *po, int range, int number) { + int bytes; + + ASN_DEBUG("aper put nsnnwn %d with range %d", number, range); + /* 10.5.7.1 X.691 */ + if(range < 0) { + int i; + for (i = 1; ; i++) { + int bits = 1 << (8 * i); + if (number <= bits) + break; + } + bytes = i; + assert(i <= 4); + } + if(range <= 255) { + int i; + for (i = 1; i <= 8; i++) { + int bits = 1 << i; + if (range <= bits) + break; + } + return per_put_few_bits(po, number, i); + } else if(range == 256) { + bytes = 1; + } else if(range <= 65536) { + bytes = 2; + } else { /* Ranges > 64K */ + int i; + for (i = 1; ; i++) { + int bits = 1 << (8 * i); + if (range <= bits) + break; + } + assert(i <= 4); + bytes = i; + } + if(aper_put_align(po) < 0) /* Aligning on octet */ + return -1; +/* if(per_put_few_bits(po, bytes, 8)) + return -1; +*/ + return per_put_few_bits(po, number, 8 * bytes); +} diff --git a/Bouncer/e2sm_kpm/lib/xer_decoder.c b/Bouncer/e2sm_kpm/lib/xer_decoder.c new file mode 100644 index 0000000..5b87703 --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/xer_decoder.c @@ -0,0 +1,369 @@ +/* + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* XER/XML parsing support */ + + +/* + * Decode the XER encoding of a given type. + */ +asn_dec_rval_t +xer_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *buffer, size_t size) { + asn_codec_ctx_t s_codec_ctx; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* + * Invoke type-specific decoder. + */ + return td->op->xer_decoder(opt_codec_ctx, td, struct_ptr, 0, buffer, size); +} + + + +struct xer__cb_arg { + pxml_chunk_type_e chunk_type; + size_t chunk_size; + const void *chunk_buf; + int callback_not_invoked; +}; + +static int +xer__token_cb(pxml_chunk_type_e type, const void *_chunk_data, size_t _chunk_size, void *key) { + struct xer__cb_arg *arg = (struct xer__cb_arg *)key; + arg->chunk_type = type; + arg->chunk_size = _chunk_size; + arg->chunk_buf = _chunk_data; + arg->callback_not_invoked = 0; + return -1; /* Terminate the XML parsing */ +} + +/* + * Fetch the next token from the XER/XML stream. + */ +ssize_t +xer_next_token(int *stateContext, const void *buffer, size_t size, pxer_chunk_type_e *ch_type) { + struct xer__cb_arg arg; + int new_stateContext = *stateContext; + ssize_t ret; + + arg.callback_not_invoked = 1; + ret = pxml_parse(&new_stateContext, buffer, size, xer__token_cb, &arg); + if(ret < 0) return -1; + if(arg.callback_not_invoked) { + assert(ret == 0); /* No data was consumed */ + *ch_type = PXER_WMORE; + return 0; /* Try again with more data */ + } else { + assert(arg.chunk_size); + assert(arg.chunk_buf == buffer); + } + + /* + * Translate the XML chunk types into more convenient ones. + */ + switch(arg.chunk_type) { + case PXML_TEXT: + *ch_type = PXER_TEXT; + break; + case PXML_TAG: + *ch_type = PXER_WMORE; + return 0; /* Want more */ + case PXML_TAG_END: + *ch_type = PXER_TAG; + break; + case PXML_COMMENT: + case PXML_COMMENT_END: + *ch_type = PXER_COMMENT; + break; + } + + *stateContext = new_stateContext; + return arg.chunk_size; +} + +#define CSLASH 0x2f /* '/' */ +#define LANGLE 0x3c /* '<' */ +#define RANGLE 0x3e /* '>' */ + +xer_check_tag_e +xer_check_tag(const void *buf_ptr, int size, const char *need_tag) { + const char *buf = (const char *)buf_ptr; + const char *end; + xer_check_tag_e ct = XCT_OPENING; + + if(size < 2 || buf[0] != LANGLE || buf[size-1] != RANGLE) { + if(size >= 2) + ASN_DEBUG("Broken XML tag: \"%c...%c\"", + buf[0], buf[size - 1]); + return XCT_BROKEN; + } + + /* + * Determine the tag class. + */ + if(buf[1] == CSLASH) { + buf += 2; /* advance past "" */ + ct = XCT_CLOSING; + if(size > 0 && buf[size-1] == CSLASH) + return XCT_BROKEN; /* */ + } else { + buf++; /* advance past "<" */ + size -= 2; /* strip "<" and ">" */ + if(size > 0 && buf[size-1] == CSLASH) { + ct = XCT_BOTH; + size--; /* One more, for "/" */ + } + } + + /* Sometimes we don't care about the tag */ + if(!need_tag || !*need_tag) + return (xer_check_tag_e)(XCT__UNK__MASK | ct); + + /* + * Determine the tag name. + */ + for(end = buf + size; buf < end; buf++, need_tag++) { + int b = *buf, n = *need_tag; + if(b != n) { + if(n == 0) { + switch(b) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* "": whitespace is normal */ + return ct; + } + } + return (xer_check_tag_e)(XCT__UNK__MASK | ct); + } + if(b == 0) + return XCT_BROKEN; /* Embedded 0 in buf?! */ + } + if(*need_tag) + return (xer_check_tag_e)(XCT__UNK__MASK | ct); + + return ct; +} + + +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = (num_bytes); \ + buf_ptr = ((const char *)buf_ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + if(rval.code != RC_OK) \ + ASN_DEBUG("Failed with %d", rval.code); \ + return rval; \ + } while(0) + +#define XER_GOT_BODY(chunk_buf, chunk_size, size) do { \ + ssize_t converted_size = body_receiver \ + (struct_key, chunk_buf, chunk_size, \ + (size_t)chunk_size < size); \ + if(converted_size == -1) RETURN(RC_FAIL); \ + if(converted_size == 0 \ + && size == (size_t)chunk_size) \ + RETURN(RC_WMORE); \ + chunk_size = converted_size; \ + } while(0) +#define XER_GOT_EMPTY() do { \ + if(body_receiver(struct_key, 0, 0, size > 0) == -1) \ + RETURN(RC_FAIL); \ + } while(0) + +/* + * Generalized function for decoding the primitive values. + */ +asn_dec_rval_t +xer_decode_general(const asn_codec_ctx_t *opt_codec_ctx, + asn_struct_ctx_t *ctx, /* Type decoder context */ + void *struct_key, + const char *xml_tag, /* Expected XML tag */ + const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder) + (void *struct_key, const void *chunk_buf, size_t chunk_size), + ssize_t (*body_receiver) + (void *struct_key, const void *chunk_buf, size_t chunk_size, + int have_more) + ) { + + asn_dec_rval_t rval; + ssize_t consumed_myself = 0; + + (void)opt_codec_ctx; + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + */ + if(ctx->phase > 1) RETURN(RC_FAIL); + for(;;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, buf_ptr, size, + &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TEXT: + if(ctx->phase == 0) { + /* + * We have to ignore whitespace here, + * but in order to be forward compatible + * with EXTENDED-XER (EMBED-VALUES, #25) + * any text is just ignored here. + */ + } else { + XER_GOT_BODY(buf_ptr, ch_size, size); + } + ADVANCE(ch_size); + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + assert(ch_type == PXER_TAG && size); + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + /* + * Phase 0: + * Expecting the opening tag + * for the type being processed. + * Phase 1: + * Waiting for the closing XML tag. + */ + switch(tcv) { + case XCT_BOTH: + if(ctx->phase) break; + /* Finished decoding of an empty element */ + XER_GOT_EMPTY(); + ADVANCE(ch_size); + ctx->phase = 2; /* Phase out */ + RETURN(RC_OK); + case XCT_OPENING: + if(ctx->phase) break; + ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + case XCT_CLOSING: + if(!ctx->phase) break; + ADVANCE(ch_size); + ctx->phase = 2; /* Phase out */ + RETURN(RC_OK); + case XCT_UNKNOWN_BO: + /* + * Certain tags in the body may be expected. + */ + if(opt_unexpected_tag_decoder + && opt_unexpected_tag_decoder(struct_key, + buf_ptr, ch_size) >= 0) { + /* Tag's processed fine */ + ADVANCE(ch_size); + if(!ctx->phase) { + /* We are not expecting + * the closing tag anymore. */ + ctx->phase = 2; /* Phase out */ + RETURN(RC_OK); + } + continue; + } + /* Fall through */ + default: + break; /* Unexpected tag */ + } + + ASN_DEBUG("Unexpected XML tag (expected \"%s\")", xml_tag); + break; /* Dark and mysterious things have just happened */ + } + + RETURN(RC_FAIL); +} + + +size_t +xer_whitespace_span(const void *chunk_buf, size_t chunk_size) { + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + + for(; p < pend; p++) { + switch(*p) { + /* X.693, #8.1.4 + * HORISONTAL TAB (9) + * LINE FEED (10) + * CARRIAGE RETURN (13) + * SPACE (32) + */ + case 0x09: case 0x0a: case 0x0d: case 0x20: + continue; + default: + break; + } + break; + } + return (p - (const char *)chunk_buf); +} + +/* + * This is a vastly simplified, non-validating XML tree skipper. + */ +int +xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth) { + assert(*depth > 0); + switch(tcv) { + case XCT_BOTH: + case XCT_UNKNOWN_BO: + /* These negate each other. */ + return 0; + case XCT_OPENING: + case XCT_UNKNOWN_OP: + ++(*depth); + return 0; + case XCT_CLOSING: + case XCT_UNKNOWN_CL: + if(--(*depth) == 0) + return (tcv == XCT_CLOSING) ? 2 : 1; + return 0; + default: + return -1; + } +} diff --git a/Bouncer/e2sm_kpm/lib/xer_encoder.c b/Bouncer/e2sm_kpm/lib/xer_encoder.c new file mode 100644 index 0000000..4177ede --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/xer_encoder.c @@ -0,0 +1,237 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * The XER encoder of any type. May be invoked by the application. + */ +asn_enc_rval_t +xer_encode(const asn_TYPE_descriptor_t *td, const void *sptr, + enum xer_encoder_flags_e xer_flags, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + asn_enc_rval_t tmper; + const char *mname; + size_t mlen; + int xcan = (xer_flags & XER_F_CANONICAL) ? 1 : 2; + + if(!td || !sptr) goto cb_failed; + + mname = td->xml_tag; + mlen = strlen(mname); + + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + tmper = td->op->xer_encoder(td, sptr, 1, xer_flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("\n", xcan); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +/* + * This is a helper function for xer_fprint, which directs all incoming data + * into the provided file descriptor. + */ +static int +xer__print2fp(const void *buffer, size_t size, void *app_key) { + FILE *stream = (FILE *)app_key; + + if(fwrite(buffer, 1, size, stream) != size) + return -1; + + return 0; +} + +int +xer_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, const void *sptr) { + asn_enc_rval_t er = {0,0,0}; + + if(!stream) stream = stdout; + if(!td || !sptr) + return -1; + + er = xer_encode(td, sptr, XER_F_BASIC, xer__print2fp, stream); + if(er.encoded == -1) + return -1; + + return fflush(stream); +} + +struct xer_buffer { + char *buffer; + size_t buffer_size; + size_t allocated_size; +}; + +static int +xer__buffer_append(const void *buffer, size_t size, void *app_key) { + struct xer_buffer *xb = app_key; + + while(xb->buffer_size + size + 1 > xb->allocated_size) { + size_t new_size = 2 * (xb->allocated_size ? xb->allocated_size : 64); + char *new_buf = MALLOC(new_size); + if(!new_buf) return -1; + if (xb->buffer) { + memcpy(new_buf, xb->buffer, xb->buffer_size); + } + FREEMEM(xb->buffer); + xb->buffer = new_buf; + xb->allocated_size = new_size; + } + + memcpy(xb->buffer + xb->buffer_size, buffer, size); + xb->buffer_size += size; + xb->buffer[xb->buffer_size] = '\0'; + return 0; +} + +enum xer_equivalence_e +xer_equivalent(const struct asn_TYPE_descriptor_s *td, const void *struct1, + const void *struct2, FILE *opt_debug_stream) { + struct xer_buffer xb1 = {0, 0, 0}; + struct xer_buffer xb2 = {0, 0, 0}; + asn_enc_rval_t e1, e2; + asn_dec_rval_t rval; + void *sptr = NULL; + + if(!td || !struct1 || !struct2) { + if(opt_debug_stream) { + if(!td) fprintf(opt_debug_stream, "Type descriptor missing\n"); + if(!struct1) fprintf(opt_debug_stream, "Structure 1 missing\n"); + if(!struct2) fprintf(opt_debug_stream, "Structure 2 missing\n"); + } + return XEQ_FAILURE; + } + + e1 = xer_encode(td, struct1, XER_F_BASIC, xer__buffer_append, &xb1); + if(e1.encoded == -1) { + if(opt_debug_stream) { + fprintf(stderr, "XER Encoding of %s failed\n", td->name); + } + FREEMEM(xb1.buffer); + return XEQ_ENCODE1_FAILED; + } + + e2 = xer_encode(td, struct2, XER_F_BASIC, xer__buffer_append, &xb2); + if(e2.encoded == -1) { + if(opt_debug_stream) { + fprintf(stderr, "XER Encoding of %s failed\n", td->name); + } + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ENCODE1_FAILED; + } + + if(xb1.buffer_size != xb2.buffer_size + || memcmp(xb1.buffer, xb2.buffer, xb1.buffer_size) != 0) { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Structures XER-encoded into different byte streams:\n=== " + "Structure 1 ===\n%s\n=== Structure 2 ===\n%s\n", + xb1.buffer, xb2.buffer); + } + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_DIFFERENT; + } else { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Both structures encoded into the same XER byte stream " + "of size %" ASN_PRI_SIZE ":\n%s", + xb1.buffer_size, xb1.buffer); + } + } + + rval = xer_decode(NULL, td, (void **)&sptr, xb1.buffer, + xb1.buffer_size); + switch(rval.code) { + case RC_OK: + break; + case RC_WMORE: + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Structure %s XER decode unexpectedly requires " + "more data:\n%s\n", + td->name, xb1.buffer); + } + /* Fall through */ + case RC_FAIL: + default: + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Structure %s XER decoding resulted in failure.\n", + td->name); + } + ASN_STRUCT_FREE(*td, sptr); + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_DECODE_FAILED; + } + + if(rval.consumed != xb1.buffer_size + && ((rval.consumed > xb1.buffer_size) + || xer_whitespace_span(xb1.buffer + rval.consumed, + xb1.buffer_size - rval.consumed) + != (xb1.buffer_size - rval.consumed))) { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Round-trip decode of %s required less bytes (%" ASN_PRI_SIZE ") than " + "encoded (%" ASN_PRI_SIZE ")\n", + td->name, rval.consumed, xb1.buffer_size); + } + ASN_STRUCT_FREE(*td, sptr); + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ROUND_TRIP_FAILED; + } + + /* + * Reuse xb2 to encode newly decoded structure. + */ + FREEMEM(xb2.buffer); + memset(&xb2, 0, sizeof(xb2)); + + e2 = xer_encode(td, sptr, XER_F_BASIC, xer__buffer_append, &xb2); + if(e2.encoded == -1) { + if(opt_debug_stream) { + fprintf(stderr, "XER Encoding of round-trip decode of %s failed\n", + td->name); + } + ASN_STRUCT_FREE(*td, sptr); + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ROUND_TRIP_FAILED; + } + + ASN_STRUCT_FREE(*td, sptr); + sptr = 0; + + if(xb1.buffer_size != xb2.buffer_size + || memcmp(xb1.buffer, xb2.buffer, xb1.buffer_size) != 0) { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "XER Encoding of round-trip decode of %s resulted in " + "different byte stream:\n" + "=== Original ===\n%s\n" + "=== Round-tripped ===\n%s\n", + xb1.buffer, xb2.buffer, td->name); + } + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ROUND_TRIP_FAILED; + } + + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_SUCCESS; +} + diff --git a/Bouncer/e2sm_kpm/lib/xer_support.c b/Bouncer/e2sm_kpm/lib/xer_support.c new file mode 100644 index 0000000..36b4bfb --- /dev/null +++ b/Bouncer/e2sm_kpm/lib/xer_support.c @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2003, 2004 X/IO Labs, xiolabs.com. + * Copyright (c) 2003, 2004, 2005 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* Parser states */ +typedef enum { + ST_TEXT, + ST_TAG_START, + ST_TAG_BODY, + ST_TAG_QUOTE_WAIT, + ST_TAG_QUOTED_STRING, + ST_TAG_UNQUOTED_STRING, + ST_COMMENT_WAIT_DASH1, /* ""[0] */ + ST_COMMENT_CLO_RT /* "-->"[1] */ +} pstate_e; + +static const int +_charclass[256] = { + 0,0,0,0,0,0,0,0, 0,1,1,0,1,1,0,0, + 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, + 1,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, + 2,2,2,2,2,2,2,2, 2,2,0,0,0,0,0,0, /* 01234567 89 */ + 0,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, /* ABCDEFG HIJKLMNO */ + 3,3,3,3,3,3,3,3, 3,3,3,0,0,0,0,0, /* PQRSTUVW XYZ */ + 0,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, /* abcdefg hijklmno */ + 3,3,3,3,3,3,3,3, 3,3,3,0,0,0,0,0 /* pqrstuvw xyz */ +}; +#define WHITESPACE(c) (_charclass[(unsigned char)(c)] == 1) +#define ALNUM(c) (_charclass[(unsigned char)(c)] >= 2) +#define ALPHA(c) (_charclass[(unsigned char)(c)] == 3) + +/* Aliases for characters, ASCII/UTF-8 */ +#define EXCLAM 0x21 /* '!' */ +#define CQUOTE 0x22 /* '"' */ +#define CDASH 0x2d /* '-' */ +#define CSLASH 0x2f /* '/' */ +#define LANGLE 0x3c /* '<' */ +#define CEQUAL 0x3d /* '=' */ +#define RANGLE 0x3e /* '>' */ +#define CQUEST 0x3f /* '?' */ + +/* Invoke token callback */ +#define TOKEN_CB_CALL(type, _ns, _current_too, _final) do { \ + int _ret; \ + pstate_e ns = _ns; \ + ssize_t _sz = (p - chunk_start) + _current_too; \ + if (!_sz) { \ + /* Shortcut */ \ + state = _ns; \ + break; \ + } \ + _ret = cb(type, chunk_start, _sz, key); \ + if(_ret < _sz) { \ + if(_current_too && _ret == -1) \ + state = ns; \ + goto finish; \ + } \ + chunk_start = p + _current_too; \ + state = ns; \ + } while(0) + +#define TOKEN_CB(_type, _ns, _current_too) \ + TOKEN_CB_CALL(_type, _ns, _current_too, 0) + +#define PXML_TAG_FINAL_CHUNK_TYPE PXML_TAG_END +#define PXML_COMMENT_FINAL_CHUNK_TYPE PXML_COMMENT_END + +#define TOKEN_CB_FINAL(_type, _ns, _current_too) \ + TOKEN_CB_CALL( _type ## _FINAL_CHUNK_TYPE , _ns, _current_too, 1) + +/* + * Parser itself + */ +ssize_t pxml_parse(int *stateContext, const void *xmlbuf, size_t size, pxml_callback_f *cb, void *key) { + pstate_e state = (pstate_e)*stateContext; + const char *chunk_start = (const char *)xmlbuf; + const char *p = chunk_start; + const char *end = p + size; + + for(; p < end; p++) { + int C = *(const unsigned char *)p; + switch(state) { + case ST_TEXT: + /* + * Initial state: we're in the middle of some text, + * or just have started. + */ + if (C == LANGLE) + /* We're now in the tag, probably */ + TOKEN_CB(PXML_TEXT, ST_TAG_START, 0); + break; + case ST_TAG_START: + if (ALPHA(C) || (C == CSLASH)) + state = ST_TAG_BODY; + else if (C == EXCLAM) + state = ST_COMMENT_WAIT_DASH1; + else + /* + * Not characters and not whitespace. + * Must be something like "3 < 4". + */ + TOKEN_CB(PXML_TEXT, ST_TEXT, 1);/* Flush as data */ + break; + case ST_TAG_BODY: + switch(C) { + case RANGLE: + /* End of the tag */ + TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); + break; + case LANGLE: + /* + * The previous tag wasn't completed, but still + * recognized as valid. (Mozilla-compatible) + */ + TOKEN_CB_FINAL(PXML_TAG, ST_TAG_START, 0); + break; + case CEQUAL: + state = ST_TAG_QUOTE_WAIT; + break; + } + break; + case ST_TAG_QUOTE_WAIT: + /* + * State after the equal sign ("=") in the tag. + */ + switch(C) { + case CQUOTE: + state = ST_TAG_QUOTED_STRING; + break; + case RANGLE: + /* End of the tag */ + TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); + break; + default: + if(!WHITESPACE(C)) + /* Unquoted string value */ + state = ST_TAG_UNQUOTED_STRING; + } + break; + case ST_TAG_QUOTED_STRING: + /* + * Tag attribute's string value in quotes. + */ + if(C == CQUOTE) { + /* Return back to the tag state */ + state = ST_TAG_BODY; + } + break; + case ST_TAG_UNQUOTED_STRING: + if(C == RANGLE) { + /* End of the tag */ + TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); + } else if(WHITESPACE(C)) { + /* Return back to the tag state */ + state = ST_TAG_BODY; + } + break; + case ST_COMMENT_WAIT_DASH1: + if(C == CDASH) { + state = ST_COMMENT_WAIT_DASH2; + } else { + /* Some ordinary tag. */ + state = ST_TAG_BODY; + } + break; + case ST_COMMENT_WAIT_DASH2: + if(C == CDASH) { + /* Seen "<--" */ + state = ST_COMMENT; + } else { + /* Some ordinary tag */ + state = ST_TAG_BODY; + } + break; + case ST_COMMENT: + if(C == CDASH) { + state = ST_COMMENT_CLO_DASH2; + } + break; + case ST_COMMENT_CLO_DASH2: + if(C == CDASH) { + state = ST_COMMENT_CLO_RT; + } else { + /* This is not an end of a comment */ + state = ST_COMMENT; + } + break; + case ST_COMMENT_CLO_RT: + if(C == RANGLE) { + TOKEN_CB_FINAL(PXML_COMMENT, ST_TEXT, 1); + } else if(C == CDASH) { + /* Maintain current state, still waiting for '>' */ + } else { + state = ST_COMMENT; + } + break; + } /* switch(*ptr) */ + } /* for() */ + + /* + * Flush the partially processed chunk, state permitting. + */ + if(p - chunk_start) { + switch (state) { + case ST_COMMENT: + TOKEN_CB(PXML_COMMENT, state, 0); + break; + case ST_TEXT: + TOKEN_CB(PXML_TEXT, state, 0); + break; + default: break; /* a no-op */ + } + } + +finish: + *stateContext = (int)state; + return chunk_start - (const char *)xmlbuf; +} + diff --git a/Bouncer/e2sm_kpm/wrapper.c b/Bouncer/e2sm_kpm/wrapper.c new file mode 100644 index 0000000..61ec30f --- /dev/null +++ b/Bouncer/e2sm_kpm/wrapper.c @@ -0,0 +1,252 @@ +#include +#include "wrapper.h" +#include + + +// int main() { + +// long id[] = {1,2,3,4}; + +// void *buffer[8] = {} ; +// unsigned int sizeBuffer = 8; +// long actionDefCount = 8; +// long measId = 1; +// long ricStyleType = 1; +// long periods = 1; +// void *plm[8] = {} ; +// unsigned int sizePlm = 8; +// void *nRc[8] = {} ; +// unsigned int sizenRc = 8; + +// int a = e2sm_encode_ric_action_definition(buffer, sizeBuffer, actionDefCount, measId, ricStyleType, periods, plm, nRc); + +// printf("%d", a); + +// return 0; +// } + +ssize_t e2sm_encode_ric_event_trigger_definition(void *buffer, size_t buf_size, size_t event_trigger_count, long *RT_periods) { + E2SM_KPM_EventTriggerDefinition_t *eventTriggerDef = (E2SM_KPM_EventTriggerDefinition_t *)calloc(1, sizeof(E2SM_KPM_EventTriggerDefinition_t)); + if(!eventTriggerDef) { + fprintf(stderr, "Alloc EventTriggerDefinition failed\n"); + return -1; + } + + E2SM_KPM_EventTriggerDefinition_Format1_t *innerDef = (E2SM_KPM_EventTriggerDefinition_Format1_t *)calloc(1, sizeof(E2SM_KPM_EventTriggerDefinition_Format1_t)); + if(!innerDef) { + fprintf(stderr, "alloc EventTriggerDefinition Format1 failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_EventTriggerDefinition, eventTriggerDef); + return -1; + } + + eventTriggerDef->eventDefinition_formats.present = E2SM_KPM_EventTriggerDefinition__eventDefinition_formats_PR_eventDefinition_Format1; + eventTriggerDef->eventDefinition_formats.choice.eventDefinition_Format1 = innerDef; + + // struct E2SM_KPM_EventTriggerDefinition_Format1__policyTest_List *policyTestList = (struct E2SM_KPM_EventTriggerDefinition_Format1__policyTest_List *)calloc(1, sizeof(struct E2SM_KPM_EventTriggerDefinition_Format1__policyTest_List)); + // innerDef->policyTest_List = policyTestList; + + // int index = 0; + // while(index < event_trigger_count) { + // Trigger_ConditionIE_Item *triggerCondition = (Trigger_ConditionIE_Item *)calloc(1, sizeof(Trigger_ConditionIE_Item)); + // assert(triggerCondition != 0); + // triggerCondition->report_Period_IE = RT_periods[index]; + // ASN_SEQUENCE_ADD(&policyTestList->list, triggerCondition); + // index++; + // } + + asn_enc_rval_t encode_result; + encode_result = uper_encode_to_buffer(&asn_DEF_E2SM_KPM_EventTriggerDefinition, NULL, eventTriggerDef, buffer, buf_size); + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_EventTriggerDefinition, eventTriggerDef); + if(encode_result.encoded == -1) { + fprintf(stderr, "Cannot encode %s: %s\n", encode_result.failed_type->name, strerror(errno)); + return -1; + } else { + return encode_result.encoded; + } +} +// int main() { + +// long id[] = {1,2,3,4}; + +// void *buffer[8] = {} ; +// unsigned int sizeBuffer = 8; +// long actionDefCount = 8; +// long measId = 1; +// long ricStyleType = 1; +// long periods = 1; +// void *plm[8] = {} ; +// unsigned int sizePlm = 8; +// void *nRc[8] = {} ; +// unsigned int sizenRc = 8; + +// int a = e2sm_encode_ric_action_definition(buffer, sizeBuffer, actionDefCount, measId, ricStyleType, periods, plm, nRc); + +// printf("%d", a); + +// return 0; +// } + +/* +ssize_t e2sm_encode_ric_action_definition(void *buffer, size_t buf_size, long action_Def_count, long meas_ID, long ric_style_type, long GR_periods, Plm plm, Nrc nRc) { + E2SM_KPM_ActionDefinition_t *actionDef = (E2SM_KPM_ActionDefinition_t *)calloc(1, sizeof(E2SM_KPM_ActionDefinition_t)); + if(!actionDef) { + fprintf(stderr, "alloc RIC ActionDefinition failed\n"); + return -1; + } + + E2SM_KPM_ActionDefinition_Format1_t *actionDefFor1 = (E2SM_KPM_ActionDefinition_Format1_t *)calloc(1, sizeof(E2SM_KPM_ActionDefinition_Format1_t)); + if(!actionDefFor1) { + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_ActionDefinition, actionDef); + fprintf(stderr, "alloc RIC ActionDefinition failed\n"); + return -1; + } + CGI_t *cellGlobal = (CGI_t *)calloc(1, sizeof(CGI_t)); + if(!cellGlobal) { + fprintf(stderr, "alloc RIC ActionDefinition failed\n"); + return -1; + } + + NR_CGI_t *nrCGIs = (NR_CGI_t *)calloc(1, sizeof(NR_CGI_t)); + if(!nrCGIs) { + fprintf(stderr, "alloc RIC ActionDefinition failed\n"); + return -1; + } + + actionDef->ric_Style_Type = ric_style_type; + actionDef->actionDefinition_formats.present = E2SM_KPM_ActionDefinition__actionDefinition_formats_PR_actionDefinition_Format1; + actionDef->actionDefinition_formats.choice.actionDefinition_Format1 = actionDefFor1; + actionDefFor1->granulPeriod = GR_periods; + actionDefFor1->cellGlobalID = cellGlobal; + cellGlobal->present = CGI_PR_nR_CGI; + cellGlobal->choice.nR_CGI = nrCGIs; + + + int plmSize = plm.size; + if(plmSize != 0) { + + } + + PLMNIdentity_t *plms = &nrCGIs->pLMNIdentity; + plms->buf = (uint8_t *)calloc(1, plmSize); + if(!plms->buf) { + fprintf(stderr, "alloc plms failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_ActionDefinition, actionDef); + return -1; + } + + memcpy(plms->buf, plm.plms, plmSize); + plms->size = plmSize; + + + int nRcSize = nRc.size; + + NRCellIdentity_t *nRCs = &nrCGIs->nRCellIdentity; + nRCs->buf = (uint8_t *)calloc(1, nRcSize); + if(!nRCs->buf) { + fprintf(stderr, "alloc nRCs failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_ActionDefinition, actionDef); + return -1; + } + + memcpy(nRCs->buf, nRc.nRcs, nRcSize); + nRCs->size = nRcSize; + + + MeasurementInfoList_t *infoList = &actionDefFor1->measInfoList; + + int index = 0; + while(index < action_Def_count) { + MeasurementInfoItem_t *infoItem = (MeasurementInfoItem_t *)calloc(1, sizeof(MeasurementInfoItem_t)); + // if(!infoItem) { + // fprintf(stderr, "alloc Measurement Info Item failed\n"); + // ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_ActionDefinition, actionDef); + // return -1; + // } + assert(infoItem != 0); + + + MeasurementType_t *measureType = &infoItem->measType; + + measureType->present = MeasurementType_PR_measID; + measureType->choice.measID = meas_ID; + + + LabelInfoList_t *lableList = &infoItem->labelInfoList; + + ASN_SEQUENCE_ADD(&infoList->list, infoItem); + index++; + } + + asn_enc_rval_t encode_result; + encode_result = uper_encode_to_buffer(&asn_DEF_E2SM_KPM_ActionDefinition, NULL,actionDef, buffer, buf_size); + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_ActionDefinition, actionDef); + + if(encode_result.encoded == -1) { + fprintf(stderr, "Cannot encode %s: %s\n", encode_result.failed_type->name, strerror(errno)); + return -1; + } else { + fprintf(stderr, "successfully\n"); + return encode_result.encoded; + } +} +*/ +E2SM_KPM_IndicationHeader_t* e2sm_decode_ric_indication_header(void *buffer, size_t buf_size) { + asn_dec_rval_t decode_result; + E2SM_KPM_IndicationHeader_t *indHdr = 0; + //fprintf(stderr, "\nbuffer= %p",buffer); + //fprintf(stdout, "\nbuf_size=%ld",buf_size); + //fprintf(stdout, "\nE2SM_KPM_IndicationHeader_t_size=%ld",sizeof(E2SM_KPM_IndicationHeader_t)); + //decode_result = uper_decode_complete(NULL, &asn_DEF_E2SM_KPM_IndicationHeader, (void **)&indHdr, (char*)buffer, buf_size); + //ATS_ALIGNED_CANONICAL_PER + decode_result =asn_decode(0,ATS_ALIGNED_BASIC_PER,&asn_DEF_E2SM_KPM_IndicationHeader,(void **)&indHdr,buffer,buf_size); + if(decode_result.code == RC_OK) { + // xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationHeader, indHdr); + return indHdr; + } + else if (decode_result.code ==RC_WMORE ) { + //xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationHeader, indHdr); + //fprintf(stderr, "\n decode_result.consumed= %ld \n",decode_result.consumed); + fprintf(stderr, "\nheader RC_WMORE "); + return indHdr; + } + + else { + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationHeader, indHdr); + return NULL; + } +} + +void e2sm_free_ric_indication_header(E2SM_KPM_IndicationHeader_t* indHdr) { + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationHeader, indHdr); +} + +E2SM_KPM_IndicationMessage_t* e2sm_decode_ric_indication_message(void *buffer, size_t buf_size) { + asn_dec_rval_t decode_result; + E2SM_KPM_IndicationMessage_t *indMsg = 0; + //fprintf(stdout, "\nbuffer= %p",buffer); + //fprintf(stdout, "\nbuf_size=%ld",buf_size); + //fprintf(stdout, "\nE2SM_KPM_IndicationMessage_t size=%ld",sizeof(E2SM_KPM_IndicationMessage_t)); + //decode_result = uper_decode_complete(NULL, &asn_DEF_E2SM_KPM_IndicationMessage, (void **)&indMsg, (char *)buffer, buf_size); + //ATS_ALIGNED_CANONICAL_PER + decode_result =asn_decode(0,ATS_ALIGNED_BASIC_PER,&asn_DEF_E2SM_KPM_IndicationMessage,(void **)&indMsg,buffer,buf_size); + if(decode_result.code == RC_OK) { + //xer_fprint(stdout, &asn_DEF_E2SM_KPM_IndicationMessage, indMsg); + return indMsg; + } + else if (decode_result.code ==RC_WMORE ) { + //xer_fprint(stderr, &asn_DEF_E2SM_KPM_IndicationMessage, indMsg); + //fprintf(stderr, "\n MSG decode_result.consumed= %ld \n",decode_result.consumed); + fprintf(stderr, "\n MSG RC_WMORE "); + return NULL; + } + + else { + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationMessage, indMsg); + return NULL; + } +} + +void e2sm_free_ric_indication_message(E2SM_KPM_IndicationMessage_t* indMsg) { + ASN_STRUCT_FREE(asn_DEF_E2SM_KPM_IndicationMessage, indMsg); +} + diff --git a/Bouncer/e2sm_kpm/wrapper.h b/Bouncer/e2sm_kpm/wrapper.h new file mode 100644 index 0000000..a3bb5f3 --- /dev/null +++ b/Bouncer/e2sm_kpm/wrapper.h @@ -0,0 +1,104 @@ +#ifndef _WRAPPER_H_ +#define _WRAPPER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include "asn_application.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +typedef struct Plm { + uint8_t *plms; + int size; +} Plm; + + +typedef struct Nrc { + uint8_t *nRcs; + int size; + int bits_unused; +} Nrc; +*/ +ssize_t e2sm_encode_ric_event_trigger_definition(void *buffer, size_t buf_size, size_t event_trigger_count, long *RT_periods); +//ssize_t e2sm_encode_ric_action_definition(void *buffer, size_t buf_size, long action_Def_count, long meas_ID, long ric_style_type, long GR_periods, Plm plm, Nrc nRc); +E2SM_KPM_IndicationHeader_t* e2sm_decode_ric_indication_header(void *buffer, size_t buf_size); +void e2sm_free_ric_indication_header(E2SM_KPM_IndicationHeader_t* indHdr); +E2SM_KPM_IndicationMessage_t* e2sm_decode_ric_indication_message(void *buffer, size_t buf_size); +void e2sm_free_ric_indication_message(E2SM_KPM_IndicationMessage_t* indMsg); + +#endif /* _WRAPPER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/.RANParameter-Testing-Item.h.swp b/Bouncer/e2sm_rc/headers/.RANParameter-Testing-Item.h.swp new file mode 100644 index 0000000000000000000000000000000000000000..10f357087835fbd5f374ceda266cd393f1ba5310 GIT binary patch literal 12288 zcmeI2&2Jk;7{;enfi5Hk!4Zj0okMBVwPVw&3TYz++i5Hj$2cyiK(!g~j_ZZ}(#&p} zs)Tal2ndN2Z~zJZ08WUHV-MW8RBGXd#2Ju^fCCcGtnJiJY$s_C2sD;{T4(0nciwsC z;~gv0oO!XbOwVLb5qusa&N;4ZJ8q5_q%Z7Tn=^+CnX4~UYfLbo$6S~VE@L;iY*u3K zXWQdi(REq@t-x>vCdo5}{EVub${eFlJbq!gnJ(1|Xa%$aS^=$qRzNGD70?Q31^$-` z#L)qA9X&hP?OnC|Jh1KA{Zl`*0$KsBfL1^&pcT*xXa%$aS^=$qRzNGD75EP-z#Kx} zK19e54Wz9vlG^;PxYg+ydW%cfqURIQZ>hLVg9`gU`TQpaPD7n+758 zgEF{tn2=Avhu{tH5~zU^SO62?mxs^}xCy=lAAtA3JK$w74~~MTfC0XH5ce0rIdB%7 z0LK9ZN5LKFr!>5+bkrZMfL1^&@UJQ`c3-Ub?;bN>W-DQWYOsy?un$fWRpy}Er++LW!aIJNChE$Lpi0&f8%1UZ28=8a$&`3 z$?|jcG4AuP6fVv6J6J8haG_i+mMs}^+ikhF?D|=)7038d*3!xkxJqMjxU_{E#bGa= zQh9N-pE&|GDt_c~A2-=p?1n+w{Y^Srp?HoMs_QZqi5**Zyn%=(L5G13Q}rV)(XrpKugIgkiQQYJWUaxc7+ zRd%$|b|sCkMx5f=HNzVxRnx@Sq=E%o7wD`8>=4x0i0>(6#EiD=cIet^1DzfiD!|?P zkQ$Bdg^~8dFggN{8Hr-rxK-|q-XilPH>OqZtsyl^g#Ef~h-A1&Rk1IJtLbD(#5Q+Z z#rtyhyes3uj;a#nA_>$C9zA!h9dpA<=rz2!uUBey8VN43V$kNUqqMV4)#5;dm68=3 zgY&jhnj>nCtIcP(Cg2Z?uHWOpz0q_<@8)Cpl-cK7ooTVxmsWdoVvg+fmCiV$vx}j) z!h}N|ZhN>at2VB5Cn4i@uAL)c)#@0+bk8c^-EVw$m9i+}4EvPYcGA76U*5r#G1P5Z zI84-SLqCvw_UuUsjs5O^V%k#wKK-a6xd#{3mBvz~dj6!^d#fR}Lq7@wtSH%AT1xcZ z0^mX756tg93_xd5lz4x|K@ zEH157isgZ-O#k4Rl~T5yNt11QI#CI+69V%vhquSL2DpMQQ4oY?Hy#s_suCCHD8cR6>|{S` zMow~$C2>g2%RDe^<$CAKiu!`rRUzMC>X<>z63woqEw zp=6ZFq6mGuuv*RLsUJEC-p-T@tIKA+XjaNHH95}%j^)oC+QgbwT`*^|v)RHdeYzdT X(X+XnhpmCfSvP2fxzykUhJpM89Qfm| literal 0 HcmV?d00001 diff --git a/Bouncer/e2sm_rc/headers/AMF-UE-NGAP-ID.h b/Bouncer/e2sm_rc/headers/AMF-UE-NGAP-ID.h new file mode 100644 index 0000000..932f0b6 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/AMF-UE-NGAP-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _AMF_UE_NGAP_ID_H_ +#define _AMF_UE_NGAP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMF-UE-NGAP-ID */ +typedef INTEGER_t AMF_UE_NGAP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMF_UE_NGAP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMF_UE_NGAP_ID; +asn_struct_free_f AMF_UE_NGAP_ID_free; +asn_struct_print_f AMF_UE_NGAP_ID_print; +asn_constr_check_f AMF_UE_NGAP_ID_constraint; +ber_type_decoder_f AMF_UE_NGAP_ID_decode_ber; +der_type_encoder_f AMF_UE_NGAP_ID_encode_der; +xer_type_decoder_f AMF_UE_NGAP_ID_decode_xer; +xer_type_encoder_f AMF_UE_NGAP_ID_encode_xer; +oer_type_decoder_f AMF_UE_NGAP_ID_decode_oer; +oer_type_encoder_f AMF_UE_NGAP_ID_encode_oer; +per_type_decoder_f AMF_UE_NGAP_ID_decode_uper; +per_type_encoder_f AMF_UE_NGAP_ID_encode_uper; +per_type_decoder_f AMF_UE_NGAP_ID_decode_aper; +per_type_encoder_f AMF_UE_NGAP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMF_UE_NGAP_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/AMFPointer.h b/Bouncer/e2sm_rc/headers/AMFPointer.h new file mode 100644 index 0000000..92ce162 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/AMFPointer.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _AMFPointer_H_ +#define _AMFPointer_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMFPointer */ +typedef BIT_STRING_t AMFPointer_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMFPointer_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMFPointer; +asn_struct_free_f AMFPointer_free; +asn_struct_print_f AMFPointer_print; +asn_constr_check_f AMFPointer_constraint; +ber_type_decoder_f AMFPointer_decode_ber; +der_type_encoder_f AMFPointer_encode_der; +xer_type_decoder_f AMFPointer_decode_xer; +xer_type_encoder_f AMFPointer_encode_xer; +oer_type_decoder_f AMFPointer_decode_oer; +oer_type_encoder_f AMFPointer_encode_oer; +per_type_decoder_f AMFPointer_decode_uper; +per_type_encoder_f AMFPointer_encode_uper; +per_type_decoder_f AMFPointer_decode_aper; +per_type_encoder_f AMFPointer_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMFPointer_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/AMFRegionID.h b/Bouncer/e2sm_rc/headers/AMFRegionID.h new file mode 100644 index 0000000..ff98dd1 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/AMFRegionID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _AMFRegionID_H_ +#define _AMFRegionID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMFRegionID */ +typedef BIT_STRING_t AMFRegionID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMFRegionID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMFRegionID; +asn_struct_free_f AMFRegionID_free; +asn_struct_print_f AMFRegionID_print; +asn_constr_check_f AMFRegionID_constraint; +ber_type_decoder_f AMFRegionID_decode_ber; +der_type_encoder_f AMFRegionID_encode_der; +xer_type_decoder_f AMFRegionID_decode_xer; +xer_type_encoder_f AMFRegionID_encode_xer; +oer_type_decoder_f AMFRegionID_decode_oer; +oer_type_encoder_f AMFRegionID_encode_oer; +per_type_decoder_f AMFRegionID_decode_uper; +per_type_encoder_f AMFRegionID_encode_uper; +per_type_decoder_f AMFRegionID_decode_aper; +per_type_encoder_f AMFRegionID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMFRegionID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/AMFSetID.h b/Bouncer/e2sm_rc/headers/AMFSetID.h new file mode 100644 index 0000000..ed26a69 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/AMFSetID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _AMFSetID_H_ +#define _AMFSetID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMFSetID */ +typedef BIT_STRING_t AMFSetID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMFSetID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMFSetID; +asn_struct_free_f AMFSetID_free; +asn_struct_print_f AMFSetID_print; +asn_constr_check_f AMFSetID_constraint; +ber_type_decoder_f AMFSetID_decode_ber; +der_type_encoder_f AMFSetID_encode_der; +xer_type_decoder_f AMFSetID_decode_xer; +xer_type_encoder_f AMFSetID_encode_xer; +oer_type_decoder_f AMFSetID_decode_oer; +oer_type_encoder_f AMFSetID_encode_oer; +per_type_decoder_f AMFSetID_decode_uper; +per_type_encoder_f AMFSetID_encode_uper; +per_type_decoder_f AMFSetID_decode_aper; +per_type_encoder_f AMFSetID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMFSetID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/BIT_STRING.h b/Bouncer/e2sm_rc/headers/BIT_STRING.h new file mode 100644 index 0000000..c1bdbbc --- /dev/null +++ b/Bouncer/e2sm_rc/headers/BIT_STRING.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BIT_STRING_H_ +#define _BIT_STRING_H_ + +#include /* Some help from OCTET STRING */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct BIT_STRING_s { + uint8_t *buf; /* BIT STRING body */ + size_t size; /* Size of the above buffer */ + + int bits_unused;/* Unused trailing bits in the last octet (0..7) */ + + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ +} BIT_STRING_t; + +extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; +extern asn_TYPE_operation_t asn_OP_BIT_STRING; +extern asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs; + +asn_struct_print_f BIT_STRING_print; /* Human-readable output */ +asn_struct_compare_f BIT_STRING_compare; +asn_constr_check_f BIT_STRING_constraint; +xer_type_encoder_f BIT_STRING_encode_xer; +oer_type_decoder_f BIT_STRING_decode_oer; +oer_type_encoder_f BIT_STRING_encode_oer; +per_type_decoder_f BIT_STRING_decode_uper; +per_type_encoder_f BIT_STRING_encode_uper; +asn_random_fill_f BIT_STRING_random_fill; + +#define BIT_STRING_free OCTET_STRING_free +#define BIT_STRING_decode_ber OCTET_STRING_decode_ber +#define BIT_STRING_encode_der OCTET_STRING_encode_der +#define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary +#define BIT_STRING_decode_aper OCTET_STRING_decode_aper +#define BIT_STRING_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _BIT_STRING_H_ */ diff --git a/Bouncer/e2sm_rc/headers/BOOLEAN.h b/Bouncer/e2sm_rc/headers/BOOLEAN.h new file mode 100644 index 0000000..620acf7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/BOOLEAN.h @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BOOLEAN_H_ +#define _BOOLEAN_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The underlying integer may contain various values, but everything + * non-zero is capped to 0xff by the DER encoder. The BER decoder may + * yield non-zero values different from 1, beware. + */ +typedef int BOOLEAN_t; + +extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; +extern asn_TYPE_operation_t asn_OP_BOOLEAN; + +asn_struct_free_f BOOLEAN_free; +asn_struct_print_f BOOLEAN_print; +asn_struct_compare_f BOOLEAN_compare; +ber_type_decoder_f BOOLEAN_decode_ber; +der_type_encoder_f BOOLEAN_encode_der; +oer_type_decoder_f BOOLEAN_decode_oer; +oer_type_encoder_f BOOLEAN_encode_oer; +per_type_decoder_f BOOLEAN_decode_uper; +per_type_encoder_f BOOLEAN_encode_uper; +per_type_decoder_f BOOLEAN_decode_aper; +per_type_encoder_f BOOLEAN_encode_aper; +xer_type_decoder_f BOOLEAN_decode_xer; +xer_type_encoder_f BOOLEAN_encode_xer; +asn_random_fill_f BOOLEAN_random_fill; + +#define BOOLEAN_constraint asn_generic_no_constraint + +#ifdef __cplusplus +} +#endif + +#endif /* _BOOLEAN_H_ */ diff --git a/Bouncer/e2sm_rc/headers/CGI.h b/Bouncer/e2sm_rc/headers/CGI.h new file mode 100644 index 0000000..16cc1dc --- /dev/null +++ b/Bouncer/e2sm_rc/headers/CGI.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CGI_H_ +#define _CGI_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CGI_PR { + CGI_PR_NOTHING, /* No components present */ + CGI_PR_nR_CGI, + CGI_PR_eUTRA_CGI + /* Extensions may appear below */ + +} CGI_PR; + +/* Forward declarations */ +struct NR_CGI; +struct EUTRA_CGI; + +/* CGI */ +typedef struct CGI { + CGI_PR present; + union CGI_u { + struct NR_CGI *nR_CGI; + struct EUTRA_CGI *eUTRA_CGI; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CGI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CGI; +extern asn_CHOICE_specifics_t asn_SPC_CGI_specs_1; +extern asn_TYPE_member_t asn_MBR_CGI_1[2]; +extern asn_per_constraints_t asn_PER_type_CGI_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _CGI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/CallProcessBreakpoint-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/CallProcessBreakpoint-RANParameter-Item.h new file mode 100644 index 0000000..d61cab7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/CallProcessBreakpoint-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CallProcessBreakpoint_RANParameter_Item_H_ +#define _CallProcessBreakpoint_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* CallProcessBreakpoint-RANParameter-Item */ +typedef struct CallProcessBreakpoint_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CallProcessBreakpoint_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CallProcessBreakpoint_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_CallProcessBreakpoint_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_CallProcessBreakpoint_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CallProcessBreakpoint_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/CellIdentification-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/CellIdentification-RANParameter-Item.h new file mode 100644 index 0000000..f0356ba --- /dev/null +++ b/Bouncer/e2sm_rc/headers/CellIdentification-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CellIdentification_RANParameter_Item_H_ +#define _CellIdentification_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* CellIdentification-RANParameter-Item */ +typedef struct CellIdentification_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CellIdentification_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CellIdentification_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_CellIdentification_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_CellIdentification_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _CellIdentification_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/ControlAction-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/ControlAction-RANParameter-Item.h new file mode 100644 index 0000000..f88a201 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ControlAction-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ControlAction_RANParameter_Item_H_ +#define _ControlAction_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* ControlAction-RANParameter-Item */ +typedef struct ControlAction_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ControlAction_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ControlAction_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_ControlAction_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_ControlAction_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _ControlAction_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/ControlOutcome-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/ControlOutcome-RANParameter-Item.h new file mode 100644 index 0000000..f9dcfbd --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ControlOutcome-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ControlOutcome_RANParameter_Item_H_ +#define _ControlOutcome_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* ControlOutcome-RANParameter-Item */ +typedef struct ControlOutcome_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ControlOutcome_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ControlOutcome_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_ControlOutcome_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_ControlOutcome_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _ControlOutcome_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/CoreCPID.h b/Bouncer/e2sm_rc/headers/CoreCPID.h new file mode 100644 index 0000000..a55ecc5 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/CoreCPID.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _CoreCPID_H_ +#define _CoreCPID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CoreCPID_PR { + CoreCPID_PR_NOTHING, /* No components present */ + CoreCPID_PR_fiveGC, + CoreCPID_PR_ePC + /* Extensions may appear below */ + +} CoreCPID_PR; + +/* Forward declarations */ +struct GUAMI; +struct GUMMEI; + +/* CoreCPID */ +typedef struct CoreCPID { + CoreCPID_PR present; + union CoreCPID_u { + struct GUAMI *fiveGC; + struct GUMMEI *ePC; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} CoreCPID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_CoreCPID; + +#ifdef __cplusplus +} +#endif + +#endif /* _CoreCPID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E-UTRA-ARFCN.h b/Bouncer/e2sm_rc/headers/E-UTRA-ARFCN.h new file mode 100644 index 0000000..8e5dd50 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E-UTRA-ARFCN.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E_UTRA_ARFCN_H_ +#define _E_UTRA_ARFCN_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E-UTRA-ARFCN */ +typedef long E_UTRA_ARFCN_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_E_UTRA_ARFCN_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_E_UTRA_ARFCN; +asn_struct_free_f E_UTRA_ARFCN_free; +asn_struct_print_f E_UTRA_ARFCN_print; +asn_constr_check_f E_UTRA_ARFCN_constraint; +ber_type_decoder_f E_UTRA_ARFCN_decode_ber; +der_type_encoder_f E_UTRA_ARFCN_encode_der; +xer_type_decoder_f E_UTRA_ARFCN_decode_xer; +xer_type_encoder_f E_UTRA_ARFCN_encode_xer; +oer_type_decoder_f E_UTRA_ARFCN_decode_oer; +oer_type_encoder_f E_UTRA_ARFCN_encode_oer; +per_type_decoder_f E_UTRA_ARFCN_decode_uper; +per_type_encoder_f E_UTRA_ARFCN_encode_uper; +per_type_decoder_f E_UTRA_ARFCN_decode_aper; +per_type_encoder_f E_UTRA_ARFCN_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _E_UTRA_ARFCN_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E-UTRA-PCI.h b/Bouncer/e2sm_rc/headers/E-UTRA-PCI.h new file mode 100644 index 0000000..a660525 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E-UTRA-PCI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E_UTRA_PCI_H_ +#define _E_UTRA_PCI_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E-UTRA-PCI */ +typedef long E_UTRA_PCI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_E_UTRA_PCI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_E_UTRA_PCI; +asn_struct_free_f E_UTRA_PCI_free; +asn_struct_print_f E_UTRA_PCI_print; +asn_constr_check_f E_UTRA_PCI_constraint; +ber_type_decoder_f E_UTRA_PCI_decode_ber; +der_type_encoder_f E_UTRA_PCI_encode_der; +xer_type_decoder_f E_UTRA_PCI_decode_xer; +xer_type_encoder_f E_UTRA_PCI_encode_xer; +oer_type_decoder_f E_UTRA_PCI_decode_oer; +oer_type_encoder_f E_UTRA_PCI_encode_oer; +per_type_decoder_f E_UTRA_PCI_decode_uper; +per_type_encoder_f E_UTRA_PCI_encode_uper; +per_type_decoder_f E_UTRA_PCI_decode_aper; +per_type_encoder_f E_UTRA_PCI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _E_UTRA_PCI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E-UTRA-TAC.h b/Bouncer/e2sm_rc/headers/E-UTRA-TAC.h new file mode 100644 index 0000000..5b24d52 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E-UTRA-TAC.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E_UTRA_TAC_H_ +#define _E_UTRA_TAC_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E-UTRA-TAC */ +typedef OCTET_STRING_t E_UTRA_TAC_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_E_UTRA_TAC_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_E_UTRA_TAC; +asn_struct_free_f E_UTRA_TAC_free; +asn_struct_print_f E_UTRA_TAC_print; +asn_constr_check_f E_UTRA_TAC_constraint; +ber_type_decoder_f E_UTRA_TAC_decode_ber; +der_type_encoder_f E_UTRA_TAC_encode_der; +xer_type_decoder_f E_UTRA_TAC_decode_xer; +xer_type_encoder_f E_UTRA_TAC_encode_xer; +oer_type_decoder_f E_UTRA_TAC_decode_oer; +oer_type_encoder_f E_UTRA_TAC_encode_oer; +per_type_decoder_f E_UTRA_TAC_decode_uper; +per_type_encoder_f E_UTRA_TAC_encode_uper; +per_type_decoder_f E_UTRA_TAC_decode_aper; +per_type_encoder_f E_UTRA_TAC_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _E_UTRA_TAC_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1-Item.h new file mode 100644 index 0000000..ff713df --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format1_Item_H_ +#define _E2SM_RC_ActionDefinition_Format1_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* E2SM-RC-ActionDefinition-Format1-Item */ +typedef struct E2SM_RC_ActionDefinition_Format1_Item { + RANParameter_ID_t ranParameter_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format1_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format1_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format1_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format1_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format1_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1.h new file mode 100644 index 0000000..72f6ab0 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format1.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format1_H_ +#define _E2SM_RC_ActionDefinition_Format1_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ActionDefinition_Format1_Item; + +/* E2SM-RC-ActionDefinition-Format1 */ +typedef struct E2SM_RC_ActionDefinition_Format1 { + struct E2SM_RC_ActionDefinition_Format1__ranP_ToBeReported_List { + A_SEQUENCE_OF(struct E2SM_RC_ActionDefinition_Format1_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_ToBeReported_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2-Item.h new file mode 100644 index 0000000..ee6c64e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format2_Item_H_ +#define _E2SM_RC_ActionDefinition_Format2_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-PolicyAction.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing; + +/* E2SM-RC-ActionDefinition-Format2-Item */ +typedef struct E2SM_RC_ActionDefinition_Format2_Item { + RIC_PolicyAction_t ric_PolicyAction; + struct RANParameter_Testing *ric_PolicyConditionDefinition; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format2_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format2_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format2_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format2_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format2_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2.h new file mode 100644 index 0000000..b7066fe --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format2.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format2_H_ +#define _E2SM_RC_ActionDefinition_Format2_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ActionDefinition_Format2_Item; + +/* E2SM-RC-ActionDefinition-Format2 */ +typedef struct E2SM_RC_ActionDefinition_Format2 { + struct E2SM_RC_ActionDefinition_Format2__ric_PolicyConditions_List { + A_SEQUENCE_OF(struct E2SM_RC_ActionDefinition_Format2_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_PolicyConditions_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format2_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3-Item.h new file mode 100644 index 0000000..2d78b6b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format3_Item_H_ +#define _E2SM_RC_ActionDefinition_Format3_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* E2SM-RC-ActionDefinition-Format3-Item */ +typedef struct E2SM_RC_ActionDefinition_Format3_Item { + RANParameter_ID_t ranParameter_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format3_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format3_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format3_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format3_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format3_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3.h new file mode 100644 index 0000000..0b33258 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format3.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format3_H_ +#define _E2SM_RC_ActionDefinition_Format3_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-InsertIndication-ID.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID; +struct E2SM_RC_ActionDefinition_Format3_Item; + +/* E2SM-RC-ActionDefinition-Format3 */ +typedef struct E2SM_RC_ActionDefinition_Format3 { + RIC_InsertIndication_ID_t ric_InsertIndication_ID; + struct E2SM_RC_ActionDefinition_Format3__ranP_InsertIndication_List { + A_SEQUENCE_OF(struct E2SM_RC_ActionDefinition_Format3_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_InsertIndication_List; + struct UEID *ueID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format3; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format3_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format3_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format3_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Indication-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Indication-Item.h new file mode 100644 index 0000000..bf7f608 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Indication-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format4_Indication_Item_H_ +#define _E2SM_RC_ActionDefinition_Format4_Indication_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-InsertIndication-ID.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ActionDefinition_Format4_RANP_Item; + +/* E2SM-RC-ActionDefinition-Format4-Indication-Item */ +typedef struct E2SM_RC_ActionDefinition_Format4_Indication_Item { + RIC_InsertIndication_ID_t ric_InsertIndication_ID; + struct E2SM_RC_ActionDefinition_Format4_Indication_Item__ranP_InsertIndication_List { + A_SEQUENCE_OF(struct E2SM_RC_ActionDefinition_Format4_RANP_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_InsertIndication_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format4_Indication_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_Indication_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_Indication_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format4_Indication_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-RANP-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-RANP-Item.h new file mode 100644 index 0000000..bc981c8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-RANP-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format4_RANP_Item_H_ +#define _E2SM_RC_ActionDefinition_Format4_RANP_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* E2SM-RC-ActionDefinition-Format4-RANP-Item */ +typedef struct E2SM_RC_ActionDefinition_Format4_RANP_Item { + RANParameter_ID_t ranParameter_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format4_RANP_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_RANP_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_RANP_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format4_RANP_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Style-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Style-Item.h new file mode 100644 index 0000000..d09cf7a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4-Style-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format4_Style_Item_H_ +#define _E2SM_RC_ActionDefinition_Format4_Style_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ActionDefinition_Format4_Indication_Item; + +/* E2SM-RC-ActionDefinition-Format4-Style-Item */ +typedef struct E2SM_RC_ActionDefinition_Format4_Style_Item { + RIC_Style_Type_t requested_Insert_Style_Type; + struct E2SM_RC_ActionDefinition_Format4_Style_Item__ric_InsertIndication_List { + A_SEQUENCE_OF(struct E2SM_RC_ActionDefinition_Format4_Indication_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_InsertIndication_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format4_Style_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_Style_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_Style_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format4_Style_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4.h new file mode 100644 index 0000000..8eb9dce --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition-Format4.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_Format4_H_ +#define _E2SM_RC_ActionDefinition_Format4_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID; +struct E2SM_RC_ActionDefinition_Format4_Style_Item; + +/* E2SM-RC-ActionDefinition-Format4 */ +typedef struct E2SM_RC_ActionDefinition_Format4 { + struct E2SM_RC_ActionDefinition_Format4__ric_InsertStyle_List { + A_SEQUENCE_OF(struct E2SM_RC_ActionDefinition_Format4_Style_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_InsertStyle_List; + struct UEID *ueID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_Format4_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_Format4_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition.h new file mode 100644 index 0000000..99dd1b9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ActionDefinition.h @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ActionDefinition_H_ +#define _E2SM_RC_ActionDefinition_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR { + E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR_NOTHING, /* No components present */ + E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR_actionDefinition_Format1, + E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR_actionDefinition_Format2, + E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR_actionDefinition_Format3, + /* Extensions may appear below */ + E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR_actionDefinition_Format4 +} E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_ActionDefinition_Format1; +struct E2SM_RC_ActionDefinition_Format2; +struct E2SM_RC_ActionDefinition_Format3; +struct E2SM_RC_ActionDefinition_Format4; + +/* E2SM-RC-ActionDefinition */ +typedef struct E2SM_RC_ActionDefinition { + RIC_Style_Type_t ric_Style_Type; + struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats { + E2SM_RC_ActionDefinition__ric_actionDefinition_formats_PR present; + union E2SM_RC_ActionDefinition__ric_actionDefinition_formats_u { + struct E2SM_RC_ActionDefinition_Format1 *actionDefinition_Format1; + struct E2SM_RC_ActionDefinition_Format2 *actionDefinition_Format2; + struct E2SM_RC_ActionDefinition_Format3 *actionDefinition_Format3; + /* + * This type is extensible, + * possible extensions are below. + */ + struct E2SM_RC_ActionDefinition_Format4 *actionDefinition_Format4; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_actionDefinition_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ActionDefinition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ActionDefinition_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID-Format1.h new file mode 100644 index 0000000..7a2461b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID-Format1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_CallProcessID_Format1_H_ +#define _E2SM_RC_CallProcessID_Format1_H_ + + +#include + +/* Including external dependencies */ +#include "RAN-CallProcess-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-CallProcessID-Format1 */ +typedef struct E2SM_RC_CallProcessID_Format1 { + RAN_CallProcess_ID_t ric_callProcess_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_CallProcessID_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_CallProcessID_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_CallProcessID_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_CallProcessID_Format1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_CallProcessID_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID.h b/Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID.h new file mode 100644 index 0000000..12864c4 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-CallProcessID.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_CallProcessID_H_ +#define _E2SM_RC_CallProcessID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_CallProcessID__ric_callProcessID_formats_PR { + E2SM_RC_CallProcessID__ric_callProcessID_formats_PR_NOTHING, /* No components present */ + E2SM_RC_CallProcessID__ric_callProcessID_formats_PR_callProcessID_Format1 + /* Extensions may appear below */ + +} E2SM_RC_CallProcessID__ric_callProcessID_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_CallProcessID_Format1; + +/* E2SM-RC-CallProcessID */ +typedef struct E2SM_RC_CallProcessID { + struct E2SM_RC_CallProcessID__ric_callProcessID_formats { + E2SM_RC_CallProcessID__ric_callProcessID_formats_PR present; + union E2SM_RC_CallProcessID__ric_callProcessID_formats_u { + struct E2SM_RC_CallProcessID_Format1 *callProcessID_Format1; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_callProcessID_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_CallProcessID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_CallProcessID; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_CallProcessID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format1.h new file mode 100644 index 0000000..62c7bec --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format1.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlHeader_Format1_H_ +#define _E2SM_RC_ControlHeader_Format1_H_ + + +#include + +/* Including external dependencies */ +#include "UEID.h" +#include "RIC-Style-Type.h" +#include "RIC-ControlAction-ID.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_ControlHeader_Format1__ric_ControlDecision { + E2SM_RC_ControlHeader_Format1__ric_ControlDecision_accept = 0, + E2SM_RC_ControlHeader_Format1__ric_ControlDecision_reject = 1 + /* + * Enumeration is extensible + */ +} e_E2SM_RC_ControlHeader_Format1__ric_ControlDecision; + +/* E2SM-RC-ControlHeader-Format1 */ +typedef struct E2SM_RC_ControlHeader_Format1 { + UEID_t ueID; + RIC_Style_Type_t ric_Style_Type; + RIC_ControlAction_ID_t ric_ControlAction_ID; + long *ric_ControlDecision; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlHeader_Format1_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_ric_ControlDecision_5; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlHeader_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlHeader_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlHeader_Format1_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlHeader_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format2.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format2.h new file mode 100644 index 0000000..1f2caf2 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader-Format2.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlHeader_Format2_H_ +#define _E2SM_RC_ControlHeader_Format2_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_ControlHeader_Format2__ric_ControlDecision { + E2SM_RC_ControlHeader_Format2__ric_ControlDecision_accept = 0, + E2SM_RC_ControlHeader_Format2__ric_ControlDecision_reject = 1 + /* + * Enumeration is extensible + */ +} e_E2SM_RC_ControlHeader_Format2__ric_ControlDecision; + +/* Forward declarations */ +struct UEID; + +/* E2SM-RC-ControlHeader-Format2 */ +typedef struct E2SM_RC_ControlHeader_Format2 { + struct UEID *ueID; /* OPTIONAL */ + long *ric_ControlDecision; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlHeader_Format2_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_ric_ControlDecision_3; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlHeader_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlHeader_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlHeader_Format2_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlHeader_Format2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader.h new file mode 100644 index 0000000..89cf030 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlHeader.h @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlHeader_H_ +#define _E2SM_RC_ControlHeader_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_ControlHeader__ric_controlHeader_formats_PR { + E2SM_RC_ControlHeader__ric_controlHeader_formats_PR_NOTHING, /* No components present */ + E2SM_RC_ControlHeader__ric_controlHeader_formats_PR_controlHeader_Format1, + /* Extensions may appear below */ + E2SM_RC_ControlHeader__ric_controlHeader_formats_PR_controlHeader_Format2 +} E2SM_RC_ControlHeader__ric_controlHeader_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_ControlHeader_Format1; +struct E2SM_RC_ControlHeader_Format2; + +/* E2SM-RC-ControlHeader */ +typedef struct E2SM_RC_ControlHeader { + struct E2SM_RC_ControlHeader__ric_controlHeader_formats { + E2SM_RC_ControlHeader__ric_controlHeader_formats_PR present; + union E2SM_RC_ControlHeader__ric_controlHeader_formats_u { + struct E2SM_RC_ControlHeader_Format1 *controlHeader_Format1; + /* + * This type is extensible, + * possible extensions are below. + */ + struct E2SM_RC_ControlHeader_Format2 *controlHeader_Format2; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_controlHeader_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlHeader_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlHeader; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlHeader_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1-Item.h new file mode 100644 index 0000000..1301ffd --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlMessage_Format1_Item_H_ +#define _E2SM_RC_ControlMessage_Format1_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-ValueType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-ControlMessage-Format1-Item */ +typedef struct E2SM_RC_ControlMessage_Format1_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_ValueType_t ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlMessage_Format1_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format1_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format1_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format1_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlMessage_Format1_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1.h new file mode 100644 index 0000000..f9f8f8a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format1.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlMessage_Format1_H_ +#define _E2SM_RC_ControlMessage_Format1_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlMessage_Format1_Item; + +/* E2SM-RC-ControlMessage-Format1 */ +typedef struct E2SM_RC_ControlMessage_Format1 { + struct E2SM_RC_ControlMessage_Format1__ranP_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlMessage_Format1_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlMessage_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlMessage_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-ControlAction-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-ControlAction-Item.h new file mode 100644 index 0000000..6e2159e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-ControlAction-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlMessage_Format2_ControlAction_Item_H_ +#define _E2SM_RC_ControlMessage_Format2_ControlAction_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-ControlAction-ID.h" +#include "E2SM-RC-ControlMessage-Format1.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-ControlMessage-Format2-ControlAction-Item */ +typedef struct E2SM_RC_ControlMessage_Format2_ControlAction_Item { + RIC_ControlAction_ID_t ric_ControlAction_ID; + E2SM_RC_ControlMessage_Format1_t ranP_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlMessage_Format2_ControlAction_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format2_ControlAction_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format2_ControlAction_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlMessage_Format2_ControlAction_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-Style-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-Style-Item.h new file mode 100644 index 0000000..cd8fc01 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2-Style-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlMessage_Format2_Style_Item_H_ +#define _E2SM_RC_ControlMessage_Format2_Style_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlMessage_Format2_ControlAction_Item; + +/* E2SM-RC-ControlMessage-Format2-Style-Item */ +typedef struct E2SM_RC_ControlMessage_Format2_Style_Item { + RIC_Style_Type_t indicated_Control_Style_Type; + struct E2SM_RC_ControlMessage_Format2_Style_Item__ric_ControlAction_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlMessage_Format2_ControlAction_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_ControlAction_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlMessage_Format2_Style_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format2_Style_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format2_Style_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlMessage_Format2_Style_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2.h new file mode 100644 index 0000000..708bd7e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage-Format2.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlMessage_Format2_H_ +#define _E2SM_RC_ControlMessage_Format2_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlMessage_Format2_Style_Item; + +/* E2SM-RC-ControlMessage-Format2 */ +typedef struct E2SM_RC_ControlMessage_Format2 { + struct E2SM_RC_ControlMessage_Format2__ric_ControlStyle_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlMessage_Format2_Style_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_ControlStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlMessage_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format2_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlMessage_Format2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage.h new file mode 100644 index 0000000..3e40e27 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlMessage.h @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlMessage_H_ +#define _E2SM_RC_ControlMessage_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_ControlMessage__ric_controlMessage_formats_PR { + E2SM_RC_ControlMessage__ric_controlMessage_formats_PR_NOTHING, /* No components present */ + E2SM_RC_ControlMessage__ric_controlMessage_formats_PR_controlMessage_Format1, + /* Extensions may appear below */ + E2SM_RC_ControlMessage__ric_controlMessage_formats_PR_controlMessage_Format2 +} E2SM_RC_ControlMessage__ric_controlMessage_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_ControlMessage_Format1; +struct E2SM_RC_ControlMessage_Format2; + +/* E2SM-RC-ControlMessage */ +typedef struct E2SM_RC_ControlMessage { + struct E2SM_RC_ControlMessage__ric_controlMessage_formats { + E2SM_RC_ControlMessage__ric_controlMessage_formats_PR present; + union E2SM_RC_ControlMessage__ric_controlMessage_formats_u { + struct E2SM_RC_ControlMessage_Format1 *controlMessage_Format1; + /* + * This type is extensible, + * possible extensions are below. + */ + struct E2SM_RC_ControlMessage_Format2 *controlMessage_Format2; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_controlMessage_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlMessage_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1-Item.h new file mode 100644 index 0000000..c9d6936 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format1_Item_H_ +#define _E2SM_RC_ControlOutcome_Format1_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Value.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-ControlOutcome-Format1-Item */ +typedef struct E2SM_RC_ControlOutcome_Format1_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Value_t ranParameter_value; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format1_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format1_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format1_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format1_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format1_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1.h new file mode 100644 index 0000000..cdfafd9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format1.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format1_H_ +#define _E2SM_RC_ControlOutcome_Format1_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlOutcome_Format1_Item; + +/* E2SM-RC-ControlOutcome-Format1 */ +typedef struct E2SM_RC_ControlOutcome_Format1 { + struct E2SM_RC_ControlOutcome_Format1__ranP_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlOutcome_Format1_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.h new file mode 100644 index 0000000..d3252e3 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_H_ +#define _E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-ControlAction-ID.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlOutcome_Format2_RANP_Item; + +/* E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item */ +typedef struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item { + RIC_ControlAction_ID_t ric_ControlAction_ID; + struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item__ranP_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlOutcome_Format2_RANP_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-RANP-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-RANP-Item.h new file mode 100644 index 0000000..981033a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-RANP-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format2_RANP_Item_H_ +#define _E2SM_RC_ControlOutcome_Format2_RANP_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Value.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-ControlOutcome-Format2-RANP-Item */ +typedef struct E2SM_RC_ControlOutcome_Format2_RANP_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Value_t ranParameter_value; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format2_RANP_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_RANP_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_RANP_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format2_RANP_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-Style-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-Style-Item.h new file mode 100644 index 0000000..57ad472 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2-Style-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format2_Style_Item_H_ +#define _E2SM_RC_ControlOutcome_Format2_Style_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item; + +/* E2SM-RC-ControlOutcome-Format2-Style-Item */ +typedef struct E2SM_RC_ControlOutcome_Format2_Style_Item { + RIC_Style_Type_t indicated_Control_Style_Type; + struct E2SM_RC_ControlOutcome_Format2_Style_Item__ric_ControlOutcome_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_ControlOutcome_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format2_Style_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_Style_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_Style_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format2_Style_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2.h new file mode 100644 index 0000000..47d9e46 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format2.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format2_H_ +#define _E2SM_RC_ControlOutcome_Format2_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlOutcome_Format2_Style_Item; + +/* E2SM-RC-ControlOutcome-Format2 */ +typedef struct E2SM_RC_ControlOutcome_Format2 { + struct E2SM_RC_ControlOutcome_Format2__ric_ControlStyle_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlOutcome_Format2_Style_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_ControlStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3-Item.h new file mode 100644 index 0000000..dc2f5f3 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format3_Item_H_ +#define _E2SM_RC_ControlOutcome_Format3_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-ValueType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-ControlOutcome-Format3-Item */ +typedef struct E2SM_RC_ControlOutcome_Format3_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_ValueType_t ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format3_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format3_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format3_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format3_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format3_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3.h new file mode 100644 index 0000000..bbb1fad --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome-Format3.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_Format3_H_ +#define _E2SM_RC_ControlOutcome_Format3_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_ControlOutcome_Format3_Item; + +/* E2SM-RC-ControlOutcome-Format3 */ +typedef struct E2SM_RC_ControlOutcome_Format3 { + struct E2SM_RC_ControlOutcome_Format3__ranP_List { + A_SEQUENCE_OF(struct E2SM_RC_ControlOutcome_Format3_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_Format3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format3; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format3_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format3_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_Format3_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome.h b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome.h new file mode 100644 index 0000000..1b7caff --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-ControlOutcome.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_ControlOutcome_H_ +#define _E2SM_RC_ControlOutcome_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_ControlOutcome__ric_controlOutcome_formats_PR { + E2SM_RC_ControlOutcome__ric_controlOutcome_formats_PR_NOTHING, /* No components present */ + E2SM_RC_ControlOutcome__ric_controlOutcome_formats_PR_controlOutcome_Format1, + /* Extensions may appear below */ + E2SM_RC_ControlOutcome__ric_controlOutcome_formats_PR_controlOutcome_Format2, + E2SM_RC_ControlOutcome__ric_controlOutcome_formats_PR_controlOutcome_Format3 +} E2SM_RC_ControlOutcome__ric_controlOutcome_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_ControlOutcome_Format1; +struct E2SM_RC_ControlOutcome_Format2; +struct E2SM_RC_ControlOutcome_Format3; + +/* E2SM-RC-ControlOutcome */ +typedef struct E2SM_RC_ControlOutcome { + struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats { + E2SM_RC_ControlOutcome__ric_controlOutcome_formats_PR present; + union E2SM_RC_ControlOutcome__ric_controlOutcome_formats_u { + struct E2SM_RC_ControlOutcome_Format1 *controlOutcome_Format1; + /* + * This type is extensible, + * possible extensions are below. + */ + struct E2SM_RC_ControlOutcome_Format2 *controlOutcome_Format2; + struct E2SM_RC_ControlOutcome_Format3 *controlOutcome_Format3; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_controlOutcome_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_ControlOutcome_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_ControlOutcome_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1-Item.h new file mode 100644 index 0000000..2ea05aa --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1-Item.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format1_Item_H_ +#define _E2SM_RC_EventTrigger_Format1_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTriggerCondition-ID.h" +#include "MessageType-Choice.h" +#include +#include "LogicalOR.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_EventTrigger_Format1_Item__messageDirection { + E2SM_RC_EventTrigger_Format1_Item__messageDirection_incoming = 0, + E2SM_RC_EventTrigger_Format1_Item__messageDirection_outgoing = 1 + /* + * Enumeration is extensible + */ +} e_E2SM_RC_EventTrigger_Format1_Item__messageDirection; + +/* Forward declarations */ +struct EventTrigger_UE_Info; +struct EventTrigger_UEevent_Info; + +/* E2SM-RC-EventTrigger-Format1-Item */ +typedef struct E2SM_RC_EventTrigger_Format1_Item { + RIC_EventTriggerCondition_ID_t ric_eventTriggerCondition_ID; + MessageType_Choice_t messageType; + long *messageDirection; /* OPTIONAL */ + struct EventTrigger_UE_Info *associatedUEInfo; /* OPTIONAL */ + struct EventTrigger_UEevent_Info *associatedUEEvent; /* OPTIONAL */ + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format1_Item_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_messageDirection_4; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format1_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format1_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format1_Item_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format1_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1.h new file mode 100644 index 0000000..c27c233 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format1.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format1_H_ +#define _E2SM_RC_EventTrigger_Format1_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EventTrigger_UE_Info; +struct E2SM_RC_EventTrigger_Format1_Item; + +/* E2SM-RC-EventTrigger-Format1 */ +typedef struct E2SM_RC_EventTrigger_Format1 { + struct E2SM_RC_EventTrigger_Format1__message_List { + A_SEQUENCE_OF(struct E2SM_RC_EventTrigger_Format1_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } message_List; + struct EventTrigger_UE_Info *globalAssociatedUEInfo; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format1_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format2.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format2.h new file mode 100644 index 0000000..5eecde6 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format2.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format2_H_ +#define _E2SM_RC_EventTrigger_Format2_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-CallProcessType-ID.h" +#include "RIC-CallProcessBreakpoint-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing; +struct EventTrigger_UE_Info; + +/* E2SM-RC-EventTrigger-Format2 */ +typedef struct E2SM_RC_EventTrigger_Format2 { + RIC_CallProcessType_ID_t ric_callProcessType_ID; + RIC_CallProcessBreakpoint_ID_t ric_callProcessBreakpoint_ID; + struct RANParameter_Testing *associatedE2NodeInfo; /* OPTIONAL */ + struct EventTrigger_UE_Info *associatedUEInfo; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format2_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3-Item.h new file mode 100644 index 0000000..f625475 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3-Item.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format3_Item_H_ +#define _E2SM_RC_EventTrigger_Format3_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTriggerCondition-ID.h" +#include +#include "LogicalOR.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EventTrigger_Cell_Info; + +/* E2SM-RC-EventTrigger-Format3-Item */ +typedef struct E2SM_RC_EventTrigger_Format3_Item { + RIC_EventTriggerCondition_ID_t ric_eventTriggerCondition_ID; + long e2NodeInfoChange_ID; + struct EventTrigger_Cell_Info *associatedCellInfo; /* OPTIONAL */ + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format3_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format3_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format3_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format3_Item_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format3_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3.h new file mode 100644 index 0000000..fbd4fe9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format3.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format3_H_ +#define _E2SM_RC_EventTrigger_Format3_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_EventTrigger_Format3_Item; + +/* E2SM-RC-EventTrigger-Format3 */ +typedef struct E2SM_RC_EventTrigger_Format3 { + struct E2SM_RC_EventTrigger_Format3__e2NodeInfoChange_List { + A_SEQUENCE_OF(struct E2SM_RC_EventTrigger_Format3_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } e2NodeInfoChange_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format3; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format3_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format3_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format3_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4-Item.h new file mode 100644 index 0000000..f32719b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4-Item.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format4_Item_H_ +#define _E2SM_RC_EventTrigger_Format4_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTriggerCondition-ID.h" +#include "TriggerType-Choice.h" +#include "LogicalOR.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EventTrigger_UE_Info; + +/* E2SM-RC-EventTrigger-Format4-Item */ +typedef struct E2SM_RC_EventTrigger_Format4_Item { + RIC_EventTriggerCondition_ID_t ric_eventTriggerCondition_ID; + TriggerType_Choice_t triggerType; + struct EventTrigger_UE_Info *associatedUEInfo; /* OPTIONAL */ + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format4_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format4_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format4_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format4_Item_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format4_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4.h new file mode 100644 index 0000000..98a9481 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format4.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format4_H_ +#define _E2SM_RC_EventTrigger_Format4_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_EventTrigger_Format4_Item; + +/* E2SM-RC-EventTrigger-Format4 */ +typedef struct E2SM_RC_EventTrigger_Format4 { + struct E2SM_RC_EventTrigger_Format4__uEInfoChange_List { + A_SEQUENCE_OF(struct E2SM_RC_EventTrigger_Format4_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } uEInfoChange_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format4_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format4; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format4_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format4_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format4_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format5.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format5.h new file mode 100644 index 0000000..6eff2d6 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger-Format5.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_Format5_H_ +#define _E2SM_RC_EventTrigger_Format5_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_EventTrigger_Format5__onDemand { + E2SM_RC_EventTrigger_Format5__onDemand_true = 0 + /* + * Enumeration is extensible + */ +} e_E2SM_RC_EventTrigger_Format5__onDemand; + +/* Forward declarations */ +struct EventTrigger_UE_Info; +struct EventTrigger_Cell_Info; + +/* E2SM-RC-EventTrigger-Format5 */ +typedef struct E2SM_RC_EventTrigger_Format5 { + long onDemand; + struct EventTrigger_UE_Info *associatedUEInfo; /* OPTIONAL */ + struct EventTrigger_Cell_Info *associatedCellInfo; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_Format5_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_onDemand_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format5; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format5_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format5_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_Format5_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger.h b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger.h new file mode 100644 index 0000000..8601557 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-EventTrigger.h @@ -0,0 +1,77 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_EventTrigger_H_ +#define _E2SM_RC_EventTrigger_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR { + E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR_NOTHING, /* No components present */ + E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR_eventTrigger_Format1, + E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR_eventTrigger_Format2, + E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR_eventTrigger_Format3, + E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR_eventTrigger_Format4, + E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR_eventTrigger_Format5 + /* Extensions may appear below */ + +} E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_EventTrigger_Format1; +struct E2SM_RC_EventTrigger_Format2; +struct E2SM_RC_EventTrigger_Format3; +struct E2SM_RC_EventTrigger_Format4; +struct E2SM_RC_EventTrigger_Format5; + +/* E2SM-RC-EventTrigger */ +typedef struct E2SM_RC_EventTrigger { + struct E2SM_RC_EventTrigger__ric_eventTrigger_formats { + E2SM_RC_EventTrigger__ric_eventTrigger_formats_PR present; + union E2SM_RC_EventTrigger__ric_eventTrigger_formats_u { + struct E2SM_RC_EventTrigger_Format1 *eventTrigger_Format1; + struct E2SM_RC_EventTrigger_Format2 *eventTrigger_Format2; + struct E2SM_RC_EventTrigger_Format3 *eventTrigger_Format3; + struct E2SM_RC_EventTrigger_Format4 *eventTrigger_Format4; + struct E2SM_RC_EventTrigger_Format5 *eventTrigger_Format5; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_eventTrigger_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_EventTrigger_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_EventTrigger_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format1.h new file mode 100644 index 0000000..eb3dad0 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationHeader_Format1_H_ +#define _E2SM_RC_IndicationHeader_Format1_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTriggerCondition-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-IndicationHeader-Format1 */ +typedef struct E2SM_RC_IndicationHeader_Format1 { + RIC_EventTriggerCondition_ID_t *ric_eventTriggerCondition_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationHeader_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationHeader_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationHeader_Format1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationHeader_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format2.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format2.h new file mode 100644 index 0000000..a3fabc5 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format2.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationHeader_Format2_H_ +#define _E2SM_RC_IndicationHeader_Format2_H_ + + +#include + +/* Including external dependencies */ +#include "UEID.h" +#include "RIC-Style-Type.h" +#include "RIC-InsertIndication-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-IndicationHeader-Format2 */ +typedef struct E2SM_RC_IndicationHeader_Format2 { + UEID_t ueID; + RIC_Style_Type_t ric_InsertStyle_Type; + RIC_InsertIndication_ID_t ric_InsertIndication_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationHeader_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationHeader_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationHeader_Format2_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationHeader_Format2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format3.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format3.h new file mode 100644 index 0000000..2b7da45 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader-Format3.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationHeader_Format3_H_ +#define _E2SM_RC_IndicationHeader_Format3_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTriggerCondition-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID; + +/* E2SM-RC-IndicationHeader-Format3 */ +typedef struct E2SM_RC_IndicationHeader_Format3 { + RIC_EventTriggerCondition_ID_t *ric_eventTriggerCondition_ID; /* OPTIONAL */ + struct UEID *ueID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationHeader_Format3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader_Format3; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationHeader_Format3_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationHeader_Format3_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationHeader_Format3_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader.h new file mode 100644 index 0000000..702648a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationHeader.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationHeader_H_ +#define _E2SM_RC_IndicationHeader_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_IndicationHeader__ric_indicationHeader_formats_PR { + E2SM_RC_IndicationHeader__ric_indicationHeader_formats_PR_NOTHING, /* No components present */ + E2SM_RC_IndicationHeader__ric_indicationHeader_formats_PR_indicationHeader_Format1, + E2SM_RC_IndicationHeader__ric_indicationHeader_formats_PR_indicationHeader_Format2, + /* Extensions may appear below */ + E2SM_RC_IndicationHeader__ric_indicationHeader_formats_PR_indicationHeader_Format3 +} E2SM_RC_IndicationHeader__ric_indicationHeader_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_IndicationHeader_Format1; +struct E2SM_RC_IndicationHeader_Format2; +struct E2SM_RC_IndicationHeader_Format3; + +/* E2SM-RC-IndicationHeader */ +typedef struct E2SM_RC_IndicationHeader { + struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats { + E2SM_RC_IndicationHeader__ric_indicationHeader_formats_PR present; + union E2SM_RC_IndicationHeader__ric_indicationHeader_formats_u { + struct E2SM_RC_IndicationHeader_Format1 *indicationHeader_Format1; + struct E2SM_RC_IndicationHeader_Format2 *indicationHeader_Format2; + /* + * This type is extensible, + * possible extensions are below. + */ + struct E2SM_RC_IndicationHeader_Format3 *indicationHeader_Format3; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_indicationHeader_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationHeader_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationHeader_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1-Item.h new file mode 100644 index 0000000..0676924 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format1_Item_H_ +#define _E2SM_RC_IndicationMessage_Format1_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-ValueType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-IndicationMessage-Format1-Item */ +typedef struct E2SM_RC_IndicationMessage_Format1_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_ValueType_t ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format1_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format1_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format1_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format1_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format1_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1.h new file mode 100644 index 0000000..69275eb --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format1.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format1_H_ +#define _E2SM_RC_IndicationMessage_Format1_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format1_Item; + +/* E2SM-RC-IndicationMessage-Format1 */ +typedef struct E2SM_RC_IndicationMessage_Format1 { + struct E2SM_RC_IndicationMessage_Format1__ranP_Reported_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format1_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_Reported_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-Item.h new file mode 100644 index 0000000..ca1e403 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format2_Item_H_ +#define _E2SM_RC_IndicationMessage_Format2_Item_H_ + + +#include + +/* Including external dependencies */ +#include "UEID.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format2_RANParameter_Item; + +/* E2SM-RC-IndicationMessage-Format2-Item */ +typedef struct E2SM_RC_IndicationMessage_Format2_Item { + UEID_t ueID; + struct E2SM_RC_IndicationMessage_Format2_Item__ranP_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format2_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format2_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format2_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format2_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format2_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format2_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.h new file mode 100644 index 0000000..ea0a0a1 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format2_RANParameter_Item_H_ +#define _E2SM_RC_IndicationMessage_Format2_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-ValueType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-IndicationMessage-Format2-RANParameter-Item */ +typedef struct E2SM_RC_IndicationMessage_Format2_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_ValueType_t ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format2_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format2_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2.h new file mode 100644 index 0000000..079f0e9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format2.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format2_H_ +#define _E2SM_RC_IndicationMessage_Format2_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format2_Item; + +/* E2SM-RC-IndicationMessage-Format2 */ +typedef struct E2SM_RC_IndicationMessage_Format2 { + struct E2SM_RC_IndicationMessage_Format2__ueParameter_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format2_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueParameter_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format2_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3-Item.h new file mode 100644 index 0000000..79ae9ff --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3-Item.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format3_Item_H_ +#define _E2SM_RC_IndicationMessage_Format3_Item_H_ + + +#include + +/* Including external dependencies */ +#include "CGI.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct NeighborRelation_Info; + +/* E2SM-RC-IndicationMessage-Format3-Item */ +typedef struct E2SM_RC_IndicationMessage_Format3_Item { + CGI_t cellGlobal_ID; + OCTET_STRING_t *cellContextInfo; /* OPTIONAL */ + BOOLEAN_t *cellDeleted; /* OPTIONAL */ + struct NeighborRelation_Info *neighborRelation_Table; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format3_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format3_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format3_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format3_Item_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format3_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3.h new file mode 100644 index 0000000..dbee9b2 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format3.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format3_H_ +#define _E2SM_RC_IndicationMessage_Format3_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format3_Item; + +/* E2SM-RC-IndicationMessage-Format3 */ +typedef struct E2SM_RC_IndicationMessage_Format3 { + struct E2SM_RC_IndicationMessage_Format3__cellInfo_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format3_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellInfo_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format3; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format3_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format3_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format3_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemCell.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemCell.h new file mode 100644 index 0000000..6b12c53 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemCell.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format4_ItemCell_H_ +#define _E2SM_RC_IndicationMessage_Format4_ItemCell_H_ + + +#include + +/* Including external dependencies */ +#include "CGI.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct NeighborRelation_Info; + +/* E2SM-RC-IndicationMessage-Format4-ItemCell */ +typedef struct E2SM_RC_IndicationMessage_Format4_ItemCell { + CGI_t cellGlobal_ID; + OCTET_STRING_t *cellContextInfo; /* OPTIONAL */ + struct NeighborRelation_Info *neighborRelation_Table; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format4_ItemCell_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format4_ItemCell_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format4_ItemCell_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format4_ItemCell_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemUE.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemUE.h new file mode 100644 index 0000000..c588fa5 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4-ItemUE.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format4_ItemUE_H_ +#define _E2SM_RC_IndicationMessage_Format4_ItemUE_H_ + + +#include + +/* Including external dependencies */ +#include "UEID.h" +#include +#include "CGI.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-IndicationMessage-Format4-ItemUE */ +typedef struct E2SM_RC_IndicationMessage_Format4_ItemUE { + UEID_t ueID; + OCTET_STRING_t *ueContextInfo; /* OPTIONAL */ + CGI_t cellGlobal_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format4_ItemUE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format4_ItemUE_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format4_ItemUE_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format4_ItemUE_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4.h new file mode 100644 index 0000000..cdd90f7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format4.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format4_H_ +#define _E2SM_RC_IndicationMessage_Format4_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format4_ItemUE; +struct E2SM_RC_IndicationMessage_Format4_ItemCell; + +/* E2SM-RC-IndicationMessage-Format4 */ +typedef struct E2SM_RC_IndicationMessage_Format4 { + struct E2SM_RC_IndicationMessage_Format4__ueInfo_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format4_ItemUE) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueInfo_List; + struct E2SM_RC_IndicationMessage_Format4__cellInfo_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format4_ItemCell) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellInfo_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format4_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format4; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format4_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format4_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format4_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5-Item.h new file mode 100644 index 0000000..d06af14 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format5_Item_H_ +#define _E2SM_RC_IndicationMessage_Format5_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-ValueType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-IndicationMessage-Format5-Item */ +typedef struct E2SM_RC_IndicationMessage_Format5_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_ValueType_t ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format5_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format5_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format5_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format5_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format5_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5.h new file mode 100644 index 0000000..6143915 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format5.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format5_H_ +#define _E2SM_RC_IndicationMessage_Format5_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format5_Item; + +/* E2SM-RC-IndicationMessage-Format5 */ +typedef struct E2SM_RC_IndicationMessage_Format5 { + struct E2SM_RC_IndicationMessage_Format5__ranP_Requested_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format5_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_Requested_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format5_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format5; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format5_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format5_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format5_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Indication-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Indication-Item.h new file mode 100644 index 0000000..98e053f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Indication-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format6_Indication_Item_H_ +#define _E2SM_RC_IndicationMessage_Format6_Indication_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-InsertIndication-ID.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format6_RANP_Item; + +/* E2SM-RC-IndicationMessage-Format6-Indication-Item */ +typedef struct E2SM_RC_IndicationMessage_Format6_Indication_Item { + RIC_InsertIndication_ID_t ric_InsertIndication_ID; + struct E2SM_RC_IndicationMessage_Format6_Indication_Item__ranP_InsertIndication_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format6_RANP_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranP_InsertIndication_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format6_Indication_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_Indication_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_Indication_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format6_Indication_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-RANP-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-RANP-Item.h new file mode 100644 index 0000000..a36ab9a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-RANP-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format6_RANP_Item_H_ +#define _E2SM_RC_IndicationMessage_Format6_RANP_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-ValueType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2SM-RC-IndicationMessage-Format6-RANP-Item */ +typedef struct E2SM_RC_IndicationMessage_Format6_RANP_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_ValueType_t ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format6_RANP_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_RANP_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_RANP_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format6_RANP_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Style-Item.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Style-Item.h new file mode 100644 index 0000000..384f8d9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6-Style-Item.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format6_Style_Item_H_ +#define _E2SM_RC_IndicationMessage_Format6_Style_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format6_Indication_Item; + +/* E2SM-RC-IndicationMessage-Format6-Style-Item */ +typedef struct E2SM_RC_IndicationMessage_Format6_Style_Item { + RIC_Style_Type_t indicated_Insert_Style_Type; + struct E2SM_RC_IndicationMessage_Format6_Style_Item__ric_InsertIndication_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format6_Indication_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_InsertIndication_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format6_Style_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_Style_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_Style_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format6_Style_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6.h new file mode 100644 index 0000000..8ca2e68 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage-Format6.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_Format6_H_ +#define _E2SM_RC_IndicationMessage_Format6_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format6_Style_Item; + +/* E2SM-RC-IndicationMessage-Format6 */ +typedef struct E2SM_RC_IndicationMessage_Format6 { + struct E2SM_RC_IndicationMessage_Format6__ric_InsertStyle_List { + A_SEQUENCE_OF(struct E2SM_RC_IndicationMessage_Format6_Style_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_InsertStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_Format6_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6; +extern asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_specs_1; +extern asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_Format6_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage.h b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage.h new file mode 100644 index 0000000..348f452 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-IndicationMessage.h @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_IndicationMessage_H_ +#define _E2SM_RC_IndicationMessage_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR { + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR_NOTHING, /* No components present */ + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR_indicationMessage_Format1, + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR_indicationMessage_Format2, + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR_indicationMessage_Format3, + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR_indicationMessage_Format4, + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR_indicationMessage_Format5, + /* Extensions may appear below */ + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR_indicationMessage_Format6 +} E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR; + +/* Forward declarations */ +struct E2SM_RC_IndicationMessage_Format1; +struct E2SM_RC_IndicationMessage_Format2; +struct E2SM_RC_IndicationMessage_Format3; +struct E2SM_RC_IndicationMessage_Format4; +struct E2SM_RC_IndicationMessage_Format5; +struct E2SM_RC_IndicationMessage_Format6; + +/* E2SM-RC-IndicationMessage */ +typedef struct E2SM_RC_IndicationMessage { + struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats { + E2SM_RC_IndicationMessage__ric_indicationMessage_formats_PR present; + union E2SM_RC_IndicationMessage__ric_indicationMessage_formats_u { + struct E2SM_RC_IndicationMessage_Format1 *indicationMessage_Format1; + struct E2SM_RC_IndicationMessage_Format2 *indicationMessage_Format2; + struct E2SM_RC_IndicationMessage_Format3 *indicationMessage_Format3; + struct E2SM_RC_IndicationMessage_Format4 *indicationMessage_Format4; + struct E2SM_RC_IndicationMessage_Format5 *indicationMessage_Format5; + /* + * This type is extensible, + * possible extensions are below. + */ + struct E2SM_RC_IndicationMessage_Format6 *indicationMessage_Format6; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_indicationMessage_formats; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_IndicationMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_IndicationMessage_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/E2SM-RC-RANFunctionDefinition.h b/Bouncer/e2sm_rc/headers/E2SM-RC-RANFunctionDefinition.h new file mode 100644 index 0000000..16f5522 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/E2SM-RC-RANFunctionDefinition.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _E2SM_RC_RANFunctionDefinition_H_ +#define _E2SM_RC_RANFunctionDefinition_H_ + + +#include + +/* Including external dependencies */ +#include "RANfunction-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_EventTrigger; +struct RANFunctionDefinition_Report; +struct RANFunctionDefinition_Insert; +struct RANFunctionDefinition_Control; +struct RANFunctionDefinition_Policy; + +/* E2SM-RC-RANFunctionDefinition */ +typedef struct E2SM_RC_RANFunctionDefinition { + RANfunction_Name_t ranFunction_Name; + struct RANFunctionDefinition_EventTrigger *ranFunctionDefinition_EventTrigger; /* OPTIONAL */ + struct RANFunctionDefinition_Report *ranFunctionDefinition_Report; /* OPTIONAL */ + struct RANFunctionDefinition_Insert *ranFunctionDefinition_Insert; /* OPTIONAL */ + struct RANFunctionDefinition_Control *ranFunctionDefinition_Control; /* OPTIONAL */ + struct RANFunctionDefinition_Policy *ranFunctionDefinition_Policy; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2SM_RC_RANFunctionDefinition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2SM_RC_RANFunctionDefinition; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2SM_RC_RANFunctionDefinition_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EN-GNB-ID.h b/Bouncer/e2sm_rc/headers/EN-GNB-ID.h new file mode 100644 index 0000000..18ec07b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EN-GNB-ID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EN_GNB_ID_H_ +#define _EN_GNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EN_GNB_ID_PR { + EN_GNB_ID_PR_NOTHING, /* No components present */ + EN_GNB_ID_PR_en_gNB_ID + /* Extensions may appear below */ + +} EN_GNB_ID_PR; + +/* EN-GNB-ID */ +typedef struct EN_GNB_ID { + EN_GNB_ID_PR present; + union EN_GNB_ID_u { + BIT_STRING_t en_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EN_GNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EN_GNB_ID; +extern asn_CHOICE_specifics_t asn_SPC_EN_GNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_EN_GNB_ID_1[1]; +extern asn_per_constraints_t asn_PER_type_EN_GNB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _EN_GNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/ENB-ID.h b/Bouncer/e2sm_rc/headers/ENB-ID.h new file mode 100644 index 0000000..23d144a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ENB-ID.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENB_ID_H_ +#define _ENB_ID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ENB_ID_PR { + ENB_ID_PR_NOTHING, /* No components present */ + ENB_ID_PR_macro_eNB_ID, + ENB_ID_PR_home_eNB_ID, + /* Extensions may appear below */ + ENB_ID_PR_short_Macro_eNB_ID, + ENB_ID_PR_long_Macro_eNB_ID +} ENB_ID_PR; + +/* ENB-ID */ +typedef struct ENB_ID { + ENB_ID_PR present; + union ENB_ID_u { + BIT_STRING_t macro_eNB_ID; + BIT_STRING_t home_eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + BIT_STRING_t short_Macro_eNB_ID; + BIT_STRING_t long_Macro_eNB_ID; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ENB_ID; +extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_ENB_ID_1[4]; +extern asn_per_constraints_t asn_PER_type_ENB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID-Extension.h b/Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID-Extension.h new file mode 100644 index 0000000..e8f5297 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID-Extension.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENB_UE_X2AP_ID_Extension_H_ +#define _ENB_UE_X2AP_ID_Extension_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ENB-UE-X2AP-ID-Extension */ +typedef long ENB_UE_X2AP_ID_Extension_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_Extension_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID_Extension; +asn_struct_free_f ENB_UE_X2AP_ID_Extension_free; +asn_struct_print_f ENB_UE_X2AP_ID_Extension_print; +asn_constr_check_f ENB_UE_X2AP_ID_Extension_constraint; +ber_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_ber; +der_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_der; +xer_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_xer; +xer_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_xer; +oer_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_oer; +oer_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_oer; +per_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_uper; +per_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_uper; +per_type_decoder_f ENB_UE_X2AP_ID_Extension_decode_aper; +per_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_UE_X2AP_ID_Extension_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID.h b/Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID.h new file mode 100644 index 0000000..43ca62f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ENB-UE-X2AP-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ENB_UE_X2AP_ID_H_ +#define _ENB_UE_X2AP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ENB-UE-X2AP-ID */ +typedef long ENB_UE_X2AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID; +asn_struct_free_f ENB_UE_X2AP_ID_free; +asn_struct_print_f ENB_UE_X2AP_ID_print; +asn_constr_check_f ENB_UE_X2AP_ID_constraint; +ber_type_decoder_f ENB_UE_X2AP_ID_decode_ber; +der_type_encoder_f ENB_UE_X2AP_ID_encode_der; +xer_type_decoder_f ENB_UE_X2AP_ID_decode_xer; +xer_type_encoder_f ENB_UE_X2AP_ID_encode_xer; +oer_type_decoder_f ENB_UE_X2AP_ID_decode_oer; +oer_type_encoder_f ENB_UE_X2AP_ID_encode_oer; +per_type_decoder_f ENB_UE_X2AP_ID_decode_uper; +per_type_encoder_f ENB_UE_X2AP_ID_encode_uper; +per_type_decoder_f ENB_UE_X2AP_ID_decode_aper; +per_type_encoder_f ENB_UE_X2AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _ENB_UE_X2AP_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EUTRA-CGI.h b/Bouncer/e2sm_rc/headers/EUTRA-CGI.h new file mode 100644 index 0000000..239b231 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EUTRA-CGI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EUTRA_CGI_H_ +#define _EUTRA_CGI_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "EUTRACellIdentity.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EUTRA-CGI */ +typedef struct EUTRA_CGI { + PLMNIdentity_t pLMNIdentity; + EUTRACellIdentity_t eUTRACellIdentity; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EUTRA_CGI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EUTRA_CGI; +extern asn_SEQUENCE_specifics_t asn_SPC_EUTRA_CGI_specs_1; +extern asn_TYPE_member_t asn_MBR_EUTRA_CGI_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EUTRA_CGI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EUTRACellIdentity.h b/Bouncer/e2sm_rc/headers/EUTRACellIdentity.h new file mode 100644 index 0000000..1d78b40 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EUTRACellIdentity.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EUTRACellIdentity_H_ +#define _EUTRACellIdentity_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EUTRACellIdentity */ +typedef BIT_STRING_t EUTRACellIdentity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_EUTRACellIdentity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_EUTRACellIdentity; +asn_struct_free_f EUTRACellIdentity_free; +asn_struct_print_f EUTRACellIdentity_print; +asn_constr_check_f EUTRACellIdentity_constraint; +ber_type_decoder_f EUTRACellIdentity_decode_ber; +der_type_encoder_f EUTRACellIdentity_encode_der; +xer_type_decoder_f EUTRACellIdentity_decode_xer; +xer_type_encoder_f EUTRACellIdentity_encode_xer; +oer_type_decoder_f EUTRACellIdentity_decode_oer; +oer_type_encoder_f EUTRACellIdentity_encode_oer; +per_type_decoder_f EUTRACellIdentity_decode_uper; +per_type_encoder_f EUTRACellIdentity_encode_uper; +per_type_decoder_f EUTRACellIdentity_decode_aper; +per_type_encoder_f EUTRACellIdentity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _EUTRACellIdentity_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Group.h b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Group.h new file mode 100644 index 0000000..38bc4ee --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Group.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_Cell_Info_Item_Choice_Group_H_ +#define _EventTrigger_Cell_Info_Item_Choice_Group_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-Testing.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EventTrigger-Cell-Info-Item-Choice-Group */ +typedef struct EventTrigger_Cell_Info_Item_Choice_Group { + RANParameter_Testing_t ranParameterTesting; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_Cell_Info_Item_Choice_Group_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_Item_Choice_Group_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_Item_Choice_Group_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_Cell_Info_Item_Choice_Group_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Individual.h b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Individual.h new file mode 100644 index 0000000..4fef2d2 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item-Choice-Individual.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_Cell_Info_Item_Choice_Individual_H_ +#define _EventTrigger_Cell_Info_Item_Choice_Individual_H_ + + +#include + +/* Including external dependencies */ +#include "CGI.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EventTrigger-Cell-Info-Item-Choice-Individual */ +typedef struct EventTrigger_Cell_Info_Item_Choice_Individual { + CGI_t cellGlobalID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_Cell_Info_Item_Choice_Individual_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_Item_Choice_Individual_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_Item_Choice_Individual_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_Cell_Info_Item_Choice_Individual_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item.h b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item.h new file mode 100644 index 0000000..c3a3e97 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info-Item.h @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_Cell_Info_Item_H_ +#define _EventTrigger_Cell_Info_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTrigger-Cell-ID.h" +#include "LogicalOR.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EventTrigger_Cell_Info_Item__cellType_PR { + EventTrigger_Cell_Info_Item__cellType_PR_NOTHING, /* No components present */ + EventTrigger_Cell_Info_Item__cellType_PR_cellType_Choice_Individual, + EventTrigger_Cell_Info_Item__cellType_PR_cellType_Choice_Group + /* Extensions may appear below */ + +} EventTrigger_Cell_Info_Item__cellType_PR; + +/* Forward declarations */ +struct EventTrigger_Cell_Info_Item_Choice_Individual; +struct EventTrigger_Cell_Info_Item_Choice_Group; + +/* EventTrigger-Cell-Info-Item */ +typedef struct EventTrigger_Cell_Info_Item { + RIC_EventTrigger_Cell_ID_t eventTriggerCellID; + struct EventTrigger_Cell_Info_Item__cellType { + EventTrigger_Cell_Info_Item__cellType_PR present; + union EventTrigger_Cell_Info_Item__cellType_u { + struct EventTrigger_Cell_Info_Item_Choice_Individual *cellType_Choice_Individual; + struct EventTrigger_Cell_Info_Item_Choice_Group *cellType_Choice_Group; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellType; + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_Cell_Info_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_Cell_Info_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info.h b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info.h new file mode 100644 index 0000000..f38e59e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-Cell-Info.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_Cell_Info_H_ +#define _EventTrigger_Cell_Info_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EventTrigger_Cell_Info_Item; + +/* EventTrigger-Cell-Info */ +typedef struct EventTrigger_Cell_Info { + struct EventTrigger_Cell_Info__cellInfo_List { + A_SEQUENCE_OF(struct EventTrigger_Cell_Info_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cellInfo_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_Cell_Info_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_Cell_Info_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Group.h b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Group.h new file mode 100644 index 0000000..d3b988e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Group.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_UE_Info_Item_Choice_Group_H_ +#define _EventTrigger_UE_Info_Item_Choice_Group_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-Testing.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EventTrigger-UE-Info-Item-Choice-Group */ +typedef struct EventTrigger_UE_Info_Item_Choice_Group { + RANParameter_Testing_t ranParameterTesting; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_UE_Info_Item_Choice_Group_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Group; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_Item_Choice_Group_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_Item_Choice_Group_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_UE_Info_Item_Choice_Group_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Individual.h b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Individual.h new file mode 100644 index 0000000..321e050 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item-Choice-Individual.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_UE_Info_Item_Choice_Individual_H_ +#define _EventTrigger_UE_Info_Item_Choice_Individual_H_ + + +#include + +/* Including external dependencies */ +#include "UEID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing; + +/* EventTrigger-UE-Info-Item-Choice-Individual */ +typedef struct EventTrigger_UE_Info_Item_Choice_Individual { + UEID_t ueID; + struct RANParameter_Testing *ranParameterTesting; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_UE_Info_Item_Choice_Individual_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_Item_Choice_Individual_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_Item_Choice_Individual_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_UE_Info_Item_Choice_Individual_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item.h b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item.h new file mode 100644 index 0000000..a157b7e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info-Item.h @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_UE_Info_Item_H_ +#define _EventTrigger_UE_Info_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTrigger-UE-ID.h" +#include "LogicalOR.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EventTrigger_UE_Info_Item__ueType_PR { + EventTrigger_UE_Info_Item__ueType_PR_NOTHING, /* No components present */ + EventTrigger_UE_Info_Item__ueType_PR_ueType_Choice_Individual, + EventTrigger_UE_Info_Item__ueType_PR_ueType_Choice_Group + /* Extensions may appear below */ + +} EventTrigger_UE_Info_Item__ueType_PR; + +/* Forward declarations */ +struct EventTrigger_UE_Info_Item_Choice_Individual; +struct EventTrigger_UE_Info_Item_Choice_Group; + +/* EventTrigger-UE-Info-Item */ +typedef struct EventTrigger_UE_Info_Item { + RIC_EventTrigger_UE_ID_t eventTriggerUEID; + struct EventTrigger_UE_Info_Item__ueType { + EventTrigger_UE_Info_Item__ueType_PR present; + union EventTrigger_UE_Info_Item__ueType_u { + struct EventTrigger_UE_Info_Item_Choice_Individual *ueType_Choice_Individual; + struct EventTrigger_UE_Info_Item_Choice_Group *ueType_Choice_Group; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueType; + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_UE_Info_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_UE_Info_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info.h b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info.h new file mode 100644 index 0000000..56d73ec --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-UE-Info.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_UE_Info_H_ +#define _EventTrigger_UE_Info_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EventTrigger_UE_Info_Item; + +/* EventTrigger-UE-Info */ +typedef struct EventTrigger_UE_Info { + struct EventTrigger_UE_Info__ueInfo_List { + A_SEQUENCE_OF(struct EventTrigger_UE_Info_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueInfo_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_UE_Info_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_UE_Info_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info-Item.h b/Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info-Item.h new file mode 100644 index 0000000..985e916 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_UEevent_Info_Item_H_ +#define _EventTrigger_UEevent_Info_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-EventTrigger-UEevent-ID.h" +#include "LogicalOR.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EventTrigger-UEevent-Info-Item */ +typedef struct EventTrigger_UEevent_Info_Item { + RIC_EventTrigger_UEevent_ID_t ueEventID; + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_UEevent_Info_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_UEevent_Info_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UEevent_Info_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_UEevent_Info_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_UEevent_Info_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info.h b/Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info.h new file mode 100644 index 0000000..9639f21 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/EventTrigger-UEevent-Info.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _EventTrigger_UEevent_Info_H_ +#define _EventTrigger_UEevent_Info_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EventTrigger_UEevent_Info_Item; + +/* EventTrigger-UEevent-Info */ +typedef struct EventTrigger_UEevent_Info { + struct EventTrigger_UEevent_Info__ueEvent_List { + A_SEQUENCE_OF(struct EventTrigger_UEevent_Info_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ueEvent_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EventTrigger_UEevent_Info_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EventTrigger_UEevent_Info; +extern asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UEevent_Info_specs_1; +extern asn_TYPE_member_t asn_MBR_EventTrigger_UEevent_Info_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EventTrigger_UEevent_Info_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/FiveGS-TAC.h b/Bouncer/e2sm_rc/headers/FiveGS-TAC.h new file mode 100644 index 0000000..a930b18 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/FiveGS-TAC.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _FiveGS_TAC_H_ +#define _FiveGS_TAC_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* FiveGS-TAC */ +typedef OCTET_STRING_t FiveGS_TAC_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_FiveGS_TAC_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_FiveGS_TAC; +asn_struct_free_f FiveGS_TAC_free; +asn_struct_print_f FiveGS_TAC_print; +asn_constr_check_f FiveGS_TAC_constraint; +ber_type_decoder_f FiveGS_TAC_decode_ber; +der_type_encoder_f FiveGS_TAC_encode_der; +xer_type_decoder_f FiveGS_TAC_decode_xer; +xer_type_encoder_f FiveGS_TAC_encode_xer; +oer_type_decoder_f FiveGS_TAC_decode_oer; +oer_type_encoder_f FiveGS_TAC_encode_oer; +per_type_decoder_f FiveGS_TAC_decode_uper; +per_type_encoder_f FiveGS_TAC_encode_uper; +per_type_decoder_f FiveGS_TAC_decode_aper; +per_type_encoder_f FiveGS_TAC_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _FiveGS_TAC_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/FiveQI.h b/Bouncer/e2sm_rc/headers/FiveQI.h new file mode 100644 index 0000000..cdf9148 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/FiveQI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _FiveQI_H_ +#define _FiveQI_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* FiveQI */ +typedef long FiveQI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_FiveQI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_FiveQI; +asn_struct_free_f FiveQI_free; +asn_struct_print_f FiveQI_print; +asn_constr_check_f FiveQI_constraint; +ber_type_decoder_f FiveQI_decode_ber; +der_type_encoder_f FiveQI_encode_der; +xer_type_decoder_f FiveQI_decode_xer; +xer_type_encoder_f FiveQI_encode_xer; +oer_type_decoder_f FiveQI_decode_oer; +oer_type_encoder_f FiveQI_encode_oer; +per_type_decoder_f FiveQI_decode_uper; +per_type_encoder_f FiveQI_encode_uper; +per_type_decoder_f FiveQI_decode_aper; +per_type_encoder_f FiveQI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _FiveQI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/FreqBandNrItem.h b/Bouncer/e2sm_rc/headers/FreqBandNrItem.h new file mode 100644 index 0000000..f9ecc2f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/FreqBandNrItem.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _FreqBandNrItem_H_ +#define _FreqBandNrItem_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* FreqBandNrItem */ +typedef struct FreqBandNrItem { + long freqBandIndicatorNr; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} FreqBandNrItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_FreqBandNrItem; + +#ifdef __cplusplus +} +#endif + +#endif /* _FreqBandNrItem_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GNB-CU-CP-UE-E1AP-ID.h b/Bouncer/e2sm_rc/headers/GNB-CU-CP-UE-E1AP-ID.h new file mode 100644 index 0000000..6b4f5e1 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GNB-CU-CP-UE-E1AP-ID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_CP_UE_E1AP_ID_H_ +#define _GNB_CU_CP_UE_E1AP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-CP-UE-E1AP-ID */ +typedef unsigned long GNB_CU_CP_UE_E1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_CP_UE_E1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_CP_UE_E1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_GNB_CU_CP_UE_E1AP_ID_specs_1; +asn_struct_free_f GNB_CU_CP_UE_E1AP_ID_free; +asn_struct_print_f GNB_CU_CP_UE_E1AP_ID_print; +asn_constr_check_f GNB_CU_CP_UE_E1AP_ID_constraint; +ber_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_ber; +der_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_der; +xer_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_xer; +xer_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_xer; +oer_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_oer; +oer_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_oer; +per_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_uper; +per_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_uper; +per_type_decoder_f GNB_CU_CP_UE_E1AP_ID_decode_aper; +per_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_CP_UE_E1AP_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GNB-CU-UE-F1AP-ID.h b/Bouncer/e2sm_rc/headers/GNB-CU-UE-F1AP-ID.h new file mode 100644 index 0000000..9dd0120 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GNB-CU-UE-F1AP-ID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_UE_F1AP_ID_H_ +#define _GNB_CU_UE_F1AP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-UE-F1AP-ID */ +typedef unsigned long GNB_CU_UE_F1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_UE_F1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UE_F1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_GNB_CU_UE_F1AP_ID_specs_1; +asn_struct_free_f GNB_CU_UE_F1AP_ID_free; +asn_struct_print_f GNB_CU_UE_F1AP_ID_print; +asn_constr_check_f GNB_CU_UE_F1AP_ID_constraint; +ber_type_decoder_f GNB_CU_UE_F1AP_ID_decode_ber; +der_type_encoder_f GNB_CU_UE_F1AP_ID_encode_der; +xer_type_decoder_f GNB_CU_UE_F1AP_ID_decode_xer; +xer_type_encoder_f GNB_CU_UE_F1AP_ID_encode_xer; +oer_type_decoder_f GNB_CU_UE_F1AP_ID_decode_oer; +oer_type_encoder_f GNB_CU_UE_F1AP_ID_encode_oer; +per_type_decoder_f GNB_CU_UE_F1AP_ID_decode_uper; +per_type_encoder_f GNB_CU_UE_F1AP_ID_encode_uper; +per_type_decoder_f GNB_CU_UE_F1AP_ID_decode_aper; +per_type_encoder_f GNB_CU_UE_F1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_UE_F1AP_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GNB-CU-UP-ID.h b/Bouncer/e2sm_rc/headers/GNB-CU-UP-ID.h new file mode 100644 index 0000000..78fff79 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GNB-CU-UP-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_CU_UP_ID_H_ +#define _GNB_CU_UP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-CU-UP-ID */ +typedef INTEGER_t GNB_CU_UP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID; +asn_struct_free_f GNB_CU_UP_ID_free; +asn_struct_print_f GNB_CU_UP_ID_print; +asn_constr_check_f GNB_CU_UP_ID_constraint; +ber_type_decoder_f GNB_CU_UP_ID_decode_ber; +der_type_encoder_f GNB_CU_UP_ID_encode_der; +xer_type_decoder_f GNB_CU_UP_ID_decode_xer; +xer_type_encoder_f GNB_CU_UP_ID_encode_xer; +oer_type_decoder_f GNB_CU_UP_ID_decode_oer; +oer_type_encoder_f GNB_CU_UP_ID_encode_oer; +per_type_decoder_f GNB_CU_UP_ID_decode_uper; +per_type_encoder_f GNB_CU_UP_ID_encode_uper; +per_type_decoder_f GNB_CU_UP_ID_decode_aper; +per_type_encoder_f GNB_CU_UP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_CU_UP_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GNB-DU-ID.h b/Bouncer/e2sm_rc/headers/GNB-DU-ID.h new file mode 100644 index 0000000..a1a4bb9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GNB-DU-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_DU_ID_H_ +#define _GNB_DU_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GNB-DU-ID */ +typedef INTEGER_t GNB_DU_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID; +asn_struct_free_f GNB_DU_ID_free; +asn_struct_print_f GNB_DU_ID_print; +asn_constr_check_f GNB_DU_ID_constraint; +ber_type_decoder_f GNB_DU_ID_decode_ber; +der_type_encoder_f GNB_DU_ID_encode_der; +xer_type_decoder_f GNB_DU_ID_decode_xer; +xer_type_encoder_f GNB_DU_ID_encode_xer; +oer_type_decoder_f GNB_DU_ID_decode_oer; +oer_type_encoder_f GNB_DU_ID_encode_oer; +per_type_decoder_f GNB_DU_ID_decode_uper; +per_type_encoder_f GNB_DU_ID_encode_uper; +per_type_decoder_f GNB_DU_ID_decode_aper; +per_type_encoder_f GNB_DU_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_DU_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GNB-ID.h b/Bouncer/e2sm_rc/headers/GNB-ID.h new file mode 100644 index 0000000..62875f3 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GNB-ID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GNB_ID_H_ +#define _GNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GNB_ID_PR { + GNB_ID_PR_NOTHING, /* No components present */ + GNB_ID_PR_gNB_ID + /* Extensions may appear below */ + +} GNB_ID_PR; + +/* GNB-ID */ +typedef struct GNB_ID { + GNB_ID_PR present; + union GNB_ID_u { + BIT_STRING_t gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GNB_ID; +extern asn_CHOICE_specifics_t asn_SPC_GNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GNB_ID_1[1]; +extern asn_per_constraints_t asn_PER_type_GNB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GUAMI.h b/Bouncer/e2sm_rc/headers/GUAMI.h new file mode 100644 index 0000000..cb1ebae --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GUAMI.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GUAMI_H_ +#define _GUAMI_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "AMFRegionID.h" +#include "AMFSetID.h" +#include "AMFPointer.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GUAMI */ +typedef struct GUAMI { + PLMNIdentity_t pLMNIdentity; + AMFRegionID_t aMFRegionID; + AMFSetID_t aMFSetID; + AMFPointer_t aMFPointer; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GUAMI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GUAMI; +extern asn_SEQUENCE_specifics_t asn_SPC_GUAMI_specs_1; +extern asn_TYPE_member_t asn_MBR_GUAMI_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GUAMI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GUMMEI.h b/Bouncer/e2sm_rc/headers/GUMMEI.h new file mode 100644 index 0000000..1cdfa1d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GUMMEI.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GUMMEI_H_ +#define _GUMMEI_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "MME-Group-ID.h" +#include "MME-Code.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GUMMEI */ +typedef struct GUMMEI { + PLMNIdentity_t pLMN_Identity; + MME_Group_ID_t mME_Group_ID; + MME_Code_t mME_Code; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GUMMEI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GUMMEI; +extern asn_SEQUENCE_specifics_t asn_SPC_GUMMEI_specs_1; +extern asn_TYPE_member_t asn_MBR_GUMMEI_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GUMMEI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GlobalENB-ID.h b/Bouncer/e2sm_rc/headers/GlobalENB-ID.h new file mode 100644 index 0000000..5077540 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GlobalENB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalENB_ID_H_ +#define _GlobalENB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "ENB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalENB-ID */ +typedef struct GlobalENB_ID { + PLMNIdentity_t pLMNIdentity; + ENB_ID_t eNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalENB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GlobalGNB-ID.h b/Bouncer/e2sm_rc/headers/GlobalGNB-ID.h new file mode 100644 index 0000000..747d9f6 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GlobalGNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalGNB_ID_H_ +#define _GlobalGNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "GNB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalGNB-ID */ +typedef struct GlobalGNB_ID { + PLMNIdentity_t pLMNIdentity; + GNB_ID_t gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalGNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalGNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalGNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalGNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalGNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GlobalNGRANNodeID.h b/Bouncer/e2sm_rc/headers/GlobalNGRANNodeID.h new file mode 100644 index 0000000..27c6222 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GlobalNGRANNodeID.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalNGRANNodeID_H_ +#define _GlobalNGRANNodeID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GlobalNGRANNodeID_PR { + GlobalNGRANNodeID_PR_NOTHING, /* No components present */ + GlobalNGRANNodeID_PR_gNB, + GlobalNGRANNodeID_PR_ng_eNB + /* Extensions may appear below */ + +} GlobalNGRANNodeID_PR; + +/* Forward declarations */ +struct GlobalGNB_ID; +struct GlobalNgENB_ID; + +/* GlobalNGRANNodeID */ +typedef struct GlobalNGRANNodeID { + GlobalNGRANNodeID_PR present; + union GlobalNGRANNodeID_u { + struct GlobalGNB_ID *gNB; + struct GlobalNgENB_ID *ng_eNB; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalNGRANNodeID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalNGRANNodeID; +extern asn_CHOICE_specifics_t asn_SPC_GlobalNGRANNodeID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalNGRANNodeID_1[2]; +extern asn_per_constraints_t asn_PER_type_GlobalNGRANNodeID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalNGRANNodeID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GlobalNgENB-ID.h b/Bouncer/e2sm_rc/headers/GlobalNgENB-ID.h new file mode 100644 index 0000000..8d544cc --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GlobalNgENB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalNgENB_ID_H_ +#define _GlobalNgENB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "NgENB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalNgENB-ID */ +typedef struct GlobalNgENB_ID { + PLMNIdentity_t pLMNIdentity; + NgENB_ID_t ngENB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalNgENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalNgENB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalNgENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalNgENB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalNgENB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GlobalenGNB-ID.h b/Bouncer/e2sm_rc/headers/GlobalenGNB-ID.h new file mode 100644 index 0000000..60e4eb8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GlobalenGNB-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GlobalenGNB_ID_H_ +#define _GlobalenGNB_ID_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "EN-GNB-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* GlobalenGNB-ID */ +typedef struct GlobalenGNB_ID { + PLMNIdentity_t pLMN_Identity; + EN_GNB_ID_t en_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalenGNB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID; +extern asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalenGNB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/GroupID.h b/Bouncer/e2sm_rc/headers/GroupID.h new file mode 100644 index 0000000..318c470 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/GroupID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _GroupID_H_ +#define _GroupID_H_ + + +#include + +/* Including external dependencies */ +#include "FiveQI.h" +#include "QCI.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GroupID_PR { + GroupID_PR_NOTHING, /* No components present */ + GroupID_PR_fiveGC, + GroupID_PR_ePC + /* Extensions may appear below */ + +} GroupID_PR; + +/* GroupID */ +typedef struct GroupID { + GroupID_PR present; + union GroupID_u { + FiveQI_t fiveGC; + QCI_t ePC; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GroupID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GroupID; + +#ifdef __cplusplus +} +#endif + +#endif /* _GroupID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/INTEGER.h b/Bouncer/e2sm_rc/headers/INTEGER.h new file mode 100644 index 0000000..f776c07 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/INTEGER.h @@ -0,0 +1,108 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _INTEGER_H_ +#define _INTEGER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ASN__PRIMITIVE_TYPE_t INTEGER_t; + +extern asn_TYPE_descriptor_t asn_DEF_INTEGER; +extern asn_TYPE_operation_t asn_OP_INTEGER; + +/* Map with to integer value association */ +typedef struct asn_INTEGER_enum_map_s { + long nat_value; /* associated native integer value */ + size_t enum_len; /* strlen("tag") */ + const char *enum_name; /* "tag" */ +} asn_INTEGER_enum_map_t; + +/* This type describes an enumeration for INTEGER and ENUMERATED types */ +typedef struct asn_INTEGER_specifics_s { + const asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */ + const unsigned int *enum2value; /* "tag" => N; sorted by tag */ + int map_count; /* Elements in either map */ + int extension; /* This map is extensible */ + int strict_enumeration; /* Enumeration set is fixed */ + int field_width; /* Size of native integer */ + int field_unsigned; /* Signed=0, unsigned=1 */ +} asn_INTEGER_specifics_t; + +#define INTEGER_free ASN__PRIMITIVE_TYPE_free +#define INTEGER_decode_ber ber_decode_primitive +#define INTEGER_constraint asn_generic_no_constraint +asn_struct_print_f INTEGER_print; +asn_struct_compare_f INTEGER_compare; +der_type_encoder_f INTEGER_encode_der; +xer_type_decoder_f INTEGER_decode_xer; +xer_type_encoder_f INTEGER_encode_xer; +oer_type_decoder_f INTEGER_decode_oer; +oer_type_encoder_f INTEGER_encode_oer; +per_type_decoder_f INTEGER_decode_uper; +per_type_encoder_f INTEGER_encode_uper; +per_type_decoder_f INTEGER_decode_aper; +per_type_encoder_f INTEGER_encode_aper; +asn_random_fill_f INTEGER_random_fill; + +/*********************************** + * Some handy conversion routines. * + ***********************************/ + +/* + * Natiwe size-independent conversion of native integers to/from INTEGER. + * (l_size) is in bytes. + * Returns 0 if it was possible to convert, -1 otherwise. + * -1/EINVAL: Mandatory argument missing + * -1/ERANGE: Value encoded is out of range for long representation + * -1/ENOMEM: Memory allocation failed (in asn_*2INTEGER()). + */ +int asn_INTEGER2imax(const INTEGER_t *i, intmax_t *l); +int asn_INTEGER2umax(const INTEGER_t *i, uintmax_t *l); +int asn_imax2INTEGER(INTEGER_t *i, intmax_t l); +int asn_umax2INTEGER(INTEGER_t *i, uintmax_t l); + +/* + * Size-specific conversion helpers. + */ +int asn_INTEGER2long(const INTEGER_t *i, long *l); +int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l); +int asn_long2INTEGER(INTEGER_t *i, long l); +int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l); +int asn_int642INTEGER(INTEGER_t *i, int64_t l); +int asn_uint642INTEGER(INTEGER_t *i, uint64_t l); + +/* A version of strtol/strtoimax(3) with nicer error reporting. */ +enum asn_strtox_result_e { + ASN_STRTOX_ERROR_RANGE = -3, /* Input outside of supported numeric range */ + ASN_STRTOX_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */ + ASN_STRTOX_EXPECT_MORE = -1, /* More data expected (e.g. "+") */ + ASN_STRTOX_OK = 0, /* Conversion succeded, number ends at (*end) */ + ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeded, but the string has extra stuff */ +}; +enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end, + long *l); +enum asn_strtox_result_e asn_strtoul_lim(const char *str, const char **end, + unsigned long *l); +enum asn_strtox_result_e asn_strtoimax_lim(const char *str, const char **end, + intmax_t *l); +enum asn_strtox_result_e asn_strtoumax_lim(const char *str, const char **end, + uintmax_t *l); + +/* + * Convert the integer value into the corresponding enumeration map entry. + */ +const asn_INTEGER_enum_map_t *INTEGER_map_value2enum( + const asn_INTEGER_specifics_t *specs, long value); + +#ifdef __cplusplus +} +#endif + +#endif /* _INTEGER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/IndexToRFSP.h b/Bouncer/e2sm_rc/headers/IndexToRFSP.h new file mode 100644 index 0000000..9b20ddb --- /dev/null +++ b/Bouncer/e2sm_rc/headers/IndexToRFSP.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _IndexToRFSP_H_ +#define _IndexToRFSP_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* IndexToRFSP */ +typedef long IndexToRFSP_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IndexToRFSP; +asn_struct_free_f IndexToRFSP_free; +asn_struct_print_f IndexToRFSP_print; +asn_constr_check_f IndexToRFSP_constraint; +ber_type_decoder_f IndexToRFSP_decode_ber; +der_type_encoder_f IndexToRFSP_encode_der; +xer_type_decoder_f IndexToRFSP_decode_xer; +xer_type_encoder_f IndexToRFSP_encode_xer; +oer_type_decoder_f IndexToRFSP_decode_oer; +oer_type_encoder_f IndexToRFSP_encode_oer; +per_type_decoder_f IndexToRFSP_decode_uper; +per_type_encoder_f IndexToRFSP_encode_uper; +per_type_decoder_f IndexToRFSP_decode_aper; +per_type_encoder_f IndexToRFSP_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _IndexToRFSP_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InsertIndication-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/InsertIndication-RANParameter-Item.h new file mode 100644 index 0000000..a23f1ac --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InsertIndication-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InsertIndication_RANParameter_Item_H_ +#define _InsertIndication_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* InsertIndication-RANParameter-Item */ +typedef struct InsertIndication_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InsertIndication_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InsertIndication_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_InsertIndication_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_InsertIndication_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InsertIndication_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/Interface-MessageID.h b/Bouncer/e2sm_rc/headers/Interface-MessageID.h new file mode 100644 index 0000000..75bc548 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/Interface-MessageID.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _Interface_MessageID_H_ +#define _Interface_MessageID_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Interface_MessageID__messageType { + Interface_MessageID__messageType_initiatingMessage = 0, + Interface_MessageID__messageType_successfulOutcome = 1, + Interface_MessageID__messageType_unsuccessfulOutcome = 2 + /* + * Enumeration is extensible + */ +} e_Interface_MessageID__messageType; + +/* Interface-MessageID */ +typedef struct Interface_MessageID { + long interfaceProcedureID; + long messageType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Interface_MessageID_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_messageType_3; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_Interface_MessageID; +extern asn_SEQUENCE_specifics_t asn_SPC_Interface_MessageID_specs_1; +extern asn_TYPE_member_t asn_MBR_Interface_MessageID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Interface_MessageID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceID-E1.h b/Bouncer/e2sm_rc/headers/InterfaceID-E1.h new file mode 100644 index 0000000..84c1339 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceID-E1.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_E1_H_ +#define _InterfaceID_E1_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalGNB-ID.h" +#include "GNB-CU-UP-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-E1 */ +typedef struct InterfaceID_E1 { + GlobalGNB_ID_t globalGNB_ID; + GNB_CU_UP_ID_t gNB_CU_UP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_E1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_E1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_E1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_E1_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_E1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceID-F1.h b/Bouncer/e2sm_rc/headers/InterfaceID-F1.h new file mode 100644 index 0000000..cfd6f2c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceID-F1.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_F1_H_ +#define _InterfaceID_F1_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalGNB-ID.h" +#include "GNB-DU-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-F1 */ +typedef struct InterfaceID_F1 { + GlobalGNB_ID_t globalGNB_ID; + GNB_DU_ID_t gNB_DU_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_F1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_F1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_F1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_F1_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_F1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceID-NG.h b/Bouncer/e2sm_rc/headers/InterfaceID-NG.h new file mode 100644 index 0000000..27b2029 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceID-NG.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_NG_H_ +#define _InterfaceID_NG_H_ + + +#include + +/* Including external dependencies */ +#include "GUAMI.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-NG */ +typedef struct InterfaceID_NG { + GUAMI_t guami; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_NG_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_NG; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_NG_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_NG_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_NG_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceID-S1.h b/Bouncer/e2sm_rc/headers/InterfaceID-S1.h new file mode 100644 index 0000000..a9d49fa --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceID-S1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_S1_H_ +#define _InterfaceID_S1_H_ + + +#include + +/* Including external dependencies */ +#include "GUMMEI.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-S1 */ +typedef struct InterfaceID_S1 { + GUMMEI_t gUMMEI; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_S1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_S1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_S1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_S1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_S1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceID-W1.h b/Bouncer/e2sm_rc/headers/InterfaceID-W1.h new file mode 100644 index 0000000..d42db01 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceID-W1.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_W1_H_ +#define _InterfaceID_W1_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalNgENB-ID.h" +#include "NGENB-DU-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-W1 */ +typedef struct InterfaceID_W1 { + GlobalNgENB_ID_t global_ng_eNB_ID; + NGENB_DU_ID_t ng_eNB_DU_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_W1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_W1; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_W1_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_W1_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_W1_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceID-X2.h b/Bouncer/e2sm_rc/headers/InterfaceID-X2.h new file mode 100644 index 0000000..b1effaa --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceID-X2.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_X2_H_ +#define _InterfaceID_X2_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum InterfaceID_X2__nodeType_PR { + InterfaceID_X2__nodeType_PR_NOTHING, /* No components present */ + InterfaceID_X2__nodeType_PR_global_eNB_ID, + InterfaceID_X2__nodeType_PR_global_en_gNB_ID + /* Extensions may appear below */ + +} InterfaceID_X2__nodeType_PR; + +/* Forward declarations */ +struct GlobalENB_ID; +struct GlobalenGNB_ID; + +/* InterfaceID-X2 */ +typedef struct InterfaceID_X2 { + struct InterfaceID_X2__nodeType { + InterfaceID_X2__nodeType_PR present; + union InterfaceID_X2__nodeType_u { + struct GlobalENB_ID *global_eNB_ID; + struct GlobalenGNB_ID *global_en_gNB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } nodeType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_X2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_X2; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_X2_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_X2_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_X2_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceID-Xn.h b/Bouncer/e2sm_rc/headers/InterfaceID-Xn.h new file mode 100644 index 0000000..eded096 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceID-Xn.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceID_Xn_H_ +#define _InterfaceID_Xn_H_ + + +#include + +/* Including external dependencies */ +#include "GlobalNGRANNodeID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* InterfaceID-Xn */ +typedef struct InterfaceID_Xn { + GlobalNGRANNodeID_t global_NG_RAN_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceID_Xn_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceID_Xn; +extern asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_Xn_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceID_Xn_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceID_Xn_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceIdentifier.h b/Bouncer/e2sm_rc/headers/InterfaceIdentifier.h new file mode 100644 index 0000000..65ec8a2 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceIdentifier.h @@ -0,0 +1,76 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceIdentifier_H_ +#define _InterfaceIdentifier_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum InterfaceIdentifier_PR { + InterfaceIdentifier_PR_NOTHING, /* No components present */ + InterfaceIdentifier_PR_nG, + InterfaceIdentifier_PR_xN, + InterfaceIdentifier_PR_f1, + InterfaceIdentifier_PR_e1, + InterfaceIdentifier_PR_s1, + InterfaceIdentifier_PR_x2, + InterfaceIdentifier_PR_w1 + /* Extensions may appear below */ + +} InterfaceIdentifier_PR; + +/* Forward declarations */ +struct InterfaceID_NG; +struct InterfaceID_Xn; +struct InterfaceID_F1; +struct InterfaceID_E1; +struct InterfaceID_S1; +struct InterfaceID_X2; +struct InterfaceID_W1; + +/* InterfaceIdentifier */ +typedef struct InterfaceIdentifier { + InterfaceIdentifier_PR present; + union InterfaceIdentifier_u { + struct InterfaceID_NG *nG; + struct InterfaceID_Xn *xN; + struct InterfaceID_F1 *f1; + struct InterfaceID_E1 *e1; + struct InterfaceID_S1 *s1; + struct InterfaceID_X2 *x2; + struct InterfaceID_W1 *w1; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} InterfaceIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_InterfaceIdentifier; +extern asn_CHOICE_specifics_t asn_SPC_InterfaceIdentifier_specs_1; +extern asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[7]; +extern asn_per_constraints_t asn_PER_type_InterfaceIdentifier_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceIdentifier_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/InterfaceType.h b/Bouncer/e2sm_rc/headers/InterfaceType.h new file mode 100644 index 0000000..c1bb25c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/InterfaceType.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _InterfaceType_H_ +#define _InterfaceType_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum InterfaceType { + InterfaceType_nG = 0, + InterfaceType_xn = 1, + InterfaceType_f1 = 2, + InterfaceType_e1 = 3, + InterfaceType_s1 = 4, + InterfaceType_x2 = 5, + InterfaceType_w1 = 6 + /* + * Enumeration is extensible + */ +} e_InterfaceType; + +/* InterfaceType */ +typedef long InterfaceType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_InterfaceType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_InterfaceType; +extern const asn_INTEGER_specifics_t asn_SPC_InterfaceType_specs_1; +asn_struct_free_f InterfaceType_free; +asn_struct_print_f InterfaceType_print; +asn_constr_check_f InterfaceType_constraint; +ber_type_decoder_f InterfaceType_decode_ber; +der_type_encoder_f InterfaceType_encode_der; +xer_type_decoder_f InterfaceType_decode_xer; +xer_type_encoder_f InterfaceType_encode_xer; +oer_type_decoder_f InterfaceType_decode_oer; +oer_type_encoder_f InterfaceType_encode_oer; +per_type_decoder_f InterfaceType_decode_uper; +per_type_encoder_f InterfaceType_encode_uper; +per_type_decoder_f InterfaceType_decode_aper; +per_type_encoder_f InterfaceType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _InterfaceType_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/L2Parameters-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/L2Parameters-RANParameter-Item.h new file mode 100644 index 0000000..86d1dd8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/L2Parameters-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _L2Parameters_RANParameter_Item_H_ +#define _L2Parameters_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* L2Parameters-RANParameter-Item */ +typedef struct L2Parameters_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} L2Parameters_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_L2Parameters_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_L2Parameters_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_L2Parameters_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _L2Parameters_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/LogicalOR.h b/Bouncer/e2sm_rc/headers/LogicalOR.h new file mode 100644 index 0000000..7d2161c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/LogicalOR.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _LogicalOR_H_ +#define _LogicalOR_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum LogicalOR { + LogicalOR_true = 0, + LogicalOR_false = 1 + /* + * Enumeration is extensible + */ +} e_LogicalOR; + +/* LogicalOR */ +typedef long LogicalOR_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_LogicalOR_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_LogicalOR; +extern const asn_INTEGER_specifics_t asn_SPC_LogicalOR_specs_1; +asn_struct_free_f LogicalOR_free; +asn_struct_print_f LogicalOR_print; +asn_constr_check_f LogicalOR_constraint; +ber_type_decoder_f LogicalOR_decode_ber; +der_type_encoder_f LogicalOR_encode_der; +xer_type_decoder_f LogicalOR_decode_xer; +xer_type_encoder_f LogicalOR_encode_xer; +oer_type_decoder_f LogicalOR_decode_oer; +oer_type_encoder_f LogicalOR_encode_oer; +per_type_decoder_f LogicalOR_decode_uper; +per_type_encoder_f LogicalOR_encode_uper; +per_type_decoder_f LogicalOR_decode_aper; +per_type_encoder_f LogicalOR_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _LogicalOR_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/MME-Code.h b/Bouncer/e2sm_rc/headers/MME-Code.h new file mode 100644 index 0000000..9fdbc1c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/MME-Code.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _MME_Code_H_ +#define _MME_Code_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* MME-Code */ +typedef OCTET_STRING_t MME_Code_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MME_Code_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MME_Code; +asn_struct_free_f MME_Code_free; +asn_struct_print_f MME_Code_print; +asn_constr_check_f MME_Code_constraint; +ber_type_decoder_f MME_Code_decode_ber; +der_type_encoder_f MME_Code_encode_der; +xer_type_decoder_f MME_Code_decode_xer; +xer_type_encoder_f MME_Code_encode_xer; +oer_type_decoder_f MME_Code_decode_oer; +oer_type_encoder_f MME_Code_encode_oer; +per_type_decoder_f MME_Code_decode_uper; +per_type_encoder_f MME_Code_encode_uper; +per_type_decoder_f MME_Code_decode_aper; +per_type_encoder_f MME_Code_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MME_Code_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/MME-Group-ID.h b/Bouncer/e2sm_rc/headers/MME-Group-ID.h new file mode 100644 index 0000000..00389dc --- /dev/null +++ b/Bouncer/e2sm_rc/headers/MME-Group-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _MME_Group_ID_H_ +#define _MME_Group_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* MME-Group-ID */ +typedef OCTET_STRING_t MME_Group_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MME_Group_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MME_Group_ID; +asn_struct_free_f MME_Group_ID_free; +asn_struct_print_f MME_Group_ID_print; +asn_constr_check_f MME_Group_ID_constraint; +ber_type_decoder_f MME_Group_ID_decode_ber; +der_type_encoder_f MME_Group_ID_encode_der; +xer_type_decoder_f MME_Group_ID_decode_xer; +xer_type_encoder_f MME_Group_ID_encode_xer; +oer_type_decoder_f MME_Group_ID_decode_oer; +oer_type_encoder_f MME_Group_ID_encode_oer; +per_type_decoder_f MME_Group_ID_decode_uper; +per_type_encoder_f MME_Group_ID_encode_uper; +per_type_decoder_f MME_Group_ID_decode_aper; +per_type_encoder_f MME_Group_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MME_Group_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/MME-UE-S1AP-ID.h b/Bouncer/e2sm_rc/headers/MME-UE-S1AP-ID.h new file mode 100644 index 0000000..8c89737 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/MME-UE-S1AP-ID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _MME_UE_S1AP_ID_H_ +#define _MME_UE_S1AP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* MME-UE-S1AP-ID */ +typedef unsigned long MME_UE_S1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MME_UE_S1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MME_UE_S1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_MME_UE_S1AP_ID_specs_1; +asn_struct_free_f MME_UE_S1AP_ID_free; +asn_struct_print_f MME_UE_S1AP_ID_print; +asn_constr_check_f MME_UE_S1AP_ID_constraint; +ber_type_decoder_f MME_UE_S1AP_ID_decode_ber; +der_type_encoder_f MME_UE_S1AP_ID_encode_der; +xer_type_decoder_f MME_UE_S1AP_ID_decode_xer; +xer_type_encoder_f MME_UE_S1AP_ID_encode_xer; +oer_type_decoder_f MME_UE_S1AP_ID_decode_oer; +oer_type_encoder_f MME_UE_S1AP_ID_encode_oer; +per_type_decoder_f MME_UE_S1AP_ID_decode_uper; +per_type_encoder_f MME_UE_S1AP_ID_encode_uper; +per_type_decoder_f MME_UE_S1AP_ID_decode_aper; +per_type_encoder_f MME_UE_S1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MME_UE_S1AP_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/MessageType-Choice-NI.h b/Bouncer/e2sm_rc/headers/MessageType-Choice-NI.h new file mode 100644 index 0000000..847806e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/MessageType-Choice-NI.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _MessageType_Choice_NI_H_ +#define _MessageType_Choice_NI_H_ + + +#include + +/* Including external dependencies */ +#include "InterfaceType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct InterfaceIdentifier; +struct Interface_MessageID; + +/* MessageType-Choice-NI */ +typedef struct MessageType_Choice_NI { + InterfaceType_t nI_Type; + struct InterfaceIdentifier *nI_Identifier; /* OPTIONAL */ + struct Interface_MessageID *nI_Message; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MessageType_Choice_NI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MessageType_Choice_NI; +extern asn_SEQUENCE_specifics_t asn_SPC_MessageType_Choice_NI_specs_1; +extern asn_TYPE_member_t asn_MBR_MessageType_Choice_NI_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MessageType_Choice_NI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/MessageType-Choice-RRC.h b/Bouncer/e2sm_rc/headers/MessageType-Choice-RRC.h new file mode 100644 index 0000000..9523774 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/MessageType-Choice-RRC.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _MessageType_Choice_RRC_H_ +#define _MessageType_Choice_RRC_H_ + + +#include + +/* Including external dependencies */ +#include "RRC-MessageID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* MessageType-Choice-RRC */ +typedef struct MessageType_Choice_RRC { + RRC_MessageID_t rRC_Message; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MessageType_Choice_RRC_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MessageType_Choice_RRC; +extern asn_SEQUENCE_specifics_t asn_SPC_MessageType_Choice_RRC_specs_1; +extern asn_TYPE_member_t asn_MBR_MessageType_Choice_RRC_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _MessageType_Choice_RRC_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/MessageType-Choice.h b/Bouncer/e2sm_rc/headers/MessageType-Choice.h new file mode 100644 index 0000000..92c669a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/MessageType-Choice.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _MessageType_Choice_H_ +#define _MessageType_Choice_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum MessageType_Choice_PR { + MessageType_Choice_PR_NOTHING, /* No components present */ + MessageType_Choice_PR_messageType_Choice_NI, + MessageType_Choice_PR_messageType_Choice_RRC + /* Extensions may appear below */ + +} MessageType_Choice_PR; + +/* Forward declarations */ +struct MessageType_Choice_NI; +struct MessageType_Choice_RRC; + +/* MessageType-Choice */ +typedef struct MessageType_Choice { + MessageType_Choice_PR present; + union MessageType_Choice_u { + struct MessageType_Choice_NI *messageType_Choice_NI; + struct MessageType_Choice_RRC *messageType_Choice_RRC; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} MessageType_Choice_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_MessageType_Choice; +extern asn_CHOICE_specifics_t asn_SPC_MessageType_Choice_specs_1; +extern asn_TYPE_member_t asn_MBR_MessageType_Choice_1[2]; +extern asn_per_constraints_t asn_PER_type_MessageType_Choice_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _MessageType_Choice_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NG-RANnodeUEXnAPID.h b/Bouncer/e2sm_rc/headers/NG-RANnodeUEXnAPID.h new file mode 100644 index 0000000..9cf70f8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NG-RANnodeUEXnAPID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NG_RANnodeUEXnAPID_H_ +#define _NG_RANnodeUEXnAPID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NG-RANnodeUEXnAPID */ +typedef unsigned long NG_RANnodeUEXnAPID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NG_RANnodeUEXnAPID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NG_RANnodeUEXnAPID; +extern const asn_INTEGER_specifics_t asn_SPC_NG_RANnodeUEXnAPID_specs_1; +asn_struct_free_f NG_RANnodeUEXnAPID_free; +asn_struct_print_f NG_RANnodeUEXnAPID_print; +asn_constr_check_f NG_RANnodeUEXnAPID_constraint; +ber_type_decoder_f NG_RANnodeUEXnAPID_decode_ber; +der_type_encoder_f NG_RANnodeUEXnAPID_encode_der; +xer_type_decoder_f NG_RANnodeUEXnAPID_decode_xer; +xer_type_encoder_f NG_RANnodeUEXnAPID_encode_xer; +oer_type_decoder_f NG_RANnodeUEXnAPID_decode_oer; +oer_type_encoder_f NG_RANnodeUEXnAPID_encode_oer; +per_type_decoder_f NG_RANnodeUEXnAPID_decode_uper; +per_type_encoder_f NG_RANnodeUEXnAPID_encode_uper; +per_type_decoder_f NG_RANnodeUEXnAPID_decode_aper; +per_type_encoder_f NG_RANnodeUEXnAPID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NG_RANnodeUEXnAPID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NGENB-CU-UE-W1AP-ID.h b/Bouncer/e2sm_rc/headers/NGENB-CU-UE-W1AP-ID.h new file mode 100644 index 0000000..1fe6199 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NGENB-CU-UE-W1AP-ID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NGENB_CU_UE_W1AP_ID_H_ +#define _NGENB_CU_UE_W1AP_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NGENB-CU-UE-W1AP-ID */ +typedef unsigned long NGENB_CU_UE_W1AP_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NGENB_CU_UE_W1AP_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NGENB_CU_UE_W1AP_ID; +extern const asn_INTEGER_specifics_t asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1; +asn_struct_free_f NGENB_CU_UE_W1AP_ID_free; +asn_struct_print_f NGENB_CU_UE_W1AP_ID_print; +asn_constr_check_f NGENB_CU_UE_W1AP_ID_constraint; +ber_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_ber; +der_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_der; +xer_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_xer; +xer_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_xer; +oer_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_oer; +oer_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_oer; +per_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_uper; +per_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_uper; +per_type_decoder_f NGENB_CU_UE_W1AP_ID_decode_aper; +per_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NGENB_CU_UE_W1AP_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NGENB-DU-ID.h b/Bouncer/e2sm_rc/headers/NGENB-DU-ID.h new file mode 100644 index 0000000..04421e8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NGENB-DU-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NGENB_DU_ID_H_ +#define _NGENB_DU_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NGENB-DU-ID */ +typedef INTEGER_t NGENB_DU_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NGENB_DU_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NGENB_DU_ID; +asn_struct_free_f NGENB_DU_ID_free; +asn_struct_print_f NGENB_DU_ID_print; +asn_constr_check_f NGENB_DU_ID_constraint; +ber_type_decoder_f NGENB_DU_ID_decode_ber; +der_type_encoder_f NGENB_DU_ID_encode_der; +xer_type_decoder_f NGENB_DU_ID_decode_xer; +xer_type_encoder_f NGENB_DU_ID_encode_xer; +oer_type_decoder_f NGENB_DU_ID_decode_oer; +oer_type_encoder_f NGENB_DU_ID_encode_oer; +per_type_decoder_f NGENB_DU_ID_decode_uper; +per_type_encoder_f NGENB_DU_ID_encode_uper; +per_type_decoder_f NGENB_DU_ID_decode_aper; +per_type_encoder_f NGENB_DU_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NGENB_DU_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NR-ARFCN.h b/Bouncer/e2sm_rc/headers/NR-ARFCN.h new file mode 100644 index 0000000..7110ab5 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NR-ARFCN.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NR_ARFCN_H_ +#define _NR_ARFCN_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NR-ARFCN */ +typedef struct NR_ARFCN { + long nRARFCN; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NR_ARFCN_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NR_ARFCN; +extern asn_SEQUENCE_specifics_t asn_SPC_NR_ARFCN_specs_1; +extern asn_TYPE_member_t asn_MBR_NR_ARFCN_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NR_ARFCN_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NR-CGI.h b/Bouncer/e2sm_rc/headers/NR-CGI.h new file mode 100644 index 0000000..a9c8f52 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NR-CGI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NR_CGI_H_ +#define _NR_CGI_H_ + + +#include + +/* Including external dependencies */ +#include "PLMNIdentity.h" +#include "NRCellIdentity.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NR-CGI */ +typedef struct NR_CGI { + PLMNIdentity_t pLMNIdentity; + NRCellIdentity_t nRCellIdentity; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NR_CGI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NR_CGI; +extern asn_SEQUENCE_specifics_t asn_SPC_NR_CGI_specs_1; +extern asn_TYPE_member_t asn_MBR_NR_CGI_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NR_CGI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NR-PCI.h b/Bouncer/e2sm_rc/headers/NR-PCI.h new file mode 100644 index 0000000..1e584a8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NR-PCI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NR_PCI_H_ +#define _NR_PCI_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NR-PCI */ +typedef long NR_PCI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NR_PCI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NR_PCI; +asn_struct_free_f NR_PCI_free; +asn_struct_print_f NR_PCI_print; +asn_constr_check_f NR_PCI_constraint; +ber_type_decoder_f NR_PCI_decode_ber; +der_type_encoder_f NR_PCI_encode_der; +xer_type_decoder_f NR_PCI_decode_xer; +xer_type_encoder_f NR_PCI_encode_xer; +oer_type_decoder_f NR_PCI_decode_oer; +oer_type_encoder_f NR_PCI_encode_oer; +per_type_decoder_f NR_PCI_decode_uper; +per_type_encoder_f NR_PCI_encode_uper; +per_type_decoder_f NR_PCI_decode_aper; +per_type_encoder_f NR_PCI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NR_PCI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NRCellIdentity.h b/Bouncer/e2sm_rc/headers/NRCellIdentity.h new file mode 100644 index 0000000..fb12d0d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NRCellIdentity.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NRCellIdentity_H_ +#define _NRCellIdentity_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NRCellIdentity */ +typedef BIT_STRING_t NRCellIdentity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NRCellIdentity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NRCellIdentity; +asn_struct_free_f NRCellIdentity_free; +asn_struct_print_f NRCellIdentity_print; +asn_constr_check_f NRCellIdentity_constraint; +ber_type_decoder_f NRCellIdentity_decode_ber; +der_type_encoder_f NRCellIdentity_encode_der; +xer_type_decoder_f NRCellIdentity_decode_xer; +xer_type_encoder_f NRCellIdentity_encode_xer; +oer_type_decoder_f NRCellIdentity_decode_oer; +oer_type_encoder_f NRCellIdentity_encode_oer; +per_type_decoder_f NRCellIdentity_decode_uper; +per_type_encoder_f NRCellIdentity_encode_uper; +per_type_decoder_f NRCellIdentity_decode_aper; +per_type_encoder_f NRCellIdentity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRCellIdentity_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NRFrequencyBand-List.h b/Bouncer/e2sm_rc/headers/NRFrequencyBand-List.h new file mode 100644 index 0000000..50f817b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NRFrequencyBand-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyBand_List_H_ +#define _NRFrequencyBand_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct NRFrequencyBandItem; + +/* NRFrequencyBand-List */ +typedef struct NRFrequencyBand_List { + A_SEQUENCE_OF(struct NRFrequencyBandItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NRFrequencyBand_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyBand_List; +extern asn_SET_OF_specifics_t asn_SPC_NRFrequencyBand_List_specs_1; +extern asn_TYPE_member_t asn_MBR_NRFrequencyBand_List_1[1]; +extern asn_per_constraints_t asn_PER_type_NRFrequencyBand_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyBand_List_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NRFrequencyBandItem.h b/Bouncer/e2sm_rc/headers/NRFrequencyBandItem.h new file mode 100644 index 0000000..e42074d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NRFrequencyBandItem.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyBandItem_H_ +#define _NRFrequencyBandItem_H_ + + +#include + +/* Including external dependencies */ +#include +#include "SupportedSULBandList.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NRFrequencyBandItem */ +typedef struct NRFrequencyBandItem { + long freqBandIndicatorNr; + SupportedSULBandList_t supportedSULBandList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NRFrequencyBandItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyBandItem; +extern asn_SEQUENCE_specifics_t asn_SPC_NRFrequencyBandItem_specs_1; +extern asn_TYPE_member_t asn_MBR_NRFrequencyBandItem_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyBandItem_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NRFrequencyInfo.h b/Bouncer/e2sm_rc/headers/NRFrequencyInfo.h new file mode 100644 index 0000000..878dc08 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NRFrequencyInfo.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyInfo_H_ +#define _NRFrequencyInfo_H_ + + +#include + +/* Including external dependencies */ +#include "NR-ARFCN.h" +#include "NRFrequencyBand-List.h" +#include "NRFrequencyShift7p5khz.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NRFrequencyInfo */ +typedef struct NRFrequencyInfo { + NR_ARFCN_t nrARFCN; + NRFrequencyBand_List_t frequencyBand_List; + NRFrequencyShift7p5khz_t *frequencyShift7p5khz; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NRFrequencyInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_NRFrequencyInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_NRFrequencyInfo_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyInfo_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NRFrequencyShift7p5khz.h b/Bouncer/e2sm_rc/headers/NRFrequencyShift7p5khz.h new file mode 100644 index 0000000..3e74e69 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NRFrequencyShift7p5khz.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NRFrequencyShift7p5khz_H_ +#define _NRFrequencyShift7p5khz_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NRFrequencyShift7p5khz { + NRFrequencyShift7p5khz_false = 0, + NRFrequencyShift7p5khz_true = 1 + /* + * Enumeration is extensible + */ +} e_NRFrequencyShift7p5khz; + +/* NRFrequencyShift7p5khz */ +typedef long NRFrequencyShift7p5khz_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_NRFrequencyShift7p5khz_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_NRFrequencyShift7p5khz; +extern const asn_INTEGER_specifics_t asn_SPC_NRFrequencyShift7p5khz_specs_1; +asn_struct_free_f NRFrequencyShift7p5khz_free; +asn_struct_print_f NRFrequencyShift7p5khz_print; +asn_constr_check_f NRFrequencyShift7p5khz_constraint; +ber_type_decoder_f NRFrequencyShift7p5khz_decode_ber; +der_type_encoder_f NRFrequencyShift7p5khz_encode_der; +xer_type_decoder_f NRFrequencyShift7p5khz_decode_xer; +xer_type_encoder_f NRFrequencyShift7p5khz_encode_xer; +oer_type_decoder_f NRFrequencyShift7p5khz_decode_oer; +oer_type_encoder_f NRFrequencyShift7p5khz_encode_oer; +per_type_decoder_f NRFrequencyShift7p5khz_decode_uper; +per_type_encoder_f NRFrequencyShift7p5khz_encode_uper; +per_type_decoder_f NRFrequencyShift7p5khz_decode_aper; +per_type_encoder_f NRFrequencyShift7p5khz_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _NRFrequencyShift7p5khz_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NativeEnumerated.h b/Bouncer/e2sm_rc/headers/NativeEnumerated.h new file mode 100644 index 0000000..459f0e6 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NativeEnumerated.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This type differs from the standard ENUMERATED in that it is modelled using + * the fixed machine type (long, int, short), so it can hold only values of + * limited length. There is no type (i.e., NativeEnumerated_t, any integer type + * will do). + * This type may be used when integer range is limited by subtype constraints. + */ +#ifndef _NativeEnumerated_H_ +#define _NativeEnumerated_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; +extern asn_TYPE_operation_t asn_OP_NativeEnumerated; + +xer_type_encoder_f NativeEnumerated_encode_xer; +oer_type_decoder_f NativeEnumerated_decode_oer; +oer_type_encoder_f NativeEnumerated_encode_oer; +per_type_decoder_f NativeEnumerated_decode_uper; +per_type_encoder_f NativeEnumerated_encode_uper; +per_type_decoder_f NativeEnumerated_decode_aper; +per_type_encoder_f NativeEnumerated_encode_aper; + +#define NativeEnumerated_free NativeInteger_free +#define NativeEnumerated_print NativeInteger_print +#define NativeEnumerated_compare NativeInteger_compare +#define NativeEnumerated_random_fill NativeInteger_random_fill +#define NativeEnumerated_constraint asn_generic_no_constraint +#define NativeEnumerated_decode_ber NativeInteger_decode_ber +#define NativeEnumerated_encode_der NativeInteger_encode_der +#define NativeEnumerated_decode_xer NativeInteger_decode_xer + +#ifdef __cplusplus +} +#endif + +#endif /* _NativeEnumerated_H_ */ diff --git a/Bouncer/e2sm_rc/headers/NativeInteger.h b/Bouncer/e2sm_rc/headers/NativeInteger.h new file mode 100644 index 0000000..c74406a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NativeInteger.h @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This type differs from the standard INTEGER in that it is modelled using + * the fixed machine type (long, int, short), so it can hold only values of + * limited length. There is no type (i.e., NativeInteger_t, any integer type + * will do). + * This type may be used when integer range is limited by subtype constraints. + */ +#ifndef _NativeInteger_H_ +#define _NativeInteger_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; +extern asn_TYPE_operation_t asn_OP_NativeInteger; + +asn_struct_free_f NativeInteger_free; +asn_struct_print_f NativeInteger_print; +asn_struct_compare_f NativeInteger_compare; +ber_type_decoder_f NativeInteger_decode_ber; +der_type_encoder_f NativeInteger_encode_der; +xer_type_decoder_f NativeInteger_decode_xer; +xer_type_encoder_f NativeInteger_encode_xer; +oer_type_decoder_f NativeInteger_decode_oer; +oer_type_encoder_f NativeInteger_encode_oer; +per_type_decoder_f NativeInteger_decode_uper; +per_type_encoder_f NativeInteger_encode_uper; +per_type_decoder_f NativeInteger_decode_aper; +per_type_encoder_f NativeInteger_encode_aper; +asn_random_fill_f NativeInteger_random_fill; + +#define NativeInteger_constraint asn_generic_no_constraint + +#ifdef __cplusplus +} +#endif + +#endif /* _NativeInteger_H_ */ diff --git a/Bouncer/e2sm_rc/headers/NativeReal.h b/Bouncer/e2sm_rc/headers/NativeReal.h new file mode 100644 index 0000000..1bfdc96 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NativeReal.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This type differs from the standard REAL in that it is modelled using + * the fixed machine type (double), so it can hold only values of + * limited precision. There is no explicit type (i.e., NativeReal_t). + * Use of this type is normally enabled by -fnative-types. + */ +#ifndef ASN_TYPE_NativeReal_H +#define ASN_TYPE_NativeReal_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_NativeReal_specifics_s { + unsigned float_size; /* sizeof(float) or sizeof(double) */ +} asn_NativeReal_specifics_t; + +extern asn_TYPE_descriptor_t asn_DEF_NativeReal; +extern asn_TYPE_operation_t asn_OP_NativeReal; + +asn_struct_free_f NativeReal_free; +asn_struct_print_f NativeReal_print; +asn_struct_compare_f NativeReal_compare; +ber_type_decoder_f NativeReal_decode_ber; +der_type_encoder_f NativeReal_encode_der; +per_type_decoder_f NativeReal_decode_uper; +per_type_encoder_f NativeReal_encode_uper; +per_type_decoder_f NativeReal_decode_aper; +per_type_encoder_f NativeReal_encode_aper; +oer_type_decoder_f NativeReal_decode_oer; +oer_type_encoder_f NativeReal_encode_oer; +xer_type_decoder_f NativeReal_decode_xer; +xer_type_encoder_f NativeReal_encode_xer; +asn_random_fill_f NativeReal_random_fill; + +#define NativeReal_constraint asn_generic_no_constraint + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_TYPE_NativeReal_H */ diff --git a/Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-E-UTRA.h b/Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-E-UTRA.h new file mode 100644 index 0000000..aa44c2e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-E-UTRA.h @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NeighborCell_Item_Choice_E_UTRA_H_ +#define _NeighborCell_Item_Choice_E_UTRA_H_ + + +#include + +/* Including external dependencies */ +#include "EUTRA-CGI.h" +#include "E-UTRA-PCI.h" +#include "E-UTRA-ARFCN.h" +#include "E-UTRA-TAC.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NeighborCell_Item_Choice_E_UTRA__x2_Xn_established { + NeighborCell_Item_Choice_E_UTRA__x2_Xn_established_true = 0, + NeighborCell_Item_Choice_E_UTRA__x2_Xn_established_false = 1 + /* + * Enumeration is extensible + */ +} e_NeighborCell_Item_Choice_E_UTRA__x2_Xn_established; +typedef enum NeighborCell_Item_Choice_E_UTRA__hO_validated { + NeighborCell_Item_Choice_E_UTRA__hO_validated_true = 0, + NeighborCell_Item_Choice_E_UTRA__hO_validated_false = 1 + /* + * Enumeration is extensible + */ +} e_NeighborCell_Item_Choice_E_UTRA__hO_validated; + +/* NeighborCell-Item-Choice-E-UTRA */ +typedef struct NeighborCell_Item_Choice_E_UTRA { + EUTRA_CGI_t eUTRA_CGI; + E_UTRA_PCI_t eUTRA_PCI; + E_UTRA_ARFCN_t eUTRA_ARFCN; + E_UTRA_TAC_t eUTRA_TAC; + long x2_Xn_established; + long hO_validated; + long version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NeighborCell_Item_Choice_E_UTRA_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_x2_Xn_established_6; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_hO_validated_10; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_NeighborCell_Item_Choice_E_UTRA; +extern asn_SEQUENCE_specifics_t asn_SPC_NeighborCell_Item_Choice_E_UTRA_specs_1; +extern asn_TYPE_member_t asn_MBR_NeighborCell_Item_Choice_E_UTRA_1[7]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NeighborCell_Item_Choice_E_UTRA_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-NR.h b/Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-NR.h new file mode 100644 index 0000000..ac38b8a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NeighborCell-Item-Choice-NR.h @@ -0,0 +1,82 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NeighborCell_Item_Choice_NR_H_ +#define _NeighborCell_Item_Choice_NR_H_ + + +#include + +/* Including external dependencies */ +#include "NR-CGI.h" +#include "NR-PCI.h" +#include "FiveGS-TAC.h" +#include +#include "NRFrequencyInfo.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NeighborCell_Item_Choice_NR__nR_mode_info { + NeighborCell_Item_Choice_NR__nR_mode_info_fdd = 0, + NeighborCell_Item_Choice_NR__nR_mode_info_tdd = 1 + /* + * Enumeration is extensible + */ +} e_NeighborCell_Item_Choice_NR__nR_mode_info; +typedef enum NeighborCell_Item_Choice_NR__x2_Xn_established { + NeighborCell_Item_Choice_NR__x2_Xn_established_true = 0, + NeighborCell_Item_Choice_NR__x2_Xn_established_false = 1 + /* + * Enumeration is extensible + */ +} e_NeighborCell_Item_Choice_NR__x2_Xn_established; +typedef enum NeighborCell_Item_Choice_NR__hO_validated { + NeighborCell_Item_Choice_NR__hO_validated_true = 0, + NeighborCell_Item_Choice_NR__hO_validated_false = 1 + /* + * Enumeration is extensible + */ +} e_NeighborCell_Item_Choice_NR__hO_validated; + +/* NeighborCell-Item-Choice-NR */ +typedef struct NeighborCell_Item_Choice_NR { + NR_CGI_t nR_CGI; + NR_PCI_t nR_PCI; + FiveGS_TAC_t fiveGS_TAC; + long nR_mode_info; + NRFrequencyInfo_t nR_FreqInfo; + long x2_Xn_established; + long hO_validated; + long version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NeighborCell_Item_Choice_NR_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_nR_mode_info_5; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_x2_Xn_established_10; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_hO_validated_14; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_NeighborCell_Item_Choice_NR; +extern asn_SEQUENCE_specifics_t asn_SPC_NeighborCell_Item_Choice_NR_specs_1; +extern asn_TYPE_member_t asn_MBR_NeighborCell_Item_Choice_NR_1[8]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NeighborCell_Item_Choice_NR_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NeighborCell-Item.h b/Bouncer/e2sm_rc/headers/NeighborCell-Item.h new file mode 100644 index 0000000..f2eb861 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NeighborCell-Item.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NeighborCell_Item_H_ +#define _NeighborCell_Item_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NeighborCell_Item_PR { + NeighborCell_Item_PR_NOTHING, /* No components present */ + NeighborCell_Item_PR_ranType_Choice_NR, + NeighborCell_Item_PR_ranType_Choice_EUTRA + /* Extensions may appear below */ + +} NeighborCell_Item_PR; + +/* Forward declarations */ +struct NeighborCell_Item_Choice_NR; +struct NeighborCell_Item_Choice_E_UTRA; + +/* NeighborCell-Item */ +typedef struct NeighborCell_Item { + NeighborCell_Item_PR present; + union NeighborCell_Item_u { + struct NeighborCell_Item_Choice_NR *ranType_Choice_NR; + struct NeighborCell_Item_Choice_E_UTRA *ranType_Choice_EUTRA; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NeighborCell_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NeighborCell_Item; +extern asn_CHOICE_specifics_t asn_SPC_NeighborCell_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_NeighborCell_Item_1[2]; +extern asn_per_constraints_t asn_PER_type_NeighborCell_Item_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _NeighborCell_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NeighborCell-List.h b/Bouncer/e2sm_rc/headers/NeighborCell-List.h new file mode 100644 index 0000000..148c62a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NeighborCell-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NeighborCell_List_H_ +#define _NeighborCell_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct NeighborCell_Item; + +/* NeighborCell-List */ +typedef struct NeighborCell_List { + A_SEQUENCE_OF(struct NeighborCell_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NeighborCell_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NeighborCell_List; +extern asn_SET_OF_specifics_t asn_SPC_NeighborCell_List_specs_1; +extern asn_TYPE_member_t asn_MBR_NeighborCell_List_1[1]; +extern asn_per_constraints_t asn_PER_type_NeighborCell_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _NeighborCell_List_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NeighborRelation-Info.h b/Bouncer/e2sm_rc/headers/NeighborRelation-Info.h new file mode 100644 index 0000000..8740c59 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NeighborRelation-Info.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NeighborRelation_Info_H_ +#define _NeighborRelation_Info_H_ + + +#include + +/* Including external dependencies */ +#include "ServingCell-PCI.h" +#include "ServingCell-ARFCN.h" +#include "NeighborCell-List.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* NeighborRelation-Info */ +typedef struct NeighborRelation_Info { + ServingCell_PCI_t servingCellPCI; + ServingCell_ARFCN_t servingCellARFCN; + NeighborCell_List_t neighborCell_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NeighborRelation_Info_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NeighborRelation_Info; +extern asn_SEQUENCE_specifics_t asn_SPC_NeighborRelation_Info_specs_1; +extern asn_TYPE_member_t asn_MBR_NeighborRelation_Info_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _NeighborRelation_Info_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/NgENB-ID.h b/Bouncer/e2sm_rc/headers/NgENB-ID.h new file mode 100644 index 0000000..a4778ba --- /dev/null +++ b/Bouncer/e2sm_rc/headers/NgENB-ID.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _NgENB_ID_H_ +#define _NgENB_ID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum NgENB_ID_PR { + NgENB_ID_PR_NOTHING, /* No components present */ + NgENB_ID_PR_macroNgENB_ID, + NgENB_ID_PR_shortMacroNgENB_ID, + NgENB_ID_PR_longMacroNgENB_ID + /* Extensions may appear below */ + +} NgENB_ID_PR; + +/* NgENB-ID */ +typedef struct NgENB_ID { + NgENB_ID_PR present; + union NgENB_ID_u { + BIT_STRING_t macroNgENB_ID; + BIT_STRING_t shortMacroNgENB_ID; + BIT_STRING_t longMacroNgENB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} NgENB_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_NgENB_ID; +extern asn_CHOICE_specifics_t asn_SPC_NgENB_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_NgENB_ID_1[3]; +extern asn_per_constraints_t asn_PER_type_NgENB_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _NgENB_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/OCTET_STRING.h b/Bouncer/e2sm_rc/headers/OCTET_STRING.h new file mode 100644 index 0000000..c2f8bae --- /dev/null +++ b/Bouncer/e2sm_rc/headers/OCTET_STRING.h @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _OCTET_STRING_H_ +#define _OCTET_STRING_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct OCTET_STRING { + uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ + size_t size; /* Size of the buffer */ + + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ +} OCTET_STRING_t; + +extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; +extern asn_TYPE_operation_t asn_OP_OCTET_STRING; + +asn_struct_free_f OCTET_STRING_free; +asn_struct_print_f OCTET_STRING_print; +asn_struct_print_f OCTET_STRING_print_utf8; +asn_struct_compare_f OCTET_STRING_compare; +ber_type_decoder_f OCTET_STRING_decode_ber; +der_type_encoder_f OCTET_STRING_encode_der; +xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ +xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ +xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ +xer_type_encoder_f OCTET_STRING_encode_xer; +xer_type_encoder_f OCTET_STRING_encode_xer_utf8; +oer_type_decoder_f OCTET_STRING_decode_oer; +oer_type_encoder_f OCTET_STRING_encode_oer; +per_type_decoder_f OCTET_STRING_decode_uper; +per_type_encoder_f OCTET_STRING_encode_uper; +per_type_decoder_f OCTET_STRING_decode_aper; +per_type_encoder_f OCTET_STRING_encode_aper; +asn_random_fill_f OCTET_STRING_random_fill; + +#define OCTET_STRING_constraint asn_generic_no_constraint +#define OCTET_STRING_decode_xer OCTET_STRING_decode_xer_hex + +/****************************** + * Handy conversion routines. * + ******************************/ + +/* + * This function clears the previous value of the OCTET STRING (if any) + * and then allocates a new memory with the specified content (str/size). + * If size = -1, the size of the original string will be determined + * using strlen(str). + * If str equals to NULL, the function will silently clear the + * current contents of the OCTET STRING. + * Returns 0 if it was possible to perform operation, -1 otherwise. + */ +int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); + +/* Handy conversion from the C string into the OCTET STRING. */ +#define OCTET_STRING_fromString(s, str) OCTET_STRING_fromBuf(s, str, -1) + +/* + * Allocate and fill the new OCTET STRING and return a pointer to the newly + * allocated object. NULL is permitted in str: the function will just allocate + * empty OCTET STRING. + */ +OCTET_STRING_t *OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, + const char *str, int size); + +/**************************** + * Internally useful stuff. * + ****************************/ + +typedef struct asn_OCTET_STRING_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the structure */ + unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ + + enum asn_OS_Subvariant { + ASN_OSUBV_ANY, /* The open type (ANY) */ + ASN_OSUBV_BIT, /* BIT STRING */ + ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */ + ASN_OSUBV_U16, /* 16-bit character (BMPString) */ + ASN_OSUBV_U32 /* 32-bit character (UniversalString) */ + } subvariant; +} asn_OCTET_STRING_specifics_t; + +extern asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs; + +size_t OCTET_STRING_random_length_constrained( + const asn_TYPE_descriptor_t *, const asn_encoding_constraints_t *, + size_t max_length); + +#ifdef __cplusplus +} +#endif + +#endif /* _OCTET_STRING_H_ */ diff --git a/Bouncer/e2sm_rc/headers/OPEN_TYPE.h b/Bouncer/e2sm_rc/headers/OPEN_TYPE.h new file mode 100644 index 0000000..b0d023c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/OPEN_TYPE.h @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2017-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_OPEN_TYPE_H +#define ASN_OPEN_TYPE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define OPEN_TYPE_free CHOICE_free +#define OPEN_TYPE_print CHOICE_print +#define OPEN_TYPE_compare CHOICE_compare +#define OPEN_TYPE_constraint CHOICE_constraint +#define OPEN_TYPE_decode_ber NULL +#define OPEN_TYPE_encode_der CHOICE_encode_der +#define OPEN_TYPE_decode_xer NULL +#define OPEN_TYPE_encode_xer CHOICE_encode_xer +#define OPEN_TYPE_decode_oer NULL +#define OPEN_TYPE_encode_oer CHOICE_encode_oer +#define OPEN_TYPE_decode_uper NULL +#define OPEN_TYPE_decode_aper NULL + +extern asn_TYPE_operation_t asn_OP_OPEN_TYPE; + +/* + * Decode an Open Type which is potentially constraiend + * by the other members of the parent structure. + */ +asn_dec_rval_t OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + const void *ptr, size_t size); + +asn_dec_rval_t OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + const void *ptr, size_t size); + +asn_dec_rval_t OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + asn_TYPE_member_t *element, const void *ptr, + size_t size); + +asn_dec_rval_t OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + asn_per_data_t *pd); + +asn_dec_rval_t OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *parent_type, + void *parent_structure, + const asn_TYPE_member_t *element, + asn_per_data_t *pd); + +asn_enc_rval_t OPEN_TYPE_encode_uper( + const asn_TYPE_descriptor_t *type_descriptor, + const asn_per_constraints_t *constraints, const void *struct_ptr, + asn_per_outp_t *per_output); + +asn_enc_rval_t OPEN_TYPE_encode_aper( + const asn_TYPE_descriptor_t *type_descriptor, + const asn_per_constraints_t *constraints, const void *struct_ptr, + asn_per_outp_t *per_output); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_OPEN_TYPE_H */ diff --git a/Bouncer/e2sm_rc/headers/PLMNIdentity.h b/Bouncer/e2sm_rc/headers/PLMNIdentity.h new file mode 100644 index 0000000..85ee6c2 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/PLMNIdentity.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PLMNIdentity_H_ +#define _PLMNIdentity_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* PLMNIdentity */ +typedef OCTET_STRING_t PLMNIdentity_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_PLMNIdentity_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_PLMNIdentity; +asn_struct_free_f PLMNIdentity_free; +asn_struct_print_f PLMNIdentity_print; +asn_constr_check_f PLMNIdentity_constraint; +ber_type_decoder_f PLMNIdentity_decode_ber; +der_type_encoder_f PLMNIdentity_encode_der; +xer_type_decoder_f PLMNIdentity_decode_xer; +xer_type_encoder_f PLMNIdentity_encode_xer; +oer_type_decoder_f PLMNIdentity_decode_oer; +oer_type_encoder_f PLMNIdentity_encode_oer; +per_type_decoder_f PLMNIdentity_decode_uper; +per_type_encoder_f PLMNIdentity_encode_uper; +per_type_decoder_f PLMNIdentity_decode_aper; +per_type_encoder_f PLMNIdentity_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _PLMNIdentity_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/PolicyAction-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/PolicyAction-RANParameter-Item.h new file mode 100644 index 0000000..d633354 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/PolicyAction-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PolicyAction_RANParameter_Item_H_ +#define _PolicyAction_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* PolicyAction-RANParameter-Item */ +typedef struct PolicyAction_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PolicyAction_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PolicyAction_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_PolicyAction_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_PolicyAction_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _PolicyAction_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/PolicyCondition-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/PolicyCondition-RANParameter-Item.h new file mode 100644 index 0000000..4120d7d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/PolicyCondition-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _PolicyCondition_RANParameter_Item_H_ +#define _PolicyCondition_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* PolicyCondition-RANParameter-Item */ +typedef struct PolicyCondition_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PolicyCondition_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PolicyCondition_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_PolicyCondition_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_PolicyCondition_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _PolicyCondition_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/PrintableString.h b/Bouncer/e2sm_rc/headers/PrintableString.h new file mode 100644 index 0000000..8c2b61a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/PrintableString.h @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PrintableString_H_ +#define _PrintableString_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef OCTET_STRING_t PrintableString_t; /* Implemented via OCTET STRING */ + +extern asn_TYPE_descriptor_t asn_DEF_PrintableString; +extern asn_TYPE_operation_t asn_OP_PrintableString; + +asn_constr_check_f PrintableString_constraint; + +#define PrintableString_free OCTET_STRING_free +#define PrintableString_print OCTET_STRING_print_utf8 +#define PrintableString_compare OCTET_STRING_compare +#define PrintableString_decode_ber OCTET_STRING_decode_ber +#define PrintableString_encode_der OCTET_STRING_encode_der +#define PrintableString_decode_xer OCTET_STRING_decode_xer_utf8 +#define PrintableString_encode_xer OCTET_STRING_encode_xer_utf8 +#define PrintableString_decode_uper OCTET_STRING_decode_uper +#define PrintableString_encode_uper OCTET_STRING_encode_uper +#define PrintableString_decode_aper OCTET_STRING_decode_aper +#define PrintableString_encode_aper OCTET_STRING_encode_aper + +#ifdef __cplusplus +} +#endif + +#endif /* _PrintableString_H_ */ diff --git a/Bouncer/e2sm_rc/headers/QCI.h b/Bouncer/e2sm_rc/headers/QCI.h new file mode 100644 index 0000000..07805df --- /dev/null +++ b/Bouncer/e2sm_rc/headers/QCI.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _QCI_H_ +#define _QCI_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* QCI */ +typedef long QCI_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_QCI_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_QCI; +asn_struct_free_f QCI_free; +asn_struct_print_f QCI_print; +asn_constr_check_f QCI_constraint; +ber_type_decoder_f QCI_decode_ber; +der_type_encoder_f QCI_encode_der; +xer_type_decoder_f QCI_decode_xer; +xer_type_encoder_f QCI_encode_xer; +oer_type_decoder_f QCI_decode_oer; +oer_type_encoder_f QCI_encode_oer; +per_type_decoder_f QCI_decode_uper; +per_type_encoder_f QCI_encode_uper; +per_type_decoder_f QCI_decode_aper; +per_type_encoder_f QCI_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _QCI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/QoSID.h b/Bouncer/e2sm_rc/headers/QoSID.h new file mode 100644 index 0000000..342322c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/QoSID.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _QoSID_H_ +#define _QoSID_H_ + + +#include + +/* Including external dependencies */ +#include "FiveQI.h" +#include "QCI.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum QoSID_PR { + QoSID_PR_NOTHING, /* No components present */ + QoSID_PR_fiveGC, + QoSID_PR_ePC + /* Extensions may appear below */ + +} QoSID_PR; + +/* QoSID */ +typedef struct QoSID { + QoSID_PR present; + union QoSID_u { + FiveQI_t fiveGC; + QCI_t ePC; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} QoSID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_QoSID; + +#ifdef __cplusplus +} +#endif + +#endif /* _QoSID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/QosFlowIdentifier.h b/Bouncer/e2sm_rc/headers/QosFlowIdentifier.h new file mode 100644 index 0000000..824219c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/QosFlowIdentifier.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _QosFlowIdentifier_H_ +#define _QosFlowIdentifier_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* QosFlowIdentifier */ +typedef long QosFlowIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_QosFlowIdentifier; +asn_struct_free_f QosFlowIdentifier_free; +asn_struct_print_f QosFlowIdentifier_print; +asn_constr_check_f QosFlowIdentifier_constraint; +ber_type_decoder_f QosFlowIdentifier_decode_ber; +der_type_encoder_f QosFlowIdentifier_encode_der; +xer_type_decoder_f QosFlowIdentifier_decode_xer; +xer_type_encoder_f QosFlowIdentifier_encode_xer; +oer_type_decoder_f QosFlowIdentifier_decode_oer; +oer_type_encoder_f QosFlowIdentifier_encode_oer; +per_type_decoder_f QosFlowIdentifier_decode_uper; +per_type_encoder_f QosFlowIdentifier_encode_uper; +per_type_decoder_f QosFlowIdentifier_decode_aper; +per_type_encoder_f QosFlowIdentifier_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _QosFlowIdentifier_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RAN-CallProcess-ID.h b/Bouncer/e2sm_rc/headers/RAN-CallProcess-ID.h new file mode 100644 index 0000000..ecea6c7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RAN-CallProcess-ID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RAN_CallProcess_ID_H_ +#define _RAN_CallProcess_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RAN-CallProcess-ID */ +typedef unsigned long RAN_CallProcess_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RAN_CallProcess_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RAN_CallProcess_ID; +extern const asn_INTEGER_specifics_t asn_SPC_RAN_CallProcess_ID_specs_1; +asn_struct_free_f RAN_CallProcess_ID_free; +asn_struct_print_f RAN_CallProcess_ID_print; +asn_constr_check_f RAN_CallProcess_ID_constraint; +ber_type_decoder_f RAN_CallProcess_ID_decode_ber; +der_type_encoder_f RAN_CallProcess_ID_encode_der; +xer_type_decoder_f RAN_CallProcess_ID_decode_xer; +xer_type_encoder_f RAN_CallProcess_ID_encode_xer; +oer_type_decoder_f RAN_CallProcess_ID_decode_oer; +oer_type_encoder_f RAN_CallProcess_ID_encode_oer; +per_type_decoder_f RAN_CallProcess_ID_decode_uper; +per_type_encoder_f RAN_CallProcess_ID_encode_uper; +per_type_decoder_f RAN_CallProcess_ID_decode_aper; +per_type_encoder_f RAN_CallProcess_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RAN_CallProcess_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Action-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Action-Item.h new file mode 100644 index 0000000..38fe9a3 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Action-Item.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Control_Action_Item_H_ +#define _RANFunctionDefinition_Control_Action_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-ControlAction-ID.h" +#include "RIC-ControlAction-Name.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct ControlAction_RANParameter_Item; + +/* RANFunctionDefinition-Control-Action-Item */ +typedef struct RANFunctionDefinition_Control_Action_Item { + RIC_ControlAction_ID_t ric_ControlAction_ID; + RIC_ControlAction_Name_t ric_ControlAction_Name; + struct RANFunctionDefinition_Control_Action_Item__ran_ControlActionParameters_List { + A_SEQUENCE_OF(struct ControlAction_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_ControlActionParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Control_Action_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Control_Action_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Control_Action_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Control_Action_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Control_Action_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Item.h new file mode 100644 index 0000000..3b6a251 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control-Item.h @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Control_Item_H_ +#define _RANFunctionDefinition_Control_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_Control_Action_Item; +struct ControlOutcome_RANParameter_Item; + +/* RANFunctionDefinition-Control-Item */ +typedef struct RANFunctionDefinition_Control_Item { + RIC_Style_Type_t ric_ControlStyle_Type; + RIC_Style_Name_t ric_ControlStyle_Name; + struct RANFunctionDefinition_Control_Item__ric_ControlAction_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_Control_Action_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ric_ControlAction_List; + RIC_Format_Type_t ric_ControlHeaderFormat_Type; + RIC_Format_Type_t ric_ControlMessageFormat_Type; + RIC_Format_Type_t *ric_CallProcessIDFormat_Type; /* OPTIONAL */ + RIC_Format_Type_t ric_ControlOutcomeFormat_Type; + struct RANFunctionDefinition_Control_Item__ran_ControlOutcomeParameters_List { + A_SEQUENCE_OF(struct ControlOutcome_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_ControlOutcomeParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Control_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Control_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Control_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Control_Item_1[8]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Control_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control.h new file mode 100644 index 0000000..84e65df --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Control.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Control_H_ +#define _RANFunctionDefinition_Control_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_Control_Item; + +/* RANFunctionDefinition-Control */ +typedef struct RANFunctionDefinition_Control { + struct RANFunctionDefinition_Control__ric_ControlStyle_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_Control_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_ControlStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Control_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Control; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Control_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Control_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Control_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Breakpoint-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Breakpoint-Item.h new file mode 100644 index 0000000..e230f2b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Breakpoint-Item.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_EventTrigger_Breakpoint_Item_H_ +#define _RANFunctionDefinition_EventTrigger_Breakpoint_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-CallProcessBreakpoint-ID.h" +#include "RIC-CallProcessBreakpoint-Name.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct CallProcessBreakpoint_RANParameter_Item; + +/* RANFunctionDefinition-EventTrigger-Breakpoint-Item */ +typedef struct RANFunctionDefinition_EventTrigger_Breakpoint_Item { + RIC_CallProcessBreakpoint_ID_t callProcessBreakpoint_ID; + RIC_CallProcessBreakpoint_Name_t callProcessBreakpoint_Name; + struct RANFunctionDefinition_EventTrigger_Breakpoint_Item__ran_CallProcessBreakpointParameters_List { + A_SEQUENCE_OF(struct CallProcessBreakpoint_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_CallProcessBreakpointParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_EventTrigger_Breakpoint_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_Breakpoint_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_Breakpoint_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_EventTrigger_Breakpoint_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-CallProcess-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-CallProcess-Item.h new file mode 100644 index 0000000..a38820f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-CallProcess-Item.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_EventTrigger_CallProcess_Item_H_ +#define _RANFunctionDefinition_EventTrigger_CallProcess_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-CallProcessType-ID.h" +#include "RIC-CallProcessType-Name.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_EventTrigger_Breakpoint_Item; + +/* RANFunctionDefinition-EventTrigger-CallProcess-Item */ +typedef struct RANFunctionDefinition_EventTrigger_CallProcess_Item { + RIC_CallProcessType_ID_t callProcessType_ID; + RIC_CallProcessType_Name_t callProcessType_Name; + struct RANFunctionDefinition_EventTrigger_CallProcess_Item__callProcessBreakpoints_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } callProcessBreakpoints_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_EventTrigger_CallProcess_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_CallProcess_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_CallProcess_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_EventTrigger_CallProcess_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Style-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Style-Item.h new file mode 100644 index 0000000..3a5cdba --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger-Style-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_EventTrigger_Style_Item_H_ +#define _RANFunctionDefinition_EventTrigger_Style_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANFunctionDefinition-EventTrigger-Style-Item */ +typedef struct RANFunctionDefinition_EventTrigger_Style_Item { + RIC_Style_Type_t ric_EventTriggerStyle_Type; + RIC_Style_Name_t ric_EventTriggerStyle_Name; + RIC_Format_Type_t ric_EventTriggerFormat_Type; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_EventTrigger_Style_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_Style_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_Style_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_EventTrigger_Style_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger.h new file mode 100644 index 0000000..70f00f7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-EventTrigger.h @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_EventTrigger_H_ +#define _RANFunctionDefinition_EventTrigger_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_EventTrigger_Style_Item; +struct L2Parameters_RANParameter_Item; +struct RANFunctionDefinition_EventTrigger_CallProcess_Item; +struct UEIdentification_RANParameter_Item; +struct CellIdentification_RANParameter_Item; + +/* RANFunctionDefinition-EventTrigger */ +typedef struct RANFunctionDefinition_EventTrigger { + struct RANFunctionDefinition_EventTrigger__ric_EventTriggerStyle_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_EventTrigger_Style_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_EventTriggerStyle_List; + struct RANFunctionDefinition_EventTrigger__ran_L2Parameters_List { + A_SEQUENCE_OF(struct L2Parameters_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_L2Parameters_List; + struct RANFunctionDefinition_EventTrigger__ran_CallProcessTypes_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_EventTrigger_CallProcess_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_CallProcessTypes_List; + struct RANFunctionDefinition_EventTrigger__ran_UEIdentificationParameters_List { + A_SEQUENCE_OF(struct UEIdentification_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_UEIdentificationParameters_List; + struct RANFunctionDefinition_EventTrigger__ran_CellIdentificationParameters_List { + A_SEQUENCE_OF(struct CellIdentification_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_CellIdentificationParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_EventTrigger_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_EventTrigger_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Indication-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Indication-Item.h new file mode 100644 index 0000000..ae2542f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Indication-Item.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Insert_Indication_Item_H_ +#define _RANFunctionDefinition_Insert_Indication_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-InsertIndication-ID.h" +#include "RIC-InsertIndication-Name.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct InsertIndication_RANParameter_Item; + +/* RANFunctionDefinition-Insert-Indication-Item */ +typedef struct RANFunctionDefinition_Insert_Indication_Item { + RIC_InsertIndication_ID_t ric_InsertIndication_ID; + RIC_InsertIndication_Name_t ric_InsertIndication_Name; + struct RANFunctionDefinition_Insert_Indication_Item__ran_InsertIndicationParameters_List { + A_SEQUENCE_OF(struct InsertIndication_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_InsertIndicationParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Insert_Indication_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Insert_Indication_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Insert_Indication_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Insert_Indication_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Insert_Indication_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Item.h new file mode 100644 index 0000000..c16b201 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert-Item.h @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Insert_Item_H_ +#define _RANFunctionDefinition_Insert_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_Insert_Indication_Item; + +/* RANFunctionDefinition-Insert-Item */ +typedef struct RANFunctionDefinition_Insert_Item { + RIC_Style_Type_t ric_InsertStyle_Type; + RIC_Style_Name_t ric_InsertStyle_Name; + RIC_Style_Type_t ric_SupportedEventTriggerStyle_Type; + RIC_Format_Type_t ric_ActionDefinitionFormat_Type; + struct RANFunctionDefinition_Insert_Item__ric_InsertIndication_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_Insert_Indication_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ric_InsertIndication_List; + RIC_Format_Type_t ric_IndicationHeaderFormat_Type; + RIC_Format_Type_t ric_IndicationMessageFormat_Type; + RIC_Format_Type_t ric_CallProcessIDFormat_Type; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Insert_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Insert_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Insert_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Insert_Item_1[8]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Insert_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert.h new file mode 100644 index 0000000..e5216b9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Insert.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Insert_H_ +#define _RANFunctionDefinition_Insert_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_Insert_Item; + +/* RANFunctionDefinition-Insert */ +typedef struct RANFunctionDefinition_Insert { + struct RANFunctionDefinition_Insert__ric_InsertStyle_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_Insert_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_InsertStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Insert_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Insert; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Insert_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Insert_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Insert_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Action-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Action-Item.h new file mode 100644 index 0000000..3d0f2c8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Action-Item.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Policy_Action_Item_H_ +#define _RANFunctionDefinition_Policy_Action_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-ControlAction-ID.h" +#include "RIC-ControlAction-Name.h" +#include "RIC-Format-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct PolicyAction_RANParameter_Item; +struct PolicyCondition_RANParameter_Item; + +/* RANFunctionDefinition-Policy-Action-Item */ +typedef struct RANFunctionDefinition_Policy_Action_Item { + RIC_ControlAction_ID_t ric_PolicyAction_ID; + RIC_ControlAction_Name_t ric_PolicyAction_Name; + RIC_Format_Type_t ric_ActionDefinitionFormat_Type; + struct RANFunctionDefinition_Policy_Action_Item__ran_PolicyActionParameters_List { + A_SEQUENCE_OF(struct PolicyAction_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_PolicyActionParameters_List; + struct RANFunctionDefinition_Policy_Action_Item__ran_PolicyConditionParameters_List { + A_SEQUENCE_OF(struct PolicyCondition_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_PolicyConditionParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Policy_Action_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Policy_Action_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Policy_Action_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Policy_Action_Item_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Policy_Action_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Item.h new file mode 100644 index 0000000..4286c88 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy-Item.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Policy_Item_H_ +#define _RANFunctionDefinition_Policy_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_Policy_Action_Item; + +/* RANFunctionDefinition-Policy-Item */ +typedef struct RANFunctionDefinition_Policy_Item { + RIC_Style_Type_t ric_PolicyStyle_Type; + RIC_Style_Name_t ric_PolicyStyle_Name; + RIC_Style_Type_t ric_SupportedEventTriggerStyle_Type; + struct RANFunctionDefinition_Policy_Item__ric_PolicyAction_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_Policy_Action_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ric_PolicyAction_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Policy_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Policy_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Policy_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Policy_Item_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Policy_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy.h new file mode 100644 index 0000000..962a98d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Policy.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Policy_H_ +#define _RANFunctionDefinition_Policy_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_Policy_Item; + +/* RANFunctionDefinition-Policy */ +typedef struct RANFunctionDefinition_Policy { + struct RANFunctionDefinition_Policy__ric_PolicyStyle_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_Policy_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_PolicyStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Policy_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Policy; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Policy_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Policy_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Policy_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report-Item.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report-Item.h new file mode 100644 index 0000000..ac716d6 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report-Item.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Report_Item_H_ +#define _RANFunctionDefinition_Report_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-Style-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Format-Type.h" +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Report_RANParameter_Item; + +/* RANFunctionDefinition-Report-Item */ +typedef struct RANFunctionDefinition_Report_Item { + RIC_Style_Type_t ric_ReportStyle_Type; + RIC_Style_Name_t ric_ReportStyle_Name; + RIC_Style_Type_t ric_SupportedEventTriggerStyle_Type; + RIC_Format_Type_t ric_ReportActionFormat_Type; + RIC_Format_Type_t ric_IndicationHeaderFormat_Type; + RIC_Format_Type_t ric_IndicationMessageFormat_Type; + struct RANFunctionDefinition_Report_Item__ran_ReportParameters_List { + A_SEQUENCE_OF(struct Report_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ran_ReportParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Report_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Report_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Report_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Report_Item_1[7]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Report_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report.h b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report.h new file mode 100644 index 0000000..8535468 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANFunctionDefinition-Report.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANFunctionDefinition_Report_H_ +#define _RANFunctionDefinition_Report_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANFunctionDefinition_Report_Item; + +/* RANFunctionDefinition-Report */ +typedef struct RANFunctionDefinition_Report { + struct RANFunctionDefinition_Report__ric_ReportStyle_List { + A_SEQUENCE_OF(struct RANFunctionDefinition_Report_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ric_ReportStyle_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANFunctionDefinition_Report_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Report; +extern asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Report_specs_1; +extern asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Report_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANFunctionDefinition_Report_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST-Item.h b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST-Item.h new file mode 100644 index 0000000..3afeca9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Definition_Choice_LIST_Item_H_ +#define _RANParameter_Definition_Choice_LIST_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* RANParameter-Definition-Choice-LIST-Item */ +typedef struct RANParameter_Definition_Choice_LIST_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Definition_Choice_LIST_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_LIST_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_LIST_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_LIST_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Definition_Choice_LIST_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST.h b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST.h new file mode 100644 index 0000000..5ccaa43 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-LIST.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Definition_Choice_LIST_H_ +#define _RANParameter_Definition_Choice_LIST_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition_Choice_LIST_Item; + +/* RANParameter-Definition-Choice-LIST */ +typedef struct RANParameter_Definition_Choice_LIST { + struct RANParameter_Definition_Choice_LIST__ranParameter_List { + A_SEQUENCE_OF(struct RANParameter_Definition_Choice_LIST_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranParameter_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Definition_Choice_LIST_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_LIST; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_LIST_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_LIST_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Definition_Choice_LIST_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE-Item.h b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE-Item.h new file mode 100644 index 0000000..f0fea4a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Definition_Choice_STRUCTURE_Item_H_ +#define _RANParameter_Definition_Choice_STRUCTURE_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* RANParameter-Definition-Choice-STRUCTURE-Item */ +typedef struct RANParameter_Definition_Choice_STRUCTURE_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Definition_Choice_STRUCTURE_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_STRUCTURE_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_STRUCTURE_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Definition_Choice_STRUCTURE_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE.h b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE.h new file mode 100644 index 0000000..aa0b336 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice-STRUCTURE.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Definition_Choice_STRUCTURE_H_ +#define _RANParameter_Definition_Choice_STRUCTURE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition_Choice_STRUCTURE_Item; + +/* RANParameter-Definition-Choice-STRUCTURE */ +typedef struct RANParameter_Definition_Choice_STRUCTURE { + struct RANParameter_Definition_Choice_STRUCTURE__ranParameter_STRUCTURE { + A_SEQUENCE_OF(struct RANParameter_Definition_Choice_STRUCTURE_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranParameter_STRUCTURE; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Definition_Choice_STRUCTURE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_STRUCTURE; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_STRUCTURE_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_STRUCTURE_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Definition_Choice_STRUCTURE_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice.h b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice.h new file mode 100644 index 0000000..a140a8c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Definition-Choice.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Definition_Choice_H_ +#define _RANParameter_Definition_Choice_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RANParameter_Definition_Choice_PR { + RANParameter_Definition_Choice_PR_NOTHING, /* No components present */ + RANParameter_Definition_Choice_PR_choiceLIST, + RANParameter_Definition_Choice_PR_choiceSTRUCTURE + /* Extensions may appear below */ + +} RANParameter_Definition_Choice_PR; + +/* Forward declarations */ +struct RANParameter_Definition_Choice_LIST; +struct RANParameter_Definition_Choice_STRUCTURE; + +/* RANParameter-Definition-Choice */ +typedef struct RANParameter_Definition_Choice { + RANParameter_Definition_Choice_PR present; + union RANParameter_Definition_Choice_u { + struct RANParameter_Definition_Choice_LIST *choiceLIST; + struct RANParameter_Definition_Choice_STRUCTURE *choiceSTRUCTURE; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Definition_Choice_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice; +extern asn_CHOICE_specifics_t asn_SPC_RANParameter_Definition_Choice_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_1[2]; +extern asn_per_constraints_t asn_PER_type_RANParameter_Definition_Choice_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Definition_Choice_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Definition.h b/Bouncer/e2sm_rc/headers/RANParameter-Definition.h new file mode 100644 index 0000000..d575f31 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Definition.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Definition_H_ +#define _RANParameter_Definition_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition_Choice; + +/* RANParameter-Definition */ +typedef struct RANParameter_Definition { + struct RANParameter_Definition_Choice *ranParameter_Definition_Choice; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Definition_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Definition_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Definition_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-ID.h b/Bouncer/e2sm_rc/headers/RANParameter-ID.h new file mode 100644 index 0000000..670a579 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-ID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_ID_H_ +#define _RANParameter_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANParameter-ID */ +typedef unsigned long RANParameter_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RANParameter_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_ID; +extern const asn_INTEGER_specifics_t asn_SPC_RANParameter_ID_specs_1; +asn_struct_free_f RANParameter_ID_free; +asn_struct_print_f RANParameter_ID_print; +asn_constr_check_f RANParameter_ID_constraint; +ber_type_decoder_f RANParameter_ID_decode_ber; +der_type_encoder_f RANParameter_ID_encode_der; +xer_type_decoder_f RANParameter_ID_decode_xer; +xer_type_encoder_f RANParameter_ID_encode_xer; +oer_type_decoder_f RANParameter_ID_decode_oer; +oer_type_encoder_f RANParameter_ID_encode_oer; +per_type_decoder_f RANParameter_ID_decode_uper; +per_type_encoder_f RANParameter_ID_encode_uper; +per_type_decoder_f RANParameter_ID_decode_aper; +per_type_encoder_f RANParameter_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-LIST.h b/Bouncer/e2sm_rc/headers/RANParameter-LIST.h new file mode 100644 index 0000000..1a0a4c4 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-LIST.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_LIST_H_ +#define _RANParameter_LIST_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_STRUCTURE; + +/* RANParameter-LIST */ +typedef struct RANParameter_LIST { + struct RANParameter_LIST__list_of_ranParameter { + A_SEQUENCE_OF(struct RANParameter_STRUCTURE) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } list_of_ranParameter; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_LIST_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_LIST; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_LIST_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_LIST_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_LIST_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Name.h b/Bouncer/e2sm_rc/headers/RANParameter-Name.h new file mode 100644 index 0000000..44d89e3 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Name_H_ +#define _RANParameter_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANParameter-Name */ +typedef PrintableString_t RANParameter_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RANParameter_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Name; +asn_struct_free_f RANParameter_Name_free; +asn_struct_print_f RANParameter_Name_print; +asn_constr_check_f RANParameter_Name_constraint; +ber_type_decoder_f RANParameter_Name_decode_ber; +der_type_encoder_f RANParameter_Name_encode_der; +xer_type_decoder_f RANParameter_Name_decode_xer; +xer_type_encoder_f RANParameter_Name_encode_xer; +oer_type_decoder_f RANParameter_Name_decode_oer; +oer_type_encoder_f RANParameter_Name_encode_oer; +per_type_decoder_f RANParameter_Name_decode_uper; +per_type_encoder_f RANParameter_Name_encode_uper; +per_type_decoder_f RANParameter_Name_decode_aper; +per_type_encoder_f RANParameter_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Name_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE-Item.h b/Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE-Item.h new file mode 100644 index 0000000..ece61f1 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE-Item.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_STRUCTURE_Item_H_ +#define _RANParameter_STRUCTURE_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_ValueType; + +/* RANParameter-STRUCTURE-Item */ +typedef struct RANParameter_STRUCTURE_Item { + RANParameter_ID_t ranParameter_ID; + struct RANParameter_ValueType *ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_STRUCTURE_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_STRUCTURE_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_STRUCTURE_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_STRUCTURE_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_STRUCTURE_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE.h b/Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE.h new file mode 100644 index 0000000..d7eaab3 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-STRUCTURE.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_STRUCTURE_H_ +#define _RANParameter_STRUCTURE_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_STRUCTURE_Item; + +/* RANParameter-STRUCTURE */ +typedef struct RANParameter_STRUCTURE { + struct RANParameter_STRUCTURE__sequence_of_ranParameters { + A_SEQUENCE_OF(struct RANParameter_STRUCTURE_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *sequence_of_ranParameters; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_STRUCTURE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_STRUCTURE; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_STRUCTURE_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_STRUCTURE_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_STRUCTURE_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementFalse.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementFalse.h new file mode 100644 index 0000000..5b940f7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementFalse.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_Item_Choice_ElementFalse_H_ +#define _RANParameter_Testing_Item_Choice_ElementFalse_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-TestingCondition.h" +#include "LogicalOR.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Value; + +/* RANParameter-Testing-Item-Choice-ElementFalse */ +typedef struct RANParameter_Testing_Item_Choice_ElementFalse { + RANParameter_TestingCondition_t ranParameter_TestCondition; + struct RANParameter_Value *ranParameter_Value; /* OPTIONAL */ + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_Item_Choice_ElementFalse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_ElementFalse_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_ElementFalse_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_Item_Choice_ElementFalse_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementTrue.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementTrue.h new file mode 100644 index 0000000..eb94431 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-ElementTrue.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_Item_Choice_ElementTrue_H_ +#define _RANParameter_Testing_Item_Choice_ElementTrue_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-Value.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANParameter-Testing-Item-Choice-ElementTrue */ +typedef struct RANParameter_Testing_Item_Choice_ElementTrue { + RANParameter_Value_t ranParameter_value; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_Item_Choice_ElementTrue_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_ElementTrue_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_ElementTrue_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_Item_Choice_ElementTrue_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-List.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-List.h new file mode 100644 index 0000000..857d9f0 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-List.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_Item_Choice_List_H_ +#define _RANParameter_Testing_Item_Choice_List_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing_LIST; + +/* RANParameter-Testing-Item-Choice-List */ +typedef struct RANParameter_Testing_Item_Choice_List { + struct RANParameter_Testing_LIST *ranParameter_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_Item_Choice_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_List; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_List_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_Item_Choice_List_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-Structure.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-Structure.h new file mode 100644 index 0000000..d03e650 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item-Choice-Structure.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_Item_Choice_Structure_H_ +#define _RANParameter_Testing_Item_Choice_Structure_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing_STRUCTURE; + +/* RANParameter-Testing-Item-Choice-Structure */ +typedef struct RANParameter_Testing_Item_Choice_Structure { + struct RANParameter_Testing_STRUCTURE *ranParameter_Structure; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_Item_Choice_Structure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_Structure; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_Structure_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_Structure_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_Item_Choice_Structure_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item.h new file mode 100644 index 0000000..1a44511 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing-Item.h @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_Item_H_ +#define _RANParameter_Testing_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RANParameter_Testing_Item__ranParameter_Type_PR { + RANParameter_Testing_Item__ranParameter_Type_PR_NOTHING, /* No components present */ + RANParameter_Testing_Item__ranParameter_Type_PR_ranP_Choice_List, + RANParameter_Testing_Item__ranParameter_Type_PR_ranP_Choice_Structure, + RANParameter_Testing_Item__ranParameter_Type_PR_ranP_Choice_ElementTrue, + RANParameter_Testing_Item__ranParameter_Type_PR_ranP_Choice_ElementFalse + /* Extensions may appear below */ + +} RANParameter_Testing_Item__ranParameter_Type_PR; + +/* Forward declarations */ +struct RANParameter_Testing_Item_Choice_List; +struct RANParameter_Testing_Item_Choice_Structure; +struct RANParameter_Testing_Item_Choice_ElementTrue; +struct RANParameter_Testing_Item_Choice_ElementFalse; + +/* RANParameter-Testing-Item */ +typedef struct RANParameter_Testing_Item { + RANParameter_ID_t ranParameter_ID; + struct RANParameter_Testing_Item__ranParameter_Type { + RANParameter_Testing_Item__ranParameter_Type_PR present; + union RANParameter_Testing_Item__ranParameter_Type_u { + struct RANParameter_Testing_Item_Choice_List *ranP_Choice_List; + struct RANParameter_Testing_Item_Choice_Structure *ranP_Choice_Structure; + struct RANParameter_Testing_Item_Choice_ElementTrue *ranP_Choice_ElementTrue; + struct RANParameter_Testing_Item_Choice_ElementFalse *ranP_Choice_ElementFalse; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ranParameter_Type; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing-LIST.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing-LIST.h new file mode 100644 index 0000000..ca1aa83 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing-LIST.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_LIST_H_ +#define _RANParameter_Testing_LIST_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing_Item; + +/* RANParameter-Testing-LIST */ +typedef struct RANParameter_Testing_LIST { + A_SEQUENCE_OF(struct RANParameter_Testing_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_LIST_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_LIST; +extern asn_SET_OF_specifics_t asn_SPC_RANParameter_Testing_LIST_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_LIST_1[1]; +extern asn_per_constraints_t asn_PER_type_RANParameter_Testing_LIST_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_LIST_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing-STRUCTURE.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing-STRUCTURE.h new file mode 100644 index 0000000..a34b34b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing-STRUCTURE.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_STRUCTURE_H_ +#define _RANParameter_Testing_STRUCTURE_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing_Item; + +/* RANParameter-Testing-STRUCTURE */ +typedef struct RANParameter_Testing_STRUCTURE { + A_SEQUENCE_OF(struct RANParameter_Testing_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_STRUCTURE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_STRUCTURE; +extern asn_SET_OF_specifics_t asn_SPC_RANParameter_Testing_STRUCTURE_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_STRUCTURE_1[1]; +extern asn_per_constraints_t asn_PER_type_RANParameter_Testing_STRUCTURE_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_STRUCTURE_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Testing.h b/Bouncer/e2sm_rc/headers/RANParameter-Testing.h new file mode 100644 index 0000000..b7a4bbf --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Testing.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Testing_H_ +#define _RANParameter_Testing_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Testing_Item; + +/* RANParameter-Testing */ +typedef struct RANParameter_Testing { + A_SEQUENCE_OF(struct RANParameter_Testing_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Testing_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing; +extern asn_SET_OF_specifics_t asn_SPC_RANParameter_Testing_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Testing_1[1]; +extern asn_per_constraints_t asn_PER_type_RANParameter_Testing_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Testing_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-TestingCondition.h b/Bouncer/e2sm_rc/headers/RANParameter-TestingCondition.h new file mode 100644 index 0000000..bd059f1 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-TestingCondition.h @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_TestingCondition_H_ +#define _RANParameter_TestingCondition_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RANParameter_TestingCondition_PR { + RANParameter_TestingCondition_PR_NOTHING, /* No components present */ + RANParameter_TestingCondition_PR_ranP_Choice_comparison, + RANParameter_TestingCondition_PR_ranP_Choice_presence + /* Extensions may appear below */ + +} RANParameter_TestingCondition_PR; +typedef enum RANParameter_TestingCondition__ranP_Choice_comparison { + RANParameter_TestingCondition__ranP_Choice_comparison_equal = 0, + RANParameter_TestingCondition__ranP_Choice_comparison_difference = 1, + RANParameter_TestingCondition__ranP_Choice_comparison_greaterthan = 2, + RANParameter_TestingCondition__ranP_Choice_comparison_lessthan = 3, + RANParameter_TestingCondition__ranP_Choice_comparison_contains = 4, + RANParameter_TestingCondition__ranP_Choice_comparison_starts_with = 5 + /* + * Enumeration is extensible + */ +} e_RANParameter_TestingCondition__ranP_Choice_comparison; +typedef enum RANParameter_TestingCondition__ranP_Choice_presence { + RANParameter_TestingCondition__ranP_Choice_presence_present = 0, + RANParameter_TestingCondition__ranP_Choice_presence_configured = 1, + RANParameter_TestingCondition__ranP_Choice_presence_rollover = 2, + RANParameter_TestingCondition__ranP_Choice_presence_non_zero = 3 + /* + * Enumeration is extensible + */ +} e_RANParameter_TestingCondition__ranP_Choice_presence; + +/* RANParameter-TestingCondition */ +typedef struct RANParameter_TestingCondition { + RANParameter_TestingCondition_PR present; + union RANParameter_TestingCondition_u { + long ranP_Choice_comparison; + long ranP_Choice_presence; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_TestingCondition_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_ranP_Choice_comparison_2; // (Use -fall-defs-global to expose) */ +/* extern asn_TYPE_descriptor_t asn_DEF_ranP_Choice_presence_10; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_TestingCondition; +extern asn_CHOICE_specifics_t asn_SPC_RANParameter_TestingCondition_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_TestingCondition_1[2]; +extern asn_per_constraints_t asn_PER_type_RANParameter_TestingCondition_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_TestingCondition_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-Value.h b/Bouncer/e2sm_rc/headers/RANParameter-Value.h new file mode 100644 index 0000000..f5510b9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-Value.h @@ -0,0 +1,71 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_Value_H_ +#define _RANParameter_Value_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RANParameter_Value_PR { + RANParameter_Value_PR_NOTHING, /* No components present */ + RANParameter_Value_PR_valueBoolean, + RANParameter_Value_PR_valueInt, + RANParameter_Value_PR_valueReal, + RANParameter_Value_PR_valueBitS, + RANParameter_Value_PR_valueOctS, + RANParameter_Value_PR_valuePrintableString + /* Extensions may appear below */ + +} RANParameter_Value_PR; + +/* RANParameter-Value */ +typedef struct RANParameter_Value { + RANParameter_Value_PR present; + union RANParameter_Value_u { + BOOLEAN_t valueBoolean; + long valueInt; + double valueReal; + BIT_STRING_t valueBitS; + OCTET_STRING_t valueOctS; + PrintableString_t valuePrintableString; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_Value_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_Value; +extern asn_CHOICE_specifics_t asn_SPC_RANParameter_Value_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_Value_1[6]; +extern asn_per_constraints_t asn_PER_type_RANParameter_Value_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_Value_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementFalse.h b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementFalse.h new file mode 100644 index 0000000..a6dad9d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementFalse.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_ValueType_Choice_ElementFalse_H_ +#define _RANParameter_ValueType_Choice_ElementFalse_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Value; + +/* RANParameter-ValueType-Choice-ElementFalse */ +typedef struct RANParameter_ValueType_Choice_ElementFalse { + struct RANParameter_Value *ranParameter_value; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_ValueType_Choice_ElementFalse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_ElementFalse; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_ElementFalse_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_ElementFalse_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_ValueType_Choice_ElementFalse_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementTrue.h b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementTrue.h new file mode 100644 index 0000000..2475273 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-ElementTrue.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_ValueType_Choice_ElementTrue_H_ +#define _RANParameter_ValueType_Choice_ElementTrue_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-Value.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANParameter-ValueType-Choice-ElementTrue */ +typedef struct RANParameter_ValueType_Choice_ElementTrue { + RANParameter_Value_t ranParameter_value; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_ValueType_Choice_ElementTrue_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_ElementTrue; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_ElementTrue_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_ElementTrue_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_ValueType_Choice_ElementTrue_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-List.h b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-List.h new file mode 100644 index 0000000..fcd6d8c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-List.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_ValueType_Choice_List_H_ +#define _RANParameter_ValueType_Choice_List_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_LIST; + +/* RANParameter-ValueType-Choice-List */ +typedef struct RANParameter_ValueType_Choice_List { + struct RANParameter_LIST *ranParameter_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_ValueType_Choice_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_List; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_List_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_List_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_ValueType_Choice_List_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-Structure.h b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-Structure.h new file mode 100644 index 0000000..a8f1d04 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-ValueType-Choice-Structure.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_ValueType_Choice_Structure_H_ +#define _RANParameter_ValueType_Choice_Structure_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_STRUCTURE; + +/* RANParameter-ValueType-Choice-Structure */ +typedef struct RANParameter_ValueType_Choice_Structure { + struct RANParameter_STRUCTURE *ranParameter_Structure; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_ValueType_Choice_Structure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_Structure; +extern asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_Structure_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_Structure_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_ValueType_Choice_Structure_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANParameter-ValueType.h b/Bouncer/e2sm_rc/headers/RANParameter-ValueType.h new file mode 100644 index 0000000..9fea3d5 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANParameter-ValueType.h @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANParameter_ValueType_H_ +#define _RANParameter_ValueType_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RANParameter_ValueType_PR { + RANParameter_ValueType_PR_NOTHING, /* No components present */ + RANParameter_ValueType_PR_ranP_Choice_ElementTrue, + RANParameter_ValueType_PR_ranP_Choice_ElementFalse, + RANParameter_ValueType_PR_ranP_Choice_Structure, + RANParameter_ValueType_PR_ranP_Choice_List + /* Extensions may appear below */ + +} RANParameter_ValueType_PR; + +/* Forward declarations */ +struct RANParameter_ValueType_Choice_ElementTrue; +struct RANParameter_ValueType_Choice_ElementFalse; +struct RANParameter_ValueType_Choice_Structure; +struct RANParameter_ValueType_Choice_List; + +/* RANParameter-ValueType */ +typedef struct RANParameter_ValueType { + RANParameter_ValueType_PR present; + union RANParameter_ValueType_u { + struct RANParameter_ValueType_Choice_ElementTrue *ranP_Choice_ElementTrue; + struct RANParameter_ValueType_Choice_ElementFalse *ranP_Choice_ElementFalse; + struct RANParameter_ValueType_Choice_Structure *ranP_Choice_Structure; + struct RANParameter_ValueType_Choice_List *ranP_Choice_List; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANParameter_ValueType_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType; +extern asn_CHOICE_specifics_t asn_SPC_RANParameter_ValueType_specs_1; +extern asn_TYPE_member_t asn_MBR_RANParameter_ValueType_1[4]; +extern asn_per_constraints_t asn_PER_type_RANParameter_ValueType_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANParameter_ValueType_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANUEID.h b/Bouncer/e2sm_rc/headers/RANUEID.h new file mode 100644 index 0000000..3cee4f8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANUEID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANUEID_H_ +#define _RANUEID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANUEID */ +typedef OCTET_STRING_t RANUEID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RANUEID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RANUEID; +asn_struct_free_f RANUEID_free; +asn_struct_print_f RANUEID_print; +asn_constr_check_f RANUEID_constraint; +ber_type_decoder_f RANUEID_decode_ber; +der_type_encoder_f RANUEID_encode_der; +xer_type_decoder_f RANUEID_decode_xer; +xer_type_encoder_f RANUEID_encode_xer; +oer_type_decoder_f RANUEID_decode_oer; +oer_type_encoder_f RANUEID_encode_oer; +per_type_decoder_f RANUEID_decode_uper; +per_type_encoder_f RANUEID_encode_uper; +per_type_decoder_f RANUEID_decode_aper; +per_type_encoder_f RANUEID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANUEID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RANfunction-Name.h b/Bouncer/e2sm_rc/headers/RANfunction-Name.h new file mode 100644 index 0000000..deb65f9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RANfunction-Name.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RANfunction_Name_H_ +#define _RANfunction_Name_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunction-Name */ +typedef struct RANfunction_Name { + PrintableString_t ranFunction_ShortName; + PrintableString_t ranFunction_E2SM_OID; + PrintableString_t ranFunction_Description; + long *ranFunction_Instance; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANfunction_Name_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANfunction_Name; +extern asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Name_specs_1; +extern asn_TYPE_member_t asn_MBR_RANfunction_Name_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunction_Name_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/REAL.h b/Bouncer/e2sm_rc/headers/REAL.h new file mode 100644 index 0000000..fce6714 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/REAL.h @@ -0,0 +1,67 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_TYPE_REAL_H +#define ASN_TYPE_REAL_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ASN__PRIMITIVE_TYPE_t REAL_t; + +extern asn_TYPE_descriptor_t asn_DEF_REAL; +extern asn_TYPE_operation_t asn_OP_REAL; + +asn_struct_print_f REAL_print; +asn_struct_compare_f REAL_compare; +oer_type_decoder_f REAL_decode_oer; +oer_type_encoder_f REAL_encode_oer; +per_type_decoder_f REAL_decode_uper; +per_type_encoder_f REAL_encode_uper; +per_type_decoder_f REAL_decode_aper; +per_type_encoder_f REAL_encode_aper; +xer_type_decoder_f REAL_decode_xer; +xer_type_encoder_f REAL_encode_xer; +asn_random_fill_f REAL_random_fill; + +#define REAL_free ASN__PRIMITIVE_TYPE_free, +#define REAL_constraint asn_generic_no_constraint +#define REAL_decode_ber ber_decode_primitive +#define REAL_encode_der der_encode_primitive + +/*********************************** + * Some handy conversion routines. * + ***********************************/ + +ssize_t REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key); + +/* + * Convert between native double type and REAL representation (DER). + * RETURN VALUES: + * 0: Value converted successfully + * -1: An error occured while converting the value: invalid format. + */ +int asn_REAL2double(const REAL_t *real_ptr, double *d); +int asn_double2REAL(REAL_t *real_ptr, double d); + +/* + * Downcast double to float while checking that no overflow occurs. + * This allows stricter control of the input data. + * RETURN VALUES: + * 0: The conversion was successful (perhaps with a loss of precision) + * -1: The conversion created overflow into infinities. + * The (outcome) is ALWAYS set to a value you'd expect from the + * standard silent float to double conversion behavior. + */ +int asn_double2float(double d, float *outcome); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_TYPE_REAL_H */ diff --git a/Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-ID.h b/Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-ID.h new file mode 100644 index 0000000..0a2b6af --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_CallProcessBreakpoint_ID_H_ +#define _RIC_CallProcessBreakpoint_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-CallProcessBreakpoint-ID */ +typedef long RIC_CallProcessBreakpoint_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_CallProcessBreakpoint_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessBreakpoint_ID; +asn_struct_free_f RIC_CallProcessBreakpoint_ID_free; +asn_struct_print_f RIC_CallProcessBreakpoint_ID_print; +asn_constr_check_f RIC_CallProcessBreakpoint_ID_constraint; +ber_type_decoder_f RIC_CallProcessBreakpoint_ID_decode_ber; +der_type_encoder_f RIC_CallProcessBreakpoint_ID_encode_der; +xer_type_decoder_f RIC_CallProcessBreakpoint_ID_decode_xer; +xer_type_encoder_f RIC_CallProcessBreakpoint_ID_encode_xer; +oer_type_decoder_f RIC_CallProcessBreakpoint_ID_decode_oer; +oer_type_encoder_f RIC_CallProcessBreakpoint_ID_encode_oer; +per_type_decoder_f RIC_CallProcessBreakpoint_ID_decode_uper; +per_type_encoder_f RIC_CallProcessBreakpoint_ID_encode_uper; +per_type_decoder_f RIC_CallProcessBreakpoint_ID_decode_aper; +per_type_encoder_f RIC_CallProcessBreakpoint_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_CallProcessBreakpoint_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-Name.h b/Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-Name.h new file mode 100644 index 0000000..30b3303 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-CallProcessBreakpoint-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_CallProcessBreakpoint_Name_H_ +#define _RIC_CallProcessBreakpoint_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-CallProcessBreakpoint-Name */ +typedef PrintableString_t RIC_CallProcessBreakpoint_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_CallProcessBreakpoint_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessBreakpoint_Name; +asn_struct_free_f RIC_CallProcessBreakpoint_Name_free; +asn_struct_print_f RIC_CallProcessBreakpoint_Name_print; +asn_constr_check_f RIC_CallProcessBreakpoint_Name_constraint; +ber_type_decoder_f RIC_CallProcessBreakpoint_Name_decode_ber; +der_type_encoder_f RIC_CallProcessBreakpoint_Name_encode_der; +xer_type_decoder_f RIC_CallProcessBreakpoint_Name_decode_xer; +xer_type_encoder_f RIC_CallProcessBreakpoint_Name_encode_xer; +oer_type_decoder_f RIC_CallProcessBreakpoint_Name_decode_oer; +oer_type_encoder_f RIC_CallProcessBreakpoint_Name_encode_oer; +per_type_decoder_f RIC_CallProcessBreakpoint_Name_decode_uper; +per_type_encoder_f RIC_CallProcessBreakpoint_Name_encode_uper; +per_type_decoder_f RIC_CallProcessBreakpoint_Name_decode_aper; +per_type_encoder_f RIC_CallProcessBreakpoint_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_CallProcessBreakpoint_Name_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-CallProcessType-ID.h b/Bouncer/e2sm_rc/headers/RIC-CallProcessType-ID.h new file mode 100644 index 0000000..901ba5e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-CallProcessType-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_CallProcessType_ID_H_ +#define _RIC_CallProcessType_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-CallProcessType-ID */ +typedef long RIC_CallProcessType_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_CallProcessType_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessType_ID; +asn_struct_free_f RIC_CallProcessType_ID_free; +asn_struct_print_f RIC_CallProcessType_ID_print; +asn_constr_check_f RIC_CallProcessType_ID_constraint; +ber_type_decoder_f RIC_CallProcessType_ID_decode_ber; +der_type_encoder_f RIC_CallProcessType_ID_encode_der; +xer_type_decoder_f RIC_CallProcessType_ID_decode_xer; +xer_type_encoder_f RIC_CallProcessType_ID_encode_xer; +oer_type_decoder_f RIC_CallProcessType_ID_decode_oer; +oer_type_encoder_f RIC_CallProcessType_ID_encode_oer; +per_type_decoder_f RIC_CallProcessType_ID_decode_uper; +per_type_encoder_f RIC_CallProcessType_ID_encode_uper; +per_type_decoder_f RIC_CallProcessType_ID_decode_aper; +per_type_encoder_f RIC_CallProcessType_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_CallProcessType_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-CallProcessType-Name.h b/Bouncer/e2sm_rc/headers/RIC-CallProcessType-Name.h new file mode 100644 index 0000000..13a9013 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-CallProcessType-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_CallProcessType_Name_H_ +#define _RIC_CallProcessType_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-CallProcessType-Name */ +typedef PrintableString_t RIC_CallProcessType_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_CallProcessType_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessType_Name; +asn_struct_free_f RIC_CallProcessType_Name_free; +asn_struct_print_f RIC_CallProcessType_Name_print; +asn_constr_check_f RIC_CallProcessType_Name_constraint; +ber_type_decoder_f RIC_CallProcessType_Name_decode_ber; +der_type_encoder_f RIC_CallProcessType_Name_encode_der; +xer_type_decoder_f RIC_CallProcessType_Name_decode_xer; +xer_type_encoder_f RIC_CallProcessType_Name_encode_xer; +oer_type_decoder_f RIC_CallProcessType_Name_decode_oer; +oer_type_encoder_f RIC_CallProcessType_Name_encode_oer; +per_type_decoder_f RIC_CallProcessType_Name_decode_uper; +per_type_encoder_f RIC_CallProcessType_Name_encode_uper; +per_type_decoder_f RIC_CallProcessType_Name_decode_aper; +per_type_encoder_f RIC_CallProcessType_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_CallProcessType_Name_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-ControlAction-ID.h b/Bouncer/e2sm_rc/headers/RIC-ControlAction-ID.h new file mode 100644 index 0000000..b19f1ea --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-ControlAction-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_ControlAction_ID_H_ +#define _RIC_ControlAction_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-ControlAction-ID */ +typedef long RIC_ControlAction_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_ControlAction_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_ControlAction_ID; +asn_struct_free_f RIC_ControlAction_ID_free; +asn_struct_print_f RIC_ControlAction_ID_print; +asn_constr_check_f RIC_ControlAction_ID_constraint; +ber_type_decoder_f RIC_ControlAction_ID_decode_ber; +der_type_encoder_f RIC_ControlAction_ID_encode_der; +xer_type_decoder_f RIC_ControlAction_ID_decode_xer; +xer_type_encoder_f RIC_ControlAction_ID_encode_xer; +oer_type_decoder_f RIC_ControlAction_ID_decode_oer; +oer_type_encoder_f RIC_ControlAction_ID_encode_oer; +per_type_decoder_f RIC_ControlAction_ID_decode_uper; +per_type_encoder_f RIC_ControlAction_ID_encode_uper; +per_type_decoder_f RIC_ControlAction_ID_decode_aper; +per_type_encoder_f RIC_ControlAction_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_ControlAction_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-ControlAction-Name.h b/Bouncer/e2sm_rc/headers/RIC-ControlAction-Name.h new file mode 100644 index 0000000..fcbc03e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-ControlAction-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_ControlAction_Name_H_ +#define _RIC_ControlAction_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-ControlAction-Name */ +typedef PrintableString_t RIC_ControlAction_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_ControlAction_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_ControlAction_Name; +asn_struct_free_f RIC_ControlAction_Name_free; +asn_struct_print_f RIC_ControlAction_Name_print; +asn_constr_check_f RIC_ControlAction_Name_constraint; +ber_type_decoder_f RIC_ControlAction_Name_decode_ber; +der_type_encoder_f RIC_ControlAction_Name_encode_der; +xer_type_decoder_f RIC_ControlAction_Name_decode_xer; +xer_type_encoder_f RIC_ControlAction_Name_encode_xer; +oer_type_decoder_f RIC_ControlAction_Name_decode_oer; +oer_type_encoder_f RIC_ControlAction_Name_encode_oer; +per_type_decoder_f RIC_ControlAction_Name_decode_uper; +per_type_encoder_f RIC_ControlAction_Name_encode_uper; +per_type_decoder_f RIC_ControlAction_Name_decode_aper; +per_type_encoder_f RIC_ControlAction_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_ControlAction_Name_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-EventTrigger-Cell-ID.h b/Bouncer/e2sm_rc/headers/RIC-EventTrigger-Cell-ID.h new file mode 100644 index 0000000..737098d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-EventTrigger-Cell-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_EventTrigger_Cell_ID_H_ +#define _RIC_EventTrigger_Cell_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-EventTrigger-Cell-ID */ +typedef long RIC_EventTrigger_Cell_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_EventTrigger_Cell_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_EventTrigger_Cell_ID; +asn_struct_free_f RIC_EventTrigger_Cell_ID_free; +asn_struct_print_f RIC_EventTrigger_Cell_ID_print; +asn_constr_check_f RIC_EventTrigger_Cell_ID_constraint; +ber_type_decoder_f RIC_EventTrigger_Cell_ID_decode_ber; +der_type_encoder_f RIC_EventTrigger_Cell_ID_encode_der; +xer_type_decoder_f RIC_EventTrigger_Cell_ID_decode_xer; +xer_type_encoder_f RIC_EventTrigger_Cell_ID_encode_xer; +oer_type_decoder_f RIC_EventTrigger_Cell_ID_decode_oer; +oer_type_encoder_f RIC_EventTrigger_Cell_ID_encode_oer; +per_type_decoder_f RIC_EventTrigger_Cell_ID_decode_uper; +per_type_encoder_f RIC_EventTrigger_Cell_ID_encode_uper; +per_type_decoder_f RIC_EventTrigger_Cell_ID_decode_aper; +per_type_encoder_f RIC_EventTrigger_Cell_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_EventTrigger_Cell_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-EventTrigger-UE-ID.h b/Bouncer/e2sm_rc/headers/RIC-EventTrigger-UE-ID.h new file mode 100644 index 0000000..702ee72 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-EventTrigger-UE-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_EventTrigger_UE_ID_H_ +#define _RIC_EventTrigger_UE_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-EventTrigger-UE-ID */ +typedef long RIC_EventTrigger_UE_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_EventTrigger_UE_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_EventTrigger_UE_ID; +asn_struct_free_f RIC_EventTrigger_UE_ID_free; +asn_struct_print_f RIC_EventTrigger_UE_ID_print; +asn_constr_check_f RIC_EventTrigger_UE_ID_constraint; +ber_type_decoder_f RIC_EventTrigger_UE_ID_decode_ber; +der_type_encoder_f RIC_EventTrigger_UE_ID_encode_der; +xer_type_decoder_f RIC_EventTrigger_UE_ID_decode_xer; +xer_type_encoder_f RIC_EventTrigger_UE_ID_encode_xer; +oer_type_decoder_f RIC_EventTrigger_UE_ID_decode_oer; +oer_type_encoder_f RIC_EventTrigger_UE_ID_encode_oer; +per_type_decoder_f RIC_EventTrigger_UE_ID_decode_uper; +per_type_encoder_f RIC_EventTrigger_UE_ID_encode_uper; +per_type_decoder_f RIC_EventTrigger_UE_ID_decode_aper; +per_type_encoder_f RIC_EventTrigger_UE_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_EventTrigger_UE_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-EventTrigger-UEevent-ID.h b/Bouncer/e2sm_rc/headers/RIC-EventTrigger-UEevent-ID.h new file mode 100644 index 0000000..61d07a7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-EventTrigger-UEevent-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_EventTrigger_UEevent_ID_H_ +#define _RIC_EventTrigger_UEevent_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-EventTrigger-UEevent-ID */ +typedef long RIC_EventTrigger_UEevent_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_EventTrigger_UEevent_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_EventTrigger_UEevent_ID; +asn_struct_free_f RIC_EventTrigger_UEevent_ID_free; +asn_struct_print_f RIC_EventTrigger_UEevent_ID_print; +asn_constr_check_f RIC_EventTrigger_UEevent_ID_constraint; +ber_type_decoder_f RIC_EventTrigger_UEevent_ID_decode_ber; +der_type_encoder_f RIC_EventTrigger_UEevent_ID_encode_der; +xer_type_decoder_f RIC_EventTrigger_UEevent_ID_decode_xer; +xer_type_encoder_f RIC_EventTrigger_UEevent_ID_encode_xer; +oer_type_decoder_f RIC_EventTrigger_UEevent_ID_decode_oer; +oer_type_encoder_f RIC_EventTrigger_UEevent_ID_encode_oer; +per_type_decoder_f RIC_EventTrigger_UEevent_ID_decode_uper; +per_type_encoder_f RIC_EventTrigger_UEevent_ID_encode_uper; +per_type_decoder_f RIC_EventTrigger_UEevent_ID_decode_aper; +per_type_encoder_f RIC_EventTrigger_UEevent_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_EventTrigger_UEevent_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-EventTriggerCondition-ID.h b/Bouncer/e2sm_rc/headers/RIC-EventTriggerCondition-ID.h new file mode 100644 index 0000000..ec0335b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-EventTriggerCondition-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_EventTriggerCondition_ID_H_ +#define _RIC_EventTriggerCondition_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-EventTriggerCondition-ID */ +typedef long RIC_EventTriggerCondition_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_EventTriggerCondition_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_EventTriggerCondition_ID; +asn_struct_free_f RIC_EventTriggerCondition_ID_free; +asn_struct_print_f RIC_EventTriggerCondition_ID_print; +asn_constr_check_f RIC_EventTriggerCondition_ID_constraint; +ber_type_decoder_f RIC_EventTriggerCondition_ID_decode_ber; +der_type_encoder_f RIC_EventTriggerCondition_ID_encode_der; +xer_type_decoder_f RIC_EventTriggerCondition_ID_decode_xer; +xer_type_encoder_f RIC_EventTriggerCondition_ID_encode_xer; +oer_type_decoder_f RIC_EventTriggerCondition_ID_decode_oer; +oer_type_encoder_f RIC_EventTriggerCondition_ID_encode_oer; +per_type_decoder_f RIC_EventTriggerCondition_ID_decode_uper; +per_type_encoder_f RIC_EventTriggerCondition_ID_encode_uper; +per_type_decoder_f RIC_EventTriggerCondition_ID_decode_aper; +per_type_encoder_f RIC_EventTriggerCondition_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_EventTriggerCondition_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-Format-Type.h b/Bouncer/e2sm_rc/headers/RIC-Format-Type.h new file mode 100644 index 0000000..e82251d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-Format-Type.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_Format_Type_H_ +#define _RIC_Format_Type_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-Format-Type */ +typedef long RIC_Format_Type_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_Format_Type; +asn_struct_free_f RIC_Format_Type_free; +asn_struct_print_f RIC_Format_Type_print; +asn_constr_check_f RIC_Format_Type_constraint; +ber_type_decoder_f RIC_Format_Type_decode_ber; +der_type_encoder_f RIC_Format_Type_encode_der; +xer_type_decoder_f RIC_Format_Type_decode_xer; +xer_type_encoder_f RIC_Format_Type_encode_xer; +oer_type_decoder_f RIC_Format_Type_decode_oer; +oer_type_encoder_f RIC_Format_Type_encode_oer; +per_type_decoder_f RIC_Format_Type_decode_uper; +per_type_encoder_f RIC_Format_Type_encode_uper; +per_type_decoder_f RIC_Format_Type_decode_aper; +per_type_encoder_f RIC_Format_Type_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_Format_Type_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-InsertIndication-ID.h b/Bouncer/e2sm_rc/headers/RIC-InsertIndication-ID.h new file mode 100644 index 0000000..6ea6430 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-InsertIndication-ID.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_InsertIndication_ID_H_ +#define _RIC_InsertIndication_ID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-InsertIndication-ID */ +typedef long RIC_InsertIndication_ID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_InsertIndication_ID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_InsertIndication_ID; +asn_struct_free_f RIC_InsertIndication_ID_free; +asn_struct_print_f RIC_InsertIndication_ID_print; +asn_constr_check_f RIC_InsertIndication_ID_constraint; +ber_type_decoder_f RIC_InsertIndication_ID_decode_ber; +der_type_encoder_f RIC_InsertIndication_ID_encode_der; +xer_type_decoder_f RIC_InsertIndication_ID_decode_xer; +xer_type_encoder_f RIC_InsertIndication_ID_encode_xer; +oer_type_decoder_f RIC_InsertIndication_ID_decode_oer; +oer_type_encoder_f RIC_InsertIndication_ID_encode_oer; +per_type_decoder_f RIC_InsertIndication_ID_decode_uper; +per_type_encoder_f RIC_InsertIndication_ID_encode_uper; +per_type_decoder_f RIC_InsertIndication_ID_decode_aper; +per_type_encoder_f RIC_InsertIndication_ID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_InsertIndication_ID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-InsertIndication-Name.h b/Bouncer/e2sm_rc/headers/RIC-InsertIndication-Name.h new file mode 100644 index 0000000..2c7fed1 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-InsertIndication-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_InsertIndication_Name_H_ +#define _RIC_InsertIndication_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-InsertIndication-Name */ +typedef PrintableString_t RIC_InsertIndication_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_InsertIndication_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_InsertIndication_Name; +asn_struct_free_f RIC_InsertIndication_Name_free; +asn_struct_print_f RIC_InsertIndication_Name_print; +asn_constr_check_f RIC_InsertIndication_Name_constraint; +ber_type_decoder_f RIC_InsertIndication_Name_decode_ber; +der_type_encoder_f RIC_InsertIndication_Name_encode_der; +xer_type_decoder_f RIC_InsertIndication_Name_decode_xer; +xer_type_encoder_f RIC_InsertIndication_Name_encode_xer; +oer_type_decoder_f RIC_InsertIndication_Name_decode_oer; +oer_type_encoder_f RIC_InsertIndication_Name_encode_oer; +per_type_decoder_f RIC_InsertIndication_Name_decode_uper; +per_type_encoder_f RIC_InsertIndication_Name_encode_uper; +per_type_decoder_f RIC_InsertIndication_Name_decode_aper; +per_type_encoder_f RIC_InsertIndication_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_InsertIndication_Name_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-PolicyAction-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/RIC-PolicyAction-RANParameter-Item.h new file mode 100644 index 0000000..f4e6dd0 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-PolicyAction-RANParameter-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_PolicyAction_RANParameter_Item_H_ +#define _RIC_PolicyAction_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-ValueType.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-PolicyAction-RANParameter-Item */ +typedef struct RIC_PolicyAction_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_ValueType_t ranParameter_valueType; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RIC_PolicyAction_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_PolicyAction_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RIC_PolicyAction_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RIC_PolicyAction_RANParameter_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_PolicyAction_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-PolicyAction.h b/Bouncer/e2sm_rc/headers/RIC-PolicyAction.h new file mode 100644 index 0000000..8bff62f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-PolicyAction.h @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_PolicyAction_H_ +#define _RIC_PolicyAction_H_ + + +#include + +/* Including external dependencies */ +#include "RIC-ControlAction-ID.h" +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RIC_PolicyAction__ric_PolicyDecision { + RIC_PolicyAction__ric_PolicyDecision_accept = 0, + RIC_PolicyAction__ric_PolicyDecision_reject = 1 + /* + * Enumeration is extensible + */ +} e_RIC_PolicyAction__ric_PolicyDecision; + +/* Forward declarations */ +struct RIC_PolicyAction_RANParameter_Item; + +/* RIC-PolicyAction */ +typedef struct RIC_PolicyAction { + RIC_ControlAction_ID_t ric_PolicyAction_ID; + struct RIC_PolicyAction__ranParameters_List { + A_SEQUENCE_OF(struct RIC_PolicyAction_RANParameter_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ranParameters_List; + /* + * This type is extensible, + * possible extensions are below. + */ + long *ric_PolicyDecision; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RIC_PolicyAction_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_ric_PolicyDecision_6; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_PolicyAction; +extern asn_SEQUENCE_specifics_t asn_SPC_RIC_PolicyAction_specs_1; +extern asn_TYPE_member_t asn_MBR_RIC_PolicyAction_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_PolicyAction_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-Style-Name.h b/Bouncer/e2sm_rc/headers/RIC-Style-Name.h new file mode 100644 index 0000000..9603b4a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-Style-Name.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_Style_Name_H_ +#define _RIC_Style_Name_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-Style-Name */ +typedef PrintableString_t RIC_Style_Name_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RIC_Style_Name_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RIC_Style_Name; +asn_struct_free_f RIC_Style_Name_free; +asn_struct_print_f RIC_Style_Name_print; +asn_constr_check_f RIC_Style_Name_constraint; +ber_type_decoder_f RIC_Style_Name_decode_ber; +der_type_encoder_f RIC_Style_Name_encode_der; +xer_type_decoder_f RIC_Style_Name_decode_xer; +xer_type_encoder_f RIC_Style_Name_encode_xer; +oer_type_decoder_f RIC_Style_Name_decode_oer; +oer_type_encoder_f RIC_Style_Name_encode_oer; +per_type_decoder_f RIC_Style_Name_decode_uper; +per_type_encoder_f RIC_Style_Name_encode_uper; +per_type_decoder_f RIC_Style_Name_decode_aper; +per_type_encoder_f RIC_Style_Name_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_Style_Name_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RIC-Style-Type.h b/Bouncer/e2sm_rc/headers/RIC-Style-Type.h new file mode 100644 index 0000000..c36f8a8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RIC-Style-Type.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RIC_Style_Type_H_ +#define _RIC_Style_Type_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RIC-Style-Type */ +typedef long RIC_Style_Type_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RIC_Style_Type; +asn_struct_free_f RIC_Style_Type_free; +asn_struct_print_f RIC_Style_Type_print; +asn_constr_check_f RIC_Style_Type_constraint; +ber_type_decoder_f RIC_Style_Type_decode_ber; +der_type_encoder_f RIC_Style_Type_encode_der; +xer_type_decoder_f RIC_Style_Type_decode_xer; +xer_type_encoder_f RIC_Style_Type_encode_xer; +oer_type_decoder_f RIC_Style_Type_decode_oer; +oer_type_encoder_f RIC_Style_Type_encode_oer; +per_type_decoder_f RIC_Style_Type_decode_uper; +per_type_encoder_f RIC_Style_Type_encode_uper; +per_type_decoder_f RIC_Style_Type_decode_aper; +per_type_encoder_f RIC_Style_Type_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RIC_Style_Type_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RRC-MessageID.h b/Bouncer/e2sm_rc/headers/RRC-MessageID.h new file mode 100644 index 0000000..5c4461c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RRC-MessageID.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RRC_MessageID_H_ +#define _RRC_MessageID_H_ + + +#include + +/* Including external dependencies */ +#include +#include "RRCclass-LTE.h" +#include "RRCclass-NR.h" +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RRC_MessageID__rrcType_PR { + RRC_MessageID__rrcType_PR_NOTHING, /* No components present */ + RRC_MessageID__rrcType_PR_lTE, + RRC_MessageID__rrcType_PR_nR + /* Extensions may appear below */ + +} RRC_MessageID__rrcType_PR; + +/* RRC-MessageID */ +typedef struct RRC_MessageID { + struct RRC_MessageID__rrcType { + RRC_MessageID__rrcType_PR present; + union RRC_MessageID__rrcType_u { + RRCclass_LTE_t lTE; + RRCclass_NR_t nR; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } rrcType; + long messageID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RRC_MessageID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RRC_MessageID; +extern asn_SEQUENCE_specifics_t asn_SPC_RRC_MessageID_specs_1; +extern asn_TYPE_member_t asn_MBR_RRC_MessageID_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RRC_MessageID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RRC-State.h b/Bouncer/e2sm_rc/headers/RRC-State.h new file mode 100644 index 0000000..7cbbbd0 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RRC-State.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RRC_State_H_ +#define _RRC_State_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RRC_State { + RRC_State_rrc_connected = 0, + RRC_State_rrc_inactive = 1, + RRC_State_rrc_idle = 2, + RRC_State_any = 3 + /* + * Enumeration is extensible + */ +} e_RRC_State; + +/* RRC-State */ +typedef long RRC_State_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RRC_State_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RRC_State; +extern const asn_INTEGER_specifics_t asn_SPC_RRC_State_specs_1; +asn_struct_free_f RRC_State_free; +asn_struct_print_f RRC_State_print; +asn_constr_check_f RRC_State_constraint; +ber_type_decoder_f RRC_State_decode_ber; +der_type_encoder_f RRC_State_encode_der; +xer_type_decoder_f RRC_State_decode_xer; +xer_type_encoder_f RRC_State_encode_xer; +oer_type_decoder_f RRC_State_decode_oer; +oer_type_encoder_f RRC_State_encode_oer; +per_type_decoder_f RRC_State_decode_uper; +per_type_encoder_f RRC_State_encode_uper; +per_type_decoder_f RRC_State_decode_aper; +per_type_encoder_f RRC_State_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RRC_State_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RRCclass-LTE.h b/Bouncer/e2sm_rc/headers/RRCclass-LTE.h new file mode 100644 index 0000000..a56f897 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RRCclass-LTE.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RRCclass_LTE_H_ +#define _RRCclass_LTE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RRCclass_LTE { + RRCclass_LTE_bCCH_BCH = 0, + RRCclass_LTE_bCCH_BCH_MBMS = 1, + RRCclass_LTE_bCCH_DL_SCH = 2, + RRCclass_LTE_bCCH_DL_SCH_BR = 3, + RRCclass_LTE_bCCH_DL_SCH_MBMS = 4, + RRCclass_LTE_mCCH = 5, + RRCclass_LTE_pCCH = 6, + RRCclass_LTE_dL_CCCH = 7, + RRCclass_LTE_dL_DCCH = 8, + RRCclass_LTE_uL_CCCH = 9, + RRCclass_LTE_uL_DCCH = 10, + RRCclass_LTE_sC_MCCH = 11 + /* + * Enumeration is extensible + */ +} e_RRCclass_LTE; + +/* RRCclass-LTE */ +typedef long RRCclass_LTE_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RRCclass_LTE_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RRCclass_LTE; +extern const asn_INTEGER_specifics_t asn_SPC_RRCclass_LTE_specs_1; +asn_struct_free_f RRCclass_LTE_free; +asn_struct_print_f RRCclass_LTE_print; +asn_constr_check_f RRCclass_LTE_constraint; +ber_type_decoder_f RRCclass_LTE_decode_ber; +der_type_encoder_f RRCclass_LTE_encode_der; +xer_type_decoder_f RRCclass_LTE_decode_xer; +xer_type_encoder_f RRCclass_LTE_encode_xer; +oer_type_decoder_f RRCclass_LTE_decode_oer; +oer_type_encoder_f RRCclass_LTE_encode_oer; +per_type_decoder_f RRCclass_LTE_decode_uper; +per_type_encoder_f RRCclass_LTE_encode_uper; +per_type_decoder_f RRCclass_LTE_decode_aper; +per_type_encoder_f RRCclass_LTE_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RRCclass_LTE_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/RRCclass-NR.h b/Bouncer/e2sm_rc/headers/RRCclass-NR.h new file mode 100644 index 0000000..9f6475c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/RRCclass-NR.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _RRCclass_NR_H_ +#define _RRCclass_NR_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum RRCclass_NR { + RRCclass_NR_bCCH_BCH = 0, + RRCclass_NR_bCCH_DL_SCH = 1, + RRCclass_NR_dL_CCCH = 2, + RRCclass_NR_dL_DCCH = 3, + RRCclass_NR_pCCH = 4, + RRCclass_NR_uL_CCCH = 5, + RRCclass_NR_uL_CCCH1 = 6, + RRCclass_NR_uL_DCCH = 7 + /* + * Enumeration is extensible + */ +} e_RRCclass_NR; + +/* RRCclass-NR */ +typedef long RRCclass_NR_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RRCclass_NR_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RRCclass_NR; +extern const asn_INTEGER_specifics_t asn_SPC_RRCclass_NR_specs_1; +asn_struct_free_f RRCclass_NR_free; +asn_struct_print_f RRCclass_NR_print; +asn_constr_check_f RRCclass_NR_constraint; +ber_type_decoder_f RRCclass_NR_decode_ber; +der_type_encoder_f RRCclass_NR_encode_der; +xer_type_decoder_f RRCclass_NR_decode_xer; +xer_type_encoder_f RRCclass_NR_encode_xer; +oer_type_decoder_f RRCclass_NR_decode_oer; +oer_type_encoder_f RRCclass_NR_encode_oer; +per_type_decoder_f RRCclass_NR_decode_uper; +per_type_encoder_f RRCclass_NR_encode_uper; +per_type_decoder_f RRCclass_NR_decode_aper; +per_type_encoder_f RRCclass_NR_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RRCclass_NR_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/Report-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/Report-RANParameter-Item.h new file mode 100644 index 0000000..4e6b386 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/Report-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _Report_RANParameter_Item_H_ +#define _Report_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* Report-RANParameter-Item */ +typedef struct Report_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Report_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Report_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_Report_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_Report_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Report_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/S-NSSAI.h b/Bouncer/e2sm_rc/headers/S-NSSAI.h new file mode 100644 index 0000000..ade3ead --- /dev/null +++ b/Bouncer/e2sm_rc/headers/S-NSSAI.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _S_NSSAI_H_ +#define _S_NSSAI_H_ + + +#include + +/* Including external dependencies */ +#include "SST.h" +#include "SD.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* S-NSSAI */ +typedef struct S_NSSAI { + SST_t sST; + SD_t *sD; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} S_NSSAI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_S_NSSAI; + +#ifdef __cplusplus +} +#endif + +#endif /* _S_NSSAI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/SD.h b/Bouncer/e2sm_rc/headers/SD.h new file mode 100644 index 0000000..20fd4a6 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/SD.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SD_H_ +#define _SD_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* SD */ +typedef OCTET_STRING_t SD_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_SD_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_SD; +asn_struct_free_f SD_free; +asn_struct_print_f SD_print; +asn_constr_check_f SD_constraint; +ber_type_decoder_f SD_decode_ber; +der_type_encoder_f SD_encode_der; +xer_type_decoder_f SD_decode_xer; +xer_type_encoder_f SD_encode_xer; +oer_type_decoder_f SD_decode_oer; +oer_type_encoder_f SD_encode_oer; +per_type_decoder_f SD_decode_uper; +per_type_encoder_f SD_encode_uper; +per_type_decoder_f SD_decode_aper; +per_type_encoder_f SD_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _SD_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/SST.h b/Bouncer/e2sm_rc/headers/SST.h new file mode 100644 index 0000000..948c5ae --- /dev/null +++ b/Bouncer/e2sm_rc/headers/SST.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SST_H_ +#define _SST_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* SST */ +typedef OCTET_STRING_t SST_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_SST_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_SST; +asn_struct_free_f SST_free; +asn_struct_print_f SST_print; +asn_constr_check_f SST_constraint; +ber_type_decoder_f SST_decode_ber; +der_type_encoder_f SST_encode_der; +xer_type_decoder_f SST_decode_xer; +xer_type_encoder_f SST_encode_xer; +oer_type_decoder_f SST_decode_oer; +oer_type_encoder_f SST_encode_oer; +per_type_decoder_f SST_decode_uper; +per_type_encoder_f SST_encode_uper; +per_type_decoder_f SST_decode_aper; +per_type_encoder_f SST_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _SST_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/ServingCell-ARFCN.h b/Bouncer/e2sm_rc/headers/ServingCell-ARFCN.h new file mode 100644 index 0000000..a161892 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ServingCell-ARFCN.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ServingCell_ARFCN_H_ +#define _ServingCell_ARFCN_H_ + + +#include + +/* Including external dependencies */ +#include "E-UTRA-ARFCN.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ServingCell_ARFCN_PR { + ServingCell_ARFCN_PR_NOTHING, /* No components present */ + ServingCell_ARFCN_PR_nR, + ServingCell_ARFCN_PR_eUTRA + /* Extensions may appear below */ + +} ServingCell_ARFCN_PR; + +/* Forward declarations */ +struct NR_ARFCN; + +/* ServingCell-ARFCN */ +typedef struct ServingCell_ARFCN { + ServingCell_ARFCN_PR present; + union ServingCell_ARFCN_u { + struct NR_ARFCN *nR; + E_UTRA_ARFCN_t eUTRA; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ServingCell_ARFCN_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ServingCell_ARFCN; +extern asn_CHOICE_specifics_t asn_SPC_ServingCell_ARFCN_specs_1; +extern asn_TYPE_member_t asn_MBR_ServingCell_ARFCN_1[2]; +extern asn_per_constraints_t asn_PER_type_ServingCell_ARFCN_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ServingCell_ARFCN_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/ServingCell-PCI.h b/Bouncer/e2sm_rc/headers/ServingCell-PCI.h new file mode 100644 index 0000000..c516cae --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ServingCell-PCI.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _ServingCell_PCI_H_ +#define _ServingCell_PCI_H_ + + +#include + +/* Including external dependencies */ +#include "NR-PCI.h" +#include "E-UTRA-PCI.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ServingCell_PCI_PR { + ServingCell_PCI_PR_NOTHING, /* No components present */ + ServingCell_PCI_PR_nR, + ServingCell_PCI_PR_eUTRA + /* Extensions may appear below */ + +} ServingCell_PCI_PR; + +/* ServingCell-PCI */ +typedef struct ServingCell_PCI { + ServingCell_PCI_PR present; + union ServingCell_PCI_u { + NR_PCI_t nR; + E_UTRA_PCI_t eUTRA; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ServingCell_PCI_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ServingCell_PCI; +extern asn_CHOICE_specifics_t asn_SPC_ServingCell_PCI_specs_1; +extern asn_TYPE_member_t asn_MBR_ServingCell_PCI_1[2]; +extern asn_per_constraints_t asn_PER_type_ServingCell_PCI_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _ServingCell_PCI_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/SubscriberProfileIDforRFP.h b/Bouncer/e2sm_rc/headers/SubscriberProfileIDforRFP.h new file mode 100644 index 0000000..441e728 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/SubscriberProfileIDforRFP.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SubscriberProfileIDforRFP_H_ +#define _SubscriberProfileIDforRFP_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* SubscriberProfileIDforRFP */ +typedef long SubscriberProfileIDforRFP_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SubscriberProfileIDforRFP; +asn_struct_free_f SubscriberProfileIDforRFP_free; +asn_struct_print_f SubscriberProfileIDforRFP_print; +asn_constr_check_f SubscriberProfileIDforRFP_constraint; +ber_type_decoder_f SubscriberProfileIDforRFP_decode_ber; +der_type_encoder_f SubscriberProfileIDforRFP_encode_der; +xer_type_decoder_f SubscriberProfileIDforRFP_decode_xer; +xer_type_encoder_f SubscriberProfileIDforRFP_encode_xer; +oer_type_decoder_f SubscriberProfileIDforRFP_decode_oer; +oer_type_encoder_f SubscriberProfileIDforRFP_encode_oer; +per_type_decoder_f SubscriberProfileIDforRFP_decode_uper; +per_type_encoder_f SubscriberProfileIDforRFP_encode_uper; +per_type_decoder_f SubscriberProfileIDforRFP_decode_aper; +per_type_encoder_f SubscriberProfileIDforRFP_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _SubscriberProfileIDforRFP_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/SupportedSULBandList.h b/Bouncer/e2sm_rc/headers/SupportedSULBandList.h new file mode 100644 index 0000000..d1ac7b9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/SupportedSULBandList.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SupportedSULBandList_H_ +#define _SupportedSULBandList_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct SupportedSULFreqBandItem; + +/* SupportedSULBandList */ +typedef struct SupportedSULBandList { + A_SEQUENCE_OF(struct SupportedSULFreqBandItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SupportedSULBandList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SupportedSULBandList; +extern asn_SET_OF_specifics_t asn_SPC_SupportedSULBandList_specs_1; +extern asn_TYPE_member_t asn_MBR_SupportedSULBandList_1[1]; +extern asn_per_constraints_t asn_PER_type_SupportedSULBandList_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _SupportedSULBandList_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/SupportedSULFreqBandItem.h b/Bouncer/e2sm_rc/headers/SupportedSULFreqBandItem.h new file mode 100644 index 0000000..3eceeab --- /dev/null +++ b/Bouncer/e2sm_rc/headers/SupportedSULFreqBandItem.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _SupportedSULFreqBandItem_H_ +#define _SupportedSULFreqBandItem_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* SupportedSULFreqBandItem */ +typedef struct SupportedSULFreqBandItem { + long freqBandIndicatorNr; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SupportedSULFreqBandItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SupportedSULFreqBandItem; +extern asn_SEQUENCE_specifics_t asn_SPC_SupportedSULFreqBandItem_specs_1; +extern asn_TYPE_member_t asn_MBR_SupportedSULFreqBandItem_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _SupportedSULFreqBandItem_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/TriggerType-Choice-L2state.h b/Bouncer/e2sm_rc/headers/TriggerType-Choice-L2state.h new file mode 100644 index 0000000..ea9570a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/TriggerType-Choice-L2state.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TriggerType_Choice_L2state_H_ +#define _TriggerType_Choice_L2state_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-Testing.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* TriggerType-Choice-L2state */ +typedef struct TriggerType_Choice_L2state { + RANParameter_Testing_t associatedL2variables; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TriggerType_Choice_L2state_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_L2state; +extern asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_L2state_specs_1; +extern asn_TYPE_member_t asn_MBR_TriggerType_Choice_L2state_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _TriggerType_Choice_L2state_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate-Item.h b/Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate-Item.h new file mode 100644 index 0000000..c5c9774 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate-Item.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TriggerType_Choice_RRCstate_Item_H_ +#define _TriggerType_Choice_RRCstate_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RRC-State.h" +#include "LogicalOR.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* TriggerType-Choice-RRCstate-Item */ +typedef struct TriggerType_Choice_RRCstate_Item { + RRC_State_t stateChangedTo; + LogicalOR_t *logicalOR; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TriggerType_Choice_RRCstate_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_RRCstate_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_RRCstate_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_TriggerType_Choice_RRCstate_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _TriggerType_Choice_RRCstate_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate.h b/Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate.h new file mode 100644 index 0000000..1805bd8 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/TriggerType-Choice-RRCstate.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TriggerType_Choice_RRCstate_H_ +#define _TriggerType_Choice_RRCstate_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct TriggerType_Choice_RRCstate_Item; + +/* TriggerType-Choice-RRCstate */ +typedef struct TriggerType_Choice_RRCstate { + struct TriggerType_Choice_RRCstate__rrcState_List { + A_SEQUENCE_OF(struct TriggerType_Choice_RRCstate_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } rrcState_List; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TriggerType_Choice_RRCstate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_RRCstate; +extern asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_RRCstate_specs_1; +extern asn_TYPE_member_t asn_MBR_TriggerType_Choice_RRCstate_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _TriggerType_Choice_RRCstate_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/TriggerType-Choice-UEID.h b/Bouncer/e2sm_rc/headers/TriggerType-Choice-UEID.h new file mode 100644 index 0000000..8920c36 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/TriggerType-Choice-UEID.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TriggerType_Choice_UEID_H_ +#define _TriggerType_Choice_UEID_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* TriggerType-Choice-UEID */ +typedef struct TriggerType_Choice_UEID { + long ueIDchange_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TriggerType_Choice_UEID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_UEID; +extern asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_UEID_specs_1; +extern asn_TYPE_member_t asn_MBR_TriggerType_Choice_UEID_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _TriggerType_Choice_UEID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/TriggerType-Choice.h b/Bouncer/e2sm_rc/headers/TriggerType-Choice.h new file mode 100644 index 0000000..20afe9c --- /dev/null +++ b/Bouncer/e2sm_rc/headers/TriggerType-Choice.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _TriggerType_Choice_H_ +#define _TriggerType_Choice_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TriggerType_Choice_PR { + TriggerType_Choice_PR_NOTHING, /* No components present */ + TriggerType_Choice_PR_triggerType_Choice_RRCstate, + TriggerType_Choice_PR_triggerType_Choice_UEID, + TriggerType_Choice_PR_triggerType_Choice_L2state + /* Extensions may appear below */ + +} TriggerType_Choice_PR; + +/* Forward declarations */ +struct TriggerType_Choice_RRCstate; +struct TriggerType_Choice_UEID; +struct TriggerType_Choice_L2state; + +/* TriggerType-Choice */ +typedef struct TriggerType_Choice { + TriggerType_Choice_PR present; + union TriggerType_Choice_u { + struct TriggerType_Choice_RRCstate *triggerType_Choice_RRCstate; + struct TriggerType_Choice_UEID *triggerType_Choice_UEID; + struct TriggerType_Choice_L2state *triggerType_Choice_L2state; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TriggerType_Choice_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice; +extern asn_CHOICE_specifics_t asn_SPC_TriggerType_Choice_specs_1; +extern asn_TYPE_member_t asn_MBR_TriggerType_Choice_1[3]; +extern asn_per_constraints_t asn_PER_type_TriggerType_Choice_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _TriggerType_Choice_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-EN-GNB.h b/Bouncer/e2sm_rc/headers/UEID-EN-GNB.h new file mode 100644 index 0000000..2d19777 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-EN-GNB.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_EN_GNB_H_ +#define _UEID_EN_GNB_H_ + + +#include + +/* Including external dependencies */ +#include "ENB-UE-X2AP-ID.h" +#include "ENB-UE-X2AP-ID-Extension.h" +#include "GlobalENB-ID.h" +#include "GNB-CU-UE-F1AP-ID.h" +#include "RANUEID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_CP_E1AP_ID_List; + +/* UEID-EN-GNB */ +typedef struct UEID_EN_GNB { + ENB_UE_X2AP_ID_t m_eNB_UE_X2AP_ID; + ENB_UE_X2AP_ID_Extension_t *m_eNB_UE_X2AP_ID_Extension; /* OPTIONAL */ + GlobalENB_ID_t globalENB_ID; + GNB_CU_UE_F1AP_ID_t *gNB_CU_UE_F1AP_ID; /* OPTIONAL */ + struct UEID_GNB_CU_CP_E1AP_ID_List *gNB_CU_CP_UE_E1AP_ID_List; /* OPTIONAL */ + RANUEID_t *ran_UEID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_EN_GNB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_EN_GNB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_EN_GNB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_EN_GNB_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-ENB.h b/Bouncer/e2sm_rc/headers/UEID-ENB.h new file mode 100644 index 0000000..833b52f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-ENB.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_ENB_H_ +#define _UEID_ENB_H_ + + +#include + +/* Including external dependencies */ +#include "MME-UE-S1AP-ID.h" +#include "GUMMEI.h" +#include "ENB-UE-X2AP-ID.h" +#include "ENB-UE-X2AP-ID-Extension.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct GlobalENB_ID; + +/* UEID-ENB */ +typedef struct UEID_ENB { + MME_UE_S1AP_ID_t mME_UE_S1AP_ID; + GUMMEI_t gUMMEI; + ENB_UE_X2AP_ID_t *m_eNB_UE_X2AP_ID; /* OPTIONAL */ + ENB_UE_X2AP_ID_Extension_t *m_eNB_UE_X2AP_ID_Extension; /* OPTIONAL */ + struct GlobalENB_ID *globalENB_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_ENB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_ENB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_ENB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_ENB_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_ENB_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h new file mode 100644 index 0000000..6844487 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_CP_E1AP_ID_Item_H_ +#define _UEID_GNB_CU_CP_E1AP_ID_Item_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-CU-CP-UE-E1AP-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-CU-CP-E1AP-ID-Item */ +typedef struct UEID_GNB_CU_CP_E1AP_ID_Item { + GNB_CU_CP_UE_E1AP_ID_t gNB_CU_CP_UE_E1AP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_CP_E1AP_ID_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_Item_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_CP_E1AP_ID_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-List.h b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-List.h new file mode 100644 index 0000000..5dd862a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-E1AP-ID-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_CP_E1AP_ID_List_H_ +#define _UEID_GNB_CU_CP_E1AP_ID_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_CP_E1AP_ID_Item; + +/* UEID-GNB-CU-CP-E1AP-ID-List */ +typedef struct UEID_GNB_CU_CP_E1AP_ID_List { + A_SEQUENCE_OF(struct UEID_GNB_CU_CP_E1AP_ID_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_CP_E1AP_ID_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List; +extern asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_List_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_List_1[1]; +extern asn_per_constraints_t asn_PER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_CP_E1AP_ID_List_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h new file mode 100644 index 0000000..8193bcf --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_CP_F1AP_ID_Item_H_ +#define _UEID_GNB_CU_CP_F1AP_ID_Item_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-CU-UE-F1AP-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-CU-CP-F1AP-ID-Item */ +typedef struct UEID_GNB_CU_CP_F1AP_ID_Item { + GNB_CU_UE_F1AP_ID_t gNB_CU_UE_F1AP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_CP_F1AP_ID_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_F1AP_ID_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_F1AP_ID_Item_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_CP_F1AP_ID_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-GNB-CU-F1AP-ID-List.h b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-F1AP-ID-List.h new file mode 100644 index 0000000..b1384c3 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-F1AP-ID-List.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_F1AP_ID_List_H_ +#define _UEID_GNB_CU_F1AP_ID_List_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_CP_F1AP_ID_Item; + +/* UEID-GNB-CU-F1AP-ID-List */ +typedef struct UEID_GNB_CU_F1AP_ID_List { + A_SEQUENCE_OF(struct UEID_GNB_CU_CP_F1AP_ID_Item) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_F1AP_ID_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_F1AP_ID_List; +extern asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_F1AP_ID_List_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_F1AP_ID_List_1[1]; +extern asn_per_constraints_t asn_PER_type_UEID_GNB_CU_F1AP_ID_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_F1AP_ID_List_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-GNB-CU-UP.h b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-UP.h new file mode 100644 index 0000000..545fe5d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-GNB-CU-UP.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_CU_UP_H_ +#define _UEID_GNB_CU_UP_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-CU-CP-UE-E1AP-ID.h" +#include "RANUEID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-CU-UP */ +typedef struct UEID_GNB_CU_UP { + GNB_CU_CP_UE_E1AP_ID_t gNB_CU_CP_UE_E1AP_ID; + RANUEID_t *ran_UEID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_CU_UP_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_UP; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_UP_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_CU_UP_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_CU_UP_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-GNB-DU.h b/Bouncer/e2sm_rc/headers/UEID-GNB-DU.h new file mode 100644 index 0000000..3fc4b80 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-GNB-DU.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_DU_H_ +#define _UEID_GNB_DU_H_ + + +#include + +/* Including external dependencies */ +#include "GNB-CU-UE-F1AP-ID.h" +#include "RANUEID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-GNB-DU */ +typedef struct UEID_GNB_DU { + GNB_CU_UE_F1AP_ID_t gNB_CU_UE_F1AP_ID; + RANUEID_t *ran_UEID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_DU_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB_DU; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_DU_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_DU_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_DU_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-GNB.h b/Bouncer/e2sm_rc/headers/UEID-GNB.h new file mode 100644 index 0000000..4d62c06 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-GNB.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_GNB_H_ +#define _UEID_GNB_H_ + + +#include + +/* Including external dependencies */ +#include "AMF-UE-NGAP-ID.h" +#include "GUAMI.h" +#include "RANUEID.h" +#include "NG-RANnodeUEXnAPID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct UEID_GNB_CU_F1AP_ID_List; +struct UEID_GNB_CU_CP_E1AP_ID_List; +struct GlobalGNB_ID; +struct GlobalNGRANNodeID; + +/* UEID-GNB */ +typedef struct UEID_GNB { + AMF_UE_NGAP_ID_t amf_UE_NGAP_ID; + GUAMI_t guami; + struct UEID_GNB_CU_F1AP_ID_List *gNB_CU_UE_F1AP_ID_List; /* OPTIONAL */ + struct UEID_GNB_CU_CP_E1AP_ID_List *gNB_CU_CP_UE_E1AP_ID_List; /* OPTIONAL */ + RANUEID_t *ran_UEID; /* OPTIONAL */ + NG_RANnodeUEXnAPID_t *m_NG_RAN_UE_XnAP_ID; /* OPTIONAL */ + struct GlobalGNB_ID *globalGNB_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + struct GlobalNGRANNodeID *globalNG_RANNode_ID; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_GNB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_GNB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_1[8]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_GNB_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-NG-ENB-DU.h b/Bouncer/e2sm_rc/headers/UEID-NG-ENB-DU.h new file mode 100644 index 0000000..fb405e5 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-NG-ENB-DU.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_NG_ENB_DU_H_ +#define _UEID_NG_ENB_DU_H_ + + +#include + +/* Including external dependencies */ +#include "NGENB-CU-UE-W1AP-ID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* UEID-NG-ENB-DU */ +typedef struct UEID_NG_ENB_DU { + NGENB_CU_UE_W1AP_ID_t ng_eNB_CU_UE_W1AP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_NG_ENB_DU_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB_DU; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_DU_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_NG_ENB_DU_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_NG_ENB_DU_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID-NG-ENB.h b/Bouncer/e2sm_rc/headers/UEID-NG-ENB.h new file mode 100644 index 0000000..cd0125d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID-NG-ENB.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_NG_ENB_H_ +#define _UEID_NG_ENB_H_ + + +#include + +/* Including external dependencies */ +#include "AMF-UE-NGAP-ID.h" +#include "GUAMI.h" +#include "NGENB-CU-UE-W1AP-ID.h" +#include "NG-RANnodeUEXnAPID.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct GlobalNgENB_ID; +struct GlobalNGRANNodeID; + +/* UEID-NG-ENB */ +typedef struct UEID_NG_ENB { + AMF_UE_NGAP_ID_t amf_UE_NGAP_ID; + GUAMI_t guami; + NGENB_CU_UE_W1AP_ID_t *ng_eNB_CU_UE_W1AP_ID; /* OPTIONAL */ + NG_RANnodeUEXnAPID_t *m_NG_RAN_UE_XnAP_ID; /* OPTIONAL */ + struct GlobalNgENB_ID *globalNgENB_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + struct GlobalNGRANNodeID *globalNG_RANNode_ID; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_NG_ENB_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB; +extern asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_NG_ENB_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_NG_ENB_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEID.h b/Bouncer/e2sm_rc/headers/UEID.h new file mode 100644 index 0000000..2526585 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEID.h @@ -0,0 +1,76 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEID_H_ +#define _UEID_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum UEID_PR { + UEID_PR_NOTHING, /* No components present */ + UEID_PR_gNB_UEID, + UEID_PR_gNB_DU_UEID, + UEID_PR_gNB_CU_UP_UEID, + UEID_PR_ng_eNB_UEID, + UEID_PR_ng_eNB_DU_UEID, + UEID_PR_en_gNB_UEID, + UEID_PR_eNB_UEID + /* Extensions may appear below */ + +} UEID_PR; + +/* Forward declarations */ +struct UEID_GNB; +struct UEID_GNB_DU; +struct UEID_GNB_CU_UP; +struct UEID_NG_ENB; +struct UEID_NG_ENB_DU; +struct UEID_EN_GNB; +struct UEID_ENB; + +/* UEID */ +typedef struct UEID { + UEID_PR present; + union UEID_u { + struct UEID_GNB *gNB_UEID; + struct UEID_GNB_DU *gNB_DU_UEID; + struct UEID_GNB_CU_UP *gNB_CU_UP_UEID; + struct UEID_NG_ENB *ng_eNB_UEID; + struct UEID_NG_ENB_DU *ng_eNB_DU_UEID; + struct UEID_EN_GNB *en_gNB_UEID; + struct UEID_ENB *eNB_UEID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEID; +extern asn_CHOICE_specifics_t asn_SPC_UEID_specs_1; +extern asn_TYPE_member_t asn_MBR_UEID_1[7]; +extern asn_per_constraints_t asn_PER_type_UEID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEID_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/UEIdentification-RANParameter-Item.h b/Bouncer/e2sm_rc/headers/UEIdentification-RANParameter-Item.h new file mode 100644 index 0000000..54a1d4b --- /dev/null +++ b/Bouncer/e2sm_rc/headers/UEIdentification-RANParameter-Item.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#ifndef _UEIdentification_RANParameter_Item_H_ +#define _UEIdentification_RANParameter_Item_H_ + + +#include + +/* Including external dependencies */ +#include "RANParameter-ID.h" +#include "RANParameter-Name.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct RANParameter_Definition; + +/* UEIdentification-RANParameter-Item */ +typedef struct UEIdentification_RANParameter_Item { + RANParameter_ID_t ranParameter_ID; + RANParameter_Name_t ranParameter_name; + /* + * This type is extensible, + * possible extensions are below. + */ + struct RANParameter_Definition *ranParameter_Definition; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UEIdentification_RANParameter_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UEIdentification_RANParameter_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_UEIdentification_RANParameter_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_UEIdentification_RANParameter_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _UEIdentification_RANParameter_Item_H_ */ +#include diff --git a/Bouncer/e2sm_rc/headers/asn_SEQUENCE_OF.h b/Bouncer/e2sm_rc/headers/asn_SEQUENCE_OF.h new file mode 100644 index 0000000..e35bc44 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_SEQUENCE_OF.h @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_SEQUENCE_OF_H +#define ASN_SEQUENCE_OF_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * SEQUENCE OF is the same as SET OF with a tiny difference: + * the delete operation preserves the initial order of elements + * and thus MAY operate in non-constant time. + */ +#define A_SEQUENCE_OF(type) A_SET_OF(type) + +#define ASN_SEQUENCE_ADD(headptr, ptr) \ + asn_sequence_add((headptr), (ptr)) + +/*********************************************** + * Implementation of the SEQUENCE OF structure. + */ + +#define asn_sequence_add asn_set_add +#define asn_sequence_empty asn_set_empty + +/* + * Delete the element from the set by its number (base 0). + * This is NOT a constant-time operation. + * The order of elements is preserved. + * If _do_free is given AND the (*free) is initialized, the element + * will be freed using the custom (*free) function as well. + */ +void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); + +/* + * Cope with different conversions requirements to/from void in C and C++. + * This is mostly useful for support library. + */ +typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; +#define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr)) +#define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr)) + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_SEQUENCE_OF_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_SET_OF.h b/Bouncer/e2sm_rc/headers/asn_SET_OF.h new file mode 100644 index 0000000..882e1a4 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_SET_OF.h @@ -0,0 +1,72 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_SET_OF_H +#define ASN_SET_OF_H + +#ifdef __cplusplus +#define A_SET_OF(type) \ + struct { \ + type **array; \ + int count; /* Meaningful size */ \ + int size; /* Allocated size */ \ + void (*free)(decltype(*array)); \ + } +#else /* C */ +#define A_SET_OF(type) \ + struct { \ + type **array; \ + int count; /* Meaningful size */ \ + int size; /* Allocated size */ \ + void (*free)(type *); \ + } +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define ASN_SET_ADD(headptr, ptr) \ + asn_set_add((headptr), (ptr)) + +/******************************************* + * Implementation of the SET OF structure. + */ + +/* + * Add another structure into the set by its pointer. + * RETURN VALUES: + * 0 for success and -1/errno for failure. + */ +int asn_set_add(void *asn_set_of_x, void *ptr); + +/* + * Delete the element from the set by its number (base 0). + * This is a constant-time operation. The order of elements before the + * deleted ones is guaranteed, the order of elements after the deleted + * one is NOT guaranteed. + * If _do_free is given AND the (*free) is initialized, the element + * will be freed using the custom (*free) function as well. + */ +void asn_set_del(void *asn_set_of_x, int number, int _do_free); + +/* + * Empty the contents of the set. Will free the elements, if (*free) is given. + * Will NOT free the set itself. + */ +void asn_set_empty(void *asn_set_of_x); + +/* + * Cope with different conversions requirements to/from void in C and C++. + * This is mostly useful for support library. + */ +typedef A_SET_OF(void) asn_anonymous_set_; +#define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr)) +#define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr)) + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_SET_OF_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_application.h b/Bouncer/e2sm_rc/headers/asn_application.h new file mode 100644 index 0000000..034f646 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_application.h @@ -0,0 +1,171 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Application-level ASN.1 callbacks. + */ +#ifndef ASN_APPLICATION_H +#define ASN_APPLICATION_H + +#include "asn_system.h" /* for platform-dependent types */ +#include "asn_codecs.h" /* for ASN.1 codecs specifics */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * A selection of ASN.1 Transfer Syntaxes to use with generalized + * encoders and decoders declared further in this .h file. + */ +enum asn_transfer_syntax { + /* Avoid appearance of a default transfer syntax. */ + ATS_INVALID = 0, + /* Plaintext output (not conforming to any standard), for debugging. */ + ATS_NONSTANDARD_PLAINTEXT, + /* Returns a randomly generated structure. */ + ATS_RANDOM, + /* + * X.690: + * BER: Basic Encoding Rules. + * DER: Distinguished Encoding Rules. + * CER: Canonical Encoding Rules. + * DER and CER are more strict variants of BER. + */ + ATS_BER, + ATS_DER, + ATS_CER, /* Only decoding is supported */ + /* + * X.696: + * OER: Octet Encoding Rules. + * CANONICAL-OER is a more strict variant of BASIC-OER. + */ + ATS_BASIC_OER, + ATS_CANONICAL_OER, + /* + * X.691: + * PER: Packed Encoding Rules. + * CANONICAL-PER is a more strict variant of BASIC-PER. + * NOTE: Produces or consumes a complete encoding (X.691 (08/2015) #11.1). + */ + ATS_UNALIGNED_BASIC_PER, + ATS_UNALIGNED_CANONICAL_PER, + ATS_ALIGNED_BASIC_PER, + ATS_ALIGNED_CANONICAL_PER, + /* + * X.693: + * XER: XML Encoding Rules. + * CANONICAL-XER is a more strict variant of BASIC-XER. + */ + ATS_BASIC_XER, + ATS_CANONICAL_XER +}; + +/* + * A generic encoder for any supported transfer syntax. + * RETURN VALUES: + * The (.encoded) field of the return value is REDEFINED to mean the following: + * >=0: The computed size of the encoded data. Can exceed the (buffer_size). + * -1: Error encoding the structure. See the error code in (errno): + * EINVAL: Incorrect parameters to the function, such as NULLs. + * ENOENT: Encoding transfer syntax is not defined (for this type). + * EBADF: The structure has invalid form or content constraint failed. + * The (.failed_type) and (.structure_ptr) MIGHT be set to the appropriate + * values at the place of failure, if at all possible. + * WARNING: The (.encoded) field of the return value can exceed the buffer_size. + * This is similar to snprintf(3) contract which might return values + * greater than the buffer size. + */ +asn_enc_rval_t asn_encode_to_buffer( + const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ + enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_encode, + const void *structure_to_encode, void *buffer, size_t buffer_size); + +/* + * A variant of asn_encode_to_buffer() with automatically allocated buffer. + * RETURN VALUES: + * On success, returns a newly allocated (.buffer) containing the whole message. + * The message size is returned in (.result.encoded). + * On failure: + * (.buffer) is NULL, + * (.result.encoded) as in asn_encode_to_buffer(), + * The errno codes as in asn_encode_to_buffer(), plus the following: + * ENOMEM: Memory allocation failed due to system or internal limits. + * The user is responsible for freeing the (.buffer). + */ +typedef struct asn_encode_to_new_buffer_result_s { + void *buffer; /* NULL if failed to encode. */ + asn_enc_rval_t result; +} asn_encode_to_new_buffer_result_t; +asn_encode_to_new_buffer_result_t asn_encode_to_new_buffer( + const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ + enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_encode, + const void *structure_to_encode); + + +/* + * Generic type of an application-defined callback to return various + * types of data to the application. + * EXPECTED RETURN VALUES: + * -1: Failed to consume bytes. Abort the mission. + * Non-negative return values indicate success, and ignored. + */ +typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, + void *application_specific_key); + + +/* + * A generic encoder for any supported transfer syntax. + * Returns the comprehensive encoding result descriptor (see asn_codecs.h). + * RETURN VALUES: + * The negative (.encoded) field of the return values is accompanied with the + * following error codes (errno): + * EINVAL: Incorrect parameters to the function, such as NULLs. + * ENOENT: Encoding transfer syntax is not defined (for this type). + * EBADF: The structure has invalid form or content constraint failed. + * EIO: The (callback) has returned negative value during encoding. + */ +asn_enc_rval_t asn_encode( + const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ + enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_encode, + const void *structure_to_encode, + asn_app_consume_bytes_f *callback, void *callback_key); + + +/* + * A generic decoder for any supported transfer syntax. + */ +asn_dec_rval_t asn_decode( + const asn_codec_ctx_t *opt_codec_parameters, enum asn_transfer_syntax, + const struct asn_TYPE_descriptor_s *type_to_decode, + void **structure_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ +); + + +/* + * A callback of this type is called whenever constraint validation fails + * on some ASN.1 type. See "constraints.h" for more details on constraint + * validation. + * This callback specifies a descriptor of the ASN.1 type which failed + * the constraint check, as well as human readable message on what + * particular constraint has failed. + */ +typedef void (asn_app_constraint_failed_f)(void *application_specific_key, + const struct asn_TYPE_descriptor_s *type_descriptor_which_failed, + const void *structure_which_failed_ptr, + const char *error_message_format, ...) CC_PRINTFLIKE(4, 5); + + +#ifdef __cplusplus +} +#endif + +#include "constr_TYPE.h" /* for asn_TYPE_descriptor_t */ + +#endif /* ASN_APPLICATION_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_bit_data.h b/Bouncer/e2sm_rc/headers/asn_bit_data.h new file mode 100644 index 0000000..59de7af --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_bit_data.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_BIT_DATA +#define ASN_BIT_DATA + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This structure describes a position inside an incoming PER bit stream. + */ +typedef struct asn_bit_data_s { + const uint8_t *buffer; /* Pointer to the octet stream */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits in the stream */ + size_t moved; /* Number of bits moved through this bit stream */ + int (*refill)(struct asn_bit_data_s *); + void *refill_key; +} asn_bit_data_t; + +/* + * Create a contiguous non-refillable bit data structure. + * Can be freed by FREEMEM(). + */ +asn_bit_data_t *asn_bit_data_new_contiguous(const void *data, size_t size_bits); + +/* + * Extract a small number of bits (<= 31) from the specified PER data pointer. + * This function returns -1 if the specified number of bits could not be + * extracted due to EOD or other conditions. + */ +int32_t asn_get_few_bits(asn_bit_data_t *, int get_nbits); + +/* Undo the immediately preceeding "get_few_bits" operation */ +void asn_get_undo(asn_bit_data_t *, int get_nbits); + +/* + * Extract a large number of bits from the specified PER data pointer. + * This function returns -1 if the specified number of bits could not be + * extracted due to EOD or other conditions. + */ +int asn_get_many_bits(asn_bit_data_t *, uint8_t *dst, int right_align, + int get_nbits); + +/* Non-thread-safe debugging function, don't use it */ +char *asn_bit_data_string(asn_bit_data_t *); + +/* + * This structure supports forming bit output. + */ +typedef struct asn_bit_outp_s { + uint8_t *buffer; /* Pointer into the (tmpspace) */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits left in (tmpspace) */ + uint8_t tmpspace[32]; /* Preliminary storage to hold data */ + int (*output)(const void *data, size_t size, void *op_key); + void *op_key; /* Key for (output) data callback */ + size_t flushed_bytes; /* Bytes already flushed through (output) */ +} asn_bit_outp_t; + +/* Output a small number of bits (<= 31) */ +int asn_put_few_bits(asn_bit_outp_t *, uint32_t bits, int obits); + +/* Output a large number of bits */ +int asn_put_many_bits(asn_bit_outp_t *, const uint8_t *src, int put_nbits); + +/* + * Flush whole bytes (0 or more) through (outper) member. + * The least significant bits which are not used are guaranteed to be set to 0. + * Returns -1 if callback returns -1. Otherwise, 0. + */ +int asn_put_aligned_flush(asn_bit_outp_t *); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_BIT_DATA */ diff --git a/Bouncer/e2sm_rc/headers/asn_codecs.h b/Bouncer/e2sm_rc/headers/asn_codecs.h new file mode 100644 index 0000000..e75c270 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_codecs.h @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_CODECS_H +#define ASN_CODECS_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * This structure defines a set of parameters that may be passed + * to every ASN.1 encoder or decoder function. + * WARNING: if max_stack_size member is set, and you are calling the + * function pointers of the asn_TYPE_descriptor_t directly, + * this structure must be ALLOCATED ON THE STACK! + * If you can't always satisfy this requirement, use ber_decode(), + * xer_decode() and uper_decode() functions instead. + */ +typedef struct asn_codec_ctx_s { + /* + * Limit the decoder routines to use no (much) more stack than a given + * number of bytes. Most of decoders are stack-based, and this + * would protect against stack overflows if the number of nested + * encodings is high. + * The OCTET STRING, BIT STRING and ANY BER decoders are heap-based, + * and are safe from this kind of overflow. + * A value from getrlimit(RLIMIT_STACK) may be used to initialize + * this variable. Be careful in multithreaded environments, as the + * stack size is rather limited. + */ + size_t max_stack_size; /* 0 disables stack bounds checking */ +} asn_codec_ctx_t; + +/* + * Type of the return value of the encoding functions (der_encode, xer_encode). + */ +typedef struct asn_enc_rval_s { + /* + * Number of bytes encoded. + * -1 indicates failure to encode the structure. + * In this case, the members below this one are meaningful. + */ + ssize_t encoded; + + /* + * Members meaningful when (encoded == -1), for post mortem analysis. + */ + + /* Type which cannot be encoded */ + const struct asn_TYPE_descriptor_s *failed_type; + + /* Pointer to the structure of that type */ + const void *structure_ptr; +} asn_enc_rval_t; +#define ASN__ENCODE_FAILED do { \ + asn_enc_rval_t tmp_error; \ + tmp_error.encoded = -1; \ + tmp_error.failed_type = td; \ + tmp_error.structure_ptr = sptr; \ + ASN_DEBUG("Failed to encode element %s", td ? td->name : ""); \ + return tmp_error; \ +} while(0) +#define ASN__ENCODED_OK(rval) do { \ + rval.structure_ptr = 0; \ + rval.failed_type = 0; \ + return rval; \ +} while(0) + +/* + * Type of the return value of the decoding functions (ber_decode, xer_decode) + * + * Please note that the number of consumed bytes is ALWAYS meaningful, + * even if code==RC_FAIL. This is to indicate the number of successfully + * decoded bytes, hence providing a possibility to fail with more diagnostics + * (i.e., print the offending remainder of the buffer). + */ +enum asn_dec_rval_code_e { + RC_OK, /* Decoded successfully */ + RC_WMORE, /* More data expected, call again */ + RC_FAIL /* Failure to decode data */ +}; +typedef struct asn_dec_rval_s { + enum asn_dec_rval_code_e code; /* Result code */ + size_t consumed; /* Number of bytes consumed */ +} asn_dec_rval_t; +#define ASN__DECODE_FAILED do { \ + asn_dec_rval_t tmp_error; \ + tmp_error.code = RC_FAIL; \ + tmp_error.consumed = 0; \ + ASN_DEBUG("Failed to decode element %s", td ? td->name : ""); \ + return tmp_error; \ +} while(0) +#define ASN__DECODE_STARVED do { \ + asn_dec_rval_t tmp_error; \ + tmp_error.code = RC_WMORE; \ + tmp_error.consumed = 0; \ + return tmp_error; \ +} while(0) + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_CODECS_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_codecs_prim.h b/Bouncer/e2sm_rc/headers/asn_codecs_prim.h new file mode 100644 index 0000000..fbc5576 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_codecs_prim.h @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_CODECS_PRIM_H +#define ASN_CODECS_PRIM_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct ASN__PRIMITIVE_TYPE_s { + uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */ + size_t size; /* Size of the buffer */ +} ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ + +asn_struct_free_f ASN__PRIMITIVE_TYPE_free; +ber_type_decoder_f ber_decode_primitive; +der_type_encoder_f der_encode_primitive; + +/* + * A callback specification for the xer_decode_primitive() function below. + */ +enum xer_pbd_rval { + XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */ + XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */ + XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */ + XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */ + XPBD_BODY_CONSUMED /* Body is recognized and consumed */ +}; +typedef enum xer_pbd_rval(xer_primitive_body_decoder_f)( + const asn_TYPE_descriptor_t *td, void *struct_ptr, const void *chunk_buf, + size_t chunk_size); + +/* + * Specific function to decode simple primitive types. + * Also see xer_decode_general() in xer_decoder.h + */ +asn_dec_rval_t xer_decode_primitive( + const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, + size_t struct_size, const char *opt_mname, const void *buf_ptr, size_t size, + xer_primitive_body_decoder_f *prim_body_decoder); + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_CODECS_PRIM_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_constant.h b/Bouncer/e2sm_rc/headers/asn_constant.h new file mode 100644 index 0000000..9340288 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_constant.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + */ + +#ifndef _ASN_CONSTANT_H +#define _ASN_CONSTANT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define maxnoofMessages (65535) +#define maxnoofE2InfoChanges (65535) +#define maxnoofUEInfoChanges (65535) +#define maxnoofRRCstate (8) +#define maxnoofParametersToReport (65535) +#define maxnoofPolicyConditions (65535) +#define maxnoofAssociatedRANParameters (65535) +#define maxnoofUEID (65535) +#define maxnoofCellID (65535) +#define maxnoofRANOutcomeParameters (255) +#define maxnoofParametersinStructure (65535) +#define maxnoofItemsinList (65535) +#define maxnoofUEInfo (65535) +#define maxnoofCellInfo (65535) +#define maxnoofUEeventInfo (65535) +#define maxnoofRANparamTest (255) +#define maxnoofNeighbourCell (65535) +#define maxnoofRICStyles (63) +#define maxnoofCallProcessTypes (65535) +#define maxnoofCallProcessBreakpoints (65535) +#define maxnoofInsertIndication (65535) +#define maxnoofControlAction (65535) +#define maxnoofPolicyAction (65535) +#define maxnoofInsertIndicationActions (63) +#define maxnoofMulCtrlActions (63) +#define maxE1APid (65535) +#define maxF1APid (4) +#define maxEARFCN (65535) +#define maxNRARFCN (3279165) +#define maxnoofNrCellBands (32) + + +#ifdef __cplusplus +} +#endif + +#endif /* _ASN_CONSTANT_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_internal.h b/Bouncer/e2sm_rc/headers/asn_internal.h new file mode 100644 index 0000000..c4105ad --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_internal.h @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Declarations internally useful for the ASN.1 support code. + */ +#ifndef ASN_INTERNAL_H +#define ASN_INTERNAL_H +#define __EXTENSIONS__ /* for Sun */ + +#include "asn_application.h" /* Application-visible API */ + +#ifndef __NO_ASSERT_H__ /* Include assert.h only for internal use. */ +#include /* for assert() macro */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Environment version might be used to avoid running with the old library */ +#define ASN1C_ENVIRONMENT_VERSION 923 /* Compile-time version */ +int get_asn1c_environment_version(void); /* Run-time version */ + +#define CALLOC(nmemb, size) calloc(nmemb, size) +#define MALLOC(size) malloc(size) +#define REALLOC(oldptr, size) realloc(oldptr, size) +#define FREEMEM(ptr) free(ptr) + +#define asn_debug_indent 0 +#define ASN_DEBUG_INDENT_ADD(i) do{}while(0) + +#ifdef EMIT_ASN_DEBUG +#warning "Use ASN_EMIT_DEBUG instead of EMIT_ASN_DEBUG" +#define ASN_EMIT_DEBUG EMIT_ASN_DEBUG +#endif + +/* + * A macro for debugging the ASN.1 internals. + * You may enable or override it. + */ +#ifndef ASN_DEBUG /* If debugging code is not defined elsewhere... */ +#if ASN_EMIT_DEBUG == 1 /* And it was asked to emit this code... */ +#if !defined(BELL_LABS) /* Bell Labs */ + //#if __STDC_VERSION__ >= 199901L +#ifdef ASN_THREAD_SAFE +/* Thread safety requires sacrifice in output indentation: + * Retain empty definition of ASN_DEBUG_INDENT_ADD. */ +#else /* !ASN_THREAD_SAFE */ +#undef ASN_DEBUG_INDENT_ADD +#undef asn_debug_indent +int asn_debug_indent; +#define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += i; } while(0) +#endif /* ASN_THREAD_SAFE */ +#if defined(BELL_LABS) /* Bell Labs version */ +extern int logAsn1c(const char *filename, int linenumber, const char *format, ...); +#define ASN_DEBUG(fmt, args...) do { \ + (void) logAsn1c(__FILE__, __LINE__, fmt, ##args); \ + } while(0) +#else +#define ASN_DEBUG(fmt, args...) do { \ + int adi = asn_debug_indent; \ + while(adi--) fprintf(stderr, " "); \ + fprintf(stderr, fmt, ##args); \ + fprintf(stderr, " (%s:%d)\n", \ + __FILE__, __LINE__); \ + } while(0) +#endif /* BELL_LABS */ +#else /* !C99 */ +void CC_PRINTFLIKE(1, 2) ASN_DEBUG_f(const char *fmt, ...); +#define ASN_DEBUG ASN_DEBUG_f +#endif /* C99 */ +#else /* ASN_EMIT_DEBUG != 1 */ +#if __STDC_VERSION__ >= 199901L +#define ASN_DEBUG(...) do{}while(0) +#else /* not C99 */ +static void CC_PRINTFLIKE(1, 2) ASN_DEBUG(const char *fmt, ...) { (void)fmt; } +#endif /* C99 or better */ +#endif /* ASN_EMIT_DEBUG */ +#endif /* ASN_DEBUG */ + +/* + * Print to a callback. + * The callback is expected to return negative values on error. + * 0 and positive values are treated as success. + * RETURN VALUES: + * -1: Failed to format or invoke the callback. + * >0: Size of the data that got delivered to the callback. + */ +ssize_t CC_PRINTFLIKE(3, 4) +asn__format_to_callback( + int (*callback)(const void *, size_t, void *key), void *key, + const char *fmt, ...); + +/* + * Invoke the application-supplied callback and fail, if something is wrong. + */ +#define ASN__E_cbc(buf, size) (cb((buf), (size), app_key) < 0) +#define ASN__E_CALLBACK(size, foo) \ + do { \ + if(foo) goto cb_failed; \ + er.encoded += (size); \ + } while(0) +#define ASN__CALLBACK(buf, size) ASN__E_CALLBACK(size, ASN__E_cbc(buf, size)) +#define ASN__CALLBACK2(buf1, size1, buf2, size2) \ + ASN__E_CALLBACK((size1) + (size2), \ + ASN__E_cbc(buf1, size1) || ASN__E_cbc(buf2, size2)) +#define ASN__CALLBACK3(buf1, size1, buf2, size2, buf3, size3) \ + ASN__E_CALLBACK((size1) + (size2) + (size3), \ + ASN__E_cbc(buf1, size1) || ASN__E_cbc(buf2, size2) \ + || ASN__E_cbc(buf3, size3)) + +#define ASN__TEXT_INDENT(nl, level) \ + do { \ + int tmp_level = (level); \ + int tmp_nl = ((nl) != 0); \ + int tmp_i; \ + if(tmp_nl) ASN__CALLBACK("\n", 1); \ + if(tmp_level < 0) tmp_level = 0; \ + for(tmp_i = 0; tmp_i < tmp_level; tmp_i++) ASN__CALLBACK(" ", 4); \ + } while(0) + +#define _i_INDENT(nl) do { \ + int tmp_i; \ + if((nl) && cb("\n", 1, app_key) < 0) \ + return -1; \ + for(tmp_i = 0; tmp_i < ilevel; tmp_i++) \ + if(cb(" ", 4, app_key) < 0) \ + return -1; \ + } while(0) + +/* + * Check stack against overflow, if limit is set. + */ +#define ASN__DEFAULT_STACK_MAX (30000) +static int CC_NOTUSED +ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { + if(ctx && ctx->max_stack_size) { + + /* ctx MUST be allocated on the stack */ + ptrdiff_t usedstack = ((const char *)ctx - (const char *)&ctx); + if(usedstack > 0) usedstack = -usedstack; /* grows up! */ + + /* double negative required to avoid int wrap-around */ + if(usedstack < -(ptrdiff_t)ctx->max_stack_size) { + ASN_DEBUG("Stack limit %ld reached", + (long)ctx->max_stack_size); + return -1; + } + } + return 0; +} + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_INTERNAL_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_ioc.h b/Bouncer/e2sm_rc/headers/asn_ioc.h new file mode 100644 index 0000000..7de210e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_ioc.h @@ -0,0 +1,51 @@ +/* + * Run-time support for Information Object Classes. + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_IOC_H +#define ASN_IOC_H + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; +struct asn_ioc_cell_s; + +/* + * X.681, #13 + */ +typedef struct asn_ioc_set_s { + size_t rows_count; + size_t columns_count; + const struct asn_ioc_cell_s *rows; +} asn_ioc_set_t; + + +typedef struct asn_ioc_cell_s { + const char *field_name; /* Is equal to corresponding column_name */ + enum { + aioc__undefined = 0, + aioc__value, + aioc__type, + aioc__open_type, + } cell_kind; + struct asn_TYPE_descriptor_s *type_descriptor; + const void *value_sptr; + struct { + size_t types_count; + struct { + unsigned choice_position; + } *types; + } open_type; +} asn_ioc_cell_t; + + +#ifdef __cplusplus +} +#endif + +#endif /* ASN_IOC_H */ diff --git a/Bouncer/e2sm_rc/headers/asn_random_fill.h b/Bouncer/e2sm_rc/headers/asn_random_fill.h new file mode 100644 index 0000000..47f9b8a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_random_fill.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_RANDOM_FILL +#define ASN_RANDOM_FILL + +/* Forward declarations */ +struct asn_TYPE_descriptor_s; +struct asn_encoding_constraints_s; + +/* + * Initialize a structure with random data according to the type specification + * and optional member constraints. + * ARGUMENTS: + * (max_length) - See (approx_max_length_limit). + * (memb_constraints) - Member constraints, if exist. + * The type can be constrained differently according + * to PER and OER specifications, so we find a value + * at the intersection of these constraints. + * In case the return differs from ARFILL_OK, the (struct_ptr) contents + * and (current_length) value remain in their original state. + */ +typedef struct asn_random_fill_result_s { + enum { + ARFILL_FAILED = -1, /* System error (memory?) */ + ARFILL_OK = 0, /* Initialization succeeded */ + ARFILL_SKIPPED = 1 /* Not done due to (length?) constraint */ + } code; + size_t length; /* Approximate number of bytes created. */ +} asn_random_fill_result_t; +typedef asn_random_fill_result_t(asn_random_fill_f)( + const struct asn_TYPE_descriptor_s *td, void **struct_ptr, + const struct asn_encoding_constraints_s *memb_constraints, + size_t max_length); + +/* + * Returns 0 if the structure was properly initialized, -1 otherwise. + * The (approx_max_length_limit) specifies the approximate limit of the + * resulting structure in units closely resembling bytes. The actual result + * might be several times larger or smaller than the length limit. + */ +int asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr, + size_t approx_max_length_limit); + +/* + * Returns a random number between min and max. + */ +intmax_t asn_random_between(intmax_t min, intmax_t max); + +#endif /* ASN_RANDOM_FILL */ diff --git a/Bouncer/e2sm_rc/headers/asn_system.h b/Bouncer/e2sm_rc/headers/asn_system.h new file mode 100644 index 0000000..fa8cf11 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/asn_system.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Miscellaneous system-dependent types. + */ +#ifndef ASN_SYSTEM_H +#define ASN_SYSTEM_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE 1 +#endif + +#ifndef _BSD_SOURCE +#define _BSD_SOURCE /* for snprintf() on some linux systems */ +#endif + +#include /* For snprintf(3) */ +#include /* For *alloc(3) */ +#include /* For memcpy(3) */ +#include /* For size_t */ +#include /* For LONG_MAX */ +#include /* For va_start */ +#include /* for offsetof and ptrdiff_t */ + +#ifdef _WIN32 + +#include +#define snprintf _snprintf +#define vsnprintf _vsnprintf + +/* To avoid linking with ws2_32.lib, here's the definition of ntohl() */ +#define sys_ntohl(l) ((((l) << 24) & 0xff000000) \ + | (((l) << 8) & 0xff0000) \ + | (((l) >> 8) & 0xff00) \ + | ((l >> 24) & 0xff)) + +#ifdef _MSC_VER /* MSVS.Net */ +#ifndef __cplusplus +#define inline __inline +#endif +#ifndef ASSUMESTDTYPES /* Standard types have been defined elsewhere */ +#define ssize_t SSIZE_T +#if _MSC_VER < 1600 +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#else /* _MSC_VER >= 1600 */ +#include +#endif /* _MSC_VER < 1600 */ +#endif /* ASSUMESTDTYPES */ +#define WIN32_LEAN_AND_MEAN +#include +#include +#define isnan _isnan +#define finite _finite +#define copysign _copysign +#define ilogb _logb +#else /* !_MSC_VER */ +#include +#endif /* _MSC_VER */ + +#else /* !_WIN32 */ + +#if defined(__vxworks) +#include +#else /* !defined(__vxworks) */ + +#include /* C99 specifies this file */ +#include /* for ntohl() */ +#define sys_ntohl(foo) ntohl(foo) +#endif /* defined(__vxworks) */ + +#endif /* _WIN32 */ + +#if __GNUC__ >= 3 || defined(__clang__) +#define CC_ATTRIBUTE(attr) __attribute__((attr)) +#else +#define CC_ATTRIBUTE(attr) +#endif +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(printf, fmt, var)) +#define CC_NOTUSED CC_ATTRIBUTE(unused) +#ifndef CC_ATTR_NO_SANITIZE +#define CC_ATTR_NO_SANITIZE(what) CC_ATTRIBUTE(no_sanitize(what)) +#endif + +/* Figure out if thread safety is requested */ +#if !defined(ASN_THREAD_SAFE) && (defined(THREAD_SAFE) || defined(_REENTRANT)) +#define ASN_THREAD_SAFE +#endif /* Thread safety */ + +#ifndef offsetof /* If not defined by */ +#define offsetof(s, m) ((ptrdiff_t)&(((s *)0)->m) - (ptrdiff_t)((s *)0)) +#endif /* offsetof */ + +#ifndef MIN /* Suitable for comparing primitive types (integers) */ +#if defined(__GNUC__) +#define MIN(a,b) ({ __typeof a _a = a; __typeof b _b = b; \ + ((_a)<(_b)?(_a):(_b)); }) +#else /* !__GNUC__ */ +#define MIN(a,b) ((a)<(b)?(a):(b)) /* Unsafe variant */ +#endif /* __GNUC__ */ +#endif /* MIN */ + +#if __STDC_VERSION__ >= 199901L +#ifndef SIZE_MAX +#define SIZE_MAX ((~((size_t)0)) >> 1) +#endif + +#ifndef RSIZE_MAX /* C11, Annex K */ +#define RSIZE_MAX (SIZE_MAX >> 1) +#endif +#ifndef RSSIZE_MAX /* Halve signed size even further than unsigned */ +#define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1)) +#endif +#else /* Old compiler */ +#undef SIZE_MAX +#undef RSIZE_MAX +#undef RSSIZE_MAX +#define SIZE_MAX ((~((size_t)0)) >> 1) +#define RSIZE_MAX (SIZE_MAX >> 1) +#define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1)) +#endif + +#if __STDC_VERSION__ >= 199901L +#define ASN_PRI_SIZE "zu" +#define ASN_PRI_SSIZE "zd" +#define ASN_PRIuMAX PRIuMAX +#define ASN_PRIdMAX PRIdMAX +#else +#define ASN_PRI_SIZE "lu" +#define ASN_PRI_SSIZE "ld" +#if LLONG_MAX > LONG_MAX +#define ASN_PRIuMAX "llu" +#define ASN_PRIdMAX "lld" +#else +#define ASN_PRIuMAX "lu" +#define ASN_PRIdMAX "ld" +#endif +#endif + +#endif /* ASN_SYSTEM_H */ diff --git a/Bouncer/e2sm_rc/headers/ber_decoder.h b/Bouncer/e2sm_rc/headers/ber_decoder.h new file mode 100644 index 0000000..1ac2a5e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ber_decoder.h @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BER_DECODER_H_ +#define _BER_DECODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ +struct asn_codec_ctx_s; /* Forward declaration */ + +/* + * The BER decoder of any type. + * This function may be invoked directly from the application. + * Decodes BER, DER and CER data (DER and CER are different subsets of BER). + * + * NOTE: Use the der_encode() function (der_encoder.h) to produce encoding + * which is compliant with ber_decode(). + */ +asn_dec_rval_t ber_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ +); + +/* + * Type of generic function which decodes the byte stream into the structure. + */ +typedef asn_dec_rval_t(ber_type_decoder_f)( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, + const void *buf_ptr, size_t size, int tag_mode); + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +/* + * Check that all tags correspond to the type definition (as given in head). + * On return, last_length would contain either a non-negative length of the + * value part of the last TLV, or the negative number of expected + * "end of content" sequences. The number may only be negative if the + * head->last_tag_form is non-zero. + */ +asn_dec_rval_t ber_check_tags( + const struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ + const struct asn_TYPE_descriptor_s *type_descriptor, + asn_struct_ctx_t *opt_ctx, /* saved decoding context */ + const void *ptr, size_t size, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {-1,0:1}: any, primitive, constr */ + ber_tlv_len_t *last_length, int *opt_tlv_form /* optional tag form */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _BER_DECODER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/ber_tlv_length.h b/Bouncer/e2sm_rc/headers/ber_tlv_length.h new file mode 100644 index 0000000..d1e4d48 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ber_tlv_length.h @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BER_TLV_LENGTH_H_ +#define _BER_TLV_LENGTH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ssize_t ber_tlv_len_t; + +/* + * This function tries to fetch the length of the BER TLV value and place it + * in *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + * On return with >0, len_r is constrained as -1..MAX, where -1 mean + * that the value is of indefinite length. + */ +ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, + ber_tlv_len_t *len_r); + +/* + * This function expects bufptr to be positioned over L in TLV. + * It returns number of bytes occupied by L and V together, suitable + * for skipping. The function properly handles indefinite length. + * RETURN VALUES: + * Standard {-1,0,>0} convention. + */ +ssize_t ber_skip_length( + const struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ + int _is_constructed, const void *bufptr, size_t size); + +/* + * This function serializes the length (L from TLV) in DER format. + * It always returns number of bytes necessary to represent the length, + * it is a caller's responsibility to check the return value + * against the supplied buffer's size. + */ +size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); + +#ifdef __cplusplus +} +#endif + +#endif /* _BER_TLV_LENGTH_H_ */ diff --git a/Bouncer/e2sm_rc/headers/ber_tlv_tag.h b/Bouncer/e2sm_rc/headers/ber_tlv_tag.h new file mode 100644 index 0000000..ce227ad --- /dev/null +++ b/Bouncer/e2sm_rc/headers/ber_tlv_tag.h @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _BER_TLV_TAG_H_ +#define _BER_TLV_TAG_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum asn_tag_class { + ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ + ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ + ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ + ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ +}; +typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ + +/* + * Tag class is encoded together with tag value for optimization purposes. + */ +#define BER_TAG_CLASS(tag) ((tag) & 0x3) +#define BER_TAG_VALUE(tag) ((tag) >> 2) +#define BER_TLV_CONSTRUCTED(tagptr) (((*(const uint8_t *)tagptr)&0x20)?1:0) + +#define BER_TAGS_EQUAL(tag1, tag2) ((tag1) == (tag2)) + +/* + * Several functions for printing the TAG in the canonical form + * (i.e. "[PRIVATE 0]"). + * Return values correspond to their libc counterparts (if any). + */ +ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); +ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); +char *ber_tlv_tag_string(ber_tlv_tag_t tag); + + +/* + * This function tries to fetch the tag from the input stream. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering tag. + * >0: Number of bytes used from bufptr. tag_r will contain the tag. + */ +ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); + +/* + * This function serializes the tag (T from TLV) in BER format. + * It always returns number of bytes necessary to represent the tag, + * it is a caller's responsibility to check the return value + * against the supplied buffer's size. + */ +size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); + +#ifdef __cplusplus +} +#endif + +#endif /* _BER_TLV_TAG_H_ */ diff --git a/Bouncer/e2sm_rc/headers/constr_CHOICE.h b/Bouncer/e2sm_rc/headers/constr_CHOICE.h new file mode 100644 index 0000000..a1999ed --- /dev/null +++ b/Bouncer/e2sm_rc/headers/constr_CHOICE.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _CONSTR_CHOICE_H_ +#define _CONSTR_CHOICE_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_CHOICE_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the target structure. */ + unsigned ctx_offset; /* Offset of the asn_codec_ctx_t member */ + unsigned pres_offset; /* Identifier of the present member */ + unsigned pres_size; /* Size of the identifier (enum) */ + + /* + * Tags to members mapping table. + */ + const asn_TYPE_tag2member_t *tag2el; + unsigned tag2el_count; + + /* Canonical ordering of CHOICE elements, for PER */ + const unsigned *to_canonical_order; + const unsigned *from_canonical_order; + + /* + * Extensions-related stuff. + */ + signed ext_start; /* First member of extensions, or -1 */ +} asn_CHOICE_specifics_t; + +/* + * A set specialized functions dealing with the CHOICE type. + */ +asn_struct_free_f CHOICE_free; +asn_struct_print_f CHOICE_print; +asn_struct_compare_f CHOICE_compare; +asn_constr_check_f CHOICE_constraint; +ber_type_decoder_f CHOICE_decode_ber; +der_type_encoder_f CHOICE_encode_der; +xer_type_decoder_f CHOICE_decode_xer; +xer_type_encoder_f CHOICE_encode_xer; +oer_type_decoder_f CHOICE_decode_oer; +oer_type_encoder_f CHOICE_encode_oer; +per_type_decoder_f CHOICE_decode_uper; +per_type_encoder_f CHOICE_encode_uper; +per_type_decoder_f CHOICE_decode_aper; +per_type_encoder_f CHOICE_encode_aper; +asn_outmost_tag_f CHOICE_outmost_tag; +asn_random_fill_f CHOICE_random_fill; +extern asn_TYPE_operation_t asn_OP_CHOICE; + +/* + * Return the 1-based choice variant presence index. + * Returns 0 in case of error. + */ +unsigned CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, + const void *structure_ptr); + +/* + * Sets or resets the 1-based choice variant presence index. + * In case a previous index is not zero, the currently selected structure + * member is freed and zeroed-out first. + * Returns 0 on success and -1 on error. + */ +int CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, + void *structure_ptr, unsigned present); + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_CHOICE_H_ */ diff --git a/Bouncer/e2sm_rc/headers/constr_SEQUENCE.h b/Bouncer/e2sm_rc/headers/constr_SEQUENCE.h new file mode 100644 index 0000000..a22ed3a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/constr_SEQUENCE.h @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _CONSTR_SEQUENCE_H_ +#define _CONSTR_SEQUENCE_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_SEQUENCE_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the target structure. */ + unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ + + /* + * Tags to members mapping table (sorted). + */ + const asn_TYPE_tag2member_t *tag2el; + unsigned tag2el_count; + + /* + * Optional members of the extensions root (roms) or additions (aoms). + * Meaningful for PER. + */ + const int *oms; /* Optional MemberS */ + unsigned roms_count; /* Root optional members count */ + unsigned aoms_count; /* Additions optional members count */ + + /* + * Description of an extensions group. + * Root components are clustered at the beginning of the structure, + * whereas extensions are clustered at the end. -1 means not extensible. + */ + signed first_extension; /* First extension addition */ +} asn_SEQUENCE_specifics_t; + + +/* + * A set specialized functions dealing with the SEQUENCE type. + */ +asn_struct_free_f SEQUENCE_free; +asn_struct_print_f SEQUENCE_print; +asn_struct_compare_f SEQUENCE_compare; +asn_constr_check_f SEQUENCE_constraint; +ber_type_decoder_f SEQUENCE_decode_ber; +der_type_encoder_f SEQUENCE_encode_der; +xer_type_decoder_f SEQUENCE_decode_xer; +xer_type_encoder_f SEQUENCE_encode_xer; +oer_type_decoder_f SEQUENCE_decode_oer; +oer_type_encoder_f SEQUENCE_encode_oer; +per_type_decoder_f SEQUENCE_decode_uper; +per_type_encoder_f SEQUENCE_encode_uper; +per_type_decoder_f SEQUENCE_decode_aper; +per_type_encoder_f SEQUENCE_encode_aper; +asn_random_fill_f SEQUENCE_random_fill; +extern asn_TYPE_operation_t asn_OP_SEQUENCE; + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_SEQUENCE_H_ */ diff --git a/Bouncer/e2sm_rc/headers/constr_SEQUENCE_OF.h b/Bouncer/e2sm_rc/headers/constr_SEQUENCE_OF.h new file mode 100644 index 0000000..6857f0f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/constr_SEQUENCE_OF.h @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _CONSTR_SEQUENCE_OF_H_ +#define _CONSTR_SEQUENCE_OF_H_ + +#include +#include /* Implemented using SET OF */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * A set specialized functions dealing with the SEQUENCE OF type. + * Generally implemented using SET OF. + */ +asn_struct_compare_f SEQUENCE_OF_compare; +der_type_encoder_f SEQUENCE_OF_encode_der; +xer_type_encoder_f SEQUENCE_OF_encode_xer; +per_type_encoder_f SEQUENCE_OF_encode_uper; +per_type_encoder_f SEQUENCE_OF_encode_aper; +extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF; + +#define SEQUENCE_OF_free SET_OF_free +#define SEQUENCE_OF_print SET_OF_print +#define SEQUENCE_OF_constraint SET_OF_constraint +#define SEQUENCE_OF_decode_ber SET_OF_decode_ber +#define SEQUENCE_OF_decode_xer SET_OF_decode_xer +#define SEQUENCE_OF_decode_oer SET_OF_decode_oer +#define SEQUENCE_OF_encode_oer SET_OF_encode_oer +#define SEQUENCE_OF_decode_uper SET_OF_decode_uper +#define SEQUENCE_OF_decode_aper SET_OF_decode_aper +#define SEQUENCE_OF_random_fill SET_OF_random_fill + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_SET_OF_H_ */ diff --git a/Bouncer/e2sm_rc/headers/constr_SET_OF.h b/Bouncer/e2sm_rc/headers/constr_SET_OF.h new file mode 100644 index 0000000..7681062 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/constr_SET_OF.h @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef CONSTR_SET_OF_H +#define CONSTR_SET_OF_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct asn_SET_OF_specifics_s { + /* + * Target structure description. + */ + unsigned struct_size; /* Size of the target structure. */ + unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ + + /* XER-specific stuff */ + int as_XMLValueList; /* The member type must be encoded like this */ +} asn_SET_OF_specifics_t; + +/* + * A set specialized functions dealing with the SET OF type. + */ +asn_struct_free_f SET_OF_free; +asn_struct_print_f SET_OF_print; +asn_struct_compare_f SET_OF_compare; +asn_constr_check_f SET_OF_constraint; +ber_type_decoder_f SET_OF_decode_ber; +der_type_encoder_f SET_OF_encode_der; +xer_type_decoder_f SET_OF_decode_xer; +xer_type_encoder_f SET_OF_encode_xer; +oer_type_decoder_f SET_OF_decode_oer; +oer_type_encoder_f SET_OF_encode_oer; +per_type_decoder_f SET_OF_decode_uper; +per_type_encoder_f SET_OF_encode_uper; +per_type_decoder_f SET_OF_decode_aper; +per_type_encoder_f SET_OF_encode_aper; +asn_random_fill_f SET_OF_random_fill; +extern asn_TYPE_operation_t asn_OP_SET_OF; + +#ifdef __cplusplus +} +#endif + +#endif /* CONSTR_SET_OF_H */ diff --git a/Bouncer/e2sm_rc/headers/constr_TYPE.h b/Bouncer/e2sm_rc/headers/constr_TYPE.h new file mode 100644 index 0000000..d80dea5 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/constr_TYPE.h @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * This file contains the declaration structure called "ASN.1 Type Definition", + * which holds all information necessary for encoding and decoding routines. + * This structure even contains pointer to these encoding and decoding routines + * for each defined ASN.1 type. + */ +#ifndef _CONSTR_TYPE_H_ +#define _CONSTR_TYPE_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ +struct asn_TYPE_member_s; /* Forward declaration */ + +/* + * This type provides the context information for various ASN.1 routines, + * primarily ones doing decoding. A member _asn_ctx of this type must be + * included into certain target language's structures, such as compound types. + */ +typedef struct asn_struct_ctx_s { + short phase; /* Decoding phase */ + short step; /* Elementary step of a phase */ + int context; /* Other context information */ + void *ptr; /* Decoder-specific stuff (stack elements) */ + ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ +} asn_struct_ctx_t; + +#include /* Basic Encoding Rules decoder */ +#include /* Distinguished Encoding Rules encoder */ +#include /* Decoder of XER (XML, text) */ +#include /* Encoder into XER (XML, text) */ +#include /* Packet Encoding Rules decoder */ +#include /* Packet Encoding Rules encoder */ +#include /* Subtype constraints support */ +#include /* Random structures support */ + +#ifdef ASN_DISABLE_OER_SUPPORT +typedef void (oer_type_decoder_f)(void); +typedef void (oer_type_encoder_f)(void); +typedef void asn_oer_constraints_t; +#else +#include /* Octet Encoding Rules encoder */ +#include /* Octet Encoding Rules encoder */ +#endif + +/* + * Free the structure according to its specification. + * Use one of ASN_STRUCT_{FREE,RESET,CONTENTS_ONLY} macros instead. + * Do not use directly. + */ +enum asn_struct_free_method { + ASFM_FREE_EVERYTHING, /* free(struct_ptr) and underlying members */ + ASFM_FREE_UNDERLYING, /* free underlying members */ + ASFM_FREE_UNDERLYING_AND_RESET /* FREE_UNDERLYING + memset(0) */ +}; +typedef void (asn_struct_free_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, enum asn_struct_free_method); + +/* + * Free the structure including freeing the memory pointed to by ptr itself. + */ +#define ASN_STRUCT_FREE(asn_DEF, ptr) \ + (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_EVERYTHING) + +/* + * Free the memory used by the members of the structure without freeing the + * the structure pointer itself. + * ZERO-OUT the structure to the safe clean state. + * (Retaining the pointer may be useful in case the structure is allocated + * statically or arranged on the stack, yet its elements are dynamic.) + */ +#define ASN_STRUCT_RESET(asn_DEF, ptr) \ + (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_UNDERLYING_AND_RESET) + +/* + * Free memory used by the members of the structure without freeing + * the structure pointer itself. + * (Retaining the pointer may be useful in case the structure is allocated + * statically or arranged on the stack, yet its elements are dynamic.) + * AVOID using it in the application code; + * Use a safer ASN_STRUCT_RESET() instead. + */ +#define ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF, ptr) \ + (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_UNDERLYING) + +/* + * Print the structure according to its specification. + */ +typedef int(asn_struct_print_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, + int level, /* Indentation level */ + asn_app_consume_bytes_f *callback, void *app_key); + +/* + * Compare two structs between each other. + * Returns <0 if struct_A is "smaller" than struct_B, >0 if "greater", + * and =0 if "equal to", for some type-specific, stable definition of + * "smaller", "greater" and "equal to". + */ +typedef int (asn_struct_compare_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_A, + const void *struct_B); + +/* + * Return the outmost tag of the type. + * If the type is untagged CHOICE, the dynamic operation is performed. + * NOTE: This function pointer type is only useful internally. + * Do not use it in your application. + */ +typedef ber_tlv_tag_t (asn_outmost_tag_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag); +/* The instance of the above function type; used internally. */ +asn_outmost_tag_f asn_TYPE_outmost_tag; + +/* + * Fetch the desired type of the Open Type based on the + * Information Object Set driven constraints. + */ +typedef struct asn_type_selector_result_s { + const struct asn_TYPE_descriptor_s *type_descriptor; /* Type encoded. */ + unsigned presence_index; /* Associated choice variant. */ +} asn_type_selector_result_t; +typedef asn_type_selector_result_t(asn_type_selector_f)( + const struct asn_TYPE_descriptor_s *parent_type_descriptor, + const void *parent_structure_ptr); + +/* + * Generalized functions for dealing with the speciic type. + * May be directly invoked by applications. + */ +typedef struct asn_TYPE_operation_s { + asn_struct_free_f *free_struct; /* Free the structure */ + asn_struct_print_f *print_struct; /* Human readable output */ + asn_struct_compare_f *compare_struct; /* Compare two structures */ + ber_type_decoder_f *ber_decoder; /* Generic BER decoder */ + der_type_encoder_f *der_encoder; /* Canonical DER encoder */ + xer_type_decoder_f *xer_decoder; /* Generic XER decoder */ + xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */ + oer_type_decoder_f *oer_decoder; /* Generic OER decoder */ + oer_type_encoder_f *oer_encoder; /* Canonical OER encoder */ + per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */ + per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */ + per_type_decoder_f *aper_decoder; /* Aligned PER decoder */ + per_type_encoder_f *aper_encoder; /* Aligned PER encoder */ + asn_random_fill_f *random_fill; /* Initialize with a random value */ + asn_outmost_tag_f *outmost_tag; /* */ +} asn_TYPE_operation_t; + +/* + * A constraints tuple specifying both the OER and PER constraints. + */ +typedef struct asn_encoding_constraints_s { + const struct asn_oer_constraints_s *oer_constraints; + const struct asn_per_constraints_s *per_constraints; + asn_constr_check_f *general_constraints; +} asn_encoding_constraints_t; + +/* + * The definitive description of the destination language's structure. + */ +typedef struct asn_TYPE_descriptor_s { + const char *name; /* A name of the ASN.1 type. "" in some cases. */ + const char *xml_tag; /* Name used in XML tag */ + + /* + * Generalized functions for dealing with the specific type. + * May be directly invoked by applications. + */ + asn_TYPE_operation_t *op; + + /*********************************************************************** + * Internally useful members. Not to be used by applications directly. * + **********************************************************************/ + + /* + * Tags that are expected to occur. + */ + const ber_tlv_tag_t *tags; /* Effective tags sequence for this type */ + unsigned tags_count; /* Number of tags which are expected */ + const ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */ + unsigned all_tags_count; /* Number of tags */ + + /* OER, PER, and general constraints */ + asn_encoding_constraints_t encoding_constraints; + + /* + * An ASN.1 production type members (members of SEQUENCE, SET, CHOICE). + */ + struct asn_TYPE_member_s *elements; + unsigned elements_count; + + /* + * Additional information describing the type, used by appropriate + * functions above. + */ + const void *specifics; +} asn_TYPE_descriptor_t; + +/* + * This type describes an element of the constructed type, + * i.e. SEQUENCE, SET, CHOICE, etc. + */ + enum asn_TYPE_flags_e { + ATF_NOFLAGS, + ATF_POINTER = 0x01, /* Represented by the pointer */ + ATF_OPEN_TYPE = 0x02, /* Open Type */ + ATF_ANY_TYPE = 0x04 /* ANY type (deprecated!) */ + }; +typedef struct asn_TYPE_member_s { + enum asn_TYPE_flags_e flags; /* Element's presentation flags */ + unsigned optional; /* Following optional members, including current */ + unsigned memb_offset; /* Offset of the element */ + ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ + int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ + asn_TYPE_descriptor_t *type; /* Member type descriptor */ + asn_type_selector_f *type_selector; /* IoS runtime type selector */ + asn_encoding_constraints_t encoding_constraints; + int (*default_value_cmp)(const void *sptr); /* Compare DEFAULT */ + int (*default_value_set)(void **sptr); /* Set DEFAULT */ + const char *name; /* ASN.1 identifier of the element */ +} asn_TYPE_member_t; + +/* + * BER tag to element number mapping. + */ +typedef struct asn_TYPE_tag2member_s { + ber_tlv_tag_t el_tag; /* Outmost tag of the member */ + unsigned el_no; /* Index of the associated member, base 0 */ + int toff_first; /* First occurence of the el_tag, relative */ + int toff_last; /* Last occurence of the el_tag, relative */ +} asn_TYPE_tag2member_t; + +/* + * This function prints out the contents of the target language's structure + * (struct_ptr) into the file pointer (stream) in human readable form. + * RETURN VALUES: + * 0: The structure is printed. + * -1: Problem dumping the structure. + * (See also xer_fprint() in xer_encoder.h) + */ +int asn_fprint(FILE *stream, /* Destination stream descriptor */ + const asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ + const void *struct_ptr); /* Structure to be printed */ + +#ifdef __cplusplus +} +#endif + +#endif /* _CONSTR_TYPE_H_ */ diff --git a/Bouncer/e2sm_rc/headers/constraints.h b/Bouncer/e2sm_rc/headers/constraints.h new file mode 100644 index 0000000..0bd86a9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/constraints.h @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN1_CONSTRAINTS_VALIDATOR_H +#define ASN1_CONSTRAINTS_VALIDATOR_H + +#include /* Platform-dependent types */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Validate the structure according to the ASN.1 constraints. + * If errbuf and errlen are given, they shall be pointing to the appropriate + * buffer space and its length before calling this function. Alternatively, + * they could be passed as NULL's. If constraints validation fails, + * errlen will contain the actual number of bytes taken from the errbuf + * to encode an error message (properly 0-terminated). + * + * RETURN VALUES: + * This function returns 0 in case all ASN.1 constraints are met + * and -1 if one or more constraints were failed. + */ +int asn_check_constraints( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Target language's structure */ + char *errbuf, /* Returned error description */ + size_t *errlen /* Length of the error description */ +); + + +/* + * Generic type for constraint checking callback, + * associated with every type descriptor. + */ +typedef int(asn_constr_check_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, + asn_app_constraint_failed_f *optional_callback, /* Log the error */ + void *optional_app_key /* Opaque key passed to a callback */ +); + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ +asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ + +/* + * Invoke the callback with a complete error message. + */ +#define ASN__CTFAIL if(ctfailcb) ctfailcb + +#ifdef __cplusplus +} +#endif + +#endif /* ASN1_CONSTRAINTS_VALIDATOR_H */ diff --git a/Bouncer/e2sm_rc/headers/der_encoder.h b/Bouncer/e2sm_rc/headers/der_encoder.h new file mode 100644 index 0000000..e93944e --- /dev/null +++ b/Bouncer/e2sm_rc/headers/der_encoder.h @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _DER_ENCODER_H_ +#define _DER_ENCODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * The DER encoder of any type. May be invoked by the application. + * Produces DER- and BER-compliant encoding. (DER is a subset of BER). + * + * NOTE: Use the ber_decode() function (ber_decoder.h) to decode data + * produced by der_encode(). + */ +asn_enc_rval_t der_encode(const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ +); + +/* A variant of der_encode() which encodes data into the pre-allocated buffer */ +asn_enc_rval_t der_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +); + +/* + * Type of the generic DER encoder. + */ +typedef asn_enc_rval_t(der_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + ber_tlv_tag_t tag, asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +/* + * Write out leading TL[v] sequence according to the type definition. + */ +ssize_t der_write_tags(const struct asn_TYPE_descriptor_s *type_descriptor, + size_t struct_length, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {0,!0}: prim, constructed */ + ber_tlv_tag_t tag, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key); + +#ifdef __cplusplus +} +#endif + +#endif /* _DER_ENCODER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/oer_decoder.h b/Bouncer/e2sm_rc/headers/oer_decoder.h new file mode 100644 index 0000000..40992e9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/oer_decoder.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_DECODER_H +#define OER_DECODER_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ +struct asn_codec_ctx_s; /* Forward declaration */ + +/* + * The Octet Encoding Rules (OER, X.696 08/2015) decoder for any given type. + * This function may be invoked directly by the application. + * Parses CANONICAL-OER and BASIC-OER. + */ +asn_dec_rval_t oer_decode(const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ + ); + +/* + * Type of generic function which decodes the byte stream into the structure. + */ +typedef asn_dec_rval_t(oer_type_decoder_f)( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + void **struct_ptr, + const void *buf_ptr, + size_t size); + +/* + * Swallow the Open Type (X.696 (08/2015), #30) into /dev/null. + * RETURN VALUES: + * -1: Fatal error deciphering length. + * 0: More data expected than bufptr contains. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_open_type_skip(const void *bufptr, size_t size); + +/* + * Read the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, + void **struct_ptr, const void *bufptr, size_t size); + +/* + * Length-prefixed buffer decoding for primitive types. + */ +oer_type_decoder_f oer_decode_primitive; + + +#ifdef __cplusplus +} +#endif + +#endif /* OER_DECODER_H */ diff --git a/Bouncer/e2sm_rc/headers/oer_encoder.h b/Bouncer/e2sm_rc/headers/oer_encoder.h new file mode 100644 index 0000000..6a7b681 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/oer_encoder.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_ENCODER_H +#define OER_ENCODER_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * The Octet Encoding Rules (OER, X.696 08/2015) encoder for any type. + * This function may be invoked directly by the application. + * Produces CANONICAL-OER output compatible with CANONICAL-OER + * and BASIC-OER decoders. + */ +asn_enc_rval_t oer_encode(const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ +); + +/* A variant of oer_encode() which encodes data into the pre-allocated buffer */ +asn_enc_rval_t oer_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +); + +/* + * Type of the generic OER encoder. + */ +typedef asn_enc_rval_t(oer_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + +/* + * Write out the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * -1: Fatal error encoding the type. + * >0: Number of bytes serialized. + */ +ssize_t oer_open_type_put(const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key); + + +/* + * Length-prefixed buffer encoding for primitive types. + */ +oer_type_encoder_f oer_encode_primitive; + +#ifdef __cplusplus +} +#endif + +#endif /* OER_ENCODER_H */ diff --git a/Bouncer/e2sm_rc/headers/oer_support.h b/Bouncer/e2sm_rc/headers/oer_support.h new file mode 100644 index 0000000..dbc9b5f --- /dev/null +++ b/Bouncer/e2sm_rc/headers/oer_support.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef OER_SUPPORT_H +#define OER_SUPPORT_H + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Pre-computed OER constraints. + */ +typedef struct asn_oer_constraint_number_s { + unsigned width; /* ±8,4,2,1 fixed bytes */ + unsigned positive; /* 1 for unsigned number, 0 for signed */ +} asn_oer_constraint_number_t; +typedef struct asn_oer_constraints_s { + asn_oer_constraint_number_t value; + ssize_t size; /* -1 (no constraint) or >= 0 */ +} asn_oer_constraints_t; + + +/* + * Fetch the length determinant (X.696 (08/2015), #8.6) into *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t oer_fetch_length(const void *bufptr, size_t size, size_t *len_r); + +/* + * Serialize OER length. Returns the number of bytes serialized + * or -1 if a given callback returned with negative result. + */ +ssize_t oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, void *app_key); + + +#ifdef __cplusplus +} +#endif + +#endif /* OER_SUPPORT_H */ diff --git a/Bouncer/e2sm_rc/headers/per_decoder.h b/Bouncer/e2sm_rc/headers/per_decoder.h new file mode 100644 index 0000000..eea474a --- /dev/null +++ b/Bouncer/e2sm_rc/headers/per_decoder.h @@ -0,0 +1,82 @@ +/*- + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_DECODER_H_ +#define _PER_DECODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Unaligned PER decoder of a "complete encoding" as per X.691 (08/2015) #11.1. + * On success, this call always returns (.consumed >= 1), as per #11.1.3. + */ +asn_dec_rval_t uper_decode_complete( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ +); + +/* + * Unaligned PER decoder of any ASN.1 type. May be invoked by the application. + * WARNING: This call returns the number of BITS read from the stream. Beware. + */ +asn_dec_rval_t uper_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size, /* Size of the input data buffer, in bytes */ + int skip_bits, /* Number of unused leading bits, 0..7 */ + int unused_bits /* Number of unused tailing bits, 0..7 */ +); + +/* + * Aligned PER decoder of a "complete encoding" as per X.691#10.1. + * On success, this call always returns (.consumed >= 1), in BITS, as per X.691#10.1.3. + */ +asn_dec_rval_t aper_decode_complete( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ + ); + +/* + * Aligned PER decoder of any ASN.1 type. May be invoked by the application. + * WARNING: This call returns the number of BITS read from the stream. Beware. + */ +asn_dec_rval_t aper_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size, /* Size of data buffer */ + int skip_bits, /* Number of unused leading bits, 0..7 */ + int unused_bits /* Number of unused tailing bits, 0..7 */ + ); + +/* + * Type of the type-specific PER decoder function. + */ +typedef asn_dec_rval_t(per_type_decoder_f)( + const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, void **struct_ptr, + asn_per_data_t *per_data); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_DECODER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/per_encoder.h b/Bouncer/e2sm_rc/headers/per_encoder.h new file mode 100644 index 0000000..b615ef0 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/per_encoder.h @@ -0,0 +1,93 @@ +/*- + * Copyright (c) 2006-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_ENCODER_H_ +#define _PER_ENCODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Unaligned PER encoder of any ASN.1 type. May be invoked by the application. + * WARNING: This function returns the number of encoded bits in the .encoded + * field of the return value. Use the following formula to convert to bytes: + * bytes = ((.encoded + 7) / 8) + */ +asn_enc_rval_t uper_encode( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ + void *app_key /* Arbitrary callback argument */ +); + +asn_enc_rval_t aper_encode( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ + void *app_key /* Arbitrary callback argument */ +); + +/* + * A variant of uper_encode() which encodes data into the existing buffer + * WARNING: This function returns the number of encoded bits in the .encoded + * field of the return value. + */ +asn_enc_rval_t uper_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (max) */ +); + +asn_enc_rval_t aper_encode_to_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (max) */ +); +/* + * A variant of uper_encode_to_buffer() which allocates buffer itself. + * Returns the number of bytes in the buffer or -1 in case of failure. + * WARNING: This function produces a "Production of the complete encoding", + * with length of at least one octet. Contrast this to precise bit-packing + * encoding of uper_encode() and uper_encode_to_buffer(). + */ +ssize_t uper_encode_to_new_buffer( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void **buffer_r /* Buffer allocated and returned */ +); + +ssize_t +aper_encode_to_new_buffer( + const struct asn_TYPE_descriptor_s *td, + const asn_per_constraints_t *constraints, + const void *sptr, + void **buffer_r +); + +/* + * Type of the generic PER encoder function. + */ +typedef asn_enc_rval_t(per_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const asn_per_constraints_t *constraints, const void *struct_ptr, + asn_per_outp_t *per_output); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_ENCODER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/per_opentype.h b/Bouncer/e2sm_rc/headers/per_opentype.h new file mode 100644 index 0000000..1493b2d --- /dev/null +++ b/Bouncer/e2sm_rc/headers/per_opentype.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2007-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_OPENTYPE_H_ +#define _PER_OPENTYPE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +asn_dec_rval_t uper_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd); + +int uper_open_type_skip(const asn_codec_ctx_t *opt_codec_ctx, + asn_per_data_t *pd); + +/* + * X.691 (2015/08), #11.2 + * Returns -1 if error is encountered. 0 if all OK. + */ +int uper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po); + +asn_dec_rval_t aper_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd); + + +int aper_open_type_skip(const asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); + +int aper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_OPENTYPE_H_ */ diff --git a/Bouncer/e2sm_rc/headers/per_support.h b/Bouncer/e2sm_rc/headers/per_support.h new file mode 100644 index 0000000..23079c9 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/per_support.h @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _PER_SUPPORT_H_ +#define _PER_SUPPORT_H_ + +#include /* Platform-specific types */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Pre-computed PER constraints. + */ +typedef struct asn_per_constraint_s { + enum asn_per_constraint_flags { + APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */ + APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */ + APC_CONSTRAINED = 0x2, /* Fully constrained */ + APC_EXTENSIBLE = 0x4 /* May have extension */ + } flags; + int range_bits; /* Full number of bits in the range */ + int effective_bits; /* Effective bits */ + long lower_bound; /* "lb" value */ + long upper_bound; /* "ub" value */ +} asn_per_constraint_t; +typedef struct asn_per_constraints_s { + asn_per_constraint_t value; + asn_per_constraint_t size; + int (*value2code)(unsigned int value); + int (*code2value)(unsigned int code); +} asn_per_constraints_t; + +/* Temporary compatibility layer. Will get removed. */ +typedef struct asn_bit_data_s asn_per_data_t; +#define per_get_few_bits(data, bits) asn_get_few_bits(data, bits) +#define per_get_undo(data, bits) asn_get_undo(data, bits) +#define per_get_many_bits(data, dst, align, bits) \ + asn_get_many_bits(data, dst, align, bits) + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Get the length "n" from the Unaligned PER stream. + */ +ssize_t uper_get_length(asn_per_data_t *pd, int effective_bound_bits, + size_t lower_bound, int *repeat); + +ssize_t aper_get_length(asn_per_data_t *pd, int range, + int effective_bound_bits, int *repeat); + +/* + * Get the normally small length "n". + */ +ssize_t uper_get_nslength(asn_per_data_t *pd); +ssize_t aper_get_nslength(asn_per_data_t *pd); + +/* + * Get the normally small non-negative whole number. + */ +ssize_t uper_get_nsnnwn(asn_per_data_t *pd); +ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range); + +/* X.691-2008/11, #11.5.6 */ +int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *v, int nbits); + + +/* Temporary compatibility layer. Will get removed. */ +typedef struct asn_bit_outp_s asn_per_outp_t; +#define per_put_few_bits(out, bits, obits) asn_put_few_bits(out, bits, obits) +#define per_put_many_bits(out, src, nbits) asn_put_many_bits(out, src, nbits) +#define per_put_aligned_flush(out) asn_put_aligned_flush(out) + + +/* + * Rebase the given value as an offset into the range specified by the + * lower bound (lb) and upper bound (ub). + * RETURN VALUES: + * -1: Conversion failed due to range problems. + * 0: Conversion was successful. + */ +int per_long_range_rebase(long v, long lb, long ub, unsigned long *output); +/* The inverse operation: restores the value by the offset and its bounds. */ +int per_long_range_unrebase(unsigned long inp, long lb, long ub, long *outp); + +/* X.691-2008/11, #11.5 */ +int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits); + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Put the length "whole_length" to the Unaligned PER stream. + * If (opt_need_eom) is given, it will be set to 1 if final 0-length is needed. + * In that case, invoke uper_put_length(po, 0, 0) after encoding the last block. + * This function returns the number of units which may be flushed + * in the next units saving iteration. + */ +ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length, + int *opt_need_eom); + +ssize_t aper_put_length(asn_per_outp_t *po, int range, size_t length); + +/* Align the current bit position to octet bundary */ +int aper_put_align(asn_per_outp_t *po); +int32_t aper_get_align(asn_per_data_t *pd); + +/* + * Put the normally small length "n" to the Unaligned PER stream. + * Returns 0 or -1. + */ +int uper_put_nslength(asn_per_outp_t *po, size_t length); + +int aper_put_nslength(asn_per_outp_t *po, size_t length); + +/* + * Put the normally small non-negative whole number. + */ +int uper_put_nsnnwn(asn_per_outp_t *po, int n); + +int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number); + +#ifdef __cplusplus +} +#endif + +#endif /* _PER_SUPPORT_H_ */ diff --git a/Bouncer/e2sm_rc/headers/xer_decoder.h b/Bouncer/e2sm_rc/headers/xer_decoder.h new file mode 100644 index 0000000..b951c41 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/xer_decoder.h @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _XER_DECODER_H_ +#define _XER_DECODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * The XER decoder of any ASN.1 type. May be invoked by the application. + * Decodes CANONICAL-XER and BASIC-XER. + */ +asn_dec_rval_t xer_decode( + const struct asn_codec_ctx_s *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ +); + +/* + * Type of the type-specific XER decoder function. + */ +typedef asn_dec_rval_t(xer_type_decoder_f)( + const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, + const char *opt_mname, /* Member name */ + const void *buf_ptr, size_t size); + +/******************************* + * INTERNALLY USEFUL FUNCTIONS * + *******************************/ + +/* + * Generalized function for decoding the primitive values. + * Used by more specialized functions, such as OCTET_STRING_decode_xer_utf8 + * and others. This function should not be used by applications, as its API + * is subject to changes. + */ +asn_dec_rval_t xer_decode_general( + const asn_codec_ctx_t *opt_codec_ctx, + asn_struct_ctx_t *ctx, /* Type decoder context */ + void *struct_key, /* Treated as opaque pointer */ + const char *xml_tag, /* Expected XML tag name */ + const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder)(void *struct_key, const void *chunk_buf, + size_t chunk_size), + ssize_t (*body_receiver)(void *struct_key, const void *chunk_buf, + size_t chunk_size, int have_more)); + + +/* + * Fetch the next XER (XML) token from the stream. + * The function returns the number of bytes occupied by the chunk type, + * returned in the _ch_type. The _ch_type is only set (and valid) when + * the return value is >= 0. + */ + typedef enum pxer_chunk_type { + PXER_WMORE, /* Chunk type is not clear, more data expected. */ + PXER_TAG, /* Complete XER tag */ + PXER_TEXT, /* Plain text between XER tags */ + PXER_COMMENT /* A comment, may be part of */ + } pxer_chunk_type_e; +ssize_t xer_next_token(int *stateContext, + const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); + +/* + * This function checks the buffer against the tag name is expected to occur. + */ + typedef enum xer_check_tag { + XCT_BROKEN = 0, /* The tag is broken */ + XCT_OPENING = 1, /* This is the tag */ + XCT_CLOSING = 2, /* This is the tag */ + XCT_BOTH = 3, /* This is the tag */ + XCT__UNK__MASK = 4, /* Mask of everything unexpected */ + XCT_UNKNOWN_OP = 5, /* Unexpected tag */ + XCT_UNKNOWN_CL = 6, /* Unexpected tag */ + XCT_UNKNOWN_BO = 7 /* Unexpected tag */ + } xer_check_tag_e; +xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, + const char *need_tag); + +/* + * Get the number of bytes consisting entirely of XER whitespace characters. + * RETURN VALUES: + * >=0: Number of whitespace characters in the string. + */ +size_t xer_whitespace_span(const void *chunk_buf, size_t chunk_size); + +/* + * Skip the series of anticipated extensions. + */ +int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); + +#ifdef __cplusplus +} +#endif + +#endif /* _XER_DECODER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/xer_encoder.h b/Bouncer/e2sm_rc/headers/xer_encoder.h new file mode 100644 index 0000000..9d75922 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/xer_encoder.h @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _XER_ENCODER_H_ +#define _XER_ENCODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ +enum xer_encoder_flags_e { + /* Mode of encoding */ + XER_F_BASIC = 0x01, /* BASIC-XER (pretty-printing) */ + XER_F_CANONICAL = 0x02 /* Canonical XER (strict rules) */ +}; + +/* + * The XER encoder of any type. May be invoked by the application. + * Produces CANONICAL-XER and BASIC-XER depending on the (xer_flags). + */ +asn_enc_rval_t xer_encode(const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ +); + +/* + * The variant of the above function which dumps the BASIC-XER (XER_F_BASIC) + * output into the chosen file pointer. + * RETURN VALUES: + * 0: The structure is printed. + * -1: Problem printing the structure. + * WARNING: No sensible errno value is returned. + */ +int xer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td, + const void *struct_ptr); + +/* + * A helper function that uses XER encoding/decoding to verify that: + * - Both structures encode into the same BASIC XER. + * - Both resulting XER byte streams can be decoded back. + * - Both decoded structures encode into the same BASIC XER (round-trip). + * All of this verifies equivalence between structures and a round-trip. + * ARGUMENTS: + * (opt_debug_stream) - If specified, prints ongoing details. + */ +enum xer_equivalence_e { + XEQ_SUCCESS, /* The only completely positive return value */ + XEQ_FAILURE, /* General failure */ + XEQ_ENCODE1_FAILED, /* First sructure XER encoding failed */ + XEQ_ENCODE2_FAILED, /* Second structure XER encoding failed */ + XEQ_DIFFERENT, /* Structures encoded into different XER */ + XEQ_DECODE_FAILED, /* Decode of the XER data failed */ + XEQ_ROUND_TRIP_FAILED /* Bad round-trip */ +}; +enum xer_equivalence_e xer_equivalent( + const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct1, + const void *struct2, FILE *opt_debug_stream); + +/* + * Type of the generic XER encoder. + */ +typedef asn_enc_rval_t(xer_type_encoder_f)( + const struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Structure to be encoded */ + int ilevel, /* Level of indentation */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _XER_ENCODER_H_ */ diff --git a/Bouncer/e2sm_rc/headers/xer_support.h b/Bouncer/e2sm_rc/headers/xer_support.h new file mode 100644 index 0000000..c3a36e7 --- /dev/null +++ b/Bouncer/e2sm_rc/headers/xer_support.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2003, 2004 X/IO Labs, xiolabs.com. + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _XER_SUPPORT_H_ +#define _XER_SUPPORT_H_ + +#include /* Platform-specific types */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Types of data transferred to the application. + */ +typedef enum { + PXML_TEXT, /* Plain text between XML tags. */ + PXML_TAG, /* A tag, starting with '<'. */ + PXML_COMMENT, /* An XML comment, including "". */ + /* + * The following chunk types are reported if the chunk + * terminates the specified XML element. + */ + PXML_TAG_END, /* Tag ended */ + PXML_COMMENT_END /* Comment ended */ +} pxml_chunk_type_e; + +/* + * Callback function that is called by the parser when parsed data is + * available. The _opaque is the pointer to a field containing opaque user + * data specified in pxml_create() call. The chunk type is _type and the text + * data is the piece of buffer identified by _bufid (as supplied to + * pxml_feed() call) starting at offset _offset and of _size bytes size. + * The chunk is NOT '\0'-terminated. + */ +typedef int (pxml_callback_f)(pxml_chunk_type_e _type, + const void *_chunk_data, size_t _chunk_size, void *_key); + +/* + * Parse the given buffer as it were a chunk of XML data. + * Invoke the specified callback each time the meaninful data is found. + * This function returns number of bytes consumed from the bufer. + * It will always be lesser than or equal to the specified _size. + * The next invocation of this function must account the difference. + */ +ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, + pxml_callback_f *cb, void *_key); + +#ifdef __cplusplus +} +#endif + +#endif /* _XER_SUPPORT_H_ */ diff --git a/Bouncer/e2sm_rc/lib/AMF-UE-NGAP-ID.c b/Bouncer/e2sm_rc/lib/AMF-UE-NGAP-ID.c new file mode 100644 index 0000000..0180c9e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/AMF-UE-NGAP-ID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "AMF-UE-NGAP-ID.h" + +int +AMF_UE_NGAP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 1099511627775)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_AMF_UE_NGAP_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..1099511627775) */, + -1}; +asn_per_constraints_t asn_PER_type_AMF_UE_NGAP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 40, -1, 0, 1099511627775 } /* (0..1099511627775) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMF_UE_NGAP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMF_UE_NGAP_ID = { + "AMF-UE-NGAP-ID", + "AMF-UE-NGAP-ID", + &asn_OP_INTEGER, + asn_DEF_AMF_UE_NGAP_ID_tags_1, + sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1) + /sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1[0]), /* 1 */ + asn_DEF_AMF_UE_NGAP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1) + /sizeof(asn_DEF_AMF_UE_NGAP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_AMF_UE_NGAP_ID_constr_1, &asn_PER_type_AMF_UE_NGAP_ID_constr_1, AMF_UE_NGAP_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/AMFPointer.c b/Bouncer/e2sm_rc/lib/AMFPointer.c new file mode 100644 index 0000000..b8be1d1 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/AMFPointer.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "AMFPointer.h" + +int +AMFPointer_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 6)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_AMFPointer_constr_1 CC_NOTUSED = { + { 0, 0 }, + 6 /* (SIZE(6..6)) */}; +asn_per_constraints_t asn_PER_type_AMFPointer_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 6, 6 } /* (SIZE(6..6)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMFPointer_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMFPointer = { + "AMFPointer", + "AMFPointer", + &asn_OP_BIT_STRING, + asn_DEF_AMFPointer_tags_1, + sizeof(asn_DEF_AMFPointer_tags_1) + /sizeof(asn_DEF_AMFPointer_tags_1[0]), /* 1 */ + asn_DEF_AMFPointer_tags_1, /* Same as above */ + sizeof(asn_DEF_AMFPointer_tags_1) + /sizeof(asn_DEF_AMFPointer_tags_1[0]), /* 1 */ + { &asn_OER_type_AMFPointer_constr_1, &asn_PER_type_AMFPointer_constr_1, AMFPointer_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/AMFRegionID.c b/Bouncer/e2sm_rc/lib/AMFRegionID.c new file mode 100644 index 0000000..fc663d9 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/AMFRegionID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "AMFRegionID.h" + +int +AMFRegionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 8)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_AMFRegionID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +asn_per_constraints_t asn_PER_type_AMFRegionID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMFRegionID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMFRegionID = { + "AMFRegionID", + "AMFRegionID", + &asn_OP_BIT_STRING, + asn_DEF_AMFRegionID_tags_1, + sizeof(asn_DEF_AMFRegionID_tags_1) + /sizeof(asn_DEF_AMFRegionID_tags_1[0]), /* 1 */ + asn_DEF_AMFRegionID_tags_1, /* Same as above */ + sizeof(asn_DEF_AMFRegionID_tags_1) + /sizeof(asn_DEF_AMFRegionID_tags_1[0]), /* 1 */ + { &asn_OER_type_AMFRegionID_constr_1, &asn_PER_type_AMFRegionID_constr_1, AMFRegionID_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/AMFSetID.c b/Bouncer/e2sm_rc/lib/AMFSetID.c new file mode 100644 index 0000000..28886f2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/AMFSetID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "AMFSetID.h" + +int +AMFSetID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 10)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_AMFSetID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 10 /* (SIZE(10..10)) */}; +asn_per_constraints_t asn_PER_type_AMFSetID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 10, 10 } /* (SIZE(10..10)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_AMFSetID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_AMFSetID = { + "AMFSetID", + "AMFSetID", + &asn_OP_BIT_STRING, + asn_DEF_AMFSetID_tags_1, + sizeof(asn_DEF_AMFSetID_tags_1) + /sizeof(asn_DEF_AMFSetID_tags_1[0]), /* 1 */ + asn_DEF_AMFSetID_tags_1, /* Same as above */ + sizeof(asn_DEF_AMFSetID_tags_1) + /sizeof(asn_DEF_AMFSetID_tags_1[0]), /* 1 */ + { &asn_OER_type_AMFSetID_constr_1, &asn_PER_type_AMFSetID_constr_1, AMFSetID_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/BIT_STRING.c b/Bouncer/e2sm_rc/lib/BIT_STRING.c new file mode 100644 index 0000000..e8d7354 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/BIT_STRING.c @@ -0,0 +1,656 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * BIT STRING basic type description. + */ +static const ber_tlv_tag_t asn_DEF_BIT_STRING_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs = { + sizeof(BIT_STRING_t), + offsetof(BIT_STRING_t, _asn_ctx), + ASN_OSUBV_BIT +}; +asn_TYPE_operation_t asn_OP_BIT_STRING = { + OCTET_STRING_free, /* Implemented in terms of OCTET STRING */ + BIT_STRING_print, + BIT_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_decode_xer_binary, + BIT_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + BIT_STRING_decode_oer, + BIT_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + BIT_STRING_decode_uper, /* Unaligned PER decoder */ + BIT_STRING_encode_uper, /* Unaligned PER encoder */ + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + BIT_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_BIT_STRING = { + "BIT STRING", + "BIT_STRING", + &asn_OP_BIT_STRING, + asn_DEF_BIT_STRING_tags, + sizeof(asn_DEF_BIT_STRING_tags) + / sizeof(asn_DEF_BIT_STRING_tags[0]), + asn_DEF_BIT_STRING_tags, /* Same as above */ + sizeof(asn_DEF_BIT_STRING_tags) + / sizeof(asn_DEF_BIT_STRING_tags[0]), + { 0, 0, BIT_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs +}; + +/* + * BIT STRING generic constraint. + */ +int +BIT_STRING_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + + if(st && st->buf) { + if((st->size == 0 && st->bits_unused) + || st->bits_unused < 0 || st->bits_unused > 7) { + ASN__CTFAIL(app_key, td, sptr, + "%s: invalid padding byte (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + return 0; +} + +static const char *_bit_pattern[16] = { + "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", + "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" +}; + +asn_enc_rval_t +BIT_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + char scratch[128]; + char *p = scratch; + char *scend = scratch + (sizeof(scratch) - 10); + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + int xcan = (flags & XER_F_CANONICAL); + uint8_t *buf; + uint8_t *end; + + if(!st || !st->buf) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + buf = st->buf; + end = buf + st->size - 1; /* Last byte is special */ + + /* + * Binary dump + */ + for(; buf < end; buf++) { + int v = *buf; + int nline = xcan?0:(((buf - st->buf) % 8) == 0); + if(p >= scend || nline) { + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + if(nline) ASN__TEXT_INDENT(1, ilevel); + } + memcpy(p + 0, _bit_pattern[v >> 4], 4); + memcpy(p + 4, _bit_pattern[v & 0x0f], 4); + p += 8; + } + + if(!xcan && ((buf - st->buf) % 8) == 0) + ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + + if(buf == end) { + int v = *buf; + int ubits = st->bits_unused; + int i; + for(i = 7; i >= ubits; i--) + *p++ = (v & (1 << i)) ? 0x31 : 0x30; + ASN__CALLBACK(scratch, p - scratch); + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + + +/* + * BIT STRING specific contents printer. + */ +int +BIT_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + char scratch[64]; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + uint8_t *buf; + uint8_t *end; + char *p = scratch; + + (void)td; /* Unused argument */ + + if(!st || !st->buf) + return (cb("", 8, app_key) < 0) ? -1 : 0; + + ilevel++; + buf = st->buf; + end = buf + st->size; + + /* + * Hexadecimal dump. + */ + for(; buf < end; buf++) { + if((buf - st->buf) % 16 == 0 && (st->size > 16) + && buf != st->buf) { + _i_INDENT(1); + /* Dump the string */ + if(cb(scratch, p - scratch, app_key) < 0) return -1; + p = scratch; + } + *p++ = h2c[*buf >> 4]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + + if(p > scratch) { + p--; /* Eat the tailing space */ + + if((st->size > 16)) { + _i_INDENT(1); + } + + /* Dump the incomplete 16-bytes row */ + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + } + + if(st->bits_unused) { + int ret = snprintf(scratch, sizeof(scratch), " (%d bit%s unused)", + st->bits_unused, st->bits_unused == 1 ? "" : "s"); + assert(ret > 0 && ret < (ssize_t)sizeof(scratch)); + if(ret > 0 && ret < (ssize_t)sizeof(scratch) + && cb(scratch, ret, app_key) < 0) + return -1; + } + + return 0; +} + +/* + * Non-destructively remove the trailing 0-bits from the given bit string. + */ +static const BIT_STRING_t * +BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp) { + const uint8_t *b; + union { + const uint8_t *c_buf; + uint8_t *nc_buf; + } unconst; + + if(st->size == 0) { + assert(st->bits_unused == 0); + return st; + } else { + for(b = &st->buf[st->size - 1]; b > st->buf && *b == 0; b--) { + ; + } + /* b points to the last byte which may contain data */ + if(*b) { + int unused = 7; + uint8_t v = *b; + v &= -(int8_t)v; + if(v & 0x0F) unused -= 4; + if(v & 0x33) unused -= 2; + if(v & 0x55) unused -= 1; + tmp->size = b-st->buf + 1; + tmp->bits_unused = unused; + } else { + tmp->size = b-st->buf; + tmp->bits_unused = 0; + } + + assert(b >= st->buf); + } + + unconst.c_buf = st->buf; + tmp->buf = unconst.nc_buf; + return tmp; +} + +/* + * Lexicographically compare the common prefix of both strings, + * and if it is the same return -1 for the smallest string. + */ +int +BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + /* + * Remove information about trailing bits, since + * X.680 (08/2015) #22.7 "ensure that different semantics are not" + * "associated with [values that differ only in] the trailing 0 bits." + */ + BIT_STRING_t compact_a, compact_b; + const BIT_STRING_t *a = BIT_STRING__compactify(aptr, &compact_a); + const BIT_STRING_t *b = BIT_STRING__compactify(bptr, &compact_b); + const asn_OCTET_STRING_specifics_t *specs = td->specifics; + + assert(specs && specs->subvariant == ASN_OSUBV_BIT); + + if(a && b) { + size_t common_prefix_size = a->size <= b->size ? a->size : b->size; + int ret = memcmp(a->buf, b->buf, common_prefix_size); + if(ret == 0) { + /* Figure out which string with equal prefixes is longer. */ + if(a->size < b->size) { + return -1; + } else if(a->size > b->size) { + return 1; + } else { + /* Figure out how many unused bits */ + if(a->bits_unused > b->bits_unused) { + return -1; + } else if(a->bits_unused < b->bits_unused) { + return 1; + } else { + return 0; + } + } + } else { + return ret; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +static asn_per_constraint_t asn_DEF_BIT_STRING_constraint_size = { + APC_SEMI_CONSTRAINED, -1, -1, 0, 0}; + +asn_dec_rval_t +BIT_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_BIT_STRING_specs; + const asn_per_constraints_t *pc = + constraints ? constraints : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + + (void)opt_codec_ctx; + + if(pc) { + csiz = &pc->size; + } else { + csiz = &asn_DEF_BIT_STRING_constraint_size; + } + + if(specs->subvariant != ASN_OSUBV_BIT) { + ASN_DEBUG("Subvariant %d is not BIT OSUBV_BIT", specs->subvariant); + RETURN(RC_FAIL); + } + + /* + * Allocate the string. + */ + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_BIT_STRING_constraint_size; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + st->size = (csiz->upper_bound + 7) >> 3; + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + ASN_DEBUG("Encoding BIT STRING size %ld", csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, csiz->upper_bound); + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += csiz->upper_bound; + st->buf[st->size] = 0; + st->bits_unused = (8 - (csiz->upper_bound & 0x7)) & 0x7; + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + ssize_t len_bits; + void *p; + int ret; + + /* Get the PER length */ + raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, + &repeat); + if(raw_len < 0) RETURN(RC_WMORE); + if(raw_len == 0 && st->buf) break; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + len_bits = raw_len; + len_bytes = (len_bits + 7) >> 3; + if(len_bits & 0x7) st->bits_unused = 8 - (len_bits & 0x7); + /* len_bits be multiple of 16K if repeat is set */ + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +BIT_STRING_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_BIT_STRING_specs; + const asn_per_constraints_t *pc = + constraints ? constraints : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *csiz; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + BIT_STRING_t compact_bstr; /* Do not modify this directly! */ + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + size_t size_in_bits; + const uint8_t *buf; + int ret; + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(specs->subvariant == ASN_OSUBV_BIT) { + if((st->size == 0 && st->bits_unused) || (st->bits_unused & ~7)) + ASN__ENCODE_FAILED; + } else { + ASN__ENCODE_FAILED; + } + + if(pc) { + csiz = &pc->size; + } else { + csiz = &asn_DEF_BIT_STRING_constraint_size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + /* Figure out the size without the trailing bits */ + st = BIT_STRING__compactify(st, &compact_bstr); + size_in_bits = 8 * st->size - st->bits_unused; + + ASN_DEBUG( + "Encoding %s into %" ASN_PRI_SIZE " bits" + " (%ld..%ld, effective %d)%s", + td->name, size_in_bits, csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out whether size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((ssize_t)size_in_bits > csiz->upper_bound) { + if(ct_extensible) { + csiz = &asn_DEF_BIT_STRING_constraint_size; + inext = 1; + } else { + ASN__ENCODE_FAILED; + } + } + } else { + inext = 0; + } + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + if(csiz->effective_bits >= 0 && !inext) { + int add_trailer = (ssize_t)size_in_bits < csiz->lower_bound; + ASN_DEBUG( + "Encoding %" ASN_PRI_SIZE " bytes (%ld), length (in %d bits) trailer %d; actual " + "value %" ASN_PRI_SSIZE "", + st->size, size_in_bits - csiz->lower_bound, csiz->effective_bits, + add_trailer, + add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound); + ret = per_put_few_bits( + po, add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound, + csiz->effective_bits); + if(ret) ASN__ENCODE_FAILED; + ret = per_put_many_bits(po, st->buf, size_in_bits); + if(ret) ASN__ENCODE_FAILED; + if(add_trailer) { + static const uint8_t zeros[16]; + size_t trailing_zero_bits = csiz->lower_bound - size_in_bits; + while(trailing_zero_bits > 0) { + if(trailing_zero_bits > 8 * sizeof(zeros)) { + ret = per_put_many_bits(po, zeros, 8 * sizeof(zeros)); + trailing_zero_bits -= 8 * sizeof(zeros); + } else { + ret = per_put_many_bits(po, zeros, trailing_zero_bits); + trailing_zero_bits = 0; + } + if(ret) ASN__ENCODE_FAILED; + } + } + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); + + buf = st->buf; + do { + int need_eom = 0; + ssize_t maySave = uper_put_length(po, size_in_bits, &need_eom); + if(maySave < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "", maySave, size_in_bits); + + ret = per_put_many_bits(po, buf, maySave); + if(ret) ASN__ENCODE_FAILED; + + buf += maySave >> 3; + size_in_bits -= maySave; + assert(!(maySave & 0x07) || !size_in_bits); + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size_in_bits); + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +asn_random_fill_result_t +BIT_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_BIT_STRING_specs; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + static unsigned lengths[] = {0, 1, 2, 3, 4, 8, + 126, 127, 128, 16383, 16384, 16385, + 65534, 65535, 65536, 65537}; + uint8_t *buf; + uint8_t *bend; + uint8_t *b; + size_t rnd_bits, rnd_len; + BIT_STRING_t *st; + + if(max_length == 0) return result_skipped; + + switch(specs->subvariant) { + case ASN_OSUBV_ANY: + return result_failed; + case ASN_OSUBV_BIT: + break; + default: + break; + } + + /* Figure out how far we should go */ + rnd_bits = lengths[asn_random_between( + 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->size; + if(pc->flags & APC_CONSTRAINED) { + long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length + ? pc->upper_bound + : (ssize_t)max_length; + if(max_length < (size_t)pc->lower_bound) { + return result_skipped; + } + if(pc->flags & APC_EXTENSIBLE) { + switch(asn_random_between(0, 5)) { + case 0: + if(pc->lower_bound > 0) { + rnd_bits = pc->lower_bound - 1; + break; + } + /* Fall through */ + case 1: + rnd_bits = pc->upper_bound + 1; + break; + case 2: + /* Keep rnd_bits from the table */ + if(rnd_bits < max_length) { + break; + } + /* Fall through */ + default: + rnd_bits = asn_random_between(pc->lower_bound, + suggested_upper_bound); + } + } else { + rnd_bits = + asn_random_between(pc->lower_bound, suggested_upper_bound); + } + } else { + rnd_bits = asn_random_between(0, max_length - 1); + } + } else if(rnd_bits >= max_length) { + rnd_bits = asn_random_between(0, max_length - 1); + } + + rnd_len = (rnd_bits + 7) / 8; + buf = CALLOC(1, rnd_len + 1); + if(!buf) return result_failed; + + bend = &buf[rnd_len]; + + for(b = buf; b < bend; b++) { + *(uint8_t *)b = asn_random_between(0, 255); + } + *b = 0; /* Zero-terminate just in case. */ + + if(*sptr) { + st = *sptr; + FREEMEM(st->buf); + } else { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) { + FREEMEM(buf); + return result_failed; + } + } + + st->buf = buf; + st->size = rnd_len; + st->bits_unused = (8 - (rnd_bits & 0x7)) & 0x7; + if(st->bits_unused) { + assert(st->size > 0); + st->buf[st->size-1] &= 0xff << st->bits_unused; + } + + result_ok.length = st->size; + return result_ok; +} diff --git a/Bouncer/e2sm_rc/lib/BIT_STRING_oer.c b/Bouncer/e2sm_rc/lib/BIT_STRING_oer.c new file mode 100644 index 0000000..aff5075 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/BIT_STRING_oer.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +BIT_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + + (void)opt_codec_ctx; + + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + if(ct_size >= 0) { + expected_length = (ct_size + 7) >> 3; + st->bits_unused = (8 - (ct_size & 7)) & 7; + } else { + /* + * X.696 (08/2015) #13.3.1 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(expected_length < 1) { + ASN__DECODE_FAILED; + } else if(expected_length > size) { + ASN__DECODE_STARVED; + } + + st->bits_unused = ((const uint8_t *)ptr)[0]; + if(st->bits_unused & ~7) { + ASN_DEBUG("%s: unused bits outside of 0..7 range", td->name); + ASN__DECODE_FAILED; + } + ptr = (const char *)ptr + 1; + size--; + expected_length--; + rval.consumed = len_len + 1; + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + if(expected_length > 0) { + buf[expected_length - 1] &= (0xff << st->bits_unused); + } + + rval.consumed += expected_length; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +BIT_STRING_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + asn_enc_rval_t erval = {0, 0, 0}; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + size_t trailing_zeros = 0; + int fix_last_byte = 0; + + if(!st) ASN__ENCODE_FAILED; + + if(st->bits_unused & ~7) { + ASN_DEBUG("BIT STRING unused bits %d out of 0..7 range", + st->bits_unused); + ASN__ENCODE_FAILED; + } + if(st->bits_unused && !(st->size && st->buf)) { + ASN_DEBUG("BIT STRING %s size 0 can't support unused bits %d", td->name, + st->bits_unused); + ASN__ENCODE_FAILED; + } + + if(ct_size >= 0) { + size_t ct_bytes = (ct_size + 7) >> 3; + if(st->size > ct_bytes) { + ASN_DEBUG("More bits in BIT STRING %s (%" ASN_PRI_SSIZE ") than constrained %" ASN_PRI_SSIZE "", + td->name, 8 * st->size - st->bits_unused, ct_size); + ASN__ENCODE_FAILED; + } + trailing_zeros = ct_bytes - st->size; /* Allow larger constraint */ + } else { + uint8_t ub = st->bits_unused & 7; + ssize_t len_len = oer_serialize_length(1 + st->size, cb, app_key); + if(len_len < 0) ASN__ENCODE_FAILED; + if(cb(&ub, 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + erval.encoded += len_len + 1; + } + + if(st->bits_unused) { + if(st->buf[st->size - 1] & (0xff << st->bits_unused)) { + fix_last_byte = 1; + } + } + + if(cb(st->buf, st->size - fix_last_byte, app_key) < 0) { + ASN__ENCODE_FAILED; + } + + if(fix_last_byte) { + uint8_t b = st->buf[st->size - 1] & (0xff << st->bits_unused); + if(cb(&b, 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + } + + erval.encoded += st->size; + + if(trailing_zeros) { + static uint8_t zeros[16]; + while(trailing_zeros > 0) { + int ret; + if(trailing_zeros < sizeof(zeros)) { + ret = cb(zeros, trailing_zeros, app_key); + erval.encoded += trailing_zeros; + } else { + ret = cb(zeros, sizeof(zeros), app_key); + erval.encoded += sizeof(zeros); + } + if(ret < 0) ASN__ENCODE_FAILED; + } + } + + return erval; +} + + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/BOOLEAN.c b/Bouncer/e2sm_rc/lib/BOOLEAN.c new file mode 100644 index 0000000..25831e2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/BOOLEAN.c @@ -0,0 +1,492 @@ +/*- + * Copyright (c) 2003, 2005 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * BOOLEAN basic type description. + */ +static const ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)) +}; +asn_TYPE_operation_t asn_OP_BOOLEAN = { + BOOLEAN_free, + BOOLEAN_print, + BOOLEAN_compare, + BOOLEAN_decode_ber, + BOOLEAN_encode_der, + BOOLEAN_decode_xer, + BOOLEAN_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + BOOLEAN_decode_oer, + BOOLEAN_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + BOOLEAN_decode_uper, /* Unaligned PER decoder */ + BOOLEAN_encode_uper, /* Unaligned PER encoder */ + BOOLEAN_decode_aper, /* Aligned PER decoder */ + BOOLEAN_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + BOOLEAN_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_BOOLEAN = { + "BOOLEAN", + "BOOLEAN", + &asn_OP_BOOLEAN, + asn_DEF_BOOLEAN_tags, + sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]), + asn_DEF_BOOLEAN_tags, /* Same as above */ + sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +/* + * Decode BOOLEAN type. + */ +asn_dec_rval_t +BOOLEAN_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **bool_value, + const void *buf_ptr, size_t size, int tag_mode) { + BOOLEAN_t *st = (BOOLEAN_t *)*bool_value; + asn_dec_rval_t rval; + ber_tlv_len_t length; + ber_tlv_len_t lidx; + + if(st == NULL) { + st = (BOOLEAN_t *)(*bool_value = CALLOC(1, sizeof(*st))); + if(st == NULL) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + } + + ASN_DEBUG("Decoding %s as BOOLEAN (tm=%d)", + td->name, tag_mode); + + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, + tag_mode, 0, &length, 0); + if(rval.code != RC_OK) + return rval; + + ASN_DEBUG("Boolean length is %d bytes", (int)length); + + buf_ptr = ((const char *)buf_ptr) + rval.consumed; + size -= rval.consumed; + if(length > (ber_tlv_len_t)size) { + rval.code = RC_WMORE; + rval.consumed = 0; + return rval; + } + + /* + * Compute boolean value. + */ + for(*st = 0, lidx = 0; + (lidx < length) && *st == 0; lidx++) { + /* + * Very simple approach: read bytes until the end or + * value is already TRUE. + * BOOLEAN is not supposed to contain meaningful data anyway. + */ + *st |= ((const uint8_t *)buf_ptr)[lidx]; + } + + rval.code = RC_OK; + rval.consumed += length; + + ASN_DEBUG("Took %ld/%ld bytes to encode %s, value=%d", + (long)rval.consumed, (long)length, + td->name, *st); + + return rval; +} + +asn_enc_rval_t +BOOLEAN_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t erval = {0,0,0}; + const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; + + erval.encoded = der_write_tags(td, 1, tag_mode, 0, tag, cb, app_key); + if(erval.encoded == -1) { + erval.failed_type = td; + erval.structure_ptr = sptr; + return erval; + } + + if(cb) { + uint8_t bool_value; + + bool_value = *st ? 0xff : 0; /* 0xff mandated by DER */ + + if(cb(&bool_value, 1, app_key) < 0) { + erval.encoded = -1; + erval.failed_type = td; + erval.structure_ptr = sptr; + return erval; + } + } + + erval.encoded += 1; + + ASN__ENCODED_OK(erval); +} + + +/* + * Decode the chunk of XML text encoding INTEGER. + */ +static enum xer_pbd_rval +BOOLEAN__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + BOOLEAN_t *st = (BOOLEAN_t *)sptr; + const char *p = (const char *)chunk_buf; + + (void)td; + + if(chunk_size && p[0] == 0x3c /* '<' */) { + switch(xer_check_tag(chunk_buf, chunk_size, "false")) { + case XCT_BOTH: + /* "" */ + *st = 0; + break; + case XCT_UNKNOWN_BO: + if(xer_check_tag(chunk_buf, chunk_size, "true") + != XCT_BOTH) + return XPBD_BROKEN_ENCODING; + /* "" */ + *st = 1; /* Or 0xff as in DER?.. */ + break; + default: + return XPBD_BROKEN_ENCODING; + } + return XPBD_BODY_CONSUMED; + } else { + return XPBD_BROKEN_ENCODING; + } +} + + +asn_dec_rval_t +BOOLEAN_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + return xer_decode_primitive(opt_codec_ctx, td, + sptr, sizeof(BOOLEAN_t), opt_mname, buf_ptr, size, + BOOLEAN__xer_body_decode); +} + +asn_enc_rval_t +BOOLEAN_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; + asn_enc_rval_t er = {0, 0, 0}; + + (void)ilevel; + (void)flags; + + if(!st) ASN__ENCODE_FAILED; + + if(*st) { + ASN__CALLBACK("", 7); + } else { + ASN__CALLBACK("", 8); + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +int +BOOLEAN_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; + const char *buf; + size_t buflen; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(st) { + if(*st) { + buf = "TRUE"; + buflen = 4; + } else { + buf = "FALSE"; + buflen = 5; + } + } else { + buf = ""; + buflen = 8; + } + + return (cb(buf, buflen, app_key) < 0) ? -1 : 0; +} + +void +BOOLEAN_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + if(td && ptr) { + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, sizeof(BOOLEAN_t)); + break; + } + } +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +BOOLEAN_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rv; + BOOLEAN_t *st = (BOOLEAN_t *)*sptr; + + (void)opt_codec_ctx; + (void)td; + (void)constraints; + + if(!st) { + st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + /* + * Extract a single bit + */ + switch(per_get_few_bits(pd, 1)) { + case 1: *st = 1; break; + case 0: *st = 0; break; + case -1: default: ASN__DECODE_STARVED; + } + + ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE"); + + rv.code = RC_OK; + rv.consumed = 1; + return rv; +} + + +asn_enc_rval_t +BOOLEAN_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + + (void)constraints; + + if(!st) ASN__ENCODE_FAILED; + + if(per_put_few_bits(po, *st ? 1 : 0, 1)) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +BOOLEAN_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + asn_dec_rval_t rv; + BOOLEAN_t *st = (BOOLEAN_t *)*sptr; + + (void)opt_codec_ctx; + (void)constraints; + (void)td; + + if(!st) { + st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + /* + * Extract a single bit + */ + switch(per_get_few_bits(pd, 1)) { + case 1: + *st = 1; + break; + case 0: + *st = 0; + break; + case -1: + default: + ASN__DECODE_STARVED; + } + + ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE"); + + rv.code = RC_OK; + rv.consumed = 1; + return rv; +} + +asn_enc_rval_t +BOOLEAN_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + + (void)constraints; + + if(!st) ASN__ENCODE_FAILED; + + if(per_put_few_bits(po, *st ? 1 : 0, 1)) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +#ifndef ASN_DISABLE_OER_SUPPORT + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +BOOLEAN_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = { 1, 0, 0 }; + const BOOLEAN_t *st = sptr; + uint8_t bool_value = *st ? 0xff : 0; /* 0xff mandated by OER */ + + (void)td; + (void)constraints; /* Constraints are unused in OER */ + + if(cb(&bool_value, 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + ASN__ENCODED_OK(er); + } +} + +asn_dec_rval_t +BOOLEAN_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + asn_dec_rval_t ok = {RC_OK, 1}; + BOOLEAN_t *st; + + (void)opt_codec_ctx; + (void)td; + (void)constraints; /* Constraints are unused in OER */ + + if(size < 1) { + ASN__DECODE_STARVED; + } + + if(!(st = *sptr)) { + st = (BOOLEAN_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + *st = *(const uint8_t *)ptr; + + return ok; +} + + + +#endif + +int +BOOLEAN_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const BOOLEAN_t *a = aptr; + const BOOLEAN_t *b = bptr; + + (void)td; + + if(a && b) { + if(!*a == !*b) { /* TRUE can be encoded by any non-zero byte. */ + return 0; + } else if(!*a) { + return -1; + } else { + return 1; + } + } else if(!a) { + return -1; + } else { + return 1; + } +} + +asn_random_fill_result_t +BOOLEAN_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + BOOLEAN_t *st = *sptr; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (BOOLEAN_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(st == NULL) { + return result_failed; + } + } + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->value; + if(pc->flags & APC_CONSTRAINED) { + *st = asn_random_between(pc->lower_bound, pc->upper_bound); + return result_ok; + } + } + + /* Simulate booleans that are sloppily set and biased. */ + switch(asn_random_between(0, 7)) { + case 0: + case 1: + case 2: + *st = 0; break; + case 3: *st = -1; break; + case 4: *st = 1; break; + case 5: *st = INT_MIN; break; + case 6: *st = INT_MAX; break; + default: + *st = asn_random_between(INT_MIN, INT_MAX); + break; + } + return result_ok; +} diff --git a/Bouncer/e2sm_rc/lib/CGI.c b/Bouncer/e2sm_rc/lib/CGI.c new file mode 100644 index 0000000..99b1946 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/CGI.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "CGI.h" + +#include "NR-CGI.h" +#include "EUTRA-CGI.h" +static asn_oer_constraints_t asn_OER_type_CGI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_CGI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_CGI_1[] = { + { ATF_POINTER, 0, offsetof(struct CGI, choice.nR_CGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR-CGI" + }, + { ATF_POINTER, 0, offsetof(struct CGI, choice.eUTRA_CGI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EUTRA_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA-CGI" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_CGI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nR-CGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRA-CGI */ +}; +asn_CHOICE_specifics_t asn_SPC_CGI_specs_1 = { + sizeof(struct CGI), + offsetof(struct CGI, _asn_ctx), + offsetof(struct CGI, present), + sizeof(((struct CGI *)0)->present), + asn_MAP_CGI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_CGI = { + "CGI", + "CGI", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_CGI_constr_1, &asn_PER_type_CGI_constr_1, CHOICE_constraint }, + asn_MBR_CGI_1, + 2, /* Elements count */ + &asn_SPC_CGI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/CallProcessBreakpoint-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/CallProcessBreakpoint-RANParameter-Item.c new file mode 100644 index 0000000..4933869 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/CallProcessBreakpoint-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "CallProcessBreakpoint-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_CallProcessBreakpoint_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CallProcessBreakpoint_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct CallProcessBreakpoint_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct CallProcessBreakpoint_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_CallProcessBreakpoint_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_CallProcessBreakpoint_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CallProcessBreakpoint_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CallProcessBreakpoint_RANParameter_Item_specs_1 = { + sizeof(struct CallProcessBreakpoint_RANParameter_Item), + offsetof(struct CallProcessBreakpoint_RANParameter_Item, _asn_ctx), + asn_MAP_CallProcessBreakpoint_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_CallProcessBreakpoint_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CallProcessBreakpoint_RANParameter_Item = { + "CallProcessBreakpoint-RANParameter-Item", + "CallProcessBreakpoint-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_CallProcessBreakpoint_RANParameter_Item_tags_1, + sizeof(asn_DEF_CallProcessBreakpoint_RANParameter_Item_tags_1) + /sizeof(asn_DEF_CallProcessBreakpoint_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_CallProcessBreakpoint_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_CallProcessBreakpoint_RANParameter_Item_tags_1) + /sizeof(asn_DEF_CallProcessBreakpoint_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CallProcessBreakpoint_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_CallProcessBreakpoint_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/CellIdentification-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/CellIdentification-RANParameter-Item.c new file mode 100644 index 0000000..6cec813 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/CellIdentification-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "CellIdentification-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_CellIdentification_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct CellIdentification_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct CellIdentification_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct CellIdentification_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_CellIdentification_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_CellIdentification_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_CellIdentification_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_CellIdentification_RANParameter_Item_specs_1 = { + sizeof(struct CellIdentification_RANParameter_Item), + offsetof(struct CellIdentification_RANParameter_Item, _asn_ctx), + asn_MAP_CellIdentification_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_CellIdentification_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_CellIdentification_RANParameter_Item = { + "CellIdentification-RANParameter-Item", + "CellIdentification-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_CellIdentification_RANParameter_Item_tags_1, + sizeof(asn_DEF_CellIdentification_RANParameter_Item_tags_1) + /sizeof(asn_DEF_CellIdentification_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_CellIdentification_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_CellIdentification_RANParameter_Item_tags_1) + /sizeof(asn_DEF_CellIdentification_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_CellIdentification_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_CellIdentification_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/ControlAction-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/ControlAction-RANParameter-Item.c new file mode 100644 index 0000000..86fddd9 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ControlAction-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "ControlAction-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_ControlAction_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ControlAction_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ControlAction_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct ControlAction_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_ControlAction_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_ControlAction_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ControlAction_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ControlAction_RANParameter_Item_specs_1 = { + sizeof(struct ControlAction_RANParameter_Item), + offsetof(struct ControlAction_RANParameter_Item, _asn_ctx), + asn_MAP_ControlAction_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_ControlAction_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ControlAction_RANParameter_Item = { + "ControlAction-RANParameter-Item", + "ControlAction-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_ControlAction_RANParameter_Item_tags_1, + sizeof(asn_DEF_ControlAction_RANParameter_Item_tags_1) + /sizeof(asn_DEF_ControlAction_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_ControlAction_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_ControlAction_RANParameter_Item_tags_1) + /sizeof(asn_DEF_ControlAction_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ControlAction_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_ControlAction_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/ControlOutcome-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/ControlOutcome-RANParameter-Item.c new file mode 100644 index 0000000..63e624f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ControlOutcome-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "ControlOutcome-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_ControlOutcome_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ControlOutcome_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ControlOutcome_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct ControlOutcome_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_ControlOutcome_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_ControlOutcome_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ControlOutcome_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ControlOutcome_RANParameter_Item_specs_1 = { + sizeof(struct ControlOutcome_RANParameter_Item), + offsetof(struct ControlOutcome_RANParameter_Item, _asn_ctx), + asn_MAP_ControlOutcome_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_ControlOutcome_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ControlOutcome_RANParameter_Item = { + "ControlOutcome-RANParameter-Item", + "ControlOutcome-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_ControlOutcome_RANParameter_Item_tags_1, + sizeof(asn_DEF_ControlOutcome_RANParameter_Item_tags_1) + /sizeof(asn_DEF_ControlOutcome_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_ControlOutcome_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_ControlOutcome_RANParameter_Item_tags_1) + /sizeof(asn_DEF_ControlOutcome_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ControlOutcome_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_ControlOutcome_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/CoreCPID.c b/Bouncer/e2sm_rc/lib/CoreCPID.c new file mode 100644 index 0000000..c3764b7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/CoreCPID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "CoreCPID.h" + +#include "GUAMI.h" +#include "GUMMEI.h" +static asn_oer_constraints_t asn_OER_type_CoreCPID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_CoreCPID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_CoreCPID_1[] = { + { ATF_POINTER, 0, offsetof(struct CoreCPID, choice.fiveGC), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveGC" + }, + { ATF_POINTER, 0, offsetof(struct CoreCPID, choice.ePC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUMMEI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ePC" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_CoreCPID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveGC */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ePC */ +}; +static asn_CHOICE_specifics_t asn_SPC_CoreCPID_specs_1 = { + sizeof(struct CoreCPID), + offsetof(struct CoreCPID, _asn_ctx), + offsetof(struct CoreCPID, present), + sizeof(((struct CoreCPID *)0)->present), + asn_MAP_CoreCPID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_CoreCPID = { + "CoreCPID", + "CoreCPID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_CoreCPID_constr_1, &asn_PER_type_CoreCPID_constr_1, CHOICE_constraint }, + asn_MBR_CoreCPID_1, + 2, /* Elements count */ + &asn_SPC_CoreCPID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E-UTRA-ARFCN.c b/Bouncer/e2sm_rc/lib/E-UTRA-ARFCN.c new file mode 100644 index 0000000..00bd514 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E-UTRA-ARFCN.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E-UTRA-ARFCN.h" + +int +E_UTRA_ARFCN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_E_UTRA_ARFCN_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +asn_per_constraints_t asn_PER_type_E_UTRA_ARFCN_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_E_UTRA_ARFCN_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_E_UTRA_ARFCN = { + "E-UTRA-ARFCN", + "E-UTRA-ARFCN", + &asn_OP_NativeInteger, + asn_DEF_E_UTRA_ARFCN_tags_1, + sizeof(asn_DEF_E_UTRA_ARFCN_tags_1) + /sizeof(asn_DEF_E_UTRA_ARFCN_tags_1[0]), /* 1 */ + asn_DEF_E_UTRA_ARFCN_tags_1, /* Same as above */ + sizeof(asn_DEF_E_UTRA_ARFCN_tags_1) + /sizeof(asn_DEF_E_UTRA_ARFCN_tags_1[0]), /* 1 */ + { &asn_OER_type_E_UTRA_ARFCN_constr_1, &asn_PER_type_E_UTRA_ARFCN_constr_1, E_UTRA_ARFCN_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E-UTRA-PCI.c b/Bouncer/e2sm_rc/lib/E-UTRA-PCI.c new file mode 100644 index 0000000..6477cd1 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E-UTRA-PCI.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E-UTRA-PCI.h" + +int +E_UTRA_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 503)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_E_UTRA_PCI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_E_UTRA_PCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 9, 9, 0, 503 } /* (0..503,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_E_UTRA_PCI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_E_UTRA_PCI = { + "E-UTRA-PCI", + "E-UTRA-PCI", + &asn_OP_NativeInteger, + asn_DEF_E_UTRA_PCI_tags_1, + sizeof(asn_DEF_E_UTRA_PCI_tags_1) + /sizeof(asn_DEF_E_UTRA_PCI_tags_1[0]), /* 1 */ + asn_DEF_E_UTRA_PCI_tags_1, /* Same as above */ + sizeof(asn_DEF_E_UTRA_PCI_tags_1) + /sizeof(asn_DEF_E_UTRA_PCI_tags_1[0]), /* 1 */ + { &asn_OER_type_E_UTRA_PCI_constr_1, &asn_PER_type_E_UTRA_PCI_constr_1, E_UTRA_PCI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E-UTRA-TAC.c b/Bouncer/e2sm_rc/lib/E-UTRA-TAC.c new file mode 100644 index 0000000..29b30e9 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E-UTRA-TAC.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E-UTRA-TAC.h" + +int +E_UTRA_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 2)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_E_UTRA_TAC_constr_1 CC_NOTUSED = { + { 0, 0 }, + 2 /* (SIZE(2..2)) */}; +asn_per_constraints_t asn_PER_type_E_UTRA_TAC_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_E_UTRA_TAC_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_E_UTRA_TAC = { + "E-UTRA-TAC", + "E-UTRA-TAC", + &asn_OP_OCTET_STRING, + asn_DEF_E_UTRA_TAC_tags_1, + sizeof(asn_DEF_E_UTRA_TAC_tags_1) + /sizeof(asn_DEF_E_UTRA_TAC_tags_1[0]), /* 1 */ + asn_DEF_E_UTRA_TAC_tags_1, /* Same as above */ + sizeof(asn_DEF_E_UTRA_TAC_tags_1) + /sizeof(asn_DEF_E_UTRA_TAC_tags_1[0]), /* 1 */ + { &asn_OER_type_E_UTRA_TAC_constr_1, &asn_PER_type_E_UTRA_TAC_constr_1, E_UTRA_TAC_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1-Item.c new file mode 100644 index 0000000..ba8dfa8 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1-Item.c @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format1-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format1_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format1_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ActionDefinition_Format1_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_E2SM_RC_ActionDefinition_Format1_Item_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format1_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format1_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format1_Item_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format1_Item), + offsetof(struct E2SM_RC_ActionDefinition_Format1_Item, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format1_Item_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ActionDefinition_Format1_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format1_Item = { + "E2SM-RC-ActionDefinition-Format1-Item", + "E2SM-RC-ActionDefinition-Format1-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format1_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format1_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format1_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format1_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1.c new file mode 100644 index 0000000..7cd3499 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format1.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format1.h" + +#include "E2SM-RC-ActionDefinition-Format1-Item.h" +static int +memb_ranP_ToBeReported_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_ToBeReported_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_ToBeReported_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_ToBeReported_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_ToBeReported_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_ToBeReported_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ActionDefinition_Format1_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_ToBeReported_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_ToBeReported_List_specs_2 = { + sizeof(struct E2SM_RC_ActionDefinition_Format1__ranP_ToBeReported_List), + offsetof(struct E2SM_RC_ActionDefinition_Format1__ranP_ToBeReported_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_ToBeReported_List_2 = { + "ranP-ToBeReported-List", + "ranP-ToBeReported-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_ToBeReported_List_tags_2, + sizeof(asn_DEF_ranP_ToBeReported_List_tags_2) + /sizeof(asn_DEF_ranP_ToBeReported_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranP_ToBeReported_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ranP_ToBeReported_List_tags_2) + /sizeof(asn_DEF_ranP_ToBeReported_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ranP_ToBeReported_List_constr_2, &asn_PER_type_ranP_ToBeReported_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranP_ToBeReported_List_2, + 1, /* Single element */ + &asn_SPC_ranP_ToBeReported_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format1, ranP_ToBeReported_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranP_ToBeReported_List_2, + 0, + { &asn_OER_memb_ranP_ToBeReported_List_constr_2, &asn_PER_memb_ranP_ToBeReported_List_constr_2, memb_ranP_ToBeReported_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-ToBeReported-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranP-ToBeReported-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format1_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format1), + offsetof(struct E2SM_RC_ActionDefinition_Format1, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format1 = { + "E2SM-RC-ActionDefinition-Format1", + "E2SM-RC-ActionDefinition-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format1_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2-Item.c new file mode 100644 index 0000000..9a9621b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2-Item.c @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format2-Item.h" + +#include "RANParameter-Testing.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format2_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format2_Item, ric_PolicyAction), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_PolicyAction, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyAction" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ActionDefinition_Format2_Item, ric_PolicyConditionDefinition), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyConditionDefinition" + }, +}; +static const int asn_MAP_E2SM_RC_ActionDefinition_Format2_Item_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format2_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format2_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-PolicyAction */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-PolicyConditionDefinition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format2_Item_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format2_Item), + offsetof(struct E2SM_RC_ActionDefinition_Format2_Item, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format2_Item_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ActionDefinition_Format2_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format2_Item = { + "E2SM-RC-ActionDefinition-Format2-Item", + "E2SM-RC-ActionDefinition-Format2-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format2_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format2_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format2_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format2_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2.c new file mode 100644 index 0000000..057bff9 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format2.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format2.h" + +#include "E2SM-RC-ActionDefinition-Format2-Item.h" +static int +memb_ric_PolicyConditions_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_PolicyConditions_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ric_PolicyConditions_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_PolicyConditions_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ric_PolicyConditions_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_PolicyConditions_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ActionDefinition_Format2_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_PolicyConditions_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_PolicyConditions_List_specs_2 = { + sizeof(struct E2SM_RC_ActionDefinition_Format2__ric_PolicyConditions_List), + offsetof(struct E2SM_RC_ActionDefinition_Format2__ric_PolicyConditions_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_PolicyConditions_List_2 = { + "ric-PolicyConditions-List", + "ric-PolicyConditions-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_PolicyConditions_List_tags_2, + sizeof(asn_DEF_ric_PolicyConditions_List_tags_2) + /sizeof(asn_DEF_ric_PolicyConditions_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_PolicyConditions_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_PolicyConditions_List_tags_2) + /sizeof(asn_DEF_ric_PolicyConditions_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_PolicyConditions_List_constr_2, &asn_PER_type_ric_PolicyConditions_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_PolicyConditions_List_2, + 1, /* Single element */ + &asn_SPC_ric_PolicyConditions_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format2, ric_PolicyConditions_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_PolicyConditions_List_2, + 0, + { &asn_OER_memb_ric_PolicyConditions_List_constr_2, &asn_PER_memb_ric_PolicyConditions_List_constr_2, memb_ric_PolicyConditions_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-PolicyConditions-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-PolicyConditions-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format2_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format2), + offsetof(struct E2SM_RC_ActionDefinition_Format2, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format2_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format2 = { + "E2SM-RC-ActionDefinition-Format2", + "E2SM-RC-ActionDefinition-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format2_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format2_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3-Item.c new file mode 100644 index 0000000..1afbd78 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3-Item.c @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format3-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format3_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format3_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ActionDefinition_Format3_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_E2SM_RC_ActionDefinition_Format3_Item_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format3_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format3_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format3_Item_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format3_Item), + offsetof(struct E2SM_RC_ActionDefinition_Format3_Item, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format3_Item_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ActionDefinition_Format3_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format3_Item = { + "E2SM-RC-ActionDefinition-Format3-Item", + "E2SM-RC-ActionDefinition-Format3-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format3_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format3_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format3_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format3_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3.c new file mode 100644 index 0000000..c745f9f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format3.c @@ -0,0 +1,153 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format3.h" + +#include "UEID.h" +#include "E2SM-RC-ActionDefinition-Format3-Item.h" +static int +memb_ranP_InsertIndication_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_InsertIndication_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ActionDefinition_Format3_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_InsertIndication_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_InsertIndication_List_specs_3 = { + sizeof(struct E2SM_RC_ActionDefinition_Format3__ranP_InsertIndication_List), + offsetof(struct E2SM_RC_ActionDefinition_Format3__ranP_InsertIndication_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_InsertIndication_List_3 = { + "ranP-InsertIndication-List", + "ranP-InsertIndication-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_InsertIndication_List_tags_3, + sizeof(asn_DEF_ranP_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ranP_InsertIndication_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ranP_InsertIndication_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ranP_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ranP_InsertIndication_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ranP_InsertIndication_List_constr_3, &asn_PER_type_ranP_InsertIndication_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ranP_InsertIndication_List_3, + 1, /* Single element */ + &asn_SPC_ranP_InsertIndication_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format3_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format3, ric_InsertIndication_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_InsertIndication_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertIndication-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format3, ranP_InsertIndication_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ranP_InsertIndication_List_3, + 0, + { &asn_OER_memb_ranP_InsertIndication_List_constr_3, &asn_PER_memb_ranP_InsertIndication_List_constr_3, memb_ranP_InsertIndication_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-InsertIndication-List" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ActionDefinition_Format3, ueID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, +}; +static const int asn_MAP_E2SM_RC_ActionDefinition_Format3_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format3_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-InsertIndication-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranP-InsertIndication-List */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ueID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format3_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format3), + offsetof(struct E2SM_RC_ActionDefinition_Format3, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format3_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ActionDefinition_Format3_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format3 = { + "E2SM-RC-ActionDefinition-Format3", + "E2SM-RC-ActionDefinition-Format3", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format3_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format3_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format3_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format3_1, + 3, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format3_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Indication-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Indication-Item.c new file mode 100644 index 0000000..8ec642f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Indication-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format4-Indication-Item.h" + +#include "E2SM-RC-ActionDefinition-Format4-RANP-Item.h" +static int +memb_ranP_InsertIndication_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_InsertIndication_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_InsertIndication_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_InsertIndication_List_specs_3 = { + sizeof(struct E2SM_RC_ActionDefinition_Format4_Indication_Item__ranP_InsertIndication_List), + offsetof(struct E2SM_RC_ActionDefinition_Format4_Indication_Item__ranP_InsertIndication_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_InsertIndication_List_3 = { + "ranP-InsertIndication-List", + "ranP-InsertIndication-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_InsertIndication_List_tags_3, + sizeof(asn_DEF_ranP_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ranP_InsertIndication_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ranP_InsertIndication_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ranP_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ranP_InsertIndication_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ranP_InsertIndication_List_constr_3, &asn_PER_type_ranP_InsertIndication_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ranP_InsertIndication_List_3, + 1, /* Single element */ + &asn_SPC_ranP_InsertIndication_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_Indication_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format4_Indication_Item, ric_InsertIndication_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_InsertIndication_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertIndication-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format4_Indication_Item, ranP_InsertIndication_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ranP_InsertIndication_List_3, + 0, + { &asn_OER_memb_ranP_InsertIndication_List_constr_3, &asn_PER_memb_ranP_InsertIndication_List_constr_3, memb_ranP_InsertIndication_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-InsertIndication-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format4_Indication_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-InsertIndication-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranP-InsertIndication-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_Indication_Item_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format4_Indication_Item), + offsetof(struct E2SM_RC_ActionDefinition_Format4_Indication_Item, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format4_Indication_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item = { + "E2SM-RC-ActionDefinition-Format4-Indication-Item", + "E2SM-RC-ActionDefinition-Format4-Indication-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format4_Indication_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format4_Indication_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-RANP-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-RANP-Item.c new file mode 100644 index 0000000..5b21ba5 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-RANP-Item.c @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format4-RANP-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_RANP_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format4_RANP_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ActionDefinition_Format4_RANP_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_E2SM_RC_ActionDefinition_Format4_RANP_Item_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format4_RANP_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_RANP_Item_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format4_RANP_Item), + offsetof(struct E2SM_RC_ActionDefinition_Format4_RANP_Item, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format4_RANP_Item_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ActionDefinition_Format4_RANP_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item = { + "E2SM-RC-ActionDefinition-Format4-RANP-Item", + "E2SM-RC-ActionDefinition-Format4-RANP-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_RANP_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format4_RANP_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format4_RANP_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Style-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Style-Item.c new file mode 100644 index 0000000..c2ec5e4 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4-Style-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format4-Style-Item.h" + +#include "E2SM-RC-ActionDefinition-Format4-Indication-Item.h" +static int +memb_ric_InsertIndication_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_InsertIndication_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ActionDefinition_Format4_Indication_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_InsertIndication_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_InsertIndication_List_specs_3 = { + sizeof(struct E2SM_RC_ActionDefinition_Format4_Style_Item__ric_InsertIndication_List), + offsetof(struct E2SM_RC_ActionDefinition_Format4_Style_Item__ric_InsertIndication_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_InsertIndication_List_3 = { + "ric-InsertIndication-List", + "ric-InsertIndication-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_InsertIndication_List_tags_3, + sizeof(asn_DEF_ric_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ric_InsertIndication_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ric_InsertIndication_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ric_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ric_InsertIndication_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ric_InsertIndication_List_constr_3, &asn_PER_type_ric_InsertIndication_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ric_InsertIndication_List_3, + 1, /* Single element */ + &asn_SPC_ric_InsertIndication_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_Style_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format4_Style_Item, requested_Insert_Style_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "requested-Insert-Style-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format4_Style_Item, ric_InsertIndication_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ric_InsertIndication_List_3, + 0, + { &asn_OER_memb_ric_InsertIndication_List_constr_3, &asn_PER_memb_ric_InsertIndication_List_constr_3, memb_ric_InsertIndication_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-InsertIndication-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format4_Style_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* requested-Insert-Style-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-InsertIndication-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_Style_Item_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format4_Style_Item), + offsetof(struct E2SM_RC_ActionDefinition_Format4_Style_Item, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format4_Style_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item = { + "E2SM-RC-ActionDefinition-Format4-Style-Item", + "E2SM-RC-ActionDefinition-Format4-Style-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format4_Style_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format4_Style_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4.c new file mode 100644 index 0000000..4044d2b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition-Format4.c @@ -0,0 +1,143 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition-Format4.h" + +#include "UEID.h" +#include "E2SM-RC-ActionDefinition-Format4-Style-Item.h" +static int +memb_ric_InsertStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_InsertStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ActionDefinition_Format4_Style_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_InsertStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_InsertStyle_List_specs_2 = { + sizeof(struct E2SM_RC_ActionDefinition_Format4__ric_InsertStyle_List), + offsetof(struct E2SM_RC_ActionDefinition_Format4__ric_InsertStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_InsertStyle_List_2 = { + "ric-InsertStyle-List", + "ric-InsertStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_InsertStyle_List_tags_2, + sizeof(asn_DEF_ric_InsertStyle_List_tags_2) + /sizeof(asn_DEF_ric_InsertStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_InsertStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_InsertStyle_List_tags_2) + /sizeof(asn_DEF_ric_InsertStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_InsertStyle_List_constr_2, &asn_PER_type_ric_InsertStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_InsertStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_InsertStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_Format4_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition_Format4, ric_InsertStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_InsertStyle_List_2, + 0, + { &asn_OER_memb_ric_InsertStyle_List_constr_2, &asn_PER_memb_ric_InsertStyle_List_constr_2, memb_ric_InsertStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-InsertStyle-List" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ActionDefinition_Format4, ueID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, +}; +static const int asn_MAP_E2SM_RC_ActionDefinition_Format4_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_Format4_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_Format4_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-InsertStyle-List */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_Format4_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition_Format4), + offsetof(struct E2SM_RC_ActionDefinition_Format4, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_Format4_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ActionDefinition_Format4_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition_Format4 = { + "E2SM-RC-ActionDefinition-Format4", + "E2SM-RC-ActionDefinition-Format4", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_Format4_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_Format4_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_Format4_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_Format4_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_Format4_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition.c new file mode 100644 index 0000000..3d18e81 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ActionDefinition.c @@ -0,0 +1,141 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ActionDefinition.h" + +#include "E2SM-RC-ActionDefinition-Format1.h" +#include "E2SM-RC-ActionDefinition-Format2.h" +#include "E2SM-RC-ActionDefinition-Format3.h" +#include "E2SM-RC-ActionDefinition-Format4.h" +static asn_oer_constraints_t asn_OER_type_ric_actionDefinition_formats_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_actionDefinition_formats_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_actionDefinition_formats_3[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats, choice.actionDefinition_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ActionDefinition_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats, choice.actionDefinition_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ActionDefinition_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-Format2" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats, choice.actionDefinition_Format3), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ActionDefinition_Format3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-Format3" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats, choice.actionDefinition_Format4), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ActionDefinition_Format4, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "actionDefinition-Format4" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_actionDefinition_formats_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* actionDefinition-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* actionDefinition-Format2 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* actionDefinition-Format3 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* actionDefinition-Format4 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_actionDefinition_formats_specs_3 = { + sizeof(struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats), + offsetof(struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats, _asn_ctx), + offsetof(struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats, present), + sizeof(((struct E2SM_RC_ActionDefinition__ric_actionDefinition_formats *)0)->present), + asn_MAP_ric_actionDefinition_formats_tag2el_3, + 4, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_actionDefinition_formats_3 = { + "ric-actionDefinition-formats", + "ric-actionDefinition-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_actionDefinition_formats_constr_3, &asn_PER_type_ric_actionDefinition_formats_constr_3, CHOICE_constraint }, + asn_MBR_ric_actionDefinition_formats_3, + 4, /* Elements count */ + &asn_SPC_ric_actionDefinition_formats_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_ActionDefinition_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition, ric_Style_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-Style-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ActionDefinition, ric_actionDefinition_formats), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_actionDefinition_formats_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-actionDefinition-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ActionDefinition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ActionDefinition_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-Style-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-actionDefinition-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ActionDefinition_specs_1 = { + sizeof(struct E2SM_RC_ActionDefinition), + offsetof(struct E2SM_RC_ActionDefinition, _asn_ctx), + asn_MAP_E2SM_RC_ActionDefinition_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ActionDefinition = { + "E2SM-RC-ActionDefinition", + "E2SM-RC-ActionDefinition", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ActionDefinition_tags_1, + sizeof(asn_DEF_E2SM_RC_ActionDefinition_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ActionDefinition_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ActionDefinition_tags_1) + /sizeof(asn_DEF_E2SM_RC_ActionDefinition_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ActionDefinition_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ActionDefinition_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID-Format1.c new file mode 100644 index 0000000..406beb8 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID-Format1.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-CallProcessID-Format1.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_CallProcessID_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_CallProcessID_Format1, ric_callProcess_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RAN_CallProcess_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-callProcess-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_CallProcessID_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_CallProcessID_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-callProcess-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_CallProcessID_Format1_specs_1 = { + sizeof(struct E2SM_RC_CallProcessID_Format1), + offsetof(struct E2SM_RC_CallProcessID_Format1, _asn_ctx), + asn_MAP_E2SM_RC_CallProcessID_Format1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_CallProcessID_Format1 = { + "E2SM-RC-CallProcessID-Format1", + "E2SM-RC-CallProcessID-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_CallProcessID_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_CallProcessID_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_CallProcessID_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_CallProcessID_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_CallProcessID_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_CallProcessID_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_CallProcessID_Format1_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_CallProcessID_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID.c b/Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID.c new file mode 100644 index 0000000..3d637fa --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-CallProcessID.c @@ -0,0 +1,98 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-CallProcessID.h" + +#include "E2SM-RC-CallProcessID-Format1.h" +static asn_oer_constraints_t asn_OER_type_ric_callProcessID_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_callProcessID_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_callProcessID_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_CallProcessID__ric_callProcessID_formats, choice.callProcessID_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_CallProcessID_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "callProcessID-Format1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_callProcessID_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* callProcessID-Format1 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_callProcessID_formats_specs_2 = { + sizeof(struct E2SM_RC_CallProcessID__ric_callProcessID_formats), + offsetof(struct E2SM_RC_CallProcessID__ric_callProcessID_formats, _asn_ctx), + offsetof(struct E2SM_RC_CallProcessID__ric_callProcessID_formats, present), + sizeof(((struct E2SM_RC_CallProcessID__ric_callProcessID_formats *)0)->present), + asn_MAP_ric_callProcessID_formats_tag2el_2, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_callProcessID_formats_2 = { + "ric-callProcessID-formats", + "ric-callProcessID-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_callProcessID_formats_constr_2, &asn_PER_type_ric_callProcessID_formats_constr_2, CHOICE_constraint }, + asn_MBR_ric_callProcessID_formats_2, + 1, /* Elements count */ + &asn_SPC_ric_callProcessID_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_CallProcessID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_CallProcessID, ric_callProcessID_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_callProcessID_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-callProcessID-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_CallProcessID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_CallProcessID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-callProcessID-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_CallProcessID_specs_1 = { + sizeof(struct E2SM_RC_CallProcessID), + offsetof(struct E2SM_RC_CallProcessID, _asn_ctx), + asn_MAP_E2SM_RC_CallProcessID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_CallProcessID = { + "E2SM-RC-CallProcessID", + "E2SM-RC-CallProcessID", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_CallProcessID_tags_1, + sizeof(asn_DEF_E2SM_RC_CallProcessID_tags_1) + /sizeof(asn_DEF_E2SM_RC_CallProcessID_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_CallProcessID_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_CallProcessID_tags_1) + /sizeof(asn_DEF_E2SM_RC_CallProcessID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_CallProcessID_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_CallProcessID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format1.c new file mode 100644 index 0000000..37549ce --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format1.c @@ -0,0 +1,133 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlHeader-Format1.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_ric_ControlDecision_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_ControlDecision_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_ric_ControlDecision_value2enum_5[] = { + { 0, 6, "accept" }, + { 1, 6, "reject" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_ric_ControlDecision_enum2value_5[] = { + 0, /* accept(0) */ + 1 /* reject(1) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_ric_ControlDecision_specs_5 = { + asn_MAP_ric_ControlDecision_value2enum_5, /* "tag" => N; sorted by tag */ + asn_MAP_ric_ControlDecision_enum2value_5, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlDecision_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlDecision_5 = { + "ric-ControlDecision", + "ric-ControlDecision", + &asn_OP_NativeEnumerated, + asn_DEF_ric_ControlDecision_tags_5, + sizeof(asn_DEF_ric_ControlDecision_tags_5) + /sizeof(asn_DEF_ric_ControlDecision_tags_5[0]) - 1, /* 1 */ + asn_DEF_ric_ControlDecision_tags_5, /* Same as above */ + sizeof(asn_DEF_ric_ControlDecision_tags_5) + /sizeof(asn_DEF_ric_ControlDecision_tags_5[0]), /* 2 */ + { &asn_OER_type_ric_ControlDecision_constr_5, &asn_PER_type_ric_ControlDecision_constr_5, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_ric_ControlDecision_specs_5 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlHeader_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlHeader_Format1, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlHeader_Format1, ric_Style_Type), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-Style-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlHeader_Format1, ric_ControlAction_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlAction-ID" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ControlHeader_Format1, ric_ControlDecision), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ric_ControlDecision_5, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlDecision" + }, +}; +static const int asn_MAP_E2SM_RC_ControlHeader_Format1_oms_1[] = { 3 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlHeader_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlHeader_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-Style-Type */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-ControlAction-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ric-ControlDecision */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlHeader_Format1_specs_1 = { + sizeof(struct E2SM_RC_ControlHeader_Format1), + offsetof(struct E2SM_RC_ControlHeader_Format1, _asn_ctx), + asn_MAP_E2SM_RC_ControlHeader_Format1_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ControlHeader_Format1_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlHeader_Format1 = { + "E2SM-RC-ControlHeader-Format1", + "E2SM-RC-ControlHeader-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlHeader_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlHeader_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlHeader_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlHeader_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlHeader_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlHeader_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlHeader_Format1_1, + 4, /* Elements count */ + &asn_SPC_E2SM_RC_ControlHeader_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format2.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format2.c new file mode 100644 index 0000000..36367c3 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader-Format2.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlHeader-Format2.h" + +#include "UEID.h" +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_ric_ControlDecision_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_ControlDecision_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_ric_ControlDecision_value2enum_3[] = { + { 0, 6, "accept" }, + { 1, 6, "reject" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_ric_ControlDecision_enum2value_3[] = { + 0, /* accept(0) */ + 1 /* reject(1) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_ric_ControlDecision_specs_3 = { + asn_MAP_ric_ControlDecision_value2enum_3, /* "tag" => N; sorted by tag */ + asn_MAP_ric_ControlDecision_enum2value_3, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlDecision_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlDecision_3 = { + "ric-ControlDecision", + "ric-ControlDecision", + &asn_OP_NativeEnumerated, + asn_DEF_ric_ControlDecision_tags_3, + sizeof(asn_DEF_ric_ControlDecision_tags_3) + /sizeof(asn_DEF_ric_ControlDecision_tags_3[0]) - 1, /* 1 */ + asn_DEF_ric_ControlDecision_tags_3, /* Same as above */ + sizeof(asn_DEF_ric_ControlDecision_tags_3) + /sizeof(asn_DEF_ric_ControlDecision_tags_3[0]), /* 2 */ + { &asn_OER_type_ric_ControlDecision_constr_3, &asn_PER_type_ric_ControlDecision_constr_3, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_ric_ControlDecision_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlHeader_Format2_1[] = { + { ATF_POINTER, 2, offsetof(struct E2SM_RC_ControlHeader_Format2, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_ControlHeader_Format2, ric_ControlDecision), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ric_ControlDecision_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlDecision" + }, +}; +static const int asn_MAP_E2SM_RC_ControlHeader_Format2_oms_1[] = { 0, 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlHeader_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlHeader_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-ControlDecision */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlHeader_Format2_specs_1 = { + sizeof(struct E2SM_RC_ControlHeader_Format2), + offsetof(struct E2SM_RC_ControlHeader_Format2, _asn_ctx), + asn_MAP_E2SM_RC_ControlHeader_Format2_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_ControlHeader_Format2_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlHeader_Format2 = { + "E2SM-RC-ControlHeader-Format2", + "E2SM-RC-ControlHeader-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlHeader_Format2_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlHeader_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlHeader_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlHeader_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlHeader_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlHeader_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlHeader_Format2_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlHeader_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader.c new file mode 100644 index 0000000..a789e08 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlHeader.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlHeader.h" + +#include "E2SM-RC-ControlHeader-Format1.h" +#include "E2SM-RC-ControlHeader-Format2.h" +static asn_oer_constraints_t asn_OER_type_ric_controlHeader_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_controlHeader_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_controlHeader_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ControlHeader__ric_controlHeader_formats, choice.controlHeader_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlHeader_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "controlHeader-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ControlHeader__ric_controlHeader_formats, choice.controlHeader_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlHeader_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "controlHeader-Format2" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_controlHeader_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* controlHeader-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* controlHeader-Format2 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_controlHeader_formats_specs_2 = { + sizeof(struct E2SM_RC_ControlHeader__ric_controlHeader_formats), + offsetof(struct E2SM_RC_ControlHeader__ric_controlHeader_formats, _asn_ctx), + offsetof(struct E2SM_RC_ControlHeader__ric_controlHeader_formats, present), + sizeof(((struct E2SM_RC_ControlHeader__ric_controlHeader_formats *)0)->present), + asn_MAP_ric_controlHeader_formats_tag2el_2, + 2, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_controlHeader_formats_2 = { + "ric-controlHeader-formats", + "ric-controlHeader-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_controlHeader_formats_constr_2, &asn_PER_type_ric_controlHeader_formats_constr_2, CHOICE_constraint }, + asn_MBR_ric_controlHeader_formats_2, + 2, /* Elements count */ + &asn_SPC_ric_controlHeader_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_ControlHeader_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlHeader, ric_controlHeader_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_controlHeader_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-controlHeader-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlHeader_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlHeader_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-controlHeader-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlHeader_specs_1 = { + sizeof(struct E2SM_RC_ControlHeader), + offsetof(struct E2SM_RC_ControlHeader, _asn_ctx), + asn_MAP_E2SM_RC_ControlHeader_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlHeader = { + "E2SM-RC-ControlHeader", + "E2SM-RC-ControlHeader", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlHeader_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlHeader_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlHeader_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlHeader_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlHeader_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlHeader_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlHeader_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlHeader_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1-Item.c new file mode 100644 index 0000000..4fab0ab --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlMessage-Format1-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format1_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format1_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format1_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlMessage_Format1_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlMessage_Format1_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format1_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlMessage_Format1_Item), + offsetof(struct E2SM_RC_ControlMessage_Format1_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlMessage_Format1_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format1_Item = { + "E2SM-RC-ControlMessage-Format1-Item", + "E2SM-RC-ControlMessage-Format1-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlMessage_Format1_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlMessage_Format1_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlMessage_Format1_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlMessage_Format1_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1.c new file mode 100644 index 0000000..7721221 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format1.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlMessage-Format1.h" + +#include "E2SM-RC-ControlMessage-Format1-Item.h" +static int +memb_ranP_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlMessage_Format1_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_List_specs_2 = { + sizeof(struct E2SM_RC_ControlMessage_Format1__ranP_List), + offsetof(struct E2SM_RC_ControlMessage_Format1__ranP_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_List_2 = { + "ranP-List", + "ranP-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_List_tags_2, + sizeof(asn_DEF_ranP_List_tags_2) + /sizeof(asn_DEF_ranP_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranP_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ranP_List_tags_2) + /sizeof(asn_DEF_ranP_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ranP_List_constr_2, &asn_PER_type_ranP_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranP_List_2, + 1, /* Single element */ + &asn_SPC_ranP_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format1, ranP_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranP_List_2, + 0, + { &asn_OER_memb_ranP_List_constr_2, &asn_PER_memb_ranP_List_constr_2, memb_ranP_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlMessage_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlMessage_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranP-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format1_specs_1 = { + sizeof(struct E2SM_RC_ControlMessage_Format1), + offsetof(struct E2SM_RC_ControlMessage_Format1, _asn_ctx), + asn_MAP_E2SM_RC_ControlMessage_Format1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format1 = { + "E2SM-RC-ControlMessage-Format1", + "E2SM-RC-ControlMessage-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlMessage_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlMessage_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlMessage_Format1_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlMessage_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-ControlAction-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-ControlAction-Item.c new file mode 100644 index 0000000..8cf50ff --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-ControlAction-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlMessage-Format2-ControlAction-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format2_ControlAction_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format2_ControlAction_Item, ric_ControlAction_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlAction-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format2_ControlAction_Item, ranP_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlMessage_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ControlAction-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranP-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format2_ControlAction_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlMessage_Format2_ControlAction_Item), + offsetof(struct E2SM_RC_ControlMessage_Format2_ControlAction_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item = { + "E2SM-RC-ControlMessage-Format2-ControlAction-Item", + "E2SM-RC-ControlMessage-Format2-ControlAction-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlMessage_Format2_ControlAction_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlMessage_Format2_ControlAction_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-Style-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-Style-Item.c new file mode 100644 index 0000000..db5a7c7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2-Style-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlMessage-Format2-Style-Item.h" + +#include "E2SM-RC-ControlMessage-Format2-ControlAction-Item.h" +static int +memb_ric_ControlAction_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_ControlAction_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_ControlAction_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_ControlAction_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ControlAction_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_ControlAction_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlMessage_Format2_ControlAction_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlAction_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ControlAction_List_specs_3 = { + sizeof(struct E2SM_RC_ControlMessage_Format2_Style_Item__ric_ControlAction_List), + offsetof(struct E2SM_RC_ControlMessage_Format2_Style_Item__ric_ControlAction_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlAction_List_3 = { + "ric-ControlAction-List", + "ric-ControlAction-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ControlAction_List_tags_3, + sizeof(asn_DEF_ric_ControlAction_List_tags_3) + /sizeof(asn_DEF_ric_ControlAction_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ric_ControlAction_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ric_ControlAction_List_tags_3) + /sizeof(asn_DEF_ric_ControlAction_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ric_ControlAction_List_constr_3, &asn_PER_type_ric_ControlAction_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ric_ControlAction_List_3, + 1, /* Single element */ + &asn_SPC_ric_ControlAction_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format2_Style_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format2_Style_Item, indicated_Control_Style_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicated-Control-Style-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format2_Style_Item, ric_ControlAction_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ric_ControlAction_List_3, + 0, + { &asn_OER_memb_ric_ControlAction_List_constr_3, &asn_PER_memb_ric_ControlAction_List_constr_3, memb_ric_ControlAction_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ControlAction-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlMessage_Format2_Style_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* indicated-Control-Style-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-ControlAction-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format2_Style_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlMessage_Format2_Style_Item), + offsetof(struct E2SM_RC_ControlMessage_Format2_Style_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlMessage_Format2_Style_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item = { + "E2SM-RC-ControlMessage-Format2-Style-Item", + "E2SM-RC-ControlMessage-Format2-Style-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlMessage_Format2_Style_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlMessage_Format2_Style_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2.c new file mode 100644 index 0000000..041281f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage-Format2.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlMessage-Format2.h" + +#include "E2SM-RC-ControlMessage-Format2-Style-Item.h" +static int +memb_ric_ControlStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_ControlStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlMessage_Format2_Style_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ControlStyle_List_specs_2 = { + sizeof(struct E2SM_RC_ControlMessage_Format2__ric_ControlStyle_List), + offsetof(struct E2SM_RC_ControlMessage_Format2__ric_ControlStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlStyle_List_2 = { + "ric-ControlStyle-List", + "ric-ControlStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ControlStyle_List_tags_2, + sizeof(asn_DEF_ric_ControlStyle_List_tags_2) + /sizeof(asn_DEF_ric_ControlStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_ControlStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_ControlStyle_List_tags_2) + /sizeof(asn_DEF_ric_ControlStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_ControlStyle_List_constr_2, &asn_PER_type_ric_ControlStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_ControlStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_ControlStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage_Format2, ric_ControlStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_ControlStyle_List_2, + 0, + { &asn_OER_memb_ric_ControlStyle_List_constr_2, &asn_PER_memb_ric_ControlStyle_List_constr_2, memb_ric_ControlStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ControlStyle-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlMessage_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlMessage_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-ControlStyle-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_Format2_specs_1 = { + sizeof(struct E2SM_RC_ControlMessage_Format2), + offsetof(struct E2SM_RC_ControlMessage_Format2, _asn_ctx), + asn_MAP_E2SM_RC_ControlMessage_Format2_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage_Format2 = { + "E2SM-RC-ControlMessage-Format2", + "E2SM-RC-ControlMessage-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlMessage_Format2_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlMessage_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlMessage_Format2_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlMessage_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage.c new file mode 100644 index 0000000..52f42ef --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlMessage.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlMessage.h" + +#include "E2SM-RC-ControlMessage-Format1.h" +#include "E2SM-RC-ControlMessage-Format2.h" +static asn_oer_constraints_t asn_OER_type_ric_controlMessage_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_controlMessage_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_controlMessage_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ControlMessage__ric_controlMessage_formats, choice.controlMessage_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlMessage_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "controlMessage-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ControlMessage__ric_controlMessage_formats, choice.controlMessage_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlMessage_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "controlMessage-Format2" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_controlMessage_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* controlMessage-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* controlMessage-Format2 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_controlMessage_formats_specs_2 = { + sizeof(struct E2SM_RC_ControlMessage__ric_controlMessage_formats), + offsetof(struct E2SM_RC_ControlMessage__ric_controlMessage_formats, _asn_ctx), + offsetof(struct E2SM_RC_ControlMessage__ric_controlMessage_formats, present), + sizeof(((struct E2SM_RC_ControlMessage__ric_controlMessage_formats *)0)->present), + asn_MAP_ric_controlMessage_formats_tag2el_2, + 2, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_controlMessage_formats_2 = { + "ric-controlMessage-formats", + "ric-controlMessage-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_controlMessage_formats_constr_2, &asn_PER_type_ric_controlMessage_formats_constr_2, CHOICE_constraint }, + asn_MBR_ric_controlMessage_formats_2, + 2, /* Elements count */ + &asn_SPC_ric_controlMessage_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_ControlMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlMessage, ric_controlMessage_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_controlMessage_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-controlMessage-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-controlMessage-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlMessage_specs_1 = { + sizeof(struct E2SM_RC_ControlMessage), + offsetof(struct E2SM_RC_ControlMessage, _asn_ctx), + asn_MAP_E2SM_RC_ControlMessage_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlMessage = { + "E2SM-RC-ControlMessage", + "E2SM-RC-ControlMessage", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlMessage_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlMessage_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlMessage_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlMessage_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlMessage_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlMessage_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1-Item.c new file mode 100644 index 0000000..4100d03 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format1-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format1_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format1_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format1_Item, ranParameter_value), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_Value, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format1_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format1_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format1_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format1_Item), + offsetof(struct E2SM_RC_ControlOutcome_Format1_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format1_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format1_Item = { + "E2SM-RC-ControlOutcome-Format1-Item", + "E2SM-RC-ControlOutcome-Format1-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format1_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format1_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format1_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format1_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1.c new file mode 100644 index 0000000..2d2392b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format1.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format1.h" + +#include "E2SM-RC-ControlOutcome-Format1-Item.h" +static int +memb_ranP_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size <= 255)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..255)) */}; +static asn_per_constraints_t asn_PER_type_ranP_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (SIZE(0..255)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..255)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (SIZE(0..255)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlOutcome_Format1_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_List_specs_2 = { + sizeof(struct E2SM_RC_ControlOutcome_Format1__ranP_List), + offsetof(struct E2SM_RC_ControlOutcome_Format1__ranP_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_List_2 = { + "ranP-List", + "ranP-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_List_tags_2, + sizeof(asn_DEF_ranP_List_tags_2) + /sizeof(asn_DEF_ranP_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranP_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ranP_List_tags_2) + /sizeof(asn_DEF_ranP_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ranP_List_constr_2, &asn_PER_type_ranP_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranP_List_2, + 1, /* Single element */ + &asn_SPC_ranP_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format1, ranP_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranP_List_2, + 0, + { &asn_OER_memb_ranP_List_constr_2, &asn_PER_memb_ranP_List_constr_2, memb_ranP_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranP-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format1_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format1), + offsetof(struct E2SM_RC_ControlOutcome_Format1, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format1 = { + "E2SM-RC-ControlOutcome-Format1", + "E2SM-RC-ControlOutcome-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format1_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.c new file mode 100644 index 0000000..eeb9de5 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.h" + +#include "E2SM-RC-ControlOutcome-Format2-RANP-Item.h" +static int +memb_ranP_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_List_specs_3 = { + sizeof(struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item__ranP_List), + offsetof(struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item__ranP_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_List_3 = { + "ranP-List", + "ranP-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_List_tags_3, + sizeof(asn_DEF_ranP_List_tags_3) + /sizeof(asn_DEF_ranP_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ranP_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ranP_List_tags_3) + /sizeof(asn_DEF_ranP_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ranP_List_constr_3, &asn_PER_type_ranP_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ranP_List_3, + 1, /* Single element */ + &asn_SPC_ranP_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item, ric_ControlAction_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlAction-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item, ranP_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ranP_List_3, + 0, + { &asn_OER_memb_ranP_List_constr_3, &asn_PER_memb_ranP_List_constr_3, memb_ranP_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ControlAction-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranP-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item), + offsetof(struct E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item = { + "E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item", + "E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-RANP-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-RANP-Item.c new file mode 100644 index 0000000..f59043e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-RANP-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format2-RANP-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_RANP_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format2_RANP_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format2_RANP_Item, ranParameter_value), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_Value, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format2_RANP_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_RANP_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format2_RANP_Item), + offsetof(struct E2SM_RC_ControlOutcome_Format2_RANP_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format2_RANP_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item = { + "E2SM-RC-ControlOutcome-Format2-RANP-Item", + "E2SM-RC-ControlOutcome-Format2-RANP-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_RANP_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format2_RANP_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format2_RANP_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-Style-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-Style-Item.c new file mode 100644 index 0000000..c358f01 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2-Style-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format2-Style-Item.h" + +#include "E2SM-RC-ControlOutcome-Format2-ControlOutcome-Item.h" +static int +memb_ric_ControlOutcome_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_ControlOutcome_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_ControlOutcome_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_ControlOutcome_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ControlOutcome_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_ControlOutcome_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlOutcome_Format2_ControlOutcome_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlOutcome_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ControlOutcome_List_specs_3 = { + sizeof(struct E2SM_RC_ControlOutcome_Format2_Style_Item__ric_ControlOutcome_List), + offsetof(struct E2SM_RC_ControlOutcome_Format2_Style_Item__ric_ControlOutcome_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlOutcome_List_3 = { + "ric-ControlOutcome-List", + "ric-ControlOutcome-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ControlOutcome_List_tags_3, + sizeof(asn_DEF_ric_ControlOutcome_List_tags_3) + /sizeof(asn_DEF_ric_ControlOutcome_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ric_ControlOutcome_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ric_ControlOutcome_List_tags_3) + /sizeof(asn_DEF_ric_ControlOutcome_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ric_ControlOutcome_List_constr_3, &asn_PER_type_ric_ControlOutcome_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ric_ControlOutcome_List_3, + 1, /* Single element */ + &asn_SPC_ric_ControlOutcome_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_Style_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format2_Style_Item, indicated_Control_Style_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicated-Control-Style-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format2_Style_Item, ric_ControlOutcome_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ric_ControlOutcome_List_3, + 0, + { &asn_OER_memb_ric_ControlOutcome_List_constr_3, &asn_PER_memb_ric_ControlOutcome_List_constr_3, memb_ric_ControlOutcome_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ControlOutcome-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format2_Style_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* indicated-Control-Style-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-ControlOutcome-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_Style_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format2_Style_Item), + offsetof(struct E2SM_RC_ControlOutcome_Format2_Style_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format2_Style_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item = { + "E2SM-RC-ControlOutcome-Format2-Style-Item", + "E2SM-RC-ControlOutcome-Format2-Style-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format2_Style_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format2_Style_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2.c new file mode 100644 index 0000000..7850d2f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format2.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format2.h" + +#include "E2SM-RC-ControlOutcome-Format2-Style-Item.h" +static int +memb_ric_ControlStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_ControlStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlOutcome_Format2_Style_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ControlStyle_List_specs_2 = { + sizeof(struct E2SM_RC_ControlOutcome_Format2__ric_ControlStyle_List), + offsetof(struct E2SM_RC_ControlOutcome_Format2__ric_ControlStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlStyle_List_2 = { + "ric-ControlStyle-List", + "ric-ControlStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ControlStyle_List_tags_2, + sizeof(asn_DEF_ric_ControlStyle_List_tags_2) + /sizeof(asn_DEF_ric_ControlStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_ControlStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_ControlStyle_List_tags_2) + /sizeof(asn_DEF_ric_ControlStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_ControlStyle_List_constr_2, &asn_PER_type_ric_ControlStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_ControlStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_ControlStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format2, ric_ControlStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_ControlStyle_List_2, + 0, + { &asn_OER_memb_ric_ControlStyle_List_constr_2, &asn_PER_memb_ric_ControlStyle_List_constr_2, memb_ric_ControlStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ControlStyle-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-ControlStyle-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format2_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format2), + offsetof(struct E2SM_RC_ControlOutcome_Format2, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format2_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format2 = { + "E2SM-RC-ControlOutcome-Format2", + "E2SM-RC-ControlOutcome-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format2_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format2_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3-Item.c new file mode 100644 index 0000000..6f7e7a8 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format3-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format3_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format3_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format3_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format3_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format3_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format3_Item_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format3_Item), + offsetof(struct E2SM_RC_ControlOutcome_Format3_Item, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format3_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format3_Item = { + "E2SM-RC-ControlOutcome-Format3-Item", + "E2SM-RC-ControlOutcome-Format3-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format3_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format3_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format3_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format3_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3.c new file mode 100644 index 0000000..4c9d361 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome-Format3.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome-Format3.h" + +#include "E2SM-RC-ControlOutcome-Format3-Item.h" +static int +memb_ranP_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size <= 255)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..255)) */}; +static asn_per_constraints_t asn_PER_type_ranP_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (SIZE(0..255)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..255)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (SIZE(0..255)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_ControlOutcome_Format3_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_List_specs_2 = { + sizeof(struct E2SM_RC_ControlOutcome_Format3__ranP_List), + offsetof(struct E2SM_RC_ControlOutcome_Format3__ranP_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_List_2 = { + "ranP-List", + "ranP-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_List_tags_2, + sizeof(asn_DEF_ranP_List_tags_2) + /sizeof(asn_DEF_ranP_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranP_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ranP_List_tags_2) + /sizeof(asn_DEF_ranP_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ranP_List_constr_2, &asn_PER_type_ranP_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranP_List_2, + 1, /* Single element */ + &asn_SPC_ranP_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_Format3_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome_Format3, ranP_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranP_List_2, + 0, + { &asn_OER_memb_ranP_List_constr_2, &asn_PER_memb_ranP_List_constr_2, memb_ranP_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_Format3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_Format3_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranP-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_Format3_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome_Format3), + offsetof(struct E2SM_RC_ControlOutcome_Format3, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_Format3_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome_Format3 = { + "E2SM-RC-ControlOutcome-Format3", + "E2SM-RC-ControlOutcome-Format3", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_Format3_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_Format3_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_Format3_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_Format3_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_Format3_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome.c b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome.c new file mode 100644 index 0000000..e16fc10 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-ControlOutcome.c @@ -0,0 +1,120 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-ControlOutcome.h" + +#include "E2SM-RC-ControlOutcome-Format1.h" +#include "E2SM-RC-ControlOutcome-Format2.h" +#include "E2SM-RC-ControlOutcome-Format3.h" +static asn_oer_constraints_t asn_OER_type_ric_controlOutcome_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_controlOutcome_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_controlOutcome_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats, choice.controlOutcome_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlOutcome_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "controlOutcome-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats, choice.controlOutcome_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlOutcome_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "controlOutcome-Format2" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats, choice.controlOutcome_Format3), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_ControlOutcome_Format3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "controlOutcome-Format3" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_controlOutcome_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* controlOutcome-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* controlOutcome-Format2 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* controlOutcome-Format3 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_controlOutcome_formats_specs_2 = { + sizeof(struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats), + offsetof(struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats, _asn_ctx), + offsetof(struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats, present), + sizeof(((struct E2SM_RC_ControlOutcome__ric_controlOutcome_formats *)0)->present), + asn_MAP_ric_controlOutcome_formats_tag2el_2, + 3, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_controlOutcome_formats_2 = { + "ric-controlOutcome-formats", + "ric-controlOutcome-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_controlOutcome_formats_constr_2, &asn_PER_type_ric_controlOutcome_formats_constr_2, CHOICE_constraint }, + asn_MBR_ric_controlOutcome_formats_2, + 3, /* Elements count */ + &asn_SPC_ric_controlOutcome_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_ControlOutcome_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_ControlOutcome, ric_controlOutcome_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_controlOutcome_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-controlOutcome-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_ControlOutcome_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_ControlOutcome_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-controlOutcome-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_ControlOutcome_specs_1 = { + sizeof(struct E2SM_RC_ControlOutcome), + offsetof(struct E2SM_RC_ControlOutcome, _asn_ctx), + asn_MAP_E2SM_RC_ControlOutcome_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_ControlOutcome = { + "E2SM-RC-ControlOutcome", + "E2SM-RC-ControlOutcome", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_ControlOutcome_tags_1, + sizeof(asn_DEF_E2SM_RC_ControlOutcome_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_ControlOutcome_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_ControlOutcome_tags_1) + /sizeof(asn_DEF_E2SM_RC_ControlOutcome_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_ControlOutcome_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_ControlOutcome_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1-Item.c new file mode 100644 index 0000000..46305e3 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1-Item.c @@ -0,0 +1,155 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format1-Item.h" + +#include "EventTrigger-UE-Info.h" +#include "EventTrigger-UEevent-Info.h" +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_messageDirection_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_messageDirection_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_messageDirection_value2enum_4[] = { + { 0, 8, "incoming" }, + { 1, 8, "outgoing" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_messageDirection_enum2value_4[] = { + 0, /* incoming(0) */ + 1 /* outgoing(1) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_messageDirection_specs_4 = { + asn_MAP_messageDirection_value2enum_4, /* "tag" => N; sorted by tag */ + asn_MAP_messageDirection_enum2value_4, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_messageDirection_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_messageDirection_4 = { + "messageDirection", + "messageDirection", + &asn_OP_NativeEnumerated, + asn_DEF_messageDirection_tags_4, + sizeof(asn_DEF_messageDirection_tags_4) + /sizeof(asn_DEF_messageDirection_tags_4[0]) - 1, /* 1 */ + asn_DEF_messageDirection_tags_4, /* Same as above */ + sizeof(asn_DEF_messageDirection_tags_4) + /sizeof(asn_DEF_messageDirection_tags_4[0]), /* 2 */ + { &asn_OER_type_messageDirection_constr_4, &asn_PER_type_messageDirection_constr_4, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_messageDirection_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format1_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format1_Item, ric_eventTriggerCondition_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTriggerCondition_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-eventTriggerCondition-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format1_Item, messageType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_MessageType_Choice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageType" + }, + { ATF_POINTER, 4, offsetof(struct E2SM_RC_EventTrigger_Format1_Item, messageDirection), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_messageDirection_4, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageDirection" + }, + { ATF_POINTER, 3, offsetof(struct E2SM_RC_EventTrigger_Format1_Item, associatedUEInfo), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UE_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedUEInfo" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_EventTrigger_Format1_Item, associatedUEEvent), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UEevent_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedUEEvent" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_EventTrigger_Format1_Item, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_E2SM_RC_EventTrigger_Format1_Item_oms_1[] = { 2, 3, 4, 5 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format1_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format1_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-eventTriggerCondition-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* messageType */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* messageDirection */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* associatedUEInfo */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* associatedUEEvent */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format1_Item_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format1_Item), + offsetof(struct E2SM_RC_EventTrigger_Format1_Item, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format1_Item_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_E2SM_RC_EventTrigger_Format1_Item_oms_1, /* Optional members */ + 4, 0, /* Root/Additions */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format1_Item = { + "E2SM-RC-EventTrigger-Format1-Item", + "E2SM-RC-EventTrigger-Format1-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format1_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format1_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format1_Item_1, + 6, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format1_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1.c new file mode 100644 index 0000000..0bee74e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format1.c @@ -0,0 +1,143 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format1.h" + +#include "EventTrigger-UE-Info.h" +#include "E2SM-RC-EventTrigger-Format1-Item.h" +static int +memb_message_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_message_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_message_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_message_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_message_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_message_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_EventTrigger_Format1_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_message_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_message_List_specs_2 = { + sizeof(struct E2SM_RC_EventTrigger_Format1__message_List), + offsetof(struct E2SM_RC_EventTrigger_Format1__message_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_message_List_2 = { + "message-List", + "message-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_message_List_tags_2, + sizeof(asn_DEF_message_List_tags_2) + /sizeof(asn_DEF_message_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_message_List_tags_2, /* Same as above */ + sizeof(asn_DEF_message_List_tags_2) + /sizeof(asn_DEF_message_List_tags_2[0]), /* 2 */ + { &asn_OER_type_message_List_constr_2, &asn_PER_type_message_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_message_List_2, + 1, /* Single element */ + &asn_SPC_message_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format1, message_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_message_List_2, + 0, + { &asn_OER_memb_message_List_constr_2, &asn_PER_memb_message_List_constr_2, memb_message_List_constraint_1 }, + 0, 0, /* No default value */ + "message-List" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_EventTrigger_Format1, globalAssociatedUEInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UE_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalAssociatedUEInfo" + }, +}; +static const int asn_MAP_E2SM_RC_EventTrigger_Format1_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* message-List */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* globalAssociatedUEInfo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format1_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format1), + offsetof(struct E2SM_RC_EventTrigger_Format1, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format1_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_EventTrigger_Format1_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format1 = { + "E2SM-RC-EventTrigger-Format1", + "E2SM-RC-EventTrigger-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format1_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format2.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format2.c new file mode 100644 index 0000000..81d7a4d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format2.c @@ -0,0 +1,84 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format2.h" + +#include "RANParameter-Testing.h" +#include "EventTrigger-UE-Info.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format2, ric_callProcessType_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_CallProcessType_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-callProcessType-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format2, ric_callProcessBreakpoint_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_CallProcessBreakpoint_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-callProcessBreakpoint-ID" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_EventTrigger_Format2, associatedE2NodeInfo), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedE2NodeInfo" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_EventTrigger_Format2, associatedUEInfo), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UE_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedUEInfo" + }, +}; +static const int asn_MAP_E2SM_RC_EventTrigger_Format2_oms_1[] = { 2, 3 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-callProcessType-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-callProcessBreakpoint-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* associatedE2NodeInfo */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* associatedUEInfo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format2_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format2), + offsetof(struct E2SM_RC_EventTrigger_Format2, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format2_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_E2SM_RC_EventTrigger_Format2_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format2 = { + "E2SM-RC-EventTrigger-Format2", + "E2SM-RC-EventTrigger-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format2_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format2_1, + 4, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3-Item.c new file mode 100644 index 0000000..3c8b550 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3-Item.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format3-Item.h" + +#include "EventTrigger-Cell-Info.h" +static int +memb_e2NodeInfoChange_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 512)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_e2NodeInfoChange_ID_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_e2NodeInfoChange_ID_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 9, 9, 1, 512 } /* (1..512,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format3_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format3_Item, ric_eventTriggerCondition_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTriggerCondition_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-eventTriggerCondition-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format3_Item, e2NodeInfoChange_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_e2NodeInfoChange_ID_constr_3, &asn_PER_memb_e2NodeInfoChange_ID_constr_3, memb_e2NodeInfoChange_ID_constraint_1 }, + 0, 0, /* No default value */ + "e2NodeInfoChange-ID" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_EventTrigger_Format3_Item, associatedCellInfo), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_Cell_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedCellInfo" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_EventTrigger_Format3_Item, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_E2SM_RC_EventTrigger_Format3_Item_oms_1[] = { 2, 3 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format3_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format3_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-eventTriggerCondition-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e2NodeInfoChange-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* associatedCellInfo */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format3_Item_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format3_Item), + offsetof(struct E2SM_RC_EventTrigger_Format3_Item, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format3_Item_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_E2SM_RC_EventTrigger_Format3_Item_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format3_Item = { + "E2SM-RC-EventTrigger-Format3-Item", + "E2SM-RC-EventTrigger-Format3-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format3_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format3_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format3_Item_1, + 4, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format3_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3.c new file mode 100644 index 0000000..bc3b9ad --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format3.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format3.h" + +#include "E2SM-RC-EventTrigger-Format3-Item.h" +static int +memb_e2NodeInfoChange_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_e2NodeInfoChange_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_e2NodeInfoChange_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_e2NodeInfoChange_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_e2NodeInfoChange_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_e2NodeInfoChange_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_EventTrigger_Format3_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_e2NodeInfoChange_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_e2NodeInfoChange_List_specs_2 = { + sizeof(struct E2SM_RC_EventTrigger_Format3__e2NodeInfoChange_List), + offsetof(struct E2SM_RC_EventTrigger_Format3__e2NodeInfoChange_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_e2NodeInfoChange_List_2 = { + "e2NodeInfoChange-List", + "e2NodeInfoChange-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_e2NodeInfoChange_List_tags_2, + sizeof(asn_DEF_e2NodeInfoChange_List_tags_2) + /sizeof(asn_DEF_e2NodeInfoChange_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_e2NodeInfoChange_List_tags_2, /* Same as above */ + sizeof(asn_DEF_e2NodeInfoChange_List_tags_2) + /sizeof(asn_DEF_e2NodeInfoChange_List_tags_2[0]), /* 2 */ + { &asn_OER_type_e2NodeInfoChange_List_constr_2, &asn_PER_type_e2NodeInfoChange_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_e2NodeInfoChange_List_2, + 1, /* Single element */ + &asn_SPC_e2NodeInfoChange_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format3_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format3, e2NodeInfoChange_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_e2NodeInfoChange_List_2, + 0, + { &asn_OER_memb_e2NodeInfoChange_List_constr_2, &asn_PER_memb_e2NodeInfoChange_List_constr_2, memb_e2NodeInfoChange_List_constraint_1 }, + 0, 0, /* No default value */ + "e2NodeInfoChange-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format3_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* e2NodeInfoChange-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format3_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format3), + offsetof(struct E2SM_RC_EventTrigger_Format3, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format3_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format3 = { + "E2SM-RC-EventTrigger-Format3", + "E2SM-RC-EventTrigger-Format3", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format3_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format3_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format3_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format3_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format3_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4-Item.c new file mode 100644 index 0000000..5e06ea5 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4-Item.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format4-Item.h" + +#include "EventTrigger-UE-Info.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format4_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format4_Item, ric_eventTriggerCondition_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTriggerCondition_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-eventTriggerCondition-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format4_Item, triggerType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_TriggerType_Choice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "triggerType" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_EventTrigger_Format4_Item, associatedUEInfo), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UE_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedUEInfo" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_EventTrigger_Format4_Item, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_E2SM_RC_EventTrigger_Format4_Item_oms_1[] = { 2, 3 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format4_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format4_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-eventTriggerCondition-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* triggerType */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* associatedUEInfo */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format4_Item_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format4_Item), + offsetof(struct E2SM_RC_EventTrigger_Format4_Item, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format4_Item_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_E2SM_RC_EventTrigger_Format4_Item_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format4_Item = { + "E2SM-RC-EventTrigger-Format4-Item", + "E2SM-RC-EventTrigger-Format4-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format4_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format4_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format4_Item_1, + 4, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format4_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4.c new file mode 100644 index 0000000..73bbc20 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format4.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format4.h" + +#include "E2SM-RC-EventTrigger-Format4-Item.h" +static int +memb_uEInfoChange_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_uEInfoChange_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_uEInfoChange_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_uEInfoChange_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_uEInfoChange_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_uEInfoChange_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_EventTrigger_Format4_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_uEInfoChange_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_uEInfoChange_List_specs_2 = { + sizeof(struct E2SM_RC_EventTrigger_Format4__uEInfoChange_List), + offsetof(struct E2SM_RC_EventTrigger_Format4__uEInfoChange_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_uEInfoChange_List_2 = { + "uEInfoChange-List", + "uEInfoChange-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_uEInfoChange_List_tags_2, + sizeof(asn_DEF_uEInfoChange_List_tags_2) + /sizeof(asn_DEF_uEInfoChange_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_uEInfoChange_List_tags_2, /* Same as above */ + sizeof(asn_DEF_uEInfoChange_List_tags_2) + /sizeof(asn_DEF_uEInfoChange_List_tags_2[0]), /* 2 */ + { &asn_OER_type_uEInfoChange_List_constr_2, &asn_PER_type_uEInfoChange_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_uEInfoChange_List_2, + 1, /* Single element */ + &asn_SPC_uEInfoChange_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format4_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format4, uEInfoChange_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_uEInfoChange_List_2, + 0, + { &asn_OER_memb_uEInfoChange_List_constr_2, &asn_PER_memb_uEInfoChange_List_constr_2, memb_uEInfoChange_List_constraint_1 }, + 0, 0, /* No default value */ + "uEInfoChange-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format4_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format4_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* uEInfoChange-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format4_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format4), + offsetof(struct E2SM_RC_EventTrigger_Format4, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format4_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format4 = { + "E2SM-RC-EventTrigger-Format4", + "E2SM-RC-EventTrigger-Format4", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format4_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format4_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format4_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format4_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format4_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format5.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format5.c new file mode 100644 index 0000000..39f08ad --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger-Format5.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger-Format5.h" + +#include "EventTrigger-UE-Info.h" +#include "EventTrigger-Cell-Info.h" +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_onDemand_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_onDemand_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_onDemand_value2enum_2[] = { + { 0, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_onDemand_enum2value_2[] = { + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_onDemand_specs_2 = { + asn_MAP_onDemand_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_onDemand_enum2value_2, /* N => "tag"; sorted by N */ + 1, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_onDemand_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_onDemand_2 = { + "onDemand", + "onDemand", + &asn_OP_NativeEnumerated, + asn_DEF_onDemand_tags_2, + sizeof(asn_DEF_onDemand_tags_2) + /sizeof(asn_DEF_onDemand_tags_2[0]) - 1, /* 1 */ + asn_DEF_onDemand_tags_2, /* Same as above */ + sizeof(asn_DEF_onDemand_tags_2) + /sizeof(asn_DEF_onDemand_tags_2[0]), /* 2 */ + { &asn_OER_type_onDemand_constr_2, &asn_PER_type_onDemand_constr_2, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_onDemand_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_Format5_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger_Format5, onDemand), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_onDemand_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "onDemand" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_EventTrigger_Format5, associatedUEInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UE_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedUEInfo" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_EventTrigger_Format5, associatedCellInfo), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_Cell_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedCellInfo" + }, +}; +static const int asn_MAP_E2SM_RC_EventTrigger_Format5_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_Format5_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_Format5_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* onDemand */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* associatedUEInfo */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* associatedCellInfo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_Format5_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger_Format5), + offsetof(struct E2SM_RC_EventTrigger_Format5, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_Format5_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_RC_EventTrigger_Format5_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger_Format5 = { + "E2SM-RC-EventTrigger-Format5", + "E2SM-RC-EventTrigger-Format5", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_Format5_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format5_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format5_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_Format5_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_Format5_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_Format5_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_Format5_1, + 3, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_Format5_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger.c b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger.c new file mode 100644 index 0000000..ce82353 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-EventTrigger.c @@ -0,0 +1,142 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-EventTrigger.h" + +#include "E2SM-RC-EventTrigger-Format1.h" +#include "E2SM-RC-EventTrigger-Format2.h" +#include "E2SM-RC-EventTrigger-Format3.h" +#include "E2SM-RC-EventTrigger-Format4.h" +#include "E2SM-RC-EventTrigger-Format5.h" +static asn_oer_constraints_t asn_OER_type_ric_eventTrigger_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_eventTrigger_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_eventTrigger_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats, choice.eventTrigger_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_EventTrigger_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventTrigger-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats, choice.eventTrigger_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_EventTrigger_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventTrigger-Format2" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats, choice.eventTrigger_Format3), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_EventTrigger_Format3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventTrigger-Format3" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats, choice.eventTrigger_Format4), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_EventTrigger_Format4, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventTrigger-Format4" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats, choice.eventTrigger_Format5), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_EventTrigger_Format5, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventTrigger-Format5" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_eventTrigger_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eventTrigger-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eventTrigger-Format2 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* eventTrigger-Format3 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* eventTrigger-Format4 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* eventTrigger-Format5 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_eventTrigger_formats_specs_2 = { + sizeof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats), + offsetof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats, _asn_ctx), + offsetof(struct E2SM_RC_EventTrigger__ric_eventTrigger_formats, present), + sizeof(((struct E2SM_RC_EventTrigger__ric_eventTrigger_formats *)0)->present), + asn_MAP_ric_eventTrigger_formats_tag2el_2, + 5, /* Count of tags in the map */ + 0, 0, + 5 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_eventTrigger_formats_2 = { + "ric-eventTrigger-formats", + "ric-eventTrigger-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_eventTrigger_formats_constr_2, &asn_PER_type_ric_eventTrigger_formats_constr_2, CHOICE_constraint }, + asn_MBR_ric_eventTrigger_formats_2, + 5, /* Elements count */ + &asn_SPC_ric_eventTrigger_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_EventTrigger_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_EventTrigger, ric_eventTrigger_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_eventTrigger_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-eventTrigger-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_EventTrigger_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_EventTrigger_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-eventTrigger-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_EventTrigger_specs_1 = { + sizeof(struct E2SM_RC_EventTrigger), + offsetof(struct E2SM_RC_EventTrigger, _asn_ctx), + asn_MAP_E2SM_RC_EventTrigger_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_EventTrigger = { + "E2SM-RC-EventTrigger", + "E2SM-RC-EventTrigger", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_EventTrigger_tags_1, + sizeof(asn_DEF_E2SM_RC_EventTrigger_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_EventTrigger_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_EventTrigger_tags_1) + /sizeof(asn_DEF_E2SM_RC_EventTrigger_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_EventTrigger_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_EventTrigger_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format1.c new file mode 100644 index 0000000..ee69e7c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format1.c @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationHeader-Format1.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationHeader_Format1_1[] = { + { ATF_POINTER, 1, offsetof(struct E2SM_RC_IndicationHeader_Format1, ric_eventTriggerCondition_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTriggerCondition_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-eventTriggerCondition-ID" + }, +}; +static const int asn_MAP_E2SM_RC_IndicationHeader_Format1_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationHeader_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationHeader_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-eventTriggerCondition-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationHeader_Format1_specs_1 = { + sizeof(struct E2SM_RC_IndicationHeader_Format1), + offsetof(struct E2SM_RC_IndicationHeader_Format1, _asn_ctx), + asn_MAP_E2SM_RC_IndicationHeader_Format1_tag2el_1, + 1, /* Count of tags in the map */ + asn_MAP_E2SM_RC_IndicationHeader_Format1_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader_Format1 = { + "E2SM-RC-IndicationHeader-Format1", + "E2SM-RC-IndicationHeader-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationHeader_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationHeader_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationHeader_Format1_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationHeader_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format2.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format2.c new file mode 100644 index 0000000..0aba4d3 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format2.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationHeader-Format2.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationHeader_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationHeader_Format2, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationHeader_Format2, ric_InsertStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationHeader_Format2, ric_InsertIndication_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_InsertIndication_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertIndication-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationHeader_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationHeader_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-InsertStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ric-InsertIndication-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationHeader_Format2_specs_1 = { + sizeof(struct E2SM_RC_IndicationHeader_Format2), + offsetof(struct E2SM_RC_IndicationHeader_Format2, _asn_ctx), + asn_MAP_E2SM_RC_IndicationHeader_Format2_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader_Format2 = { + "E2SM-RC-IndicationHeader-Format2", + "E2SM-RC-IndicationHeader-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationHeader_Format2_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationHeader_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationHeader_Format2_1, + 3, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationHeader_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format3.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format3.c new file mode 100644 index 0000000..006acee --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader-Format3.c @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationHeader-Format3.h" + +#include "UEID.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationHeader_Format3_1[] = { + { ATF_POINTER, 2, offsetof(struct E2SM_RC_IndicationHeader_Format3, ric_eventTriggerCondition_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTriggerCondition_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-eventTriggerCondition-ID" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_IndicationHeader_Format3, ueID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, +}; +static const int asn_MAP_E2SM_RC_IndicationHeader_Format3_oms_1[] = { 0, 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationHeader_Format3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationHeader_Format3_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-eventTriggerCondition-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationHeader_Format3_specs_1 = { + sizeof(struct E2SM_RC_IndicationHeader_Format3), + offsetof(struct E2SM_RC_IndicationHeader_Format3, _asn_ctx), + asn_MAP_E2SM_RC_IndicationHeader_Format3_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2SM_RC_IndicationHeader_Format3_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader_Format3 = { + "E2SM-RC-IndicationHeader-Format3", + "E2SM-RC-IndicationHeader-Format3", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationHeader_Format3_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format3_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationHeader_Format3_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_Format3_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationHeader_Format3_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationHeader_Format3_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader.c new file mode 100644 index 0000000..f668077 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationHeader.c @@ -0,0 +1,120 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationHeader.h" + +#include "E2SM-RC-IndicationHeader-Format1.h" +#include "E2SM-RC-IndicationHeader-Format2.h" +#include "E2SM-RC-IndicationHeader-Format3.h" +static asn_oer_constraints_t asn_OER_type_ric_indicationHeader_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_indicationHeader_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_indicationHeader_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats, choice.indicationHeader_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationHeader_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationHeader-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats, choice.indicationHeader_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationHeader_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationHeader-Format2" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats, choice.indicationHeader_Format3), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationHeader_Format3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationHeader-Format3" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_indicationHeader_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* indicationHeader-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* indicationHeader-Format2 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* indicationHeader-Format3 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_indicationHeader_formats_specs_2 = { + sizeof(struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats), + offsetof(struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats, _asn_ctx), + offsetof(struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats, present), + sizeof(((struct E2SM_RC_IndicationHeader__ric_indicationHeader_formats *)0)->present), + asn_MAP_ric_indicationHeader_formats_tag2el_2, + 3, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_indicationHeader_formats_2 = { + "ric-indicationHeader-formats", + "ric-indicationHeader-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_indicationHeader_formats_constr_2, &asn_PER_type_ric_indicationHeader_formats_constr_2, CHOICE_constraint }, + asn_MBR_ric_indicationHeader_formats_2, + 3, /* Elements count */ + &asn_SPC_ric_indicationHeader_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationHeader_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationHeader, ric_indicationHeader_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_indicationHeader_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-indicationHeader-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationHeader_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationHeader_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-indicationHeader-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationHeader_specs_1 = { + sizeof(struct E2SM_RC_IndicationHeader), + offsetof(struct E2SM_RC_IndicationHeader, _asn_ctx), + asn_MAP_E2SM_RC_IndicationHeader_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationHeader = { + "E2SM-RC-IndicationHeader", + "E2SM-RC-IndicationHeader", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationHeader_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationHeader_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationHeader_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationHeader_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationHeader_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationHeader_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationHeader_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1-Item.c new file mode 100644 index 0000000..52f38db --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format1-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format1_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format1_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format1_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format1_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format1_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format1_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format1_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format1_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format1_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format1_Item = { + "E2SM-RC-IndicationMessage-Format1-Item", + "E2SM-RC-IndicationMessage-Format1-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format1_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format1_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format1_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format1_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1.c new file mode 100644 index 0000000..4decfe4 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format1.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format1.h" + +#include "E2SM-RC-IndicationMessage-Format1-Item.h" +static int +memb_ranP_Reported_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_Reported_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_Reported_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_Reported_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_Reported_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_Reported_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format1_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_Reported_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_Reported_List_specs_2 = { + sizeof(struct E2SM_RC_IndicationMessage_Format1__ranP_Reported_List), + offsetof(struct E2SM_RC_IndicationMessage_Format1__ranP_Reported_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_Reported_List_2 = { + "ranP-Reported-List", + "ranP-Reported-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_Reported_List_tags_2, + sizeof(asn_DEF_ranP_Reported_List_tags_2) + /sizeof(asn_DEF_ranP_Reported_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranP_Reported_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ranP_Reported_List_tags_2) + /sizeof(asn_DEF_ranP_Reported_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ranP_Reported_List_constr_2, &asn_PER_type_ranP_Reported_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranP_Reported_List_2, + 1, /* Single element */ + &asn_SPC_ranP_Reported_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format1, ranP_Reported_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranP_Reported_List_2, + 0, + { &asn_OER_memb_ranP_Reported_List_constr_2, &asn_PER_memb_ranP_Reported_List_constr_2, memb_ranP_Reported_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-Reported-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranP-Reported-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format1_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format1), + offsetof(struct E2SM_RC_IndicationMessage_Format1, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format1 = { + "E2SM-RC-IndicationMessage-Format1", + "E2SM-RC-IndicationMessage-Format1", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format1_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format1_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-Item.c new file mode 100644 index 0000000..c3b98c8 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format2-Item.h" + +#include "E2SM-RC-IndicationMessage-Format2-RANParameter-Item.h" +static int +memb_ranP_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_List_specs_3 = { + sizeof(struct E2SM_RC_IndicationMessage_Format2_Item__ranP_List), + offsetof(struct E2SM_RC_IndicationMessage_Format2_Item__ranP_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_List_3 = { + "ranP-List", + "ranP-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_List_tags_3, + sizeof(asn_DEF_ranP_List_tags_3) + /sizeof(asn_DEF_ranP_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ranP_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ranP_List_tags_3) + /sizeof(asn_DEF_ranP_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ranP_List_constr_3, &asn_PER_type_ranP_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ranP_List_3, + 1, /* Single element */ + &asn_SPC_ranP_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format2_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format2_Item, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format2_Item, ranP_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ranP_List_3, + 0, + { &asn_OER_memb_ranP_List_constr_3, &asn_PER_memb_ranP_List_constr_3, memb_ranP_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format2_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format2_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranP-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format2_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format2_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format2_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format2_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format2_Item = { + "E2SM-RC-IndicationMessage-Format2-Item", + "E2SM-RC-IndicationMessage-Format2-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format2_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format2_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format2_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format2_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.c new file mode 100644 index 0000000..3729403 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2-RANParameter-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format2-RANParameter-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format2_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format2_RANParameter_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format2_RANParameter_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format2_RANParameter_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item = { + "E2SM-RC-IndicationMessage-Format2-RANParameter-Item", + "E2SM-RC-IndicationMessage-Format2-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format2_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2.c new file mode 100644 index 0000000..baa97db --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format2.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format2.h" + +#include "E2SM-RC-IndicationMessage-Format2-Item.h" +static int +memb_ueParameter_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueParameter_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ueParameter_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueParameter_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ueParameter_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueParameter_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format2_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueParameter_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueParameter_List_specs_2 = { + sizeof(struct E2SM_RC_IndicationMessage_Format2__ueParameter_List), + offsetof(struct E2SM_RC_IndicationMessage_Format2__ueParameter_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueParameter_List_2 = { + "ueParameter-List", + "ueParameter-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueParameter_List_tags_2, + sizeof(asn_DEF_ueParameter_List_tags_2) + /sizeof(asn_DEF_ueParameter_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ueParameter_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ueParameter_List_tags_2) + /sizeof(asn_DEF_ueParameter_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ueParameter_List_constr_2, &asn_PER_type_ueParameter_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ueParameter_List_2, + 1, /* Single element */ + &asn_SPC_ueParameter_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format2, ueParameter_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ueParameter_List_2, + 0, + { &asn_OER_memb_ueParameter_List_constr_2, &asn_PER_memb_ueParameter_List_constr_2, memb_ueParameter_List_constraint_1 }, + 0, 0, /* No default value */ + "ueParameter-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ueParameter-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format2_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format2), + offsetof(struct E2SM_RC_IndicationMessage_Format2, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format2_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format2 = { + "E2SM-RC-IndicationMessage-Format2", + "E2SM-RC-IndicationMessage-Format2", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format2_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format2_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3-Item.c new file mode 100644 index 0000000..206902a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3-Item.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format3-Item.h" + +#include "NeighborRelation-Info.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format3_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format3_Item, cellGlobal_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellGlobal-ID" + }, + { ATF_POINTER, 3, offsetof(struct E2SM_RC_IndicationMessage_Format3_Item, cellContextInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellContextInfo" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_IndicationMessage_Format3_Item, cellDeleted), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellDeleted" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_IndicationMessage_Format3_Item, neighborRelation_Table), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NeighborRelation_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "neighborRelation-Table" + }, +}; +static const int asn_MAP_E2SM_RC_IndicationMessage_Format3_Item_oms_1[] = { 1, 2, 3 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format3_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format3_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellGlobal-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cellContextInfo */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* cellDeleted */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* neighborRelation-Table */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format3_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format3_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format3_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format3_Item_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_E2SM_RC_IndicationMessage_Format3_Item_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format3_Item = { + "E2SM-RC-IndicationMessage-Format3-Item", + "E2SM-RC-IndicationMessage-Format3-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format3_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format3_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format3_Item_1, + 4, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format3_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3.c new file mode 100644 index 0000000..70995c2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format3.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format3.h" + +#include "E2SM-RC-IndicationMessage-Format3-Item.h" +static int +memb_cellInfo_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_cellInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_cellInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellInfo_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format3_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellInfo_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellInfo_List_specs_2 = { + sizeof(struct E2SM_RC_IndicationMessage_Format3__cellInfo_List), + offsetof(struct E2SM_RC_IndicationMessage_Format3__cellInfo_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellInfo_List_2 = { + "cellInfo-List", + "cellInfo-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellInfo_List_tags_2, + sizeof(asn_DEF_cellInfo_List_tags_2) + /sizeof(asn_DEF_cellInfo_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellInfo_List_tags_2, /* Same as above */ + sizeof(asn_DEF_cellInfo_List_tags_2) + /sizeof(asn_DEF_cellInfo_List_tags_2[0]), /* 2 */ + { &asn_OER_type_cellInfo_List_constr_2, &asn_PER_type_cellInfo_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellInfo_List_2, + 1, /* Single element */ + &asn_SPC_cellInfo_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format3_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format3, cellInfo_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellInfo_List_2, + 0, + { &asn_OER_memb_cellInfo_List_constr_2, &asn_PER_memb_cellInfo_List_constr_2, memb_cellInfo_List_constraint_1 }, + 0, 0, /* No default value */ + "cellInfo-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format3_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellInfo-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format3_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format3), + offsetof(struct E2SM_RC_IndicationMessage_Format3, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format3_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format3 = { + "E2SM-RC-IndicationMessage-Format3", + "E2SM-RC-IndicationMessage-Format3", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format3_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format3_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format3_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format3_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format3_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemCell.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemCell.c new file mode 100644 index 0000000..8c04b12 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemCell.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format4-ItemCell.h" + +#include "NeighborRelation-Info.h" +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format4_ItemCell_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemCell, cellGlobal_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellGlobal-ID" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemCell, cellContextInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellContextInfo" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemCell, neighborRelation_Table), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NeighborRelation_Info, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "neighborRelation-Table" + }, +}; +static const int asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemCell_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemCell_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellGlobal-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cellContextInfo */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* neighborRelation-Table */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format4_ItemCell_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format4_ItemCell), + offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemCell, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemCell_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemCell_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell = { + "E2SM-RC-IndicationMessage-Format4-ItemCell", + "E2SM-RC-IndicationMessage-Format4-ItemCell", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format4_ItemCell_1, + 3, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format4_ItemCell_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemUE.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemUE.c new file mode 100644 index 0000000..2ff85c2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4-ItemUE.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format4-ItemUE.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format4_ItemUE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemUE, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemUE, ueContextInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueContextInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemUE, cellGlobal_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellGlobal-ID" + }, +}; +static const int asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemUE_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemUE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ueContextInfo */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cellGlobal-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format4_ItemUE_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format4_ItemUE), + offsetof(struct E2SM_RC_IndicationMessage_Format4_ItemUE, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemUE_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_E2SM_RC_IndicationMessage_Format4_ItemUE_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE = { + "E2SM-RC-IndicationMessage-Format4-ItemUE", + "E2SM-RC-IndicationMessage-Format4-ItemUE", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format4_ItemUE_1, + 3, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format4_ItemUE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4.c new file mode 100644 index 0000000..00bbc8c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format4.c @@ -0,0 +1,220 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format4.h" + +#include "E2SM-RC-IndicationMessage-Format4-ItemUE.h" +#include "E2SM-RC-IndicationMessage-Format4-ItemCell.h" +static int +memb_ueInfo_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_cellInfo_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_type_ueInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_cellInfo_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_type_cellInfo_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ueInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellInfo_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_memb_cellInfo_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueInfo_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemUE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueInfo_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueInfo_List_specs_2 = { + sizeof(struct E2SM_RC_IndicationMessage_Format4__ueInfo_List), + offsetof(struct E2SM_RC_IndicationMessage_Format4__ueInfo_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueInfo_List_2 = { + "ueInfo-List", + "ueInfo-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueInfo_List_tags_2, + sizeof(asn_DEF_ueInfo_List_tags_2) + /sizeof(asn_DEF_ueInfo_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ueInfo_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ueInfo_List_tags_2) + /sizeof(asn_DEF_ueInfo_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ueInfo_List_constr_2, &asn_PER_type_ueInfo_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ueInfo_List_2, + 1, /* Single element */ + &asn_SPC_ueInfo_List_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_cellInfo_List_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format4_ItemCell, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellInfo_List_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellInfo_List_specs_4 = { + sizeof(struct E2SM_RC_IndicationMessage_Format4__cellInfo_List), + offsetof(struct E2SM_RC_IndicationMessage_Format4__cellInfo_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellInfo_List_4 = { + "cellInfo-List", + "cellInfo-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellInfo_List_tags_4, + sizeof(asn_DEF_cellInfo_List_tags_4) + /sizeof(asn_DEF_cellInfo_List_tags_4[0]) - 1, /* 1 */ + asn_DEF_cellInfo_List_tags_4, /* Same as above */ + sizeof(asn_DEF_cellInfo_List_tags_4) + /sizeof(asn_DEF_cellInfo_List_tags_4[0]), /* 2 */ + { &asn_OER_type_cellInfo_List_constr_4, &asn_PER_type_cellInfo_List_constr_4, SEQUENCE_OF_constraint }, + asn_MBR_cellInfo_List_4, + 1, /* Single element */ + &asn_SPC_cellInfo_List_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format4_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format4, ueInfo_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ueInfo_List_2, + 0, + { &asn_OER_memb_ueInfo_List_constr_2, &asn_PER_memb_ueInfo_List_constr_2, memb_ueInfo_List_constraint_1 }, + 0, 0, /* No default value */ + "ueInfo-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format4, cellInfo_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_cellInfo_List_4, + 0, + { &asn_OER_memb_cellInfo_List_constr_4, &asn_PER_memb_cellInfo_List_constr_4, memb_cellInfo_List_constraint_1 }, + 0, 0, /* No default value */ + "cellInfo-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format4_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format4_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueInfo-List */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cellInfo-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format4_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format4), + offsetof(struct E2SM_RC_IndicationMessage_Format4, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format4_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format4 = { + "E2SM-RC-IndicationMessage-Format4", + "E2SM-RC-IndicationMessage-Format4", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format4_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format4_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format4_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format4_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format4_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5-Item.c new file mode 100644 index 0000000..50e9cfd --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format5-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format5_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format5_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format5_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format5_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format5_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format5_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format5_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format5_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format5_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format5_Item = { + "E2SM-RC-IndicationMessage-Format5-Item", + "E2SM-RC-IndicationMessage-Format5-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format5_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format5_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format5_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format5_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5.c new file mode 100644 index 0000000..d544185 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format5.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format5.h" + +#include "E2SM-RC-IndicationMessage-Format5-Item.h" +static int +memb_ranP_Requested_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_Requested_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_Requested_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_Requested_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_Requested_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_Requested_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format5_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_Requested_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_Requested_List_specs_2 = { + sizeof(struct E2SM_RC_IndicationMessage_Format5__ranP_Requested_List), + offsetof(struct E2SM_RC_IndicationMessage_Format5__ranP_Requested_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_Requested_List_2 = { + "ranP-Requested-List", + "ranP-Requested-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_Requested_List_tags_2, + sizeof(asn_DEF_ranP_Requested_List_tags_2) + /sizeof(asn_DEF_ranP_Requested_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranP_Requested_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ranP_Requested_List_tags_2) + /sizeof(asn_DEF_ranP_Requested_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ranP_Requested_List_constr_2, &asn_PER_type_ranP_Requested_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranP_Requested_List_2, + 1, /* Single element */ + &asn_SPC_ranP_Requested_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format5_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format5, ranP_Requested_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranP_Requested_List_2, + 0, + { &asn_OER_memb_ranP_Requested_List_constr_2, &asn_PER_memb_ranP_Requested_List_constr_2, memb_ranP_Requested_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-Requested-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format5_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format5_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranP-Requested-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format5_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format5), + offsetof(struct E2SM_RC_IndicationMessage_Format5, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format5_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format5 = { + "E2SM-RC-IndicationMessage-Format5", + "E2SM-RC-IndicationMessage-Format5", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format5_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format5_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format5_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format5_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format5_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Indication-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Indication-Item.c new file mode 100644 index 0000000..cab5f68 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Indication-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format6-Indication-Item.h" + +#include "E2SM-RC-IndicationMessage-Format6-RANP-Item.h" +static int +memb_ranP_InsertIndication_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranP_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranP_InsertIndication_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranP_InsertIndication_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranP_InsertIndication_List_specs_3 = { + sizeof(struct E2SM_RC_IndicationMessage_Format6_Indication_Item__ranP_InsertIndication_List), + offsetof(struct E2SM_RC_IndicationMessage_Format6_Indication_Item__ranP_InsertIndication_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_InsertIndication_List_3 = { + "ranP-InsertIndication-List", + "ranP-InsertIndication-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranP_InsertIndication_List_tags_3, + sizeof(asn_DEF_ranP_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ranP_InsertIndication_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ranP_InsertIndication_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ranP_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ranP_InsertIndication_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ranP_InsertIndication_List_constr_3, &asn_PER_type_ranP_InsertIndication_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ranP_InsertIndication_List_3, + 1, /* Single element */ + &asn_SPC_ranP_InsertIndication_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_Indication_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format6_Indication_Item, ric_InsertIndication_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_InsertIndication_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertIndication-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format6_Indication_Item, ranP_InsertIndication_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ranP_InsertIndication_List_3, + 0, + { &asn_OER_memb_ranP_InsertIndication_List_constr_3, &asn_PER_memb_ranP_InsertIndication_List_constr_3, memb_ranP_InsertIndication_List_constraint_1 }, + 0, 0, /* No default value */ + "ranP-InsertIndication-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format6_Indication_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-InsertIndication-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranP-InsertIndication-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_Indication_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format6_Indication_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format6_Indication_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format6_Indication_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item = { + "E2SM-RC-IndicationMessage-Format6-Indication-Item", + "E2SM-RC-IndicationMessage-Format6-Indication-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format6_Indication_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format6_Indication_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-RANP-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-RANP-Item.c new file mode 100644 index 0000000..76d7014 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-RANP-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format6-RANP-Item.h" + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_RANP_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format6_RANP_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format6_RANP_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format6_RANP_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_RANP_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format6_RANP_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format6_RANP_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format6_RANP_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item = { + "E2SM-RC-IndicationMessage-Format6-RANP-Item", + "E2SM-RC-IndicationMessage-Format6-RANP-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_RANP_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format6_RANP_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format6_RANP_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Style-Item.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Style-Item.c new file mode 100644 index 0000000..d66939d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6-Style-Item.c @@ -0,0 +1,140 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format6-Style-Item.h" + +#include "E2SM-RC-IndicationMessage-Format6-Indication-Item.h" +static int +memb_ric_InsertIndication_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_InsertIndication_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_InsertIndication_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format6_Indication_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_InsertIndication_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_InsertIndication_List_specs_3 = { + sizeof(struct E2SM_RC_IndicationMessage_Format6_Style_Item__ric_InsertIndication_List), + offsetof(struct E2SM_RC_IndicationMessage_Format6_Style_Item__ric_InsertIndication_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_InsertIndication_List_3 = { + "ric-InsertIndication-List", + "ric-InsertIndication-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_InsertIndication_List_tags_3, + sizeof(asn_DEF_ric_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ric_InsertIndication_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ric_InsertIndication_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ric_InsertIndication_List_tags_3) + /sizeof(asn_DEF_ric_InsertIndication_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ric_InsertIndication_List_constr_3, &asn_PER_type_ric_InsertIndication_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ric_InsertIndication_List_3, + 1, /* Single element */ + &asn_SPC_ric_InsertIndication_List_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_Style_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format6_Style_Item, indicated_Insert_Style_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicated-Insert-Style-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format6_Style_Item, ric_InsertIndication_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ric_InsertIndication_List_3, + 0, + { &asn_OER_memb_ric_InsertIndication_List_constr_3, &asn_PER_memb_ric_InsertIndication_List_constr_3, memb_ric_InsertIndication_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-InsertIndication-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format6_Style_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* indicated-Insert-Style-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-InsertIndication-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_Style_Item_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format6_Style_Item), + offsetof(struct E2SM_RC_IndicationMessage_Format6_Style_Item, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format6_Style_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item = { + "E2SM-RC-IndicationMessage-Format6-Style-Item", + "E2SM-RC-IndicationMessage-Format6-Style-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format6_Style_Item_1, + 2, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format6_Style_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6.c new file mode 100644 index 0000000..710524b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage-Format6.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage-Format6.h" + +#include "E2SM-RC-IndicationMessage-Format6-Style-Item.h" +static int +memb_ric_InsertStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_InsertStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2SM_RC_IndicationMessage_Format6_Style_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_InsertStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_InsertStyle_List_specs_2 = { + sizeof(struct E2SM_RC_IndicationMessage_Format6__ric_InsertStyle_List), + offsetof(struct E2SM_RC_IndicationMessage_Format6__ric_InsertStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_InsertStyle_List_2 = { + "ric-InsertStyle-List", + "ric-InsertStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_InsertStyle_List_tags_2, + sizeof(asn_DEF_ric_InsertStyle_List_tags_2) + /sizeof(asn_DEF_ric_InsertStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_InsertStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_InsertStyle_List_tags_2) + /sizeof(asn_DEF_ric_InsertStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_InsertStyle_List_constr_2, &asn_PER_type_ric_InsertStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_InsertStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_InsertStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_Format6_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage_Format6, ric_InsertStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_InsertStyle_List_2, + 0, + { &asn_OER_memb_ric_InsertStyle_List_constr_2, &asn_PER_memb_ric_InsertStyle_List_constr_2, memb_ric_InsertStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-InsertStyle-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_Format6_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_Format6_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-InsertStyle-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_Format6_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage_Format6), + offsetof(struct E2SM_RC_IndicationMessage_Format6, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_Format6_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage_Format6 = { + "E2SM-RC-IndicationMessage-Format6", + "E2SM-RC-IndicationMessage-Format6", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_Format6_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_Format6_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_Format6_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_Format6_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_Format6_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage.c b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage.c new file mode 100644 index 0000000..3fab21e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-IndicationMessage.c @@ -0,0 +1,153 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-IndicationMessage.h" + +#include "E2SM-RC-IndicationMessage-Format1.h" +#include "E2SM-RC-IndicationMessage-Format2.h" +#include "E2SM-RC-IndicationMessage-Format3.h" +#include "E2SM-RC-IndicationMessage-Format4.h" +#include "E2SM-RC-IndicationMessage-Format5.h" +#include "E2SM-RC-IndicationMessage-Format6.h" +static asn_oer_constraints_t asn_OER_type_ric_indicationMessage_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_indicationMessage_formats_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_indicationMessage_formats_2[] = { + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, choice.indicationMessage_Format1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationMessage_Format1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format1" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, choice.indicationMessage_Format2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationMessage_Format2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format2" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, choice.indicationMessage_Format3), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationMessage_Format3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format3" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, choice.indicationMessage_Format4), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationMessage_Format4, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format4" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, choice.indicationMessage_Format5), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationMessage_Format5, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format5" + }, + { ATF_POINTER, 0, offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, choice.indicationMessage_Format6), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2SM_RC_IndicationMessage_Format6, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indicationMessage-Format6" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ric_indicationMessage_formats_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* indicationMessage-Format1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* indicationMessage-Format2 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* indicationMessage-Format3 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* indicationMessage-Format4 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* indicationMessage-Format5 */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* indicationMessage-Format6 */ +}; +static asn_CHOICE_specifics_t asn_SPC_ric_indicationMessage_formats_specs_2 = { + sizeof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats), + offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, _asn_ctx), + offsetof(struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats, present), + sizeof(((struct E2SM_RC_IndicationMessage__ric_indicationMessage_formats *)0)->present), + asn_MAP_ric_indicationMessage_formats_tag2el_2, + 6, /* Count of tags in the map */ + 0, 0, + 5 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_indicationMessage_formats_2 = { + "ric-indicationMessage-formats", + "ric-indicationMessage-formats", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ric_indicationMessage_formats_constr_2, &asn_PER_type_ric_indicationMessage_formats_constr_2, CHOICE_constraint }, + asn_MBR_ric_indicationMessage_formats_2, + 6, /* Elements count */ + &asn_SPC_ric_indicationMessage_formats_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_E2SM_RC_IndicationMessage_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_IndicationMessage, ric_indicationMessage_formats), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ric_indicationMessage_formats_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-indicationMessage-formats" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_IndicationMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_IndicationMessage_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-indicationMessage-formats */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_IndicationMessage_specs_1 = { + sizeof(struct E2SM_RC_IndicationMessage), + offsetof(struct E2SM_RC_IndicationMessage, _asn_ctx), + asn_MAP_E2SM_RC_IndicationMessage_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_IndicationMessage = { + "E2SM-RC-IndicationMessage", + "E2SM-RC-IndicationMessage", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_IndicationMessage_tags_1, + sizeof(asn_DEF_E2SM_RC_IndicationMessage_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_IndicationMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_IndicationMessage_tags_1) + /sizeof(asn_DEF_E2SM_RC_IndicationMessage_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_IndicationMessage_1, + 1, /* Elements count */ + &asn_SPC_E2SM_RC_IndicationMessage_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/E2SM-RC-RANFunctionDefinition.c b/Bouncer/e2sm_rc/lib/E2SM-RC-RANFunctionDefinition.c new file mode 100644 index 0000000..ddd21e8 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/E2SM-RC-RANFunctionDefinition.c @@ -0,0 +1,107 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "E2SM-RC-RANFunctionDefinition.h" + +#include "RANFunctionDefinition-EventTrigger.h" +#include "RANFunctionDefinition-Report.h" +#include "RANFunctionDefinition-Insert.h" +#include "RANFunctionDefinition-Control.h" +#include "RANFunctionDefinition-Policy.h" +static asn_TYPE_member_t asn_MBR_E2SM_RC_RANFunctionDefinition_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2SM_RC_RANFunctionDefinition, ranFunction_Name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunction_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunction-Name" + }, + { ATF_POINTER, 5, offsetof(struct E2SM_RC_RANFunctionDefinition, ranFunctionDefinition_EventTrigger), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANFunctionDefinition_EventTrigger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionDefinition-EventTrigger" + }, + { ATF_POINTER, 4, offsetof(struct E2SM_RC_RANFunctionDefinition, ranFunctionDefinition_Report), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANFunctionDefinition_Report, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionDefinition-Report" + }, + { ATF_POINTER, 3, offsetof(struct E2SM_RC_RANFunctionDefinition, ranFunctionDefinition_Insert), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANFunctionDefinition_Insert, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionDefinition-Insert" + }, + { ATF_POINTER, 2, offsetof(struct E2SM_RC_RANFunctionDefinition, ranFunctionDefinition_Control), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANFunctionDefinition_Control, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionDefinition-Control" + }, + { ATF_POINTER, 1, offsetof(struct E2SM_RC_RANFunctionDefinition, ranFunctionDefinition_Policy), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANFunctionDefinition_Policy, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunctionDefinition-Policy" + }, +}; +static const int asn_MAP_E2SM_RC_RANFunctionDefinition_oms_1[] = { 1, 2, 3, 4, 5 }; +static const ber_tlv_tag_t asn_DEF_E2SM_RC_RANFunctionDefinition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2SM_RC_RANFunctionDefinition_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunction-Name */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranFunctionDefinition-EventTrigger */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranFunctionDefinition-Report */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ranFunctionDefinition-Insert */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ranFunctionDefinition-Control */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* ranFunctionDefinition-Policy */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_E2SM_RC_RANFunctionDefinition_specs_1 = { + sizeof(struct E2SM_RC_RANFunctionDefinition), + offsetof(struct E2SM_RC_RANFunctionDefinition, _asn_ctx), + asn_MAP_E2SM_RC_RANFunctionDefinition_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_E2SM_RC_RANFunctionDefinition_oms_1, /* Optional members */ + 5, 0, /* Root/Additions */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2SM_RC_RANFunctionDefinition = { + "E2SM-RC-RANFunctionDefinition", + "E2SM-RC-RANFunctionDefinition", + &asn_OP_SEQUENCE, + asn_DEF_E2SM_RC_RANFunctionDefinition_tags_1, + sizeof(asn_DEF_E2SM_RC_RANFunctionDefinition_tags_1) + /sizeof(asn_DEF_E2SM_RC_RANFunctionDefinition_tags_1[0]), /* 1 */ + asn_DEF_E2SM_RC_RANFunctionDefinition_tags_1, /* Same as above */ + sizeof(asn_DEF_E2SM_RC_RANFunctionDefinition_tags_1) + /sizeof(asn_DEF_E2SM_RC_RANFunctionDefinition_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_E2SM_RC_RANFunctionDefinition_1, + 6, /* Elements count */ + &asn_SPC_E2SM_RC_RANFunctionDefinition_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EN-GNB-ID.c b/Bouncer/e2sm_rc/lib/EN-GNB-ID.c new file mode 100644 index 0000000..69537a9 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EN-GNB-ID.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EN-GNB-ID.h" + +static int +memb_en_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_en_gNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +static asn_per_constraints_t asn_PER_memb_en_gNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_EN_GNB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_EN_GNB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_EN_GNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EN_GNB_ID, choice.en_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_en_gNB_ID_constr_2, &asn_PER_memb_en_gNB_ID_constr_2, memb_en_gNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "en-gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_EN_GNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* en-gNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_EN_GNB_ID_specs_1 = { + sizeof(struct EN_GNB_ID), + offsetof(struct EN_GNB_ID, _asn_ctx), + offsetof(struct EN_GNB_ID, present), + sizeof(((struct EN_GNB_ID *)0)->present), + asn_MAP_EN_GNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_EN_GNB_ID = { + "EN-GNB-ID", + "EN-GNB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_EN_GNB_ID_constr_1, &asn_PER_type_EN_GNB_ID_constr_1, CHOICE_constraint }, + asn_MBR_EN_GNB_ID_1, + 1, /* Elements count */ + &asn_SPC_EN_GNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/ENB-ID.c b/Bouncer/e2sm_rc/lib/ENB-ID.c new file mode 100644 index 0000000..7018be3 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ENB-ID.c @@ -0,0 +1,241 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENB-ID.h" + +static int +memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 28)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 18)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 21)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +static asn_per_constraints_t asn_PER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { + { 0, 0 }, + 28 /* (SIZE(28..28)) */}; +static asn_per_constraints_t asn_PER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { + { 0, 0 }, + 18 /* (SIZE(18..18)) */}; +static asn_per_constraints_t asn_PER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { + { 0, 0 }, + 21 /* (SIZE(21..21)) */}; +static asn_per_constraints_t asn_PER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ENB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ENB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_macro_eNB_ID_constr_2, &asn_PER_memb_macro_eNB_ID_constr_2, memb_macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "macro-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.home_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_home_eNB_ID_constr_3, &asn_PER_memb_home_eNB_ID_constr_3, memb_home_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "home-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.short_Macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_short_Macro_eNB_ID_constr_5, &asn_PER_memb_short_Macro_eNB_ID_constr_5, memb_short_Macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "short-Macro-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.long_Macro_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_long_Macro_eNB_ID_constr_6, &asn_PER_memb_long_Macro_eNB_ID_constr_6, memb_long_Macro_eNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "long-Macro-eNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macro-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* home-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-Macro-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-Macro-eNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1 = { + sizeof(struct ENB_ID), + offsetof(struct ENB_ID, _asn_ctx), + offsetof(struct ENB_ID, present), + sizeof(((struct ENB_ID *)0)->present), + asn_MAP_ENB_ID_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ENB_ID = { + "ENB-ID", + "ENB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ENB_ID_constr_1, &asn_PER_type_ENB_ID_constr_1, CHOICE_constraint }, + asn_MBR_ENB_ID_1, + 4, /* Elements count */ + &asn_SPC_ENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID-Extension.c b/Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID-Extension.c new file mode 100644 index 0000000..e2e10d2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID-Extension.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENB-UE-X2AP-ID-Extension.h" + +int +ENB_UE_X2AP_ID_Extension_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 4095)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_ENB_UE_X2AP_ID_Extension_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_Extension_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 12, 12, 0, 4095 } /* (0..4095,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID_Extension = { + "ENB-UE-X2AP-ID-Extension", + "ENB-UE-X2AP-ID-Extension", + &asn_OP_NativeInteger, + asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1, + sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1[0]), /* 1 */ + asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1, /* Same as above */ + sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1[0]), /* 1 */ + { &asn_OER_type_ENB_UE_X2AP_ID_Extension_constr_1, &asn_PER_type_ENB_UE_X2AP_ID_Extension_constr_1, ENB_UE_X2AP_ID_Extension_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID.c b/Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID.c new file mode 100644 index 0000000..f1c8f82 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ENB-UE-X2AP-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "ENB-UE-X2AP-ID.h" + +int +ENB_UE_X2AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 4095)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_ENB_UE_X2AP_ID_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..4095) */, + -1}; +asn_per_constraints_t asn_PER_type_ENB_UE_X2AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_ENB_UE_X2AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID = { + "ENB-UE-X2AP-ID", + "ENB-UE-X2AP-ID", + &asn_OP_NativeInteger, + asn_DEF_ENB_UE_X2AP_ID_tags_1, + sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1[0]), /* 1 */ + asn_DEF_ENB_UE_X2AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1) + /sizeof(asn_DEF_ENB_UE_X2AP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_ENB_UE_X2AP_ID_constr_1, &asn_PER_type_ENB_UE_X2AP_ID_constr_1, ENB_UE_X2AP_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EUTRA-CGI.c b/Bouncer/e2sm_rc/lib/EUTRA-CGI.c new file mode 100644 index 0000000..47f025a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EUTRA-CGI.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EUTRA-CGI.h" + +asn_TYPE_member_t asn_MBR_EUTRA_CGI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EUTRA_CGI, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct EUTRA_CGI, eUTRACellIdentity), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EUTRACellIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRACellIdentity" + }, +}; +static const ber_tlv_tag_t asn_DEF_EUTRA_CGI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EUTRA_CGI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRACellIdentity */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EUTRA_CGI_specs_1 = { + sizeof(struct EUTRA_CGI), + offsetof(struct EUTRA_CGI, _asn_ctx), + asn_MAP_EUTRA_CGI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EUTRA_CGI = { + "EUTRA-CGI", + "EUTRA-CGI", + &asn_OP_SEQUENCE, + asn_DEF_EUTRA_CGI_tags_1, + sizeof(asn_DEF_EUTRA_CGI_tags_1) + /sizeof(asn_DEF_EUTRA_CGI_tags_1[0]), /* 1 */ + asn_DEF_EUTRA_CGI_tags_1, /* Same as above */ + sizeof(asn_DEF_EUTRA_CGI_tags_1) + /sizeof(asn_DEF_EUTRA_CGI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EUTRA_CGI_1, + 2, /* Elements count */ + &asn_SPC_EUTRA_CGI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EUTRACellIdentity.c b/Bouncer/e2sm_rc/lib/EUTRACellIdentity.c new file mode 100644 index 0000000..d98a49c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EUTRACellIdentity.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EUTRACellIdentity.h" + +int +EUTRACellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 28)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_EUTRACellIdentity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 28 /* (SIZE(28..28)) */}; +asn_per_constraints_t asn_PER_type_EUTRACellIdentity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_EUTRACellIdentity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_EUTRACellIdentity = { + "EUTRACellIdentity", + "EUTRACellIdentity", + &asn_OP_BIT_STRING, + asn_DEF_EUTRACellIdentity_tags_1, + sizeof(asn_DEF_EUTRACellIdentity_tags_1) + /sizeof(asn_DEF_EUTRACellIdentity_tags_1[0]), /* 1 */ + asn_DEF_EUTRACellIdentity_tags_1, /* Same as above */ + sizeof(asn_DEF_EUTRACellIdentity_tags_1) + /sizeof(asn_DEF_EUTRACellIdentity_tags_1[0]), /* 1 */ + { &asn_OER_type_EUTRACellIdentity_constr_1, &asn_PER_type_EUTRACellIdentity_constr_1, EUTRACellIdentity_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Group.c b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Group.c new file mode 100644 index 0000000..ee77de3 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Group.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-Cell-Info-Item-Choice-Group.h" + +asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_Item_Choice_Group_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_Cell_Info_Item_Choice_Group, ranParameterTesting), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameterTesting" + }, +}; +static const ber_tlv_tag_t asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_Cell_Info_Item_Choice_Group_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameterTesting */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_Item_Choice_Group_specs_1 = { + sizeof(struct EventTrigger_Cell_Info_Item_Choice_Group), + offsetof(struct EventTrigger_Cell_Info_Item_Choice_Group, _asn_ctx), + asn_MAP_EventTrigger_Cell_Info_Item_Choice_Group_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group = { + "EventTrigger-Cell-Info-Item-Choice-Group", + "EventTrigger-Cell-Info-Item-Choice-Group", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group_tags_1, + sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_Cell_Info_Item_Choice_Group_1, + 1, /* Elements count */ + &asn_SPC_EventTrigger_Cell_Info_Item_Choice_Group_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Individual.c b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Individual.c new file mode 100644 index 0000000..0de3b36 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item-Choice-Individual.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-Cell-Info-Item-Choice-Individual.h" + +asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_Item_Choice_Individual_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_Cell_Info_Item_Choice_Individual, cellGlobalID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellGlobalID" + }, +}; +static const ber_tlv_tag_t asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_Cell_Info_Item_Choice_Individual_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellGlobalID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_Item_Choice_Individual_specs_1 = { + sizeof(struct EventTrigger_Cell_Info_Item_Choice_Individual), + offsetof(struct EventTrigger_Cell_Info_Item_Choice_Individual, _asn_ctx), + asn_MAP_EventTrigger_Cell_Info_Item_Choice_Individual_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual = { + "EventTrigger-Cell-Info-Item-Choice-Individual", + "EventTrigger-Cell-Info-Item-Choice-Individual", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual_tags_1, + sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_Cell_Info_Item_Choice_Individual_1, + 1, /* Elements count */ + &asn_SPC_EventTrigger_Cell_Info_Item_Choice_Individual_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item.c b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item.c new file mode 100644 index 0000000..6365bd1 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info-Item.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-Cell-Info-Item.h" + +#include "EventTrigger-Cell-Info-Item-Choice-Individual.h" +#include "EventTrigger-Cell-Info-Item-Choice-Group.h" +static asn_oer_constraints_t asn_OER_type_cellType_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_cellType_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellType_3[] = { + { ATF_POINTER, 0, offsetof(struct EventTrigger_Cell_Info_Item__cellType, choice.cellType_Choice_Individual), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_Cell_Info_Item_Choice_Individual, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellType-Choice-Individual" + }, + { ATF_POINTER, 0, offsetof(struct EventTrigger_Cell_Info_Item__cellType, choice.cellType_Choice_Group), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_Cell_Info_Item_Choice_Group, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellType-Choice-Group" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_cellType_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellType-Choice-Individual */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cellType-Choice-Group */ +}; +static asn_CHOICE_specifics_t asn_SPC_cellType_specs_3 = { + sizeof(struct EventTrigger_Cell_Info_Item__cellType), + offsetof(struct EventTrigger_Cell_Info_Item__cellType, _asn_ctx), + offsetof(struct EventTrigger_Cell_Info_Item__cellType, present), + sizeof(((struct EventTrigger_Cell_Info_Item__cellType *)0)->present), + asn_MAP_cellType_tag2el_3, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellType_3 = { + "cellType", + "cellType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_cellType_constr_3, &asn_PER_type_cellType_constr_3, CHOICE_constraint }, + asn_MBR_cellType_3, + 2, /* Elements count */ + &asn_SPC_cellType_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_Cell_Info_Item, eventTriggerCellID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTrigger_Cell_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventTriggerCellID" + }, + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_Cell_Info_Item, cellType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_cellType_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cellType" + }, + { ATF_POINTER, 1, offsetof(struct EventTrigger_Cell_Info_Item, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_EventTrigger_Cell_Info_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_EventTrigger_Cell_Info_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_Cell_Info_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eventTriggerCellID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cellType */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_Item_specs_1 = { + sizeof(struct EventTrigger_Cell_Info_Item), + offsetof(struct EventTrigger_Cell_Info_Item, _asn_ctx), + asn_MAP_EventTrigger_Cell_Info_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_EventTrigger_Cell_Info_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info_Item = { + "EventTrigger-Cell-Info-Item", + "EventTrigger-Cell-Info-Item", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_Cell_Info_Item_tags_1, + sizeof(asn_DEF_EventTrigger_Cell_Info_Item_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_Item_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_Cell_Info_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_Cell_Info_Item_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_Cell_Info_Item_1, + 3, /* Elements count */ + &asn_SPC_EventTrigger_Cell_Info_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info.c b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info.c new file mode 100644 index 0000000..e80010b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-Cell-Info.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-Cell-Info.h" + +#include "EventTrigger-Cell-Info-Item.h" +static int +memb_cellInfo_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_cellInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_cellInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_cellInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_cellInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_cellInfo_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_EventTrigger_Cell_Info_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_cellInfo_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_cellInfo_List_specs_2 = { + sizeof(struct EventTrigger_Cell_Info__cellInfo_List), + offsetof(struct EventTrigger_Cell_Info__cellInfo_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_cellInfo_List_2 = { + "cellInfo-List", + "cellInfo-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_cellInfo_List_tags_2, + sizeof(asn_DEF_cellInfo_List_tags_2) + /sizeof(asn_DEF_cellInfo_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_cellInfo_List_tags_2, /* Same as above */ + sizeof(asn_DEF_cellInfo_List_tags_2) + /sizeof(asn_DEF_cellInfo_List_tags_2[0]), /* 2 */ + { &asn_OER_type_cellInfo_List_constr_2, &asn_PER_type_cellInfo_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_cellInfo_List_2, + 1, /* Single element */ + &asn_SPC_cellInfo_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EventTrigger_Cell_Info_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_Cell_Info, cellInfo_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_cellInfo_List_2, + 0, + { &asn_OER_memb_cellInfo_List_constr_2, &asn_PER_memb_cellInfo_List_constr_2, memb_cellInfo_List_constraint_1 }, + 0, 0, /* No default value */ + "cellInfo-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_EventTrigger_Cell_Info_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_Cell_Info_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cellInfo-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_Cell_Info_specs_1 = { + sizeof(struct EventTrigger_Cell_Info), + offsetof(struct EventTrigger_Cell_Info, _asn_ctx), + asn_MAP_EventTrigger_Cell_Info_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_Cell_Info = { + "EventTrigger-Cell-Info", + "EventTrigger-Cell-Info", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_Cell_Info_tags_1, + sizeof(asn_DEF_EventTrigger_Cell_Info_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_Cell_Info_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_Cell_Info_tags_1) + /sizeof(asn_DEF_EventTrigger_Cell_Info_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_Cell_Info_1, + 1, /* Elements count */ + &asn_SPC_EventTrigger_Cell_Info_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Group.c b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Group.c new file mode 100644 index 0000000..d8e34f5 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Group.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-UE-Info-Item-Choice-Group.h" + +asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_Item_Choice_Group_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UE_Info_Item_Choice_Group, ranParameterTesting), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameterTesting" + }, +}; +static const ber_tlv_tag_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_UE_Info_Item_Choice_Group_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameterTesting */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_Item_Choice_Group_specs_1 = { + sizeof(struct EventTrigger_UE_Info_Item_Choice_Group), + offsetof(struct EventTrigger_UE_Info_Item_Choice_Group, _asn_ctx), + asn_MAP_EventTrigger_UE_Info_Item_Choice_Group_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Group = { + "EventTrigger-UE-Info-Item-Choice-Group", + "EventTrigger-UE-Info-Item-Choice-Group", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1, + sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_UE_Info_Item_Choice_Group_1, + 1, /* Elements count */ + &asn_SPC_EventTrigger_UE_Info_Item_Choice_Group_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Individual.c b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Individual.c new file mode 100644 index 0000000..d2f1045 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item-Choice-Individual.c @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-UE-Info-Item-Choice-Individual.h" + +#include "RANParameter-Testing.h" +asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_Item_Choice_Individual_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UE_Info_Item_Choice_Individual, ueID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueID" + }, + { ATF_POINTER, 1, offsetof(struct EventTrigger_UE_Info_Item_Choice_Individual, ranParameterTesting), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameterTesting" + }, +}; +static const int asn_MAP_EventTrigger_UE_Info_Item_Choice_Individual_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_UE_Info_Item_Choice_Individual_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameterTesting */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_Item_Choice_Individual_specs_1 = { + sizeof(struct EventTrigger_UE_Info_Item_Choice_Individual), + offsetof(struct EventTrigger_UE_Info_Item_Choice_Individual, _asn_ctx), + asn_MAP_EventTrigger_UE_Info_Item_Choice_Individual_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_EventTrigger_UE_Info_Item_Choice_Individual_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual = { + "EventTrigger-UE-Info-Item-Choice-Individual", + "EventTrigger-UE-Info-Item-Choice-Individual", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual_tags_1, + sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_UE_Info_Item_Choice_Individual_1, + 2, /* Elements count */ + &asn_SPC_EventTrigger_UE_Info_Item_Choice_Individual_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item.c b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item.c new file mode 100644 index 0000000..aa5bfc2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info-Item.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-UE-Info-Item.h" + +#include "EventTrigger-UE-Info-Item-Choice-Individual.h" +#include "EventTrigger-UE-Info-Item-Choice-Group.h" +static asn_oer_constraints_t asn_OER_type_ueType_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ueType_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueType_3[] = { + { ATF_POINTER, 0, offsetof(struct EventTrigger_UE_Info_Item__ueType, choice.ueType_Choice_Individual), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UE_Info_Item_Choice_Individual, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueType-Choice-Individual" + }, + { ATF_POINTER, 0, offsetof(struct EventTrigger_UE_Info_Item__ueType, choice.ueType_Choice_Group), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EventTrigger_UE_Info_Item_Choice_Group, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueType-Choice-Group" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ueType_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueType-Choice-Individual */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ueType-Choice-Group */ +}; +static asn_CHOICE_specifics_t asn_SPC_ueType_specs_3 = { + sizeof(struct EventTrigger_UE_Info_Item__ueType), + offsetof(struct EventTrigger_UE_Info_Item__ueType, _asn_ctx), + offsetof(struct EventTrigger_UE_Info_Item__ueType, present), + sizeof(((struct EventTrigger_UE_Info_Item__ueType *)0)->present), + asn_MAP_ueType_tag2el_3, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueType_3 = { + "ueType", + "ueType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ueType_constr_3, &asn_PER_type_ueType_constr_3, CHOICE_constraint }, + asn_MBR_ueType_3, + 2, /* Elements count */ + &asn_SPC_ueType_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UE_Info_Item, eventTriggerUEID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTrigger_UE_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eventTriggerUEID" + }, + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UE_Info_Item, ueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ueType_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueType" + }, + { ATF_POINTER, 1, offsetof(struct EventTrigger_UE_Info_Item, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_EventTrigger_UE_Info_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_EventTrigger_UE_Info_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_UE_Info_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eventTriggerUEID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ueType */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_Item_specs_1 = { + sizeof(struct EventTrigger_UE_Info_Item), + offsetof(struct EventTrigger_UE_Info_Item, _asn_ctx), + asn_MAP_EventTrigger_UE_Info_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_EventTrigger_UE_Info_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info_Item = { + "EventTrigger-UE-Info-Item", + "EventTrigger-UE-Info-Item", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_UE_Info_Item_tags_1, + sizeof(asn_DEF_EventTrigger_UE_Info_Item_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_Item_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_UE_Info_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_UE_Info_Item_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_UE_Info_Item_1, + 3, /* Elements count */ + &asn_SPC_EventTrigger_UE_Info_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info.c b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info.c new file mode 100644 index 0000000..6a6f5db --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-UE-Info.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-UE-Info.h" + +#include "EventTrigger-UE-Info-Item.h" +static int +memb_ueInfo_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ueInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueInfo_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ueInfo_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueInfo_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_EventTrigger_UE_Info_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueInfo_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueInfo_List_specs_2 = { + sizeof(struct EventTrigger_UE_Info__ueInfo_List), + offsetof(struct EventTrigger_UE_Info__ueInfo_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueInfo_List_2 = { + "ueInfo-List", + "ueInfo-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueInfo_List_tags_2, + sizeof(asn_DEF_ueInfo_List_tags_2) + /sizeof(asn_DEF_ueInfo_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ueInfo_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ueInfo_List_tags_2) + /sizeof(asn_DEF_ueInfo_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ueInfo_List_constr_2, &asn_PER_type_ueInfo_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ueInfo_List_2, + 1, /* Single element */ + &asn_SPC_ueInfo_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UE_Info, ueInfo_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ueInfo_List_2, + 0, + { &asn_OER_memb_ueInfo_List_constr_2, &asn_PER_memb_ueInfo_List_constr_2, memb_ueInfo_List_constraint_1 }, + 0, 0, /* No default value */ + "ueInfo-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_EventTrigger_UE_Info_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_UE_Info_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ueInfo-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_specs_1 = { + sizeof(struct EventTrigger_UE_Info), + offsetof(struct EventTrigger_UE_Info, _asn_ctx), + asn_MAP_EventTrigger_UE_Info_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info = { + "EventTrigger-UE-Info", + "EventTrigger-UE-Info", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_UE_Info_tags_1, + sizeof(asn_DEF_EventTrigger_UE_Info_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_UE_Info_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_UE_Info_tags_1) + /sizeof(asn_DEF_EventTrigger_UE_Info_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_UE_Info_1, + 1, /* Elements count */ + &asn_SPC_EventTrigger_UE_Info_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info-Item.c b/Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info-Item.c new file mode 100644 index 0000000..a1cbb51 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info-Item.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-UEevent-Info-Item.h" + +asn_TYPE_member_t asn_MBR_EventTrigger_UEevent_Info_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UEevent_Info_Item, ueEventID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_EventTrigger_UEevent_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ueEventID" + }, + { ATF_POINTER, 1, offsetof(struct EventTrigger_UEevent_Info_Item, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_EventTrigger_UEevent_Info_Item_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_EventTrigger_UEevent_Info_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_UEevent_Info_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ueEventID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UEevent_Info_Item_specs_1 = { + sizeof(struct EventTrigger_UEevent_Info_Item), + offsetof(struct EventTrigger_UEevent_Info_Item, _asn_ctx), + asn_MAP_EventTrigger_UEevent_Info_Item_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_EventTrigger_UEevent_Info_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_UEevent_Info_Item = { + "EventTrigger-UEevent-Info-Item", + "EventTrigger-UEevent-Info-Item", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_UEevent_Info_Item_tags_1, + sizeof(asn_DEF_EventTrigger_UEevent_Info_Item_tags_1) + /sizeof(asn_DEF_EventTrigger_UEevent_Info_Item_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_UEevent_Info_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_UEevent_Info_Item_tags_1) + /sizeof(asn_DEF_EventTrigger_UEevent_Info_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_UEevent_Info_Item_1, + 2, /* Elements count */ + &asn_SPC_EventTrigger_UEevent_Info_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info.c b/Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info.c new file mode 100644 index 0000000..da36325 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/EventTrigger-UEevent-Info.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "EventTrigger-UEevent-Info.h" + +#include "EventTrigger-UEevent-Info-Item.h" +static int +memb_ueEvent_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ueEvent_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ueEvent_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ueEvent_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ueEvent_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ueEvent_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_EventTrigger_UEevent_Info_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ueEvent_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ueEvent_List_specs_2 = { + sizeof(struct EventTrigger_UEevent_Info__ueEvent_List), + offsetof(struct EventTrigger_UEevent_Info__ueEvent_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ueEvent_List_2 = { + "ueEvent-List", + "ueEvent-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ueEvent_List_tags_2, + sizeof(asn_DEF_ueEvent_List_tags_2) + /sizeof(asn_DEF_ueEvent_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ueEvent_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ueEvent_List_tags_2) + /sizeof(asn_DEF_ueEvent_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ueEvent_List_constr_2, &asn_PER_type_ueEvent_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ueEvent_List_2, + 1, /* Single element */ + &asn_SPC_ueEvent_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EventTrigger_UEevent_Info_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UEevent_Info, ueEvent_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ueEvent_List_2, + 0, + { &asn_OER_memb_ueEvent_List_constr_2, &asn_PER_memb_ueEvent_List_constr_2, memb_ueEvent_List_constraint_1 }, + 0, 0, /* No default value */ + "ueEvent-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_EventTrigger_UEevent_Info_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_UEevent_Info_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ueEvent-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UEevent_Info_specs_1 = { + sizeof(struct EventTrigger_UEevent_Info), + offsetof(struct EventTrigger_UEevent_Info, _asn_ctx), + asn_MAP_EventTrigger_UEevent_Info_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EventTrigger_UEevent_Info = { + "EventTrigger-UEevent-Info", + "EventTrigger-UEevent-Info", + &asn_OP_SEQUENCE, + asn_DEF_EventTrigger_UEevent_Info_tags_1, + sizeof(asn_DEF_EventTrigger_UEevent_Info_tags_1) + /sizeof(asn_DEF_EventTrigger_UEevent_Info_tags_1[0]), /* 1 */ + asn_DEF_EventTrigger_UEevent_Info_tags_1, /* Same as above */ + sizeof(asn_DEF_EventTrigger_UEevent_Info_tags_1) + /sizeof(asn_DEF_EventTrigger_UEevent_Info_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EventTrigger_UEevent_Info_1, + 1, /* Elements count */ + &asn_SPC_EventTrigger_UEevent_Info_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/FiveGS-TAC.c b/Bouncer/e2sm_rc/lib/FiveGS-TAC.c new file mode 100644 index 0000000..5177bda --- /dev/null +++ b/Bouncer/e2sm_rc/lib/FiveGS-TAC.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "FiveGS-TAC.h" + +int +FiveGS_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_FiveGS_TAC_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +asn_per_constraints_t asn_PER_type_FiveGS_TAC_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_FiveGS_TAC_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_FiveGS_TAC = { + "FiveGS-TAC", + "FiveGS-TAC", + &asn_OP_OCTET_STRING, + asn_DEF_FiveGS_TAC_tags_1, + sizeof(asn_DEF_FiveGS_TAC_tags_1) + /sizeof(asn_DEF_FiveGS_TAC_tags_1[0]), /* 1 */ + asn_DEF_FiveGS_TAC_tags_1, /* Same as above */ + sizeof(asn_DEF_FiveGS_TAC_tags_1) + /sizeof(asn_DEF_FiveGS_TAC_tags_1[0]), /* 1 */ + { &asn_OER_type_FiveGS_TAC_constr_1, &asn_PER_type_FiveGS_TAC_constr_1, FiveGS_TAC_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/FiveQI.c b/Bouncer/e2sm_rc/lib/FiveQI.c new file mode 100644 index 0000000..d5553dd --- /dev/null +++ b/Bouncer/e2sm_rc/lib/FiveQI.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "FiveQI.h" + +int +FiveQI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_FiveQI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_FiveQI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 0, 255 } /* (0..255,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_FiveQI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_FiveQI = { + "FiveQI", + "FiveQI", + &asn_OP_NativeInteger, + asn_DEF_FiveQI_tags_1, + sizeof(asn_DEF_FiveQI_tags_1) + /sizeof(asn_DEF_FiveQI_tags_1[0]), /* 1 */ + asn_DEF_FiveQI_tags_1, /* Same as above */ + sizeof(asn_DEF_FiveQI_tags_1) + /sizeof(asn_DEF_FiveQI_tags_1[0]), /* 1 */ + { &asn_OER_type_FiveQI_constr_1, &asn_PER_type_FiveQI_constr_1, FiveQI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/FreqBandNrItem.c b/Bouncer/e2sm_rc/lib/FreqBandNrItem.c new file mode 100644 index 0000000..9a18e25 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/FreqBandNrItem.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "FreqBandNrItem.h" + +static int +memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1024 } /* (1..1024,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_FreqBandNrItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct FreqBandNrItem, freqBandIndicatorNr), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_freqBandIndicatorNr_constr_2, &asn_PER_memb_freqBandIndicatorNr_constr_2, memb_freqBandIndicatorNr_constraint_1 }, + 0, 0, /* No default value */ + "freqBandIndicatorNr" + }, +}; +static const ber_tlv_tag_t asn_DEF_FreqBandNrItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_FreqBandNrItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* freqBandIndicatorNr */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_FreqBandNrItem_specs_1 = { + sizeof(struct FreqBandNrItem), + offsetof(struct FreqBandNrItem, _asn_ctx), + asn_MAP_FreqBandNrItem_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_FreqBandNrItem = { + "FreqBandNrItem", + "FreqBandNrItem", + &asn_OP_SEQUENCE, + asn_DEF_FreqBandNrItem_tags_1, + sizeof(asn_DEF_FreqBandNrItem_tags_1) + /sizeof(asn_DEF_FreqBandNrItem_tags_1[0]), /* 1 */ + asn_DEF_FreqBandNrItem_tags_1, /* Same as above */ + sizeof(asn_DEF_FreqBandNrItem_tags_1) + /sizeof(asn_DEF_FreqBandNrItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_FreqBandNrItem_1, + 1, /* Elements count */ + &asn_SPC_FreqBandNrItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GNB-CU-CP-UE-E1AP-ID.c b/Bouncer/e2sm_rc/lib/GNB-CU-CP-UE-E1AP-ID.c new file mode 100644 index 0000000..3af431c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GNB-CU-CP-UE-E1AP-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-CU-CP-UE-E1AP-ID.h" + +int +GNB_CU_CP_UE_E1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_CU_CP_UE_E1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +asn_per_constraints_t asn_PER_type_GNB_CU_CP_UE_E1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_GNB_CU_CP_UE_E1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_CP_UE_E1AP_ID = { + "GNB-CU-CP-UE-E1AP-ID", + "GNB-CU-CP-UE-E1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1, + sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_CP_UE_E1AP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_CU_CP_UE_E1AP_ID_constr_1, &asn_PER_type_GNB_CU_CP_UE_E1AP_ID_constr_1, GNB_CU_CP_UE_E1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_GNB_CU_CP_UE_E1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GNB-CU-UE-F1AP-ID.c b/Bouncer/e2sm_rc/lib/GNB-CU-UE-F1AP-ID.c new file mode 100644 index 0000000..1482a7a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GNB-CU-UE-F1AP-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-CU-UE-F1AP-ID.h" + +int +GNB_CU_UE_F1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_CU_UE_F1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +asn_per_constraints_t asn_PER_type_GNB_CU_UE_F1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_GNB_CU_UE_F1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_UE_F1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_UE_F1AP_ID = { + "GNB-CU-UE-F1AP-ID", + "GNB-CU-UE-F1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_GNB_CU_UE_F1AP_ID_tags_1, + sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_UE_F1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UE_F1AP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_CU_UE_F1AP_ID_constr_1, &asn_PER_type_GNB_CU_UE_F1AP_ID_constr_1, GNB_CU_UE_F1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_GNB_CU_UE_F1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GNB-CU-UP-ID.c b/Bouncer/e2sm_rc/lib/GNB-CU-UP-ID.c new file mode 100644 index 0000000..5cbc06a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GNB-CU-UP-ID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-CU-UP-ID.h" + +int +GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID = { + "GNB-CU-UP-ID", + "GNB-CU-UP-ID", + &asn_OP_INTEGER, + asn_DEF_GNB_CU_UP_ID_tags_1, + sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_CU_UP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_CU_UP_ID_tags_1) + /sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_CU_UP_ID_constr_1, &asn_PER_type_GNB_CU_UP_ID_constr_1, GNB_CU_UP_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GNB-DU-ID.c b/Bouncer/e2sm_rc/lib/GNB-DU-ID.c new file mode 100644 index 0000000..70a673a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GNB-DU-ID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-DU-ID.h" + +int +GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_GNB_DU_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID = { + "GNB-DU-ID", + "GNB-DU-ID", + &asn_OP_INTEGER, + asn_DEF_GNB_DU_ID_tags_1, + sizeof(asn_DEF_GNB_DU_ID_tags_1) + /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ + asn_DEF_GNB_DU_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GNB_DU_ID_tags_1) + /sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_GNB_DU_ID_constr_1, &asn_PER_type_GNB_DU_ID_constr_1, GNB_DU_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GNB-ID.c b/Bouncer/e2sm_rc/lib/GNB-ID.c new file mode 100644 index 0000000..ba35f41 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GNB-ID.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GNB-ID.h" + +static int +memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size >= 22 && size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +static asn_per_constraints_t asn_PER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_GNB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GNB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GNB_ID, choice.gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_gNB_ID_constr_2, &asn_PER_memb_gNB_ID_constr_2, memb_gNB_ID_constraint_1 }, + 0, 0, /* No default value */ + "gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_GNB_ID_specs_1 = { + sizeof(struct GNB_ID), + offsetof(struct GNB_ID, _asn_ctx), + offsetof(struct GNB_ID, present), + sizeof(((struct GNB_ID *)0)->present), + asn_MAP_GNB_ID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GNB_ID = { + "GNB-ID", + "GNB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GNB_ID_constr_1, &asn_PER_type_GNB_ID_constr_1, CHOICE_constraint }, + asn_MBR_GNB_ID_1, + 1, /* Elements count */ + &asn_SPC_GNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GUAMI.c b/Bouncer/e2sm_rc/lib/GUAMI.c new file mode 100644 index 0000000..bd7e402 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GUAMI.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GUAMI.h" + +asn_TYPE_member_t asn_MBR_GUAMI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, aMFRegionID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMFRegionID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "aMFRegionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, aMFSetID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMFSetID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "aMFSetID" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUAMI, aMFPointer), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMFPointer, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "aMFPointer" + }, +}; +static const ber_tlv_tag_t asn_DEF_GUAMI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GUAMI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aMFRegionID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* aMFSetID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* aMFPointer */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GUAMI_specs_1 = { + sizeof(struct GUAMI), + offsetof(struct GUAMI, _asn_ctx), + asn_MAP_GUAMI_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GUAMI = { + "GUAMI", + "GUAMI", + &asn_OP_SEQUENCE, + asn_DEF_GUAMI_tags_1, + sizeof(asn_DEF_GUAMI_tags_1) + /sizeof(asn_DEF_GUAMI_tags_1[0]), /* 1 */ + asn_DEF_GUAMI_tags_1, /* Same as above */ + sizeof(asn_DEF_GUAMI_tags_1) + /sizeof(asn_DEF_GUAMI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GUAMI_1, + 4, /* Elements count */ + &asn_SPC_GUAMI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GUMMEI.c b/Bouncer/e2sm_rc/lib/GUMMEI.c new file mode 100644 index 0000000..316aa33 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GUMMEI.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GUMMEI.h" + +asn_TYPE_member_t asn_MBR_GUMMEI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GUMMEI, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUMMEI, mME_Group_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MME_Group_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "mME-Group-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct GUMMEI, mME_Code), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MME_Code, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "mME-Code" + }, +}; +static const ber_tlv_tag_t asn_DEF_GUMMEI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GUMMEI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* mME-Group-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* mME-Code */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GUMMEI_specs_1 = { + sizeof(struct GUMMEI), + offsetof(struct GUMMEI, _asn_ctx), + asn_MAP_GUMMEI_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GUMMEI = { + "GUMMEI", + "GUMMEI", + &asn_OP_SEQUENCE, + asn_DEF_GUMMEI_tags_1, + sizeof(asn_DEF_GUMMEI_tags_1) + /sizeof(asn_DEF_GUMMEI_tags_1[0]), /* 1 */ + asn_DEF_GUMMEI_tags_1, /* Same as above */ + sizeof(asn_DEF_GUMMEI_tags_1) + /sizeof(asn_DEF_GUMMEI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GUMMEI_1, + 3, /* Elements count */ + &asn_SPC_GUMMEI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GlobalENB-ID.c b/Bouncer/e2sm_rc/lib/GlobalENB-ID.c new file mode 100644 index 0000000..4e8b682 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GlobalENB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalENB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalENB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1 = { + sizeof(struct GlobalENB_ID), + offsetof(struct GlobalENB_ID, _asn_ctx), + asn_MAP_GlobalENB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID = { + "GlobalENB-ID", + "GlobalENB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalENB_ID_tags_1, + sizeof(asn_DEF_GlobalENB_ID_tags_1) + /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalENB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalENB_ID_tags_1) + /sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalENB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GlobalGNB-ID.c b/Bouncer/e2sm_rc/lib/GlobalGNB-ID.c new file mode 100644 index 0000000..c9ead94 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GlobalGNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalGNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalGNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalGNB_ID, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalGNB_ID, gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalGNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalGNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalGNB_ID_specs_1 = { + sizeof(struct GlobalGNB_ID), + offsetof(struct GlobalGNB_ID, _asn_ctx), + asn_MAP_GlobalGNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalGNB_ID = { + "GlobalGNB-ID", + "GlobalGNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalGNB_ID_tags_1, + sizeof(asn_DEF_GlobalGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalGNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalGNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalGNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalGNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalGNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GlobalNGRANNodeID.c b/Bouncer/e2sm_rc/lib/GlobalNGRANNodeID.c new file mode 100644 index 0000000..598fad6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GlobalNGRANNodeID.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalNGRANNodeID.h" + +#include "GlobalGNB-ID.h" +#include "GlobalNgENB-ID.h" +static asn_oer_constraints_t asn_OER_type_GlobalNGRANNodeID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_GlobalNGRANNodeID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_GlobalNGRANNodeID_1[] = { + { ATF_POINTER, 0, offsetof(struct GlobalNGRANNodeID, choice.gNB), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalNGRANNodeID, choice.ng_eNB), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalNgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalNGRANNodeID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ng-eNB */ +}; +asn_CHOICE_specifics_t asn_SPC_GlobalNGRANNodeID_specs_1 = { + sizeof(struct GlobalNGRANNodeID), + offsetof(struct GlobalNGRANNodeID, _asn_ctx), + offsetof(struct GlobalNGRANNodeID, present), + sizeof(((struct GlobalNGRANNodeID *)0)->present), + asn_MAP_GlobalNGRANNodeID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalNGRANNodeID = { + "GlobalNGRANNodeID", + "GlobalNGRANNodeID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GlobalNGRANNodeID_constr_1, &asn_PER_type_GlobalNGRANNodeID_constr_1, CHOICE_constraint }, + asn_MBR_GlobalNGRANNodeID_1, + 2, /* Elements count */ + &asn_SPC_GlobalNGRANNodeID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GlobalNgENB-ID.c b/Bouncer/e2sm_rc/lib/GlobalNgENB-ID.c new file mode 100644 index 0000000..3b6e357 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GlobalNgENB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalNgENB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalNgENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalNgENB_ID, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalNgENB_ID, ngENB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_NgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ngENB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalNgENB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalNgENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ngENB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalNgENB_ID_specs_1 = { + sizeof(struct GlobalNgENB_ID), + offsetof(struct GlobalNgENB_ID, _asn_ctx), + asn_MAP_GlobalNgENB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalNgENB_ID = { + "GlobalNgENB-ID", + "GlobalNgENB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalNgENB_ID_tags_1, + sizeof(asn_DEF_GlobalNgENB_ID_tags_1) + /sizeof(asn_DEF_GlobalNgENB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalNgENB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalNgENB_ID_tags_1) + /sizeof(asn_DEF_GlobalNgENB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalNgENB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalNgENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GlobalenGNB-ID.c b/Bouncer/e2sm_rc/lib/GlobalenGNB-ID.c new file mode 100644 index 0000000..2cdbad4 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GlobalenGNB-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GlobalenGNB-ID.h" + +asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, pLMN_Identity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMN-Identity" + }, + { ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, en_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_EN_GNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "en-gNB-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_GlobalenGNB_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalenGNB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* en-gNB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1 = { + sizeof(struct GlobalenGNB_ID), + offsetof(struct GlobalenGNB_ID, _asn_ctx), + asn_MAP_GlobalenGNB_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID = { + "GlobalenGNB-ID", + "GlobalenGNB-ID", + &asn_OP_SEQUENCE, + asn_DEF_GlobalenGNB_ID_tags_1, + sizeof(asn_DEF_GlobalenGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ + asn_DEF_GlobalenGNB_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_GlobalenGNB_ID_tags_1) + /sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_GlobalenGNB_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalenGNB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/GroupID.c b/Bouncer/e2sm_rc/lib/GroupID.c new file mode 100644 index 0000000..b712efc --- /dev/null +++ b/Bouncer/e2sm_rc/lib/GroupID.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "GroupID.h" + +static asn_oer_constraints_t asn_OER_type_GroupID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_GroupID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_GroupID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GroupID, choice.fiveGC), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FiveQI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveGC" + }, + { ATF_NOFLAGS, 0, offsetof(struct GroupID, choice.ePC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ePC" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GroupID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveGC */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ePC */ +}; +static asn_CHOICE_specifics_t asn_SPC_GroupID_specs_1 = { + sizeof(struct GroupID), + offsetof(struct GroupID, _asn_ctx), + offsetof(struct GroupID, present), + sizeof(((struct GroupID *)0)->present), + asn_MAP_GroupID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GroupID = { + "GroupID", + "GroupID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_GroupID_constr_1, &asn_PER_type_GroupID_constr_1, CHOICE_constraint }, + asn_MBR_GroupID_1, + 2, /* Elements count */ + &asn_SPC_GroupID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/INTEGER.c b/Bouncer/e2sm_rc/lib/INTEGER.c new file mode 100644 index 0000000..2a2f4d7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/INTEGER.c @@ -0,0 +1,1735 @@ +/*- + * Copyright (c) 2003-2014 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* Encoder and decoder of a primitive type */ +#include + +/* + * INTEGER basic type description. + */ +static const ber_tlv_tag_t asn_DEF_INTEGER_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_operation_t asn_OP_INTEGER = { + INTEGER_free, + INTEGER_print, + INTEGER_compare, + ber_decode_primitive, + INTEGER_encode_der, + INTEGER_decode_xer, + INTEGER_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + INTEGER_decode_oer, /* OER decoder */ + INTEGER_encode_oer, /* Canonical OER encoder */ +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + INTEGER_decode_uper, /* Unaligned PER decoder */ + INTEGER_encode_uper, /* Unaligned PER encoder */ + INTEGER_decode_aper, /* Aligned PER decoder */ + INTEGER_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + INTEGER_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_INTEGER = { + "INTEGER", + "INTEGER", + &asn_OP_INTEGER, + asn_DEF_INTEGER_tags, + sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), + asn_DEF_INTEGER_tags, /* Same as above */ + sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +/* + * Encode INTEGER type using DER. + */ +asn_enc_rval_t +INTEGER_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + asn_enc_rval_t rval; + INTEGER_t effective_integer; + + ASN_DEBUG("%s %s as INTEGER (tm=%d)", + cb?"Encoding":"Estimating", td->name, tag_mode); + + /* + * Canonicalize integer in the buffer. + * (Remove too long sign extension, remove some first 0x00 bytes) + */ + if(st->buf) { + uint8_t *buf = st->buf; + uint8_t *end1 = buf + st->size - 1; + int shift; + + /* Compute the number of superfluous leading bytes */ + for(; buf < end1; buf++) { + /* + * If the contents octets of an integer value encoding + * consist of more than one octet, then the bits of the + * first octet and bit 8 of the second octet: + * a) shall not all be ones; and + * b) shall not all be zero. + */ + switch(*buf) { + case 0x00: if((buf[1] & 0x80) == 0) + continue; + break; + case 0xff: if((buf[1] & 0x80)) + continue; + break; + } + break; + } + + /* Remove leading superfluous bytes from the integer */ + shift = buf - st->buf; + if(shift) { + union { + const uint8_t *c_buf; + uint8_t *nc_buf; + } unconst; + unconst.c_buf = st->buf; + effective_integer.buf = unconst.nc_buf + shift; + effective_integer.size = st->size - shift; + + st = &effective_integer; + } + } + + rval = der_encode_primitive(td, st, tag_mode, tag, cb, app_key); + if(rval.structure_ptr == &effective_integer) { + rval.structure_ptr = sptr; + } + return rval; +} + +static const asn_INTEGER_enum_map_t *INTEGER_map_enum2value( + const asn_INTEGER_specifics_t *specs, const char *lstart, + const char *lstop); + +/* + * INTEGER specific human-readable output. + */ +static ssize_t +INTEGER__dump(const asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + char scratch[32]; + uint8_t *buf = st->buf; + uint8_t *buf_end = st->buf + st->size; + intmax_t value; + ssize_t wrote = 0; + char *p; + int ret; + + if(specs && specs->field_unsigned) + ret = asn_INTEGER2umax(st, (uintmax_t *)&value); + else + ret = asn_INTEGER2imax(st, &value); + + /* Simple case: the integer size is small */ + if(ret == 0) { + const asn_INTEGER_enum_map_t *el; + el = (value >= 0 || !specs || !specs->field_unsigned) + ? INTEGER_map_value2enum(specs, value) : 0; + if(el) { + if(plainOrXER == 0) + return asn__format_to_callback(cb, app_key, + "%" ASN_PRIdMAX " (%s)", value, el->enum_name); + else + return asn__format_to_callback(cb, app_key, + "<%s/>", el->enum_name); + } else if(plainOrXER && specs && specs->strict_enumeration) { + ASN_DEBUG("ASN.1 forbids dealing with " + "unknown value of ENUMERATED type"); + errno = EPERM; + return -1; + } else { + return asn__format_to_callback(cb, app_key, + (specs && specs->field_unsigned) + ? "%" ASN_PRIuMAX + : "%" ASN_PRIdMAX, + value); + } + } else if(plainOrXER && specs && specs->strict_enumeration) { + /* + * Here and earlier, we cannot encode the ENUMERATED values + * if there is no corresponding identifier. + */ + ASN_DEBUG("ASN.1 forbids dealing with " + "unknown value of ENUMERATED type"); + errno = EPERM; + return -1; + } + + /* Output in the long xx:yy:zz... format */ + /* TODO: replace with generic algorithm (Knuth TAOCP Vol 2, 4.3.1) */ + for(p = scratch; buf < buf_end; buf++) { + const char * const h2c = "0123456789ABCDEF"; + if((p - scratch) >= (ssize_t)(sizeof(scratch) - 4)) { + /* Flush buffer */ + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + wrote += p - scratch; + p = scratch; + } + *p++ = h2c[*buf >> 4]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x3a; /* ":" */ + } + if(p != scratch) + p--; /* Remove the last ":" */ + + wrote += p - scratch; + return (cb(scratch, p - scratch, app_key) < 0) ? -1 : wrote; +} + +/* + * INTEGER specific human-readable output. + */ +int +INTEGER_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + ssize_t ret; + + (void)ilevel; + + if(!st || !st->buf) + ret = cb("", 8, app_key); + else + ret = INTEGER__dump(td, st, cb, app_key, 0); + + return (ret < 0) ? -1 : 0; +} + +struct e2v_key { + const char *start; + const char *stop; + const asn_INTEGER_enum_map_t *vemap; + const unsigned int *evmap; +}; +static int +INTEGER__compar_enum2value(const void *kp, const void *am) { + const struct e2v_key *key = (const struct e2v_key *)kp; + const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am; + const char *ptr, *end, *name; + + /* Remap the element (sort by different criterion) */ + el = key->vemap + key->evmap[el - key->vemap]; + + /* Compare strings */ + for(ptr = key->start, end = key->stop, name = el->enum_name; + ptr < end; ptr++, name++) { + if(*ptr != *name || !*name) + return *(const unsigned char *)ptr + - *(const unsigned char *)name; + } + return name[0] ? -1 : 0; +} + +static const asn_INTEGER_enum_map_t * +INTEGER_map_enum2value(const asn_INTEGER_specifics_t *specs, const char *lstart, + const char *lstop) { + const asn_INTEGER_enum_map_t *el_found; + int count = specs ? specs->map_count : 0; + struct e2v_key key; + const char *lp; + + if(!count) return NULL; + + /* Guaranteed: assert(lstart < lstop); */ + /* Figure out the tag name */ + for(lstart++, lp = lstart; lp < lstop; lp++) { + switch(*lp) { + case 9: case 10: case 11: case 12: case 13: case 32: /* WSP */ + case 0x2f: /* '/' */ case 0x3e: /* '>' */ + break; + default: + continue; + } + break; + } + if(lp == lstop) return NULL; /* No tag found */ + lstop = lp; + + key.start = lstart; + key.stop = lstop; + key.vemap = specs->value2enum; + key.evmap = specs->enum2value; + el_found = (asn_INTEGER_enum_map_t *)bsearch(&key, + specs->value2enum, count, sizeof(specs->value2enum[0]), + INTEGER__compar_enum2value); + if(el_found) { + /* Remap enum2value into value2enum */ + el_found = key.vemap + key.evmap[el_found - key.vemap]; + } + return el_found; +} + +static int +INTEGER__compar_value2enum(const void *kp, const void *am) { + long a = *(const long *)kp; + const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am; + long b = el->nat_value; + if(a < b) return -1; + else if(a == b) return 0; + else return 1; +} + +const asn_INTEGER_enum_map_t * +INTEGER_map_value2enum(const asn_INTEGER_specifics_t *specs, long value) { + int count = specs ? specs->map_count : 0; + if(!count) return 0; + return (asn_INTEGER_enum_map_t *)bsearch(&value, specs->value2enum, + count, sizeof(specs->value2enum[0]), + INTEGER__compar_value2enum); +} + +static int +INTEGER_st_prealloc(INTEGER_t *st, int min_size) { + void *p = MALLOC(min_size + 1); + if(p) { + void *b = st->buf; + st->size = 0; + st->buf = p; + FREEMEM(b); + return 0; + } else { + return -1; + } +} + +/* + * Decode the chunk of XML text encoding INTEGER. + */ +static enum xer_pbd_rval +INTEGER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + INTEGER_t *st = (INTEGER_t *)sptr; + intmax_t dec_value; + intmax_t hex_value = 0; + const char *lp; + const char *lstart = (const char *)chunk_buf; + const char *lstop = lstart + chunk_size; + enum { + ST_LEADSPACE, + ST_SKIPSPHEX, + ST_WAITDIGITS, + ST_DIGITS, + ST_DIGITS_TRAILSPACE, + ST_HEXDIGIT1, + ST_HEXDIGIT2, + ST_HEXDIGITS_TRAILSPACE, + ST_HEXCOLON, + ST_END_ENUM, + ST_UNEXPECTED + } state = ST_LEADSPACE; + const char *dec_value_start = 0; /* INVARIANT: always !0 in ST_DIGITS */ + const char *dec_value_end = 0; + + if(chunk_size) + ASN_DEBUG("INTEGER body %ld 0x%2x..0x%2x", + (long)chunk_size, *lstart, lstop[-1]); + + if(INTEGER_st_prealloc(st, (chunk_size/3) + 1)) + return XPBD_SYSTEM_FAILURE; + + /* + * We may have received a tag here. It will be processed inline. + * Use strtoul()-like code and serialize the result. + */ + for(lp = lstart; lp < lstop; lp++) { + int lv = *lp; + switch(lv) { + case 0x09: case 0x0a: case 0x0d: case 0x20: + switch(state) { + case ST_LEADSPACE: + case ST_DIGITS_TRAILSPACE: + case ST_HEXDIGITS_TRAILSPACE: + case ST_SKIPSPHEX: + continue; + case ST_DIGITS: + dec_value_end = lp; + state = ST_DIGITS_TRAILSPACE; + continue; + case ST_HEXCOLON: + state = ST_HEXDIGITS_TRAILSPACE; + continue; + default: + break; + } + break; + case 0x2d: /* '-' */ + if(state == ST_LEADSPACE) { + dec_value = 0; + dec_value_start = lp; + state = ST_WAITDIGITS; + continue; + } + break; + case 0x2b: /* '+' */ + if(state == ST_LEADSPACE) { + dec_value = 0; + dec_value_start = lp; + state = ST_WAITDIGITS; + continue; + } + break; + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + switch(state) { + case ST_DIGITS: continue; + case ST_SKIPSPHEX: /* Fall through */ + case ST_HEXDIGIT1: + hex_value = (lv - 0x30) << 4; + state = ST_HEXDIGIT2; + continue; + case ST_HEXDIGIT2: + hex_value += (lv - 0x30); + state = ST_HEXCOLON; + st->buf[st->size++] = (uint8_t)hex_value; + continue; + case ST_HEXCOLON: + return XPBD_BROKEN_ENCODING; + case ST_LEADSPACE: + dec_value = 0; + dec_value_start = lp; + /* FALL THROUGH */ + case ST_WAITDIGITS: + state = ST_DIGITS; + continue; + default: + break; + } + break; + case 0x3c: /* '<', start of XML encoded enumeration */ + if(state == ST_LEADSPACE) { + const asn_INTEGER_enum_map_t *el; + el = INTEGER_map_enum2value( + (const asn_INTEGER_specifics_t *) + td->specifics, lstart, lstop); + if(el) { + ASN_DEBUG("Found \"%s\" => %ld", + el->enum_name, el->nat_value); + dec_value = el->nat_value; + state = ST_END_ENUM; + lp = lstop - 1; + continue; + } + ASN_DEBUG("Unknown identifier for INTEGER"); + } + return XPBD_BROKEN_ENCODING; + case 0x3a: /* ':' */ + if(state == ST_HEXCOLON) { + /* This colon is expected */ + state = ST_HEXDIGIT1; + continue; + } else if(state == ST_DIGITS) { + /* The colon here means that we have + * decoded the first two hexadecimal + * places as a decimal value. + * Switch decoding mode. */ + ASN_DEBUG("INTEGER re-evaluate as hex form"); + state = ST_SKIPSPHEX; + dec_value_start = 0; + lp = lstart - 1; + continue; + } else { + ASN_DEBUG("state %d at %ld", state, (long)(lp - lstart)); + break; + } + /* [A-Fa-f] */ + case 0x41:case 0x42:case 0x43:case 0x44:case 0x45:case 0x46: + case 0x61:case 0x62:case 0x63:case 0x64:case 0x65:case 0x66: + switch(state) { + case ST_SKIPSPHEX: + case ST_LEADSPACE: /* Fall through */ + case ST_HEXDIGIT1: + hex_value = lv - ((lv < 0x61) ? 0x41 : 0x61); + hex_value += 10; + hex_value <<= 4; + state = ST_HEXDIGIT2; + continue; + case ST_HEXDIGIT2: + hex_value += lv - ((lv < 0x61) ? 0x41 : 0x61); + hex_value += 10; + st->buf[st->size++] = (uint8_t)hex_value; + state = ST_HEXCOLON; + continue; + case ST_DIGITS: + ASN_DEBUG("INTEGER re-evaluate as hex form"); + state = ST_SKIPSPHEX; + dec_value_start = 0; + lp = lstart - 1; + continue; + default: + break; + } + break; + } + + /* Found extra non-numeric stuff */ + ASN_DEBUG("INTEGER :: Found non-numeric 0x%2x at %ld", + lv, (long)(lp - lstart)); + state = ST_UNEXPECTED; + break; + } + + switch(state) { + case ST_END_ENUM: + /* Got a complete and valid enumeration encoded as a tag. */ + break; + case ST_DIGITS: + dec_value_end = lstop; + /* FALL THROUGH */ + case ST_DIGITS_TRAILSPACE: + /* The last symbol encountered was a digit. */ + switch(asn_strtoimax_lim(dec_value_start, &dec_value_end, &dec_value)) { + case ASN_STRTOX_OK: + if(specs && specs->field_unsigned && (uintmax_t) dec_value <= ULONG_MAX) { + break; + } else if(dec_value >= LONG_MIN && dec_value <= LONG_MAX) { + break; + } else { + /* + * We model INTEGER on long for XER, + * to avoid rewriting all the tests at once. + */ + ASN_DEBUG("INTEGER exceeds long range"); + } + /* Fall through */ + case ASN_STRTOX_ERROR_RANGE: + ASN_DEBUG("INTEGER decode %s hit range limit", td->name); + return XPBD_DECODER_LIMIT; + case ASN_STRTOX_ERROR_INVAL: + case ASN_STRTOX_EXPECT_MORE: + case ASN_STRTOX_EXTRA_DATA: + return XPBD_BROKEN_ENCODING; + } + break; + case ST_HEXCOLON: + case ST_HEXDIGITS_TRAILSPACE: + st->buf[st->size] = 0; /* Just in case termination */ + return XPBD_BODY_CONSUMED; + case ST_HEXDIGIT1: + case ST_HEXDIGIT2: + case ST_SKIPSPHEX: + return XPBD_BROKEN_ENCODING; + case ST_LEADSPACE: + /* Content not found */ + return XPBD_NOT_BODY_IGNORE; + case ST_WAITDIGITS: + case ST_UNEXPECTED: + ASN_DEBUG("INTEGER: No useful digits (state %d)", state); + return XPBD_BROKEN_ENCODING; /* No digits */ + } + + /* + * Convert the result of parsing of enumeration or a straight + * decimal value into a BER representation. + */ + if(asn_imax2INTEGER(st, dec_value)) { + ASN_DEBUG("INTEGER decode %s conversion failed", td->name); + return XPBD_SYSTEM_FAILURE; + } + + return XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +INTEGER_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + return xer_decode_primitive(opt_codec_ctx, td, + sptr, sizeof(INTEGER_t), opt_mname, + buf_ptr, size, INTEGER__xer_body_decode); +} + +asn_enc_rval_t +INTEGER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) + ASN__ENCODE_FAILED; + + er.encoded = INTEGER__dump(td, st, cb, app_key, 1); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + INTEGER_t *st = (INTEGER_t *)*sptr; + const asn_per_constraint_t *ct; + int repeat; + + (void)opt_codec_ctx; + + if(!st) { + st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + if(ct) { + if(ct->flags & APC_SEMI_CONSTRAINED) { + st->buf = (uint8_t *)CALLOC(1, 2); + if(!st->buf) ASN__DECODE_FAILED; + st->size = 1; + } else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) { + size_t size = (ct->range_bits + 7) >> 3; + st->buf = (uint8_t *)MALLOC(1 + size + 1); + if(!st->buf) ASN__DECODE_FAILED; + st->size = size; + } + } + + /* X.691-2008/11, #13.2.2, constrained whole number */ + if(ct && ct->flags != APC_UNCONSTRAINED) { + /* #11.5.6 */ + ASN_DEBUG("Integer with range %d bits", ct->range_bits); + if(ct->range_bits >= 0) { + if((size_t)ct->range_bits > 8 * sizeof(unsigned long)) + ASN__DECODE_FAILED; + + if(specs && specs->field_unsigned) { + unsigned long uvalue = 0; + if(uper_get_constrained_whole_number(pd, + &uvalue, ct->range_bits)) + ASN__DECODE_STARVED; + ASN_DEBUG("Got value %lu + low %ld", + uvalue, ct->lower_bound); + uvalue += ct->lower_bound; + if(asn_ulong2INTEGER(st, uvalue)) + ASN__DECODE_FAILED; + } else { + unsigned long uvalue = 0; + long svalue; + if(uper_get_constrained_whole_number(pd, + &uvalue, ct->range_bits)) + ASN__DECODE_STARVED; + ASN_DEBUG("Got value %lu + low %ld", + uvalue, ct->lower_bound); + if(per_long_range_unrebase(uvalue, ct->lower_bound, + ct->upper_bound, &svalue) + || asn_long2INTEGER(st, svalue)) { + ASN__DECODE_FAILED; + } + } + return rval; + } + } else { + ASN_DEBUG("Decoding unconstrained integer %s", td->name); + } + + /* X.691, #12.2.3, #12.2.4 */ + do { + ssize_t len = 0; + void *p = NULL; + int ret = 0; + + /* Get the PER length */ + len = uper_get_length(pd, -1, 0, &repeat); + if(len < 0) ASN__DECODE_STARVED; + + p = REALLOC(st->buf, st->size + len + 1); + if(!p) ASN__DECODE_FAILED; + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len); + if(ret < 0) ASN__DECODE_STARVED; + st->size += len; + } while(repeat); + st->buf[st->size] = 0; /* JIC */ + + /* #12.2.3 */ + if(ct && ct->lower_bound) { + /* + * TODO: replace by in-place arithmetics. + */ + long value = 0; + if(asn_INTEGER2long(st, &value)) + ASN__DECODE_FAILED; + if(asn_imax2INTEGER(st, value + ct->lower_bound)) + ASN__DECODE_FAILED; + } + + return rval; +} + +asn_enc_rval_t +INTEGER_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + const INTEGER_t *st = (const INTEGER_t *)sptr; + const uint8_t *buf; + const uint8_t *end; + const asn_per_constraint_t *ct; + long value = 0; + + if(!st || st->size == 0) ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + er.encoded = 0; + + if(ct) { + int inext = 0; + if(specs && specs->field_unsigned) { + unsigned long uval; + if(asn_INTEGER2ulong(st, &uval)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(uval < (unsigned long)ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(uval < (unsigned long)ct->lower_bound + || uval > (unsigned long)ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%" ASN_PRI_SIZE ") lb %lu ub %lu %s", + uval, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + value = uval; + } else { + if(asn_INTEGER2long(st, &value)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value < ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value < ct->lower_bound + || value > ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %ld (%02x/%" ASN_PRI_SIZE ") lb %ld ub %ld %s", + value, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + } + if(ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + } + + + /* X.691-11/2008, #13.2.2, test if constrained whole number */ + if(ct && ct->range_bits >= 0) { + unsigned long v; + /* #11.5.6 -> #11.3 */ + ASN_DEBUG("Encoding integer %ld (%lu) with range %d bits", + value, value - ct->lower_bound, ct->range_bits); + if(specs && specs->field_unsigned) { + if ( ((unsigned long)ct->lower_bound > (unsigned long)(ct->upper_bound) + || ((unsigned long)value < (unsigned long)ct->lower_bound)) + || ((unsigned long)value > (unsigned long)ct->upper_bound) + ) { + ASN_DEBUG("Value %lu to-be-encoded is outside the bounds [%lu, %lu]!", + value, ct->lower_bound, ct->upper_bound); + ASN__ENCODE_FAILED; + } + v = (unsigned long)value - (unsigned long)ct->lower_bound; + } else { + if(per_long_range_rebase(value, ct->lower_bound, ct->upper_bound, &v)) { + ASN__ENCODE_FAILED; + } + } + if(uper_put_constrained_whole_number_u(po, v, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(ct && ct->lower_bound) { + ASN_DEBUG("Adjust lower bound to %ld", ct->lower_bound); + /* TODO: adjust lower bound */ + ASN__ENCODE_FAILED; + } + + for(buf = st->buf, end = st->buf + st->size; buf < end;) { + int need_eom = 0; + ssize_t mayEncode = uper_put_length(po, end - buf, &need_eom); + if(mayEncode < 0) + ASN__ENCODE_FAILED; + if(per_put_many_bits(po, buf, 8 * mayEncode)) + ASN__ENCODE_FAILED; + buf += mayEncode; + if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; + } + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + INTEGER_t *st = (INTEGER_t *)*sptr; + const asn_per_constraint_t *ct; + int repeat; + + (void)opt_codec_ctx; + + if(!st) { + st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + if(ct) { + if(ct->flags & APC_SEMI_CONSTRAINED) { + st->buf = (uint8_t *)CALLOC(1, 2); + if(!st->buf) ASN__DECODE_FAILED; + st->size = 1; + } else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) { + size_t size = (ct->range_bits + 7) >> 3; + st->buf = (uint8_t *)MALLOC(1 + size + 1); + if(!st->buf) ASN__DECODE_FAILED; + st->size = size; + } + } + + /* X.691, #12.2.2 */ + if(ct && ct->flags != APC_UNCONSTRAINED) { + /* #10.5.6 */ + ASN_DEBUG("Integer with range %d bits", ct->range_bits); + if(ct->range_bits >= 0) { + if (ct->range_bits > 16) { + int max_range_bytes = (ct->range_bits >> 3) + + (((ct->range_bits % 8) > 0) ? 1 : 0); + int length = 0, i; + long value = 0; + + for (i = 1; ; i++) { + int upper = 1 << i; + if (upper >= max_range_bytes) + break; + } + ASN_DEBUG("Can encode %d (%d bytes) in %d bits", ct->range_bits, + max_range_bytes, i); + + if ((length = per_get_few_bits(pd, i)) < 0) + ASN__DECODE_FAILED; + + /* X.691 #12.2.6 length determinant + lb (1) */ + length += 1; + ASN_DEBUG("Got length %d", length); + if (aper_get_align(pd) != 0) + ASN__DECODE_FAILED; + while (length--) { + int buf = per_get_few_bits(pd, 8); + if (buf < 0) + ASN__DECODE_FAILED; + value += (((long)buf) << (8 * length)); + } + + value += ct->lower_bound; + if((specs && specs->field_unsigned) + ? asn_uint642INTEGER(st, (unsigned long)value) + : asn_int642INTEGER(st, value)) + ASN__DECODE_FAILED; + ASN_DEBUG("Got value %ld + low %ld", + value, ct->lower_bound); + } else { + long value = 0; + if (ct->range_bits < 8) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + } else if (ct->range_bits == 8) { + if (aper_get_align(pd) < 0) + ASN__DECODE_FAILED; + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + } else { + /* Align */ + if (aper_get_align(pd) < 0) + ASN__DECODE_FAILED; + value = per_get_few_bits(pd, 16); + if(value < 0) ASN__DECODE_STARVED; + } + value += ct->lower_bound; + if((specs && specs->field_unsigned) + ? asn_ulong2INTEGER(st, value) + : asn_long2INTEGER(st, value)) + ASN__DECODE_FAILED; + ASN_DEBUG("Got value %ld + low %ld", + value, ct->lower_bound); + } + return rval; + } else { + ASN__DECODE_FAILED; + } + } else { + ASN_DEBUG("Decoding unconstrained integer %s", td->name); + } + + /* X.691, #12.2.3, #12.2.4 */ + do { + ssize_t len; + void *p; + int ret; + + /* Get the PER length */ + len = aper_get_length(pd, -1, -1, &repeat); + if(len < 0) ASN__DECODE_STARVED; + + p = REALLOC(st->buf, st->size + len + 1); + if(!p) ASN__DECODE_FAILED; + st->buf = (uint8_t *)p; + + ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len); + if(ret < 0) ASN__DECODE_STARVED; + st->size += len; + } while(repeat); + st->buf[st->size] = 0; /* JIC */ + + /* #12.2.3 */ + if(ct && ct->lower_bound) { + /* + * TODO: replace by in-place arithmetics. + */ + long value; + if(asn_INTEGER2long(st, &value)) + ASN__DECODE_FAILED; + if(asn_long2INTEGER(st, value + ct->lower_bound)) + ASN__DECODE_FAILED; + } + + return rval; +} + +asn_enc_rval_t +INTEGER_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + const INTEGER_t *st = (const INTEGER_t *)sptr; + const uint8_t *buf; + const uint8_t *end; + const asn_per_constraint_t *ct; + long value = 0; + + if(!st || st->size == 0) ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.per_constraints; + ct = constraints ? &constraints->value : 0; + + er.encoded = 0; + + if(ct) { + int inext = 0; + if(specs && specs->field_unsigned) { + unsigned long uval; + if(asn_INTEGER2ulong(st, &uval)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(uval < (unsigned long)ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(uval < (unsigned long)ct->lower_bound + || uval > (unsigned long)ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%lu) lb %ld ub %ld %s", + uval, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + value = uval; + } else { + if(asn_INTEGER2long(st, &value)) ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value < ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value < ct->lower_bound + || value > ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%lu) lb %ld ub %ld %s", + value, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + } + if(ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + } + + /* X.691, #12.2.2 */ + if(ct && ct->range_bits >= 0) { + unsigned long v; + + /* #10.5.6 */ + ASN_DEBUG("Encoding integer %ld (%lu) with range %d bits", + value, value - ct->lower_bound, ct->range_bits); + + v = value - ct->lower_bound; + + /* #12 <= 8 -> alignment ? */ + if (ct->range_bits < 8) { + if(per_put_few_bits(po, 0x00 | v, ct->range_bits)) + ASN__ENCODE_FAILED; + } else if (ct->range_bits == 8) { + if(aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + if(per_put_few_bits(po, 0x00 | v, ct->range_bits)) + ASN__ENCODE_FAILED; + } else if (ct->range_bits <= 16) { + /* Consume the bytes to align on octet */ + if(aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + if(per_put_few_bits(po, 0x0000 | v, + 16)) + ASN__ENCODE_FAILED; + } else { + /* TODO: extend to >64 bits */ + int64_t v64 = v; + int i, j; + int max_range_bytes = (ct->range_bits >> 3) + + (((ct->range_bits % 8) > 0) ? 1 : 0); + + for (i = 1; ; i++) { + int upper = 1 << i; + if (upper >= max_range_bytes) + break; + } + + for (j = sizeof(int64_t) -1; j != 0; j--) { + int64_t val; + val = v64 >> (j * 8); + if (val != 0) + break; + } + + /* Putting length in the minimum number of bits ex: 5 = 3bits */ + if (per_put_few_bits(po, j, i)) + ASN__ENCODE_FAILED; + + /* Consume the bits to align on octet */ + if (aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + /* Put the value */ + for (i = 0; i <= j; i++) { + if(per_put_few_bits(po, (v64 >> (8 * (j - i))) & 0xff, 8)) + ASN__ENCODE_FAILED; + } + } + ASN__ENCODED_OK(er); + } + + if(ct && ct->lower_bound) { + ASN_DEBUG("Adjust lower bound to %ld", ct->lower_bound); + /* TODO: adjust lower bound */ + ASN__ENCODE_FAILED; + } + + for(buf = st->buf, end = st->buf + st->size; buf < end;) { + ssize_t mayEncode = aper_put_length(po, -1, end - buf); + if(mayEncode < 0) + ASN__ENCODE_FAILED; + if(per_put_many_bits(po, buf, 8 * mayEncode)) + ASN__ENCODE_FAILED; + buf += mayEncode; + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +static intmax_t +asn__integer_convert(const uint8_t *b, const uint8_t *end) { + uintmax_t value; + + /* Perform the sign initialization */ + /* Actually value = -(*b >> 7); gains nothing, yet unreadable! */ + if((*b >> 7)) { + value = (uintmax_t)(-1); + } else { + value = 0; + } + + /* Conversion engine */ + for(; b < end; b++) { + value = (value << 8) | *b; + } + + return value; +} + +int +asn_INTEGER2imax(const INTEGER_t *iptr, intmax_t *lptr) { + uint8_t *b, *end; + size_t size; + + /* Sanity checking */ + if(!iptr || !iptr->buf || !lptr) { + errno = EINVAL; + return -1; + } + + /* Cache the begin/end of the buffer */ + b = iptr->buf; /* Start of the INTEGER buffer */ + size = iptr->size; + end = b + size; /* Where to stop */ + + if(size > sizeof(intmax_t)) { + uint8_t *end1 = end - 1; + /* + * Slightly more advanced processing, + * able to process INTEGERs with >sizeof(intmax_t) bytes + * when the actual value is small, e.g. for intmax_t == int32_t + * (0x0000000000abcdef INTEGER would yield a fine 0x00abcdef int32_t) + */ + /* Skip out the insignificant leading bytes */ + for(; b < end1; b++) { + switch(*b) { + case 0x00: if((b[1] & 0x80) == 0) continue; break; + case 0xff: if((b[1] & 0x80) != 0) continue; break; + } + break; + } + + size = end - b; + if(size > sizeof(intmax_t)) { + /* Still cannot fit the sizeof(intmax_t) */ + errno = ERANGE; + return -1; + } + } + + /* Shortcut processing of a corner case */ + if(end == b) { + *lptr = 0; + return 0; + } + + *lptr = asn__integer_convert(b, end); + return 0; +} + +/* FIXME: negative INTEGER values are silently interpreted as large unsigned ones. */ +int +asn_INTEGER2umax(const INTEGER_t *iptr, uintmax_t *lptr) { + uint8_t *b, *end; + uintmax_t value; + size_t size; + + if(!iptr || !iptr->buf || !lptr) { + errno = EINVAL; + return -1; + } + + b = iptr->buf; + size = iptr->size; + end = b + size; + + /* If all extra leading bytes are zeroes, ignore them */ + for(; size > sizeof(value); b++, size--) { + if(*b) { + /* Value won't fit into uintmax_t */ + errno = ERANGE; + return -1; + } + } + + /* Conversion engine */ + for(value = 0; b < end; b++) + value = (value << 8) | *b; + + *lptr = value; + return 0; +} + +int +asn_umax2INTEGER(INTEGER_t *st, uintmax_t value) { + uint8_t *buf; + uint8_t *end; + uint8_t *b; + int shr; + + if(value <= ((~(uintmax_t)0) >> 1)) { + return asn_imax2INTEGER(st, value); + } + + buf = (uint8_t *)MALLOC(1 + sizeof(value)); + if(!buf) return -1; + + end = buf + (sizeof(value) + 1); + buf[0] = 0; /* INTEGERs are signed. 0-byte indicates positive. */ + for(b = buf + 1, shr = (sizeof(value) - 1) * 8; b < end; shr -= 8, b++) + *b = (uint8_t)(value >> shr); + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = 1 + sizeof(value); + + return 0; +} + +int +asn_imax2INTEGER(INTEGER_t *st, intmax_t value) { + uint8_t *buf, *bp; + uint8_t *p; + uint8_t *pstart; + uint8_t *pend1; + int littleEndian = 1; /* Run-time detection */ + int add; + + if(!st) { + errno = EINVAL; + return -1; + } + + buf = (uint8_t *)(long *)MALLOC(sizeof(value)); + if(!buf) return -1; + + if(*(char *)&littleEndian) { + pstart = (uint8_t *)&value + sizeof(value) - 1; + pend1 = (uint8_t *)&value; + add = -1; + } else { + pstart = (uint8_t *)&value; + pend1 = pstart + sizeof(value) - 1; + add = 1; + } + + /* + * If the contents octet consists of more than one octet, + * then bits of the first octet and bit 8 of the second octet: + * a) shall not all be ones; and + * b) shall not all be zero. + */ + for(p = pstart; p != pend1; p += add) { + switch(*p) { + case 0x00: if((*(p+add) & 0x80) == 0) + continue; + break; + case 0xff: if((*(p+add) & 0x80)) + continue; + break; + } + break; + } + /* Copy the integer body */ + for(bp = buf, pend1 += add; p != pend1; p += add) + *bp++ = *p; + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = bp - buf; + + return 0; +} + +int +asn_INTEGER2long(const INTEGER_t *iptr, long *l) { + intmax_t v; + if(asn_INTEGER2imax(iptr, &v) == 0) { + if(v < LONG_MIN || v > LONG_MAX) { + errno = ERANGE; + return -1; + } + *l = v; + return 0; + } else { + return -1; + } +} + +int +asn_INTEGER2ulong(const INTEGER_t *iptr, unsigned long *l) { + uintmax_t v; + if(asn_INTEGER2umax(iptr, &v) == 0) { + if(v > ULONG_MAX) { + errno = ERANGE; + return -1; + } + *l = v; + return 0; + } else { + return -1; + } +} + +int +asn_long2INTEGER(INTEGER_t *st, long value) { + return asn_imax2INTEGER(st, value); +} + +int +asn_ulong2INTEGER(INTEGER_t *st, unsigned long value) { + return asn_imax2INTEGER(st, value); +} + + +int +asn_uint642INTEGER(INTEGER_t *st, uint64_t value) { + uint8_t *buf; + uint8_t *end; + uint8_t *b; + int shr; + + if(value <= INT64_MAX) + return asn_int642INTEGER(st, value); + + buf = (uint8_t *)MALLOC(1 + sizeof(value)); + if(!buf) return -1; + + end = buf + (sizeof(value) + 1); + buf[0] = 0; + for(b = buf + 1, shr = (sizeof(value)-1)*8; b < end; shr -= 8, b++) + *b = (uint8_t)(value >> shr); + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = 1 + sizeof(value); + + return 0; +} + +int +asn_int642INTEGER(INTEGER_t *st, int64_t value) { + uint8_t *buf, *bp; + uint8_t *p; + uint8_t *pstart; + uint8_t *pend1; + int littleEndian = 1; /* Run-time detection */ + int add; + + if(!st) { + errno = EINVAL; + return -1; + } + + buf = (uint8_t *)MALLOC(sizeof(value)); + if(!buf) return -1; + + if(*(char *)&littleEndian) { + pstart = (uint8_t *)&value + sizeof(value) - 1; + pend1 = (uint8_t *)&value; + add = -1; + } else { + pstart = (uint8_t *)&value; + pend1 = pstart + sizeof(value) - 1; + add = 1; + } + + /* + * If the contents octet consists of more than one octet, + * then bits of the first octet and bit 8 of the second octet: + * a) shall not all be ones; and + * b) shall not all be zero. + */ + for(p = pstart; p != pend1; p += add) { + switch(*p) { + case 0x00: if((*(p+add) & 0x80) == 0) + continue; + break; + case 0xff: if((*(p+add) & 0x80)) + continue; + break; + } + break; + } + /* Copy the integer body */ + for(pstart = p, bp = buf, pend1 += add; p != pend1; p += add) + *bp++ = *p; + + if(st->buf) FREEMEM(st->buf); + st->buf = buf; + st->size = bp - buf; + + return 0; +} + +/* + * Parse the number in the given string until the given *end position, + * returning the position after the last parsed character back using the + * same (*end) pointer. + * WARNING: This behavior is different from the standard strtol/strtoimax(3). + */ +enum asn_strtox_result_e +asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) { + int sign = 1; + intmax_t value; + +#define ASN1_INTMAX_MAX ((~(uintmax_t)0) >> 1) + const intmax_t upper_boundary = ASN1_INTMAX_MAX / 10; + intmax_t last_digit_max = ASN1_INTMAX_MAX % 10; +#undef ASN1_INTMAX_MAX + + if(str >= *end) return ASN_STRTOX_ERROR_INVAL; + + switch(*str) { + case '-': + last_digit_max++; + sign = -1; + /* FALL THROUGH */ + case '+': + str++; + if(str >= *end) { + *end = str; + return ASN_STRTOX_EXPECT_MORE; + } + } + + for(value = 0; str < (*end); str++) { + switch(*str) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: { + int d = *str - '0'; + if(value < upper_boundary) { + value = value * 10 + d; + } else if(value == upper_boundary) { + if(d <= last_digit_max) { + if(sign > 0) { + value = value * 10 + d; + } else { + sign = 1; + value = -value * 10 - d; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } + continue; + default: + *end = str; + *intp = sign * value; + return ASN_STRTOX_EXTRA_DATA; + } + } + + *end = str; + *intp = sign * value; + return ASN_STRTOX_OK; +} + +/* + * Parse the number in the given string until the given *end position, + * returning the position after the last parsed character back using the + * same (*end) pointer. + * WARNING: This behavior is different from the standard strtoul/strtoumax(3). + */ +enum asn_strtox_result_e +asn_strtoumax_lim(const char *str, const char **end, uintmax_t *uintp) { + uintmax_t value; + +#define ASN1_UINTMAX_MAX ((~(uintmax_t)0)) + const uintmax_t upper_boundary = ASN1_UINTMAX_MAX / 10; + uintmax_t last_digit_max = ASN1_UINTMAX_MAX % 10; +#undef ASN1_UINTMAX_MAX + + if(str >= *end) return ASN_STRTOX_ERROR_INVAL; + + switch(*str) { + case '-': + return ASN_STRTOX_ERROR_INVAL; + case '+': + str++; + if(str >= *end) { + *end = str; + return ASN_STRTOX_EXPECT_MORE; + } + } + + for(value = 0; str < (*end); str++) { + switch(*str) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: { + unsigned int d = *str - '0'; + if(value < upper_boundary) { + value = value * 10 + d; + } else if(value == upper_boundary) { + if(d <= last_digit_max) { + value = value * 10 + d; + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } + continue; + default: + *end = str; + *uintp = value; + return ASN_STRTOX_EXTRA_DATA; + } + } + + *end = str; + *uintp = value; + return ASN_STRTOX_OK; +} + +enum asn_strtox_result_e +asn_strtol_lim(const char *str, const char **end, long *lp) { + intmax_t value; + switch(asn_strtoimax_lim(str, end, &value)) { + case ASN_STRTOX_ERROR_RANGE: + return ASN_STRTOX_ERROR_RANGE; + case ASN_STRTOX_ERROR_INVAL: + return ASN_STRTOX_ERROR_INVAL; + case ASN_STRTOX_EXPECT_MORE: + return ASN_STRTOX_EXPECT_MORE; + case ASN_STRTOX_OK: + if(value >= LONG_MIN && value <= LONG_MAX) { + *lp = value; + return ASN_STRTOX_OK; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + case ASN_STRTOX_EXTRA_DATA: + if(value >= LONG_MIN && value <= LONG_MAX) { + *lp = value; + return ASN_STRTOX_EXTRA_DATA; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + } + + assert(!"Unreachable"); + return ASN_STRTOX_ERROR_INVAL; +} + +enum asn_strtox_result_e +asn_strtoul_lim(const char *str, const char **end, unsigned long *ulp) { + uintmax_t value; + switch(asn_strtoumax_lim(str, end, &value)) { + case ASN_STRTOX_ERROR_RANGE: + return ASN_STRTOX_ERROR_RANGE; + case ASN_STRTOX_ERROR_INVAL: + return ASN_STRTOX_ERROR_INVAL; + case ASN_STRTOX_EXPECT_MORE: + return ASN_STRTOX_EXPECT_MORE; + case ASN_STRTOX_OK: + if(value <= ULONG_MAX) { + *ulp = value; + return ASN_STRTOX_OK; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + case ASN_STRTOX_EXTRA_DATA: + if(value <= ULONG_MAX) { + *ulp = value; + return ASN_STRTOX_EXTRA_DATA; + } else { + return ASN_STRTOX_ERROR_RANGE; + } + } + + assert(!"Unreachable"); + return ASN_STRTOX_ERROR_INVAL; +} + +int +INTEGER_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const INTEGER_t *a = aptr; + const INTEGER_t *b = bptr; + + (void)td; + + if(a && b) { + if(a->size && b->size) { + int sign_a = (a->buf[0] & 0x80) ? -1 : 1; + int sign_b = (b->buf[0] & 0x80) ? -1 : 1; + + if(sign_a < sign_b) return -1; + if(sign_a > sign_b) return 1; + + /* The shortest integer wins, unless comparing negatives */ + if(a->size < b->size) { + return -1 * sign_a; + } else if(a->size > b->size) { + return 1 * sign_b; + } + + return sign_a * memcmp(a->buf, b->buf, a->size); + } else if(a->size) { + int sign = (a->buf[0] & 0x80) ? -1 : 1; + return (1) * sign; + } else if(b->size) { + int sign = (a->buf[0] & 0x80) ? -1 : 1; + return (-1) * sign; + } else { + return 0; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } + +} + +asn_random_fill_result_t +INTEGER_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + INTEGER_t *st = *sptr; + const asn_INTEGER_enum_map_t *emap; + size_t emap_len; + intmax_t value; + int find_inside_map; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (INTEGER_t *)CALLOC(1, sizeof(*st)); + if(st == NULL) { + return result_failed; + } + } + + if(specs) { + emap = specs->value2enum; + emap_len = specs->map_count; + if(specs->strict_enumeration) { + find_inside_map = emap_len > 0; + } else { + find_inside_map = emap_len ? asn_random_between(0, 1) : 0; + } + } else { + emap = 0; + emap_len = 0; + find_inside_map = 0; + } + + if(find_inside_map) { + assert(emap_len > 0); + value = emap[asn_random_between(0, emap_len - 1)].nat_value; + } else { + const asn_per_constraints_t *ct; + + static const long variants[] = { + -65536, -65535, -65534, -32769, -32768, -32767, -16385, -16384, + -16383, -257, -256, -255, -254, -129, -128, -127, + -126, -1, 0, 1, 126, 127, 128, 129, + 254, 255, 256, 257, 16383, 16384, 16385, 32767, + 32768, 32769, 65534, 65535, 65536, 65537}; + if(specs && specs->field_unsigned) { + assert(variants[18] == 0); + value = variants[asn_random_between( + 18, sizeof(variants) / sizeof(variants[0]) - 1)]; + } else { + value = variants[asn_random_between( + 0, sizeof(variants) / sizeof(variants[0]) - 1)]; + } + + if(!constraints) constraints = &td->encoding_constraints; + ct = constraints ? constraints->per_constraints : 0; + if(ct && (ct->value.flags & APC_CONSTRAINED)) { + if(value < ct->value.lower_bound || value > ct->value.upper_bound) { + value = asn_random_between(ct->value.lower_bound, + ct->value.upper_bound); + } + } + } + + if(asn_imax2INTEGER(st, value)) { + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + return result_failed; + } else { + *sptr = st; + result_ok.length = st->size; + return result_ok; + } +} diff --git a/Bouncer/e2sm_rc/lib/INTEGER_oer.c b/Bouncer/e2sm_rc/lib/INTEGER_oer.c new file mode 100644 index 0000000..110689b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/INTEGER_oer.c @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +INTEGER_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + INTEGER_t *st = (INTEGER_t *)*sptr; + struct asn_oer_constraint_number_s ct = {0, 0}; + size_t req_bytes; + + (void)opt_codec_ctx; + (void)specs; + + if(!st) { + st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(!st) ASN__DECODE_FAILED; + } + + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints) ct = constraints->value; + + if(ct.width) { + req_bytes = ct.width; + } else { + /* No lower bound and no upper bound, effectively */ + + ssize_t consumed = oer_fetch_length(ptr, size, &req_bytes); + if(consumed == 0) { + ASN__DECODE_STARVED; + } else if(consumed == -1) { + ASN__DECODE_FAILED; + } + rval.consumed += consumed; + ptr = (const char *)ptr + consumed; + size -= consumed; + } + + if(req_bytes > size) { + ASN__DECODE_STARVED; + } + + if(ct.positive) { + /* X.969 08/2015 10.2(a) */ + unsigned msb; /* Most significant bit */ + size_t useful_size; + + /* Check most significant bit */ + msb = *(const uint8_t *)ptr >> 7; /* yields 0 or 1 */ + useful_size = msb + req_bytes; + st->buf = (uint8_t *)MALLOC(useful_size + 1); + if(!st->buf) { + ASN__DECODE_FAILED; + } + + /* + * Record a large unsigned in a way not to confuse it + * with signed value. + */ + st->buf[0] = '\0'; + memcpy(st->buf + msb, ptr, req_bytes); + st->buf[useful_size] = '\0'; /* Just in case, 0-terminate */ + st->size = useful_size; + + rval.consumed += req_bytes; + return rval; + } else { + /* X.969 08/2015 10.2(b) */ + st->buf = (uint8_t *)MALLOC(req_bytes + 1); + if(!st->buf) { + ASN__DECODE_FAILED; + } + + memcpy(st->buf, ptr, req_bytes); + st->buf[req_bytes] = '\0'; /* Just in case, 0-terminate */ + st->size = req_bytes; + + rval.consumed += req_bytes; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +INTEGER_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const INTEGER_t *st = sptr; + asn_enc_rval_t er = {0,0,0}; + struct asn_oer_constraint_number_s ct = {0, 0}; + const uint8_t *buf; + const uint8_t *end; + size_t useful_bytes; + size_t req_bytes = 0; + int sign = 0; + + if(!st || st->size == 0) ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints) ct = constraints->value; + + er.encoded = 0; + + buf = st->buf; + end = buf + st->size; + + sign = (buf && buf < end) ? buf[0] & 0x80 : 0; + + /* Ignore 9 leading zeroes or ones */ + if(ct.positive) { + if(sign) { + /* The value given is a signed value. Can't proceed. */ + ASN__ENCODE_FAILED; + } + /* Remove leading zeros. */ + for(; buf + 1 < end; buf++) { + if(buf[0] != 0x0) break; + } + } else { + for(; buf + 1 < end; buf++) { + if(buf[0] == 0x0 && (buf[1] & 0x80) == 0) { + continue; + } else if(buf[0] == 0xff && (buf[1] & 0x80) != 0) { + continue; + } + break; + } + } + + useful_bytes = end - buf; + if(ct.width) { + req_bytes = ct.width; + } else { + ssize_t r = oer_serialize_length(useful_bytes, cb, app_key); + if(r < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += r; + req_bytes = useful_bytes; + } + + if(req_bytes < useful_bytes) { + ASN__ENCODE_FAILED; + } + + er.encoded += req_bytes; + + for(; req_bytes > useful_bytes; req_bytes--) { + if(cb(sign?"\xff":"\0", 1, app_key) < 0) { + ASN__ENCODE_FAILED; + } + } + + if(cb(buf, useful_bytes, app_key) < 0) { + ASN__ENCODE_FAILED; + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/IndexToRFSP.c b/Bouncer/e2sm_rc/lib/IndexToRFSP.c new file mode 100644 index 0000000..25843d0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/IndexToRFSP.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "IndexToRFSP.h" + +int +IndexToRFSP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 256)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_IndexToRFSP_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_IndexToRFSP_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 256 } /* (1..256,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_IndexToRFSP_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_IndexToRFSP = { + "IndexToRFSP", + "IndexToRFSP", + &asn_OP_NativeInteger, + asn_DEF_IndexToRFSP_tags_1, + sizeof(asn_DEF_IndexToRFSP_tags_1) + /sizeof(asn_DEF_IndexToRFSP_tags_1[0]), /* 1 */ + asn_DEF_IndexToRFSP_tags_1, /* Same as above */ + sizeof(asn_DEF_IndexToRFSP_tags_1) + /sizeof(asn_DEF_IndexToRFSP_tags_1[0]), /* 1 */ + { &asn_OER_type_IndexToRFSP_constr_1, &asn_PER_type_IndexToRFSP_constr_1, IndexToRFSP_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InsertIndication-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/InsertIndication-RANParameter-Item.c new file mode 100644 index 0000000..b460c7e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InsertIndication-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InsertIndication-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_InsertIndication_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InsertIndication_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct InsertIndication_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct InsertIndication_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_InsertIndication_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_InsertIndication_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InsertIndication_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InsertIndication_RANParameter_Item_specs_1 = { + sizeof(struct InsertIndication_RANParameter_Item), + offsetof(struct InsertIndication_RANParameter_Item, _asn_ctx), + asn_MAP_InsertIndication_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_InsertIndication_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InsertIndication_RANParameter_Item = { + "InsertIndication-RANParameter-Item", + "InsertIndication-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_InsertIndication_RANParameter_Item_tags_1, + sizeof(asn_DEF_InsertIndication_RANParameter_Item_tags_1) + /sizeof(asn_DEF_InsertIndication_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_InsertIndication_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_InsertIndication_RANParameter_Item_tags_1) + /sizeof(asn_DEF_InsertIndication_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InsertIndication_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_InsertIndication_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/Interface-MessageID.c b/Bouncer/e2sm_rc/lib/Interface-MessageID.c new file mode 100644 index 0000000..35413ba --- /dev/null +++ b/Bouncer/e2sm_rc/lib/Interface-MessageID.c @@ -0,0 +1,113 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "Interface-MessageID.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_messageType_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_messageType_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_messageType_value2enum_3[] = { + { 0, 17, "initiatingMessage" }, + { 1, 17, "successfulOutcome" }, + { 2, 19, "unsuccessfulOutcome" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_messageType_enum2value_3[] = { + 0, /* initiatingMessage(0) */ + 1, /* successfulOutcome(1) */ + 2 /* unsuccessfulOutcome(2) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_messageType_specs_3 = { + asn_MAP_messageType_value2enum_3, /* "tag" => N; sorted by tag */ + asn_MAP_messageType_enum2value_3, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 4, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_messageType_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_messageType_3 = { + "messageType", + "messageType", + &asn_OP_NativeEnumerated, + asn_DEF_messageType_tags_3, + sizeof(asn_DEF_messageType_tags_3) + /sizeof(asn_DEF_messageType_tags_3[0]) - 1, /* 1 */ + asn_DEF_messageType_tags_3, /* Same as above */ + sizeof(asn_DEF_messageType_tags_3) + /sizeof(asn_DEF_messageType_tags_3[0]), /* 2 */ + { &asn_OER_type_messageType_constr_3, &asn_PER_type_messageType_constr_3, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_messageType_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Interface_MessageID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Interface_MessageID, interfaceProcedureID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "interfaceProcedureID" + }, + { ATF_NOFLAGS, 0, offsetof(struct Interface_MessageID, messageType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_messageType_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageType" + }, +}; +static const ber_tlv_tag_t asn_DEF_Interface_MessageID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Interface_MessageID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* interfaceProcedureID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* messageType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Interface_MessageID_specs_1 = { + sizeof(struct Interface_MessageID), + offsetof(struct Interface_MessageID, _asn_ctx), + asn_MAP_Interface_MessageID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Interface_MessageID = { + "Interface-MessageID", + "Interface-MessageID", + &asn_OP_SEQUENCE, + asn_DEF_Interface_MessageID_tags_1, + sizeof(asn_DEF_Interface_MessageID_tags_1) + /sizeof(asn_DEF_Interface_MessageID_tags_1[0]), /* 1 */ + asn_DEF_Interface_MessageID_tags_1, /* Same as above */ + sizeof(asn_DEF_Interface_MessageID_tags_1) + /sizeof(asn_DEF_Interface_MessageID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_Interface_MessageID_1, + 2, /* Elements count */ + &asn_SPC_Interface_MessageID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceID-E1.c b/Bouncer/e2sm_rc/lib/InterfaceID-E1.c new file mode 100644 index 0000000..5836b33 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceID-E1.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceID-E1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_E1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_E1, globalGNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalGNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_E1, gNB_CU_UP_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_E1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_E1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* globalGNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-CU-UP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_E1_specs_1 = { + sizeof(struct InterfaceID_E1), + offsetof(struct InterfaceID_E1, _asn_ctx), + asn_MAP_InterfaceID_E1_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_E1 = { + "InterfaceID-E1", + "InterfaceID-E1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_E1_tags_1, + sizeof(asn_DEF_InterfaceID_E1_tags_1) + /sizeof(asn_DEF_InterfaceID_E1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_E1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_E1_tags_1) + /sizeof(asn_DEF_InterfaceID_E1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_E1_1, + 2, /* Elements count */ + &asn_SPC_InterfaceID_E1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceID-F1.c b/Bouncer/e2sm_rc/lib/InterfaceID-F1.c new file mode 100644 index 0000000..b60a8a0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceID-F1.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceID-F1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_F1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_F1, globalGNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalGNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_F1, gNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_F1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_F1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* globalGNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_F1_specs_1 = { + sizeof(struct InterfaceID_F1), + offsetof(struct InterfaceID_F1, _asn_ctx), + asn_MAP_InterfaceID_F1_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_F1 = { + "InterfaceID-F1", + "InterfaceID-F1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_F1_tags_1, + sizeof(asn_DEF_InterfaceID_F1_tags_1) + /sizeof(asn_DEF_InterfaceID_F1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_F1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_F1_tags_1) + /sizeof(asn_DEF_InterfaceID_F1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_F1_1, + 2, /* Elements count */ + &asn_SPC_InterfaceID_F1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceID-NG.c b/Bouncer/e2sm_rc/lib/InterfaceID-NG.c new file mode 100644 index 0000000..cc17bfe --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceID-NG.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceID-NG.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_NG_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_NG, guami), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "guami" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_NG_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_NG_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* guami */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_NG_specs_1 = { + sizeof(struct InterfaceID_NG), + offsetof(struct InterfaceID_NG, _asn_ctx), + asn_MAP_InterfaceID_NG_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_NG = { + "InterfaceID-NG", + "InterfaceID-NG", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_NG_tags_1, + sizeof(asn_DEF_InterfaceID_NG_tags_1) + /sizeof(asn_DEF_InterfaceID_NG_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_NG_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_NG_tags_1) + /sizeof(asn_DEF_InterfaceID_NG_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_NG_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_NG_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceID-S1.c b/Bouncer/e2sm_rc/lib/InterfaceID-S1.c new file mode 100644 index 0000000..e96383e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceID-S1.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceID-S1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_S1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_S1, gUMMEI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUMMEI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gUMMEI" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_S1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_S1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gUMMEI */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_S1_specs_1 = { + sizeof(struct InterfaceID_S1), + offsetof(struct InterfaceID_S1, _asn_ctx), + asn_MAP_InterfaceID_S1_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_S1 = { + "InterfaceID-S1", + "InterfaceID-S1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_S1_tags_1, + sizeof(asn_DEF_InterfaceID_S1_tags_1) + /sizeof(asn_DEF_InterfaceID_S1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_S1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_S1_tags_1) + /sizeof(asn_DEF_InterfaceID_S1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_S1_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_S1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceID-W1.c b/Bouncer/e2sm_rc/lib/InterfaceID-W1.c new file mode 100644 index 0000000..209d381 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceID-W1.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceID-W1.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_W1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_W1, global_ng_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalNgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-ng-eNB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_W1, ng_eNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_DU_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-DU-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_W1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_W1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-ng-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ng-eNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_W1_specs_1 = { + sizeof(struct InterfaceID_W1), + offsetof(struct InterfaceID_W1, _asn_ctx), + asn_MAP_InterfaceID_W1_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_W1 = { + "InterfaceID-W1", + "InterfaceID-W1", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_W1_tags_1, + sizeof(asn_DEF_InterfaceID_W1_tags_1) + /sizeof(asn_DEF_InterfaceID_W1_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_W1_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_W1_tags_1) + /sizeof(asn_DEF_InterfaceID_W1_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_W1_1, + 2, /* Elements count */ + &asn_SPC_InterfaceID_W1_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceID-X2.c b/Bouncer/e2sm_rc/lib/InterfaceID-X2.c new file mode 100644 index 0000000..a048c54 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceID-X2.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceID-X2.h" + +#include "GlobalENB-ID.h" +#include "GlobalenGNB-ID.h" +static asn_oer_constraints_t asn_OER_type_nodeType_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_nodeType_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_nodeType_2[] = { + { ATF_POINTER, 0, offsetof(struct InterfaceID_X2__nodeType, choice.global_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-eNB-ID" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceID_X2__nodeType, choice.global_en_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalenGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-en-gNB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_nodeType_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* global-en-gNB-ID */ +}; +static asn_CHOICE_specifics_t asn_SPC_nodeType_specs_2 = { + sizeof(struct InterfaceID_X2__nodeType), + offsetof(struct InterfaceID_X2__nodeType, _asn_ctx), + offsetof(struct InterfaceID_X2__nodeType, present), + sizeof(((struct InterfaceID_X2__nodeType *)0)->present), + asn_MAP_nodeType_tag2el_2, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_nodeType_2 = { + "nodeType", + "nodeType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_nodeType_constr_2, &asn_PER_type_nodeType_constr_2, CHOICE_constraint }, + asn_MBR_nodeType_2, + 2, /* Elements count */ + &asn_SPC_nodeType_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_InterfaceID_X2_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_X2, nodeType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_nodeType_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nodeType" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_X2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_X2_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* nodeType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_X2_specs_1 = { + sizeof(struct InterfaceID_X2), + offsetof(struct InterfaceID_X2, _asn_ctx), + asn_MAP_InterfaceID_X2_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_X2 = { + "InterfaceID-X2", + "InterfaceID-X2", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_X2_tags_1, + sizeof(asn_DEF_InterfaceID_X2_tags_1) + /sizeof(asn_DEF_InterfaceID_X2_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_X2_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_X2_tags_1) + /sizeof(asn_DEF_InterfaceID_X2_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_X2_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_X2_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceID-Xn.c b/Bouncer/e2sm_rc/lib/InterfaceID-Xn.c new file mode 100644 index 0000000..f1494fe --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceID-Xn.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceID-Xn.h" + +asn_TYPE_member_t asn_MBR_InterfaceID_Xn_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_Xn, global_NG_RAN_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalNGRANNodeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "global-NG-RAN-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_InterfaceID_Xn_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceID_Xn_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-NG-RAN-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_Xn_specs_1 = { + sizeof(struct InterfaceID_Xn), + offsetof(struct InterfaceID_Xn, _asn_ctx), + asn_MAP_InterfaceID_Xn_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceID_Xn = { + "InterfaceID-Xn", + "InterfaceID-Xn", + &asn_OP_SEQUENCE, + asn_DEF_InterfaceID_Xn_tags_1, + sizeof(asn_DEF_InterfaceID_Xn_tags_1) + /sizeof(asn_DEF_InterfaceID_Xn_tags_1[0]), /* 1 */ + asn_DEF_InterfaceID_Xn_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceID_Xn_tags_1) + /sizeof(asn_DEF_InterfaceID_Xn_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_InterfaceID_Xn_1, + 1, /* Elements count */ + &asn_SPC_InterfaceID_Xn_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceIdentifier.c b/Bouncer/e2sm_rc/lib/InterfaceIdentifier.c new file mode 100644 index 0000000..fdfcdb3 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceIdentifier.c @@ -0,0 +1,122 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceIdentifier.h" + +#include "InterfaceID-NG.h" +#include "InterfaceID-Xn.h" +#include "InterfaceID-F1.h" +#include "InterfaceID-E1.h" +#include "InterfaceID-S1.h" +#include "InterfaceID-X2.h" +#include "InterfaceID-W1.h" +static asn_oer_constraints_t asn_OER_type_InterfaceIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_InterfaceIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.nG), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_NG, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nG" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.xN), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_Xn, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "xN" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.f1), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_F1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "f1" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.e1), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_E1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "e1" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.s1), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_S1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "s1" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.x2), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_X2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "x2" + }, + { ATF_POINTER, 0, offsetof(struct InterfaceIdentifier, choice.w1), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceID_W1, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "w1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_InterfaceIdentifier_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nG */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* xN */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* f1 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* e1 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* s1 */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* x2 */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* w1 */ +}; +asn_CHOICE_specifics_t asn_SPC_InterfaceIdentifier_specs_1 = { + sizeof(struct InterfaceIdentifier), + offsetof(struct InterfaceIdentifier, _asn_ctx), + offsetof(struct InterfaceIdentifier, present), + sizeof(((struct InterfaceIdentifier *)0)->present), + asn_MAP_InterfaceIdentifier_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, + 7 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceIdentifier = { + "InterfaceIdentifier", + "InterfaceIdentifier", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_InterfaceIdentifier_constr_1, &asn_PER_type_InterfaceIdentifier_constr_1, CHOICE_constraint }, + asn_MBR_InterfaceIdentifier_1, + 7, /* Elements count */ + &asn_SPC_InterfaceIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/InterfaceType.c b/Bouncer/e2sm_rc/lib/InterfaceType.c new file mode 100644 index 0000000..d09465a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/InterfaceType.c @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "InterfaceType.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_InterfaceType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_InterfaceType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_InterfaceType_value2enum_1[] = { + { 0, 2, "nG" }, + { 1, 2, "xn" }, + { 2, 2, "f1" }, + { 3, 2, "e1" }, + { 4, 2, "s1" }, + { 5, 2, "x2" }, + { 6, 2, "w1" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_InterfaceType_enum2value_1[] = { + 3, /* e1(3) */ + 2, /* f1(2) */ + 0, /* nG(0) */ + 4, /* s1(4) */ + 6, /* w1(6) */ + 5, /* x2(5) */ + 1 /* xn(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_InterfaceType_specs_1 = { + asn_MAP_InterfaceType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_InterfaceType_enum2value_1, /* N => "tag"; sorted by N */ + 7, /* Number of elements in the maps */ + 8, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_InterfaceType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_InterfaceType = { + "InterfaceType", + "InterfaceType", + &asn_OP_NativeEnumerated, + asn_DEF_InterfaceType_tags_1, + sizeof(asn_DEF_InterfaceType_tags_1) + /sizeof(asn_DEF_InterfaceType_tags_1[0]), /* 1 */ + asn_DEF_InterfaceType_tags_1, /* Same as above */ + sizeof(asn_DEF_InterfaceType_tags_1) + /sizeof(asn_DEF_InterfaceType_tags_1[0]), /* 1 */ + { &asn_OER_type_InterfaceType_constr_1, &asn_PER_type_InterfaceType_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_InterfaceType_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/L2Parameters-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/L2Parameters-RANParameter-Item.c new file mode 100644 index 0000000..ea490e2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/L2Parameters-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "L2Parameters-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_L2Parameters_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct L2Parameters_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct L2Parameters_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct L2Parameters_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_L2Parameters_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_L2Parameters_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_L2Parameters_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_L2Parameters_RANParameter_Item_specs_1 = { + sizeof(struct L2Parameters_RANParameter_Item), + offsetof(struct L2Parameters_RANParameter_Item, _asn_ctx), + asn_MAP_L2Parameters_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_L2Parameters_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_L2Parameters_RANParameter_Item = { + "L2Parameters-RANParameter-Item", + "L2Parameters-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_L2Parameters_RANParameter_Item_tags_1, + sizeof(asn_DEF_L2Parameters_RANParameter_Item_tags_1) + /sizeof(asn_DEF_L2Parameters_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_L2Parameters_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_L2Parameters_RANParameter_Item_tags_1) + /sizeof(asn_DEF_L2Parameters_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_L2Parameters_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_L2Parameters_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/LogicalOR.c b/Bouncer/e2sm_rc/lib/LogicalOR.c new file mode 100644 index 0000000..e9dbbf2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/LogicalOR.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "LogicalOR.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_LogicalOR_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_LogicalOR_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_LogicalOR_value2enum_1[] = { + { 0, 4, "true" }, + { 1, 5, "false" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_LogicalOR_enum2value_1[] = { + 1, /* false(1) */ + 0 /* true(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_LogicalOR_specs_1 = { + asn_MAP_LogicalOR_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_LogicalOR_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_LogicalOR_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_LogicalOR = { + "LogicalOR", + "LogicalOR", + &asn_OP_NativeEnumerated, + asn_DEF_LogicalOR_tags_1, + sizeof(asn_DEF_LogicalOR_tags_1) + /sizeof(asn_DEF_LogicalOR_tags_1[0]), /* 1 */ + asn_DEF_LogicalOR_tags_1, /* Same as above */ + sizeof(asn_DEF_LogicalOR_tags_1) + /sizeof(asn_DEF_LogicalOR_tags_1[0]), /* 1 */ + { &asn_OER_type_LogicalOR_constr_1, &asn_PER_type_LogicalOR_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_LogicalOR_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/MME-Code.c b/Bouncer/e2sm_rc/lib/MME-Code.c new file mode 100644 index 0000000..b9d9b23 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/MME-Code.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "MME-Code.h" + +int +MME_Code_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 1)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_MME_Code_constr_1 CC_NOTUSED = { + { 0, 0 }, + 1 /* (SIZE(1..1)) */}; +asn_per_constraints_t asn_PER_type_MME_Code_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_MME_Code_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MME_Code = { + "MME-Code", + "MME-Code", + &asn_OP_OCTET_STRING, + asn_DEF_MME_Code_tags_1, + sizeof(asn_DEF_MME_Code_tags_1) + /sizeof(asn_DEF_MME_Code_tags_1[0]), /* 1 */ + asn_DEF_MME_Code_tags_1, /* Same as above */ + sizeof(asn_DEF_MME_Code_tags_1) + /sizeof(asn_DEF_MME_Code_tags_1[0]), /* 1 */ + { &asn_OER_type_MME_Code_constr_1, &asn_PER_type_MME_Code_constr_1, MME_Code_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/MME-Group-ID.c b/Bouncer/e2sm_rc/lib/MME-Group-ID.c new file mode 100644 index 0000000..0a03c94 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/MME-Group-ID.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "MME-Group-ID.h" + +int +MME_Group_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 2)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_MME_Group_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 2 /* (SIZE(2..2)) */}; +asn_per_constraints_t asn_PER_type_MME_Group_ID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_MME_Group_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MME_Group_ID = { + "MME-Group-ID", + "MME-Group-ID", + &asn_OP_OCTET_STRING, + asn_DEF_MME_Group_ID_tags_1, + sizeof(asn_DEF_MME_Group_ID_tags_1) + /sizeof(asn_DEF_MME_Group_ID_tags_1[0]), /* 1 */ + asn_DEF_MME_Group_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_MME_Group_ID_tags_1) + /sizeof(asn_DEF_MME_Group_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_MME_Group_ID_constr_1, &asn_PER_type_MME_Group_ID_constr_1, MME_Group_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/MME-UE-S1AP-ID.c b/Bouncer/e2sm_rc/lib/MME-UE-S1AP-ID.c new file mode 100644 index 0000000..695136e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/MME-UE-S1AP-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "MME-UE-S1AP-ID.h" + +int +MME_UE_S1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_MME_UE_S1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +asn_per_constraints_t asn_PER_type_MME_UE_S1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_MME_UE_S1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_MME_UE_S1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_MME_UE_S1AP_ID = { + "MME-UE-S1AP-ID", + "MME-UE-S1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_MME_UE_S1AP_ID_tags_1, + sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1) + /sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_MME_UE_S1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1) + /sizeof(asn_DEF_MME_UE_S1AP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_MME_UE_S1AP_ID_constr_1, &asn_PER_type_MME_UE_S1AP_ID_constr_1, MME_UE_S1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_MME_UE_S1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/MessageType-Choice-NI.c b/Bouncer/e2sm_rc/lib/MessageType-Choice-NI.c new file mode 100644 index 0000000..622d5ce --- /dev/null +++ b/Bouncer/e2sm_rc/lib/MessageType-Choice-NI.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "MessageType-Choice-NI.h" + +#include "InterfaceIdentifier.h" +#include "Interface-MessageID.h" +asn_TYPE_member_t asn_MBR_MessageType_Choice_NI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MessageType_Choice_NI, nI_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InterfaceType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nI-Type" + }, + { ATF_POINTER, 2, offsetof(struct MessageType_Choice_NI, nI_Identifier), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_InterfaceIdentifier, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nI-Identifier" + }, + { ATF_POINTER, 1, offsetof(struct MessageType_Choice_NI, nI_Message), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Interface_MessageID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nI-Message" + }, +}; +static const int asn_MAP_MessageType_Choice_NI_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_MessageType_Choice_NI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MessageType_Choice_NI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nI-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nI-Identifier */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* nI-Message */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MessageType_Choice_NI_specs_1 = { + sizeof(struct MessageType_Choice_NI), + offsetof(struct MessageType_Choice_NI, _asn_ctx), + asn_MAP_MessageType_Choice_NI_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_MessageType_Choice_NI_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MessageType_Choice_NI = { + "MessageType-Choice-NI", + "MessageType-Choice-NI", + &asn_OP_SEQUENCE, + asn_DEF_MessageType_Choice_NI_tags_1, + sizeof(asn_DEF_MessageType_Choice_NI_tags_1) + /sizeof(asn_DEF_MessageType_Choice_NI_tags_1[0]), /* 1 */ + asn_DEF_MessageType_Choice_NI_tags_1, /* Same as above */ + sizeof(asn_DEF_MessageType_Choice_NI_tags_1) + /sizeof(asn_DEF_MessageType_Choice_NI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MessageType_Choice_NI_1, + 3, /* Elements count */ + &asn_SPC_MessageType_Choice_NI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/MessageType-Choice-RRC.c b/Bouncer/e2sm_rc/lib/MessageType-Choice-RRC.c new file mode 100644 index 0000000..235888a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/MessageType-Choice-RRC.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "MessageType-Choice-RRC.h" + +asn_TYPE_member_t asn_MBR_MessageType_Choice_RRC_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct MessageType_Choice_RRC, rRC_Message), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RRC_MessageID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "rRC-Message" + }, +}; +static const ber_tlv_tag_t asn_DEF_MessageType_Choice_RRC_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_MessageType_Choice_RRC_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* rRC-Message */ +}; +asn_SEQUENCE_specifics_t asn_SPC_MessageType_Choice_RRC_specs_1 = { + sizeof(struct MessageType_Choice_RRC), + offsetof(struct MessageType_Choice_RRC, _asn_ctx), + asn_MAP_MessageType_Choice_RRC_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_MessageType_Choice_RRC = { + "MessageType-Choice-RRC", + "MessageType-Choice-RRC", + &asn_OP_SEQUENCE, + asn_DEF_MessageType_Choice_RRC_tags_1, + sizeof(asn_DEF_MessageType_Choice_RRC_tags_1) + /sizeof(asn_DEF_MessageType_Choice_RRC_tags_1[0]), /* 1 */ + asn_DEF_MessageType_Choice_RRC_tags_1, /* Same as above */ + sizeof(asn_DEF_MessageType_Choice_RRC_tags_1) + /sizeof(asn_DEF_MessageType_Choice_RRC_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_MessageType_Choice_RRC_1, + 1, /* Elements count */ + &asn_SPC_MessageType_Choice_RRC_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/MessageType-Choice.c b/Bouncer/e2sm_rc/lib/MessageType-Choice.c new file mode 100644 index 0000000..a7854e7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/MessageType-Choice.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "MessageType-Choice.h" + +#include "MessageType-Choice-NI.h" +#include "MessageType-Choice-RRC.h" +static asn_oer_constraints_t asn_OER_type_MessageType_Choice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_MessageType_Choice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_MessageType_Choice_1[] = { + { ATF_POINTER, 0, offsetof(struct MessageType_Choice, choice.messageType_Choice_NI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MessageType_Choice_NI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageType-Choice-NI" + }, + { ATF_POINTER, 0, offsetof(struct MessageType_Choice, choice.messageType_Choice_RRC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MessageType_Choice_RRC, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageType-Choice-RRC" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_MessageType_Choice_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* messageType-Choice-NI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* messageType-Choice-RRC */ +}; +asn_CHOICE_specifics_t asn_SPC_MessageType_Choice_specs_1 = { + sizeof(struct MessageType_Choice), + offsetof(struct MessageType_Choice, _asn_ctx), + offsetof(struct MessageType_Choice, present), + sizeof(((struct MessageType_Choice *)0)->present), + asn_MAP_MessageType_Choice_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_MessageType_Choice = { + "MessageType-Choice", + "MessageType-Choice", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_MessageType_Choice_constr_1, &asn_PER_type_MessageType_Choice_constr_1, CHOICE_constraint }, + asn_MBR_MessageType_Choice_1, + 2, /* Elements count */ + &asn_SPC_MessageType_Choice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NG-RANnodeUEXnAPID.c b/Bouncer/e2sm_rc/lib/NG-RANnodeUEXnAPID.c new file mode 100644 index 0000000..8e5b845 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NG-RANnodeUEXnAPID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NG-RANnodeUEXnAPID.h" + +int +NG_RANnodeUEXnAPID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_NG_RANnodeUEXnAPID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +asn_per_constraints_t asn_PER_type_NG_RANnodeUEXnAPID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_NG_RANnodeUEXnAPID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_NG_RANnodeUEXnAPID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NG_RANnodeUEXnAPID = { + "NG-RANnodeUEXnAPID", + "NG-RANnodeUEXnAPID", + &asn_OP_NativeInteger, + asn_DEF_NG_RANnodeUEXnAPID_tags_1, + sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1) + /sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1[0]), /* 1 */ + asn_DEF_NG_RANnodeUEXnAPID_tags_1, /* Same as above */ + sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1) + /sizeof(asn_DEF_NG_RANnodeUEXnAPID_tags_1[0]), /* 1 */ + { &asn_OER_type_NG_RANnodeUEXnAPID_constr_1, &asn_PER_type_NG_RANnodeUEXnAPID_constr_1, NG_RANnodeUEXnAPID_constraint }, + 0, 0, /* No members */ + &asn_SPC_NG_RANnodeUEXnAPID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NGENB-CU-UE-W1AP-ID.c b/Bouncer/e2sm_rc/lib/NGENB-CU-UE-W1AP-ID.c new file mode 100644 index 0000000..aefde86 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NGENB-CU-UE-W1AP-ID.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NGENB-CU-UE-W1AP-ID.h" + +int +NGENB_CU_UE_W1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_NGENB_CU_UE_W1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +asn_per_constraints_t asn_PER_type_NGENB_CU_UE_W1AP_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NGENB_CU_UE_W1AP_ID = { + "NGENB-CU-UE-W1AP-ID", + "NGENB-CU-UE-W1AP-ID", + &asn_OP_NativeInteger, + asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1, + sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1) + /sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1[0]), /* 1 */ + asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1) + /sizeof(asn_DEF_NGENB_CU_UE_W1AP_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_NGENB_CU_UE_W1AP_ID_constr_1, &asn_PER_type_NGENB_CU_UE_W1AP_ID_constr_1, NGENB_CU_UE_W1AP_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NGENB-DU-ID.c b/Bouncer/e2sm_rc/lib/NGENB-DU-ID.c new file mode 100644 index 0000000..a8664e0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NGENB-DU-ID.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NGENB-DU-ID.h" + +int +NGENB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0 && value <= 68719476735)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_NGENB_DU_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +asn_per_constraints_t asn_PER_type_NGENB_DU_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_NGENB_DU_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NGENB_DU_ID = { + "NGENB-DU-ID", + "NGENB-DU-ID", + &asn_OP_INTEGER, + asn_DEF_NGENB_DU_ID_tags_1, + sizeof(asn_DEF_NGENB_DU_ID_tags_1) + /sizeof(asn_DEF_NGENB_DU_ID_tags_1[0]), /* 1 */ + asn_DEF_NGENB_DU_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_NGENB_DU_ID_tags_1) + /sizeof(asn_DEF_NGENB_DU_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_NGENB_DU_ID_constr_1, &asn_PER_type_NGENB_DU_ID_constr_1, NGENB_DU_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NR-ARFCN.c b/Bouncer/e2sm_rc/lib/NR-ARFCN.c new file mode 100644 index 0000000..3df391a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NR-ARFCN.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NR-ARFCN.h" + +static int +memb_nRARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 3279165)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_nRARFCN_constr_2 CC_NOTUSED = { + { 4, 1 } /* (0..3279165) */, + -1}; +static asn_per_constraints_t asn_PER_memb_nRARFCN_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 22, -1, 0, 3279165 } /* (0..3279165) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NR_ARFCN_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NR_ARFCN, nRARFCN), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_nRARFCN_constr_2, &asn_PER_memb_nRARFCN_constr_2, memb_nRARFCN_constraint_1 }, + 0, 0, /* No default value */ + "nRARFCN" + }, +}; +static const ber_tlv_tag_t asn_DEF_NR_ARFCN_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NR_ARFCN_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* nRARFCN */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NR_ARFCN_specs_1 = { + sizeof(struct NR_ARFCN), + offsetof(struct NR_ARFCN, _asn_ctx), + asn_MAP_NR_ARFCN_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NR_ARFCN = { + "NR-ARFCN", + "NR-ARFCN", + &asn_OP_SEQUENCE, + asn_DEF_NR_ARFCN_tags_1, + sizeof(asn_DEF_NR_ARFCN_tags_1) + /sizeof(asn_DEF_NR_ARFCN_tags_1[0]), /* 1 */ + asn_DEF_NR_ARFCN_tags_1, /* Same as above */ + sizeof(asn_DEF_NR_ARFCN_tags_1) + /sizeof(asn_DEF_NR_ARFCN_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NR_ARFCN_1, + 1, /* Elements count */ + &asn_SPC_NR_ARFCN_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NR-CGI.c b/Bouncer/e2sm_rc/lib/NR-CGI.c new file mode 100644 index 0000000..89f913f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NR-CGI.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NR-CGI.h" + +asn_TYPE_member_t asn_MBR_NR_CGI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NR_CGI, pLMNIdentity), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PLMNIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "pLMNIdentity" + }, + { ATF_NOFLAGS, 0, offsetof(struct NR_CGI, nRCellIdentity), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRCellIdentity, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nRCellIdentity" + }, +}; +static const ber_tlv_tag_t asn_DEF_NR_CGI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NR_CGI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNIdentity */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* nRCellIdentity */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NR_CGI_specs_1 = { + sizeof(struct NR_CGI), + offsetof(struct NR_CGI, _asn_ctx), + asn_MAP_NR_CGI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NR_CGI = { + "NR-CGI", + "NR-CGI", + &asn_OP_SEQUENCE, + asn_DEF_NR_CGI_tags_1, + sizeof(asn_DEF_NR_CGI_tags_1) + /sizeof(asn_DEF_NR_CGI_tags_1[0]), /* 1 */ + asn_DEF_NR_CGI_tags_1, /* Same as above */ + sizeof(asn_DEF_NR_CGI_tags_1) + /sizeof(asn_DEF_NR_CGI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NR_CGI_1, + 2, /* Elements count */ + &asn_SPC_NR_CGI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NR-PCI.c b/Bouncer/e2sm_rc/lib/NR-PCI.c new file mode 100644 index 0000000..69fa45b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NR-PCI.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NR-PCI.h" + +int +NR_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 1007)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_NR_PCI_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..1007) */, + -1}; +asn_per_constraints_t asn_PER_type_NR_PCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 10, 10, 0, 1007 } /* (0..1007) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_NR_PCI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NR_PCI = { + "NR-PCI", + "NR-PCI", + &asn_OP_NativeInteger, + asn_DEF_NR_PCI_tags_1, + sizeof(asn_DEF_NR_PCI_tags_1) + /sizeof(asn_DEF_NR_PCI_tags_1[0]), /* 1 */ + asn_DEF_NR_PCI_tags_1, /* Same as above */ + sizeof(asn_DEF_NR_PCI_tags_1) + /sizeof(asn_DEF_NR_PCI_tags_1[0]), /* 1 */ + { &asn_OER_type_NR_PCI_constr_1, &asn_PER_type_NR_PCI_constr_1, NR_PCI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NRCellIdentity.c b/Bouncer/e2sm_rc/lib/NRCellIdentity.c new file mode 100644 index 0000000..ed9f6cd --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NRCellIdentity.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NRCellIdentity.h" + +int +NRCellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 36)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_NRCellIdentity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 36 /* (SIZE(36..36)) */}; +asn_per_constraints_t asn_PER_type_NRCellIdentity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 36, 36 } /* (SIZE(36..36)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_NRCellIdentity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NRCellIdentity = { + "NRCellIdentity", + "NRCellIdentity", + &asn_OP_BIT_STRING, + asn_DEF_NRCellIdentity_tags_1, + sizeof(asn_DEF_NRCellIdentity_tags_1) + /sizeof(asn_DEF_NRCellIdentity_tags_1[0]), /* 1 */ + asn_DEF_NRCellIdentity_tags_1, /* Same as above */ + sizeof(asn_DEF_NRCellIdentity_tags_1) + /sizeof(asn_DEF_NRCellIdentity_tags_1[0]), /* 1 */ + { &asn_OER_type_NRCellIdentity_constr_1, &asn_PER_type_NRCellIdentity_constr_1, NRCellIdentity_constraint }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NRFrequencyBand-List.c b/Bouncer/e2sm_rc/lib/NRFrequencyBand-List.c new file mode 100644 index 0000000..cc48d91 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NRFrequencyBand-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NRFrequencyBand-List.h" + +#include "NRFrequencyBandItem.h" +static asn_oer_constraints_t asn_OER_type_NRFrequencyBand_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +asn_per_constraints_t asn_PER_type_NRFrequencyBand_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NRFrequencyBand_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_NRFrequencyBandItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_NRFrequencyBand_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_NRFrequencyBand_List_specs_1 = { + sizeof(struct NRFrequencyBand_List), + offsetof(struct NRFrequencyBand_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyBand_List = { + "NRFrequencyBand-List", + "NRFrequencyBand-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_NRFrequencyBand_List_tags_1, + sizeof(asn_DEF_NRFrequencyBand_List_tags_1) + /sizeof(asn_DEF_NRFrequencyBand_List_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyBand_List_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyBand_List_tags_1) + /sizeof(asn_DEF_NRFrequencyBand_List_tags_1[0]), /* 1 */ + { &asn_OER_type_NRFrequencyBand_List_constr_1, &asn_PER_type_NRFrequencyBand_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_NRFrequencyBand_List_1, + 1, /* Single element */ + &asn_SPC_NRFrequencyBand_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NRFrequencyBandItem.c b/Bouncer/e2sm_rc/lib/NRFrequencyBandItem.c new file mode 100644 index 0000000..4c29e49 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NRFrequencyBandItem.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NRFrequencyBandItem.h" + +static int +memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1024 } /* (1..1024,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NRFrequencyBandItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyBandItem, freqBandIndicatorNr), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_freqBandIndicatorNr_constr_2, &asn_PER_memb_freqBandIndicatorNr_constr_2, memb_freqBandIndicatorNr_constraint_1 }, + 0, 0, /* No default value */ + "freqBandIndicatorNr" + }, + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyBandItem, supportedSULBandList), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SupportedSULBandList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "supportedSULBandList" + }, +}; +static const ber_tlv_tag_t asn_DEF_NRFrequencyBandItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NRFrequencyBandItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* freqBandIndicatorNr */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* supportedSULBandList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NRFrequencyBandItem_specs_1 = { + sizeof(struct NRFrequencyBandItem), + offsetof(struct NRFrequencyBandItem, _asn_ctx), + asn_MAP_NRFrequencyBandItem_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyBandItem = { + "NRFrequencyBandItem", + "NRFrequencyBandItem", + &asn_OP_SEQUENCE, + asn_DEF_NRFrequencyBandItem_tags_1, + sizeof(asn_DEF_NRFrequencyBandItem_tags_1) + /sizeof(asn_DEF_NRFrequencyBandItem_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyBandItem_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyBandItem_tags_1) + /sizeof(asn_DEF_NRFrequencyBandItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NRFrequencyBandItem_1, + 2, /* Elements count */ + &asn_SPC_NRFrequencyBandItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NRFrequencyInfo.c b/Bouncer/e2sm_rc/lib/NRFrequencyInfo.c new file mode 100644 index 0000000..a660b34 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NRFrequencyInfo.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NRFrequencyInfo.h" + +asn_TYPE_member_t asn_MBR_NRFrequencyInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyInfo, nrARFCN), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nrARFCN" + }, + { ATF_NOFLAGS, 0, offsetof(struct NRFrequencyInfo, frequencyBand_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRFrequencyBand_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "frequencyBand-List" + }, + { ATF_POINTER, 1, offsetof(struct NRFrequencyInfo, frequencyShift7p5khz), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRFrequencyShift7p5khz, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "frequencyShift7p5khz" + }, +}; +static const int asn_MAP_NRFrequencyInfo_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_NRFrequencyInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NRFrequencyInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nrARFCN */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* frequencyBand-List */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* frequencyShift7p5khz */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NRFrequencyInfo_specs_1 = { + sizeof(struct NRFrequencyInfo), + offsetof(struct NRFrequencyInfo, _asn_ctx), + asn_MAP_NRFrequencyInfo_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_NRFrequencyInfo_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyInfo = { + "NRFrequencyInfo", + "NRFrequencyInfo", + &asn_OP_SEQUENCE, + asn_DEF_NRFrequencyInfo_tags_1, + sizeof(asn_DEF_NRFrequencyInfo_tags_1) + /sizeof(asn_DEF_NRFrequencyInfo_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyInfo_tags_1) + /sizeof(asn_DEF_NRFrequencyInfo_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NRFrequencyInfo_1, + 3, /* Elements count */ + &asn_SPC_NRFrequencyInfo_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NRFrequencyShift7p5khz.c b/Bouncer/e2sm_rc/lib/NRFrequencyShift7p5khz.c new file mode 100644 index 0000000..8383183 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NRFrequencyShift7p5khz.c @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NRFrequencyShift7p5khz.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_NRFrequencyShift7p5khz_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_NRFrequencyShift7p5khz_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_NRFrequencyShift7p5khz_value2enum_1[] = { + { 0, 5, "false" }, + { 1, 4, "true" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_NRFrequencyShift7p5khz_enum2value_1[] = { + 0, /* false(0) */ + 1 /* true(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_NRFrequencyShift7p5khz_specs_1 = { + asn_MAP_NRFrequencyShift7p5khz_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_NRFrequencyShift7p5khz_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_NRFrequencyShift7p5khz_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_NRFrequencyShift7p5khz = { + "NRFrequencyShift7p5khz", + "NRFrequencyShift7p5khz", + &asn_OP_NativeEnumerated, + asn_DEF_NRFrequencyShift7p5khz_tags_1, + sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1) + /sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1[0]), /* 1 */ + asn_DEF_NRFrequencyShift7p5khz_tags_1, /* Same as above */ + sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1) + /sizeof(asn_DEF_NRFrequencyShift7p5khz_tags_1[0]), /* 1 */ + { &asn_OER_type_NRFrequencyShift7p5khz_constr_1, &asn_PER_type_NRFrequencyShift7p5khz_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_NRFrequencyShift7p5khz_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NativeEnumerated.c b/Bouncer/e2sm_rc/lib/NativeEnumerated.c new file mode 100644 index 0000000..50ffb1d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NativeEnumerated.c @@ -0,0 +1,367 @@ +/*- + * Copyright (c) 2004, 2007 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Read the NativeInteger.h for the explanation wrt. differences between + * INTEGER and NativeInteger. + * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this + * implementation deals with the standard (machine-specific) representation + * of them instead of using the platform-independent buffer. + */ +#include +#include + +/* + * NativeEnumerated basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_operation_t asn_OP_NativeEnumerated = { + NativeInteger_free, + NativeInteger_print, + NativeInteger_compare, + NativeInteger_decode_ber, + NativeInteger_encode_der, + NativeInteger_decode_xer, + NativeEnumerated_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + NativeEnumerated_decode_oer, + NativeEnumerated_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + NativeEnumerated_decode_uper, + NativeEnumerated_encode_uper, + NativeEnumerated_decode_aper, + NativeEnumerated_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + NativeEnumerated_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = { + "ENUMERATED", /* The ASN.1 type is still ENUMERATED */ + "ENUMERATED", + &asn_OP_NativeEnumerated, + asn_DEF_NativeEnumerated_tags, + sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), + asn_DEF_NativeEnumerated_tags, /* Same as above */ + sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +asn_enc_rval_t +NativeEnumerated_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + const long *native = (const long *)sptr; + const asn_INTEGER_enum_map_t *el; + + (void)ilevel; + (void)flags; + + if(!native) ASN__ENCODE_FAILED; + + el = INTEGER_map_value2enum(specs, *native); + if(el) { + er.encoded = + asn__format_to_callback(cb, app_key, "<%s/>", el->enum_name); + if(er.encoded < 0) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } else { + ASN_DEBUG( + "ASN.1 forbids dealing with " + "unknown value of ENUMERATED type"); + ASN__ENCODE_FAILED; + } +} + +asn_dec_rval_t +NativeEnumerated_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + long *native = (long *)*sptr; + const asn_per_constraint_t *ct = NULL; + long value; + + (void)opt_codec_ctx; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__DECODE_FAILED; /* Mandatory! */ + if(!specs) ASN__DECODE_FAILED; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + if(value >= (specs->extension + ? specs->extension - 1 : specs->map_count)) + ASN__DECODE_FAILED; + } else { + if(!specs->extension) + ASN__DECODE_FAILED; + /* + * X.691, #10.6: normally small non-negative whole number; + */ + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + if(value >= specs->map_count) + ASN__DECODE_FAILED; + } + + *native = specs->value2enum[value].nat_value; + ASN_DEBUG("Decoded %s = %ld", td->name, *native); + + return rval; +} + +static int +NativeEnumerated__compar_value2enum(const void *ap, const void *bp) { + const asn_INTEGER_enum_map_t *a = ap; + const asn_INTEGER_enum_map_t *b = bp; + if(a->nat_value == b->nat_value) + return 0; + if(a->nat_value < b->nat_value) + return -1; + return 1; +} + +asn_enc_rval_t +NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native, value; + const asn_per_constraint_t *ct = NULL; + int inext = 0; + asn_INTEGER_enum_map_t key; + const asn_INTEGER_enum_map_t *kf; + + if(!sptr) ASN__ENCODE_FAILED; + if(!specs) ASN__ENCODE_FAILED; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__ENCODE_FAILED; /* Mandatory! */ + + ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); + + er.encoded = 0; + + native = *(const long *)sptr; + + key.nat_value = native; + kf = bsearch(&key, specs->value2enum, specs->map_count, + sizeof(key), NativeEnumerated__compar_value2enum); + if(!kf) { + ASN_DEBUG("No element corresponds to %ld", native); + ASN__ENCODE_FAILED; + } + value = kf - specs->value2enum; + + if(ct && ct->range_bits >= 0) { + int cmpWith = specs->extension + ? specs->extension - 1 : specs->map_count; + if(value >= cmpWith) + inext = 1; + } + if(ct && ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, value, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(!specs->extension) + ASN__ENCODE_FAILED; + + /* + * X.691, #10.6: normally small non-negative whole number; + */ + ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", + value, specs->extension, inext, + value - (inext ? (specs->extension - 1) : 0)); + if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = { RC_OK, 0 }; + long *native = (long *)*sptr; + const asn_per_constraint_t *ct = NULL; + long value; + + (void)opt_codec_ctx; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__DECODE_FAILED; /* Mandatory! */ + if(!specs) ASN__DECODE_FAILED; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); + + if(ct && ct->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) ASN__DECODE_STARVED; + if(inext) ct = 0; + } + + /* Deal with APER padding */ + if(ct && ct->upper_bound >= 255) { + int padding = 0; + padding = (8 - (pd->moved % 8)) % 8; + ASN_DEBUG("For NativeEnumerated %s,offset= %lu Padding bits = %d", td->name, pd->moved, padding); + ASN_DEBUG("For NativeEnumerated %s, upper bound = %lu", td->name, ct->upper_bound); + if(padding > 0) + per_get_few_bits(pd, padding); + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + if(value >= (specs->extension + ? specs->extension - 1 : specs->map_count)) + ASN__DECODE_FAILED; + } else { + if(!specs->extension) + ASN__DECODE_FAILED; + /* + * X.691, #10.6: normally small non-negative whole number; + */ + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + if(value >= specs->map_count) + ASN__DECODE_FAILED; + } + + *native = specs->value2enum[value].nat_value; + ASN_DEBUG("Decoded %s = %ld", td->name, *native); + + return rval; +} + +asn_enc_rval_t +NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native, value; + const asn_per_constraint_t *ct = NULL; + int inext = 0; + asn_INTEGER_enum_map_t key; + asn_INTEGER_enum_map_t *kf; + + if(!sptr) ASN__ENCODE_FAILED; + if(!specs) ASN__ENCODE_FAILED; + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ASN__ENCODE_FAILED; /* Mandatory! */ + + ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); + + er.encoded = 0; + + native = *(const long *)sptr; + if(native < 0) ASN__ENCODE_FAILED; + + key.nat_value = native; + kf = bsearch(&key, specs->value2enum, specs->map_count, + sizeof(key), NativeEnumerated__compar_value2enum); + if(!kf) { + ASN_DEBUG("No element corresponds to %ld", native); + ASN__ENCODE_FAILED; + } + value = kf - specs->value2enum; + + if(ct && ct->range_bits >= 0) { + int cmpWith = specs->extension + ? specs->extension - 1 : specs->map_count; + if(value >= cmpWith) + inext = 1; + } + if(ct && ct->flags & APC_EXTENSIBLE) { + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + if(inext) ct = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, value, ct->range_bits)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + if(!specs->extension) + ASN__ENCODE_FAILED; + + /* + * X.691, #10.6: normally small non-negative whole number; + */ + ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", + value, specs->extension, inext, + value - (inext ? (specs->extension - 1) : 0)); + if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/Bouncer/e2sm_rc/lib/NativeEnumerated_oer.c b/Bouncer/e2sm_rc/lib/NativeEnumerated_oer.c new file mode 100644 index 0000000..ee3c189 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NativeEnumerated_oer.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +static long +asn__nativeenumerated_convert(const uint8_t *b, const uint8_t *end) { + unsigned long value; + + /* Perform the sign initialization */ + /* Actually value = -(*b >> 7); gains nothing, yet unreadable! */ + if((*b >> 7)) { + value = (unsigned long)(-1); + } else { + value = 0; + } + + /* Conversion engine */ + for(; b < end; b++) { + value = (value << 8) | *b; + } + + return value; +} + +asn_dec_rval_t +NativeEnumerated_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + void **nint_ptr, const void *ptr, size_t size) { + asn_dec_rval_t rval = {RC_OK, 0}; + long *native = (long *)*nint_ptr; + const uint8_t *b = ptr; + + (void)opt_codec_ctx; + (void)constraints; + + if(size < 1) { + ASN__DECODE_STARVED; + } + + if((*b & 0x80) == 0) { + /* + * X.696 (08/2015) #11.2 Short form for Enumerated. + */ + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + *native = *b; + rval.consumed = 1; + } else { + /* + * X.696 (08/2015) #11.4 Long form for Enumerated. + */ + size_t length = *b & 0x7f; + const uint8_t *bend; + long value; + + if(length < 1 || length > sizeof(*native)) { + ASN__DECODE_FAILED; + } + if((1 + length) > size) { + ASN__DECODE_STARVED; + } + b++; + bend = b + length; + + value = asn__nativeenumerated_convert(b, bend); + if(value < 0) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + if(specs && specs->field_unsigned) { + ASN__DECODE_FAILED; + } + } + + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + *native = value; + + rval.consumed = (1 + length); + } + + return rval; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeEnumerated_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0,0,0}; + long native; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + + if(native >= 0 && native <= 127) { + /* #11.2 Short form */ + uint8_t b = native; + er.encoded = 1; + if(cb(&b, er.encoded, app_key) < 0) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } else { + /* #11.2 Long form */ + uint8_t buf[1 + sizeof(native)]; + uint8_t *b = &buf[sizeof(native)]; /* Last addressable */ + long final_pattern = -1 * (native < 0); + + for(;;) { + *b-- = native; + native >>= 8; + if(native == final_pattern) { + if(final_pattern) { + if((b[1] & 0x80)) break; + } else { + if(!(b[1] & 0x80)) break; + } + } + } + *b = 0x80 | (&buf[sizeof(native)] - b); + er.encoded = 1 + (&buf[sizeof(native)] - b); + if(cb(b, er.encoded, app_key) < 0) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/NativeInteger.c b/Bouncer/e2sm_rc/lib/NativeInteger.c new file mode 100644 index 0000000..316e872 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NativeInteger.c @@ -0,0 +1,550 @@ +/*- + * Copyright (c) 2004, 2005, 2006 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Read the NativeInteger.h for the explanation wrt. differences between + * INTEGER and NativeInteger. + * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this + * implementation deals with the standard (machine-specific) representation + * of them instead of using the platform-independent buffer. + */ +#include +#include + +/* + * NativeInteger basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_operation_t asn_OP_NativeInteger = { + NativeInteger_free, + NativeInteger_print, + NativeInteger_compare, + NativeInteger_decode_ber, + NativeInteger_encode_der, + NativeInteger_decode_xer, + NativeInteger_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + NativeInteger_decode_oer, /* OER decoder */ + NativeInteger_encode_oer, /* Canonical OER encoder */ +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + NativeInteger_decode_uper, /* Unaligned PER decoder */ + NativeInteger_encode_uper, /* Unaligned PER encoder */ + NativeInteger_decode_aper, /* Aligned PER decoder */ + NativeInteger_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + NativeInteger_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NativeInteger = { + "INTEGER", /* The ASN.1 type is still INTEGER */ + "INTEGER", + &asn_OP_NativeInteger, + asn_DEF_NativeInteger_tags, + sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]), + asn_DEF_NativeInteger_tags, /* Same as above */ + sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +/* + * Decode INTEGER type. + */ +asn_dec_rval_t +NativeInteger_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **nint_ptr, + const void *buf_ptr, size_t size, int tag_mode) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + long *native = (long *)*nint_ptr; + asn_dec_rval_t rval; + ber_tlv_len_t length; + + /* + * If the structure is not there, allocate it. + */ + if(native == NULL) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(native == NULL) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + } + + ASN_DEBUG("Decoding %s as INTEGER (tm=%d)", + td->name, tag_mode); + + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, + tag_mode, 0, &length, 0); + if(rval.code != RC_OK) + return rval; + + ASN_DEBUG("%s length is %d bytes", td->name, (int)length); + + /* + * Make sure we have this length. + */ + buf_ptr = ((const char *)buf_ptr) + rval.consumed; + size -= rval.consumed; + if(length > (ber_tlv_len_t)size) { + rval.code = RC_WMORE; + rval.consumed = 0; + return rval; + } + + /* + * ASN.1 encoded INTEGER: buf_ptr, length + * Fill the native, at the same time checking for overflow. + * If overflow occured, return with RC_FAIL. + */ + { + INTEGER_t tmp; + union { + const void *constbuf; + void *nonconstbuf; + } unconst_buf; + long l; + + unconst_buf.constbuf = buf_ptr; + tmp.buf = (uint8_t *)unconst_buf.nonconstbuf; + tmp.size = length; + + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&tmp, (unsigned long *)&l) /* sic */ + : asn_INTEGER2long(&tmp, &l)) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + + *native = l; + } + + rval.code = RC_OK; + rval.consumed += length; + + ASN_DEBUG("Took %ld/%ld bytes to encode %s (%ld)", + (long)rval.consumed, (long)length, td->name, (long)*native); + + return rval; +} + +/* + * Encode the NativeInteger using the standard INTEGER type DER encoder. + */ +asn_enc_rval_t +NativeInteger_encode_der(const asn_TYPE_descriptor_t *sd, const void *ptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + unsigned long native = *(const unsigned long *)ptr; /* Disable sign ext. */ + asn_enc_rval_t erval = {0,0,0}; + INTEGER_t tmp; + +#ifdef WORDS_BIGENDIAN /* Opportunistic optimization */ + + tmp.buf = (uint8_t *)&native; + tmp.size = sizeof(native); + +#else /* Works even if WORDS_BIGENDIAN is not set where should've been */ + uint8_t buf[sizeof(native)]; + uint8_t *p; + + /* Prepare a fake INTEGER */ + for(p = buf + sizeof(buf) - 1; p >= buf; p--, native >>= 8) + *p = (uint8_t)native; + + tmp.buf = buf; + tmp.size = sizeof(buf); +#endif /* WORDS_BIGENDIAN */ + + /* Encode fake INTEGER */ + erval = INTEGER_encode_der(sd, &tmp, tag_mode, tag, cb, app_key); + if(erval.structure_ptr == &tmp) { + erval.structure_ptr = ptr; + } + return erval; +} + +/* + * Decode the chunk of XML text encoding INTEGER. + */ +asn_dec_rval_t +NativeInteger_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval; + INTEGER_t st; + void *st_ptr = (void *)&st; + long *native = (long *)*sptr; + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + memset(&st, 0, sizeof(st)); + rval = INTEGER_decode_xer(opt_codec_ctx, td, &st_ptr, + opt_mname, buf_ptr, size); + if(rval.code == RC_OK) { + long l; + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&st, (unsigned long *)&l) /* sic */ + : asn_INTEGER2long(&st, &l)) { + rval.code = RC_FAIL; + rval.consumed = 0; + } else { + *native = l; + } + } else { + /* + * Cannot restart from the middle; + * there is no place to save state in the native type. + * Request a continuation from the very beginning. + */ + rval.consumed = 0; + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &st); + return rval; +} + + +asn_enc_rval_t +NativeInteger_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + char scratch[32]; /* Enough for 64-bit int */ + asn_enc_rval_t er = {0,0,0}; + const long *native = (const long *)sptr; + + (void)ilevel; + (void)flags; + + if(!native) ASN__ENCODE_FAILED; + + er.encoded = snprintf(scratch, sizeof(scratch), + (specs && specs->field_unsigned) + ? "%lu" : "%ld", *native); + if(er.encoded <= 0 || (size_t)er.encoded >= sizeof(scratch) + || cb(scratch, er.encoded, app_key) < 0) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +NativeInteger_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval; + long *native = (long *)*sptr; + INTEGER_t tmpint; + void *tmpintptr = &tmpint; + + (void)opt_codec_ctx; + ASN_DEBUG("Decoding NativeInteger %s (UPER)", td->name); + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + memset(&tmpint, 0, sizeof tmpint); + rval = INTEGER_decode_uper(opt_codec_ctx, td, constraints, + &tmpintptr, pd); + if(rval.code == RC_OK) { + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&tmpint, (unsigned long *)native) + : asn_INTEGER2long(&tmpint, native)) + rval.code = RC_FAIL; + else + ASN_DEBUG("NativeInteger %s got value %ld", + td->name, *native); + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + + return rval; +} + +asn_enc_rval_t +NativeInteger_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native; + INTEGER_t tmpint; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + + ASN_DEBUG("Encoding NativeInteger %s %ld (UPER)", td->name, native); + + memset(&tmpint, 0, sizeof(tmpint)); + if((specs&&specs->field_unsigned) + ? asn_ulong2INTEGER(&tmpint, native) + : asn_long2INTEGER(&tmpint, native)) + ASN__ENCODE_FAILED; + er = INTEGER_encode_uper(td, constraints, &tmpint, po); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return er; +} + +asn_dec_rval_t +NativeInteger_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval; + long *native = (long *)*sptr; + INTEGER_t tmpint; + void *tmpintptr = &tmpint; + + (void)opt_codec_ctx; + ASN_DEBUG("Decoding NativeInteger %s (APER)", td->name); + + if(!native) { + native = (long *)(*sptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + memset(&tmpint, 0, sizeof tmpint); + rval = INTEGER_decode_aper(opt_codec_ctx, td, constraints, + &tmpintptr, pd); + if(rval.code == RC_OK) { + if((specs&&specs->field_unsigned) + ? asn_INTEGER2ulong(&tmpint, (unsigned long *)native) + : asn_INTEGER2long(&tmpint, native)) + rval.code = RC_FAIL; + else + ASN_DEBUG("NativeInteger %s got value %ld", + td->name, *native); + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + + return rval; +} + +asn_enc_rval_t +NativeInteger_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + + const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + long native; + INTEGER_t tmpint; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + + ASN_DEBUG("Encoding NativeInteger %s %ld (APER)", td->name, native); + + memset(&tmpint, 0, sizeof(tmpint)); + if((specs&&specs->field_unsigned) + ? asn_ulong2INTEGER(&tmpint, (unsigned long)native) + : asn_long2INTEGER(&tmpint, native)) + ASN__ENCODE_FAILED; + er = INTEGER_encode_aper(td, constraints, &tmpint, po); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return er; +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +/* + * INTEGER specific human-readable output. + */ +int +NativeInteger_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + const long *native = (const long *)sptr; + char scratch[32]; /* Enough for 64-bit int */ + int ret; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(native) { + long value = *native; + ret = snprintf(scratch, sizeof(scratch), + (specs && specs->field_unsigned) ? "%lu" : "%ld", value); + assert(ret > 0 && (size_t)ret < sizeof(scratch)); + if(cb(scratch, ret, app_key) < 0) return -1; + if(specs && (value >= 0 || !specs->field_unsigned)) { + const asn_INTEGER_enum_map_t *el = + INTEGER_map_value2enum(specs, value); + if(el) { + if(cb(" (", 2, app_key) < 0) return -1; + if(cb(el->enum_name, el->enum_len, app_key) < 0) return -1; + if(cb(")", 1, app_key) < 0) return -1; + } + } + return 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +NativeInteger_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as INTEGER (%d, %p, Native)", + td->name, method, ptr); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, sizeof(long)); + break; + } +} + +int +NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { + (void)td; + + if(aptr && bptr) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + if(specs && specs->field_unsigned) { + const unsigned long *a = aptr; + const unsigned long *b = bptr; + if(*a < *b) { + return -1; + } else if(*a > *b) { + return 1; + } else { + return 0; + } + } else { + const long *a = aptr; + const long *b = bptr; + if(*a < *b) { + return -1; + } else if(*a > *b) { + return 1; + } else { + return 0; + } + } + } else if(!aptr) { + return -1; + } else { + return 1; + } +} + +asn_random_fill_result_t +NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + long *st = *sptr; + const asn_INTEGER_enum_map_t *emap; + size_t emap_len; + intmax_t value; + int find_inside_map; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (long *)CALLOC(1, sizeof(*st)); + if(st == NULL) { + return result_failed; + } + } + + if(specs) { + emap = specs->value2enum; + emap_len = specs->map_count; + if(specs->strict_enumeration) { + find_inside_map = emap_len > 0; + } else { + find_inside_map = emap_len ? asn_random_between(0, 1) : 0; + } + } else { + emap = 0; + emap_len = 0; + find_inside_map = 0; + } + + if(find_inside_map) { + assert(emap_len > 0); + value = emap[asn_random_between(0, emap_len - 1)].nat_value; + } else { + const asn_per_constraints_t *ct; + + static const long variants[] = { + -65536, -65535, -65534, -32769, -32768, -32767, -16385, -16384, + -16383, -257, -256, -255, -254, -129, -128, -127, + -126, -1, 0, 1, 126, 127, 128, 129, + 254, 255, 256, 257, 16383, 16384, 16385, 32767, + 32768, 32769, 65534, 65535, 65536, 65537}; + if(specs && specs->field_unsigned) { + assert(variants[18] == 0); + value = variants[asn_random_between( + 18, sizeof(variants) / sizeof(variants[0]) - 1)]; + } else { + value = variants[asn_random_between( + 0, sizeof(variants) / sizeof(variants[0]) - 1)]; + } + + if(!constraints) constraints = &td->encoding_constraints; + ct = constraints ? constraints->per_constraints : 0; + if(ct && (ct->value.flags & APC_CONSTRAINED)) { + if(value < ct->value.lower_bound || value > ct->value.upper_bound) { + value = asn_random_between(ct->value.lower_bound, + ct->value.upper_bound); + } + } + } + + *sptr = st; + *st = value; + return result_ok; +} diff --git a/Bouncer/e2sm_rc/lib/NativeInteger_oer.c b/Bouncer/e2sm_rc/lib/NativeInteger_oer.c new file mode 100644 index 0000000..411413a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NativeInteger_oer.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +NativeInteger_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + void **nint_ptr, const void *ptr, size_t size) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + long *native = (long *)*nint_ptr; + INTEGER_t tmpint; + INTEGER_t *tmpintptr = &tmpint; + + memset(&tmpint, 0, sizeof(tmpint)); + + if(!native) { + native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); + if(!native) ASN__DECODE_FAILED; + } + + /* + * OPTIMIZATION: Encode directly rather than passing through INTEGER. + * Saves a memory allocation. + */ + rval = INTEGER_decode_oer(opt_codec_ctx, td, constraints, + (void **)&tmpintptr, ptr, size); + if(rval.code != RC_OK) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return rval; + } + + if(specs && specs->field_unsigned) { + unsigned long ul; + int ok = asn_INTEGER2ulong(&tmpint, &ul) == 0; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + if(ok) { + *native = ul; + } else { + rval.code = RC_FAIL; + return rval; + } + } else { + long l; + int ok = asn_INTEGER2long(&tmpint, &l) == 0; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + if(ok) { + *native = l; + } else { + rval.code = RC_FAIL; + return rval; + } + } + + return rval; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeInteger_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_INTEGER_specifics_t *specs = + (const asn_INTEGER_specifics_t *)td->specifics; + INTEGER_t tmpint; + long native; + + if(!sptr) ASN__ENCODE_FAILED; + + native = *(const long *)sptr; + memset(&tmpint, 0, sizeof(tmpint)); + + ASN_DEBUG("Encoding %s %ld as NativeInteger", td ? td->name : "", native); + + if((specs && specs->field_unsigned) ? asn_ulong2INTEGER(&tmpint, native) + : asn_long2INTEGER(&tmpint, native)) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + ASN__ENCODE_FAILED; + } else { + asn_enc_rval_t er = + INTEGER_encode_oer(td, constraints, &tmpint, cb, app_key); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); + return er; + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/NativeReal.c b/Bouncer/e2sm_rc/lib/NativeReal.c new file mode 100644 index 0000000..160a471 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NativeReal.c @@ -0,0 +1,781 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +/* + * Read the NativeReal.h for the explanation wrt. differences between + * REAL and NativeReal. + * Basically, both are decoders and encoders of ASN.1 REAL type, but this + * implementation deals with the standard (machine-specific) representation + * of them instead of using the platform-independent buffer. + */ +#include +#include +#include +#include +#include +#include + +#if defined(__clang__) +/* + * isnan() is defined using generic selections and won't compile in + * strict C89 mode because of too fancy system's standard library. + * However, prior to C11 the math had a perfectly working isnan() + * in the math library. + * Disable generic selection warning so we can test C89 mode with newer libc. + */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc11-extensions" +static int asn_isnan(double d) { + return isnan(d); +} +#pragma clang diagnostic pop +#else +#define asn_isnan(v) isnan(v) +#endif /* generic selections */ + +/* + * NativeReal basic type description. + */ +static const ber_tlv_tag_t asn_DEF_NativeReal_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) +}; +asn_TYPE_operation_t asn_OP_NativeReal = { + NativeReal_free, + NativeReal_print, + NativeReal_compare, + NativeReal_decode_ber, + NativeReal_encode_der, + NativeReal_decode_xer, + NativeReal_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + NativeReal_decode_oer, + NativeReal_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + NativeReal_decode_uper, + NativeReal_encode_uper, + NativeReal_decode_aper, + NativeReal_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + NativeReal_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_NativeReal = { + "REAL", /* The ASN.1 type is still REAL */ + "REAL", + &asn_OP_NativeReal, + asn_DEF_NativeReal_tags, + sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]), + asn_DEF_NativeReal_tags, /* Same as above */ + sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +static size_t NativeReal__float_size(const asn_TYPE_descriptor_t *td); +static double NativeReal__get_double(const asn_TYPE_descriptor_t *td, + const void *ptr); +static ssize_t NativeReal__set(const asn_TYPE_descriptor_t *td, void **sptr, + double d); + +/* + * Decode REAL type. + */ +asn_dec_rval_t +NativeReal_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buf_ptr, size_t size, int tag_mode) { + asn_dec_rval_t rval; + ber_tlv_len_t length; + + ASN_DEBUG("Decoding %s as REAL (tm=%d)", td->name, tag_mode); + + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0, + &length, 0); + if(rval.code != RC_OK) return rval; + assert(length >= 0); /* Ensured by ber_check_tags */ + + ASN_DEBUG("%s length is %d bytes", td->name, (int)length); + + /* + * Make sure we have this length. + */ + buf_ptr = ((const char *)buf_ptr) + rval.consumed; + size -= rval.consumed; + if(length > (ber_tlv_len_t)size) { + rval.code = RC_WMORE; + rval.consumed = 0; + return rval; + } + + /* + * ASN.1 encoded REAL: buf_ptr, length + * Fill the Dbl, at the same time checking for overflow. + * If overflow occured, return with RC_FAIL. + */ + { + uint8_t scratch[24]; /* Longer than %.16f in decimal */ + REAL_t tmp; + double d; + int ret; + + if((size_t)length < sizeof(scratch)) { + tmp.buf = scratch; + tmp.size = length; + } else { + /* This rarely happens: impractically long value */ + tmp.buf = CALLOC(1, length + 1); + tmp.size = length; + if(!tmp.buf) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + } + + memcpy(tmp.buf, buf_ptr, length); + tmp.buf[length] = '\0'; + + ret = asn_REAL2double(&tmp, &d); + if(tmp.buf != scratch) FREEMEM(tmp.buf); + if(ret) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + + if(NativeReal__set(td, sptr, d) < 0) + ASN__DECODE_FAILED; + } + + rval.code = RC_OK; + rval.consumed += length; + + ASN_DEBUG("Took %ld/%ld bytes to encode %s", (long)rval.consumed, + (long)length, td->name); + + return rval; +} + +/* + * Encode the NativeReal using the standard REAL type DER encoder. + */ +asn_enc_rval_t +NativeReal_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + double d = NativeReal__get_double(td, sptr); + asn_enc_rval_t erval = {0,0,0}; + REAL_t tmp; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, d)) + ASN__ENCODE_FAILED; + + /* Encode a fake REAL */ + erval = der_encode_primitive(td, &tmp, tag_mode, tag, cb, app_key); + if(erval.encoded == -1) { + assert(erval.structure_ptr == &tmp); + erval.structure_ptr = sptr; + } + + /* Free possibly allocated members of the temporary structure */ + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + + return erval; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +/* + * Decode REAL type using PER. + */ +asn_dec_rval_t +NativeReal_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rval; + double d; + REAL_t tmp; + void *ptmp = &tmp; + int ret; + + (void)constraints; + + memset(&tmp, 0, sizeof(tmp)); + rval = OCTET_STRING_decode_uper(opt_codec_ctx, &asn_DEF_REAL, + NULL, &ptmp, pd); + if(rval.code != RC_OK) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + return rval; + } + + ret = asn_REAL2double(&tmp, &d); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + if(ret) ASN__DECODE_FAILED; + + if(NativeReal__set(td, sptr, d) < 0 ) + ASN__DECODE_FAILED; + + return rval; +} + +/* + * Encode the NativeReal using the OCTET STRING PER encoder. + */ +asn_enc_rval_t +NativeReal_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + double d = NativeReal__get_double(td, sptr); + asn_enc_rval_t erval = {0,0,0}; + REAL_t tmp; + + (void)constraints; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, d)) + ASN__ENCODE_FAILED; + + /* Encode a DER REAL */ + erval = OCTET_STRING_encode_uper(&asn_DEF_REAL, NULL, &tmp, po); + if(erval.encoded == -1) + erval.structure_ptr = sptr; + + /* Free possibly allocated members of the temporary structure */ + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + + return erval; +} + + +asn_dec_rval_t +NativeReal_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **dbl_ptr, asn_per_data_t *pd) { + double *Dbl = (double *)*dbl_ptr; + asn_dec_rval_t rval; + REAL_t tmp; + void *ptmp = &tmp; + int ret; + + (void)constraints; + + /* + * If the structure is not there, allocate it. + */ + if(Dbl == NULL) { + *dbl_ptr = CALLOC(1, sizeof(*Dbl)); + Dbl = (double *)*dbl_ptr; + if(Dbl == NULL) + ASN__DECODE_FAILED; + } + + memset(&tmp, 0, sizeof(tmp)); + rval = OCTET_STRING_decode_aper(opt_codec_ctx, td, NULL, + &ptmp, pd); + if(rval.code != RC_OK) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + return rval; + } + + ret = asn_REAL2double(&tmp, Dbl); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + if(ret) ASN__DECODE_FAILED; + + return rval; +} + +asn_enc_rval_t +NativeReal_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + double Dbl = *(const double *)sptr; + asn_enc_rval_t erval = {0,0,0}; + REAL_t tmp; + + (void)constraints; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, Dbl)) + ASN__ENCODE_FAILED; + + /* Encode a DER REAL */ + erval = OCTET_STRING_encode_aper(td, NULL, &tmp, po); + if(erval.encoded == -1) + erval.structure_ptr = sptr; + + /* Free possibly allocated members of the temporary structure */ + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + + return erval; +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +#ifndef ASN_DISABLE_OER_SUPPORT + +/* + * Swap bytes from/to network, if local is little-endian. + * Unused endianness sections are likely removed at compile phase. + */ +static void +NativeReal__network_swap(size_t float_size, const void *srcp, uint8_t *dst) { + const uint8_t *src = srcp; + double test = -0.0; + int float_big_endian = *(const char *)&test != 0; + /* In lieu of static_assert(sizeof(double) == 8) */ + static const char sizeof_double_is_8_a[sizeof(double)-7] CC_NOTUSED; + static const char sizeof_double_is_8_b[9-sizeof(double)] CC_NOTUSED; + /* In lieu of static_assert(sizeof(sizeof) == 4) */ + static const char sizeof_float_is_4_a[sizeof(float)-3] CC_NOTUSED; + static const char sizeof_float_is_4_b[5-sizeof(float)] CC_NOTUSED; + + switch(float_size) { + case sizeof(double): + assert(sizeof(double) == 8); + if(float_big_endian) { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = src[3]; + dst[4] = src[4]; + dst[5] = src[5]; + dst[6] = src[6]; + dst[7] = src[7]; + } else { + dst[0] = src[7]; + dst[1] = src[6]; + dst[2] = src[5]; + dst[3] = src[4]; + dst[4] = src[3]; + dst[5] = src[2]; + dst[6] = src[1]; + dst[7] = src[0]; + } + return; + case sizeof(float): + assert(sizeof(float) == 4); + if(float_big_endian) { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = src[3]; + } else { + dst[0] = src[3]; + dst[1] = src[2]; + dst[2] = src[1]; + dst[3] = src[0]; + } + return; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +NativeReal_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* X.696 IEEE 754 binary32 and binary64 encoding */ + uint8_t scratch[sizeof(double)]; + const asn_NativeReal_specifics_t *specs = + (const asn_NativeReal_specifics_t *)td->specifics; + size_t wire_size = constraints->value.width; + + if(specs ? (wire_size == specs->float_size) + : (wire_size == sizeof(double))) { + /* + * Our representation matches the wire, modulo endianness. + * That was the whole point of compact encoding! + */ + } else { + assert((wire_size == sizeof(double)) + || (specs && specs->float_size == wire_size)); + ASN__ENCODE_FAILED; + } + + /* + * The X.696 standard doesn't specify endianness, neither is IEEE 754. + * So we assume the network format is big endian. + */ + NativeReal__network_swap(wire_size, sptr, scratch); + if(cb(scratch, wire_size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + er.encoded = wire_size; + ASN__ENCODED_OK(er); + } + } else { + double d = NativeReal__get_double(td, sptr); + ssize_t len_len; + REAL_t tmp; + + /* Prepare a temporary clean structure */ + memset(&tmp, 0, sizeof(tmp)); + + if(asn_double2REAL(&tmp, d)) { + ASN__ENCODE_FAILED; + } + + /* Encode a fake REAL */ + len_len = oer_serialize_length(tmp.size, cb, app_key); + if(len_len < 0 || cb(tmp.buf, tmp.size, app_key) < 0) { + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + ASN__ENCODE_FAILED; + } else { + er.encoded = len_len + tmp.size; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &tmp); + ASN__ENCODED_OK(er); + } + } +} + +asn_dec_rval_t +NativeReal_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + asn_dec_rval_t ok = {RC_OK, 0}; + double d; + ssize_t len_len; + size_t real_body_len; + + (void)opt_codec_ctx; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* X.696 IEEE 754 binary32 and binary64 encoding */ + uint8_t scratch[sizeof(double)]; + size_t wire_size = constraints->value.width; + + if(size < wire_size) + ASN__DECODE_STARVED; + + /* + * The X.696 standard doesn't specify endianness, neither is IEEE 754. + * So we assume the network format is big endian. + */ + NativeReal__network_swap(wire_size, ptr, scratch); + + + switch(wire_size) { + case sizeof(double): + { + double tmp; + memcpy(&tmp, scratch, sizeof(double)); + if(NativeReal__set(td, sptr, tmp) < 0) + ASN__DECODE_FAILED; + } + break; + case sizeof(float): + { + float tmp; + memcpy(&tmp, scratch, sizeof(float)); + if(NativeReal__set(td, sptr, tmp) < 0) + ASN__DECODE_FAILED; + } + break; + default: + ASN__DECODE_FAILED; + } + + ok.consumed = wire_size; + return ok; + } + + len_len = oer_fetch_length(ptr, size, &real_body_len); + if(len_len < 0) ASN__DECODE_FAILED; + if(len_len == 0) ASN__DECODE_STARVED; + + ptr = (const char *)ptr + len_len; + size -= len_len; + + if(real_body_len > size) ASN__DECODE_STARVED; + + { + uint8_t scratch[24]; /* Longer than %.16f in decimal */ + REAL_t tmp; + int ret; + + if(real_body_len < sizeof(scratch)) { + tmp.buf = scratch; + tmp.size = real_body_len; + } else { + /* This rarely happens: impractically long value */ + tmp.buf = CALLOC(1, real_body_len + 1); + tmp.size = real_body_len; + if(!tmp.buf) { + ASN__DECODE_FAILED; + } + } + + memcpy(tmp.buf, ptr, real_body_len); + tmp.buf[real_body_len] = '\0'; + + ret = asn_REAL2double(&tmp, &d); + if(tmp.buf != scratch) FREEMEM(tmp.buf); + if(ret) { + ASN_DEBUG("REAL decoded in %" ASN_PRI_SIZE " bytes, but can't convert t double", + real_body_len); + ASN__DECODE_FAILED; + } + } + + if(NativeReal__set(td, sptr, d) < 0) + ASN__DECODE_FAILED; + + ok.consumed = len_len + real_body_len; + return ok; +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ + +/* + * Decode the chunk of XML text encoding REAL. + */ +asn_dec_rval_t +NativeReal_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + asn_dec_rval_t rval; + REAL_t st = { 0, 0 }; + REAL_t *stp = &st; + + rval = REAL_decode_xer(opt_codec_ctx, td, (void **)&stp, opt_mname, + buf_ptr, size); + if(rval.code == RC_OK) { + double d; + if(asn_REAL2double(&st, &d) || NativeReal__set(td, sptr, d) < 0) { + rval.code = RC_FAIL; + rval.consumed = 0; + } + } else { + /* Convert all errors into RC_FAIL */ + rval.consumed = 0; + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_REAL, &st); + return rval; +} + +asn_enc_rval_t +NativeReal_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + double d = NativeReal__get_double(td, sptr); + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + + er.encoded = REAL__dump(d, flags & XER_F_CANONICAL, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +/* + * REAL specific human-readable output. + */ +int +NativeReal_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + (void)ilevel; /* Unused argument */ + + if(sptr) { + double d = NativeReal__get_double(td, sptr); + return (REAL__dump(d, 0, cb, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +int +NativeReal_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + + if(aptr && bptr) { + double a = NativeReal__get_double(td, aptr); + double b = NativeReal__get_double(td, bptr); + + /* NaN sorted above everything else */ + if(asn_isnan(a)) { + if(asn_isnan(b)) { + return 0; + } else { + return -1; + } + } else if(asn_isnan(b)) { + return 1; + } + /* Value comparison. */ + if(a < b) { + return -1; + } else if(a > b) { + return 1; + } else { + return 0; + } + } else if(!aptr) { + return -1; + } else { + return 1; + } +} + +void +NativeReal_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as REAL (%d, %p, Native)", + td->name, method, ptr); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: { + const asn_NativeReal_specifics_t *specs; + size_t float_size; + specs = (const asn_NativeReal_specifics_t *)td->specifics; + float_size = specs ? specs->float_size : sizeof(double); + memset(ptr, 0, float_size); + } break; + } +} + +asn_random_fill_result_t +NativeReal_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 0}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; +#ifndef INFINITY +#define INFINITY (1.0/0.0) +#endif +#ifndef NAN +#define NAN (0.0/0.0) +#endif + static const double double_values[] = { + -M_E, M_E, -M_PI, M_PI, /* Better precision than with floats */ + -1E+308, 1E+308, + /* 2^51 */ + -2251799813685248.0, 2251799813685248.0, + /* 2^52 */ + -4503599627370496.0, 4503599627370496.0, + /* 2^100 */ + -1267650600228229401496703205376.0, 1267650600228229401496703205376.0, + -DBL_MIN, DBL_MIN, + -DBL_MAX, DBL_MAX, +#ifdef DBL_TRUE_MIN + -DBL_TRUE_MIN, DBL_TRUE_MIN +#endif + }; + static const float float_values[] = { + 0, -0.0, -1, 1, -M_E, M_E, -3.14, 3.14, -M_PI, M_PI, -255, 255, + -FLT_MIN, FLT_MIN, + -FLT_MAX, FLT_MAX, +#ifdef FLT_TRUE_MIN + -FLT_TRUE_MIN, FLT_TRUE_MIN, +#endif + INFINITY, -INFINITY, NAN + }; + ssize_t float_set_size = NativeReal__float_size(td); + const size_t n_doubles = sizeof(double_values) / sizeof(double_values[0]); + const size_t n_floats = sizeof(float_values) / sizeof(float_values[0]); + double d; + + (void)constraints; + + if(max_length == 0) return result_skipped; + + if(float_set_size == sizeof(double) && asn_random_between(0, 1) == 0) { + d = double_values[asn_random_between(0, n_doubles - 1)]; + } else { + d = float_values[asn_random_between(0, n_floats - 1)]; + } + + if(NativeReal__set(td, sptr, d) < 0) { + return result_failed; + } + + result_ok.length = float_set_size; + return result_ok; +} + + +/* + * Local helper functions. + */ + +static size_t +NativeReal__float_size(const asn_TYPE_descriptor_t *td) { + const asn_NativeReal_specifics_t *specs = + (const asn_NativeReal_specifics_t *)td->specifics; + return specs ? specs->float_size : sizeof(double); +} + +static double +NativeReal__get_double(const asn_TYPE_descriptor_t *td, const void *ptr) { + size_t float_size = NativeReal__float_size(td); + if(float_size == sizeof(float)) { + return *(const float *)ptr; + } else { + return *(const double *)ptr; + } +} + +static ssize_t /* Returns -1 or float size. */ +NativeReal__set(const asn_TYPE_descriptor_t *td, void **sptr, double d) { + size_t float_size = NativeReal__float_size(td); + void *native; + + if(!(native = *sptr)) { + native = (*sptr = CALLOC(1, float_size)); + if(!native) { + return -1; + } + } + + if(float_size == sizeof(float)) { + if(asn_double2float(d, (float *)native)) { + return -1; + } + } else { + *(double *)native = d; + } + + return float_size; +} + diff --git a/Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-E-UTRA.c b/Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-E-UTRA.c new file mode 100644 index 0000000..a794b93 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-E-UTRA.c @@ -0,0 +1,245 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NeighborCell-Item-Choice-E-UTRA.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static int +memb_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_x2_Xn_established_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_x2_Xn_established_constr_6 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_hO_validated_constr_10 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_hO_validated_constr_10 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_version_constr_14 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_version_constr_14 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_x2_Xn_established_value2enum_6[] = { + { 0, 4, "true" }, + { 1, 5, "false" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_x2_Xn_established_enum2value_6[] = { + 1, /* false(1) */ + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_x2_Xn_established_specs_6 = { + asn_MAP_x2_Xn_established_value2enum_6, /* "tag" => N; sorted by tag */ + asn_MAP_x2_Xn_established_enum2value_6, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_x2_Xn_established_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_x2_Xn_established_6 = { + "x2-Xn-established", + "x2-Xn-established", + &asn_OP_NativeEnumerated, + asn_DEF_x2_Xn_established_tags_6, + sizeof(asn_DEF_x2_Xn_established_tags_6) + /sizeof(asn_DEF_x2_Xn_established_tags_6[0]) - 1, /* 1 */ + asn_DEF_x2_Xn_established_tags_6, /* Same as above */ + sizeof(asn_DEF_x2_Xn_established_tags_6) + /sizeof(asn_DEF_x2_Xn_established_tags_6[0]), /* 2 */ + { &asn_OER_type_x2_Xn_established_constr_6, &asn_PER_type_x2_Xn_established_constr_6, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_x2_Xn_established_specs_6 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_hO_validated_value2enum_10[] = { + { 0, 4, "true" }, + { 1, 5, "false" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_hO_validated_enum2value_10[] = { + 1, /* false(1) */ + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_hO_validated_specs_10 = { + asn_MAP_hO_validated_value2enum_10, /* "tag" => N; sorted by tag */ + asn_MAP_hO_validated_enum2value_10, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_hO_validated_tags_10[] = { + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_hO_validated_10 = { + "hO-validated", + "hO-validated", + &asn_OP_NativeEnumerated, + asn_DEF_hO_validated_tags_10, + sizeof(asn_DEF_hO_validated_tags_10) + /sizeof(asn_DEF_hO_validated_tags_10[0]) - 1, /* 1 */ + asn_DEF_hO_validated_tags_10, /* Same as above */ + sizeof(asn_DEF_hO_validated_tags_10) + /sizeof(asn_DEF_hO_validated_tags_10[0]), /* 2 */ + { &asn_OER_type_hO_validated_constr_10, &asn_PER_type_hO_validated_constr_10, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_hO_validated_specs_10 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_NeighborCell_Item_Choice_E_UTRA_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_CGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EUTRA_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA-CGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_PCI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E_UTRA_PCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA-PCI" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_ARFCN), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E_UTRA_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA-ARFCN" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_TAC), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E_UTRA_TAC, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA-TAC" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, x2_Xn_established), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_x2_Xn_established_6, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "x2-Xn-established" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, hO_validated), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_hO_validated_10, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "hO-validated" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, version), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_version_constr_14, &asn_PER_memb_version_constr_14, memb_version_constraint_1 }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NeighborCell_Item_Choice_E_UTRA_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eUTRA-CGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eUTRA-PCI */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* eUTRA-ARFCN */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* eUTRA-TAC */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* x2-Xn-established */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* hO-validated */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NeighborCell_Item_Choice_E_UTRA_specs_1 = { + sizeof(struct NeighborCell_Item_Choice_E_UTRA), + offsetof(struct NeighborCell_Item_Choice_E_UTRA, _asn_ctx), + asn_MAP_NeighborCell_Item_Choice_E_UTRA_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NeighborCell_Item_Choice_E_UTRA = { + "NeighborCell-Item-Choice-E-UTRA", + "NeighborCell-Item-Choice-E-UTRA", + &asn_OP_SEQUENCE, + asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1, + sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1) + /sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1[0]), /* 1 */ + asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1, /* Same as above */ + sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1) + /sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NeighborCell_Item_Choice_E_UTRA_1, + 7, /* Elements count */ + &asn_SPC_NeighborCell_Item_Choice_E_UTRA_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-NR.c b/Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-NR.c new file mode 100644 index 0000000..db72fd7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NeighborCell-Item-Choice-NR.c @@ -0,0 +1,306 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NeighborCell-Item-Choice-NR.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static int +memb_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_nR_mode_info_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_nR_mode_info_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_x2_Xn_established_constr_10 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_x2_Xn_established_constr_10 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_hO_validated_constr_14 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_hO_validated_constr_14 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_version_constr_18 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_version_constr_18 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_nR_mode_info_value2enum_5[] = { + { 0, 3, "fdd" }, + { 1, 3, "tdd" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_nR_mode_info_enum2value_5[] = { + 0, /* fdd(0) */ + 1 /* tdd(1) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_nR_mode_info_specs_5 = { + asn_MAP_nR_mode_info_value2enum_5, /* "tag" => N; sorted by tag */ + asn_MAP_nR_mode_info_enum2value_5, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_nR_mode_info_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_nR_mode_info_5 = { + "nR-mode-info", + "nR-mode-info", + &asn_OP_NativeEnumerated, + asn_DEF_nR_mode_info_tags_5, + sizeof(asn_DEF_nR_mode_info_tags_5) + /sizeof(asn_DEF_nR_mode_info_tags_5[0]) - 1, /* 1 */ + asn_DEF_nR_mode_info_tags_5, /* Same as above */ + sizeof(asn_DEF_nR_mode_info_tags_5) + /sizeof(asn_DEF_nR_mode_info_tags_5[0]), /* 2 */ + { &asn_OER_type_nR_mode_info_constr_5, &asn_PER_type_nR_mode_info_constr_5, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_nR_mode_info_specs_5 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_x2_Xn_established_value2enum_10[] = { + { 0, 4, "true" }, + { 1, 5, "false" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_x2_Xn_established_enum2value_10[] = { + 1, /* false(1) */ + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_x2_Xn_established_specs_10 = { + asn_MAP_x2_Xn_established_value2enum_10, /* "tag" => N; sorted by tag */ + asn_MAP_x2_Xn_established_enum2value_10, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_x2_Xn_established_tags_10[] = { + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_x2_Xn_established_10 = { + "x2-Xn-established", + "x2-Xn-established", + &asn_OP_NativeEnumerated, + asn_DEF_x2_Xn_established_tags_10, + sizeof(asn_DEF_x2_Xn_established_tags_10) + /sizeof(asn_DEF_x2_Xn_established_tags_10[0]) - 1, /* 1 */ + asn_DEF_x2_Xn_established_tags_10, /* Same as above */ + sizeof(asn_DEF_x2_Xn_established_tags_10) + /sizeof(asn_DEF_x2_Xn_established_tags_10[0]), /* 2 */ + { &asn_OER_type_x2_Xn_established_constr_10, &asn_PER_type_x2_Xn_established_constr_10, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_x2_Xn_established_specs_10 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_hO_validated_value2enum_14[] = { + { 0, 4, "true" }, + { 1, 5, "false" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_hO_validated_enum2value_14[] = { + 1, /* false(1) */ + 0 /* true(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_hO_validated_specs_14 = { + asn_MAP_hO_validated_value2enum_14, /* "tag" => N; sorted by tag */ + asn_MAP_hO_validated_enum2value_14, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_hO_validated_tags_14[] = { + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_hO_validated_14 = { + "hO-validated", + "hO-validated", + &asn_OP_NativeEnumerated, + asn_DEF_hO_validated_tags_14, + sizeof(asn_DEF_hO_validated_tags_14) + /sizeof(asn_DEF_hO_validated_tags_14[0]) - 1, /* 1 */ + asn_DEF_hO_validated_tags_14, /* Same as above */ + sizeof(asn_DEF_hO_validated_tags_14) + /sizeof(asn_DEF_hO_validated_tags_14[0]), /* 2 */ + { &asn_OER_type_hO_validated_constr_14, &asn_PER_type_hO_validated_constr_14, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_hO_validated_specs_14 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_NeighborCell_Item_Choice_NR_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, nR_CGI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_CGI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR-CGI" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, nR_PCI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_PCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR-PCI" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, fiveGS_TAC), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FiveGS_TAC, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveGS-TAC" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, nR_mode_info), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_nR_mode_info_5, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR-mode-info" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, nR_FreqInfo), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NRFrequencyInfo, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR-FreqInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, x2_Xn_established), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_x2_Xn_established_10, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "x2-Xn-established" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, hO_validated), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_hO_validated_14, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "hO-validated" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_NR, version), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_version_constr_18, &asn_PER_memb_version_constr_18, memb_version_constraint_1 }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_NeighborCell_Item_Choice_NR_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NeighborCell_Item_Choice_NR_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nR-CGI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nR-PCI */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* fiveGS-TAC */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* nR-mode-info */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* nR-FreqInfo */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* x2-Xn-established */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* hO-validated */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NeighborCell_Item_Choice_NR_specs_1 = { + sizeof(struct NeighborCell_Item_Choice_NR), + offsetof(struct NeighborCell_Item_Choice_NR, _asn_ctx), + asn_MAP_NeighborCell_Item_Choice_NR_tag2el_1, + 8, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 8, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NeighborCell_Item_Choice_NR = { + "NeighborCell-Item-Choice-NR", + "NeighborCell-Item-Choice-NR", + &asn_OP_SEQUENCE, + asn_DEF_NeighborCell_Item_Choice_NR_tags_1, + sizeof(asn_DEF_NeighborCell_Item_Choice_NR_tags_1) + /sizeof(asn_DEF_NeighborCell_Item_Choice_NR_tags_1[0]), /* 1 */ + asn_DEF_NeighborCell_Item_Choice_NR_tags_1, /* Same as above */ + sizeof(asn_DEF_NeighborCell_Item_Choice_NR_tags_1) + /sizeof(asn_DEF_NeighborCell_Item_Choice_NR_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NeighborCell_Item_Choice_NR_1, + 8, /* Elements count */ + &asn_SPC_NeighborCell_Item_Choice_NR_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NeighborCell-Item.c b/Bouncer/e2sm_rc/lib/NeighborCell-Item.c new file mode 100644 index 0000000..cb43506 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NeighborCell-Item.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NeighborCell-Item.h" + +#include "NeighborCell-Item-Choice-NR.h" +#include "NeighborCell-Item-Choice-E-UTRA.h" +static asn_oer_constraints_t asn_OER_type_NeighborCell_Item_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_NeighborCell_Item_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NeighborCell_Item_1[] = { + { ATF_POINTER, 0, offsetof(struct NeighborCell_Item, choice.ranType_Choice_NR), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NeighborCell_Item_Choice_NR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranType-Choice-NR" + }, + { ATF_POINTER, 0, offsetof(struct NeighborCell_Item, choice.ranType_Choice_EUTRA), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NeighborCell_Item_Choice_E_UTRA, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranType-Choice-EUTRA" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_NeighborCell_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranType-Choice-NR */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranType-Choice-EUTRA */ +}; +asn_CHOICE_specifics_t asn_SPC_NeighborCell_Item_specs_1 = { + sizeof(struct NeighborCell_Item), + offsetof(struct NeighborCell_Item, _asn_ctx), + offsetof(struct NeighborCell_Item, present), + sizeof(((struct NeighborCell_Item *)0)->present), + asn_MAP_NeighborCell_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_NeighborCell_Item = { + "NeighborCell-Item", + "NeighborCell-Item", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_NeighborCell_Item_constr_1, &asn_PER_type_NeighborCell_Item_constr_1, CHOICE_constraint }, + asn_MBR_NeighborCell_Item_1, + 2, /* Elements count */ + &asn_SPC_NeighborCell_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NeighborCell-List.c b/Bouncer/e2sm_rc/lib/NeighborCell-List.c new file mode 100644 index 0000000..569d511 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NeighborCell-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NeighborCell-List.h" + +#include "NeighborCell-Item.h" +static asn_oer_constraints_t asn_OER_type_NeighborCell_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +asn_per_constraints_t asn_PER_type_NeighborCell_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NeighborCell_List_1[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_NeighborCell_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_NeighborCell_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_NeighborCell_List_specs_1 = { + sizeof(struct NeighborCell_List), + offsetof(struct NeighborCell_List, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_NeighborCell_List = { + "NeighborCell-List", + "NeighborCell-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_NeighborCell_List_tags_1, + sizeof(asn_DEF_NeighborCell_List_tags_1) + /sizeof(asn_DEF_NeighborCell_List_tags_1[0]), /* 1 */ + asn_DEF_NeighborCell_List_tags_1, /* Same as above */ + sizeof(asn_DEF_NeighborCell_List_tags_1) + /sizeof(asn_DEF_NeighborCell_List_tags_1[0]), /* 1 */ + { &asn_OER_type_NeighborCell_List_constr_1, &asn_PER_type_NeighborCell_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_NeighborCell_List_1, + 1, /* Single element */ + &asn_SPC_NeighborCell_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NeighborRelation-Info.c b/Bouncer/e2sm_rc/lib/NeighborRelation-Info.c new file mode 100644 index 0000000..3914b58 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NeighborRelation-Info.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NeighborRelation-Info.h" + +asn_TYPE_member_t asn_MBR_NeighborRelation_Info_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NeighborRelation_Info, servingCellPCI), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ServingCell_PCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "servingCellPCI" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborRelation_Info, servingCellARFCN), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ServingCell_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "servingCellARFCN" + }, + { ATF_NOFLAGS, 0, offsetof(struct NeighborRelation_Info, neighborCell_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NeighborCell_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "neighborCell-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_NeighborRelation_Info_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_NeighborRelation_Info_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* servingCellPCI */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* servingCellARFCN */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* neighborCell-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_NeighborRelation_Info_specs_1 = { + sizeof(struct NeighborRelation_Info), + offsetof(struct NeighborRelation_Info, _asn_ctx), + asn_MAP_NeighborRelation_Info_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_NeighborRelation_Info = { + "NeighborRelation-Info", + "NeighborRelation-Info", + &asn_OP_SEQUENCE, + asn_DEF_NeighborRelation_Info_tags_1, + sizeof(asn_DEF_NeighborRelation_Info_tags_1) + /sizeof(asn_DEF_NeighborRelation_Info_tags_1[0]), /* 1 */ + asn_DEF_NeighborRelation_Info_tags_1, /* Same as above */ + sizeof(asn_DEF_NeighborRelation_Info_tags_1) + /sizeof(asn_DEF_NeighborRelation_Info_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_NeighborRelation_Info_1, + 3, /* Elements count */ + &asn_SPC_NeighborRelation_Info_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/NgENB-ID.c b/Bouncer/e2sm_rc/lib/NgENB-ID.c new file mode 100644 index 0000000..1797b60 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/NgENB-ID.c @@ -0,0 +1,192 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "NgENB-ID.h" + +static int +memb_macroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 20)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_shortMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 18)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_longMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 21)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_macroNgENB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +static asn_per_constraints_t asn_PER_memb_macroNgENB_ID_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_shortMacroNgENB_ID_constr_3 CC_NOTUSED = { + { 0, 0 }, + 18 /* (SIZE(18..18)) */}; +static asn_per_constraints_t asn_PER_memb_shortMacroNgENB_ID_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_longMacroNgENB_ID_constr_4 CC_NOTUSED = { + { 0, 0 }, + 21 /* (SIZE(21..21)) */}; +static asn_per_constraints_t asn_PER_memb_longMacroNgENB_ID_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_NgENB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_NgENB_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_NgENB_ID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct NgENB_ID, choice.macroNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_macroNgENB_ID_constr_2, &asn_PER_memb_macroNgENB_ID_constr_2, memb_macroNgENB_ID_constraint_1 }, + 0, 0, /* No default value */ + "macroNgENB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct NgENB_ID, choice.shortMacroNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_shortMacroNgENB_ID_constr_3, &asn_PER_memb_shortMacroNgENB_ID_constr_3, memb_shortMacroNgENB_ID_constraint_1 }, + 0, 0, /* No default value */ + "shortMacroNgENB-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct NgENB_ID, choice.longMacroNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { &asn_OER_memb_longMacroNgENB_ID_constr_4, &asn_PER_memb_longMacroNgENB_ID_constr_4, memb_longMacroNgENB_ID_constraint_1 }, + 0, 0, /* No default value */ + "longMacroNgENB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_NgENB_ID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macroNgENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* shortMacroNgENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* longMacroNgENB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_NgENB_ID_specs_1 = { + sizeof(struct NgENB_ID), + offsetof(struct NgENB_ID, _asn_ctx), + offsetof(struct NgENB_ID, present), + sizeof(((struct NgENB_ID *)0)->present), + asn_MAP_NgENB_ID_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_NgENB_ID = { + "NgENB-ID", + "NgENB-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_NgENB_ID_constr_1, &asn_PER_type_NgENB_ID_constr_1, CHOICE_constraint }, + asn_MBR_NgENB_ID_1, + 3, /* Elements count */ + &asn_SPC_NgENB_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/OCTET_STRING.c b/Bouncer/e2sm_rc/lib/OCTET_STRING.c new file mode 100644 index 0000000..628a5d6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/OCTET_STRING.c @@ -0,0 +1,2411 @@ +/*- + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ +#include + +/* + * OCTET STRING basic type description. + */ +static const ber_tlv_tag_t asn_DEF_OCTET_STRING_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs = { + sizeof(OCTET_STRING_t), + offsetof(OCTET_STRING_t, _asn_ctx), + ASN_OSUBV_STR +}; + +asn_TYPE_operation_t asn_OP_OCTET_STRING = { + OCTET_STRING_free, + OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, /* Unaligned PER decoder */ + OCTET_STRING_encode_uper, /* Unaligned PER encoder */ + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = { + "OCTET STRING", /* Canonical name */ + "OCTET_STRING", /* XML tag name */ + &asn_OP_OCTET_STRING, + asn_DEF_OCTET_STRING_tags, + sizeof(asn_DEF_OCTET_STRING_tags) + / sizeof(asn_DEF_OCTET_STRING_tags[0]), + asn_DEF_OCTET_STRING_tags, /* Same as above */ + sizeof(asn_DEF_OCTET_STRING_tags) + / sizeof(asn_DEF_OCTET_STRING_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs +}; + +#undef _CH_PHASE +#undef NEXT_PHASE +#undef PREV_PHASE +#define _CH_PHASE(ctx, inc) do { \ + if(ctx->phase == 0) \ + ctx->context = 0; \ + ctx->phase += inc; \ + } while(0) +#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1) +#define PREV_PHASE(ctx) _CH_PHASE(ctx, -1) + +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = (num_bytes); \ + buf_ptr = ((const char *)buf_ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +#undef RETURN +#define RETURN(_code) do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +#undef APPEND +#define APPEND(bufptr, bufsize) do { \ + size_t _bs = (bufsize); /* Append size */ \ + size_t _ns = ctx->context; /* Allocated now */ \ + size_t _es = st->size + _bs; /* Expected size */ \ + /* int is really a typeof(st->size): */ \ + if((int)_es < 0) RETURN(RC_FAIL); \ + if(_ns <= _es) { \ + void *ptr; \ + /* Be nice and round to the memory allocator */ \ + do { _ns = _ns ? _ns << 1 : 16; } \ + while(_ns <= _es); \ + /* int is really a typeof(st->size): */ \ + if((int)_ns < 0) RETURN(RC_FAIL); \ + ptr = REALLOC(st->buf, _ns); \ + if(ptr) { \ + st->buf = (uint8_t *)ptr; \ + ctx->context = _ns; \ + } else { \ + RETURN(RC_FAIL); \ + } \ + ASN_DEBUG("Reallocating into %ld", (long)_ns); \ + } \ + memcpy(st->buf + st->size, bufptr, _bs); \ + /* Convenient nul-termination */ \ + st->buf[_es] = '\0'; \ + st->size = _es; \ + } while(0) + +/* + * The main reason why ASN.1 is still alive is that too much time and effort + * is necessary for learning it more or less adequately, thus creating a gut + * necessity to demonstrate that aquired skill everywhere afterwards. + * No, I am not going to explain what the following stuff is. + */ +struct _stack_el { + ber_tlv_len_t left; /* What's left to read (or -1) */ + ber_tlv_len_t got; /* What was actually processed */ + unsigned cont_level; /* Depth of subcontainment */ + int want_nulls; /* Want null "end of content" octets? */ + int bits_chopped; /* Flag in BIT STRING mode */ + ber_tlv_tag_t tag; /* For debugging purposes */ + struct _stack_el *prev; + struct _stack_el *next; +}; +struct _stack { + struct _stack_el *tail; + struct _stack_el *cur_ptr; +}; + +static struct _stack_el * +OS__add_stack_el(struct _stack *st) { + struct _stack_el *nel; + + /* + * Reuse the old stack frame or allocate a new one. + */ + if(st->cur_ptr && st->cur_ptr->next) { + nel = st->cur_ptr->next; + nel->bits_chopped = 0; + nel->got = 0; + /* Retain the nel->cont_level, it's correct. */ + } else { + nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el)); + if(nel == NULL) + return NULL; + + if(st->tail) { + /* Increase a subcontainment depth */ + nel->cont_level = st->tail->cont_level + 1; + st->tail->next = nel; + } + nel->prev = st->tail; + st->tail = nel; + } + + st->cur_ptr = nel; + + return nel; +} + +static struct _stack * +_new_stack(void) { + return (struct _stack *)CALLOC(1, sizeof(struct _stack)); +} + +/* + * Decode OCTET STRING type. + */ +asn_dec_rval_t +OCTET_STRING_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buf_ptr, size_t size, int tag_mode) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + asn_dec_rval_t rval; + asn_struct_ctx_t *ctx; + ssize_t consumed_myself = 0; + struct _stack *stck; /* Expectations stack structure */ + struct _stack_el *sel = 0; /* Stack element */ + int tlv_constr; + enum asn_OS_Subvariant type_variant = specs->subvariant; + + ASN_DEBUG("Decoding %s as %s (frame %ld)", + td->name, + (type_variant == ASN_OSUBV_STR) ? + "OCTET STRING" : "OS-SpecialCase", + (long)size); + + /* + * Create the string if does not exist. + */ + if(st == NULL) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(st == NULL) RETURN(RC_FAIL); + } + + /* Restore parsing context */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + switch(ctx->phase) { + case 0: + /* + * Check tags. + */ + rval = ber_check_tags(opt_codec_ctx, td, ctx, + buf_ptr, size, tag_mode, -1, + &ctx->left, &tlv_constr); + if(rval.code != RC_OK) + return rval; + + if(tlv_constr) { + /* + * Complex operation, requires stack of expectations. + */ + ctx->ptr = _new_stack(); + if(!ctx->ptr) { + RETURN(RC_FAIL); + } + } else { + /* + * Jump into stackless primitive decoding. + */ + _CH_PHASE(ctx, 3); + if(type_variant == ASN_OSUBV_ANY && tag_mode != 1) + APPEND(buf_ptr, rval.consumed); + ADVANCE(rval.consumed); + goto phase3; + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 1: + phase1: + /* + * Fill the stack with expectations. + */ + stck = (struct _stack *)ctx->ptr; + sel = stck->cur_ptr; + do { + ber_tlv_tag_t tlv_tag; + ber_tlv_len_t tlv_len; + ber_tlv_tag_t expected_tag; + ssize_t tl, ll, tlvl; + /* This one works even if (sel->left == -1) */ + size_t Left = ((!sel||(size_t)sel->left >= size) + ?size:(size_t)sel->left); + + + ASN_DEBUG("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", (void *)sel, + (long)(sel?sel->left:0), + (long)(sel?sel->want_nulls:0), + (long)(sel?sel->got:0) + ); + if(sel && sel->left <= 0 && sel->want_nulls == 0) { + if(sel->prev) { + struct _stack_el *prev = sel->prev; + if(prev->left != -1) { + if(prev->left < sel->got) + RETURN(RC_FAIL); + prev->left -= sel->got; + } + prev->got += sel->got; + sel = stck->cur_ptr = prev; + if(!sel) break; + tlv_constr = 1; + continue; + } else { + sel = stck->cur_ptr = 0; + break; /* Nothing to wait */ + } + } + + tl = ber_fetch_tag(buf_ptr, Left, &tlv_tag); + ASN_DEBUG("fetch tag(size=%ld,L=%ld), %sstack, left=%ld, wn=%ld, tl=%ld", + (long)size, (long)Left, sel?"":"!", + (long)(sel?sel->left:0), + (long)(sel?sel->want_nulls:0), + (long)tl); + switch(tl) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + tlv_constr = BER_TLV_CONSTRUCTED(buf_ptr); + + ll = ber_fetch_length(tlv_constr, + (const char *)buf_ptr + tl,Left - tl,&tlv_len); + ASN_DEBUG("Got tag=%s, tc=%d, left=%ld, tl=%ld, len=%ld, ll=%ld", + ber_tlv_tag_string(tlv_tag), tlv_constr, + (long)Left, (long)tl, (long)tlv_len, (long)ll); + switch(ll) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + if(sel && sel->want_nulls + && ((const uint8_t *)buf_ptr)[0] == 0 + && ((const uint8_t *)buf_ptr)[1] == 0) + { + + ASN_DEBUG("Eat EOC; wn=%d--", sel->want_nulls); + + if(type_variant == ASN_OSUBV_ANY + && (tag_mode != 1 || sel->cont_level)) + APPEND("\0\0", 2); + + ADVANCE(2); + sel->got += 2; + if(sel->left != -1) { + sel->left -= 2; /* assert(sel->left >= 2) */ + } + + sel->want_nulls--; + if(sel->want_nulls == 0) { + /* Move to the next expectation */ + sel->left = 0; + tlv_constr = 1; + } + + continue; + } + + /* + * Set up expected tags, + * depending on ASN.1 type being decoded. + */ + switch(type_variant) { + case ASN_OSUBV_BIT: + /* X.690: 8.6.4.1, NOTE 2 */ + /* Fall through */ + case ASN_OSUBV_STR: + default: + if(sel) { + unsigned level = sel->cont_level; + if(level < td->all_tags_count) { + expected_tag = td->all_tags[level]; + break; + } else if(td->all_tags_count) { + expected_tag = td->all_tags + [td->all_tags_count - 1]; + break; + } + /* else, Fall through */ + } + /* Fall through */ + case ASN_OSUBV_ANY: + expected_tag = tlv_tag; + break; + } + + + if(tlv_tag != expected_tag) { + char buf[2][32]; + ber_tlv_tag_snprint(tlv_tag, + buf[0], sizeof(buf[0])); + ber_tlv_tag_snprint(td->tags[td->tags_count-1], + buf[1], sizeof(buf[1])); + ASN_DEBUG("Tag does not match expectation: %s != %s", + buf[0], buf[1]); + RETURN(RC_FAIL); + } + + tlvl = tl + ll; /* Combined length of T and L encoding */ + if((tlv_len + tlvl) < 0) { + /* tlv_len value is too big */ + ASN_DEBUG("TLV encoding + length (%ld) is too big", + (long)tlv_len); + RETURN(RC_FAIL); + } + + /* + * Append a new expectation. + */ + sel = OS__add_stack_el(stck); + if(!sel) RETURN(RC_FAIL); + + sel->tag = tlv_tag; + + sel->want_nulls = (tlv_len==-1); + if(sel->prev && sel->prev->left != -1) { + /* Check that the parent frame is big enough */ + if(sel->prev->left < tlvl + (tlv_len==-1?0:tlv_len)) + RETURN(RC_FAIL); + if(tlv_len == -1) + sel->left = sel->prev->left - tlvl; + else + sel->left = tlv_len; + } else { + sel->left = tlv_len; + } + if(type_variant == ASN_OSUBV_ANY + && (tag_mode != 1 || sel->cont_level)) + APPEND(buf_ptr, tlvl); + sel->got += tlvl; + ADVANCE(tlvl); + + ASN_DEBUG("+EXPECT2 got=%ld left=%ld, wn=%d, clvl=%u", + (long)sel->got, (long)sel->left, + sel->want_nulls, sel->cont_level); + + } while(tlv_constr); + if(sel == NULL) { + /* Finished operation, "phase out" */ + ASN_DEBUG("Phase out"); + _CH_PHASE(ctx, +3); + break; + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 2: + stck = (struct _stack *)ctx->ptr; + sel = stck->cur_ptr; + ASN_DEBUG("Phase 2: Need %ld bytes, size=%ld, alrg=%ld, wn=%d", + (long)sel->left, (long)size, (long)sel->got, + sel->want_nulls); + { + ber_tlv_len_t len; + + assert(sel->left >= 0); + + len = ((ber_tlv_len_t)size < sel->left) + ? (ber_tlv_len_t)size : sel->left; + if(len > 0) { + if(type_variant == ASN_OSUBV_BIT + && sel->bits_chopped == 0) { + /* Put the unused-bits-octet away */ + st->bits_unused = *(const uint8_t *)buf_ptr; + APPEND(((const char *)buf_ptr+1), (len - 1)); + sel->bits_chopped = 1; + } else { + APPEND(buf_ptr, len); + } + ADVANCE(len); + sel->left -= len; + sel->got += len; + } + + if(sel->left) { + ASN_DEBUG("OS left %ld, size = %ld, wn=%d\n", + (long)sel->left, (long)size, sel->want_nulls); + RETURN(RC_WMORE); + } + + PREV_PHASE(ctx); + goto phase1; + } + break; + case 3: + phase3: + /* + * Primitive form, no stack required. + */ + assert(ctx->left >= 0); + + if(size < (size_t)ctx->left) { + if(!size) RETURN(RC_WMORE); + if(type_variant == ASN_OSUBV_BIT && !ctx->context) { + st->bits_unused = *(const uint8_t *)buf_ptr; + ctx->left--; + ADVANCE(1); + } + APPEND(buf_ptr, size); + assert(ctx->context > 0); + ctx->left -= size; + ADVANCE(size); + RETURN(RC_WMORE); + } else { + if(type_variant == ASN_OSUBV_BIT + && !ctx->context && ctx->left) { + st->bits_unused = *(const uint8_t *)buf_ptr; + ctx->left--; + ADVANCE(1); + } + APPEND(buf_ptr, ctx->left); + ADVANCE(ctx->left); + ctx->left = 0; + + NEXT_PHASE(ctx); + } + break; + } + + if(sel) { + ASN_DEBUG("3sel p=%p, wn=%d, l=%ld, g=%ld, size=%ld", + (void *)sel->prev, sel->want_nulls, + (long)sel->left, (long)sel->got, (long)size); + if(sel->prev || sel->want_nulls > 1 || sel->left > 0) { + RETURN(RC_WMORE); + } + } + + /* + * BIT STRING-specific processing. + */ + if(type_variant == ASN_OSUBV_BIT) { + if(st->size) { + if(st->bits_unused < 0 || st->bits_unused > 7) { + RETURN(RC_FAIL); + } + /* Finalize BIT STRING: zero out unused bits. */ + st->buf[st->size-1] &= 0xff << st->bits_unused; + } else { + if(st->bits_unused) { + RETURN(RC_FAIL); + } + } + } + + ASN_DEBUG("Took %ld bytes to encode %s: [%s]:%ld", + (long)consumed_myself, td->name, + (type_variant == ASN_OSUBV_STR) ? (char *)st->buf : "", + (long)st->size); + + + RETURN(RC_OK); +} + +/* + * Encode OCTET STRING type using DER. + */ +asn_enc_rval_t +OCTET_STRING_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = { 0, 0, 0 }; + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + enum asn_OS_Subvariant type_variant = specs->subvariant; + int fix_last_byte = 0; + + ASN_DEBUG("%s %s as OCTET STRING", + cb?"Estimating":"Encoding", td->name); + + /* + * Write tags. + */ + if(type_variant != ASN_OSUBV_ANY || tag_mode == 1) { + er.encoded = der_write_tags(td, + (type_variant == ASN_OSUBV_BIT) + st->size, + tag_mode, type_variant == ASN_OSUBV_ANY, tag, + cb, app_key); + if(er.encoded == -1) { + er.failed_type = td; + er.structure_ptr = sptr; + return er; + } + } else { + /* Disallow: [] IMPLICIT ANY */ + assert(type_variant != ASN_OSUBV_ANY || tag_mode != -1); + er.encoded = 0; + } + + if(!cb) { + er.encoded += (type_variant == ASN_OSUBV_BIT) + st->size; + ASN__ENCODED_OK(er); + } + + /* + * Prepare to deal with the last octet of BIT STRING. + */ + if(type_variant == ASN_OSUBV_BIT) { + uint8_t b = st->bits_unused & 0x07; + if(b && st->size) fix_last_byte = 1; + ASN__CALLBACK(&b, 1); + } + + /* Invoke callback for the main part of the buffer */ + ASN__CALLBACK(st->buf, st->size - fix_last_byte); + + /* The last octet should be stripped off the unused bits */ + if(fix_last_byte) { + uint8_t b = st->buf[st->size-1] & (0xff << st->bits_unused); + ASN__CALLBACK(&b, 1); + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +asn_enc_rval_t +OCTET_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + char scratch[16 * 3 + 4]; + char *p = scratch; + uint8_t *buf; + uint8_t *end; + size_t i; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + /* + * Dump the contents of the buffer in hexadecimal. + */ + buf = st->buf; + end = buf + st->size; + if(flags & XER_F_CANONICAL) { + char *scend = scratch + (sizeof(scratch) - 2); + for(; buf < end; buf++) { + if(p >= scend) { + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + } + + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + } else { + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + ASN__CALLBACK(scratch, p-scratch); + p = scratch; + ASN__TEXT_INDENT(1, ilevel); + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + if(p - scratch) { + p--; /* Remove the tail space */ + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + if(st->size > 16) + ASN__TEXT_INDENT(1, ilevel-1); + } + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +static const struct OCTET_STRING__xer_escape_table_s { + const char *string; + int size; +} OCTET_STRING__xer_escape_table[] = { +#define OSXET(s) { s, sizeof(s) - 1 } + OSXET("\074\156\165\154\057\076"), /* */ + OSXET("\074\163\157\150\057\076"), /* */ + OSXET("\074\163\164\170\057\076"), /* */ + OSXET("\074\145\164\170\057\076"), /* */ + OSXET("\074\145\157\164\057\076"), /* */ + OSXET("\074\145\156\161\057\076"), /* */ + OSXET("\074\141\143\153\057\076"), /* */ + OSXET("\074\142\145\154\057\076"), /* */ + OSXET("\074\142\163\057\076"), /* */ + OSXET("\011"), /* \t */ + OSXET("\012"), /* \n */ + OSXET("\074\166\164\057\076"), /* */ + OSXET("\074\146\146\057\076"), /* */ + OSXET("\015"), /* \r */ + OSXET("\074\163\157\057\076"), /* */ + OSXET("\074\163\151\057\076"), /* */ + OSXET("\074\144\154\145\057\076"), /* */ + OSXET("\074\144\143\061\057\076"), /* */ + OSXET("\074\144\143\062\057\076"), /* */ + OSXET("\074\144\143\063\057\076"), /* */ + OSXET("\074\144\143\064\057\076"), /* */ + OSXET("\074\156\141\153\057\076"), /* */ + OSXET("\074\163\171\156\057\076"), /* */ + OSXET("\074\145\164\142\057\076"), /* */ + OSXET("\074\143\141\156\057\076"), /* */ + OSXET("\074\145\155\057\076"), /* */ + OSXET("\074\163\165\142\057\076"), /* */ + OSXET("\074\145\163\143\057\076"), /* */ + OSXET("\074\151\163\064\057\076"), /* */ + OSXET("\074\151\163\063\057\076"), /* */ + OSXET("\074\151\163\062\057\076"), /* */ + OSXET("\074\151\163\061\057\076"), /* */ + { 0, 0 }, /* " " */ + { 0, 0 }, /* ! */ + { 0, 0 }, /* \" */ + { 0, 0 }, /* # */ + { 0, 0 }, /* $ */ + { 0, 0 }, /* % */ + OSXET("\046\141\155\160\073"), /* & */ + { 0, 0 }, /* ' */ + {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* ()*+,-./ */ + {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* 01234567 */ + {0,0},{0,0},{0,0},{0,0}, /* 89:; */ + OSXET("\046\154\164\073"), /* < */ + { 0, 0 }, /* = */ + OSXET("\046\147\164\073"), /* > */ +}; + +static int +OS__check_escaped_control_char(const void *buf, int size) { + size_t i; + /* + * Inefficient algorithm which translates the escape sequences + * defined above into characters. Returns -1 if not found. + * TODO: replace by a faster algorithm (bsearch(), hash or + * nested table lookups). + */ + for(i = 0; i < 32 /* Don't spend time on the bottom half */; i++) { + const struct OCTET_STRING__xer_escape_table_s *el; + el = &OCTET_STRING__xer_escape_table[i]; + if(el->size == size && memcmp(buf, el->string, size) == 0) + return i; + } + return -1; +} + +static int +OCTET_STRING__handle_control_chars(void *struct_ptr, const void *chunk_buf, size_t chunk_size) { + /* + * This might be one of the escape sequences + * for control characters. Check it out. + * #11.15.5 + */ + int control_char = OS__check_escaped_control_char(chunk_buf,chunk_size); + if(control_char >= 0) { + OCTET_STRING_t *st = (OCTET_STRING_t *)struct_ptr; + void *p = REALLOC(st->buf, st->size + 2); + if(p) { + st->buf = (uint8_t *)p; + st->buf[st->size++] = control_char; + st->buf[st->size] = '\0'; /* nul-termination */ + return 0; + } + } + + return -1; /* No, it's not */ +} + +asn_enc_rval_t +OCTET_STRING_encode_xer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + uint8_t *buf, *end; + uint8_t *ss; /* Sequence start */ + ssize_t encoded_len = 0; + + (void)ilevel; /* Unused argument */ + (void)flags; /* Unused argument */ + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + buf = st->buf; + end = buf + st->size; + for(ss = buf; buf < end; buf++) { + unsigned int ch = *buf; + int s_len; /* Special encoding sequence length */ + + /* + * Escape certain characters: X.680/11.15 + */ + if(ch < sizeof(OCTET_STRING__xer_escape_table) + /sizeof(OCTET_STRING__xer_escape_table[0]) + && (s_len = OCTET_STRING__xer_escape_table[ch].size)) { + if(((buf - ss) && cb(ss, buf - ss, app_key) < 0) + || cb(OCTET_STRING__xer_escape_table[ch].string, s_len, + app_key) < 0) + ASN__ENCODE_FAILED; + encoded_len += (buf - ss) + s_len; + ss = buf + 1; + } + } + + encoded_len += (buf - ss); + if((buf - ss) && cb(ss, buf - ss, app_key) < 0) + ASN__ENCODE_FAILED; + + er.encoded = encoded_len; + ASN__ENCODED_OK(er); +} + +/* + * Convert from hexadecimal format (cstring): "AB CD EF" + */ +static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const char *chunk_stop = (const char *)chunk_buf; + const char *p = chunk_stop; + const char *pend = p + chunk_size; + unsigned int clv = 0; + int half = 0; /* Half bit */ + uint8_t *buf; + + /* Reallocate buffer according to high cap estimation */ + size_t new_size = st->size + (chunk_size + 1) / 2; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + /* + * If something like " a b c " appears here, the " a b":3 will be + * converted, and the rest skipped. That is, unless buf_size is greater + * than chunk_size, then it'll be equivalent to "ABC0". + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + switch(ch) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* Ignore whitespace */ + continue; + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ + clv = (clv << 4) + (ch - 0x30); + break; + case 0x41: case 0x42: case 0x43: /* ABC */ + case 0x44: case 0x45: case 0x46: /* DEF */ + clv = (clv << 4) + (ch - 0x41 + 10); + break; + case 0x61: case 0x62: case 0x63: /* abc */ + case 0x64: case 0x65: case 0x66: /* def */ + clv = (clv << 4) + (ch - 0x61 + 10); + break; + default: + *buf = 0; /* JIC */ + return -1; + } + if(half++) { + half = 0; + *buf++ = clv; + chunk_stop = p + 1; + } + } + + /* + * Check partial decoding. + */ + if(half) { + if(have_more) { + /* + * Partial specification is fine, + * because no more more PXER_TEXT data is available. + */ + *buf++ = clv << 4; + chunk_stop = p; + } + } else { + chunk_stop = p; + } + + st->size = buf - st->buf; /* Adjust the buffer size */ + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return (chunk_stop - (const char *)chunk_buf); /* Converted size */ +} + +/* + * Convert from binary format: "00101011101" + */ +static ssize_t OCTET_STRING__convert_binary(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { + BIT_STRING_t *st = (BIT_STRING_t *)sptr; + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + int bits_unused = st->bits_unused & 0x7; + uint8_t *buf; + + /* Reallocate buffer according to high cap estimation */ + size_t new_size = st->size + (chunk_size + 7) / 8; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + (void)have_more; + + if(bits_unused == 0) + bits_unused = 8; + else if(st->size) + buf--; + + /* + * Convert series of 0 and 1 into the octet string. + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + switch(ch) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* Ignore whitespace */ + break; + case 0x30: + case 0x31: + if(bits_unused-- <= 0) { + *++buf = 0; /* Clean the cell */ + bits_unused = 7; + } + *buf |= (ch&1) << bits_unused; + break; + default: + st->bits_unused = bits_unused; + return -1; + } + } + + if(bits_unused == 8) { + st->size = buf - st->buf; + st->bits_unused = 0; + } else { + st->size = buf - st->buf + 1; + st->bits_unused = bits_unused; + } + + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return chunk_size; /* Converted in full */ +} + +/* + * Something like strtod(), but with stricter rules. + */ +static int +OS__strtoent(int base, const char *buf, const char *end, int32_t *ret_value) { + const int32_t last_unicode_codepoint = 0x10ffff; + int32_t val = 0; + const char *p; + + for(p = buf; p < end; p++) { + int ch = *p; + + switch(ch) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ + val = val * base + (ch - 0x30); + break; + case 0x41: case 0x42: case 0x43: /* ABC */ + case 0x44: case 0x45: case 0x46: /* DEF */ + val = val * base + (ch - 0x41 + 10); + break; + case 0x61: case 0x62: case 0x63: /* abc */ + case 0x64: case 0x65: case 0x66: /* def */ + val = val * base + (ch - 0x61 + 10); + break; + case 0x3b: /* ';' */ + *ret_value = val; + return (p - buf) + 1; + default: + return -1; /* Character set error */ + } + + /* Value exceeds the Unicode range. */ + if(val > last_unicode_codepoint) { + return -1; + } + } + + *ret_value = -1; + return (p - buf); +} + +/* + * Convert from the plain UTF-8 format, expanding entity references: "2 < 3" + */ +static ssize_t +OCTET_STRING__convert_entrefs(void *sptr, const void *chunk_buf, + size_t chunk_size, int have_more) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + uint8_t *buf; + + /* Reallocate buffer */ + size_t new_size = st->size + chunk_size; + void *nptr = REALLOC(st->buf, new_size + 1); + if(!nptr) return -1; + st->buf = (uint8_t *)nptr; + buf = st->buf + st->size; + + /* + * Convert series of 0 and 1 into the octet string. + */ + for(; p < pend; p++) { + int ch = *(const unsigned char *)p; + int len; /* Length of the rest of the chunk */ + + if(ch != 0x26 /* '&' */) { + *buf++ = ch; + continue; /* That was easy... */ + } + + /* + * Process entity reference. + */ + len = chunk_size - (p - (const char *)chunk_buf); + if(len == 1 /* "&" */) goto want_more; + if(p[1] == 0x23 /* '#' */) { + const char *pval; /* Pointer to start of digits */ + int32_t val = 0; /* Entity reference value */ + int base; + + if(len == 2 /* "&#" */) goto want_more; + if(p[2] == 0x78 /* 'x' */) + pval = p + 3, base = 16; + else + pval = p + 2, base = 10; + len = OS__strtoent(base, pval, p + len, &val); + if(len == -1) { + /* Invalid charset. Just copy verbatim. */ + *buf++ = ch; + continue; + } + if(!len || pval[len-1] != 0x3b) goto want_more; + assert(val > 0); + p += (pval - p) + len - 1; /* Advance past entref */ + + if(val < 0x80) { + *buf++ = (char)val; + } else if(val < 0x800) { + *buf++ = 0xc0 | ((val >> 6)); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x10000) { + *buf++ = 0xe0 | ((val >> 12)); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x200000) { + *buf++ = 0xf0 | ((val >> 18)); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else if(val < 0x4000000) { + *buf++ = 0xf8 | ((val >> 24)); + *buf++ = 0x80 | ((val >> 18) & 0x3f); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } else { + *buf++ = 0xfc | ((val >> 30) & 0x1); + *buf++ = 0x80 | ((val >> 24) & 0x3f); + *buf++ = 0x80 | ((val >> 18) & 0x3f); + *buf++ = 0x80 | ((val >> 12) & 0x3f); + *buf++ = 0x80 | ((val >> 6) & 0x3f); + *buf++ = 0x80 | ((val & 0x3f)); + } + } else { + /* + * Ugly, limited parsing of & > < + */ + char *sc = (char *)memchr(p, 0x3b, len > 5 ? 5 : len); + if(!sc) goto want_more; + if((sc - p) == 4 + && p[1] == 0x61 /* 'a' */ + && p[2] == 0x6d /* 'm' */ + && p[3] == 0x70 /* 'p' */) { + *buf++ = 0x26; + p = sc; + continue; + } + if((sc - p) == 3) { + if(p[1] == 0x6c) { + *buf = 0x3c; /* '<' */ + } else if(p[1] == 0x67) { + *buf = 0x3e; /* '>' */ + } else { + /* Unsupported entity reference */ + *buf++ = ch; + continue; + } + if(p[2] != 0x74) { + /* Unsupported entity reference */ + *buf++ = ch; + continue; + } + buf++; + p = sc; + continue; + } + /* Unsupported entity reference */ + *buf++ = ch; + } + + continue; + want_more: + if(have_more) { + /* + * We know that no more data (of the same type) + * is coming. Copy the rest verbatim. + */ + *buf++ = ch; + continue; + } + chunk_size = (p - (const char *)chunk_buf); + /* Processing stalled: need more data */ + break; + } + + st->size = buf - st->buf; + assert(st->size <= new_size); + st->buf[st->size] = 0; /* Courtesy termination */ + + return chunk_size; /* Converted in full */ +} + +/* + * Decode OCTET STRING from the XML element's body. + */ +static asn_dec_rval_t +OCTET_STRING__decode_xer( + const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, + void **sptr, const char *opt_mname, const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder)(void *struct_ptr, const void *chunk_buf, + size_t chunk_size), + ssize_t (*body_receiver)(void *struct_ptr, const void *chunk_buf, + size_t chunk_size, int have_more)) { + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + asn_struct_ctx_t *ctx; /* Per-structure parser context */ + asn_dec_rval_t rval; /* Return value from the decoder */ + int st_allocated; + + /* + * Create the string if does not exist. + */ + if(!st) { + st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); + *sptr = (void *)st; + if(!st) goto sta_failed; + st_allocated = 1; + } else { + st_allocated = 0; + } + if(!st->buf) { + /* This is separate from above section */ + st->buf = (uint8_t *)CALLOC(1, 1); + if(!st->buf) { + if(st_allocated) { + *sptr = 0; + goto stb_failed; + } else { + goto sta_failed; + } + } + } + + /* Restore parsing context */ + ctx = (asn_struct_ctx_t *)(((char *)*sptr) + specs->ctx_offset); + + return xer_decode_general(opt_codec_ctx, ctx, *sptr, xml_tag, + buf_ptr, size, opt_unexpected_tag_decoder, body_receiver); + +stb_failed: + FREEMEM(st); +sta_failed: + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; +} + +/* + * Decode OCTET STRING from the hexadecimal data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_hex(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, 0, OCTET_STRING__convert_hexadecimal); +} + +/* + * Decode OCTET STRING from the binary (0/1) data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_binary(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, 0, OCTET_STRING__convert_binary); +} + +/* + * Decode OCTET STRING from the string (ASCII/UTF-8) data. + */ +asn_dec_rval_t +OCTET_STRING_decode_xer_utf8(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, + size_t size) { + return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, + buf_ptr, size, + OCTET_STRING__handle_control_chars, + OCTET_STRING__convert_entrefs); +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +static int +OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf, + size_t units, unsigned int bpc, unsigned int unit_bits, + long lb, long ub, const asn_per_constraints_t *pc) { + uint8_t *end = buf + units * bpc; + + ASN_DEBUG("Expanding %d characters into (%ld..%ld):%d", + (int)units, lb, ub, unit_bits); + + /* X.691: 27.5.4 */ + if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { + /* Decode without translation */ + lb = 0; + } else if(pc && pc->code2value) { + if(unit_bits > 16) + return 1; /* FATAL: can't have constrained + * UniversalString with more than + * 16 million code points */ + for(; buf < end; buf += bpc) { + int value; + int code = per_get_few_bits(po, unit_bits); + if(code < 0) return -1; /* WMORE */ + value = pc->code2value(code); + if(value < 0) { + ASN_DEBUG("Code %d (0x%02x) is" + " not in map (%ld..%ld)", + code, code, lb, ub); + return 1; /* FATAL */ + } + switch(bpc) { + case 1: *buf = value; break; + case 2: buf[0] = value >> 8; buf[1] = value; break; + case 4: buf[0] = value >> 24; buf[1] = value >> 16; + buf[2] = value >> 8; buf[3] = value; break; + } + } + return 0; + } + + /* Shortcut the no-op copying to the aligned structure */ + if(lb == 0 && (unit_bits == 8 * bpc)) { + return per_get_many_bits(po, buf, 0, unit_bits * units); + } + + for(; buf < end; buf += bpc) { + int32_t code = per_get_few_bits(po, unit_bits); + int32_t ch = code + lb; + if(code < 0) return -1; /* WMORE */ + if(ch > ub) { + ASN_DEBUG("Code %d is out of range (%ld..%ld)", + ch, lb, ub); + return 1; /* FATAL */ + } + switch(bpc) { + case 1: *buf = ch; break; + case 2: buf[0] = ch >> 8; buf[1] = ch; break; + case 4: buf[0] = ch >> 24; buf[1] = ch >> 16; + buf[2] = ch >> 8; buf[3] = ch; break; + } + } + + return 0; +} + +static int +OCTET_STRING_per_put_characters(asn_per_outp_t *po, const uint8_t *buf, + size_t units, unsigned int bpc, unsigned int unit_bits, + long lb, long ub, const asn_per_constraints_t *pc) { + const uint8_t *end = buf + units * bpc; + + ASN_DEBUG("Squeezing %d characters into (%ld..%ld):%d (%d bpc)", + (int)units, lb, ub, unit_bits, bpc); + + /* X.691: 27.5.4 */ + if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { + /* Encode as is */ + lb = 0; + } else if(pc && pc->value2code) { + for(; buf < end; buf += bpc) { + int code; + uint32_t value; + switch(bpc) { + case 1: value = *(const uint8_t *)buf; break; + case 2: value = (buf[0] << 8) | buf[1]; break; + case 4: value = (buf[0] << 24) | (buf[1] << 16) + | (buf[2] << 8) | buf[3]; break; + default: return -1; + } + code = pc->value2code(value); + if(code < 0) { + ASN_DEBUG("Character %d (0x%02x) is" + " not in map (%ld..%ld)", + *buf, *buf, lb, ub); + return -1; + } + if(per_put_few_bits(po, code, unit_bits)) + return -1; + } + } + + /* Shortcut the no-op copying to the aligned structure */ + if(lb == 0 && (unit_bits == 8 * bpc)) { + return per_put_many_bits(po, buf, unit_bits * units); + } + + for(ub -= lb; buf < end; buf += bpc) { + int ch; + uint32_t value; + switch(bpc) { + case 1: + value = *(const uint8_t *)buf; + break; + case 2: + value = (buf[0] << 8) | buf[1]; + break; + case 4: + value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; + break; + default: + return -1; + } + ch = value - lb; + if(ch < 0 || ch > ub) { + ASN_DEBUG("Character %d (0x%02x) is out of range (%ld..%ld)", *buf, + value, lb, ub + lb); + return -1; + } + if(per_put_few_bits(po, ch, unit_bits)) return -1; + } + + return 0; +} + +static asn_per_constraints_t asn_DEF_OCTET_STRING_constraints = { + { APC_CONSTRAINED, 8, 8, 0, 255 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, + 0, 0 +}; + +asn_dec_rval_t +OCTET_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = + constraints ? constraints : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + enum { + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + + (void)opt_codec_ctx; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + case ASN_OSUBV_BIT: + ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); + RETURN(RC_FAIL); + break; + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_CHAR; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + break; + } + + /* + * Allocate the string. + */ + if(!st) { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + if(bpc) { + st->size = csiz->upper_bound * bpc; + } else { + st->size = (csiz->upper_bound + 7) >> 3; + } + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + if(bpc) { + ASN_DEBUG("Encoding OCTET STRING size %ld", + csiz->upper_bound); + ret = OCTET_STRING_per_get_characters(pd, st->buf, + csiz->upper_bound, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ASN_DEBUG("Encoding BIT STRING size %ld", + csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, + unit_bits * csiz->upper_bound); + } + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += unit_bits * csiz->upper_bound; + st->buf[st->size] = 0; + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + void *p; + int ret; + + /* Get the PER length */ + raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, + &repeat); + if(raw_len < 0) RETURN(RC_WMORE); + if(raw_len == 0 && st->buf) break; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + len_bytes = raw_len * bpc; + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + ret = OCTET_STRING_per_get_characters(pd, &st->buf[st->size], raw_len, + bpc, unit_bits, cval->lower_bound, + cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +OCTET_STRING_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + size_t size_in_units; + const uint8_t *buf; + int ret; + enum { + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + case ASN_OSUBV_BIT: + ASN__ENCODE_FAILED; + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_CHAR; + size_in_units = st->size; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + size_in_units = st->size >> 1; + if(st->size & 1) { + ASN_DEBUG("%s string size is not modulo 2", td->name); + ASN__ENCODE_FAILED; + } + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + size_in_units = st->size >> 2; + if(st->size & 3) { + ASN_DEBUG("%s string size is not modulo 4", td->name); + ASN__ENCODE_FAILED; + } + break; + } + + ASN_DEBUG("Encoding %s into %" ASN_PRI_SIZE " units of %d bits" + " (%ld..%ld, effective %d)%s", + td->name, size_in_units, unit_bits, + csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out whether size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((ssize_t)size_in_units < csiz->lower_bound + || (ssize_t)size_in_units > csiz->upper_bound) { + if(ct_extensible) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + inext = 1; + } else { + ASN__ENCODE_FAILED; + } + } + } else { + inext = 0; + } + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + if(csiz->effective_bits >= 0 && !inext) { + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes (%ld), length in %d bits", st->size, + size_in_units - csiz->lower_bound, csiz->effective_bits); + ret = per_put_few_bits(po, size_in_units - csiz->lower_bound, + csiz->effective_bits); + if(ret) ASN__ENCODE_FAILED; + ret = OCTET_STRING_per_put_characters(po, st->buf, size_in_units, bpc, + unit_bits, cval->lower_bound, + cval->upper_bound, pc); + if(ret) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); + + buf = st->buf; + ASN_DEBUG("Encoding %" ASN_PRI_SIZE " in units", size_in_units); + do { + int need_eom = 0; + ssize_t may_save = uper_put_length(po, size_in_units, &need_eom); + if(may_save < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "%s", may_save, size_in_units, + need_eom ? ",+EOM" : ""); + + ret = OCTET_STRING_per_put_characters(po, buf, may_save, bpc, unit_bits, + cval->lower_bound, + cval->upper_bound, pc); + if(ret) ASN__ENCODE_FAILED; + + buf += may_save * bpc; + size_in_units -= may_save; + assert(!(may_save & 0x07) || !size_in_units); + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size_in_units); + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + asn_dec_rval_t rval = { RC_OK, 0 }; + BIT_STRING_t *st = (BIT_STRING_t *)*sptr; + ssize_t consumed_myself = 0; + int repeat; + enum { + OS__BPC_BIT = 0, + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + + (void)opt_codec_ctx; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + + switch(specs->subvariant) { + default: +/* case ASN_OSUBV_ANY: + ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); + RETURN(RC_FAIL); +*/ + case ASN_OSUBV_BIT: + canonical_unit_bits = unit_bits = 1; + bpc = OS__BPC_BIT; + break; + case ASN_OSUBV_ANY: + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; +/* if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; +*/ + bpc = OS__BPC_CHAR; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + break; + } + + /* + * Allocate the string. + */ + if(!st) { + st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) RETURN(RC_FAIL); + } + + ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); + + if(csiz->flags & APC_EXTENSIBLE) { + int inext = per_get_few_bits(pd, 1); + if(inext < 0) RETURN(RC_WMORE); + if(inext) { + csiz = &asn_DEF_OCTET_STRING_constraints.size; + cval = &asn_DEF_OCTET_STRING_constraints.value; + unit_bits = canonical_unit_bits; + } + } + + if(csiz->effective_bits >= 0) { + FREEMEM(st->buf); + if(bpc) { + st->size = csiz->upper_bound * bpc; + } else { + st->size = (csiz->upper_bound + 7) >> 3; + } + st->buf = (uint8_t *)MALLOC(st->size + 1); + if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits == 0) { + int ret; + if (st->size > 2) { /* X.691 #16 NOTE 1 */ + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + if(bpc) { + ASN_DEBUG("Decoding OCTET STRING size %ld", + csiz->upper_bound); + ret = OCTET_STRING_per_get_characters(pd, st->buf, + csiz->upper_bound, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ASN_DEBUG("Decoding BIT STRING size %ld", + csiz->upper_bound); + ret = per_get_many_bits(pd, st->buf, 0, + unit_bits * csiz->upper_bound); + } + if(ret < 0) RETURN(RC_WMORE); + consumed_myself += unit_bits * csiz->upper_bound; + st->buf[st->size] = 0; + if(bpc == 0) { + int ubs = (csiz->upper_bound & 0x7); + st->bits_unused = ubs ? 8 - ubs : 0; + } + RETURN(RC_OK); + } + + st->size = 0; + do { + ssize_t raw_len; + ssize_t len_bytes; + ssize_t len_bits; + void *p; + int ret; + + /* Get the PER length */ + if (csiz->upper_bound - csiz->lower_bound == 0) + /* Indefinite length case */ + raw_len = aper_get_length(pd, -1, csiz->effective_bits, &repeat); + else + raw_len = aper_get_length(pd, csiz->upper_bound - csiz->lower_bound + 1, csiz->effective_bits, &repeat); + repeat = 0; + if(raw_len < 0) RETURN(RC_WMORE); + raw_len += csiz->lower_bound; + + ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", + (long)csiz->effective_bits, (long)raw_len, + repeat ? "repeat" : "once", td->name); + + if ((st->size > 2) || (csiz->lower_bound != csiz->upper_bound)) { /* X.691 #16.11 */ + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + + if(bpc) { + len_bytes = raw_len * bpc; + len_bits = len_bytes * unit_bits; + } else { + len_bits = raw_len; + len_bytes = (len_bits + 7) >> 3; + if(len_bits & 0x7) + st->bits_unused = 8 - (len_bits & 0x7); + /* len_bits be multiple of 16K if repeat is set */ + } + p = REALLOC(st->buf, st->size + len_bytes + 1); + if(!p) RETURN(RC_FAIL); + st->buf = (uint8_t *)p; + + if(bpc) { + ret = OCTET_STRING_per_get_characters(pd, + &st->buf[st->size], raw_len, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + if(ret > 0) RETURN(RC_FAIL); + } else { + ret = per_get_many_bits(pd, &st->buf[st->size], + 0, len_bits); + } + if(ret < 0) RETURN(RC_WMORE); + st->size += len_bytes; + } while(repeat); + st->buf[st->size] = 0; /* nul-terminate */ + + return rval; +} + +asn_enc_rval_t +OCTET_STRING_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const asn_per_constraints_t *pc = constraints ? constraints + : td->encoding_constraints.per_constraints; + const asn_per_constraint_t *cval; + const asn_per_constraint_t *csiz; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + asn_enc_rval_t er = { 0, 0, 0 }; + int inext = 0; /* Lies not within extension root */ + unsigned int unit_bits; + unsigned int canonical_unit_bits; + unsigned int sizeinunits; + const uint8_t *buf; + int ret; + enum { + OS__BPC_BIT = 0, + OS__BPC_CHAR = 1, + OS__BPC_U16 = 2, + OS__BPC_U32 = 4 + } bpc; /* Bytes per character */ + int ct_extensible; + + if(!st || (!st->buf && st->size)) + ASN__ENCODE_FAILED; + + if(pc) { + cval = &pc->value; + csiz = &pc->size; + } else { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + } + ct_extensible = csiz->flags & APC_EXTENSIBLE; + + switch(specs->subvariant) { + default: + /* case ASN_OSUBV_ANY: + ASN__ENCODE_FAILED; + */ + case ASN_OSUBV_BIT: + canonical_unit_bits = unit_bits = 1; + bpc = OS__BPC_BIT; + sizeinunits = st->size * 8 - (st->bits_unused & 0x07); + ASN_DEBUG("BIT STRING of %d bytes", + sizeinunits); + break; + case ASN_OSUBV_ANY: + case ASN_OSUBV_STR: + canonical_unit_bits = unit_bits = 8; +/* if(cval->flags & APC_CONSTRAINED) + unit_bits = 8; +*/ + bpc = OS__BPC_CHAR; + sizeinunits = st->size; + break; + case ASN_OSUBV_U16: + canonical_unit_bits = unit_bits = 16; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U16; + sizeinunits = st->size / 2; + break; + case ASN_OSUBV_U32: + canonical_unit_bits = unit_bits = 32; + if(cval->flags & APC_CONSTRAINED) + unit_bits = cval->range_bits; + bpc = OS__BPC_U32; + sizeinunits = st->size / 4; + break; + } + + ASN_DEBUG("Encoding %s into %d units of %d bits" + " (%ld..%ld, effective %d)%s", + td->name, sizeinunits, unit_bits, + csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, ct_extensible ? " EXT" : ""); + + /* Figure out wheter size lies within PER visible constraint */ + + if(csiz->effective_bits >= 0) { + if((int)sizeinunits < csiz->lower_bound + || (int)sizeinunits > csiz->upper_bound) { + if(ct_extensible) { + cval = &asn_DEF_OCTET_STRING_constraints.value; + csiz = &asn_DEF_OCTET_STRING_constraints.size; + unit_bits = canonical_unit_bits; + inext = 1; + } else + ASN__ENCODE_FAILED; + } + } else { + inext = 0; + } + + + if(ct_extensible) { + /* Declare whether length is [not] within extension root */ + if(per_put_few_bits(po, inext, 1)) + ASN__ENCODE_FAILED; + } + + /* X.691, #16.5: zero-length encoding */ + /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ + /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ + if(csiz->effective_bits >= 0) { + ASN_DEBUG("Encoding %lu bytes (%ld), length in %d bits", + st->size, sizeinunits - csiz->lower_bound, + csiz->effective_bits); + if (csiz->effective_bits > 0) { + ret = aper_put_length(po, csiz->upper_bound - csiz->lower_bound + 1, sizeinunits - csiz->lower_bound); + if(ret) ASN__ENCODE_FAILED; + } + /* EB MOD + AFAIU if lb != ub it is aligned whatever the number of bits */ + if ((st->size > 2) || (csiz->lower_bound != csiz->upper_bound)) { /* X.691 #16.11 */ + if (aper_put_align(po) < 0) + ASN__ENCODE_FAILED; + } + if(bpc) { + ret = OCTET_STRING_per_put_characters(po, st->buf, + sizeinunits, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + } else { + ret = per_put_many_bits(po, st->buf, + sizeinunits * unit_bits); + } + if(ret) ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + ASN_DEBUG("Encoding %lu bytes", st->size); + + if(sizeinunits == 0) { + if(aper_put_length(po, -1, 0)) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + buf = st->buf; + while(sizeinunits) { + ssize_t maySave = aper_put_length(po, -1, sizeinunits); + + if(maySave < 0) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %ld of %ld", + (long)maySave, (long)sizeinunits); + + if(bpc) { + ret = OCTET_STRING_per_put_characters(po, buf, + maySave, bpc, unit_bits, + cval->lower_bound, cval->upper_bound, pc); + } else { + ret = per_put_many_bits(po, buf, maySave * unit_bits); + } + if(ret) ASN__ENCODE_FAILED; + + if(bpc) + buf += maySave * bpc; + else + buf += maySave >> 3; + sizeinunits -= maySave; + assert(!(maySave & 0x07) || !sizeinunits); + } + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +int +OCTET_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + const char * const h2c = "0123456789ABCDEF"; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + char scratch[16 * 3 + 4]; + char *p = scratch; + uint8_t *buf; + uint8_t *end; + size_t i; + + (void)td; /* Unused argument */ + + if(!st || (!st->buf && st->size)) + return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* + * Dump the contents of the buffer in hexadecimal. + */ + buf = st->buf; + end = buf + st->size; + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + _i_INDENT(1); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + *p++ = 0x20; + } + + if(p > scratch) { + p--; /* Remove the tail space */ + if(cb(scratch, p - scratch, app_key) < 0) + return -1; + } + + return 0; +} + +int +OCTET_STRING_print_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, + void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(st && (st->buf || !st->size)) { + return (cb(st->buf, st->size, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, + enum asn_struct_free_method method) { + OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; + const asn_OCTET_STRING_specifics_t *specs; + asn_struct_ctx_t *ctx; + struct _stack *stck; + + if(!td || !st) + return; + + specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + ASN_DEBUG("Freeing %s as OCTET STRING", td->name); + + if(st->buf) { + FREEMEM(st->buf); + st->buf = 0; + } + + /* + * Remove decode-time stack. + */ + stck = (struct _stack *)ctx->ptr; + if(stck) { + while(stck->tail) { + struct _stack_el *sel = stck->tail; + stck->tail = sel->prev; + FREEMEM(sel); + } + FREEMEM(stck); + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(sptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(sptr, 0, + td->specifics + ? ((const asn_OCTET_STRING_specifics_t *)(td->specifics)) + ->struct_size + : sizeof(OCTET_STRING_t)); + break; + } +} + +/* + * Conversion routines. + */ +int +OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) { + void *buf; + + if(st == 0 || (str == 0 && len)) { + errno = EINVAL; + return -1; + } + + /* + * Clear the OCTET STRING. + */ + if(str == NULL) { + FREEMEM(st->buf); + st->buf = 0; + st->size = 0; + return 0; + } + + /* Determine the original string size, if not explicitly given */ + if(len < 0) + len = strlen(str); + + /* Allocate and fill the memory */ + buf = MALLOC(len + 1); + if(buf == NULL) + return -1; + + memcpy(buf, str, len); + ((uint8_t *)buf)[len] = '\0'; /* Couldn't use memcpy(len+1)! */ + FREEMEM(st->buf); + st->buf = (uint8_t *)buf; + st->size = len; + + return 0; +} + +OCTET_STRING_t * +OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, const char *str, + int len) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + OCTET_STRING_t *st; + + st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); + if(st && str && OCTET_STRING_fromBuf(st, str, len)) { + FREEMEM(st); + st = NULL; + } + + return st; +} + +/* + * Lexicographically compare the common prefix of both strings, + * and if it is the same return -1 for the smallest string. + */ +int +OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics; + const OCTET_STRING_t *a = aptr; + const OCTET_STRING_t *b = bptr; + + assert(!specs || specs->subvariant != ASN_OSUBV_BIT); + + if(a && b) { + size_t common_prefix_size = a->size <= b->size ? a->size : b->size; + int ret = memcmp(a->buf, b->buf, common_prefix_size); + if(ret == 0) { + /* Figure out which string with equal prefixes is longer. */ + if(a->size < b->size) { + return -1; + } else if(a->size > b->size) { + return 1; + } else { + return 0; + } + } else { + return ret < 0 ? -1 : 1; + } + } else if(!a && !b) { + return 0; + } else if(!a) { + return -1; + } else { + return 1; + } + +} + +/* + * Biased function for randomizing character values around their limits. + */ +static uint32_t +OCTET_STRING__random_char(unsigned long lb, unsigned long ub) { + assert(lb <= ub); + switch(asn_random_between(0, 16)) { + case 0: + if(lb < ub) return lb + 1; + /* Fall through */ + case 1: + return lb; + case 2: + if(lb < ub) return ub - 1; + /* Fall through */ + case 3: + return ub; + default: + return asn_random_between(lb, ub); + } +} + + +size_t +OCTET_STRING_random_length_constrained( + const asn_TYPE_descriptor_t *td, + const asn_encoding_constraints_t *constraints, size_t max_length) { + const unsigned lengths[] = {0, 1, 2, 3, 4, 8, + 126, 127, 128, 16383, 16384, 16385, + 65534, 65535, 65536, 65537}; + size_t rnd_len; + + /* Figure out how far we should go */ + rnd_len = lengths[asn_random_between( + 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->size; + if(pc->flags & APC_CONSTRAINED) { + long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length + ? pc->upper_bound + : (ssize_t)max_length; + if(max_length <= (size_t)pc->lower_bound) { + return pc->lower_bound; + } + if(pc->flags & APC_EXTENSIBLE) { + switch(asn_random_between(0, 5)) { + case 0: + if(pc->lower_bound > 0) { + rnd_len = pc->lower_bound - 1; + break; + } + /* Fall through */ + case 1: + rnd_len = pc->upper_bound + 1; + break; + case 2: + /* Keep rnd_len from the table */ + if(rnd_len <= max_length) { + break; + } + /* Fall through */ + default: + rnd_len = asn_random_between(pc->lower_bound, + suggested_upper_bound); + } + } else { + rnd_len = + asn_random_between(pc->lower_bound, suggested_upper_bound); + } + } else { + rnd_len = asn_random_between(0, max_length); + } + } else if(rnd_len > max_length) { + rnd_len = asn_random_between(0, max_length); + } + + return rnd_len; +} + +asn_random_fill_result_t +OCTET_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_OCTET_STRING_specifics_t *specs = td->specifics + ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + unsigned int unit_bytes = 1; + unsigned long clb = 0; /* Lower bound on char */ + unsigned long cub = 255; /* Higher bound on char value */ + uint8_t *buf; + uint8_t *bend; + uint8_t *b; + size_t rnd_len; + OCTET_STRING_t *st; + + if(max_length == 0 && !*sptr) return result_skipped; + + switch(specs->subvariant) { + default: + case ASN_OSUBV_ANY: + return result_failed; + case ASN_OSUBV_BIT: + /* Handled by BIT_STRING itself. */ + return result_failed; + case ASN_OSUBV_STR: + unit_bytes = 1; + clb = 0; + cub = 255; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + clb = 0; + cub = 65535; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + clb = 0; + cub = 0x10FFFF; + break; + } + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->value; + if(pc->flags & APC_SEMI_CONSTRAINED) { + clb = pc->lower_bound; + } else if(pc->flags & APC_CONSTRAINED) { + clb = pc->lower_bound; + cub = pc->upper_bound; + } + } + + rnd_len = + OCTET_STRING_random_length_constrained(td, constraints, max_length); + + buf = CALLOC(unit_bytes, rnd_len + 1); + if(!buf) return result_failed; + + bend = &buf[unit_bytes * rnd_len]; + + switch(unit_bytes) { + case 1: + for(b = buf; b < bend; b += unit_bytes) { + *(uint8_t *)b = OCTET_STRING__random_char(clb, cub); + } + *(uint8_t *)b = 0; + break; + case 2: + for(b = buf; b < bend; b += unit_bytes) { + uint32_t code = OCTET_STRING__random_char(clb, cub); + b[0] = code >> 8; + b[1] = code; + } + *(uint16_t *)b = 0; + break; + case 4: + for(b = buf; b < bend; b += unit_bytes) { + uint32_t code = OCTET_STRING__random_char(clb, cub); + b[0] = code >> 24; + b[1] = code >> 16; + b[2] = code >> 8; + b[3] = code; + } + *(uint32_t *)b = 0; + break; + } + + if(*sptr) { + st = *sptr; + FREEMEM(st->buf); + } else { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) { + FREEMEM(buf); + return result_failed; + } + } + + st->buf = buf; + st->size = unit_bytes * rnd_len; + + result_ok.length = st->size; + return result_ok; +} diff --git a/Bouncer/e2sm_rc/lib/OCTET_STRING_oer.c b/Bouncer/e2sm_rc/lib/OCTET_STRING_oer.c new file mode 100644 index 0000000..c16faea --- /dev/null +++ b/Bouncer/e2sm_rc/lib/OCTET_STRING_oer.c @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +asn_dec_rval_t +OCTET_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + + size_t unit_bytes; + switch(specs->subvariant) { + default: + case ASN_OSUBV_BIT: + ASN_DEBUG("Invalid use of OCTET STRING to decode BIT STRING"); + ASN__DECODE_FAILED; + case ASN_OSUBV_ANY: + /* Fall through */ + case ASN_OSUBV_STR: + unit_bytes = 1; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + break; + } + + (void)opt_codec_ctx; + + if(!st) { + st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); + if(!st) ASN__DECODE_FAILED; + } + + if(ct_size >= 0) { + expected_length = unit_bytes * ct_size; + } else { + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + rval.consumed = len_len; + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(expected_length % unit_bytes != 0) { + ASN_DEBUG( + "Data size %" ASN_PRI_SIZE " bytes is not consistent with multiplier %" ASN_PRI_SIZE "", + expected_length, unit_bytes); + ASN__DECODE_FAILED; + } + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + + rval.consumed += expected_length; + return rval; + } +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +OCTET_STRING_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_OCTET_STRING_specifics_t *specs = + td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_SPC_OCTET_STRING_specs; + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + const asn_oer_constraints_t *cts = + constraints ? constraints : td->encoding_constraints.oer_constraints; + ssize_t ct_size = cts ? cts->size : -1; + asn_enc_rval_t er = {0, 0, 0}; + + if(!st) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s %" ASN_PRI_SIZE " as OCTET STRING", td ? td->name : "", st->size); + + if(ct_size >= 0) { + /* + * Check that available data matches the constraint + */ + size_t unit_bytes; + switch(specs->subvariant) { + default: + case ASN_OSUBV_BIT: + ASN_DEBUG("Invalid use of OCTET STRING to encode BIT STRING"); + ASN__ENCODE_FAILED; + case ASN_OSUBV_ANY: + /* Fall through */ + case ASN_OSUBV_STR: + unit_bytes = 1; + break; + case ASN_OSUBV_U16: + unit_bytes = 2; + break; + case ASN_OSUBV_U32: + unit_bytes = 4; + break; + } + + if(st->size != unit_bytes * (size_t)ct_size) { + ASN_DEBUG( + "Trying to encode %s (%" ASN_PRI_SIZE " bytes) which doesn't fit SIZE " + "constraint (%" ASN_PRI_SIZE ")", + td->name, st->size, ct_size); + ASN__ENCODE_FAILED; + } + } else { + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + ssize_t ret = oer_serialize_length(st->size, cb, app_key); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += ret; + } + + er.encoded += st->size; + if(cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/OPEN_TYPE.c b/Bouncer/e2sm_rc/lib/OPEN_TYPE.c new file mode 100644 index 0000000..a54e99c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/OPEN_TYPE.c @@ -0,0 +1,509 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include +#include + +asn_TYPE_operation_t asn_OP_OPEN_TYPE = { + OPEN_TYPE_free, + OPEN_TYPE_print, + OPEN_TYPE_compare, + OPEN_TYPE_decode_ber, + OPEN_TYPE_encode_der, + OPEN_TYPE_decode_xer, + OPEN_TYPE_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, 0, /* No OER support, use "-gen-OER" to enable */ +#else + OPEN_TYPE_decode_oer, + OPEN_TYPE_encode_oer, +#endif +#ifdef ASN_DISABLE_PER_SUPPORT + 0, 0, 0, 0, +#else + OPEN_TYPE_decode_uper, + OPEN_TYPE_encode_uper, + OPEN_TYPE_decode_aper, + OPEN_TYPE_encode_aper, +#endif + 0, /* Random fill is not supported for open type */ + 0 /* Use generic outmost tag fetcher */ +}; + +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +asn_dec_rval_t +OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, const void *ptr, size_t size) { + size_t consumed_myself = 0; + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + ASN_DEBUG("presence %d\n", selected.presence_index); + + rv = selected.type_descriptor->op->ber_decoder( + opt_codec_ctx, selected.type_descriptor, &inner_value, ptr, size, + elm->tag_mode); + ADVANCE(rv.consumed); + rv.consumed = 0; + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + rv.code = RC_OK; + rv.consumed = consumed_myself; + return rv; + } else { + /* Oh, now a full-blown failure failure */ + } + /* Fall through */ + case RC_FAIL: + rv.consumed = consumed_myself; + /* Fall through */ + case RC_WMORE: + break; + } + + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + return rv; +} + +asn_dec_rval_t +OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, const void *ptr, size_t size) { + size_t consumed_myself = 0; + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + int xer_context = 0; + ssize_t ch_size; + pxer_chunk_type_e ch_type; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + assert(elm->flags == ATF_OPEN_TYPE); + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) + != 0) { + ASN__DECODE_FAILED; + } + } + + /* + * Confirm wrapper. + */ + for(;;) { + ch_size = xer_next_token(&xer_context, ptr, size, &ch_type); + if(ch_size < 0) { + ASN__DECODE_FAILED; + } else { + switch(ch_type) { + case PXER_WMORE: + ASN__DECODE_STARVED; + case PXER_COMMENT: + case PXER_TEXT: + ADVANCE(ch_size); + continue; + case PXER_TAG: + break; + } + break; + } + } + + /* + * Wrapper value confirmed. + */ + switch(xer_check_tag(ptr, ch_size, elm->name)) { + case XCT_OPENING: + ADVANCE(ch_size); + break; + case XCT_BROKEN: + default: + ASN__DECODE_FAILED; + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + rv = selected.type_descriptor->op->xer_decoder( + opt_codec_ctx, selected.type_descriptor, &inner_value, NULL, ptr, size); + ADVANCE(rv.consumed); + rv.consumed = 0; + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + break; + } else { + rv.code = RC_FAIL; + } + /* Fall through */ + case RC_FAIL: + /* Point to a best position where failure occurred */ + rv.consumed = consumed_myself; + /* Fall through */ + case RC_WMORE: + /* Wrt. rv.consumed==0: + * In case a genuine RC_WMORE, the whole Open Type decoding + * will have to be restarted. + */ + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + return rv; + } + + /* + * Finalize wrapper. + */ + for(;;) { + ch_size = xer_next_token(&xer_context, ptr, size, &ch_type); + if(ch_size < 0) { + ASN__DECODE_FAILED; + } else { + switch(ch_type) { + case PXER_WMORE: + ASN__DECODE_STARVED; + case PXER_COMMENT: + case PXER_TEXT: + ADVANCE(ch_size); + continue; + case PXER_TAG: + break; + } + break; + } + } + + /* + * Wrapper value confirmed. + */ + switch(xer_check_tag(ptr, ch_size, elm->name)) { + case XCT_CLOSING: + ADVANCE(ch_size); + break; + case XCT_BROKEN: + default: + ASN__DECODE_FAILED; + } + + rv.consumed += consumed_myself; + + return rv; +} + + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, asn_per_data_t *pd) { + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + assert(elm->flags == ATF_OPEN_TYPE); + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) + != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + rv = uper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, + &inner_value, pd); + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + break; + } else { + rv.code = RC_FAIL; + } + /* Fall through */ + case RC_WMORE: + case RC_FAIL: + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + } + return rv; +} + +asn_enc_rval_t +OPEN_TYPE_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const void *memb_ptr; /* Pointer to the member */ + asn_TYPE_member_t *elm; /* CHOICE's element */ + asn_enc_rval_t er = {0,0,0}; + unsigned present; + + (void)constraints; + + present = CHOICE_variant_get_presence(td, sptr); + if(present == 0 || present > td->elements_count) { + ASN__ENCODE_FAILED; + } else { + present--; + } + + ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present); + + elm = &td->elements[present]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(uper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) { + ASN__ENCODE_FAILED; + } + + er.encoded = 0; + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + const asn_TYPE_member_t *elm, asn_per_data_t *pd) { + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + assert(elm->flags == ATF_OPEN_TYPE); + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) + != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, + &inner_value, pd); + switch(rv.code) { + case RC_OK: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + break; + } else { + rv.code = RC_FAIL; + } + /* Fall through */ + case RC_WMORE: + case RC_FAIL: + if(*memb_ptr2) { + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_RESET(*selected.type_descriptor, + inner_value); + } + } + } + return rv; +} + +asn_enc_rval_t +OPEN_TYPE_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const void *memb_ptr; /* Pointer to the member */ + asn_TYPE_member_t *elm; /* CHOICE's element */ + asn_enc_rval_t er = {0,0,0}; + unsigned present; + + (void)constraints; + + present = CHOICE_variant_get_presence(td, sptr); + if(present == 0 || present > td->elements_count) { + ASN__ENCODE_FAILED; + } else { + present--; + } + + ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present); + + elm = &td->elements[present]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(aper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) { + ASN__ENCODE_FAILED; + } + + er.encoded = 0; + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/OPEN_TYPE_oer.c b/Bouncer/e2sm_rc/lib/OPEN_TYPE_oer.c new file mode 100644 index 0000000..dd2f5c6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/OPEN_TYPE_oer.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +asn_dec_rval_t +OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void *sptr, + asn_TYPE_member_t *elm, const void *ptr, size_t size) { + asn_type_selector_result_t selected; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *inner_value; + asn_dec_rval_t rv; + size_t ot_ret; + + + if(!(elm->flags & ATF_OPEN_TYPE)) { + ASN__DECODE_FAILED; + } + + if(!elm->type_selector) { + ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", + td->name, elm->name, elm->type->name); + ASN__DECODE_FAILED; + } + + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + ASN__DECODE_FAILED; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); + } else { + memb_ptr = (char *)sptr + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + if(*memb_ptr2 != NULL) { + /* Make sure we reset the structure first before encoding */ + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { + ASN__DECODE_FAILED; + } + } + + inner_value = + (char *)*memb_ptr2 + + elm->type->elements[selected.presence_index - 1].memb_offset; + + ot_ret = oer_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, + &inner_value, ptr, size); + switch(ot_ret) { + default: + if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, + selected.presence_index) + == 0) { + rv.code = RC_OK; + rv.consumed = ot_ret; + return rv; + } else { + /* Oh, now a full-blown failure failure */ + } + /* Fall through */ + case -1: + rv.code = RC_FAIL; + rv.consumed = ot_ret; + break; + case 0: + rv.code = RC_WMORE; + rv.consumed = 0; + break; + } + + if(*memb_ptr2) { + const asn_CHOICE_specifics_t *specs = + selected.type_descriptor->specifics; + if(elm->flags & ATF_POINTER) { + ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); + *memb_ptr2 = NULL; + } else { + ASN_STRUCT_FREE_CONTENTS_ONLY(*selected.type_descriptor, + inner_value); + memset(*memb_ptr2, 0, specs->struct_size); + } + } + return rv; +} diff --git a/Bouncer/e2sm_rc/lib/PLMNIdentity.c b/Bouncer/e2sm_rc/lib/PLMNIdentity.c new file mode 100644 index 0000000..25f381d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/PLMNIdentity.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "PLMNIdentity.h" + +int +PLMNIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_PLMNIdentity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +asn_per_constraints_t asn_PER_type_PLMNIdentity_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_PLMNIdentity_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_PLMNIdentity = { + "PLMNIdentity", + "PLMNIdentity", + &asn_OP_OCTET_STRING, + asn_DEF_PLMNIdentity_tags_1, + sizeof(asn_DEF_PLMNIdentity_tags_1) + /sizeof(asn_DEF_PLMNIdentity_tags_1[0]), /* 1 */ + asn_DEF_PLMNIdentity_tags_1, /* Same as above */ + sizeof(asn_DEF_PLMNIdentity_tags_1) + /sizeof(asn_DEF_PLMNIdentity_tags_1[0]), /* 1 */ + { &asn_OER_type_PLMNIdentity_constr_1, &asn_PER_type_PLMNIdentity_constr_1, PLMNIdentity_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/PolicyAction-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/PolicyAction-RANParameter-Item.c new file mode 100644 index 0000000..595a98a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/PolicyAction-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "PolicyAction-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_PolicyAction_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PolicyAction_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct PolicyAction_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct PolicyAction_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_PolicyAction_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_PolicyAction_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_PolicyAction_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_PolicyAction_RANParameter_Item_specs_1 = { + sizeof(struct PolicyAction_RANParameter_Item), + offsetof(struct PolicyAction_RANParameter_Item, _asn_ctx), + asn_MAP_PolicyAction_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_PolicyAction_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_PolicyAction_RANParameter_Item = { + "PolicyAction-RANParameter-Item", + "PolicyAction-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_PolicyAction_RANParameter_Item_tags_1, + sizeof(asn_DEF_PolicyAction_RANParameter_Item_tags_1) + /sizeof(asn_DEF_PolicyAction_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_PolicyAction_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_PolicyAction_RANParameter_Item_tags_1) + /sizeof(asn_DEF_PolicyAction_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_PolicyAction_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_PolicyAction_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/PolicyCondition-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/PolicyCondition-RANParameter-Item.c new file mode 100644 index 0000000..36ff4a6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/PolicyCondition-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "PolicyCondition-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_PolicyCondition_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct PolicyCondition_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct PolicyCondition_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct PolicyCondition_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_PolicyCondition_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_PolicyCondition_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_PolicyCondition_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_PolicyCondition_RANParameter_Item_specs_1 = { + sizeof(struct PolicyCondition_RANParameter_Item), + offsetof(struct PolicyCondition_RANParameter_Item, _asn_ctx), + asn_MAP_PolicyCondition_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_PolicyCondition_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_PolicyCondition_RANParameter_Item = { + "PolicyCondition-RANParameter-Item", + "PolicyCondition-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_PolicyCondition_RANParameter_Item_tags_1, + sizeof(asn_DEF_PolicyCondition_RANParameter_Item_tags_1) + /sizeof(asn_DEF_PolicyCondition_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_PolicyCondition_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_PolicyCondition_RANParameter_Item_tags_1) + /sizeof(asn_DEF_PolicyCondition_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_PolicyCondition_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_PolicyCondition_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/PrintableString.c b/Bouncer/e2sm_rc/lib/PrintableString.c new file mode 100644 index 0000000..8fc3939 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/PrintableString.c @@ -0,0 +1,130 @@ +/*- + * Copyright (c) 2003, 2004, 2006 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * ASN.1:1984 (X.409) + */ +static const int _PrintableString_alphabet[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int _PrintableString_code2value[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122}; + +/* + * PrintableString basic type description. + */ +static const ber_tlv_tag_t asn_DEF_PrintableString_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), /* [UNIVERSAL 19] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ +}; +static int asn_DEF_PrintableString_v2c(unsigned int value) { + return _PrintableString_alphabet[value > 255 ? 0 : value] - 1; +} +static int asn_DEF_PrintableString_c2v(unsigned int code) { + if(code < 74) + return _PrintableString_code2value[code]; + return -1; +} +static asn_per_constraints_t asn_DEF_PrintableString_per_constraints = { + { APC_CONSTRAINED, 4, 4, 0x20, 0x39 }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + asn_DEF_PrintableString_v2c, + asn_DEF_PrintableString_c2v +}; +asn_TYPE_operation_t asn_OP_PrintableString = { + OCTET_STRING_free, + OCTET_STRING_print_utf8, /* ASCII subset */ + OCTET_STRING_compare, + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + OCTET_STRING_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_PrintableString = { + "PrintableString", + "PrintableString", + &asn_OP_PrintableString, + asn_DEF_PrintableString_tags, + sizeof(asn_DEF_PrintableString_tags) + / sizeof(asn_DEF_PrintableString_tags[0]) - 1, + asn_DEF_PrintableString_tags, + sizeof(asn_DEF_PrintableString_tags) + / sizeof(asn_DEF_PrintableString_tags[0]), + { 0, &asn_DEF_PrintableString_per_constraints, PrintableString_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +int +PrintableString_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, + void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + + if(st && st->buf) { + uint8_t *buf = st->buf; + uint8_t *end = buf + st->size; + + /* + * Check the alphabet of the PrintableString. + * ASN.1:1984 (X.409) + */ + for(; buf < end; buf++) { + if(!_PrintableString_alphabet[*buf]) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value byte %ld (%d) " + "not in PrintableString alphabet " + "(%s:%d)", + td->name, + (long)((buf - st->buf) + 1), + *buf, + __FILE__, __LINE__); + return -1; + } + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + return 0; +} diff --git a/Bouncer/e2sm_rc/lib/QCI.c b/Bouncer/e2sm_rc/lib/QCI.c new file mode 100644 index 0000000..83c0f6a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/QCI.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "QCI.h" + +int +QCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 255)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_QCI_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +asn_per_constraints_t asn_PER_type_QCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_QCI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_QCI = { + "QCI", + "QCI", + &asn_OP_NativeInteger, + asn_DEF_QCI_tags_1, + sizeof(asn_DEF_QCI_tags_1) + /sizeof(asn_DEF_QCI_tags_1[0]), /* 1 */ + asn_DEF_QCI_tags_1, /* Same as above */ + sizeof(asn_DEF_QCI_tags_1) + /sizeof(asn_DEF_QCI_tags_1[0]), /* 1 */ + { &asn_OER_type_QCI_constr_1, &asn_PER_type_QCI_constr_1, QCI_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/QoSID.c b/Bouncer/e2sm_rc/lib/QoSID.c new file mode 100644 index 0000000..1824502 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/QoSID.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "QoSID.h" + +static asn_oer_constraints_t asn_OER_type_QoSID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_QoSID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_QoSID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct QoSID, choice.fiveGC), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_FiveQI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fiveGC" + }, + { ATF_NOFLAGS, 0, offsetof(struct QoSID, choice.ePC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_QCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ePC" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_QoSID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveGC */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ePC */ +}; +static asn_CHOICE_specifics_t asn_SPC_QoSID_specs_1 = { + sizeof(struct QoSID), + offsetof(struct QoSID, _asn_ctx), + offsetof(struct QoSID, present), + sizeof(((struct QoSID *)0)->present), + asn_MAP_QoSID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_QoSID = { + "QoSID", + "QoSID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_QoSID_constr_1, &asn_PER_type_QoSID_constr_1, CHOICE_constraint }, + asn_MBR_QoSID_1, + 2, /* Elements count */ + &asn_SPC_QoSID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/QosFlowIdentifier.c b/Bouncer/e2sm_rc/lib/QosFlowIdentifier.c new file mode 100644 index 0000000..b857bde --- /dev/null +++ b/Bouncer/e2sm_rc/lib/QosFlowIdentifier.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "QosFlowIdentifier.h" + +int +QosFlowIdentifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0 && value <= 63)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_QosFlowIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_QosFlowIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 6, 6, 0, 63 } /* (0..63,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_QosFlowIdentifier_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_QosFlowIdentifier = { + "QosFlowIdentifier", + "QosFlowIdentifier", + &asn_OP_NativeInteger, + asn_DEF_QosFlowIdentifier_tags_1, + sizeof(asn_DEF_QosFlowIdentifier_tags_1) + /sizeof(asn_DEF_QosFlowIdentifier_tags_1[0]), /* 1 */ + asn_DEF_QosFlowIdentifier_tags_1, /* Same as above */ + sizeof(asn_DEF_QosFlowIdentifier_tags_1) + /sizeof(asn_DEF_QosFlowIdentifier_tags_1[0]), /* 1 */ + { &asn_OER_type_QosFlowIdentifier_constr_1, &asn_PER_type_QosFlowIdentifier_constr_1, QosFlowIdentifier_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RAN-CallProcess-ID.c b/Bouncer/e2sm_rc/lib/RAN-CallProcess-ID.c new file mode 100644 index 0000000..da5de1a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RAN-CallProcess-ID.c @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RAN-CallProcess-ID.h" + +int +RAN_CallProcess_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value >= 1 && value <= 4294967295)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RAN_CallProcess_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RAN_CallProcess_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, 1, 4294967295 } /* (1..4294967295,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_RAN_CallProcess_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_RAN_CallProcess_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RAN_CallProcess_ID = { + "RAN-CallProcess-ID", + "RAN-CallProcess-ID", + &asn_OP_NativeInteger, + asn_DEF_RAN_CallProcess_ID_tags_1, + sizeof(asn_DEF_RAN_CallProcess_ID_tags_1) + /sizeof(asn_DEF_RAN_CallProcess_ID_tags_1[0]), /* 1 */ + asn_DEF_RAN_CallProcess_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RAN_CallProcess_ID_tags_1) + /sizeof(asn_DEF_RAN_CallProcess_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RAN_CallProcess_ID_constr_1, &asn_PER_type_RAN_CallProcess_ID_constr_1, RAN_CallProcess_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_RAN_CallProcess_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Action-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Action-Item.c new file mode 100644 index 0000000..9642010 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Action-Item.c @@ -0,0 +1,152 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Control-Action-Item.h" + +#include "ControlAction-RANParameter-Item.h" +static int +memb_ran_ControlActionParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ran_ControlActionParameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_ControlActionParameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_ControlActionParameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_ControlActionParameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ran_ControlActionParameters_List_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ControlAction_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_ControlActionParameters_List_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_ControlActionParameters_List_specs_4 = { + sizeof(struct RANFunctionDefinition_Control_Action_Item__ran_ControlActionParameters_List), + offsetof(struct RANFunctionDefinition_Control_Action_Item__ran_ControlActionParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_ControlActionParameters_List_4 = { + "ran-ControlActionParameters-List", + "ran-ControlActionParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_ControlActionParameters_List_tags_4, + sizeof(asn_DEF_ran_ControlActionParameters_List_tags_4) + /sizeof(asn_DEF_ran_ControlActionParameters_List_tags_4[0]) - 1, /* 1 */ + asn_DEF_ran_ControlActionParameters_List_tags_4, /* Same as above */ + sizeof(asn_DEF_ran_ControlActionParameters_List_tags_4) + /sizeof(asn_DEF_ran_ControlActionParameters_List_tags_4[0]), /* 2 */ + { &asn_OER_type_ran_ControlActionParameters_List_constr_4, &asn_PER_type_ran_ControlActionParameters_List_constr_4, SEQUENCE_OF_constraint }, + asn_MBR_ran_ControlActionParameters_List_4, + 1, /* Single element */ + &asn_SPC_ran_ControlActionParameters_List_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Control_Action_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Action_Item, ric_ControlAction_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlAction-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Action_Item, ric_ControlAction_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlAction-Name" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Control_Action_Item, ran_ControlActionParameters_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_ran_ControlActionParameters_List_4, + 0, + { &asn_OER_memb_ran_ControlActionParameters_List_constr_4, &asn_PER_memb_ran_ControlActionParameters_List_constr_4, memb_ran_ControlActionParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-ControlActionParameters-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_Control_Action_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Control_Action_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ControlAction-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-ControlAction-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ran-ControlActionParameters-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Control_Action_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_Control_Action_Item), + offsetof(struct RANFunctionDefinition_Control_Action_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_Control_Action_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_Control_Action_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Control_Action_Item = { + "RANFunctionDefinition-Control-Action-Item", + "RANFunctionDefinition-Control-Action-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Control_Action_Item_1, + 3, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Control_Action_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Item.c new file mode 100644 index 0000000..cbd170b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control-Item.c @@ -0,0 +1,282 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Control-Item.h" + +#include "RANFunctionDefinition-Control-Action-Item.h" +#include "ControlOutcome-RANParameter-Item.h" +static int +memb_ric_ControlAction_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ran_ControlOutcomeParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 255)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_ControlAction_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ric_ControlAction_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ran_ControlOutcomeParameters_List_constr_10 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..255)) */}; +static asn_per_constraints_t asn_PER_type_ran_ControlOutcomeParameters_List_constr_10 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_ControlAction_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ControlAction_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_ControlOutcomeParameters_List_constr_10 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..255)) */}; +static asn_per_constraints_t asn_PER_memb_ran_ControlOutcomeParameters_List_constr_10 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_ControlAction_List_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_Control_Action_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlAction_List_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ControlAction_List_specs_4 = { + sizeof(struct RANFunctionDefinition_Control_Item__ric_ControlAction_List), + offsetof(struct RANFunctionDefinition_Control_Item__ric_ControlAction_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlAction_List_4 = { + "ric-ControlAction-List", + "ric-ControlAction-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ControlAction_List_tags_4, + sizeof(asn_DEF_ric_ControlAction_List_tags_4) + /sizeof(asn_DEF_ric_ControlAction_List_tags_4[0]) - 1, /* 1 */ + asn_DEF_ric_ControlAction_List_tags_4, /* Same as above */ + sizeof(asn_DEF_ric_ControlAction_List_tags_4) + /sizeof(asn_DEF_ric_ControlAction_List_tags_4[0]), /* 2 */ + { &asn_OER_type_ric_ControlAction_List_constr_4, &asn_PER_type_ric_ControlAction_List_constr_4, SEQUENCE_OF_constraint }, + asn_MBR_ric_ControlAction_List_4, + 1, /* Single element */ + &asn_SPC_ric_ControlAction_List_specs_4 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ran_ControlOutcomeParameters_List_10[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ControlOutcome_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_ControlOutcomeParameters_List_tags_10[] = { + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_ControlOutcomeParameters_List_specs_10 = { + sizeof(struct RANFunctionDefinition_Control_Item__ran_ControlOutcomeParameters_List), + offsetof(struct RANFunctionDefinition_Control_Item__ran_ControlOutcomeParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_ControlOutcomeParameters_List_10 = { + "ran-ControlOutcomeParameters-List", + "ran-ControlOutcomeParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_ControlOutcomeParameters_List_tags_10, + sizeof(asn_DEF_ran_ControlOutcomeParameters_List_tags_10) + /sizeof(asn_DEF_ran_ControlOutcomeParameters_List_tags_10[0]) - 1, /* 1 */ + asn_DEF_ran_ControlOutcomeParameters_List_tags_10, /* Same as above */ + sizeof(asn_DEF_ran_ControlOutcomeParameters_List_tags_10) + /sizeof(asn_DEF_ran_ControlOutcomeParameters_List_tags_10[0]), /* 2 */ + { &asn_OER_type_ran_ControlOutcomeParameters_List_constr_10, &asn_PER_type_ran_ControlOutcomeParameters_List_constr_10, SEQUENCE_OF_constraint }, + asn_MBR_ran_ControlOutcomeParameters_List_10, + 1, /* Single element */ + &asn_SPC_ran_ControlOutcomeParameters_List_specs_10 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Control_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Item, ric_ControlStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Item, ric_ControlStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlStyle-Name" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Control_Item, ric_ControlAction_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_ric_ControlAction_List_4, + 0, + { &asn_OER_memb_ric_ControlAction_List_constr_4, &asn_PER_memb_ric_ControlAction_List_constr_4, memb_ric_ControlAction_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ControlAction-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Item, ric_ControlHeaderFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlHeaderFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Item, ric_ControlMessageFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlMessageFormat-Type" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Control_Item, ric_CallProcessIDFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-CallProcessIDFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Item, ric_ControlOutcomeFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ControlOutcomeFormat-Type" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Control_Item, ran_ControlOutcomeParameters_List), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + 0, + &asn_DEF_ran_ControlOutcomeParameters_List_10, + 0, + { &asn_OER_memb_ran_ControlOutcomeParameters_List_constr_10, &asn_PER_memb_ran_ControlOutcomeParameters_List_constr_10, memb_ran_ControlOutcomeParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-ControlOutcomeParameters-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_Control_Item_oms_1[] = { 2, 5, 7 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Control_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Control_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ControlStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-ControlStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-ControlAction-List */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ric-ControlHeaderFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ric-ControlMessageFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* ric-CallProcessIDFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* ric-ControlOutcomeFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* ran-ControlOutcomeParameters-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Control_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_Control_Item), + offsetof(struct RANFunctionDefinition_Control_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_Control_Item_tag2el_1, + 8, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_Control_Item_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + 8, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Control_Item = { + "RANFunctionDefinition-Control-Item", + "RANFunctionDefinition-Control-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Control_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Control_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Control_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Control_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Control_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Control_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Control_Item_1, + 8, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Control_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control.c new file mode 100644 index 0000000..69eb461 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Control.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Control.h" + +#include "RANFunctionDefinition-Control-Item.h" +static int +memb_ric_ControlStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ControlStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_ControlStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_Control_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ControlStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ControlStyle_List_specs_2 = { + sizeof(struct RANFunctionDefinition_Control__ric_ControlStyle_List), + offsetof(struct RANFunctionDefinition_Control__ric_ControlStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ControlStyle_List_2 = { + "ric-ControlStyle-List", + "ric-ControlStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ControlStyle_List_tags_2, + sizeof(asn_DEF_ric_ControlStyle_List_tags_2) + /sizeof(asn_DEF_ric_ControlStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_ControlStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_ControlStyle_List_tags_2) + /sizeof(asn_DEF_ric_ControlStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_ControlStyle_List_constr_2, &asn_PER_type_ric_ControlStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_ControlStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_ControlStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Control_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control, ric_ControlStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_ControlStyle_List_2, + 0, + { &asn_OER_memb_ric_ControlStyle_List_constr_2, &asn_PER_memb_ric_ControlStyle_List_constr_2, memb_ric_ControlStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ControlStyle-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Control_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Control_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-ControlStyle-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Control_specs_1 = { + sizeof(struct RANFunctionDefinition_Control), + offsetof(struct RANFunctionDefinition_Control, _asn_ctx), + asn_MAP_RANFunctionDefinition_Control_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Control = { + "RANFunctionDefinition-Control", + "RANFunctionDefinition-Control", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Control_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Control_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Control_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Control_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Control_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Control_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Control_1, + 1, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Control_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Breakpoint-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Breakpoint-Item.c new file mode 100644 index 0000000..245b8b7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Breakpoint-Item.c @@ -0,0 +1,152 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-EventTrigger-Breakpoint-Item.h" + +#include "CallProcessBreakpoint-RANParameter-Item.h" +static int +memb_ran_CallProcessBreakpointParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ran_CallProcessBreakpointParameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_CallProcessBreakpointParameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_CallProcessBreakpointParameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_CallProcessBreakpointParameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ran_CallProcessBreakpointParameters_List_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CallProcessBreakpoint_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_CallProcessBreakpointParameters_List_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_CallProcessBreakpointParameters_List_specs_4 = { + sizeof(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item__ran_CallProcessBreakpointParameters_List), + offsetof(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item__ran_CallProcessBreakpointParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_CallProcessBreakpointParameters_List_4 = { + "ran-CallProcessBreakpointParameters-List", + "ran-CallProcessBreakpointParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_CallProcessBreakpointParameters_List_tags_4, + sizeof(asn_DEF_ran_CallProcessBreakpointParameters_List_tags_4) + /sizeof(asn_DEF_ran_CallProcessBreakpointParameters_List_tags_4[0]) - 1, /* 1 */ + asn_DEF_ran_CallProcessBreakpointParameters_List_tags_4, /* Same as above */ + sizeof(asn_DEF_ran_CallProcessBreakpointParameters_List_tags_4) + /sizeof(asn_DEF_ran_CallProcessBreakpointParameters_List_tags_4[0]), /* 2 */ + { &asn_OER_type_ran_CallProcessBreakpointParameters_List_constr_4, &asn_PER_type_ran_CallProcessBreakpointParameters_List_constr_4, SEQUENCE_OF_constraint }, + asn_MBR_ran_CallProcessBreakpointParameters_List_4, + 1, /* Single element */ + &asn_SPC_ran_CallProcessBreakpointParameters_List_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_Breakpoint_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item, callProcessBreakpoint_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_CallProcessBreakpoint_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "callProcessBreakpoint-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item, callProcessBreakpoint_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_CallProcessBreakpoint_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "callProcessBreakpoint-Name" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item, ran_CallProcessBreakpointParameters_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_ran_CallProcessBreakpointParameters_List_4, + 0, + { &asn_OER_memb_ran_CallProcessBreakpointParameters_List_constr_4, &asn_PER_memb_ran_CallProcessBreakpointParameters_List_constr_4, memb_ran_CallProcessBreakpointParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-CallProcessBreakpointParameters-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_EventTrigger_Breakpoint_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* callProcessBreakpoint-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* callProcessBreakpoint-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ran-CallProcessBreakpointParameters-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_Breakpoint_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item), + offsetof(struct RANFunctionDefinition_EventTrigger_Breakpoint_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_EventTrigger_Breakpoint_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item = { + "RANFunctionDefinition-EventTrigger-Breakpoint-Item", + "RANFunctionDefinition-EventTrigger-Breakpoint-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_EventTrigger_Breakpoint_Item_1, + 3, /* Elements count */ + &asn_SPC_RANFunctionDefinition_EventTrigger_Breakpoint_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-CallProcess-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-CallProcess-Item.c new file mode 100644 index 0000000..c4490bb --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-CallProcess-Item.c @@ -0,0 +1,150 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-EventTrigger-CallProcess-Item.h" + +#include "RANFunctionDefinition-EventTrigger-Breakpoint-Item.h" +static int +memb_callProcessBreakpoints_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_callProcessBreakpoints_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_callProcessBreakpoints_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_callProcessBreakpoints_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_callProcessBreakpoints_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_callProcessBreakpoints_List_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_EventTrigger_Breakpoint_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_callProcessBreakpoints_List_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_callProcessBreakpoints_List_specs_4 = { + sizeof(struct RANFunctionDefinition_EventTrigger_CallProcess_Item__callProcessBreakpoints_List), + offsetof(struct RANFunctionDefinition_EventTrigger_CallProcess_Item__callProcessBreakpoints_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_callProcessBreakpoints_List_4 = { + "callProcessBreakpoints-List", + "callProcessBreakpoints-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_callProcessBreakpoints_List_tags_4, + sizeof(asn_DEF_callProcessBreakpoints_List_tags_4) + /sizeof(asn_DEF_callProcessBreakpoints_List_tags_4[0]) - 1, /* 1 */ + asn_DEF_callProcessBreakpoints_List_tags_4, /* Same as above */ + sizeof(asn_DEF_callProcessBreakpoints_List_tags_4) + /sizeof(asn_DEF_callProcessBreakpoints_List_tags_4[0]), /* 2 */ + { &asn_OER_type_callProcessBreakpoints_List_constr_4, &asn_PER_type_callProcessBreakpoints_List_constr_4, SEQUENCE_OF_constraint }, + asn_MBR_callProcessBreakpoints_List_4, + 1, /* Single element */ + &asn_SPC_callProcessBreakpoints_List_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_CallProcess_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_CallProcess_Item, callProcessType_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_CallProcessType_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "callProcessType-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_CallProcess_Item, callProcessType_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_CallProcessType_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "callProcessType-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_CallProcess_Item, callProcessBreakpoints_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_callProcessBreakpoints_List_4, + 0, + { &asn_OER_memb_callProcessBreakpoints_List_constr_4, &asn_PER_memb_callProcessBreakpoints_List_constr_4, memb_callProcessBreakpoints_List_constraint_1 }, + 0, 0, /* No default value */ + "callProcessBreakpoints-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_EventTrigger_CallProcess_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* callProcessType-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* callProcessType-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* callProcessBreakpoints-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_CallProcess_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_EventTrigger_CallProcess_Item), + offsetof(struct RANFunctionDefinition_EventTrigger_CallProcess_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_EventTrigger_CallProcess_Item_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item = { + "RANFunctionDefinition-EventTrigger-CallProcess-Item", + "RANFunctionDefinition-EventTrigger-CallProcess-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_EventTrigger_CallProcess_Item_1, + 3, /* Elements count */ + &asn_SPC_RANFunctionDefinition_EventTrigger_CallProcess_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Style-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Style-Item.c new file mode 100644 index 0000000..d1da3e6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger-Style-Item.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-EventTrigger-Style-Item.h" + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_Style_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_Style_Item, ric_EventTriggerStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_Style_Item, ric_EventTriggerStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger_Style_Item, ric_EventTriggerFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-EventTriggerFormat-Type" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_EventTrigger_Style_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-EventTriggerStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-EventTriggerStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ric-EventTriggerFormat-Type */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_Style_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_EventTrigger_Style_Item), + offsetof(struct RANFunctionDefinition_EventTrigger_Style_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_EventTrigger_Style_Item_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item = { + "RANFunctionDefinition-EventTrigger-Style-Item", + "RANFunctionDefinition-EventTrigger-Style-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_EventTrigger_Style_Item_1, + 3, /* Elements count */ + &asn_SPC_RANFunctionDefinition_EventTrigger_Style_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger.c new file mode 100644 index 0000000..0b139f9 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-EventTrigger.c @@ -0,0 +1,492 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-EventTrigger.h" + +#include "RANFunctionDefinition-EventTrigger-Style-Item.h" +#include "L2Parameters-RANParameter-Item.h" +#include "RANFunctionDefinition-EventTrigger-CallProcess-Item.h" +#include "UEIdentification-RANParameter-Item.h" +#include "CellIdentification-RANParameter-Item.h" +static int +memb_ric_EventTriggerStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ran_L2Parameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ran_CallProcessTypes_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ran_UEIdentificationParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ran_CellIdentificationParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_EventTriggerStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_EventTriggerStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ran_L2Parameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_L2Parameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ran_CallProcessTypes_List_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_CallProcessTypes_List_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ran_UEIdentificationParameters_List_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_UEIdentificationParameters_List_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ran_CellIdentificationParameters_List_constr_10 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_CellIdentificationParameters_List_constr_10 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_EventTriggerStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_EventTriggerStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_L2Parameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_L2Parameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_CallProcessTypes_List_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_CallProcessTypes_List_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_UEIdentificationParameters_List_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_UEIdentificationParameters_List_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_CellIdentificationParameters_List_constr_10 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_CellIdentificationParameters_List_constr_10 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_EventTriggerStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_EventTrigger_Style_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_EventTriggerStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_EventTriggerStyle_List_specs_2 = { + sizeof(struct RANFunctionDefinition_EventTrigger__ric_EventTriggerStyle_List), + offsetof(struct RANFunctionDefinition_EventTrigger__ric_EventTriggerStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_EventTriggerStyle_List_2 = { + "ric-EventTriggerStyle-List", + "ric-EventTriggerStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_EventTriggerStyle_List_tags_2, + sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_2) + /sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_EventTriggerStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_2) + /sizeof(asn_DEF_ric_EventTriggerStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_EventTriggerStyle_List_constr_2, &asn_PER_type_ric_EventTriggerStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_EventTriggerStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_EventTriggerStyle_List_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ran_L2Parameters_List_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_L2Parameters_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_L2Parameters_List_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_L2Parameters_List_specs_4 = { + sizeof(struct RANFunctionDefinition_EventTrigger__ran_L2Parameters_List), + offsetof(struct RANFunctionDefinition_EventTrigger__ran_L2Parameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_L2Parameters_List_4 = { + "ran-L2Parameters-List", + "ran-L2Parameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_L2Parameters_List_tags_4, + sizeof(asn_DEF_ran_L2Parameters_List_tags_4) + /sizeof(asn_DEF_ran_L2Parameters_List_tags_4[0]) - 1, /* 1 */ + asn_DEF_ran_L2Parameters_List_tags_4, /* Same as above */ + sizeof(asn_DEF_ran_L2Parameters_List_tags_4) + /sizeof(asn_DEF_ran_L2Parameters_List_tags_4[0]), /* 2 */ + { &asn_OER_type_ran_L2Parameters_List_constr_4, &asn_PER_type_ran_L2Parameters_List_constr_4, SEQUENCE_OF_constraint }, + asn_MBR_ran_L2Parameters_List_4, + 1, /* Single element */ + &asn_SPC_ran_L2Parameters_List_specs_4 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ran_CallProcessTypes_List_6[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_EventTrigger_CallProcess_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_CallProcessTypes_List_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_CallProcessTypes_List_specs_6 = { + sizeof(struct RANFunctionDefinition_EventTrigger__ran_CallProcessTypes_List), + offsetof(struct RANFunctionDefinition_EventTrigger__ran_CallProcessTypes_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_CallProcessTypes_List_6 = { + "ran-CallProcessTypes-List", + "ran-CallProcessTypes-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_CallProcessTypes_List_tags_6, + sizeof(asn_DEF_ran_CallProcessTypes_List_tags_6) + /sizeof(asn_DEF_ran_CallProcessTypes_List_tags_6[0]) - 1, /* 1 */ + asn_DEF_ran_CallProcessTypes_List_tags_6, /* Same as above */ + sizeof(asn_DEF_ran_CallProcessTypes_List_tags_6) + /sizeof(asn_DEF_ran_CallProcessTypes_List_tags_6[0]), /* 2 */ + { &asn_OER_type_ran_CallProcessTypes_List_constr_6, &asn_PER_type_ran_CallProcessTypes_List_constr_6, SEQUENCE_OF_constraint }, + asn_MBR_ran_CallProcessTypes_List_6, + 1, /* Single element */ + &asn_SPC_ran_CallProcessTypes_List_specs_6 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ran_UEIdentificationParameters_List_8[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_UEIdentification_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_UEIdentificationParameters_List_tags_8[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_UEIdentificationParameters_List_specs_8 = { + sizeof(struct RANFunctionDefinition_EventTrigger__ran_UEIdentificationParameters_List), + offsetof(struct RANFunctionDefinition_EventTrigger__ran_UEIdentificationParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_UEIdentificationParameters_List_8 = { + "ran-UEIdentificationParameters-List", + "ran-UEIdentificationParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_UEIdentificationParameters_List_tags_8, + sizeof(asn_DEF_ran_UEIdentificationParameters_List_tags_8) + /sizeof(asn_DEF_ran_UEIdentificationParameters_List_tags_8[0]) - 1, /* 1 */ + asn_DEF_ran_UEIdentificationParameters_List_tags_8, /* Same as above */ + sizeof(asn_DEF_ran_UEIdentificationParameters_List_tags_8) + /sizeof(asn_DEF_ran_UEIdentificationParameters_List_tags_8[0]), /* 2 */ + { &asn_OER_type_ran_UEIdentificationParameters_List_constr_8, &asn_PER_type_ran_UEIdentificationParameters_List_constr_8, SEQUENCE_OF_constraint }, + asn_MBR_ran_UEIdentificationParameters_List_8, + 1, /* Single element */ + &asn_SPC_ran_UEIdentificationParameters_List_specs_8 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ran_CellIdentificationParameters_List_10[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CellIdentification_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_CellIdentificationParameters_List_tags_10[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_CellIdentificationParameters_List_specs_10 = { + sizeof(struct RANFunctionDefinition_EventTrigger__ran_CellIdentificationParameters_List), + offsetof(struct RANFunctionDefinition_EventTrigger__ran_CellIdentificationParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_CellIdentificationParameters_List_10 = { + "ran-CellIdentificationParameters-List", + "ran-CellIdentificationParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_CellIdentificationParameters_List_tags_10, + sizeof(asn_DEF_ran_CellIdentificationParameters_List_tags_10) + /sizeof(asn_DEF_ran_CellIdentificationParameters_List_tags_10[0]) - 1, /* 1 */ + asn_DEF_ran_CellIdentificationParameters_List_tags_10, /* Same as above */ + sizeof(asn_DEF_ran_CellIdentificationParameters_List_tags_10) + /sizeof(asn_DEF_ran_CellIdentificationParameters_List_tags_10[0]), /* 2 */ + { &asn_OER_type_ran_CellIdentificationParameters_List_constr_10, &asn_PER_type_ran_CellIdentificationParameters_List_constr_10, SEQUENCE_OF_constraint }, + asn_MBR_ran_CellIdentificationParameters_List_10, + 1, /* Single element */ + &asn_SPC_ran_CellIdentificationParameters_List_specs_10 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_EventTrigger_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_EventTrigger, ric_EventTriggerStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_EventTriggerStyle_List_2, + 0, + { &asn_OER_memb_ric_EventTriggerStyle_List_constr_2, &asn_PER_memb_ric_EventTriggerStyle_List_constr_2, memb_ric_EventTriggerStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-EventTriggerStyle-List" + }, + { ATF_POINTER, 4, offsetof(struct RANFunctionDefinition_EventTrigger, ran_L2Parameters_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ran_L2Parameters_List_4, + 0, + { &asn_OER_memb_ran_L2Parameters_List_constr_4, &asn_PER_memb_ran_L2Parameters_List_constr_4, memb_ran_L2Parameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-L2Parameters-List" + }, + { ATF_POINTER, 3, offsetof(struct RANFunctionDefinition_EventTrigger, ran_CallProcessTypes_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_ran_CallProcessTypes_List_6, + 0, + { &asn_OER_memb_ran_CallProcessTypes_List_constr_6, &asn_PER_memb_ran_CallProcessTypes_List_constr_6, memb_ran_CallProcessTypes_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-CallProcessTypes-List" + }, + { ATF_POINTER, 2, offsetof(struct RANFunctionDefinition_EventTrigger, ran_UEIdentificationParameters_List), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + 0, + &asn_DEF_ran_UEIdentificationParameters_List_8, + 0, + { &asn_OER_memb_ran_UEIdentificationParameters_List_constr_8, &asn_PER_memb_ran_UEIdentificationParameters_List_constr_8, memb_ran_UEIdentificationParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-UEIdentificationParameters-List" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_EventTrigger, ran_CellIdentificationParameters_List), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + 0, + &asn_DEF_ran_CellIdentificationParameters_List_10, + 0, + { &asn_OER_memb_ran_CellIdentificationParameters_List_constr_10, &asn_PER_memb_ran_CellIdentificationParameters_List_constr_10, memb_ran_CellIdentificationParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-CellIdentificationParameters-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_EventTrigger_oms_1[] = { 1, 2, 3, 4 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_EventTrigger_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_EventTrigger_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-EventTriggerStyle-List */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ran-L2Parameters-List */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ran-CallProcessTypes-List */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ran-UEIdentificationParameters-List */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* ran-CellIdentificationParameters-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_EventTrigger_specs_1 = { + sizeof(struct RANFunctionDefinition_EventTrigger), + offsetof(struct RANFunctionDefinition_EventTrigger, _asn_ctx), + asn_MAP_RANFunctionDefinition_EventTrigger_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_EventTrigger_oms_1, /* Optional members */ + 4, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_EventTrigger = { + "RANFunctionDefinition-EventTrigger", + "RANFunctionDefinition-EventTrigger", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_EventTrigger_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_EventTrigger_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_EventTrigger_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_EventTrigger_1, + 5, /* Elements count */ + &asn_SPC_RANFunctionDefinition_EventTrigger_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Indication-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Indication-Item.c new file mode 100644 index 0000000..c72f9f5 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Indication-Item.c @@ -0,0 +1,152 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Insert-Indication-Item.h" + +#include "InsertIndication-RANParameter-Item.h" +static int +memb_ran_InsertIndicationParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ran_InsertIndicationParameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_InsertIndicationParameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_InsertIndicationParameters_List_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_InsertIndicationParameters_List_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ran_InsertIndicationParameters_List_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_InsertIndication_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_InsertIndicationParameters_List_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_InsertIndicationParameters_List_specs_4 = { + sizeof(struct RANFunctionDefinition_Insert_Indication_Item__ran_InsertIndicationParameters_List), + offsetof(struct RANFunctionDefinition_Insert_Indication_Item__ran_InsertIndicationParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_InsertIndicationParameters_List_4 = { + "ran-InsertIndicationParameters-List", + "ran-InsertIndicationParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_InsertIndicationParameters_List_tags_4, + sizeof(asn_DEF_ran_InsertIndicationParameters_List_tags_4) + /sizeof(asn_DEF_ran_InsertIndicationParameters_List_tags_4[0]) - 1, /* 1 */ + asn_DEF_ran_InsertIndicationParameters_List_tags_4, /* Same as above */ + sizeof(asn_DEF_ran_InsertIndicationParameters_List_tags_4) + /sizeof(asn_DEF_ran_InsertIndicationParameters_List_tags_4[0]), /* 2 */ + { &asn_OER_type_ran_InsertIndicationParameters_List_constr_4, &asn_PER_type_ran_InsertIndicationParameters_List_constr_4, SEQUENCE_OF_constraint }, + asn_MBR_ran_InsertIndicationParameters_List_4, + 1, /* Single element */ + &asn_SPC_ran_InsertIndicationParameters_List_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Insert_Indication_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Indication_Item, ric_InsertIndication_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_InsertIndication_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertIndication-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Indication_Item, ric_InsertIndication_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_InsertIndication_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertIndication-Name" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Insert_Indication_Item, ran_InsertIndicationParameters_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_ran_InsertIndicationParameters_List_4, + 0, + { &asn_OER_memb_ran_InsertIndicationParameters_List_constr_4, &asn_PER_memb_ran_InsertIndicationParameters_List_constr_4, memb_ran_InsertIndicationParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-InsertIndicationParameters-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_Insert_Indication_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Insert_Indication_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Insert_Indication_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-InsertIndication-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-InsertIndication-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ran-InsertIndicationParameters-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Insert_Indication_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_Insert_Indication_Item), + offsetof(struct RANFunctionDefinition_Insert_Indication_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_Insert_Indication_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_Insert_Indication_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Insert_Indication_Item = { + "RANFunctionDefinition-Insert-Indication-Item", + "RANFunctionDefinition-Insert-Indication-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Insert_Indication_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Insert_Indication_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Insert_Indication_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Insert_Indication_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Insert_Indication_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Insert_Indication_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Insert_Indication_Item_1, + 3, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Insert_Indication_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Item.c new file mode 100644 index 0000000..f267c3a --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert-Item.c @@ -0,0 +1,202 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Insert-Item.h" + +#include "RANFunctionDefinition-Insert-Indication-Item.h" +static int +memb_ric_InsertIndication_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_InsertIndication_List_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ric_InsertIndication_List_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_InsertIndication_List_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ric_InsertIndication_List_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_InsertIndication_List_6[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_Insert_Indication_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_InsertIndication_List_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_InsertIndication_List_specs_6 = { + sizeof(struct RANFunctionDefinition_Insert_Item__ric_InsertIndication_List), + offsetof(struct RANFunctionDefinition_Insert_Item__ric_InsertIndication_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_InsertIndication_List_6 = { + "ric-InsertIndication-List", + "ric-InsertIndication-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_InsertIndication_List_tags_6, + sizeof(asn_DEF_ric_InsertIndication_List_tags_6) + /sizeof(asn_DEF_ric_InsertIndication_List_tags_6[0]) - 1, /* 1 */ + asn_DEF_ric_InsertIndication_List_tags_6, /* Same as above */ + sizeof(asn_DEF_ric_InsertIndication_List_tags_6) + /sizeof(asn_DEF_ric_InsertIndication_List_tags_6[0]), /* 2 */ + { &asn_OER_type_ric_InsertIndication_List_constr_6, &asn_PER_type_ric_InsertIndication_List_constr_6, SEQUENCE_OF_constraint }, + asn_MBR_ric_InsertIndication_List_6, + 1, /* Single element */ + &asn_SPC_ric_InsertIndication_List_specs_6 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Insert_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Item, ric_InsertStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Item, ric_InsertStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-InsertStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Item, ric_SupportedEventTriggerStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-SupportedEventTriggerStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Item, ric_ActionDefinitionFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ActionDefinitionFormat-Type" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Insert_Item, ric_InsertIndication_List), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + 0, + &asn_DEF_ric_InsertIndication_List_6, + 0, + { &asn_OER_memb_ric_InsertIndication_List_constr_6, &asn_PER_memb_ric_InsertIndication_List_constr_6, memb_ric_InsertIndication_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-InsertIndication-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Item, ric_IndicationHeaderFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationHeaderFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Item, ric_IndicationMessageFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationMessageFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert_Item, ric_CallProcessIDFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-CallProcessIDFormat-Type" + }, +}; +static const int asn_MAP_RANFunctionDefinition_Insert_Item_oms_1[] = { 4 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Insert_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Insert_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-InsertStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-InsertStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-SupportedEventTriggerStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ric-ActionDefinitionFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ric-InsertIndication-List */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* ric-IndicationHeaderFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* ric-IndicationMessageFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* ric-CallProcessIDFormat-Type */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Insert_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_Insert_Item), + offsetof(struct RANFunctionDefinition_Insert_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_Insert_Item_tag2el_1, + 8, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_Insert_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 8, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Insert_Item = { + "RANFunctionDefinition-Insert-Item", + "RANFunctionDefinition-Insert-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Insert_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Insert_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Insert_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Insert_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Insert_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Insert_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Insert_Item_1, + 8, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Insert_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert.c new file mode 100644 index 0000000..1e3a2bb --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Insert.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Insert.h" + +#include "RANFunctionDefinition-Insert-Item.h" +static int +memb_ric_InsertStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_InsertStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_InsertStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_Insert_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_InsertStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_InsertStyle_List_specs_2 = { + sizeof(struct RANFunctionDefinition_Insert__ric_InsertStyle_List), + offsetof(struct RANFunctionDefinition_Insert__ric_InsertStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_InsertStyle_List_2 = { + "ric-InsertStyle-List", + "ric-InsertStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_InsertStyle_List_tags_2, + sizeof(asn_DEF_ric_InsertStyle_List_tags_2) + /sizeof(asn_DEF_ric_InsertStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_InsertStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_InsertStyle_List_tags_2) + /sizeof(asn_DEF_ric_InsertStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_InsertStyle_List_constr_2, &asn_PER_type_ric_InsertStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_InsertStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_InsertStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Insert_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Insert, ric_InsertStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_InsertStyle_List_2, + 0, + { &asn_OER_memb_ric_InsertStyle_List_constr_2, &asn_PER_memb_ric_InsertStyle_List_constr_2, memb_ric_InsertStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-InsertStyle-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Insert_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Insert_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-InsertStyle-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Insert_specs_1 = { + sizeof(struct RANFunctionDefinition_Insert), + offsetof(struct RANFunctionDefinition_Insert, _asn_ctx), + asn_MAP_RANFunctionDefinition_Insert_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Insert = { + "RANFunctionDefinition-Insert", + "RANFunctionDefinition-Insert", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Insert_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Insert_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Insert_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Insert_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Insert_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Insert_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Insert_1, + 1, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Insert_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Action-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Action-Item.c new file mode 100644 index 0000000..f69d585 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Action-Item.c @@ -0,0 +1,252 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Policy-Action-Item.h" + +#include "PolicyAction-RANParameter-Item.h" +#include "PolicyCondition-RANParameter-Item.h" +static int +memb_ran_PolicyActionParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_ran_PolicyConditionParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ran_PolicyActionParameters_List_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_PolicyActionParameters_List_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ran_PolicyConditionParameters_List_constr_7 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_PolicyConditionParameters_List_constr_7 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_PolicyActionParameters_List_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_PolicyActionParameters_List_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_PolicyConditionParameters_List_constr_7 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_PolicyConditionParameters_List_constr_7 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ran_PolicyActionParameters_List_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PolicyAction_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_PolicyActionParameters_List_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_PolicyActionParameters_List_specs_5 = { + sizeof(struct RANFunctionDefinition_Policy_Action_Item__ran_PolicyActionParameters_List), + offsetof(struct RANFunctionDefinition_Policy_Action_Item__ran_PolicyActionParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_PolicyActionParameters_List_5 = { + "ran-PolicyActionParameters-List", + "ran-PolicyActionParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_PolicyActionParameters_List_tags_5, + sizeof(asn_DEF_ran_PolicyActionParameters_List_tags_5) + /sizeof(asn_DEF_ran_PolicyActionParameters_List_tags_5[0]) - 1, /* 1 */ + asn_DEF_ran_PolicyActionParameters_List_tags_5, /* Same as above */ + sizeof(asn_DEF_ran_PolicyActionParameters_List_tags_5) + /sizeof(asn_DEF_ran_PolicyActionParameters_List_tags_5[0]), /* 2 */ + { &asn_OER_type_ran_PolicyActionParameters_List_constr_5, &asn_PER_type_ran_PolicyActionParameters_List_constr_5, SEQUENCE_OF_constraint }, + asn_MBR_ran_PolicyActionParameters_List_5, + 1, /* Single element */ + &asn_SPC_ran_PolicyActionParameters_List_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ran_PolicyConditionParameters_List_7[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_PolicyCondition_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_PolicyConditionParameters_List_tags_7[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_PolicyConditionParameters_List_specs_7 = { + sizeof(struct RANFunctionDefinition_Policy_Action_Item__ran_PolicyConditionParameters_List), + offsetof(struct RANFunctionDefinition_Policy_Action_Item__ran_PolicyConditionParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_PolicyConditionParameters_List_7 = { + "ran-PolicyConditionParameters-List", + "ran-PolicyConditionParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_PolicyConditionParameters_List_tags_7, + sizeof(asn_DEF_ran_PolicyConditionParameters_List_tags_7) + /sizeof(asn_DEF_ran_PolicyConditionParameters_List_tags_7[0]) - 1, /* 1 */ + asn_DEF_ran_PolicyConditionParameters_List_tags_7, /* Same as above */ + sizeof(asn_DEF_ran_PolicyConditionParameters_List_tags_7) + /sizeof(asn_DEF_ran_PolicyConditionParameters_List_tags_7[0]), /* 2 */ + { &asn_OER_type_ran_PolicyConditionParameters_List_constr_7, &asn_PER_type_ran_PolicyConditionParameters_List_constr_7, SEQUENCE_OF_constraint }, + asn_MBR_ran_PolicyConditionParameters_List_7, + 1, /* Single element */ + &asn_SPC_ran_PolicyConditionParameters_List_specs_7 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Policy_Action_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Policy_Action_Item, ric_PolicyAction_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyAction-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Policy_Action_Item, ric_PolicyAction_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyAction-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Policy_Action_Item, ric_ActionDefinitionFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ActionDefinitionFormat-Type" + }, + { ATF_POINTER, 2, offsetof(struct RANFunctionDefinition_Policy_Action_Item, ran_PolicyActionParameters_List), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + 0, + &asn_DEF_ran_PolicyActionParameters_List_5, + 0, + { &asn_OER_memb_ran_PolicyActionParameters_List_constr_5, &asn_PER_memb_ran_PolicyActionParameters_List_constr_5, memb_ran_PolicyActionParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-PolicyActionParameters-List" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Policy_Action_Item, ran_PolicyConditionParameters_List), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + 0, + &asn_DEF_ran_PolicyConditionParameters_List_7, + 0, + { &asn_OER_memb_ran_PolicyConditionParameters_List_constr_7, &asn_PER_memb_ran_PolicyConditionParameters_List_constr_7, memb_ran_PolicyConditionParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-PolicyConditionParameters-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_Policy_Action_Item_oms_1[] = { 3, 4 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Policy_Action_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Policy_Action_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-PolicyAction-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-PolicyAction-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-ActionDefinitionFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ran-PolicyActionParameters-List */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* ran-PolicyConditionParameters-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Policy_Action_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_Policy_Action_Item), + offsetof(struct RANFunctionDefinition_Policy_Action_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_Policy_Action_Item_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_Policy_Action_Item_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Policy_Action_Item = { + "RANFunctionDefinition-Policy-Action-Item", + "RANFunctionDefinition-Policy-Action-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Policy_Action_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Policy_Action_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Policy_Action_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Policy_Action_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Policy_Action_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Policy_Action_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Policy_Action_Item_1, + 5, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Policy_Action_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Item.c new file mode 100644 index 0000000..6ae1ac7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy-Item.c @@ -0,0 +1,162 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Policy-Item.h" + +#include "RANFunctionDefinition-Policy-Action-Item.h" +static int +memb_ric_PolicyAction_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_PolicyAction_List_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ric_PolicyAction_List_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_PolicyAction_List_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ric_PolicyAction_List_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_PolicyAction_List_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_Policy_Action_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_PolicyAction_List_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_PolicyAction_List_specs_5 = { + sizeof(struct RANFunctionDefinition_Policy_Item__ric_PolicyAction_List), + offsetof(struct RANFunctionDefinition_Policy_Item__ric_PolicyAction_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_PolicyAction_List_5 = { + "ric-PolicyAction-List", + "ric-PolicyAction-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_PolicyAction_List_tags_5, + sizeof(asn_DEF_ric_PolicyAction_List_tags_5) + /sizeof(asn_DEF_ric_PolicyAction_List_tags_5[0]) - 1, /* 1 */ + asn_DEF_ric_PolicyAction_List_tags_5, /* Same as above */ + sizeof(asn_DEF_ric_PolicyAction_List_tags_5) + /sizeof(asn_DEF_ric_PolicyAction_List_tags_5[0]), /* 2 */ + { &asn_OER_type_ric_PolicyAction_List_constr_5, &asn_PER_type_ric_PolicyAction_List_constr_5, SEQUENCE_OF_constraint }, + asn_MBR_ric_PolicyAction_List_5, + 1, /* Single element */ + &asn_SPC_ric_PolicyAction_List_specs_5 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Policy_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Policy_Item, ric_PolicyStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Policy_Item, ric_PolicyStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Policy_Item, ric_SupportedEventTriggerStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-SupportedEventTriggerStyle-Type" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Policy_Item, ric_PolicyAction_List), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + 0, + &asn_DEF_ric_PolicyAction_List_5, + 0, + { &asn_OER_memb_ric_PolicyAction_List_constr_5, &asn_PER_memb_ric_PolicyAction_List_constr_5, memb_ric_PolicyAction_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-PolicyAction-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_Policy_Item_oms_1[] = { 3 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Policy_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Policy_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-PolicyStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-PolicyStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-SupportedEventTriggerStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ric-PolicyAction-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Policy_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_Policy_Item), + offsetof(struct RANFunctionDefinition_Policy_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_Policy_Item_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_Policy_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Policy_Item = { + "RANFunctionDefinition-Policy-Item", + "RANFunctionDefinition-Policy-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Policy_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Policy_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Policy_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Policy_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Policy_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Policy_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Policy_Item_1, + 4, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Policy_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy.c new file mode 100644 index 0000000..c56a769 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Policy.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Policy.h" + +#include "RANFunctionDefinition-Policy-Item.h" +static int +memb_ric_PolicyStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_PolicyStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_PolicyStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_PolicyStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_PolicyStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_PolicyStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_Policy_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_PolicyStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_PolicyStyle_List_specs_2 = { + sizeof(struct RANFunctionDefinition_Policy__ric_PolicyStyle_List), + offsetof(struct RANFunctionDefinition_Policy__ric_PolicyStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_PolicyStyle_List_2 = { + "ric-PolicyStyle-List", + "ric-PolicyStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_PolicyStyle_List_tags_2, + sizeof(asn_DEF_ric_PolicyStyle_List_tags_2) + /sizeof(asn_DEF_ric_PolicyStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_PolicyStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_PolicyStyle_List_tags_2) + /sizeof(asn_DEF_ric_PolicyStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_PolicyStyle_List_constr_2, &asn_PER_type_ric_PolicyStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_PolicyStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_PolicyStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Policy_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Policy, ric_PolicyStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_PolicyStyle_List_2, + 0, + { &asn_OER_memb_ric_PolicyStyle_List_constr_2, &asn_PER_memb_ric_PolicyStyle_List_constr_2, memb_ric_PolicyStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-PolicyStyle-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Policy_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Policy_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-PolicyStyle-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Policy_specs_1 = { + sizeof(struct RANFunctionDefinition_Policy), + offsetof(struct RANFunctionDefinition_Policy, _asn_ctx), + asn_MAP_RANFunctionDefinition_Policy_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Policy = { + "RANFunctionDefinition-Policy", + "RANFunctionDefinition-Policy", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Policy_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Policy_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Policy_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Policy_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Policy_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Policy_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Policy_1, + 1, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Policy_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report-Item.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report-Item.c new file mode 100644 index 0000000..72a5f23 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report-Item.c @@ -0,0 +1,192 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Report-Item.h" + +#include "Report-RANParameter-Item.h" +static int +memb_ran_ReportParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ran_ReportParameters_List_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ran_ReportParameters_List_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ran_ReportParameters_List_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ran_ReportParameters_List_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ran_ReportParameters_List_8[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Report_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ran_ReportParameters_List_tags_8[] = { + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ran_ReportParameters_List_specs_8 = { + sizeof(struct RANFunctionDefinition_Report_Item__ran_ReportParameters_List), + offsetof(struct RANFunctionDefinition_Report_Item__ran_ReportParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ran_ReportParameters_List_8 = { + "ran-ReportParameters-List", + "ran-ReportParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ran_ReportParameters_List_tags_8, + sizeof(asn_DEF_ran_ReportParameters_List_tags_8) + /sizeof(asn_DEF_ran_ReportParameters_List_tags_8[0]) - 1, /* 1 */ + asn_DEF_ran_ReportParameters_List_tags_8, /* Same as above */ + sizeof(asn_DEF_ran_ReportParameters_List_tags_8) + /sizeof(asn_DEF_ran_ReportParameters_List_tags_8[0]), /* 2 */ + { &asn_OER_type_ran_ReportParameters_List_constr_8, &asn_PER_type_ran_ReportParameters_List_constr_8, SEQUENCE_OF_constraint }, + asn_MBR_ran_ReportParameters_List_8, + 1, /* Single element */ + &asn_SPC_ran_ReportParameters_List_specs_8 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Report_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Report_Item, ric_ReportStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ReportStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Report_Item, ric_ReportStyle_Name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ReportStyle-Name" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Report_Item, ric_SupportedEventTriggerStyle_Type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Style_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-SupportedEventTriggerStyle-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Report_Item, ric_ReportActionFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-ReportActionFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Report_Item, ric_IndicationHeaderFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationHeaderFormat-Type" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Report_Item, ric_IndicationMessageFormat_Type), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_Format_Type, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-IndicationMessageFormat-Type" + }, + { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Report_Item, ran_ReportParameters_List), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + 0, + &asn_DEF_ran_ReportParameters_List_8, + 0, + { &asn_OER_memb_ran_ReportParameters_List_constr_8, &asn_PER_memb_ran_ReportParameters_List_constr_8, memb_ran_ReportParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ran-ReportParameters-List" + }, +}; +static const int asn_MAP_RANFunctionDefinition_Report_Item_oms_1[] = { 6 }; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Report_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Report_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ReportStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-ReportStyle-Name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ric-SupportedEventTriggerStyle-Type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ric-ReportActionFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ric-IndicationHeaderFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* ric-IndicationMessageFormat-Type */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* ran-ReportParameters-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Report_Item_specs_1 = { + sizeof(struct RANFunctionDefinition_Report_Item), + offsetof(struct RANFunctionDefinition_Report_Item, _asn_ctx), + asn_MAP_RANFunctionDefinition_Report_Item_tag2el_1, + 7, /* Count of tags in the map */ + asn_MAP_RANFunctionDefinition_Report_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Report_Item = { + "RANFunctionDefinition-Report-Item", + "RANFunctionDefinition-Report-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Report_Item_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Report_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Report_Item_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Report_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Report_Item_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Report_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Report_Item_1, + 7, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Report_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report.c b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report.c new file mode 100644 index 0000000..044cdf0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANFunctionDefinition-Report.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANFunctionDefinition-Report.h" + +#include "RANFunctionDefinition-Report-Item.h" +static int +memb_ric_ReportStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 63)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ric_ReportStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_type_ric_ReportStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ric_ReportStyle_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +static asn_per_constraints_t asn_PER_memb_ric_ReportStyle_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 63 } /* (SIZE(1..63)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ric_ReportStyle_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANFunctionDefinition_Report_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ric_ReportStyle_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ric_ReportStyle_List_specs_2 = { + sizeof(struct RANFunctionDefinition_Report__ric_ReportStyle_List), + offsetof(struct RANFunctionDefinition_Report__ric_ReportStyle_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_ReportStyle_List_2 = { + "ric-ReportStyle-List", + "ric-ReportStyle-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ric_ReportStyle_List_tags_2, + sizeof(asn_DEF_ric_ReportStyle_List_tags_2) + /sizeof(asn_DEF_ric_ReportStyle_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ric_ReportStyle_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ric_ReportStyle_List_tags_2) + /sizeof(asn_DEF_ric_ReportStyle_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ric_ReportStyle_List_constr_2, &asn_PER_type_ric_ReportStyle_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ric_ReportStyle_List_2, + 1, /* Single element */ + &asn_SPC_ric_ReportStyle_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Report_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Report, ric_ReportStyle_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ric_ReportStyle_List_2, + 0, + { &asn_OER_memb_ric_ReportStyle_List_constr_2, &asn_PER_memb_ric_ReportStyle_List_constr_2, memb_ric_ReportStyle_List_constraint_1 }, + 0, 0, /* No default value */ + "ric-ReportStyle-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Report_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Report_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ric-ReportStyle-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Report_specs_1 = { + sizeof(struct RANFunctionDefinition_Report), + offsetof(struct RANFunctionDefinition_Report, _asn_ctx), + asn_MAP_RANFunctionDefinition_Report_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Report = { + "RANFunctionDefinition-Report", + "RANFunctionDefinition-Report", + &asn_OP_SEQUENCE, + asn_DEF_RANFunctionDefinition_Report_tags_1, + sizeof(asn_DEF_RANFunctionDefinition_Report_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Report_tags_1[0]), /* 1 */ + asn_DEF_RANFunctionDefinition_Report_tags_1, /* Same as above */ + sizeof(asn_DEF_RANFunctionDefinition_Report_tags_1) + /sizeof(asn_DEF_RANFunctionDefinition_Report_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANFunctionDefinition_Report_1, + 1, /* Elements count */ + &asn_SPC_RANFunctionDefinition_Report_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST-Item.c b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST-Item.c new file mode 100644 index 0000000..adf2b21 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Definition-Choice-LIST-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_LIST_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Definition_Choice_LIST_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Definition_Choice_LIST_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct RANParameter_Definition_Choice_LIST_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_RANParameter_Definition_Choice_LIST_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_RANParameter_Definition_Choice_LIST_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Definition_Choice_LIST_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_LIST_Item_specs_1 = { + sizeof(struct RANParameter_Definition_Choice_LIST_Item), + offsetof(struct RANParameter_Definition_Choice_LIST_Item, _asn_ctx), + asn_MAP_RANParameter_Definition_Choice_LIST_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RANParameter_Definition_Choice_LIST_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_LIST_Item = { + "RANParameter-Definition-Choice-LIST-Item", + "RANParameter-Definition-Choice-LIST-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Definition_Choice_LIST_Item_tags_1, + sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_Item_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_Item_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Definition_Choice_LIST_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_Item_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Definition_Choice_LIST_Item_1, + 3, /* Elements count */ + &asn_SPC_RANParameter_Definition_Choice_LIST_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST.c b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST.c new file mode 100644 index 0000000..1f42464 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-LIST.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Definition-Choice-LIST.h" + +#include "RANParameter-Definition-Choice-LIST-Item.h" +static int +memb_ranParameter_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranParameter_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranParameter_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranParameter_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranParameter_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranParameter_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANParameter_Definition_Choice_LIST_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranParameter_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranParameter_List_specs_2 = { + sizeof(struct RANParameter_Definition_Choice_LIST__ranParameter_List), + offsetof(struct RANParameter_Definition_Choice_LIST__ranParameter_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranParameter_List_2 = { + "ranParameter-List", + "ranParameter-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranParameter_List_tags_2, + sizeof(asn_DEF_ranParameter_List_tags_2) + /sizeof(asn_DEF_ranParameter_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranParameter_List_tags_2, /* Same as above */ + sizeof(asn_DEF_ranParameter_List_tags_2) + /sizeof(asn_DEF_ranParameter_List_tags_2[0]), /* 2 */ + { &asn_OER_type_ranParameter_List_constr_2, &asn_PER_type_ranParameter_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranParameter_List_2, + 1, /* Single element */ + &asn_SPC_ranParameter_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_LIST_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Definition_Choice_LIST, ranParameter_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranParameter_List_2, + 0, + { &asn_OER_memb_ranParameter_List_constr_2, &asn_PER_memb_ranParameter_List_constr_2, memb_ranParameter_List_constraint_1 }, + 0, 0, /* No default value */ + "ranParameter-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Definition_Choice_LIST_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Definition_Choice_LIST_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_LIST_specs_1 = { + sizeof(struct RANParameter_Definition_Choice_LIST), + offsetof(struct RANParameter_Definition_Choice_LIST, _asn_ctx), + asn_MAP_RANParameter_Definition_Choice_LIST_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_LIST = { + "RANParameter-Definition-Choice-LIST", + "RANParameter-Definition-Choice-LIST", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Definition_Choice_LIST_tags_1, + sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Definition_Choice_LIST_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_LIST_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Definition_Choice_LIST_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_Definition_Choice_LIST_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE-Item.c b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE-Item.c new file mode 100644 index 0000000..995003f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Definition-Choice-STRUCTURE-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_STRUCTURE_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Definition_Choice_STRUCTURE_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Definition_Choice_STRUCTURE_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct RANParameter_Definition_Choice_STRUCTURE_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_RANParameter_Definition_Choice_STRUCTURE_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Definition_Choice_STRUCTURE_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_STRUCTURE_Item_specs_1 = { + sizeof(struct RANParameter_Definition_Choice_STRUCTURE_Item), + offsetof(struct RANParameter_Definition_Choice_STRUCTURE_Item, _asn_ctx), + asn_MAP_RANParameter_Definition_Choice_STRUCTURE_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RANParameter_Definition_Choice_STRUCTURE_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item = { + "RANParameter-Definition-Choice-STRUCTURE-Item", + "RANParameter-Definition-Choice-STRUCTURE-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item_tags_1, + sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Definition_Choice_STRUCTURE_Item_1, + 3, /* Elements count */ + &asn_SPC_RANParameter_Definition_Choice_STRUCTURE_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE.c b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE.c new file mode 100644 index 0000000..2e56191 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice-STRUCTURE.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Definition-Choice-STRUCTURE.h" + +#include "RANParameter-Definition-Choice-STRUCTURE-Item.h" +static int +memb_ranParameter_STRUCTURE_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranParameter_STRUCTURE_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranParameter_STRUCTURE_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranParameter_STRUCTURE_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranParameter_STRUCTURE_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranParameter_STRUCTURE_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANParameter_Definition_Choice_STRUCTURE_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranParameter_STRUCTURE_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranParameter_STRUCTURE_specs_2 = { + sizeof(struct RANParameter_Definition_Choice_STRUCTURE__ranParameter_STRUCTURE), + offsetof(struct RANParameter_Definition_Choice_STRUCTURE__ranParameter_STRUCTURE, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranParameter_STRUCTURE_2 = { + "ranParameter-STRUCTURE", + "ranParameter-STRUCTURE", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranParameter_STRUCTURE_tags_2, + sizeof(asn_DEF_ranParameter_STRUCTURE_tags_2) + /sizeof(asn_DEF_ranParameter_STRUCTURE_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranParameter_STRUCTURE_tags_2, /* Same as above */ + sizeof(asn_DEF_ranParameter_STRUCTURE_tags_2) + /sizeof(asn_DEF_ranParameter_STRUCTURE_tags_2[0]), /* 2 */ + { &asn_OER_type_ranParameter_STRUCTURE_constr_2, &asn_PER_type_ranParameter_STRUCTURE_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_ranParameter_STRUCTURE_2, + 1, /* Single element */ + &asn_SPC_ranParameter_STRUCTURE_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_STRUCTURE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Definition_Choice_STRUCTURE, ranParameter_STRUCTURE), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_ranParameter_STRUCTURE_2, + 0, + { &asn_OER_memb_ranParameter_STRUCTURE_constr_2, &asn_PER_memb_ranParameter_STRUCTURE_constr_2, memb_ranParameter_STRUCTURE_constraint_1 }, + 0, 0, /* No default value */ + "ranParameter-STRUCTURE" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Definition_Choice_STRUCTURE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Definition_Choice_STRUCTURE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-STRUCTURE */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_Choice_STRUCTURE_specs_1 = { + sizeof(struct RANParameter_Definition_Choice_STRUCTURE), + offsetof(struct RANParameter_Definition_Choice_STRUCTURE, _asn_ctx), + asn_MAP_RANParameter_Definition_Choice_STRUCTURE_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice_STRUCTURE = { + "RANParameter-Definition-Choice-STRUCTURE", + "RANParameter-Definition-Choice-STRUCTURE", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Definition_Choice_STRUCTURE_tags_1, + sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Definition_Choice_STRUCTURE_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_Choice_STRUCTURE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Definition_Choice_STRUCTURE_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_Definition_Choice_STRUCTURE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice.c b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice.c new file mode 100644 index 0000000..5c0850e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Definition-Choice.c @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Definition-Choice.h" + +#include "RANParameter-Definition-Choice-LIST.h" +#include "RANParameter-Definition-Choice-STRUCTURE.h" +static asn_oer_constraints_t asn_OER_type_RANParameter_Definition_Choice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RANParameter_Definition_Choice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_1[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_Definition_Choice, choice.choiceLIST), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition_Choice_LIST, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "choiceLIST" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_Definition_Choice, choice.choiceSTRUCTURE), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition_Choice_STRUCTURE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "choiceSTRUCTURE" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Definition_Choice_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* choiceLIST */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* choiceSTRUCTURE */ +}; +asn_CHOICE_specifics_t asn_SPC_RANParameter_Definition_Choice_specs_1 = { + sizeof(struct RANParameter_Definition_Choice), + offsetof(struct RANParameter_Definition_Choice, _asn_ctx), + offsetof(struct RANParameter_Definition_Choice, present), + sizeof(((struct RANParameter_Definition_Choice *)0)->present), + asn_MAP_RANParameter_Definition_Choice_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice = { + "RANParameter-Definition-Choice", + "RANParameter-Definition-Choice", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_RANParameter_Definition_Choice_constr_1, &asn_PER_type_RANParameter_Definition_Choice_constr_1, CHOICE_constraint }, + asn_MBR_RANParameter_Definition_Choice_1, + 2, /* Elements count */ + &asn_SPC_RANParameter_Definition_Choice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Definition.c b/Bouncer/e2sm_rc/lib/RANParameter-Definition.c new file mode 100644 index 0000000..1876f99 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Definition.c @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Definition.h" + +#include "RANParameter-Definition-Choice.h" +asn_TYPE_member_t asn_MBR_RANParameter_Definition_1[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_Definition, ranParameter_Definition_Choice), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition_Choice, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition-Choice" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Definition_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Definition_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-Definition-Choice */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Definition_specs_1 = { + sizeof(struct RANParameter_Definition), + offsetof(struct RANParameter_Definition, _asn_ctx), + asn_MAP_RANParameter_Definition_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition = { + "RANParameter-Definition", + "RANParameter-Definition", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Definition_tags_1, + sizeof(asn_DEF_RANParameter_Definition_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Definition_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Definition_tags_1) + /sizeof(asn_DEF_RANParameter_Definition_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Definition_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_Definition_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-ID.c b/Bouncer/e2sm_rc/lib/RANParameter-ID.c new file mode 100644 index 0000000..580eecb --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-ID.c @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-ID.h" + +int +RANParameter_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value >= 1 && value <= 4294967295)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RANParameter_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RANParameter_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, 1, 4294967295 } /* (1..4294967295,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +const asn_INTEGER_specifics_t asn_SPC_RANParameter_ID_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_ID = { + "RANParameter-ID", + "RANParameter-ID", + &asn_OP_NativeInteger, + asn_DEF_RANParameter_ID_tags_1, + sizeof(asn_DEF_RANParameter_ID_tags_1) + /sizeof(asn_DEF_RANParameter_ID_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_ID_tags_1) + /sizeof(asn_DEF_RANParameter_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RANParameter_ID_constr_1, &asn_PER_type_RANParameter_ID_constr_1, RANParameter_ID_constraint }, + 0, 0, /* No members */ + &asn_SPC_RANParameter_ID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-LIST.c b/Bouncer/e2sm_rc/lib/RANParameter-LIST.c new file mode 100644 index 0000000..10ab71d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-LIST.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-LIST.h" + +#include "RANParameter-STRUCTURE.h" +static int +memb_list_of_ranParameter_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_list_of_ranParameter_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_list_of_ranParameter_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_list_of_ranParameter_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_list_of_ranParameter_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_list_of_ranParameter_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANParameter_STRUCTURE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_list_of_ranParameter_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_list_of_ranParameter_specs_2 = { + sizeof(struct RANParameter_LIST__list_of_ranParameter), + offsetof(struct RANParameter_LIST__list_of_ranParameter, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_list_of_ranParameter_2 = { + "list-of-ranParameter", + "list-of-ranParameter", + &asn_OP_SEQUENCE_OF, + asn_DEF_list_of_ranParameter_tags_2, + sizeof(asn_DEF_list_of_ranParameter_tags_2) + /sizeof(asn_DEF_list_of_ranParameter_tags_2[0]) - 1, /* 1 */ + asn_DEF_list_of_ranParameter_tags_2, /* Same as above */ + sizeof(asn_DEF_list_of_ranParameter_tags_2) + /sizeof(asn_DEF_list_of_ranParameter_tags_2[0]), /* 2 */ + { &asn_OER_type_list_of_ranParameter_constr_2, &asn_PER_type_list_of_ranParameter_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_list_of_ranParameter_2, + 1, /* Single element */ + &asn_SPC_list_of_ranParameter_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANParameter_LIST_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_LIST, list_of_ranParameter), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_list_of_ranParameter_2, + 0, + { &asn_OER_memb_list_of_ranParameter_constr_2, &asn_PER_memb_list_of_ranParameter_constr_2, memb_list_of_ranParameter_constraint_1 }, + 0, 0, /* No default value */ + "list-of-ranParameter" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_LIST_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_LIST_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* list-of-ranParameter */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_LIST_specs_1 = { + sizeof(struct RANParameter_LIST), + offsetof(struct RANParameter_LIST, _asn_ctx), + asn_MAP_RANParameter_LIST_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_LIST = { + "RANParameter-LIST", + "RANParameter-LIST", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_LIST_tags_1, + sizeof(asn_DEF_RANParameter_LIST_tags_1) + /sizeof(asn_DEF_RANParameter_LIST_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_LIST_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_LIST_tags_1) + /sizeof(asn_DEF_RANParameter_LIST_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_LIST_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_LIST_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Name.c b/Bouncer/e2sm_rc/lib/RANParameter-Name.c new file mode 100644 index 0000000..ace7722 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RANParameter_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RANParameter_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RANParameter_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RANParameter_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_RANParameter_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RANParameter_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RANParameter_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Name = { + "RANParameter-Name", + "RANParameter-Name", + &asn_OP_PrintableString, + asn_DEF_RANParameter_Name_tags_1, + sizeof(asn_DEF_RANParameter_Name_tags_1) + /sizeof(asn_DEF_RANParameter_Name_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Name_tags_1) + /sizeof(asn_DEF_RANParameter_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_RANParameter_Name_constr_1, &asn_PER_type_RANParameter_Name_constr_1, RANParameter_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE-Item.c b/Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE-Item.c new file mode 100644 index 0000000..c60915d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE-Item.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-STRUCTURE-Item.h" + +#include "RANParameter-ValueType.h" +asn_TYPE_member_t asn_MBR_RANParameter_STRUCTURE_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_STRUCTURE_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_STRUCTURE_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_STRUCTURE_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_STRUCTURE_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_STRUCTURE_Item_specs_1 = { + sizeof(struct RANParameter_STRUCTURE_Item), + offsetof(struct RANParameter_STRUCTURE_Item, _asn_ctx), + asn_MAP_RANParameter_STRUCTURE_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_STRUCTURE_Item = { + "RANParameter-STRUCTURE-Item", + "RANParameter-STRUCTURE-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_STRUCTURE_Item_tags_1, + sizeof(asn_DEF_RANParameter_STRUCTURE_Item_tags_1) + /sizeof(asn_DEF_RANParameter_STRUCTURE_Item_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_STRUCTURE_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_STRUCTURE_Item_tags_1) + /sizeof(asn_DEF_RANParameter_STRUCTURE_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_STRUCTURE_Item_1, + 2, /* Elements count */ + &asn_SPC_RANParameter_STRUCTURE_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE.c b/Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE.c new file mode 100644 index 0000000..3ed4492 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-STRUCTURE.c @@ -0,0 +1,132 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-STRUCTURE.h" + +#include "RANParameter-STRUCTURE-Item.h" +static int +memb_sequence_of_ranParameters_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_sequence_of_ranParameters_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_sequence_of_ranParameters_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_sequence_of_ranParameters_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_sequence_of_ranParameters_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_sequence_of_ranParameters_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANParameter_STRUCTURE_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_sequence_of_ranParameters_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_sequence_of_ranParameters_specs_2 = { + sizeof(struct RANParameter_STRUCTURE__sequence_of_ranParameters), + offsetof(struct RANParameter_STRUCTURE__sequence_of_ranParameters, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_sequence_of_ranParameters_2 = { + "sequence-of-ranParameters", + "sequence-of-ranParameters", + &asn_OP_SEQUENCE_OF, + asn_DEF_sequence_of_ranParameters_tags_2, + sizeof(asn_DEF_sequence_of_ranParameters_tags_2) + /sizeof(asn_DEF_sequence_of_ranParameters_tags_2[0]) - 1, /* 1 */ + asn_DEF_sequence_of_ranParameters_tags_2, /* Same as above */ + sizeof(asn_DEF_sequence_of_ranParameters_tags_2) + /sizeof(asn_DEF_sequence_of_ranParameters_tags_2[0]), /* 2 */ + { &asn_OER_type_sequence_of_ranParameters_constr_2, &asn_PER_type_sequence_of_ranParameters_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_sequence_of_ranParameters_2, + 1, /* Single element */ + &asn_SPC_sequence_of_ranParameters_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANParameter_STRUCTURE_1[] = { + { ATF_POINTER, 1, offsetof(struct RANParameter_STRUCTURE, sequence_of_ranParameters), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_sequence_of_ranParameters_2, + 0, + { &asn_OER_memb_sequence_of_ranParameters_constr_2, &asn_PER_memb_sequence_of_ranParameters_constr_2, memb_sequence_of_ranParameters_constraint_1 }, + 0, 0, /* No default value */ + "sequence-of-ranParameters" + }, +}; +static const int asn_MAP_RANParameter_STRUCTURE_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_RANParameter_STRUCTURE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_STRUCTURE_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* sequence-of-ranParameters */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_STRUCTURE_specs_1 = { + sizeof(struct RANParameter_STRUCTURE), + offsetof(struct RANParameter_STRUCTURE, _asn_ctx), + asn_MAP_RANParameter_STRUCTURE_tag2el_1, + 1, /* Count of tags in the map */ + asn_MAP_RANParameter_STRUCTURE_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_STRUCTURE = { + "RANParameter-STRUCTURE", + "RANParameter-STRUCTURE", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_STRUCTURE_tags_1, + sizeof(asn_DEF_RANParameter_STRUCTURE_tags_1) + /sizeof(asn_DEF_RANParameter_STRUCTURE_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_STRUCTURE_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_STRUCTURE_tags_1) + /sizeof(asn_DEF_RANParameter_STRUCTURE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_STRUCTURE_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_STRUCTURE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementFalse.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementFalse.c new file mode 100644 index 0000000..9d08191 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementFalse.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing-Item-Choice-ElementFalse.h" + +#include "RANParameter-Value.h" +asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_ElementFalse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Testing_Item_Choice_ElementFalse, ranParameter_TestCondition), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_TestingCondition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-TestCondition" + }, + { ATF_POINTER, 2, offsetof(struct RANParameter_Testing_Item_Choice_ElementFalse, ranParameter_Value), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_Value, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Value" + }, + { ATF_POINTER, 1, offsetof(struct RANParameter_Testing_Item_Choice_ElementFalse, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_RANParameter_Testing_Item_Choice_ElementFalse_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Testing_Item_Choice_ElementFalse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-TestCondition */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-Value */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_ElementFalse_specs_1 = { + sizeof(struct RANParameter_Testing_Item_Choice_ElementFalse), + offsetof(struct RANParameter_Testing_Item_Choice_ElementFalse, _asn_ctx), + asn_MAP_RANParameter_Testing_Item_Choice_ElementFalse_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RANParameter_Testing_Item_Choice_ElementFalse_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse = { + "RANParameter-Testing-Item-Choice-ElementFalse", + "RANParameter-Testing-Item-Choice-ElementFalse", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse_tags_1, + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Testing_Item_Choice_ElementFalse_1, + 3, /* Elements count */ + &asn_SPC_RANParameter_Testing_Item_Choice_ElementFalse_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementTrue.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementTrue.c new file mode 100644 index 0000000..00d7af6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-ElementTrue.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing-Item-Choice-ElementTrue.h" + +asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_ElementTrue_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Testing_Item_Choice_ElementTrue, ranParameter_value), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_Value, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Testing_Item_Choice_ElementTrue_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_ElementTrue_specs_1 = { + sizeof(struct RANParameter_Testing_Item_Choice_ElementTrue), + offsetof(struct RANParameter_Testing_Item_Choice_ElementTrue, _asn_ctx), + asn_MAP_RANParameter_Testing_Item_Choice_ElementTrue_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue = { + "RANParameter-Testing-Item-Choice-ElementTrue", + "RANParameter-Testing-Item-Choice-ElementTrue", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue_tags_1, + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Testing_Item_Choice_ElementTrue_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_Testing_Item_Choice_ElementTrue_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-List.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-List.c new file mode 100644 index 0000000..e9980c8 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-List.c @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing-Item-Choice-List.h" + +#include "RANParameter-Testing-LIST.h" +asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_List_1[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_Testing_Item_Choice_List, ranParameter_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing_LIST, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_Item_Choice_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Testing_Item_Choice_List_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_List_specs_1 = { + sizeof(struct RANParameter_Testing_Item_Choice_List), + offsetof(struct RANParameter_Testing_Item_Choice_List, _asn_ctx), + asn_MAP_RANParameter_Testing_Item_Choice_List_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_List = { + "RANParameter-Testing-Item-Choice-List", + "RANParameter-Testing-Item-Choice-List", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Testing_Item_Choice_List_tags_1, + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_List_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_List_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_Item_Choice_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_List_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_List_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Testing_Item_Choice_List_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_Testing_Item_Choice_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-Structure.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-Structure.c new file mode 100644 index 0000000..63ffe03 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item-Choice-Structure.c @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing-Item-Choice-Structure.h" + +#include "RANParameter-Testing-STRUCTURE.h" +asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_Choice_Structure_1[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_Testing_Item_Choice_Structure, ranParameter_Structure), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing_STRUCTURE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Structure" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_Item_Choice_Structure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Testing_Item_Choice_Structure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-Structure */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_Choice_Structure_specs_1 = { + sizeof(struct RANParameter_Testing_Item_Choice_Structure), + offsetof(struct RANParameter_Testing_Item_Choice_Structure, _asn_ctx), + asn_MAP_RANParameter_Testing_Item_Choice_Structure_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item_Choice_Structure = { + "RANParameter-Testing-Item-Choice-Structure", + "RANParameter-Testing-Item-Choice-Structure", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Testing_Item_Choice_Structure_tags_1, + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_Structure_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_Structure_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_Item_Choice_Structure_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_Item_Choice_Structure_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_Choice_Structure_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Testing_Item_Choice_Structure_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_Testing_Item_Choice_Structure_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item.c new file mode 100644 index 0000000..809ca14 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing-Item.c @@ -0,0 +1,141 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing-Item.h" + +#include "RANParameter-Testing-Item-Choice-List.h" +#include "RANParameter-Testing-Item-Choice-Structure.h" +#include "RANParameter-Testing-Item-Choice-ElementTrue.h" +#include "RANParameter-Testing-Item-Choice-ElementFalse.h" +static asn_oer_constraints_t asn_OER_type_ranParameter_Type_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ranParameter_Type_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranParameter_Type_3[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_Testing_Item__ranParameter_Type, choice.ranP_Choice_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing_Item_Choice_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-List" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_Testing_Item__ranParameter_Type, choice.ranP_Choice_Structure), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing_Item_Choice_Structure, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-Structure" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_Testing_Item__ranParameter_Type, choice.ranP_Choice_ElementTrue), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing_Item_Choice_ElementTrue, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-ElementTrue" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_Testing_Item__ranParameter_Type, choice.ranP_Choice_ElementFalse), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing_Item_Choice_ElementFalse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-ElementFalse" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ranParameter_Type_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranP-Choice-List */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranP-Choice-Structure */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranP-Choice-ElementTrue */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ranP-Choice-ElementFalse */ +}; +static asn_CHOICE_specifics_t asn_SPC_ranParameter_Type_specs_3 = { + sizeof(struct RANParameter_Testing_Item__ranParameter_Type), + offsetof(struct RANParameter_Testing_Item__ranParameter_Type, _asn_ctx), + offsetof(struct RANParameter_Testing_Item__ranParameter_Type, present), + sizeof(((struct RANParameter_Testing_Item__ranParameter_Type *)0)->present), + asn_MAP_ranParameter_Type_tag2el_3, + 4, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranParameter_Type_3 = { + "ranParameter-Type", + "ranParameter-Type", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ranParameter_Type_constr_3, &asn_PER_type_ranParameter_Type_constr_3, CHOICE_constraint }, + asn_MBR_ranParameter_Type_3, + 4, /* Elements count */ + &asn_SPC_ranParameter_Type_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANParameter_Testing_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Testing_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Testing_Item, ranParameter_Type), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ranParameter_Type_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Type" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Testing_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-Type */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Testing_Item_specs_1 = { + sizeof(struct RANParameter_Testing_Item), + offsetof(struct RANParameter_Testing_Item, _asn_ctx), + asn_MAP_RANParameter_Testing_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_Item = { + "RANParameter-Testing-Item", + "RANParameter-Testing-Item", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_Testing_Item_tags_1, + sizeof(asn_DEF_RANParameter_Testing_Item_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_Item_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_Testing_Item_1, + 2, /* Elements count */ + &asn_SPC_RANParameter_Testing_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing-LIST.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing-LIST.c new file mode 100644 index 0000000..a3a0d98 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing-LIST.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing-LIST.h" + +#include "RANParameter-Testing-Item.h" +static asn_oer_constraints_t asn_OER_type_RANParameter_Testing_LIST_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +asn_per_constraints_t asn_PER_type_RANParameter_Testing_LIST_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANParameter_Testing_LIST_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANParameter_Testing_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_LIST_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RANParameter_Testing_LIST_specs_1 = { + sizeof(struct RANParameter_Testing_LIST), + offsetof(struct RANParameter_Testing_LIST, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_LIST = { + "RANParameter-Testing-LIST", + "RANParameter-Testing-LIST", + &asn_OP_SEQUENCE_OF, + asn_DEF_RANParameter_Testing_LIST_tags_1, + sizeof(asn_DEF_RANParameter_Testing_LIST_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_LIST_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_LIST_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_LIST_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_LIST_tags_1[0]), /* 1 */ + { &asn_OER_type_RANParameter_Testing_LIST_constr_1, &asn_PER_type_RANParameter_Testing_LIST_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RANParameter_Testing_LIST_1, + 1, /* Single element */ + &asn_SPC_RANParameter_Testing_LIST_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing-STRUCTURE.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing-STRUCTURE.c new file mode 100644 index 0000000..b77ecbd --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing-STRUCTURE.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing-STRUCTURE.h" + +#include "RANParameter-Testing-Item.h" +static asn_oer_constraints_t asn_OER_type_RANParameter_Testing_STRUCTURE_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +asn_per_constraints_t asn_PER_type_RANParameter_Testing_STRUCTURE_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANParameter_Testing_STRUCTURE_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANParameter_Testing_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_STRUCTURE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RANParameter_Testing_STRUCTURE_specs_1 = { + sizeof(struct RANParameter_Testing_STRUCTURE), + offsetof(struct RANParameter_Testing_STRUCTURE, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing_STRUCTURE = { + "RANParameter-Testing-STRUCTURE", + "RANParameter-Testing-STRUCTURE", + &asn_OP_SEQUENCE_OF, + asn_DEF_RANParameter_Testing_STRUCTURE_tags_1, + sizeof(asn_DEF_RANParameter_Testing_STRUCTURE_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_STRUCTURE_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_STRUCTURE_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_STRUCTURE_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_STRUCTURE_tags_1[0]), /* 1 */ + { &asn_OER_type_RANParameter_Testing_STRUCTURE_constr_1, &asn_PER_type_RANParameter_Testing_STRUCTURE_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RANParameter_Testing_STRUCTURE_1, + 1, /* Single element */ + &asn_SPC_RANParameter_Testing_STRUCTURE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Testing.c b/Bouncer/e2sm_rc/lib/RANParameter-Testing.c new file mode 100644 index 0000000..4ca5ac9 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Testing.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Testing.h" + +#include "RANParameter-Testing-Item.h" +static asn_oer_constraints_t asn_OER_type_RANParameter_Testing_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..255)) */}; +asn_per_constraints_t asn_PER_type_RANParameter_Testing_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANParameter_Testing_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANParameter_Testing_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_Testing_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RANParameter_Testing_specs_1 = { + sizeof(struct RANParameter_Testing), + offsetof(struct RANParameter_Testing, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Testing = { + "RANParameter-Testing", + "RANParameter-Testing", + &asn_OP_SEQUENCE_OF, + asn_DEF_RANParameter_Testing_tags_1, + sizeof(asn_DEF_RANParameter_Testing_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_Testing_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_Testing_tags_1) + /sizeof(asn_DEF_RANParameter_Testing_tags_1[0]), /* 1 */ + { &asn_OER_type_RANParameter_Testing_constr_1, &asn_PER_type_RANParameter_Testing_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_RANParameter_Testing_1, + 1, /* Single element */ + &asn_SPC_RANParameter_Testing_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-TestingCondition.c b/Bouncer/e2sm_rc/lib/RANParameter-TestingCondition.c new file mode 100644 index 0000000..0aecdeb --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-TestingCondition.c @@ -0,0 +1,179 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-TestingCondition.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_ranP_Choice_comparison_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ranP_Choice_comparison_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ranP_Choice_presence_constr_10 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ranP_Choice_presence_constr_10 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_RANParameter_TestingCondition_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RANParameter_TestingCondition_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_ranP_Choice_comparison_value2enum_2[] = { + { 0, 5, "equal" }, + { 1, 10, "difference" }, + { 2, 11, "greaterthan" }, + { 3, 8, "lessthan" }, + { 4, 8, "contains" }, + { 5, 11, "starts-with" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_ranP_Choice_comparison_enum2value_2[] = { + 4, /* contains(4) */ + 1, /* difference(1) */ + 0, /* equal(0) */ + 2, /* greaterthan(2) */ + 3, /* lessthan(3) */ + 5 /* starts-with(5) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_ranP_Choice_comparison_specs_2 = { + asn_MAP_ranP_Choice_comparison_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_ranP_Choice_comparison_enum2value_2, /* N => "tag"; sorted by N */ + 6, /* Number of elements in the maps */ + 7, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_ranP_Choice_comparison_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_Choice_comparison_2 = { + "ranP-Choice-comparison", + "ranP-Choice-comparison", + &asn_OP_NativeEnumerated, + asn_DEF_ranP_Choice_comparison_tags_2, + sizeof(asn_DEF_ranP_Choice_comparison_tags_2) + /sizeof(asn_DEF_ranP_Choice_comparison_tags_2[0]) - 1, /* 1 */ + asn_DEF_ranP_Choice_comparison_tags_2, /* Same as above */ + sizeof(asn_DEF_ranP_Choice_comparison_tags_2) + /sizeof(asn_DEF_ranP_Choice_comparison_tags_2[0]), /* 2 */ + { &asn_OER_type_ranP_Choice_comparison_constr_2, &asn_PER_type_ranP_Choice_comparison_constr_2, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_ranP_Choice_comparison_specs_2 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_ranP_Choice_presence_value2enum_10[] = { + { 0, 7, "present" }, + { 1, 10, "configured" }, + { 2, 8, "rollover" }, + { 3, 8, "non-zero" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_ranP_Choice_presence_enum2value_10[] = { + 1, /* configured(1) */ + 3, /* non-zero(3) */ + 0, /* present(0) */ + 2 /* rollover(2) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_ranP_Choice_presence_specs_10 = { + asn_MAP_ranP_Choice_presence_value2enum_10, /* "tag" => N; sorted by tag */ + asn_MAP_ranP_Choice_presence_enum2value_10, /* N => "tag"; sorted by N */ + 4, /* Number of elements in the maps */ + 5, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_ranP_Choice_presence_tags_10[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranP_Choice_presence_10 = { + "ranP-Choice-presence", + "ranP-Choice-presence", + &asn_OP_NativeEnumerated, + asn_DEF_ranP_Choice_presence_tags_10, + sizeof(asn_DEF_ranP_Choice_presence_tags_10) + /sizeof(asn_DEF_ranP_Choice_presence_tags_10[0]) - 1, /* 1 */ + asn_DEF_ranP_Choice_presence_tags_10, /* Same as above */ + sizeof(asn_DEF_ranP_Choice_presence_tags_10) + /sizeof(asn_DEF_ranP_Choice_presence_tags_10[0]), /* 2 */ + { &asn_OER_type_ranP_Choice_presence_constr_10, &asn_PER_type_ranP_Choice_presence_constr_10, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_ranP_Choice_presence_specs_10 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RANParameter_TestingCondition_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_TestingCondition, choice.ranP_Choice_comparison), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ranP_Choice_comparison_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-comparison" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_TestingCondition, choice.ranP_Choice_presence), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ranP_Choice_presence_10, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-presence" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_TestingCondition_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranP-Choice-comparison */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranP-Choice-presence */ +}; +asn_CHOICE_specifics_t asn_SPC_RANParameter_TestingCondition_specs_1 = { + sizeof(struct RANParameter_TestingCondition), + offsetof(struct RANParameter_TestingCondition, _asn_ctx), + offsetof(struct RANParameter_TestingCondition, present), + sizeof(((struct RANParameter_TestingCondition *)0)->present), + asn_MAP_RANParameter_TestingCondition_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_TestingCondition = { + "RANParameter-TestingCondition", + "RANParameter-TestingCondition", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_RANParameter_TestingCondition_constr_1, &asn_PER_type_RANParameter_TestingCondition_constr_1, CHOICE_constraint }, + asn_MBR_RANParameter_TestingCondition_1, + 2, /* Elements count */ + &asn_SPC_RANParameter_TestingCondition_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-Value.c b/Bouncer/e2sm_rc/lib/RANParameter-Value.c new file mode 100644 index 0000000..f7f2954 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-Value.c @@ -0,0 +1,105 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-Value.h" + +static asn_oer_constraints_t asn_OER_type_RANParameter_Value_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RANParameter_Value_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANParameter_Value_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Value, choice.valueBoolean), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueBoolean" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Value, choice.valueInt), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueInt" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Value, choice.valueReal), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeReal, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueReal" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Value, choice.valueBitS), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueBitS" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Value, choice.valueOctS), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valueOctS" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_Value, choice.valuePrintableString), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "valuePrintableString" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Value_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* valueBoolean */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* valueInt */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* valueReal */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* valueBitS */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* valueOctS */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* valuePrintableString */ +}; +asn_CHOICE_specifics_t asn_SPC_RANParameter_Value_specs_1 = { + sizeof(struct RANParameter_Value), + offsetof(struct RANParameter_Value, _asn_ctx), + offsetof(struct RANParameter_Value, present), + sizeof(((struct RANParameter_Value *)0)->present), + asn_MAP_RANParameter_Value_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, + 6 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_Value = { + "RANParameter-Value", + "RANParameter-Value", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_RANParameter_Value_constr_1, &asn_PER_type_RANParameter_Value_constr_1, CHOICE_constraint }, + asn_MBR_RANParameter_Value_1, + 6, /* Elements count */ + &asn_SPC_RANParameter_Value_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementFalse.c b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementFalse.c new file mode 100644 index 0000000..3fea9fd --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementFalse.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-ValueType-Choice-ElementFalse.h" + +#include "RANParameter-Value.h" +asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_ElementFalse_1[] = { + { ATF_POINTER, 1, offsetof(struct RANParameter_ValueType_Choice_ElementFalse, ranParameter_value), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_Value, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-value" + }, +}; +static const int asn_MAP_RANParameter_ValueType_Choice_ElementFalse_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_RANParameter_ValueType_Choice_ElementFalse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_ValueType_Choice_ElementFalse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_ElementFalse_specs_1 = { + sizeof(struct RANParameter_ValueType_Choice_ElementFalse), + offsetof(struct RANParameter_ValueType_Choice_ElementFalse, _asn_ctx), + asn_MAP_RANParameter_ValueType_Choice_ElementFalse_tag2el_1, + 1, /* Count of tags in the map */ + asn_MAP_RANParameter_ValueType_Choice_ElementFalse_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_ElementFalse = { + "RANParameter-ValueType-Choice-ElementFalse", + "RANParameter-ValueType-Choice-ElementFalse", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_ValueType_Choice_ElementFalse_tags_1, + sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementFalse_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementFalse_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_ValueType_Choice_ElementFalse_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementFalse_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementFalse_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_ValueType_Choice_ElementFalse_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_ValueType_Choice_ElementFalse_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementTrue.c b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementTrue.c new file mode 100644 index 0000000..3a62139 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-ElementTrue.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-ValueType-Choice-ElementTrue.h" + +asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_ElementTrue_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANParameter_ValueType_Choice_ElementTrue, ranParameter_value), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_Value, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_ValueType_Choice_ElementTrue_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_ValueType_Choice_ElementTrue_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_ElementTrue_specs_1 = { + sizeof(struct RANParameter_ValueType_Choice_ElementTrue), + offsetof(struct RANParameter_ValueType_Choice_ElementTrue, _asn_ctx), + asn_MAP_RANParameter_ValueType_Choice_ElementTrue_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_ElementTrue = { + "RANParameter-ValueType-Choice-ElementTrue", + "RANParameter-ValueType-Choice-ElementTrue", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_ValueType_Choice_ElementTrue_tags_1, + sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementTrue_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementTrue_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_ValueType_Choice_ElementTrue_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementTrue_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_ElementTrue_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_ValueType_Choice_ElementTrue_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_ValueType_Choice_ElementTrue_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-List.c b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-List.c new file mode 100644 index 0000000..08552f1 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-List.c @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-ValueType-Choice-List.h" + +#include "RANParameter-LIST.h" +asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_List_1[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_ValueType_Choice_List, ranParameter_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_LIST, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_ValueType_Choice_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_ValueType_Choice_List_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_List_specs_1 = { + sizeof(struct RANParameter_ValueType_Choice_List), + offsetof(struct RANParameter_ValueType_Choice_List, _asn_ctx), + asn_MAP_RANParameter_ValueType_Choice_List_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_List = { + "RANParameter-ValueType-Choice-List", + "RANParameter-ValueType-Choice-List", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_ValueType_Choice_List_tags_1, + sizeof(asn_DEF_RANParameter_ValueType_Choice_List_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_List_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_ValueType_Choice_List_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_ValueType_Choice_List_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_List_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_ValueType_Choice_List_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_ValueType_Choice_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-Structure.c b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-Structure.c new file mode 100644 index 0000000..d31c52b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-ValueType-Choice-Structure.c @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-ValueType-Choice-Structure.h" + +#include "RANParameter-STRUCTURE.h" +asn_TYPE_member_t asn_MBR_RANParameter_ValueType_Choice_Structure_1[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_ValueType_Choice_Structure, ranParameter_Structure), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_STRUCTURE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Structure" + }, +}; +static const ber_tlv_tag_t asn_DEF_RANParameter_ValueType_Choice_Structure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_ValueType_Choice_Structure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameter-Structure */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANParameter_ValueType_Choice_Structure_specs_1 = { + sizeof(struct RANParameter_ValueType_Choice_Structure), + offsetof(struct RANParameter_ValueType_Choice_Structure, _asn_ctx), + asn_MAP_RANParameter_ValueType_Choice_Structure_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType_Choice_Structure = { + "RANParameter-ValueType-Choice-Structure", + "RANParameter-ValueType-Choice-Structure", + &asn_OP_SEQUENCE, + asn_DEF_RANParameter_ValueType_Choice_Structure_tags_1, + sizeof(asn_DEF_RANParameter_ValueType_Choice_Structure_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_Structure_tags_1[0]), /* 1 */ + asn_DEF_RANParameter_ValueType_Choice_Structure_tags_1, /* Same as above */ + sizeof(asn_DEF_RANParameter_ValueType_Choice_Structure_tags_1) + /sizeof(asn_DEF_RANParameter_ValueType_Choice_Structure_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANParameter_ValueType_Choice_Structure_1, + 1, /* Elements count */ + &asn_SPC_RANParameter_ValueType_Choice_Structure_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANParameter-ValueType.c b/Bouncer/e2sm_rc/lib/RANParameter-ValueType.c new file mode 100644 index 0000000..4e5c2cf --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANParameter-ValueType.c @@ -0,0 +1,89 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANParameter-ValueType.h" + +#include "RANParameter-ValueType-Choice-ElementTrue.h" +#include "RANParameter-ValueType-Choice-ElementFalse.h" +#include "RANParameter-ValueType-Choice-Structure.h" +#include "RANParameter-ValueType-Choice-List.h" +static asn_oer_constraints_t asn_OER_type_RANParameter_ValueType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RANParameter_ValueType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_RANParameter_ValueType_1[] = { + { ATF_POINTER, 0, offsetof(struct RANParameter_ValueType, choice.ranP_Choice_ElementTrue), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType_Choice_ElementTrue, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-ElementTrue" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_ValueType, choice.ranP_Choice_ElementFalse), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType_Choice_ElementFalse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-ElementFalse" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_ValueType, choice.ranP_Choice_Structure), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType_Choice_Structure, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-Structure" + }, + { ATF_POINTER, 0, offsetof(struct RANParameter_ValueType, choice.ranP_Choice_List), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType_Choice_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranP-Choice-List" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_RANParameter_ValueType_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranP-Choice-ElementTrue */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranP-Choice-ElementFalse */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranP-Choice-Structure */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ranP-Choice-List */ +}; +asn_CHOICE_specifics_t asn_SPC_RANParameter_ValueType_specs_1 = { + sizeof(struct RANParameter_ValueType), + offsetof(struct RANParameter_ValueType, _asn_ctx), + offsetof(struct RANParameter_ValueType, present), + sizeof(((struct RANParameter_ValueType *)0)->present), + asn_MAP_RANParameter_ValueType_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_RANParameter_ValueType = { + "RANParameter-ValueType", + "RANParameter-ValueType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_RANParameter_ValueType_constr_1, &asn_PER_type_RANParameter_ValueType_constr_1, CHOICE_constraint }, + asn_MBR_RANParameter_ValueType_1, + 4, /* Elements count */ + &asn_SPC_RANParameter_ValueType_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANUEID.c b/Bouncer/e2sm_rc/lib/RANUEID.c new file mode 100644 index 0000000..0c8e3f0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANUEID.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANUEID.h" + +int +RANUEID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 8)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RANUEID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +asn_per_constraints_t asn_PER_type_RANUEID_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RANUEID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RANUEID = { + "RANUEID", + "RANUEID", + &asn_OP_OCTET_STRING, + asn_DEF_RANUEID_tags_1, + sizeof(asn_DEF_RANUEID_tags_1) + /sizeof(asn_DEF_RANUEID_tags_1[0]), /* 1 */ + asn_DEF_RANUEID_tags_1, /* Same as above */ + sizeof(asn_DEF_RANUEID_tags_1) + /sizeof(asn_DEF_RANUEID_tags_1[0]), /* 1 */ + { &asn_OER_type_RANUEID_constr_1, &asn_PER_type_RANUEID_constr_1, RANUEID_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RANfunction-Name.c b/Bouncer/e2sm_rc/lib/RANfunction-Name.c new file mode 100644 index 0000000..0a6500b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RANfunction-Name.c @@ -0,0 +1,316 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RANfunction-Name.h" + +static const int permitted_alphabet_table_2[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_2[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_2(const void *sptr) { + const int *table = permitted_alphabet_table_2; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static const int permitted_alphabet_table_3[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_3[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_3(const void *sptr) { + const int *table = permitted_alphabet_table_3; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static const int permitted_alphabet_table_4[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_4[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_4(const void *sptr) { + const int *table = permitted_alphabet_table_4; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +static int +memb_ranFunction_ShortName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_2(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_ranFunction_ShortName_2_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_2)/sizeof(permitted_alphabet_table_2[0])) + return -1; + return permitted_alphabet_table_2[value] - 1; +} +static int asn_PER_MAP_ranFunction_ShortName_2_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_2)/sizeof(permitted_alphabet_code2value_2[0])) + return -1; + return permitted_alphabet_code2value_2[code]; +} +static int +memb_ranFunction_E2SM_OID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 1000) + && !check_permitted_alphabet_3(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_ranFunction_E2SM_OID_3_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_3)/sizeof(permitted_alphabet_table_3[0])) + return -1; + return permitted_alphabet_table_3[value] - 1; +} +static int asn_PER_MAP_ranFunction_E2SM_OID_3_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_3)/sizeof(permitted_alphabet_code2value_3[0])) + return -1; + return permitted_alphabet_code2value_3[code]; +} +static int +memb_ranFunction_Description_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_4(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_ranFunction_Description_4_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_4)/sizeof(permitted_alphabet_table_4[0])) + return -1; + return permitted_alphabet_table_4[value] - 1; +} +static int asn_PER_MAP_ranFunction_Description_4_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_4)/sizeof(permitted_alphabet_code2value_4[0])) + return -1; + return permitted_alphabet_code2value_4[code]; +} +static asn_oer_constraints_t asn_OER_memb_ranFunction_ShortName_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_ranFunction_ShortName_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_ranFunction_ShortName_2_v2c, /* Value to PER code map */ + asn_PER_MAP_ranFunction_ShortName_2_c2v /* PER code to value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranFunction_E2SM_OID_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_ranFunction_E2SM_OID_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1000 } /* (SIZE(1..1000,...)) */, + asn_PER_MAP_ranFunction_E2SM_OID_3_v2c, /* Value to PER code map */ + asn_PER_MAP_ranFunction_E2SM_OID_3_c2v /* PER code to value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranFunction_Description_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_ranFunction_Description_constr_4 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_ranFunction_Description_4_v2c, /* Value to PER code map */ + asn_PER_MAP_ranFunction_Description_4_c2v /* PER code to value map */ +}; +asn_TYPE_member_t asn_MBR_RANfunction_Name_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Name, ranFunction_ShortName), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { &asn_OER_memb_ranFunction_ShortName_constr_2, &asn_PER_memb_ranFunction_ShortName_constr_2, memb_ranFunction_ShortName_constraint_1 }, + 0, 0, /* No default value */ + "ranFunction-ShortName" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Name, ranFunction_E2SM_OID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { &asn_OER_memb_ranFunction_E2SM_OID_constr_3, &asn_PER_memb_ranFunction_E2SM_OID_constr_3, memb_ranFunction_E2SM_OID_constraint_1 }, + 0, 0, /* No default value */ + "ranFunction-E2SM-OID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Name, ranFunction_Description), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PrintableString, + 0, + { &asn_OER_memb_ranFunction_Description_constr_4, &asn_PER_memb_ranFunction_Description_constr_4, memb_ranFunction_Description_constraint_1 }, + 0, 0, /* No default value */ + "ranFunction-Description" + }, + { ATF_POINTER, 1, offsetof(struct RANfunction_Name, ranFunction_Instance), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranFunction-Instance" + }, +}; +static const int asn_MAP_RANfunction_Name_oms_1[] = { 3 }; +static const ber_tlv_tag_t asn_DEF_RANfunction_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANfunction_Name_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunction-ShortName */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranFunction-E2SM-OID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranFunction-Description */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ranFunction-Instance */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Name_specs_1 = { + sizeof(struct RANfunction_Name), + offsetof(struct RANfunction_Name, _asn_ctx), + asn_MAP_RANfunction_Name_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_RANfunction_Name_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RANfunction_Name = { + "RANfunction-Name", + "RANfunction-Name", + &asn_OP_SEQUENCE, + asn_DEF_RANfunction_Name_tags_1, + sizeof(asn_DEF_RANfunction_Name_tags_1) + /sizeof(asn_DEF_RANfunction_Name_tags_1[0]), /* 1 */ + asn_DEF_RANfunction_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunction_Name_tags_1) + /sizeof(asn_DEF_RANfunction_Name_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RANfunction_Name_1, + 4, /* Elements count */ + &asn_SPC_RANfunction_Name_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/REAL.c b/Bouncer/e2sm_rc/lib/REAL.c new file mode 100644 index 0000000..e3daf37 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/REAL.c @@ -0,0 +1,1028 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#define _ISOC99_SOURCE /* For ilogb() and quiet NAN */ +#ifndef _BSD_SOURCE +#define _BSD_SOURCE /* To reintroduce finite(3) */ +#endif +#include +#if defined(__alpha) +#include /* For INFINITY */ +#endif +#include /* for strtod(3) */ +#include +#include +#include +#include +#include + +#undef INT_MAX +#define INT_MAX ((int)(((unsigned int)-1) >> 1)) + +#if !(defined(NAN) || defined(INFINITY)) +static volatile double real_zero CC_NOTUSED = 0.0; +#endif +#ifndef NAN +#define NAN (0.0/0.0) +#endif +#ifndef INFINITY +#define INFINITY (1.0/0.0) +#endif + +#if defined(__clang__) +/* + * isnan() is defined using generic selections and won't compile in + * strict C89 mode because of too fancy system's standard library. + * However, prior to C11 the math had a perfectly working isnan() + * in the math library. + * Disable generic selection warning so we can test C89 mode with newer libc. + */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc11-extensions" +static int asn_isnan(double d) { + return isnan(d); +} +static int asn_isfinite(double d) { +#ifdef isfinite + return isfinite(d); /* ISO C99 */ +#else + return finite(d); /* Deprecated on Mac OS X 10.9 */ +#endif +} +#pragma clang diagnostic pop +#else /* !clang */ +#define asn_isnan(v) isnan(v) +#ifdef isfinite +#define asn_isfinite(d) isfinite(d) /* ISO C99 */ +#else +#define asn_isfinite(d) finite(d) /* Deprecated on Mac OS X 10.9 */ +#endif +#endif /* clang */ + +/* + * REAL basic type description. + */ +static const ber_tlv_tag_t asn_DEF_REAL_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) +}; +asn_TYPE_operation_t asn_OP_REAL = { + ASN__PRIMITIVE_TYPE_free, + REAL_print, + REAL_compare, + ber_decode_primitive, + der_encode_primitive, + REAL_decode_xer, + REAL_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + REAL_decode_oer, + REAL_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + REAL_decode_uper, + REAL_encode_uper, + REAL_decode_aper, + REAL_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + REAL_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_REAL = { + "REAL", + "REAL", + &asn_OP_REAL, + asn_DEF_REAL_tags, + sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]), + asn_DEF_REAL_tags, /* Same as above */ + sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]), + { 0, 0, asn_generic_no_constraint }, + 0, + 0, /* No members */ + 0 /* No specifics */ +}; + +typedef enum specialRealValue { + SRV__NOT_A_NUMBER, + SRV__MINUS_INFINITY, + SRV__PLUS_INFINITY +} specialRealValue_e; +static struct specialRealValue_s { + char *string; + size_t length; + long dv; +} specialRealValue[] = { +#define SRV_SET(foo, val) { foo, sizeof(foo) - 1, val } + SRV_SET("", 0), + SRV_SET("", -1), + SRV_SET("", 1), +#undef SRV_SET +}; + +ssize_t +REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key) { + char local_buf[64]; + char *buf = local_buf; + ssize_t buflen = sizeof(local_buf); + const char *fmt = canonical ? "%.17E" /* Precise */ : "%.15f" /* Pleasant*/; + ssize_t ret; + + /* + * Check whether it is a special value. + */ + /* fpclassify(3) is not portable yet */ + if(asn_isnan(d)) { + buf = specialRealValue[SRV__NOT_A_NUMBER].string; + buflen = specialRealValue[SRV__NOT_A_NUMBER].length; + return (cb(buf, buflen, app_key) < 0) ? -1 : buflen; + } else if(!asn_isfinite(d)) { + if(copysign(1.0, d) < 0.0) { + buf = specialRealValue[SRV__MINUS_INFINITY].string; + buflen = specialRealValue[SRV__MINUS_INFINITY].length; + } else { + buf = specialRealValue[SRV__PLUS_INFINITY].string; + buflen = specialRealValue[SRV__PLUS_INFINITY].length; + } + return (cb(buf, buflen, app_key) < 0) ? -1 : buflen; + } else if(ilogb(d) <= -INT_MAX) { + if(copysign(1.0, d) < 0.0) { + buf = "-0"; + buflen = 2; + } else { + buf = "0"; + buflen = 1; + } + return (cb(buf, buflen, app_key) < 0) ? -1 : buflen; + } + + /* + * Use the libc's double printing, hopefully they got it right. + */ + do { + ret = snprintf(buf, buflen, fmt, d); + if(ret < 0) { + /* There are some old broken APIs. */ + buflen <<= 1; + if(buflen > 4096) { + /* Should be plenty. */ + if(buf != local_buf) FREEMEM(buf); + return -1; + } + } else if(ret >= buflen) { + buflen = ret + 1; + } else { + buflen = ret; + break; + } + if(buf != local_buf) FREEMEM(buf); + buf = (char *)MALLOC(buflen); + if(!buf) return -1; + } while(1); + + if(canonical) { + /* + * Transform the "[-]d.dddE+-dd" output into "[-]d.dddE[-]d" + * Check that snprintf() constructed the output correctly. + */ + char *dot; + char *end = buf + buflen; + char *last_zero; + char *first_zero_in_run; + char *s; + + enum { + LZSTATE_NOTHING, + LZSTATE_ZEROES + } lz_state = LZSTATE_NOTHING; + + dot = (buf[0] == 0x2d /* '-' */) ? (buf + 2) : (buf + 1); + if(*dot >= 0x30) { + if(buf != local_buf) FREEMEM(buf); + errno = EINVAL; + return -1; /* Not a dot, really */ + } + *dot = 0x2e; /* Replace possible comma */ + + for(first_zero_in_run = last_zero = s = dot + 2; s < end; s++) { + switch(*s) { + case 0x45: /* 'E' */ + if(lz_state == LZSTATE_ZEROES) last_zero = first_zero_in_run; + break; + case 0x30: /* '0' */ + if(lz_state == LZSTATE_NOTHING) first_zero_in_run = s; + lz_state = LZSTATE_ZEROES; + continue; + default: + lz_state = LZSTATE_NOTHING; + continue; + } + break; + } + + if(s == end) { + if(buf != local_buf) FREEMEM(buf); + errno = EINVAL; + return -1; /* No promised E */ + } + + assert(*s == 0x45); + { + char *E = s; + char *expptr = ++E; + char *s = expptr; + int sign; + + if(*expptr == 0x2b /* '+' */) { + /* Skip the "+" */ + buflen -= 1; + sign = 0; + } else { + sign = 1; + s++; + } + expptr++; + if(expptr > end) { + if(buf != local_buf) FREEMEM(buf); + errno = EINVAL; + return -1; + } + if(*expptr == 0x30) { + buflen--; + expptr++; + } + if(lz_state == LZSTATE_ZEROES) { + *last_zero = 0x45; /* E */ + buflen -= s - (last_zero + 1); + s = last_zero + 1; + if(sign) { + *s++ = 0x2d /* '-' */; + buflen++; + } + } + for(; expptr <= end; s++, expptr++) + *s = *expptr; + } + } else { + /* + * Remove trailing zeros. + */ + char *end = buf + buflen; + char *last_zero = end; + int stoplooking = 0; + char *z; + for(z = end - 1; z > buf; z--) { + switch(*z) { + case 0x30: + if(!stoplooking) + last_zero = z; + continue; + case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + stoplooking = 1; + continue; + default: /* Catch dot and other separators */ + /* + * Replace possible comma (which may even + * be not a comma at all: locale-defined). + */ + *z = 0x2e; + if(last_zero == z + 1) { /* leave x.0 */ + last_zero++; + } + buflen = last_zero - buf; + *last_zero = '\0'; + break; + } + break; + } + } + + ret = cb(buf, buflen, app_key); + if(buf != local_buf) FREEMEM(buf); + return (ret < 0) ? -1 : buflen; +} + +int +REAL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + ssize_t ret; + double d; + + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(!st || !st->buf) + ret = cb("", 8, app_key); + else if(asn_REAL2double(st, &d)) + ret = cb("", 7, app_key); + else + ret = REAL__dump(d, 0, cb, app_key); + + return (ret < 0) ? -1 : 0; +} + +int +REAL_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const REAL_t *a = aptr; + const REAL_t *b = bptr; + + (void)td; + + if(a && b) { + double adbl, bdbl; + int ra, rb; + ra = asn_REAL2double(a, &adbl); + rb = asn_REAL2double(b, &bdbl); + if(ra == 0 && rb == 0) { + if(asn_isnan(adbl)) { + if(asn_isnan(bdbl)) { + return 0; + } else { + return -1; + } + } else if(asn_isnan(bdbl)) { + return 1; + } + /* Value comparison. */ + if(adbl < bdbl) { + return -1; + } else if(adbl > bdbl) { + return 1; + } else { + return 0; + } + } else if(ra) { + return -1; + } else { + return 1; + } + } else if(!a) { + return -1; + } else { + return 1; + } +} + +asn_enc_rval_t +REAL_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + double d; + + (void)ilevel; + + if(!st || !st->buf || asn_REAL2double(st, &d)) + ASN__ENCODE_FAILED; + + er.encoded = REAL__dump(d, flags & XER_F_CANONICAL, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + + +/* + * Decode the chunk of XML text encoding REAL. + */ +static enum xer_pbd_rval +REAL__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + REAL_t *st = (REAL_t *)sptr; + double value; + const char *xerdata = (const char *)chunk_buf; + char *endptr = 0; + char *b; + + (void)td; + + if(!chunk_size) return XPBD_BROKEN_ENCODING; + + /* + * Decode an XMLSpecialRealValue: , etc. + */ + if(xerdata[0] == 0x3c /* '<' */) { + size_t i; + for(i = 0; i < sizeof(specialRealValue) + / sizeof(specialRealValue[0]); i++) { + struct specialRealValue_s *srv = &specialRealValue[i]; + double dv; + + if(srv->length != chunk_size + || memcmp(srv->string, chunk_buf, chunk_size)) + continue; + + /* + * It could've been done using + * (double)srv->dv / real_zero, + * but it summons fp exception on some platforms. + */ + switch(srv->dv) { + case -1: dv = - INFINITY; break; + case 0: dv = NAN; break; + case 1: dv = INFINITY; break; + default: return XPBD_SYSTEM_FAILURE; + } + + if(asn_double2REAL(st, dv)) + return XPBD_SYSTEM_FAILURE; + + return XPBD_BODY_CONSUMED; + } + ASN_DEBUG("Unknown XMLSpecialRealValue"); + return XPBD_BROKEN_ENCODING; + } + + /* + * Copy chunk into the nul-terminated string, and run strtod. + */ + b = (char *)MALLOC(chunk_size + 1); + if(!b) return XPBD_SYSTEM_FAILURE; + memcpy(b, chunk_buf, chunk_size); + b[chunk_size] = 0; /* nul-terminate */ + + value = strtod(b, &endptr); + FREEMEM(b); + if(endptr == b) return XPBD_BROKEN_ENCODING; + + if(asn_double2REAL(st, value)) + return XPBD_SYSTEM_FAILURE; + + return XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +REAL_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + return xer_decode_primitive(opt_codec_ctx, td, + sptr, sizeof(REAL_t), opt_mname, + buf_ptr, size, REAL__xer_body_decode); +} + +int +asn_REAL2double(const REAL_t *st, double *dbl_value) { + unsigned int octv; + + if(!st || !st->buf) { + errno = EINVAL; + return -1; + } + + if(st->size == 0) { + *dbl_value = 0; + return 0; + } + + octv = st->buf[0]; /* unsigned byte */ + + switch(octv & 0xC0) { + case 0x40: /* X.690: 8.5.6 a) => 8.5.9 */ + /* "SpecialRealValue" */ + + /* Be liberal in what you accept... + * http://en.wikipedia.org/wiki/Robustness_principle + if(st->size != 1) ... + */ + + switch(st->buf[0]) { + case 0x40: /* 01000000: PLUS-INFINITY */ + *dbl_value = INFINITY; + return 0; + case 0x41: /* 01000001: MINUS-INFINITY */ + *dbl_value = - INFINITY; + return 0; + case 0x42: /* 01000010: NOT-A-NUMBER */ + *dbl_value = NAN; + return 0; + case 0x43: /* 01000011: minus zero */ + *dbl_value = -0.0; + return 0; + } + + errno = EINVAL; + return -1; + case 0x00: { /* X.690: 8.5.7 */ + /* + * Decimal. NR{1,2,3} format from ISO 6093. + * NR1: [ ]*[+-]?[0-9]+ + * NR2: [ ]*[+-]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+) + * NR3: [ ]*[+-]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)[Ee][+-]?[0-9]+ + */ + double d; + char *source = 0; + char *endptr; + int used_malloc = 0; + + if(octv == 0 || (octv & 0x3C)) { + /* Remaining values of bits 6 to 1 are Reserved. */ + errno = EINVAL; + return -1; + } + + /* 1. By contract, an input buffer should be '\0'-terminated. + * OCTET STRING decoder ensures that, as is asn_double2REAL(). + * 2. ISO 6093 specifies COMMA as a possible decimal separator. + * However, strtod() can't always deal with COMMA. + * So her we fix both by reallocating, copying and fixing. + */ + if(st->buf[st->size] != '\0' || memchr(st->buf, ',', st->size)) { + const uint8_t *p, *end; + char *b; + + b = source = (char *)MALLOC(st->size + 1); + if(!source) return -1; + used_malloc = 1; + + /* Copy without the first byte and with 0-termination */ + for(p = st->buf + 1, end = st->buf + st->size; + p < end; b++, p++) + *b = (*p == ',') ? '.' : *p; + *b = '\0'; + } else { + source = (char *)&st->buf[1]; + } + + endptr = source; + d = strtod(source, &endptr); + if(*endptr != '\0') { + /* Format is not consistent with ISO 6093 */ + if(used_malloc) FREEMEM(source); + errno = EINVAL; + return -1; + } + if(used_malloc) FREEMEM(source); + if(asn_isfinite(d)) { + *dbl_value = d; + return 0; + } else { + errno = ERANGE; + return -1; + } + } + } + + /* + * Binary representation. + */ + { + double m; + int32_t expval; /* exponent value */ + unsigned int elen; /* exponent value length, in octets */ + int scaleF; + int baseF; + uint8_t *ptr; + uint8_t *end; + int sign; + + switch((octv & 0x30) >> 4) { + case 0x00: baseF = 1; break; /* base 2 */ + case 0x01: baseF = 3; break; /* base 8 */ + case 0x02: baseF = 4; break; /* base 16 */ + default: + /* Reserved field, can't parse now. */ + errno = EINVAL; + return -1; + } + + sign = (octv & 0x40); /* bit 7 */ + scaleF = (octv & 0x0C) >> 2; /* bits 4 to 3 */ + + if(st->size <= 1 + (octv & 0x03)) { + errno = EINVAL; + return -1; + } + + elen = (octv & 0x03); /* bits 2 to 1; 8.5.6.4 */ + if(elen == 0x03) { /* bits 2 to 1 = 11; 8.5.6.4, case d) */ + elen = st->buf[1]; /* unsigned binary number */ + if(elen == 0 || st->size <= (2 + elen)) { + errno = EINVAL; + return -1; + } + /* FIXME: verify constraints of case d) */ + ptr = &st->buf[2]; + } else { + ptr = &st->buf[1]; + } + + /* Fetch the multibyte exponent */ + expval = (int)(*(int8_t *)ptr); + if(elen >= sizeof(expval)-1) { + errno = ERANGE; + return -1; + } + end = ptr + elen + 1; + for(ptr++; ptr < end; ptr++) + expval = (expval * 256) + *ptr; + + m = 0.0; /* Initial mantissa value */ + + /* Okay, the exponent is here. Now, what about mantissa? */ + end = st->buf + st->size; + for(; ptr < end; ptr++) + m = ldexp(m, 8) + *ptr; + + if(0) + ASN_DEBUG("m=%.10f, scF=%d, bF=%d, expval=%d, ldexp()=%f, ldexp()=%f\n", + m, scaleF, baseF, expval, + ldexp(m, expval * baseF + scaleF), + ldexp(m, scaleF) * pow(pow(2, baseF), expval) + ); + + /* + * (S * N * 2^F) * B^E + * Essentially: + m = ldexp(m, scaleF) * pow(pow(2, baseF), expval); + */ + m = ldexp(m, expval * baseF + scaleF); + if(asn_isfinite(m)) { + *dbl_value = sign ? -m : m; + } else { + errno = ERANGE; + return -1; + } + + } /* if(binary_format) */ + + return 0; +} + +/* + * Assume IEEE 754 floating point: standard 64 bit double. + * [1 bit sign] [11 bits exponent] [52 bits mantissa] + */ +int +asn_double2REAL(REAL_t *st, double dbl_value) { + double test = -0.0; + int float_big_endian = *(const char *)&test != 0; + uint8_t buf[16]; /* More than enough for 8-byte dbl_value */ + uint8_t dscr[sizeof(dbl_value)]; /* double value scratch pad */ + /* Assertion guards: won't even compile, if unexpected double size */ + char assertion_buffer1[9 - sizeof(dbl_value)] CC_NOTUSED; + char assertion_buffer2[sizeof(dbl_value) - 7] CC_NOTUSED; + uint8_t *ptr = buf; + uint8_t *mstop; /* Last byte of mantissa */ + unsigned int mval; /* Value of the last byte of mantissa */ + unsigned int bmsign; /* binary mask with sign */ + unsigned int buflen; + unsigned int accum; + int expval; + + if(!st) { + errno = EINVAL; + return -1; + } + + /* + * ilogb(+-0) returns -INT_MAX or INT_MIN (platform-dependent) + * ilogb(+-inf) returns INT_MAX, logb(+-inf) returns +inf + * ilogb(NaN) returns INT_MIN or INT_MAX (platform-dependent) + */ + expval = ilogb(dbl_value); + if(expval <= -INT_MAX /* Also catches +-0 and maybe isnan() */ + || expval == INT_MAX /* catches isfin() and maybe isnan() */ + ) { + if(!st->buf || st->size < 2) { + ptr = (uint8_t *)MALLOC(2); + if(!ptr) return -1; + if(st->buf) FREEMEM(st->buf); + st->buf = ptr; + } + /* fpclassify(3) is not portable yet */ + if(asn_isnan(dbl_value)) { + st->buf[0] = 0x42; /* NaN */ + st->buf[1] = 0; + st->size = 1; + } else if(!asn_isfinite(dbl_value)) { + if(copysign(1.0, dbl_value) < 0.0) { + st->buf[0] = 0x41; /* MINUS-INFINITY */ + } else { + st->buf[0] = 0x40; /* PLUS-INFINITY */ + } + st->buf[1] = 0; + st->size = 1; + } else { + if(copysign(1.0, dbl_value) >= 0.0) { + /* no content octets: positive zero */ + st->buf[0] = 0; /* JIC */ + st->size = 0; + } else { + /* Negative zero. #8.5.3, 8.5.9 */ + st->buf[0] = 0x43; + st->buf[1] = 0; + st->size = 1; + } + } + return 0; + } + + if(float_big_endian) { + uint8_t *s = ((uint8_t *)&dbl_value) + 1; + uint8_t *end = ((uint8_t *)&dbl_value) + sizeof(double); + uint8_t *d; + + bmsign = 0x80 | ((s[-1] >> 1) & 0x40); /* binary mask & - */ + for(mstop = d = dscr; s < end; d++, s++) { + *d = *s; + if(*d) mstop = d; + } + } else { + uint8_t *s = ((uint8_t *)&dbl_value) + sizeof(dbl_value) - 2; + uint8_t *start = ((uint8_t *)&dbl_value); + uint8_t *d; + + bmsign = 0x80 | ((s[1] >> 1) & 0x40); /* binary mask & - */ + for(mstop = d = dscr; s >= start; d++, s--) { + *d = *s; + if(*d) mstop = d; + } + } + + /* Remove parts of the exponent, leave mantissa and explicit 1. */ + dscr[0] = 0x10 | (dscr[0] & 0x0f); + + /* Adjust exponent in a very unobvious way */ + expval -= 8 * ((mstop - dscr) + 1) - 4; + + /* This loop ensures DER conformance by forcing mantissa odd: 11.3.1 */ + mval = *mstop; + if(mval && !(mval & 1)) { + int shift_count = 1; + int ishift; + uint8_t *mptr; + + /* + * Figure out what needs to be done to make mantissa odd. + */ + if(!(mval & 0x0f)) /* Speed-up a little */ + shift_count = 4; + while(((mval >> shift_count) & 1) == 0) + shift_count++; + + ishift = 8 - shift_count; + accum = 0; + + /* Go over the buffer, shifting it shift_count bits right. */ + for(mptr = dscr; mptr <= mstop; mptr++) { + mval = *mptr; + *mptr = accum | (mval >> shift_count); + accum = mval << ishift; + } + + /* Adjust exponent appropriately. */ + expval += shift_count; + } + + if(expval < 0) { + if((expval >> 7) == -1) { + *ptr++ = bmsign | 0x00; + *ptr++ = expval; + } else if((expval >> 15) == -1) { + *ptr++ = bmsign | 0x01; + *ptr++ = expval >> 8; + *ptr++ = expval; + } else { + *ptr++ = bmsign | 0x02; + *ptr++ = expval >> 16; + *ptr++ = expval >> 8; + *ptr++ = expval; + } + } else if(expval <= 0x7f) { + *ptr++ = bmsign | 0x00; + *ptr++ = expval; + } else if(expval <= 0x7fff) { + *ptr++ = bmsign | 0x01; + *ptr++ = expval >> 8; + *ptr++ = expval; + } else { + assert(expval <= 0x7fffff); + *ptr++ = bmsign | 0x02; + *ptr++ = expval >> 16; + *ptr++ = expval >> 8; + *ptr++ = expval; + } + + buflen = (mstop - dscr) + 1; + memcpy(ptr, dscr, buflen); + ptr += buflen; + buflen = ptr - buf; + + ptr = (uint8_t *)MALLOC(buflen + 1); + if(!ptr) return -1; + + memcpy(ptr, buf, buflen); + buf[buflen] = 0; /* JIC */ + + if(st->buf) FREEMEM(st->buf); + st->buf = ptr; + st->size = buflen; + + return 0; +} + +int CC_ATTR_NO_SANITIZE("float-cast-overflow") +asn_double2float(double d, float *outcome) { + float f = d; + + *outcome = f; + + if(asn_isfinite(d) == asn_isfinite(f)) { + return 0; + } else { + return -1; + } +} + +#ifndef ASN_DISABLE_OER_SUPPORT + +/* + * Encode as Canonical OER + */ +asn_enc_rval_t +REAL_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const REAL_t *st = sptr; + asn_enc_rval_t er = {0,0,0}; + ssize_t len_len; + + if(!st || !st->buf || !td) + ASN__ENCODE_FAILED; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* If we're constrained to a narrow float/double representation, we + * shouldn't have ended up using REAL. Expecting NativeReal. */ + ASN__ENCODE_FAILED; + } + + /* Encode a fake REAL */ + len_len = oer_serialize_length(st->size, cb, app_key); + if(len_len < 0 || cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + er.encoded = len_len + st->size; + ASN__ENCODED_OK(er); + } +} + +asn_dec_rval_t +REAL_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + asn_dec_rval_t ok = {RC_OK, 0}; + REAL_t *st; + uint8_t *buf; + ssize_t len_len; + size_t real_body_len; + + (void)opt_codec_ctx; + + if(!constraints) constraints = td->encoding_constraints.oer_constraints; + if(constraints && constraints->value.width != 0) { + /* If we're constrained to a narrow float/double representation, we + * shouldn't have ended up using REAL. Expecting NativeReal. */ + ASN__DECODE_FAILED; + } + + len_len = oer_fetch_length(ptr, size, &real_body_len); + if(len_len < 0) ASN__DECODE_FAILED; + if(len_len == 0) ASN__DECODE_STARVED; + + ptr = (const char *)ptr + len_len; + size -= len_len; + + if(real_body_len > size) ASN__DECODE_STARVED; + + buf = CALLOC(1, real_body_len + 1); + if(!buf) ASN__DECODE_FAILED; + + if(!(st = *sptr)) { + st = (*sptr = CALLOC(1, sizeof(REAL_t))); + if(!st) { + FREEMEM(buf); + ASN__DECODE_FAILED; + } + } else { + FREEMEM(st->buf); + } + + memcpy(buf, ptr, real_body_len); + buf[real_body_len] = '\0'; + + st->buf = buf; + st->size = real_body_len; + + ok.consumed = len_len + real_body_len; + return ok; +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +REAL_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_decode_uper(opt_codec_ctx, td, 0, sptr, pd); +} + +asn_enc_rval_t +REAL_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_encode_uper(td, 0, sptr, po); +} + +asn_dec_rval_t +REAL_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_decode_aper(opt_codec_ctx, td, 0, sptr, pd); +} + +asn_enc_rval_t +REAL_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + (void)constraints; /* No PER visible constraints */ + return OCTET_STRING_encode_aper(td, 0, sptr, po); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +asn_random_fill_result_t +REAL_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + static const double values[] = { + 0, -0.0, -1, 1, -M_E, M_E, -3.14, 3.14, -M_PI, M_PI, -255, 255, + /* 2^51 */ + -2251799813685248.0, 2251799813685248.0, + /* 2^52 */ + -4503599627370496.0, 4503599627370496.0, + /* 2^100 */ + -1267650600228229401496703205376.0, 1267650600228229401496703205376.0, + -FLT_MIN, FLT_MIN, + -FLT_MAX, FLT_MAX, + -DBL_MIN, DBL_MIN, + -DBL_MAX, DBL_MAX, +#ifdef FLT_TRUE_MIN + -FLT_TRUE_MIN, FLT_TRUE_MIN, +#endif +#ifdef DBL_TRUE_MIN + -DBL_TRUE_MIN, DBL_TRUE_MIN, +#endif + INFINITY, -INFINITY, NAN}; + REAL_t *st; + double d; + + (void)constraints; + + if(max_length == 0) return result_skipped; + + d = values[asn_random_between(0, sizeof(values) / sizeof(values[0]) - 1)]; + + if(*sptr) { + st = *sptr; + } else { + st = (REAL_t*)(*sptr = CALLOC(1, sizeof(REAL_t))); + if(!st) { + return result_failed; + } + } + + if(asn_double2REAL(st, d)) { + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + return result_failed; + } + + result_ok.length = st->size; + return result_ok; +} + diff --git a/Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-ID.c b/Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-ID.c new file mode 100644 index 0000000..8862f12 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-CallProcessBreakpoint-ID.h" + +int +RIC_CallProcessBreakpoint_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_CallProcessBreakpoint_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_CallProcessBreakpoint_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_CallProcessBreakpoint_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessBreakpoint_ID = { + "RIC-CallProcessBreakpoint-ID", + "RIC-CallProcessBreakpoint-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_CallProcessBreakpoint_ID_tags_1, + sizeof(asn_DEF_RIC_CallProcessBreakpoint_ID_tags_1) + /sizeof(asn_DEF_RIC_CallProcessBreakpoint_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_CallProcessBreakpoint_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_CallProcessBreakpoint_ID_tags_1) + /sizeof(asn_DEF_RIC_CallProcessBreakpoint_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_CallProcessBreakpoint_ID_constr_1, &asn_PER_type_RIC_CallProcessBreakpoint_ID_constr_1, RIC_CallProcessBreakpoint_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-Name.c b/Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-Name.c new file mode 100644 index 0000000..31bd5af --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-CallProcessBreakpoint-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-CallProcessBreakpoint-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RIC_CallProcessBreakpoint_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RIC_CallProcessBreakpoint_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RIC_CallProcessBreakpoint_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_CallProcessBreakpoint_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_RIC_CallProcessBreakpoint_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RIC_CallProcessBreakpoint_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RIC_CallProcessBreakpoint_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_CallProcessBreakpoint_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessBreakpoint_Name = { + "RIC-CallProcessBreakpoint-Name", + "RIC-CallProcessBreakpoint-Name", + &asn_OP_PrintableString, + asn_DEF_RIC_CallProcessBreakpoint_Name_tags_1, + sizeof(asn_DEF_RIC_CallProcessBreakpoint_Name_tags_1) + /sizeof(asn_DEF_RIC_CallProcessBreakpoint_Name_tags_1[0]), /* 1 */ + asn_DEF_RIC_CallProcessBreakpoint_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_CallProcessBreakpoint_Name_tags_1) + /sizeof(asn_DEF_RIC_CallProcessBreakpoint_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_CallProcessBreakpoint_Name_constr_1, &asn_PER_type_RIC_CallProcessBreakpoint_Name_constr_1, RIC_CallProcessBreakpoint_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-CallProcessType-ID.c b/Bouncer/e2sm_rc/lib/RIC-CallProcessType-ID.c new file mode 100644 index 0000000..90cd336 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-CallProcessType-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-CallProcessType-ID.h" + +int +RIC_CallProcessType_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_CallProcessType_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_CallProcessType_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_CallProcessType_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessType_ID = { + "RIC-CallProcessType-ID", + "RIC-CallProcessType-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_CallProcessType_ID_tags_1, + sizeof(asn_DEF_RIC_CallProcessType_ID_tags_1) + /sizeof(asn_DEF_RIC_CallProcessType_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_CallProcessType_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_CallProcessType_ID_tags_1) + /sizeof(asn_DEF_RIC_CallProcessType_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_CallProcessType_ID_constr_1, &asn_PER_type_RIC_CallProcessType_ID_constr_1, RIC_CallProcessType_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-CallProcessType-Name.c b/Bouncer/e2sm_rc/lib/RIC-CallProcessType-Name.c new file mode 100644 index 0000000..b1e469c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-CallProcessType-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-CallProcessType-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RIC_CallProcessType_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RIC_CallProcessType_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RIC_CallProcessType_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_CallProcessType_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_RIC_CallProcessType_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RIC_CallProcessType_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RIC_CallProcessType_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_CallProcessType_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_CallProcessType_Name = { + "RIC-CallProcessType-Name", + "RIC-CallProcessType-Name", + &asn_OP_PrintableString, + asn_DEF_RIC_CallProcessType_Name_tags_1, + sizeof(asn_DEF_RIC_CallProcessType_Name_tags_1) + /sizeof(asn_DEF_RIC_CallProcessType_Name_tags_1[0]), /* 1 */ + asn_DEF_RIC_CallProcessType_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_CallProcessType_Name_tags_1) + /sizeof(asn_DEF_RIC_CallProcessType_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_CallProcessType_Name_constr_1, &asn_PER_type_RIC_CallProcessType_Name_constr_1, RIC_CallProcessType_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-ControlAction-ID.c b/Bouncer/e2sm_rc/lib/RIC-ControlAction-ID.c new file mode 100644 index 0000000..4f75ce6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-ControlAction-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-ControlAction-ID.h" + +int +RIC_ControlAction_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_ControlAction_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_ControlAction_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_ControlAction_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_ControlAction_ID = { + "RIC-ControlAction-ID", + "RIC-ControlAction-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_ControlAction_ID_tags_1, + sizeof(asn_DEF_RIC_ControlAction_ID_tags_1) + /sizeof(asn_DEF_RIC_ControlAction_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_ControlAction_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_ControlAction_ID_tags_1) + /sizeof(asn_DEF_RIC_ControlAction_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_ControlAction_ID_constr_1, &asn_PER_type_RIC_ControlAction_ID_constr_1, RIC_ControlAction_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-ControlAction-Name.c b/Bouncer/e2sm_rc/lib/RIC-ControlAction-Name.c new file mode 100644 index 0000000..f4ded20 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-ControlAction-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-ControlAction-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RIC_ControlAction_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RIC_ControlAction_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RIC_ControlAction_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_ControlAction_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_RIC_ControlAction_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RIC_ControlAction_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RIC_ControlAction_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_ControlAction_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_ControlAction_Name = { + "RIC-ControlAction-Name", + "RIC-ControlAction-Name", + &asn_OP_PrintableString, + asn_DEF_RIC_ControlAction_Name_tags_1, + sizeof(asn_DEF_RIC_ControlAction_Name_tags_1) + /sizeof(asn_DEF_RIC_ControlAction_Name_tags_1[0]), /* 1 */ + asn_DEF_RIC_ControlAction_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_ControlAction_Name_tags_1) + /sizeof(asn_DEF_RIC_ControlAction_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_ControlAction_Name_constr_1, &asn_PER_type_RIC_ControlAction_Name_constr_1, RIC_ControlAction_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-EventTrigger-Cell-ID.c b/Bouncer/e2sm_rc/lib/RIC-EventTrigger-Cell-ID.c new file mode 100644 index 0000000..606246b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-EventTrigger-Cell-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-EventTrigger-Cell-ID.h" + +int +RIC_EventTrigger_Cell_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_EventTrigger_Cell_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_EventTrigger_Cell_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_EventTrigger_Cell_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_EventTrigger_Cell_ID = { + "RIC-EventTrigger-Cell-ID", + "RIC-EventTrigger-Cell-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_EventTrigger_Cell_ID_tags_1, + sizeof(asn_DEF_RIC_EventTrigger_Cell_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTrigger_Cell_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_EventTrigger_Cell_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_EventTrigger_Cell_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTrigger_Cell_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_EventTrigger_Cell_ID_constr_1, &asn_PER_type_RIC_EventTrigger_Cell_ID_constr_1, RIC_EventTrigger_Cell_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-EventTrigger-UE-ID.c b/Bouncer/e2sm_rc/lib/RIC-EventTrigger-UE-ID.c new file mode 100644 index 0000000..c3f8c9e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-EventTrigger-UE-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-EventTrigger-UE-ID.h" + +int +RIC_EventTrigger_UE_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_EventTrigger_UE_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_EventTrigger_UE_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_EventTrigger_UE_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_EventTrigger_UE_ID = { + "RIC-EventTrigger-UE-ID", + "RIC-EventTrigger-UE-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_EventTrigger_UE_ID_tags_1, + sizeof(asn_DEF_RIC_EventTrigger_UE_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTrigger_UE_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_EventTrigger_UE_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_EventTrigger_UE_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTrigger_UE_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_EventTrigger_UE_ID_constr_1, &asn_PER_type_RIC_EventTrigger_UE_ID_constr_1, RIC_EventTrigger_UE_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-EventTrigger-UEevent-ID.c b/Bouncer/e2sm_rc/lib/RIC-EventTrigger-UEevent-ID.c new file mode 100644 index 0000000..f7f958f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-EventTrigger-UEevent-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-EventTrigger-UEevent-ID.h" + +int +RIC_EventTrigger_UEevent_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_EventTrigger_UEevent_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_EventTrigger_UEevent_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_EventTrigger_UEevent_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_EventTrigger_UEevent_ID = { + "RIC-EventTrigger-UEevent-ID", + "RIC-EventTrigger-UEevent-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_EventTrigger_UEevent_ID_tags_1, + sizeof(asn_DEF_RIC_EventTrigger_UEevent_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTrigger_UEevent_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_EventTrigger_UEevent_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_EventTrigger_UEevent_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTrigger_UEevent_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_EventTrigger_UEevent_ID_constr_1, &asn_PER_type_RIC_EventTrigger_UEevent_ID_constr_1, RIC_EventTrigger_UEevent_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-EventTriggerCondition-ID.c b/Bouncer/e2sm_rc/lib/RIC-EventTriggerCondition-ID.c new file mode 100644 index 0000000..524c369 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-EventTriggerCondition-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-EventTriggerCondition-ID.h" + +int +RIC_EventTriggerCondition_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_EventTriggerCondition_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_EventTriggerCondition_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_EventTriggerCondition_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_EventTriggerCondition_ID = { + "RIC-EventTriggerCondition-ID", + "RIC-EventTriggerCondition-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_EventTriggerCondition_ID_tags_1, + sizeof(asn_DEF_RIC_EventTriggerCondition_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTriggerCondition_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_EventTriggerCondition_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_EventTriggerCondition_ID_tags_1) + /sizeof(asn_DEF_RIC_EventTriggerCondition_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_EventTriggerCondition_ID_constr_1, &asn_PER_type_RIC_EventTriggerCondition_ID_constr_1, RIC_EventTriggerCondition_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-Format-Type.c b/Bouncer/e2sm_rc/lib/RIC-Format-Type.c new file mode 100644 index 0000000..076cd46 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-Format-Type.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-Format-Type.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RIC_Format_Type_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_Format_Type = { + "RIC-Format-Type", + "RIC-Format-Type", + &asn_OP_NativeInteger, + asn_DEF_RIC_Format_Type_tags_1, + sizeof(asn_DEF_RIC_Format_Type_tags_1) + /sizeof(asn_DEF_RIC_Format_Type_tags_1[0]), /* 1 */ + asn_DEF_RIC_Format_Type_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_Format_Type_tags_1) + /sizeof(asn_DEF_RIC_Format_Type_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-InsertIndication-ID.c b/Bouncer/e2sm_rc/lib/RIC-InsertIndication-ID.c new file mode 100644 index 0000000..6f0e628 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-InsertIndication-ID.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-InsertIndication-ID.h" + +int +RIC_InsertIndication_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 65535)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_InsertIndication_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RIC_InsertIndication_ID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 16, 16, 1, 65535 } /* (1..65535,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_InsertIndication_ID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_InsertIndication_ID = { + "RIC-InsertIndication-ID", + "RIC-InsertIndication-ID", + &asn_OP_NativeInteger, + asn_DEF_RIC_InsertIndication_ID_tags_1, + sizeof(asn_DEF_RIC_InsertIndication_ID_tags_1) + /sizeof(asn_DEF_RIC_InsertIndication_ID_tags_1[0]), /* 1 */ + asn_DEF_RIC_InsertIndication_ID_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_InsertIndication_ID_tags_1) + /sizeof(asn_DEF_RIC_InsertIndication_ID_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_InsertIndication_ID_constr_1, &asn_PER_type_RIC_InsertIndication_ID_constr_1, RIC_InsertIndication_ID_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-InsertIndication-Name.c b/Bouncer/e2sm_rc/lib/RIC-InsertIndication-Name.c new file mode 100644 index 0000000..c25d94c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-InsertIndication-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-InsertIndication-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RIC_InsertIndication_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RIC_InsertIndication_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RIC_InsertIndication_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_InsertIndication_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_RIC_InsertIndication_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RIC_InsertIndication_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RIC_InsertIndication_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_InsertIndication_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_InsertIndication_Name = { + "RIC-InsertIndication-Name", + "RIC-InsertIndication-Name", + &asn_OP_PrintableString, + asn_DEF_RIC_InsertIndication_Name_tags_1, + sizeof(asn_DEF_RIC_InsertIndication_Name_tags_1) + /sizeof(asn_DEF_RIC_InsertIndication_Name_tags_1[0]), /* 1 */ + asn_DEF_RIC_InsertIndication_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_InsertIndication_Name_tags_1) + /sizeof(asn_DEF_RIC_InsertIndication_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_InsertIndication_Name_constr_1, &asn_PER_type_RIC_InsertIndication_Name_constr_1, RIC_InsertIndication_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-PolicyAction-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/RIC-PolicyAction-RANParameter-Item.c new file mode 100644 index 0000000..24af0e3 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-PolicyAction-RANParameter-Item.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-PolicyAction-RANParameter-Item.h" + +asn_TYPE_member_t asn_MBR_RIC_PolicyAction_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RIC_PolicyAction_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RIC_PolicyAction_RANParameter_Item, ranParameter_valueType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_RANParameter_ValueType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-valueType" + }, +}; +static const ber_tlv_tag_t asn_DEF_RIC_PolicyAction_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RIC_PolicyAction_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameter-valueType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RIC_PolicyAction_RANParameter_Item_specs_1 = { + sizeof(struct RIC_PolicyAction_RANParameter_Item), + offsetof(struct RIC_PolicyAction_RANParameter_Item, _asn_ctx), + asn_MAP_RIC_PolicyAction_RANParameter_Item_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RIC_PolicyAction_RANParameter_Item = { + "RIC-PolicyAction-RANParameter-Item", + "RIC-PolicyAction-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_RIC_PolicyAction_RANParameter_Item_tags_1, + sizeof(asn_DEF_RIC_PolicyAction_RANParameter_Item_tags_1) + /sizeof(asn_DEF_RIC_PolicyAction_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_RIC_PolicyAction_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_PolicyAction_RANParameter_Item_tags_1) + /sizeof(asn_DEF_RIC_PolicyAction_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RIC_PolicyAction_RANParameter_Item_1, + 2, /* Elements count */ + &asn_SPC_RIC_PolicyAction_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-PolicyAction.c b/Bouncer/e2sm_rc/lib/RIC-PolicyAction.c new file mode 100644 index 0000000..7ecde8c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-PolicyAction.c @@ -0,0 +1,203 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-PolicyAction.h" + +#include "RIC-PolicyAction-RANParameter-Item.h" +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static int +memb_ranParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 65535)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_ranParameters_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_type_ranParameters_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_ric_PolicyDecision_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_ric_PolicyDecision_constr_6 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_ranParameters_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +static asn_per_constraints_t asn_PER_memb_ranParameters_List_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ranParameters_List_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RIC_PolicyAction_RANParameter_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ranParameters_List_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_ranParameters_List_specs_3 = { + sizeof(struct RIC_PolicyAction__ranParameters_List), + offsetof(struct RIC_PolicyAction__ranParameters_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ranParameters_List_3 = { + "ranParameters-List", + "ranParameters-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_ranParameters_List_tags_3, + sizeof(asn_DEF_ranParameters_List_tags_3) + /sizeof(asn_DEF_ranParameters_List_tags_3[0]) - 1, /* 1 */ + asn_DEF_ranParameters_List_tags_3, /* Same as above */ + sizeof(asn_DEF_ranParameters_List_tags_3) + /sizeof(asn_DEF_ranParameters_List_tags_3[0]), /* 2 */ + { &asn_OER_type_ranParameters_List_constr_3, &asn_PER_type_ranParameters_List_constr_3, SEQUENCE_OF_constraint }, + asn_MBR_ranParameters_List_3, + 1, /* Single element */ + &asn_SPC_ranParameters_List_specs_3 /* Additional specs */ +}; + +static const asn_INTEGER_enum_map_t asn_MAP_ric_PolicyDecision_value2enum_6[] = { + { 0, 6, "accept" }, + { 1, 6, "reject" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_ric_PolicyDecision_enum2value_6[] = { + 0, /* accept(0) */ + 1 /* reject(1) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_ric_PolicyDecision_specs_6 = { + asn_MAP_ric_PolicyDecision_value2enum_6, /* "tag" => N; sorted by tag */ + asn_MAP_ric_PolicyDecision_enum2value_6, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_ric_PolicyDecision_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ric_PolicyDecision_6 = { + "ric-PolicyDecision", + "ric-PolicyDecision", + &asn_OP_NativeEnumerated, + asn_DEF_ric_PolicyDecision_tags_6, + sizeof(asn_DEF_ric_PolicyDecision_tags_6) + /sizeof(asn_DEF_ric_PolicyDecision_tags_6[0]) - 1, /* 1 */ + asn_DEF_ric_PolicyDecision_tags_6, /* Same as above */ + sizeof(asn_DEF_ric_PolicyDecision_tags_6) + /sizeof(asn_DEF_ric_PolicyDecision_tags_6[0]), /* 2 */ + { &asn_OER_type_ric_PolicyDecision_constr_6, &asn_PER_type_ric_PolicyDecision_constr_6, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_ric_PolicyDecision_specs_6 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RIC_PolicyAction_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RIC_PolicyAction, ric_PolicyAction_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RIC_ControlAction_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyAction-ID" + }, + { ATF_POINTER, 2, offsetof(struct RIC_PolicyAction, ranParameters_List), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_ranParameters_List_3, + 0, + { &asn_OER_memb_ranParameters_List_constr_3, &asn_PER_memb_ranParameters_List_constr_3, memb_ranParameters_List_constraint_1 }, + 0, 0, /* No default value */ + "ranParameters-List" + }, + { ATF_POINTER, 1, offsetof(struct RIC_PolicyAction, ric_PolicyDecision), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ric_PolicyDecision_6, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ric-PolicyDecision" + }, +}; +static const int asn_MAP_RIC_PolicyAction_oms_1[] = { 1, 2 }; +static const ber_tlv_tag_t asn_DEF_RIC_PolicyAction_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RIC_PolicyAction_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-PolicyAction-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameters-List */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ric-PolicyDecision */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RIC_PolicyAction_specs_1 = { + sizeof(struct RIC_PolicyAction), + offsetof(struct RIC_PolicyAction, _asn_ctx), + asn_MAP_RIC_PolicyAction_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RIC_PolicyAction_oms_1, /* Optional members */ + 1, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RIC_PolicyAction = { + "RIC-PolicyAction", + "RIC-PolicyAction", + &asn_OP_SEQUENCE, + asn_DEF_RIC_PolicyAction_tags_1, + sizeof(asn_DEF_RIC_PolicyAction_tags_1) + /sizeof(asn_DEF_RIC_PolicyAction_tags_1[0]), /* 1 */ + asn_DEF_RIC_PolicyAction_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_PolicyAction_tags_1) + /sizeof(asn_DEF_RIC_PolicyAction_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RIC_PolicyAction_1, + 3, /* Elements count */ + &asn_SPC_RIC_PolicyAction_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-Style-Name.c b/Bouncer/e2sm_rc/lib/RIC-Style-Name.c new file mode 100644 index 0000000..68d3fcf --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-Style-Name.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-Style-Name.h" + +static const int permitted_alphabet_table_1[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ +10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ + 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ +38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ + 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ +64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ +}; +static const int permitted_alphabet_code2value_1[74] = { +32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, +55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, +75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, +97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, +113,114,115,116,117,118,119,120,121,122,}; + + +static int check_permitted_alphabet_1(const void *sptr) { + const int *table = permitted_alphabet_table_1; + /* The underlying type is PrintableString */ + const PrintableString_t *st = (const PrintableString_t *)sptr; + const uint8_t *ch = st->buf; + const uint8_t *end = ch + st->size; + + for(; ch < end; ch++) { + uint8_t cv = *ch; + if(!table[cv]) return -1; + } + return 0; +} + +int +RIC_Style_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const PrintableString_t *st = (const PrintableString_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size >= 1 && size <= 150) + && !check_permitted_alphabet_1(st)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int asn_PER_MAP_RIC_Style_Name_1_v2c(unsigned int value) { + if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) + return -1; + return permitted_alphabet_table_1[value] - 1; +} +static int asn_PER_MAP_RIC_Style_Name_1_c2v(unsigned int code) { + if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) + return -1; + return permitted_alphabet_code2value_1[code]; +} +/* + * This type is implemented using PrintableString, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RIC_Style_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +asn_per_constraints_t asn_PER_type_RIC_Style_Name_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, + asn_PER_MAP_RIC_Style_Name_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RIC_Style_Name_1_c2v /* PER code to value map */ +}; +static const ber_tlv_tag_t asn_DEF_RIC_Style_Name_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_Style_Name = { + "RIC-Style-Name", + "RIC-Style-Name", + &asn_OP_PrintableString, + asn_DEF_RIC_Style_Name_tags_1, + sizeof(asn_DEF_RIC_Style_Name_tags_1) + /sizeof(asn_DEF_RIC_Style_Name_tags_1[0]), /* 1 */ + asn_DEF_RIC_Style_Name_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_Style_Name_tags_1) + /sizeof(asn_DEF_RIC_Style_Name_tags_1[0]), /* 1 */ + { &asn_OER_type_RIC_Style_Name_constr_1, &asn_PER_type_RIC_Style_Name_constr_1, RIC_Style_Name_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RIC-Style-Type.c b/Bouncer/e2sm_rc/lib/RIC-Style-Type.c new file mode 100644 index 0000000..a8795ed --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RIC-Style-Type.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RIC-Style-Type.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_RIC_Style_Type_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RIC_Style_Type = { + "RIC-Style-Type", + "RIC-Style-Type", + &asn_OP_NativeInteger, + asn_DEF_RIC_Style_Type_tags_1, + sizeof(asn_DEF_RIC_Style_Type_tags_1) + /sizeof(asn_DEF_RIC_Style_Type_tags_1[0]), /* 1 */ + asn_DEF_RIC_Style_Type_tags_1, /* Same as above */ + sizeof(asn_DEF_RIC_Style_Type_tags_1) + /sizeof(asn_DEF_RIC_Style_Type_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RRC-MessageID.c b/Bouncer/e2sm_rc/lib/RRC-MessageID.c new file mode 100644 index 0000000..def80c0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RRC-MessageID.c @@ -0,0 +1,117 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RRC-MessageID.h" + +static asn_oer_constraints_t asn_OER_type_rrcType_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_rrcType_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_rrcType_2[] = { + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID__rrcType, choice.lTE), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RRCclass_LTE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "lTE" + }, + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID__rrcType, choice.nR), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RRCclass_NR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_rrcType_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* lTE */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* nR */ +}; +static asn_CHOICE_specifics_t asn_SPC_rrcType_specs_2 = { + sizeof(struct RRC_MessageID__rrcType), + offsetof(struct RRC_MessageID__rrcType, _asn_ctx), + offsetof(struct RRC_MessageID__rrcType, present), + sizeof(((struct RRC_MessageID__rrcType *)0)->present), + asn_MAP_rrcType_tag2el_2, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_rrcType_2 = { + "rrcType", + "rrcType", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_rrcType_constr_2, &asn_PER_type_rrcType_constr_2, CHOICE_constraint }, + asn_MBR_rrcType_2, + 2, /* Elements count */ + &asn_SPC_rrcType_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RRC_MessageID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID, rrcType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_rrcType_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "rrcType" + }, + { ATF_NOFLAGS, 0, offsetof(struct RRC_MessageID, messageID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "messageID" + }, +}; +static const ber_tlv_tag_t asn_DEF_RRC_MessageID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RRC_MessageID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rrcType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* messageID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RRC_MessageID_specs_1 = { + sizeof(struct RRC_MessageID), + offsetof(struct RRC_MessageID, _asn_ctx), + asn_MAP_RRC_MessageID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_RRC_MessageID = { + "RRC-MessageID", + "RRC-MessageID", + &asn_OP_SEQUENCE, + asn_DEF_RRC_MessageID_tags_1, + sizeof(asn_DEF_RRC_MessageID_tags_1) + /sizeof(asn_DEF_RRC_MessageID_tags_1[0]), /* 1 */ + asn_DEF_RRC_MessageID_tags_1, /* Same as above */ + sizeof(asn_DEF_RRC_MessageID_tags_1) + /sizeof(asn_DEF_RRC_MessageID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_RRC_MessageID_1, + 2, /* Elements count */ + &asn_SPC_RRC_MessageID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RRC-State.c b/Bouncer/e2sm_rc/lib/RRC-State.c new file mode 100644 index 0000000..8a0268f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RRC-State.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RRC-State.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RRC_State_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RRC_State_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RRC_State_value2enum_1[] = { + { 0, 13, "rrc-connected" }, + { 1, 12, "rrc-inactive" }, + { 2, 8, "rrc-idle" }, + { 3, 3, "any" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RRC_State_enum2value_1[] = { + 3, /* any(3) */ + 0, /* rrc-connected(0) */ + 2, /* rrc-idle(2) */ + 1 /* rrc-inactive(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RRC_State_specs_1 = { + asn_MAP_RRC_State_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RRC_State_enum2value_1, /* N => "tag"; sorted by N */ + 4, /* Number of elements in the maps */ + 5, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RRC_State_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RRC_State = { + "RRC-State", + "RRC-State", + &asn_OP_NativeEnumerated, + asn_DEF_RRC_State_tags_1, + sizeof(asn_DEF_RRC_State_tags_1) + /sizeof(asn_DEF_RRC_State_tags_1[0]), /* 1 */ + asn_DEF_RRC_State_tags_1, /* Same as above */ + sizeof(asn_DEF_RRC_State_tags_1) + /sizeof(asn_DEF_RRC_State_tags_1[0]), /* 1 */ + { &asn_OER_type_RRC_State_constr_1, &asn_PER_type_RRC_State_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RRC_State_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RRCclass-LTE.c b/Bouncer/e2sm_rc/lib/RRCclass-LTE.c new file mode 100644 index 0000000..308dc4d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RRCclass-LTE.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RRCclass-LTE.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RRCclass_LTE_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RRCclass_LTE_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 11 } /* (0..11,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RRCclass_LTE_value2enum_1[] = { + { 0, 8, "bCCH-BCH" }, + { 1, 13, "bCCH-BCH-MBMS" }, + { 2, 11, "bCCH-DL-SCH" }, + { 3, 14, "bCCH-DL-SCH-BR" }, + { 4, 16, "bCCH-DL-SCH-MBMS" }, + { 5, 4, "mCCH" }, + { 6, 4, "pCCH" }, + { 7, 7, "dL-CCCH" }, + { 8, 7, "dL-DCCH" }, + { 9, 7, "uL-CCCH" }, + { 10, 7, "uL-DCCH" }, + { 11, 7, "sC-MCCH" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RRCclass_LTE_enum2value_1[] = { + 0, /* bCCH-BCH(0) */ + 1, /* bCCH-BCH-MBMS(1) */ + 2, /* bCCH-DL-SCH(2) */ + 3, /* bCCH-DL-SCH-BR(3) */ + 4, /* bCCH-DL-SCH-MBMS(4) */ + 7, /* dL-CCCH(7) */ + 8, /* dL-DCCH(8) */ + 5, /* mCCH(5) */ + 6, /* pCCH(6) */ + 11, /* sC-MCCH(11) */ + 9, /* uL-CCCH(9) */ + 10 /* uL-DCCH(10) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RRCclass_LTE_specs_1 = { + asn_MAP_RRCclass_LTE_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RRCclass_LTE_enum2value_1, /* N => "tag"; sorted by N */ + 12, /* Number of elements in the maps */ + 13, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RRCclass_LTE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RRCclass_LTE = { + "RRCclass-LTE", + "RRCclass-LTE", + &asn_OP_NativeEnumerated, + asn_DEF_RRCclass_LTE_tags_1, + sizeof(asn_DEF_RRCclass_LTE_tags_1) + /sizeof(asn_DEF_RRCclass_LTE_tags_1[0]), /* 1 */ + asn_DEF_RRCclass_LTE_tags_1, /* Same as above */ + sizeof(asn_DEF_RRCclass_LTE_tags_1) + /sizeof(asn_DEF_RRCclass_LTE_tags_1[0]), /* 1 */ + { &asn_OER_type_RRCclass_LTE_constr_1, &asn_PER_type_RRCclass_LTE_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RRCclass_LTE_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/RRCclass-NR.c b/Bouncer/e2sm_rc/lib/RRCclass-NR.c new file mode 100644 index 0000000..3abb82c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/RRCclass-NR.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "RRCclass-NR.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_RRCclass_NR_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_RRCclass_NR_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 7 } /* (0..7,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const asn_INTEGER_enum_map_t asn_MAP_RRCclass_NR_value2enum_1[] = { + { 0, 8, "bCCH-BCH" }, + { 1, 11, "bCCH-DL-SCH" }, + { 2, 7, "dL-CCCH" }, + { 3, 7, "dL-DCCH" }, + { 4, 4, "pCCH" }, + { 5, 7, "uL-CCCH" }, + { 6, 8, "uL-CCCH1" }, + { 7, 7, "uL-DCCH" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_RRCclass_NR_enum2value_1[] = { + 0, /* bCCH-BCH(0) */ + 1, /* bCCH-DL-SCH(1) */ + 2, /* dL-CCCH(2) */ + 3, /* dL-DCCH(3) */ + 4, /* pCCH(4) */ + 5, /* uL-CCCH(5) */ + 6, /* uL-CCCH1(6) */ + 7 /* uL-DCCH(7) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_RRCclass_NR_specs_1 = { + asn_MAP_RRCclass_NR_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_RRCclass_NR_enum2value_1, /* N => "tag"; sorted by N */ + 8, /* Number of elements in the maps */ + 9, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_RRCclass_NR_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_RRCclass_NR = { + "RRCclass-NR", + "RRCclass-NR", + &asn_OP_NativeEnumerated, + asn_DEF_RRCclass_NR_tags_1, + sizeof(asn_DEF_RRCclass_NR_tags_1) + /sizeof(asn_DEF_RRCclass_NR_tags_1[0]), /* 1 */ + asn_DEF_RRCclass_NR_tags_1, /* Same as above */ + sizeof(asn_DEF_RRCclass_NR_tags_1) + /sizeof(asn_DEF_RRCclass_NR_tags_1[0]), /* 1 */ + { &asn_OER_type_RRCclass_NR_constr_1, &asn_PER_type_RRCclass_NR_constr_1, NativeEnumerated_constraint }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_RRCclass_NR_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/Report-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/Report-RANParameter-Item.c new file mode 100644 index 0000000..a23c352 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/Report-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "Report-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_Report_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Report_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct Report_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct Report_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_Report_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_Report_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Report_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Report_RANParameter_Item_specs_1 = { + sizeof(struct Report_RANParameter_Item), + offsetof(struct Report_RANParameter_Item, _asn_ctx), + asn_MAP_Report_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Report_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Report_RANParameter_Item = { + "Report-RANParameter-Item", + "Report-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_Report_RANParameter_Item_tags_1, + sizeof(asn_DEF_Report_RANParameter_Item_tags_1) + /sizeof(asn_DEF_Report_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_Report_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_Report_RANParameter_Item_tags_1) + /sizeof(asn_DEF_Report_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_Report_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_Report_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/S-NSSAI.c b/Bouncer/e2sm_rc/lib/S-NSSAI.c new file mode 100644 index 0000000..be6f24f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/S-NSSAI.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "S-NSSAI.h" + +static asn_TYPE_member_t asn_MBR_S_NSSAI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct S_NSSAI, sST), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SST, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sST" + }, + { ATF_POINTER, 1, offsetof(struct S_NSSAI, sD), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SD, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "sD" + }, +}; +static const int asn_MAP_S_NSSAI_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_S_NSSAI_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_S_NSSAI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sST */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sD */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_S_NSSAI_specs_1 = { + sizeof(struct S_NSSAI), + offsetof(struct S_NSSAI, _asn_ctx), + asn_MAP_S_NSSAI_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_S_NSSAI_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_S_NSSAI = { + "S-NSSAI", + "S-NSSAI", + &asn_OP_SEQUENCE, + asn_DEF_S_NSSAI_tags_1, + sizeof(asn_DEF_S_NSSAI_tags_1) + /sizeof(asn_DEF_S_NSSAI_tags_1[0]), /* 1 */ + asn_DEF_S_NSSAI_tags_1, /* Same as above */ + sizeof(asn_DEF_S_NSSAI_tags_1) + /sizeof(asn_DEF_S_NSSAI_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_S_NSSAI_1, + 2, /* Elements count */ + &asn_SPC_S_NSSAI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/SD.c b/Bouncer/e2sm_rc/lib/SD.c new file mode 100644 index 0000000..16a511f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/SD.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "SD.h" + +int +SD_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 3)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_SD_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +asn_per_constraints_t asn_PER_type_SD_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_SD_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_SD = { + "SD", + "SD", + &asn_OP_OCTET_STRING, + asn_DEF_SD_tags_1, + sizeof(asn_DEF_SD_tags_1) + /sizeof(asn_DEF_SD_tags_1[0]), /* 1 */ + asn_DEF_SD_tags_1, /* Same as above */ + sizeof(asn_DEF_SD_tags_1) + /sizeof(asn_DEF_SD_tags_1[0]), /* 1 */ + { &asn_OER_type_SD_constr_1, &asn_PER_type_SD_constr_1, SD_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/SST.c b/Bouncer/e2sm_rc/lib/SST.c new file mode 100644 index 0000000..793581f --- /dev/null +++ b/Bouncer/e2sm_rc/lib/SST.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "SST.h" + +int +SST_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size == 1)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_SST_constr_1 CC_NOTUSED = { + { 0, 0 }, + 1 /* (SIZE(1..1)) */}; +asn_per_constraints_t asn_PER_type_SST_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_SST_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_SST = { + "SST", + "SST", + &asn_OP_OCTET_STRING, + asn_DEF_SST_tags_1, + sizeof(asn_DEF_SST_tags_1) + /sizeof(asn_DEF_SST_tags_1[0]), /* 1 */ + asn_DEF_SST_tags_1, /* Same as above */ + sizeof(asn_DEF_SST_tags_1) + /sizeof(asn_DEF_SST_tags_1[0]), /* 1 */ + { &asn_OER_type_SST_constr_1, &asn_PER_type_SST_constr_1, SST_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/ServingCell-ARFCN.c b/Bouncer/e2sm_rc/lib/ServingCell-ARFCN.c new file mode 100644 index 0000000..9f6505e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ServingCell-ARFCN.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "ServingCell-ARFCN.h" + +#include "NR-ARFCN.h" +static asn_oer_constraints_t asn_OER_type_ServingCell_ARFCN_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ServingCell_ARFCN_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ServingCell_ARFCN_1[] = { + { ATF_POINTER, 0, offsetof(struct ServingCell_ARFCN, choice.nR), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR" + }, + { ATF_NOFLAGS, 0, offsetof(struct ServingCell_ARFCN, choice.eUTRA), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E_UTRA_ARFCN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ServingCell_ARFCN_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nR */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRA */ +}; +asn_CHOICE_specifics_t asn_SPC_ServingCell_ARFCN_specs_1 = { + sizeof(struct ServingCell_ARFCN), + offsetof(struct ServingCell_ARFCN, _asn_ctx), + offsetof(struct ServingCell_ARFCN, present), + sizeof(((struct ServingCell_ARFCN *)0)->present), + asn_MAP_ServingCell_ARFCN_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ServingCell_ARFCN = { + "ServingCell-ARFCN", + "ServingCell-ARFCN", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ServingCell_ARFCN_constr_1, &asn_PER_type_ServingCell_ARFCN_constr_1, CHOICE_constraint }, + asn_MBR_ServingCell_ARFCN_1, + 2, /* Elements count */ + &asn_SPC_ServingCell_ARFCN_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/ServingCell-PCI.c b/Bouncer/e2sm_rc/lib/ServingCell-PCI.c new file mode 100644 index 0000000..045bc14 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ServingCell-PCI.c @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "ServingCell-PCI.h" + +static asn_oer_constraints_t asn_OER_type_ServingCell_PCI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ServingCell_PCI_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_ServingCell_PCI_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ServingCell_PCI, choice.nR), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NR_PCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "nR" + }, + { ATF_NOFLAGS, 0, offsetof(struct ServingCell_PCI, choice.eUTRA), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E_UTRA_PCI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eUTRA" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_ServingCell_PCI_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nR */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eUTRA */ +}; +asn_CHOICE_specifics_t asn_SPC_ServingCell_PCI_specs_1 = { + sizeof(struct ServingCell_PCI), + offsetof(struct ServingCell_PCI, _asn_ctx), + offsetof(struct ServingCell_PCI, present), + sizeof(((struct ServingCell_PCI *)0)->present), + asn_MAP_ServingCell_PCI_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_ServingCell_PCI = { + "ServingCell-PCI", + "ServingCell-PCI", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_ServingCell_PCI_constr_1, &asn_PER_type_ServingCell_PCI_constr_1, CHOICE_constraint }, + asn_MBR_ServingCell_PCI_1, + 2, /* Elements count */ + &asn_SPC_ServingCell_PCI_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/SubscriberProfileIDforRFP.c b/Bouncer/e2sm_rc/lib/SubscriberProfileIDforRFP.c new file mode 100644 index 0000000..5674389 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/SubscriberProfileIDforRFP.c @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "SubscriberProfileIDforRFP.h" + +int +SubscriberProfileIDforRFP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 256)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static asn_oer_constraints_t asn_OER_type_SubscriberProfileIDforRFP_constr_1 CC_NOTUSED = { + { 2, 1 } /* (1..256) */, + -1}; +static asn_per_constraints_t asn_PER_type_SubscriberProfileIDforRFP_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (1..256) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_SubscriberProfileIDforRFP_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_SubscriberProfileIDforRFP = { + "SubscriberProfileIDforRFP", + "SubscriberProfileIDforRFP", + &asn_OP_NativeInteger, + asn_DEF_SubscriberProfileIDforRFP_tags_1, + sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1) + /sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1[0]), /* 1 */ + asn_DEF_SubscriberProfileIDforRFP_tags_1, /* Same as above */ + sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1) + /sizeof(asn_DEF_SubscriberProfileIDforRFP_tags_1[0]), /* 1 */ + { &asn_OER_type_SubscriberProfileIDforRFP_constr_1, &asn_PER_type_SubscriberProfileIDforRFP_constr_1, SubscriberProfileIDforRFP_constraint }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/Bouncer/e2sm_rc/lib/SupportedSULBandList.c b/Bouncer/e2sm_rc/lib/SupportedSULBandList.c new file mode 100644 index 0000000..5055593 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/SupportedSULBandList.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "SupportedSULBandList.h" + +#include "SupportedSULFreqBandItem.h" +static asn_oer_constraints_t asn_OER_type_SupportedSULBandList_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..32)) */}; +asn_per_constraints_t asn_PER_type_SupportedSULBandList_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 0, 32 } /* (SIZE(0..32)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_SupportedSULBandList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_SupportedSULFreqBandItem, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_SupportedSULBandList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_SupportedSULBandList_specs_1 = { + sizeof(struct SupportedSULBandList), + offsetof(struct SupportedSULBandList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_SupportedSULBandList = { + "SupportedSULBandList", + "SupportedSULBandList", + &asn_OP_SEQUENCE_OF, + asn_DEF_SupportedSULBandList_tags_1, + sizeof(asn_DEF_SupportedSULBandList_tags_1) + /sizeof(asn_DEF_SupportedSULBandList_tags_1[0]), /* 1 */ + asn_DEF_SupportedSULBandList_tags_1, /* Same as above */ + sizeof(asn_DEF_SupportedSULBandList_tags_1) + /sizeof(asn_DEF_SupportedSULBandList_tags_1[0]), /* 1 */ + { &asn_OER_type_SupportedSULBandList_constr_1, &asn_PER_type_SupportedSULBandList_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_SupportedSULBandList_1, + 1, /* Single element */ + &asn_SPC_SupportedSULBandList_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/SupportedSULFreqBandItem.c b/Bouncer/e2sm_rc/lib/SupportedSULFreqBandItem.c new file mode 100644 index 0000000..fca9ef0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/SupportedSULFreqBandItem.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "SupportedSULFreqBandItem.h" + +static int +memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1024 } /* (1..1024,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_SupportedSULFreqBandItem_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SupportedSULFreqBandItem, freqBandIndicatorNr), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_freqBandIndicatorNr_constr_2, &asn_PER_memb_freqBandIndicatorNr_constr_2, memb_freqBandIndicatorNr_constraint_1 }, + 0, 0, /* No default value */ + "freqBandIndicatorNr" + }, +}; +static const ber_tlv_tag_t asn_DEF_SupportedSULFreqBandItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SupportedSULFreqBandItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* freqBandIndicatorNr */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SupportedSULFreqBandItem_specs_1 = { + sizeof(struct SupportedSULFreqBandItem), + offsetof(struct SupportedSULFreqBandItem, _asn_ctx), + asn_MAP_SupportedSULFreqBandItem_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SupportedSULFreqBandItem = { + "SupportedSULFreqBandItem", + "SupportedSULFreqBandItem", + &asn_OP_SEQUENCE, + asn_DEF_SupportedSULFreqBandItem_tags_1, + sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1) + /sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1[0]), /* 1 */ + asn_DEF_SupportedSULFreqBandItem_tags_1, /* Same as above */ + sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1) + /sizeof(asn_DEF_SupportedSULFreqBandItem_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SupportedSULFreqBandItem_1, + 1, /* Elements count */ + &asn_SPC_SupportedSULFreqBandItem_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/TriggerType-Choice-L2state.c b/Bouncer/e2sm_rc/lib/TriggerType-Choice-L2state.c new file mode 100644 index 0000000..133ce5b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/TriggerType-Choice-L2state.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "TriggerType-Choice-L2state.h" + +asn_TYPE_member_t asn_MBR_TriggerType_Choice_L2state_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TriggerType_Choice_L2state, associatedL2variables), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Testing, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "associatedL2variables" + }, +}; +static const ber_tlv_tag_t asn_DEF_TriggerType_Choice_L2state_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_TriggerType_Choice_L2state_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* associatedL2variables */ +}; +asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_L2state_specs_1 = { + sizeof(struct TriggerType_Choice_L2state), + offsetof(struct TriggerType_Choice_L2state, _asn_ctx), + asn_MAP_TriggerType_Choice_L2state_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_L2state = { + "TriggerType-Choice-L2state", + "TriggerType-Choice-L2state", + &asn_OP_SEQUENCE, + asn_DEF_TriggerType_Choice_L2state_tags_1, + sizeof(asn_DEF_TriggerType_Choice_L2state_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_L2state_tags_1[0]), /* 1 */ + asn_DEF_TriggerType_Choice_L2state_tags_1, /* Same as above */ + sizeof(asn_DEF_TriggerType_Choice_L2state_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_L2state_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_TriggerType_Choice_L2state_1, + 1, /* Elements count */ + &asn_SPC_TriggerType_Choice_L2state_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate-Item.c b/Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate-Item.c new file mode 100644 index 0000000..9a5af31 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate-Item.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "TriggerType-Choice-RRCstate-Item.h" + +asn_TYPE_member_t asn_MBR_TriggerType_Choice_RRCstate_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TriggerType_Choice_RRCstate_Item, stateChangedTo), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RRC_State, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "stateChangedTo" + }, + { ATF_POINTER, 1, offsetof(struct TriggerType_Choice_RRCstate_Item, logicalOR), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LogicalOR, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "logicalOR" + }, +}; +static const int asn_MAP_TriggerType_Choice_RRCstate_Item_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_TriggerType_Choice_RRCstate_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_TriggerType_Choice_RRCstate_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* stateChangedTo */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* logicalOR */ +}; +asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_RRCstate_Item_specs_1 = { + sizeof(struct TriggerType_Choice_RRCstate_Item), + offsetof(struct TriggerType_Choice_RRCstate_Item, _asn_ctx), + asn_MAP_TriggerType_Choice_RRCstate_Item_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_TriggerType_Choice_RRCstate_Item_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_RRCstate_Item = { + "TriggerType-Choice-RRCstate-Item", + "TriggerType-Choice-RRCstate-Item", + &asn_OP_SEQUENCE, + asn_DEF_TriggerType_Choice_RRCstate_Item_tags_1, + sizeof(asn_DEF_TriggerType_Choice_RRCstate_Item_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_RRCstate_Item_tags_1[0]), /* 1 */ + asn_DEF_TriggerType_Choice_RRCstate_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_TriggerType_Choice_RRCstate_Item_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_RRCstate_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_TriggerType_Choice_RRCstate_Item_1, + 2, /* Elements count */ + &asn_SPC_TriggerType_Choice_RRCstate_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate.c b/Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate.c new file mode 100644 index 0000000..59ae271 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/TriggerType-Choice-RRCstate.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "TriggerType-Choice-RRCstate.h" + +#include "TriggerType-Choice-RRCstate-Item.h" +static int +memb_rrcState_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1 && size <= 8)) { + /* Perform validation of the inner elements */ + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_type_rrcState_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..8)) */}; +static asn_per_constraints_t asn_PER_type_rrcState_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_rrcState_List_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..8)) */}; +static asn_per_constraints_t asn_PER_memb_rrcState_List_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_rrcState_List_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_TriggerType_Choice_RRCstate_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_rrcState_List_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_rrcState_List_specs_2 = { + sizeof(struct TriggerType_Choice_RRCstate__rrcState_List), + offsetof(struct TriggerType_Choice_RRCstate__rrcState_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_rrcState_List_2 = { + "rrcState-List", + "rrcState-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_rrcState_List_tags_2, + sizeof(asn_DEF_rrcState_List_tags_2) + /sizeof(asn_DEF_rrcState_List_tags_2[0]) - 1, /* 1 */ + asn_DEF_rrcState_List_tags_2, /* Same as above */ + sizeof(asn_DEF_rrcState_List_tags_2) + /sizeof(asn_DEF_rrcState_List_tags_2[0]), /* 2 */ + { &asn_OER_type_rrcState_List_constr_2, &asn_PER_type_rrcState_List_constr_2, SEQUENCE_OF_constraint }, + asn_MBR_rrcState_List_2, + 1, /* Single element */ + &asn_SPC_rrcState_List_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_TriggerType_Choice_RRCstate_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TriggerType_Choice_RRCstate, rrcState_List), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_rrcState_List_2, + 0, + { &asn_OER_memb_rrcState_List_constr_2, &asn_PER_memb_rrcState_List_constr_2, memb_rrcState_List_constraint_1 }, + 0, 0, /* No default value */ + "rrcState-List" + }, +}; +static const ber_tlv_tag_t asn_DEF_TriggerType_Choice_RRCstate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_TriggerType_Choice_RRCstate_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* rrcState-List */ +}; +asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_RRCstate_specs_1 = { + sizeof(struct TriggerType_Choice_RRCstate), + offsetof(struct TriggerType_Choice_RRCstate, _asn_ctx), + asn_MAP_TriggerType_Choice_RRCstate_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_RRCstate = { + "TriggerType-Choice-RRCstate", + "TriggerType-Choice-RRCstate", + &asn_OP_SEQUENCE, + asn_DEF_TriggerType_Choice_RRCstate_tags_1, + sizeof(asn_DEF_TriggerType_Choice_RRCstate_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_RRCstate_tags_1[0]), /* 1 */ + asn_DEF_TriggerType_Choice_RRCstate_tags_1, /* Same as above */ + sizeof(asn_DEF_TriggerType_Choice_RRCstate_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_RRCstate_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_TriggerType_Choice_RRCstate_1, + 1, /* Elements count */ + &asn_SPC_TriggerType_Choice_RRCstate_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/TriggerType-Choice-UEID.c b/Bouncer/e2sm_rc/lib/TriggerType-Choice-UEID.c new file mode 100644 index 0000000..44d2d62 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/TriggerType-Choice-UEID.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "TriggerType-Choice-UEID.h" + +static int +memb_ueIDchange_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1 && value <= 512)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_ueIDchange_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_memb_ueIDchange_ID_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 9, 9, 1, 512 } /* (1..512,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_TriggerType_Choice_UEID_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TriggerType_Choice_UEID, ueIDchange_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { &asn_OER_memb_ueIDchange_ID_constr_2, &asn_PER_memb_ueIDchange_ID_constr_2, memb_ueIDchange_ID_constraint_1 }, + 0, 0, /* No default value */ + "ueIDchange-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_TriggerType_Choice_UEID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_TriggerType_Choice_UEID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ueIDchange-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_TriggerType_Choice_UEID_specs_1 = { + sizeof(struct TriggerType_Choice_UEID), + offsetof(struct TriggerType_Choice_UEID, _asn_ctx), + asn_MAP_TriggerType_Choice_UEID_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice_UEID = { + "TriggerType-Choice-UEID", + "TriggerType-Choice-UEID", + &asn_OP_SEQUENCE, + asn_DEF_TriggerType_Choice_UEID_tags_1, + sizeof(asn_DEF_TriggerType_Choice_UEID_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_UEID_tags_1[0]), /* 1 */ + asn_DEF_TriggerType_Choice_UEID_tags_1, /* Same as above */ + sizeof(asn_DEF_TriggerType_Choice_UEID_tags_1) + /sizeof(asn_DEF_TriggerType_Choice_UEID_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_TriggerType_Choice_UEID_1, + 1, /* Elements count */ + &asn_SPC_TriggerType_Choice_UEID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/TriggerType-Choice.c b/Bouncer/e2sm_rc/lib/TriggerType-Choice.c new file mode 100644 index 0000000..5d901af --- /dev/null +++ b/Bouncer/e2sm_rc/lib/TriggerType-Choice.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "TriggerType-Choice.h" + +#include "TriggerType-Choice-RRCstate.h" +#include "TriggerType-Choice-UEID.h" +#include "TriggerType-Choice-L2state.h" +static asn_oer_constraints_t asn_OER_type_TriggerType_Choice_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_TriggerType_Choice_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_TriggerType_Choice_1[] = { + { ATF_POINTER, 0, offsetof(struct TriggerType_Choice, choice.triggerType_Choice_RRCstate), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TriggerType_Choice_RRCstate, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "triggerType-Choice-RRCstate" + }, + { ATF_POINTER, 0, offsetof(struct TriggerType_Choice, choice.triggerType_Choice_UEID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TriggerType_Choice_UEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "triggerType-Choice-UEID" + }, + { ATF_POINTER, 0, offsetof(struct TriggerType_Choice, choice.triggerType_Choice_L2state), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TriggerType_Choice_L2state, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "triggerType-Choice-L2state" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_TriggerType_Choice_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* triggerType-Choice-RRCstate */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* triggerType-Choice-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* triggerType-Choice-L2state */ +}; +asn_CHOICE_specifics_t asn_SPC_TriggerType_Choice_specs_1 = { + sizeof(struct TriggerType_Choice), + offsetof(struct TriggerType_Choice, _asn_ctx), + offsetof(struct TriggerType_Choice, present), + sizeof(((struct TriggerType_Choice *)0)->present), + asn_MAP_TriggerType_Choice_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_TriggerType_Choice = { + "TriggerType-Choice", + "TriggerType-Choice", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_TriggerType_Choice_constr_1, &asn_PER_type_TriggerType_Choice_constr_1, CHOICE_constraint }, + asn_MBR_TriggerType_Choice_1, + 3, /* Elements count */ + &asn_SPC_TriggerType_Choice_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-EN-GNB.c b/Bouncer/e2sm_rc/lib/UEID-EN-GNB.c new file mode 100644 index 0000000..acf3ebe --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-EN-GNB.c @@ -0,0 +1,103 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-EN-GNB.h" + +#include "UEID-GNB-CU-CP-E1AP-ID-List.h" +asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_EN_GNB, m_eNB_UE_X2AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_EN_GNB, m_eNB_UE_X2AP_ID_Extension), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID_Extension, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID-Extension" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_EN_GNB, globalENB_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalENB-ID" + }, + { ATF_POINTER, 3, offsetof(struct UEID_EN_GNB, gNB_CU_UE_F1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UE_F1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_EN_GNB, gNB_CU_CP_UE_E1AP_ID_List), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID-List" + }, + { ATF_POINTER, 1, offsetof(struct UEID_EN_GNB, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, +}; +static const int asn_MAP_UEID_EN_GNB_oms_1[] = { 1, 3, 4, 5 }; +static const ber_tlv_tag_t asn_DEF_UEID_EN_GNB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_EN_GNB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m-eNB-UE-X2AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m-eNB-UE-X2AP-ID-Extension */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* globalENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gNB-CU-UE-F1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* gNB-CU-CP-UE-E1AP-ID-List */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* ran-UEID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_EN_GNB_specs_1 = { + sizeof(struct UEID_EN_GNB), + offsetof(struct UEID_EN_GNB, _asn_ctx), + asn_MAP_UEID_EN_GNB_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_UEID_EN_GNB_oms_1, /* Optional members */ + 4, 0, /* Root/Additions */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_EN_GNB = { + "UEID-EN-GNB", + "UEID-EN-GNB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_EN_GNB_tags_1, + sizeof(asn_DEF_UEID_EN_GNB_tags_1) + /sizeof(asn_DEF_UEID_EN_GNB_tags_1[0]), /* 1 */ + asn_DEF_UEID_EN_GNB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_EN_GNB_tags_1) + /sizeof(asn_DEF_UEID_EN_GNB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_EN_GNB_1, + 6, /* Elements count */ + &asn_SPC_UEID_EN_GNB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-ENB.c b/Bouncer/e2sm_rc/lib/UEID-ENB.c new file mode 100644 index 0000000..cd550c6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-ENB.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-ENB.h" + +#include "GlobalENB-ID.h" +asn_TYPE_member_t asn_MBR_UEID_ENB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_ENB, mME_UE_S1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MME_UE_S1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "mME-UE-S1AP-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_ENB, gUMMEI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUMMEI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gUMMEI" + }, + { ATF_POINTER, 3, offsetof(struct UEID_ENB, m_eNB_UE_X2AP_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_ENB, m_eNB_UE_X2AP_ID_Extension), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ENB_UE_X2AP_ID_Extension, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-eNB-UE-X2AP-ID-Extension" + }, + { ATF_POINTER, 1, offsetof(struct UEID_ENB, globalENB_ID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalENB-ID" + }, +}; +static const int asn_MAP_UEID_ENB_oms_1[] = { 2, 3, 4 }; +static const ber_tlv_tag_t asn_DEF_UEID_ENB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_ENB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mME-UE-S1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gUMMEI */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m-eNB-UE-X2AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m-eNB-UE-X2AP-ID-Extension */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* globalENB-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_ENB_specs_1 = { + sizeof(struct UEID_ENB), + offsetof(struct UEID_ENB, _asn_ctx), + asn_MAP_UEID_ENB_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_UEID_ENB_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_ENB = { + "UEID-ENB", + "UEID-ENB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_ENB_tags_1, + sizeof(asn_DEF_UEID_ENB_tags_1) + /sizeof(asn_DEF_UEID_ENB_tags_1[0]), /* 1 */ + asn_DEF_UEID_ENB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_ENB_tags_1) + /sizeof(asn_DEF_UEID_ENB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_ENB_1, + 5, /* Elements count */ + &asn_SPC_UEID_ENB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c new file mode 100644 index 0000000..1888f24 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-CP-E1AP-ID-Item.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_CU_CP_E1AP_ID_Item, gNB_CU_CP_UE_E1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_CP_UE_E1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_CU_CP_E1AP_ID_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-CU-CP-UE-E1AP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_Item_specs_1 = { + sizeof(struct UEID_GNB_CU_CP_E1AP_ID_Item), + offsetof(struct UEID_GNB_CU_CP_E1AP_ID_Item, _asn_ctx), + asn_MAP_UEID_GNB_CU_CP_E1AP_ID_Item_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item = { + "UEID-GNB-CU-CP-E1AP-ID-Item", + "UEID-GNB-CU-CP-E1AP-ID-Item", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_CU_CP_E1AP_ID_Item_1, + 1, /* Elements count */ + &asn_SPC_UEID_GNB_CU_CP_E1AP_ID_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-List.c b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-List.c new file mode 100644 index 0000000..5fb400e --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-E1AP-ID-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-CP-E1AP-ID-List.h" + +#include "UEID-GNB-CU-CP-E1AP-ID-Item.h" +static asn_oer_constraints_t asn_OER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +asn_per_constraints_t asn_PER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_CP_E1AP_ID_List_specs_1 = { + sizeof(struct UEID_GNB_CU_CP_E1AP_ID_List), + offsetof(struct UEID_GNB_CU_CP_E1AP_ID_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List = { + "UEID-GNB-CU-CP-E1AP-ID-List", + "UEID-GNB-CU-CP-E1AP-ID-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List_tags_1[0]), /* 1 */ + { &asn_OER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1, &asn_PER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_UEID_GNB_CU_CP_E1AP_ID_List_1, + 1, /* Single element */ + &asn_SPC_UEID_GNB_CU_CP_E1AP_ID_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c new file mode 100644 index 0000000..27671e8 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-CP-F1AP-ID-Item.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_F1AP_ID_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_CU_CP_F1AP_ID_Item, gNB_CU_UE_F1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UE_F1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_CU_CP_F1AP_ID_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-CU-UE-F1AP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_CP_F1AP_ID_Item_specs_1 = { + sizeof(struct UEID_GNB_CU_CP_F1AP_ID_Item), + offsetof(struct UEID_GNB_CU_CP_F1AP_ID_Item, _asn_ctx), + asn_MAP_UEID_GNB_CU_CP_F1AP_ID_Item_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item = { + "UEID-GNB-CU-CP-F1AP-ID-Item", + "UEID-GNB-CU-CP-F1AP-ID-Item", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_CU_CP_F1AP_ID_Item_1, + 1, /* Elements count */ + &asn_SPC_UEID_GNB_CU_CP_F1AP_ID_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-GNB-CU-F1AP-ID-List.c b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-F1AP-ID-List.c new file mode 100644 index 0000000..afbbdc0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-F1AP-ID-List.c @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-F1AP-ID-List.h" + +#include "UEID-GNB-CU-CP-F1AP-ID-Item.h" +static asn_oer_constraints_t asn_OER_type_UEID_GNB_CU_F1AP_ID_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..4)) */}; +asn_per_constraints_t asn_PER_type_UEID_GNB_CU_F1AP_ID_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_F1AP_ID_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_UEID_GNB_CU_F1AP_ID_List_specs_1 = { + sizeof(struct UEID_GNB_CU_F1AP_ID_List), + offsetof(struct UEID_GNB_CU_F1AP_ID_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_F1AP_ID_List = { + "UEID-GNB-CU-F1AP-ID-List", + "UEID-GNB-CU-F1AP-ID-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_F1AP_ID_List_tags_1[0]), /* 1 */ + { &asn_OER_type_UEID_GNB_CU_F1AP_ID_List_constr_1, &asn_PER_type_UEID_GNB_CU_F1AP_ID_List_constr_1, SEQUENCE_OF_constraint }, + asn_MBR_UEID_GNB_CU_F1AP_ID_List_1, + 1, /* Single element */ + &asn_SPC_UEID_GNB_CU_F1AP_ID_List_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-GNB-CU-UP.c b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-UP.c new file mode 100644 index 0000000..3795964 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-GNB-CU-UP.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-GNB-CU-UP.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_CU_UP_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_CU_UP, gNB_CU_CP_UE_E1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_CP_UE_E1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_GNB_CU_UP, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, +}; +static const int asn_MAP_UEID_GNB_CU_UP_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_CU_UP_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_CU_UP_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-CU-CP-UE-E1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ran-UEID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_CU_UP_specs_1 = { + sizeof(struct UEID_GNB_CU_UP), + offsetof(struct UEID_GNB_CU_UP, _asn_ctx), + asn_MAP_UEID_GNB_CU_UP_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_UEID_GNB_CU_UP_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_UP = { + "UEID-GNB-CU-UP", + "UEID-GNB-CU-UP", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_CU_UP_tags_1, + sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_CU_UP_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1) + /sizeof(asn_DEF_UEID_GNB_CU_UP_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_CU_UP_1, + 2, /* Elements count */ + &asn_SPC_UEID_GNB_CU_UP_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-GNB-DU.c b/Bouncer/e2sm_rc/lib/UEID-GNB-DU.c new file mode 100644 index 0000000..bd18324 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-GNB-DU.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-GNB-DU.h" + +asn_TYPE_member_t asn_MBR_UEID_GNB_DU_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB_DU, gNB_CU_UE_F1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UE_F1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_GNB_DU, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, +}; +static const int asn_MAP_UEID_GNB_DU_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_DU_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_DU_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-CU-UE-F1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ran-UEID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_DU_specs_1 = { + sizeof(struct UEID_GNB_DU), + offsetof(struct UEID_GNB_DU, _asn_ctx), + asn_MAP_UEID_GNB_DU_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_UEID_GNB_DU_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB_DU = { + "UEID-GNB-DU", + "UEID-GNB-DU", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_DU_tags_1, + sizeof(asn_DEF_UEID_GNB_DU_tags_1) + /sizeof(asn_DEF_UEID_GNB_DU_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_DU_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_DU_tags_1) + /sizeof(asn_DEF_UEID_GNB_DU_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_DU_1, + 2, /* Elements count */ + &asn_SPC_UEID_GNB_DU_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-GNB.c b/Bouncer/e2sm_rc/lib/UEID-GNB.c new file mode 100644 index 0000000..73ef992 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-GNB.c @@ -0,0 +1,126 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-GNB.h" + +#include "UEID-GNB-CU-F1AP-ID-List.h" +#include "UEID-GNB-CU-CP-E1AP-ID-List.h" +#include "GlobalGNB-ID.h" +#include "GlobalNGRANNodeID.h" +asn_TYPE_member_t asn_MBR_UEID_GNB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB, amf_UE_NGAP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMF_UE_NGAP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "amf-UE-NGAP-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_GNB, guami), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "guami" + }, + { ATF_POINTER, 6, offsetof(struct UEID_GNB, gNB_CU_UE_F1AP_ID_List), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_F1AP_ID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UE-F1AP-ID-List" + }, + { ATF_POINTER, 5, offsetof(struct UEID_GNB, gNB_CU_CP_UE_E1AP_ID_List), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-CP-UE-E1AP-ID-List" + }, + { ATF_POINTER, 4, offsetof(struct UEID_GNB, ran_UEID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANUEID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ran-UEID" + }, + { ATF_POINTER, 3, offsetof(struct UEID_GNB, m_NG_RAN_UE_XnAP_ID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NG_RANnodeUEXnAPID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-NG-RAN-UE-XnAP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_GNB, globalGNB_ID), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalGNB-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_GNB, globalNG_RANNode_ID), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalNGRANNodeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalNG-RANNode-ID" + }, +}; +static const int asn_MAP_UEID_GNB_oms_1[] = { 2, 3, 4, 5, 6, 7 }; +static const ber_tlv_tag_t asn_DEF_UEID_GNB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* amf-UE-NGAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* guami */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gNB-CU-UE-F1AP-ID-List */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gNB-CU-CP-UE-E1AP-ID-List */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ran-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* m-NG-RAN-UE-XnAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* globalGNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* globalNG-RANNode-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_GNB_specs_1 = { + sizeof(struct UEID_GNB), + offsetof(struct UEID_GNB, _asn_ctx), + asn_MAP_UEID_GNB_tag2el_1, + 8, /* Count of tags in the map */ + asn_MAP_UEID_GNB_oms_1, /* Optional members */ + 5, 1, /* Root/Additions */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_GNB = { + "UEID-GNB", + "UEID-GNB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_GNB_tags_1, + sizeof(asn_DEF_UEID_GNB_tags_1) + /sizeof(asn_DEF_UEID_GNB_tags_1[0]), /* 1 */ + asn_DEF_UEID_GNB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_GNB_tags_1) + /sizeof(asn_DEF_UEID_GNB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_GNB_1, + 8, /* Elements count */ + &asn_SPC_UEID_GNB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-NG-ENB-DU.c b/Bouncer/e2sm_rc/lib/UEID-NG-ENB-DU.c new file mode 100644 index 0000000..526e861 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-NG-ENB-DU.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-NG-ENB-DU.h" + +asn_TYPE_member_t asn_MBR_UEID_NG_ENB_DU_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_NG_ENB_DU, ng_eNB_CU_UE_W1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_CU_UE_W1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-CU-UE-W1AP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_UEID_NG_ENB_DU_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_NG_ENB_DU_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ng-eNB-CU-UE-W1AP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_DU_specs_1 = { + sizeof(struct UEID_NG_ENB_DU), + offsetof(struct UEID_NG_ENB_DU, _asn_ctx), + asn_MAP_UEID_NG_ENB_DU_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB_DU = { + "UEID-NG-ENB-DU", + "UEID-NG-ENB-DU", + &asn_OP_SEQUENCE, + asn_DEF_UEID_NG_ENB_DU_tags_1, + sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1[0]), /* 1 */ + asn_DEF_UEID_NG_ENB_DU_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_DU_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_NG_ENB_DU_1, + 1, /* Elements count */ + &asn_SPC_UEID_NG_ENB_DU_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID-NG-ENB.c b/Bouncer/e2sm_rc/lib/UEID-NG-ENB.c new file mode 100644 index 0000000..ed4f083 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID-NG-ENB.c @@ -0,0 +1,104 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID-NG-ENB.h" + +#include "GlobalNgENB-ID.h" +#include "GlobalNGRANNodeID.h" +asn_TYPE_member_t asn_MBR_UEID_NG_ENB_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEID_NG_ENB, amf_UE_NGAP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMF_UE_NGAP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "amf-UE-NGAP-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEID_NG_ENB, guami), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GUAMI, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "guami" + }, + { ATF_POINTER, 4, offsetof(struct UEID_NG_ENB, ng_eNB_CU_UE_W1AP_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_CU_UE_W1AP_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-CU-UE-W1AP-ID" + }, + { ATF_POINTER, 3, offsetof(struct UEID_NG_ENB, m_NG_RAN_UE_XnAP_ID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NG_RANnodeUEXnAPID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "m-NG-RAN-UE-XnAP-ID" + }, + { ATF_POINTER, 2, offsetof(struct UEID_NG_ENB, globalNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalNgENB_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalNgENB-ID" + }, + { ATF_POINTER, 1, offsetof(struct UEID_NG_ENB, globalNG_RANNode_ID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalNGRANNodeID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "globalNG-RANNode-ID" + }, +}; +static const int asn_MAP_UEID_NG_ENB_oms_1[] = { 2, 3, 4, 5 }; +static const ber_tlv_tag_t asn_DEF_UEID_NG_ENB_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_NG_ENB_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* amf-UE-NGAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* guami */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ng-eNB-CU-UE-W1AP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m-NG-RAN-UE-XnAP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* globalNgENB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* globalNG-RANNode-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEID_NG_ENB_specs_1 = { + sizeof(struct UEID_NG_ENB), + offsetof(struct UEID_NG_ENB, _asn_ctx), + asn_MAP_UEID_NG_ENB_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_UEID_NG_ENB_oms_1, /* Optional members */ + 3, 1, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB = { + "UEID-NG-ENB", + "UEID-NG-ENB", + &asn_OP_SEQUENCE, + asn_DEF_UEID_NG_ENB_tags_1, + sizeof(asn_DEF_UEID_NG_ENB_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_tags_1[0]), /* 1 */ + asn_DEF_UEID_NG_ENB_tags_1, /* Same as above */ + sizeof(asn_DEF_UEID_NG_ENB_tags_1) + /sizeof(asn_DEF_UEID_NG_ENB_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEID_NG_ENB_1, + 6, /* Elements count */ + &asn_SPC_UEID_NG_ENB_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEID.c b/Bouncer/e2sm_rc/lib/UEID.c new file mode 100644 index 0000000..cc12a2b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEID.c @@ -0,0 +1,122 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEID.h" + +#include "UEID-GNB.h" +#include "UEID-GNB-DU.h" +#include "UEID-GNB-CU-UP.h" +#include "UEID-NG-ENB.h" +#include "UEID-NG-ENB-DU.h" +#include "UEID-EN-GNB.h" +#include "UEID-ENB.h" +static asn_oer_constraints_t asn_OER_type_UEID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_UEID_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +asn_TYPE_member_t asn_MBR_UEID_1[] = { + { ATF_POINTER, 0, offsetof(struct UEID, choice.gNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.gNB_DU_UEID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_DU, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-DU-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.gNB_CU_UP_UEID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_GNB_CU_UP, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "gNB-CU-UP-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.ng_eNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_NG_ENB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.ng_eNB_DU_UEID), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_NG_ENB_DU, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ng-eNB-DU-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.en_gNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_EN_GNB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "en-gNB-UEID" + }, + { ATF_POINTER, 0, offsetof(struct UEID, choice.eNB_UEID), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UEID_ENB, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eNB-UEID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_UEID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-DU-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gNB-CU-UP-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ng-eNB-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ng-eNB-DU-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* en-gNB-UEID */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* eNB-UEID */ +}; +asn_CHOICE_specifics_t asn_SPC_UEID_specs_1 = { + sizeof(struct UEID), + offsetof(struct UEID, _asn_ctx), + offsetof(struct UEID, present), + sizeof(((struct UEID *)0)->present), + asn_MAP_UEID_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, + 7 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_UEID = { + "UEID", + "UEID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_UEID_constr_1, &asn_PER_type_UEID_constr_1, CHOICE_constraint }, + asn_MBR_UEID_1, + 7, /* Elements count */ + &asn_SPC_UEID_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/UEIdentification-RANParameter-Item.c b/Bouncer/e2sm_rc/lib/UEIdentification-RANParameter-Item.c new file mode 100644 index 0000000..d7959fc --- /dev/null +++ b/Bouncer/e2sm_rc/lib/UEIdentification-RANParameter-Item.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-RC-IEs" + * found in "e2sm_rc.asn" + * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example` + */ + +#include "UEIdentification-RANParameter-Item.h" + +#include "RANParameter-Definition.h" +asn_TYPE_member_t asn_MBR_UEIdentification_RANParameter_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UEIdentification_RANParameter_Item, ranParameter_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_ID, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-ID" + }, + { ATF_NOFLAGS, 0, offsetof(struct UEIdentification_RANParameter_Item, ranParameter_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Name, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-name" + }, + { ATF_POINTER, 1, offsetof(struct UEIdentification_RANParameter_Item, ranParameter_Definition), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANParameter_Definition, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ranParameter-Definition" + }, +}; +static const int asn_MAP_UEIdentification_RANParameter_Item_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_UEIdentification_RANParameter_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_UEIdentification_RANParameter_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameter-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranParameter-name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ranParameter-Definition */ +}; +asn_SEQUENCE_specifics_t asn_SPC_UEIdentification_RANParameter_Item_specs_1 = { + sizeof(struct UEIdentification_RANParameter_Item), + offsetof(struct UEIdentification_RANParameter_Item, _asn_ctx), + asn_MAP_UEIdentification_RANParameter_Item_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_UEIdentification_RANParameter_Item_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_UEIdentification_RANParameter_Item = { + "UEIdentification-RANParameter-Item", + "UEIdentification-RANParameter-Item", + &asn_OP_SEQUENCE, + asn_DEF_UEIdentification_RANParameter_Item_tags_1, + sizeof(asn_DEF_UEIdentification_RANParameter_Item_tags_1) + /sizeof(asn_DEF_UEIdentification_RANParameter_Item_tags_1[0]), /* 1 */ + asn_DEF_UEIdentification_RANParameter_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_UEIdentification_RANParameter_Item_tags_1) + /sizeof(asn_DEF_UEIdentification_RANParameter_Item_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_UEIdentification_RANParameter_Item_1, + 3, /* Elements count */ + &asn_SPC_UEIdentification_RANParameter_Item_specs_1 /* Additional specs */ +}; + diff --git a/Bouncer/e2sm_rc/lib/asn_SEQUENCE_OF.c b/Bouncer/e2sm_rc/lib/asn_SEQUENCE_OF.c new file mode 100644 index 0000000..ec952fc --- /dev/null +++ b/Bouncer/e2sm_rc/lib/asn_SEQUENCE_OF.c @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +typedef A_SEQUENCE_OF(void) asn_sequence; + +void +asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free) { + asn_sequence *as = (asn_sequence *)asn_sequence_of_x; + + if(as) { + void *ptr; + int n; + + if(number < 0 || number >= as->count) + return; /* Nothing to delete */ + + if(_do_free && as->free) { + ptr = as->array[number]; + } else { + ptr = 0; + } + + /* + * Shift all elements to the left to hide the gap. + */ + --as->count; + for(n = number; n < as->count; n++) + as->array[n] = as->array[n+1]; + + /* + * Invoke the third-party function only when the state + * of the parent structure is consistent. + */ + if(ptr) as->free(ptr); + } +} + diff --git a/Bouncer/e2sm_rc/lib/asn_SET_OF.c b/Bouncer/e2sm_rc/lib/asn_SET_OF.c new file mode 100644 index 0000000..944f2cb --- /dev/null +++ b/Bouncer/e2sm_rc/lib/asn_SET_OF.c @@ -0,0 +1,88 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Add another element into the set. + */ +int +asn_set_add(void *asn_set_of_x, void *ptr) { + asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); + + if(as == 0 || ptr == 0) { + errno = EINVAL; /* Invalid arguments */ + return -1; + } + + /* + * Make sure there's enough space to insert an element. + */ + if(as->count == as->size) { + int _newsize = as->size ? (as->size << 1) : 4; + void *_new_arr; + _new_arr = REALLOC(as->array, _newsize * sizeof(as->array[0])); + if(_new_arr) { + as->array = (void **)_new_arr; + as->size = _newsize; + } else { + /* ENOMEM */ + return -1; + } + } + + as->array[as->count++] = ptr; + + return 0; +} + +void +asn_set_del(void *asn_set_of_x, int number, int _do_free) { + asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); + + if(as) { + void *ptr; + if(number < 0 || number >= as->count) + return; + + if(_do_free && as->free) { + ptr = as->array[number]; + } else { + ptr = 0; + } + + as->array[number] = as->array[--as->count]; + + /* + * Invoke the third-party function only when the state + * of the parent structure is consistent. + */ + if(ptr) as->free(ptr); + } +} + +/* + * Free the contents of the set, do not free the set itself. + */ +void +asn_set_empty(void *asn_set_of_x) { + asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); + + if(as) { + if(as->array) { + if(as->free) { + while(as->count--) + as->free(as->array[as->count]); + } + FREEMEM(as->array); + as->array = 0; + } + as->count = 0; + as->size = 0; + } + +} + diff --git a/Bouncer/e2sm_rc/lib/asn_application.c b/Bouncer/e2sm_rc/lib/asn_application.c new file mode 100644 index 0000000..2bff460 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/asn_application.c @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +static asn_enc_rval_t asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, + const void *sptr, + asn_app_consume_bytes_f *callback, + void *callback_key); + + +struct callback_count_bytes_key { + asn_app_consume_bytes_f *callback; + void *callback_key; + size_t computed_size; +}; + +/* + * Encoder which just counts bytes that come through it. + */ +static int +callback_count_bytes_cb(const void *data, size_t size, void *keyp) { + struct callback_count_bytes_key *key = keyp; + int ret; + + ret = key->callback(data, size, key->callback_key); + if(ret >= 0) { + key->computed_size += size; + } + + return ret; +} + +struct overrun_encoder_key { + void *buffer; + size_t buffer_size; + size_t computed_size; +}; + +struct dynamic_encoder_key { + void *buffer; + size_t buffer_size; + size_t computed_size; +}; + +struct callback_failure_catch_key { + asn_app_consume_bytes_f *callback; + void *callback_key; + int callback_failed; +}; + +/* + * Encoder which doesn't stop counting bytes + * even if it reaches the end of the buffer. + */ +static int +overrun_encoder_cb(const void *data, size_t size, void *keyp) { + struct overrun_encoder_key *key = keyp; + + if(key->computed_size + size > key->buffer_size) { + /* + * Avoid accident on the next call: + * stop adding bytes to the buffer. + */ + key->buffer_size = 0; + } else { + memcpy((char *)key->buffer + key->computed_size, data, size); + } + key->computed_size += size; + + return 0; +} + +/* + * Encoder which dynamically allocates output, and continues + * to count even if allocation failed. + */ +static int +dynamic_encoder_cb(const void *data, size_t size, void *keyp) { + struct dynamic_encoder_key *key = keyp; + + if(key->buffer) { + if(key->computed_size + size >= key->buffer_size) { + void *p; + size_t new_size = key->buffer_size; + + do { + new_size *= 2; + } while(new_size <= key->computed_size + size); + + p = REALLOC(key->buffer, new_size); + if(p) { + key->buffer = p; + key->buffer_size = new_size; + } else { + FREEMEM(key->buffer); + key->buffer = 0; + key->buffer_size = 0; + key->computed_size += size; + return 0; + } + } + memcpy((char *)key->buffer + key->computed_size, data, size); + } + + key->computed_size += size; + + return 0; +} + +/* + * Encoder which help convert the application level encoder failure into EIO. + */ +static int +callback_failure_catch_cb(const void *data, size_t size, void *keyp) { + struct callback_failure_catch_key *key = keyp; + int ret; + + ret = key->callback(data, size, key->callback_key); + if(ret < 0) { + key->callback_failed = 1; + } + + return ret; +} + +asn_enc_rval_t +asn_encode(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, + const void *sptr, asn_app_consume_bytes_f *callback, void *callback_key) { + struct callback_failure_catch_key cb_key; + asn_enc_rval_t er = {0,0,0}; + + if(!callback) { + errno = EINVAL; + ASN__ENCODE_FAILED; + } + + cb_key.callback = callback; + cb_key.callback_key = callback_key; + cb_key.callback_failed = 0; + + er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, + callback_failure_catch_cb, &cb_key); + if(cb_key.callback_failed) { + assert(er.encoded == -1); + assert(errno == EBADF); + errno = EIO; + } + + return er; +} + +asn_enc_rval_t +asn_encode_to_buffer(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, const void *sptr, + void *buffer, size_t buffer_size) { + struct overrun_encoder_key buf_key; + asn_enc_rval_t er = {0,0,0}; + + if(buffer_size > 0 && !buffer) { + errno = EINVAL; + ASN__ENCODE_FAILED; + } + + buf_key.buffer = buffer; + buf_key.buffer_size = buffer_size; + buf_key.computed_size = 0; + + er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, + overrun_encoder_cb, &buf_key); + + if(er.encoded >= 0 && (size_t)er.encoded != buf_key.computed_size) { + ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE + " yet produced %" ASN_PRI_SIZE " bytes", + er.encoded, buf_key.computed_size); + assert(er.encoded < 0 || (size_t)er.encoded == buf_key.computed_size); + } + + return er; +} + +asn_encode_to_new_buffer_result_t +asn_encode_to_new_buffer(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, const void *sptr) { + struct dynamic_encoder_key buf_key; + asn_encode_to_new_buffer_result_t res; + + buf_key.buffer_size = 16; + buf_key.buffer = MALLOC(buf_key.buffer_size); + buf_key.computed_size = 0; + + res.result = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, + dynamic_encoder_cb, &buf_key); + + if(res.result.encoded >= 0 + && (size_t)res.result.encoded != buf_key.computed_size) { + ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE + " yet produced %" ASN_PRI_SIZE " bytes", + res.result.encoded, buf_key.computed_size); + assert(res.result.encoded < 0 + || (size_t)res.result.encoded == buf_key.computed_size); + } + + res.buffer = buf_key.buffer; + + /* 0-terminate just in case. */ + if(res.buffer) { + assert(buf_key.computed_size < buf_key.buffer_size); + ((char *)res.buffer)[buf_key.computed_size] = '\0'; + } + + return res; +} + +static asn_enc_rval_t +asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, + const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *callback, void *callback_key) { + asn_enc_rval_t er = {0,0,0}; + enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL; + + (void)opt_codec_ctx; /* Parameters are not checked on encode yet. */ + + if(!td || !sptr) { + errno = EINVAL; + ASN__ENCODE_FAILED; + } + + switch(syntax) { + case ATS_NONSTANDARD_PLAINTEXT: + if(td->op->print_struct) { + struct callback_count_bytes_key cb_key; + cb_key.callback = callback; + cb_key.callback_key = callback_key; + cb_key.computed_size = 0; + if(td->op->print_struct(td, sptr, 1, callback_count_bytes_cb, + &cb_key) + < 0 + || callback_count_bytes_cb("\n", 1, &cb_key) < 0) { + errno = EBADF; /* Structure has incorrect form. */ + er.encoded = -1; + er.failed_type = td; + er.structure_ptr = sptr; + } else { + er.encoded = cb_key.computed_size; + er.failed_type = 0; + er.structure_ptr = 0; + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + + case ATS_RANDOM: + errno = ENOENT; /* Randomization doesn't make sense on output. */ + ASN__ENCODE_FAILED; + + case ATS_BER: + /* BER is a superset of DER. */ + /* Fall through. */ + case ATS_DER: + if(td->op->der_encoder) { + er = der_encode(td, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->der_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* DER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + case ATS_CER: + errno = ENOENT; /* Transfer syntax is not defined for any type. */ + ASN__ENCODE_FAILED; + +#ifdef ASN_DISABLE_OER_SUPPORT + case ATS_BASIC_OER: + case ATS_CANONICAL_OER: + errno = ENOENT; /* PER is not defined. */ + ASN__ENCODE_FAILED; + break; +#else /* ASN_DISABLE_OER_SUPPORT */ + case ATS_BASIC_OER: + /* CANONICAL-OER is a superset of BASIC-OER. */ + /* Fall through. */ + case ATS_CANONICAL_OER: + if(td->op->oer_encoder) { + er = oer_encode(td, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->oer_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* OER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; +#endif /* ASN_DISABLE_OER_SUPPORT */ + +#ifdef ASN_DISABLE_PER_SUPPORT + case ATS_UNALIGNED_BASIC_PER: + case ATS_UNALIGNED_CANONICAL_PER: + case ATS_ALIGNED_BASIC_PER: + case ATS_ALIGNED_CANONICAL_PER: + errno = ENOENT; /* PER is not defined. */ + ASN__ENCODE_FAILED; + break; +#else /* ASN_DISABLE_PER_SUPPORT */ + case ATS_UNALIGNED_BASIC_PER: + /* CANONICAL-UPER is a superset of BASIC-UPER. */ + /* Fall through. */ + case ATS_UNALIGNED_CANONICAL_PER: + if(td->op->uper_encoder) { + er = uper_encode(td, 0, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->uper_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* UPER is not defined for this type. */ + } + } else { + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + if(er.encoded == 0) { + /* Enforce "Complete Encoding" of X.691 #11.1 */ + if(callback("\0", 1, callback_key) < 0) { + errno = EBADF; + ASN__ENCODE_FAILED; + } + er.encoded = 8; /* Exactly 8 zero bits is added. */ + } + /* Convert bits into bytes */ + er.encoded = (er.encoded + 7) >> 3; + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + case ATS_ALIGNED_BASIC_PER: + /* CANONICAL-APER is a superset of BASIC-APER. */ + /* Fall through. */ + case ATS_ALIGNED_CANONICAL_PER: + if(td->op->aper_encoder) { + er = aper_encode(td, 0, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->aper_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* APER is not defined for this type. */ + } + } else { + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + if(er.encoded == 0) { + /* Enforce "Complete Encoding" of X.691 #11.1 */ + if(callback("\0", 1, callback_key) < 0) { + errno = EBADF; + ASN__ENCODE_FAILED; + } + er.encoded = 8; /* Exactly 8 zero bits is added. */ + } + /* Convert bits into bytes */ + er.encoded = (er.encoded + 7) >> 3; + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; +#endif /* ASN_DISABLE_PER_SUPPORT */ + + case ATS_BASIC_XER: + /* CANONICAL-XER is a superset of BASIC-XER. */ + xer_flags &= ~XER_F_CANONICAL; + xer_flags |= XER_F_BASIC; + /* Fall through. */ + case ATS_CANONICAL_XER: + if(td->op->xer_encoder) { + er = xer_encode(td, sptr, xer_flags, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->xer_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* XER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; + + default: + errno = ENOENT; + ASN__ENCODE_FAILED; + } + + return er; +} + +asn_dec_rval_t +asn_decode(const asn_codec_ctx_t *opt_codec_ctx, + enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, + void **sptr, const void *buffer, size_t size) { + if(!td || !td->op || !sptr || (size && !buffer)) { + ASN__DECODE_FAILED; + } + + switch(syntax) { + case ATS_CER: + case ATS_NONSTANDARD_PLAINTEXT: + default: + errno = ENOENT; + ASN__DECODE_FAILED; + + case ATS_RANDOM: + if(!td->op->random_fill) { + ASN__DECODE_FAILED; + } else { + if(asn_random_fill(td, sptr, 16000) == 0) { + asn_dec_rval_t ret = {RC_OK, 0}; + return ret; + } else { + ASN__DECODE_FAILED; + } + } + break; + + case ATS_DER: + case ATS_BER: + return ber_decode(opt_codec_ctx, td, sptr, buffer, size); + + case ATS_BASIC_OER: + case ATS_CANONICAL_OER: +#ifdef ASN_DISABLE_OER_SUPPORT + errno = ENOENT; + ASN__DECODE_FAILED; +#else + return oer_decode(opt_codec_ctx, td, sptr, buffer, size); +#endif + + case ATS_UNALIGNED_BASIC_PER: + case ATS_UNALIGNED_CANONICAL_PER: +#ifdef ASN_DISABLE_PER_SUPPORT + errno = ENOENT; + ASN__DECODE_FAILED; +#else + return uper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#endif + + case ATS_ALIGNED_BASIC_PER: + case ATS_ALIGNED_CANONICAL_PER: +#ifdef ASN_DISABLE_PER_SUPPORT + errno = ENOENT; + ASN__DECODE_FAILED; +#else + return aper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#endif + + case ATS_BASIC_XER: + case ATS_CANONICAL_XER: + return xer_decode(opt_codec_ctx, td, sptr, buffer, size); + } +} + diff --git a/Bouncer/e2sm_rc/lib/asn_bit_data.c b/Bouncer/e2sm_rc/lib/asn_bit_data.c new file mode 100644 index 0000000..fe4b89b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/asn_bit_data.c @@ -0,0 +1,333 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Create a contiguous non-refillable bit data structure. + * Can be freed by FREEMEM(). + */ +asn_bit_data_t * +asn_bit_data_new_contiguous(const void *data, size_t size_bits) { + size_t size_bytes = (size_bits + 7) / 8; + asn_bit_data_t *pd; + uint8_t *bytes; + + /* Get the extensions map */ + pd = CALLOC(1, sizeof(*pd) + size_bytes + 1); + if(!pd) { + return NULL; + } + bytes = (void *)(((char *)pd) + sizeof(*pd)); + memcpy(bytes, data, size_bytes); + bytes[size_bytes] = 0; + pd->buffer = bytes; + pd->nboff = 0; + pd->nbits = size_bits; + + return pd; +} + + +char * +asn_bit_data_string(asn_bit_data_t *pd) { + static char buf[2][32]; + static int n; + n = (n+1) % 2; + snprintf(buf[n], sizeof(buf[n]), + "{m=%" ASN_PRI_SIZE " span %" ASN_PRI_SIZE "[%" ASN_PRI_SIZE + "..%" ASN_PRI_SIZE "] (%" ASN_PRI_SIZE ")}", + pd->moved, ((uintptr_t)(pd->buffer) & 0xf), pd->nboff, pd->nbits, + pd->nbits - pd->nboff); + return buf[n]; +} + +void +asn_get_undo(asn_bit_data_t *pd, int nbits) { + if((ssize_t)pd->nboff < nbits) { + assert((ssize_t)pd->nboff < nbits); + } else { + pd->nboff -= nbits; + pd->moved -= nbits; + } +} + +/* + * Extract a small number of bits (<= 31) from the specified PER data pointer. + */ +int32_t +asn_get_few_bits(asn_bit_data_t *pd, int nbits) { + size_t off; /* Next after last bit offset */ + ssize_t nleft; /* Number of bits left in this stream */ + uint32_t accum; + const uint8_t *buf; + + if(nbits < 0) + return -1; + + nleft = pd->nbits - pd->nboff; + if(nbits > nleft) { + int32_t tailv, vhead; + if(!pd->refill || nbits > 31) return -1; + /* Accumulate unused bytes before refill */ + ASN_DEBUG("Obtain the rest %d bits (want %d)", + (int)nleft, (int)nbits); + tailv = asn_get_few_bits(pd, nleft); + if(tailv < 0) return -1; + /* Refill (replace pd contents with new data) */ + if(pd->refill(pd)) + return -1; + nbits -= nleft; + vhead = asn_get_few_bits(pd, nbits); + /* Combine the rest of previous pd with the head of new one */ + tailv = (tailv << nbits) | vhead; /* Could == -1 */ + return tailv; + } + + /* + * Normalize position indicator. + */ + if(pd->nboff >= 8) { + pd->buffer += (pd->nboff >> 3); + pd->nbits -= (pd->nboff & ~0x07); + pd->nboff &= 0x07; + } + pd->moved += nbits; + pd->nboff += nbits; + off = pd->nboff; + buf = pd->buffer; + + /* + * Extract specified number of bits. + */ + if(off <= 8) + accum = nbits ? (buf[0]) >> (8 - off) : 0; + else if(off <= 16) + accum = ((buf[0] << 8) + buf[1]) >> (16 - off); + else if(off <= 24) + accum = ((buf[0] << 16) + (buf[1] << 8) + buf[2]) >> (24 - off); + else if(off <= 31) + accum = (((uint32_t)buf[0] << 24) + (buf[1] << 16) + + (buf[2] << 8) + (buf[3])) >> (32 - off); + else if(nbits <= 31) { + asn_bit_data_t tpd = *pd; + /* Here are we with our 31-bits limit plus 1..7 bits offset. */ + asn_get_undo(&tpd, nbits); + /* The number of available bits in the stream allow + * for the following operations to take place without + * invoking the ->refill() function */ + accum = asn_get_few_bits(&tpd, nbits - 24) << 24; + accum |= asn_get_few_bits(&tpd, 24); + } else { + asn_get_undo(pd, nbits); + return -1; + } + + accum &= (((uint32_t)1 << nbits) - 1); + + ASN_DEBUG(" [PER got %2d<=%2d bits => span %d %+ld[%d..%d]:%02x (%d) => 0x%x]", + (int)nbits, (int)nleft, + (int)pd->moved, + (((long)pd->buffer) & 0xf), + (int)pd->nboff, (int)pd->nbits, + ((pd->buffer != NULL)?pd->buffer[0]:0), + (int)(pd->nbits - pd->nboff), + (int)accum); + + return accum; +} + +/* + * Extract a large number of bits from the specified PER data pointer. + */ +int +asn_get_many_bits(asn_bit_data_t *pd, uint8_t *dst, int alright, int nbits) { + int32_t value; + + if(alright && (nbits & 7)) { + /* Perform right alignment of a first few bits */ + value = asn_get_few_bits(pd, nbits & 0x07); + if(value < 0) return -1; + *dst++ = value; /* value is already right-aligned */ + nbits &= ~7; + } + + while(nbits) { + if(nbits >= 24) { + value = asn_get_few_bits(pd, 24); + if(value < 0) return -1; + *(dst++) = value >> 16; + *(dst++) = value >> 8; + *(dst++) = value; + nbits -= 24; + } else { + value = asn_get_few_bits(pd, nbits); + if(value < 0) return -1; + if(nbits & 7) { /* implies left alignment */ + value <<= 8 - (nbits & 7), + nbits += 8 - (nbits & 7); + if(nbits > 24) + *dst++ = value >> 24; + } + if(nbits > 16) + *dst++ = value >> 16; + if(nbits > 8) + *dst++ = value >> 8; + *dst++ = value; + break; + } + } + + return 0; +} + +/* + * Put a small number of bits (<= 31). + */ +int +asn_put_few_bits(asn_bit_outp_t *po, uint32_t bits, int obits) { + size_t off; /* Next after last bit offset */ + size_t omsk; /* Existing last byte meaningful bits mask */ + uint8_t *buf; + + if(obits <= 0 || obits >= 32) return obits ? -1 : 0; + + ASN_DEBUG("[PER put %d bits %x to %p+%d bits]", + obits, (int)bits, (void *)po->buffer, (int)po->nboff); + + /* + * Normalize position indicator. + */ + if(po->nboff >= 8) { + po->buffer += (po->nboff >> 3); + po->nbits -= (po->nboff & ~0x07); + po->nboff &= 0x07; + } + + /* + * Flush whole-bytes output, if necessary. + */ + if(po->nboff + obits > po->nbits) { + size_t complete_bytes; + if(!po->buffer) po->buffer = po->tmpspace; + complete_bytes = (po->buffer - po->tmpspace); + ASN_DEBUG("[PER output %ld complete + %ld]", + (long)complete_bytes, (long)po->flushed_bytes); + if(po->output(po->tmpspace, complete_bytes, po->op_key) < 0) + return -1; + if(po->nboff) + po->tmpspace[0] = po->buffer[0]; + po->buffer = po->tmpspace; + po->nbits = 8 * sizeof(po->tmpspace); + po->flushed_bytes += complete_bytes; + } + + /* + * Now, due to sizeof(tmpspace), we are guaranteed large enough space. + */ + buf = po->buffer; + omsk = ~((1 << (8 - po->nboff)) - 1); + off = (po->nboff + obits); + + /* Clear data of debris before meaningful bits */ + bits &= (((uint32_t)1 << obits) - 1); + + ASN_DEBUG("[PER out %d %u/%x (t=%d,o=%d) %x&%x=%x]", obits, + (int)bits, (int)bits, + (int)po->nboff, (int)off, + buf[0], (int)(omsk&0xff), + (int)(buf[0] & omsk)); + + if(off <= 8) /* Completely within 1 byte */ + po->nboff = off, + bits <<= (8 - off), + buf[0] = (buf[0] & omsk) | bits; + else if(off <= 16) + po->nboff = off, + bits <<= (16 - off), + buf[0] = (buf[0] & omsk) | (bits >> 8), + buf[1] = bits; + else if(off <= 24) + po->nboff = off, + bits <<= (24 - off), + buf[0] = (buf[0] & omsk) | (bits >> 16), + buf[1] = bits >> 8, + buf[2] = bits; + else if(off <= 31) + po->nboff = off, + bits <<= (32 - off), + buf[0] = (buf[0] & omsk) | (bits >> 24), + buf[1] = bits >> 16, + buf[2] = bits >> 8, + buf[3] = bits; + else { + if(asn_put_few_bits(po, bits >> (obits - 24), 24)) return -1; + if(asn_put_few_bits(po, bits, obits - 24)) return -1; + } + + ASN_DEBUG("[PER out %u/%x => %02x buf+%ld]", + (int)bits, (int)bits, buf[0], + (long)(po->buffer - po->tmpspace)); + + return 0; +} + + +/* + * Output a large number of bits. + */ +int +asn_put_many_bits(asn_bit_outp_t *po, const uint8_t *src, int nbits) { + + while(nbits) { + uint32_t value; + + if(nbits >= 24) { + value = (src[0] << 16) | (src[1] << 8) | src[2]; + src += 3; + nbits -= 24; + if(asn_put_few_bits(po, value, 24)) + return -1; + } else { + value = src[0]; + if(nbits > 8) + value = (value << 8) | src[1]; + if(nbits > 16) + value = (value << 8) | src[2]; + if(nbits & 0x07) + value >>= (8 - (nbits & 0x07)); + if(asn_put_few_bits(po, value, nbits)) + return -1; + break; + } + } + + return 0; +} + + +int +asn_put_aligned_flush(asn_bit_outp_t *po) { + uint32_t unused_bits = (0x7 & (8 - (po->nboff & 0x07))); + size_t complete_bytes = + (po->buffer ? po->buffer - po->tmpspace : 0) + ((po->nboff + 7) >> 3); + + if(unused_bits) { + po->buffer[po->nboff >> 3] &= ~0u << unused_bits; + } + + if(po->output(po->tmpspace, complete_bytes, po->op_key) < 0) { + return -1; + } else { + po->buffer = po->tmpspace; + po->nboff = 0; + po->nbits = 8 * sizeof(po->tmpspace); + po->flushed_bytes += complete_bytes; + return 0; + } +} + diff --git a/Bouncer/e2sm_rc/lib/asn_codecs_prim.c b/Bouncer/e2sm_rc/lib/asn_codecs_prim.c new file mode 100644 index 0000000..fc24247 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/asn_codecs_prim.c @@ -0,0 +1,317 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Decode an always-primitive type. + */ +asn_dec_rval_t +ber_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buf_ptr, size_t size, int tag_mode) { + ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr; + asn_dec_rval_t rval; + ber_tlv_len_t length = 0; /* =0 to avoid [incorrect] warning. */ + + /* + * If the structure is not there, allocate it. + */ + if(st == NULL) { + st = (ASN__PRIMITIVE_TYPE_t *)CALLOC(1, sizeof(*st)); + if(st == NULL) ASN__DECODE_FAILED; + *sptr = (void *)st; + } + + ASN_DEBUG("Decoding %s as plain primitive (tm=%d)", + td->name, tag_mode); + + /* + * Check tags and extract value length. + */ + rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, + tag_mode, 0, &length, 0); + if(rval.code != RC_OK) + return rval; + + ASN_DEBUG("%s length is %d bytes", td->name, (int)length); + + /* + * Make sure we have this length. + */ + buf_ptr = ((const char *)buf_ptr) + rval.consumed; + size -= rval.consumed; + if(length > (ber_tlv_len_t)size) { + rval.code = RC_WMORE; + rval.consumed = 0; + return rval; + } + + st->size = (int)length; + /* The following better be optimized away. */ + if(sizeof(st->size) != sizeof(length) + && (ber_tlv_len_t)st->size != length) { + st->size = 0; + ASN__DECODE_FAILED; + } + + st->buf = (uint8_t *)MALLOC(length + 1); + if(!st->buf) { + st->size = 0; + ASN__DECODE_FAILED; + } + + memcpy(st->buf, buf_ptr, length); + st->buf[length] = '\0'; /* Just in case */ + + rval.code = RC_OK; + rval.consumed += length; + + ASN_DEBUG("Took %ld/%ld bytes to encode %s", + (long)rval.consumed, + (long)length, td->name); + + return rval; +} + +/* + * Encode an always-primitive type using DER. + */ +asn_enc_rval_t +der_encode_primitive(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t erval = {0,0,0}; + const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr; + + ASN_DEBUG("%s %s as a primitive type (tm=%d)", + cb?"Encoding":"Estimating", td->name, tag_mode); + + erval.encoded = der_write_tags(td, st->size, tag_mode, 0, tag, + cb, app_key); + ASN_DEBUG("%s wrote tags %d", td->name, (int)erval.encoded); + if(erval.encoded == -1) { + erval.failed_type = td; + erval.structure_ptr = sptr; + return erval; + } + + if(cb && st->buf) { + if(cb(st->buf, st->size, app_key) < 0) { + erval.encoded = -1; + erval.failed_type = td; + erval.structure_ptr = sptr; + return erval; + } + } else { + assert(st->buf || st->size == 0); + } + + erval.encoded += st->size; + ASN__ENCODED_OK(erval); +} + +void +ASN__PRIMITIVE_TYPE_free(const asn_TYPE_descriptor_t *td, void *sptr, + enum asn_struct_free_method method) { + ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)sptr; + + if(!td || !sptr) + return; + + ASN_DEBUG("Freeing %s as a primitive type", td->name); + + if(st->buf) + FREEMEM(st->buf); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(sptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(sptr, 0, sizeof(ASN__PRIMITIVE_TYPE_t)); + break; + } +} + + +/* + * Local internal type passed around as an argument. + */ +struct xdp_arg_s { + const asn_TYPE_descriptor_t *type_descriptor; + void *struct_key; + xer_primitive_body_decoder_f *prim_body_decoder; + int decoded_something; + int want_more; +}; + +/* + * Since some kinds of primitive values can be encoded using value-specific + * tags (, , etc), the primitive decoder must + * be supplied with such tags to parse them as needed. + */ +static int +xer_decode__unexpected_tag(void *key, const void *chunk_buf, size_t chunk_size) { + struct xdp_arg_s *arg = (struct xdp_arg_s *)key; + enum xer_pbd_rval bret; + + /* + * The chunk_buf is guaranteed to start at '<'. + */ + assert(chunk_size && ((const char *)chunk_buf)[0] == 0x3c); + + /* + * Decoding was performed once already. Prohibit doing it again. + */ + if(arg->decoded_something) + return -1; + + bret = arg->prim_body_decoder(arg->type_descriptor, + arg->struct_key, chunk_buf, chunk_size); + switch(bret) { + case XPBD_SYSTEM_FAILURE: + case XPBD_DECODER_LIMIT: + case XPBD_BROKEN_ENCODING: + break; + case XPBD_BODY_CONSUMED: + /* Tag decoded successfully */ + arg->decoded_something = 1; + /* Fall through */ + case XPBD_NOT_BODY_IGNORE: /* Safe to proceed further */ + return 0; + } + + return -1; +} + +static ssize_t +xer_decode__primitive_body(void *key, const void *chunk_buf, size_t chunk_size, int have_more) { + struct xdp_arg_s *arg = (struct xdp_arg_s *)key; + enum xer_pbd_rval bret; + size_t lead_wsp_size; + + if(arg->decoded_something) { + if(xer_whitespace_span(chunk_buf, chunk_size) == chunk_size) { + /* + * Example: + * "123 " + * ^- chunk_buf position. + */ + return chunk_size; + } + /* + * Decoding was done once already. Prohibit doing it again. + */ + return -1; + } + + if(!have_more) { + /* + * If we've received something like "1", we can't really + * tell whether it is really `1` or `123`, until we know + * that there is no more data coming. + * The have_more argument will be set to 1 once something + * like this is available to the caller of this callback: + * "1want_more = 1; + return -1; + } + + lead_wsp_size = xer_whitespace_span(chunk_buf, chunk_size); + chunk_buf = (const char *)chunk_buf + lead_wsp_size; + chunk_size -= lead_wsp_size; + + bret = arg->prim_body_decoder(arg->type_descriptor, + arg->struct_key, chunk_buf, chunk_size); + switch(bret) { + case XPBD_SYSTEM_FAILURE: + case XPBD_DECODER_LIMIT: + case XPBD_BROKEN_ENCODING: + break; + case XPBD_BODY_CONSUMED: + /* Tag decoded successfully */ + arg->decoded_something = 1; + /* Fall through */ + case XPBD_NOT_BODY_IGNORE: /* Safe to proceed further */ + return lead_wsp_size + chunk_size; + } + + return -1; +} + + +asn_dec_rval_t +xer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + size_t struct_size, const char *opt_mname, + const void *buf_ptr, size_t size, + xer_primitive_body_decoder_f *prim_body_decoder) { + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + asn_struct_ctx_t s_ctx; + struct xdp_arg_s s_arg; + asn_dec_rval_t rc; + + /* + * Create the structure if does not exist. + */ + if(!*sptr) { + *sptr = CALLOC(1, struct_size); + if(!*sptr) ASN__DECODE_FAILED; + } + + memset(&s_ctx, 0, sizeof(s_ctx)); + s_arg.type_descriptor = td; + s_arg.struct_key = *sptr; + s_arg.prim_body_decoder = prim_body_decoder; + s_arg.decoded_something = 0; + s_arg.want_more = 0; + + rc = xer_decode_general(opt_codec_ctx, &s_ctx, &s_arg, + xml_tag, buf_ptr, size, + xer_decode__unexpected_tag, xer_decode__primitive_body); + switch(rc.code) { + case RC_OK: + if(!s_arg.decoded_something) { + char ch; + ASN_DEBUG("Primitive body is not recognized, " + "supplying empty one"); + /* + * Decoding opportunity has come and gone. + * Where's the result? + * Try to feed with empty body, see if it eats it. + */ + if(prim_body_decoder(s_arg.type_descriptor, + s_arg.struct_key, &ch, 0) + != XPBD_BODY_CONSUMED) { + /* + * This decoder does not like empty stuff. + */ + ASN__DECODE_FAILED; + } + } + break; + case RC_WMORE: + /* + * Redo the whole thing later. + * We don't have a context to save intermediate parsing state. + */ + rc.consumed = 0; + break; + case RC_FAIL: + rc.consumed = 0; + if(s_arg.want_more) + rc.code = RC_WMORE; + else + ASN__DECODE_FAILED; + break; + } + return rc; +} + diff --git a/Bouncer/e2sm_rc/lib/asn_internal.c b/Bouncer/e2sm_rc/lib/asn_internal.c new file mode 100644 index 0000000..004660b --- /dev/null +++ b/Bouncer/e2sm_rc/lib/asn_internal.c @@ -0,0 +1,49 @@ +#include + +ssize_t +asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key, + const char *fmt, ...) { + char scratch[64]; + char *buf = scratch; + size_t buf_size = sizeof(scratch); + int wrote; + int cb_ret; + + do { + va_list args; + va_start(args, fmt); + + wrote = vsnprintf(buf, buf_size, fmt, args); + if(wrote < (ssize_t)buf_size) { + if(wrote < 0) { + if(buf != scratch) FREEMEM(buf); + va_end(args); + return -1; + } + break; + } + + buf_size <<= 1; + if(buf == scratch) { + buf = MALLOC(buf_size); + if(!buf) { va_end(args); return -1; } + } else { + void *p = REALLOC(buf, buf_size); + if(!p) { + FREEMEM(buf); + va_end(args); + return -1; + } + buf = p; + } + } while(1); + + cb_ret = cb(buf, wrote, key); + if(buf != scratch) FREEMEM(buf); + if(cb_ret < 0) { + return -1; + } + + return wrote; +} + diff --git a/Bouncer/e2sm_rc/lib/asn_random_fill.c b/Bouncer/e2sm_rc/lib/asn_random_fill.c new file mode 100644 index 0000000..819cf70 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/asn_random_fill.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +int +asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr, + size_t length) { + + if(td && td->op->random_fill) { + asn_random_fill_result_t res = + td->op->random_fill(td, struct_ptr, 0, length); + return (res.code == ARFILL_OK) ? 0 : -1; + } else { + return -1; + } +} + +static uintmax_t +asn__intmax_range(intmax_t lb, intmax_t ub) { + assert(lb <= ub); + if((ub < 0) == (lb < 0)) { + return ub - lb; + } else if(lb < 0) { + return 1 + ((uintmax_t)ub + (uintmax_t)-(lb + 1)); + } else { + assert(!"Unreachable"); + return 0; + } +} + +intmax_t +asn_random_between(intmax_t lb, intmax_t rb) { + if(lb == rb) { + return lb; + } else { + const uintmax_t intmax_max = ((~(uintmax_t)0) >> 1); + uintmax_t range = asn__intmax_range(lb, rb); + uintmax_t value = 0; + uintmax_t got_entropy = 0; + + assert(RAND_MAX > 0xffffff); /* Seen 7ffffffd! */ + assert(range < intmax_max); + + for(; got_entropy < range;) { + got_entropy = (got_entropy << 24) | 0xffffff; + value = (value << 24) | (random() % 0xffffff); + } + + return lb + (intmax_t)(value % (range + 1)); + } +} diff --git a/Bouncer/e2sm_rc/lib/ber_decoder.c b/Bouncer/e2sm_rc/lib/ber_decoder.c new file mode 100644 index 0000000..75d6016 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ber_decoder.c @@ -0,0 +1,283 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include + +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) +#undef RETURN +#define RETURN(_code) do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + if(opt_ctx) opt_ctx->step = step; /* Save context */ \ + if(_code == RC_OK || opt_ctx) \ + rval.consumed = consumed_myself; \ + else \ + rval.consumed = 0; /* Context-free */ \ + return rval; \ + } while(0) + +/* + * The BER decoder of any type. + */ +asn_dec_rval_t +ber_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, + const void *ptr, size_t size) { + asn_codec_ctx_t s_codec_ctx; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* + * Invoke type-specific decoder. + */ + return type_descriptor->op->ber_decoder(opt_codec_ctx, type_descriptor, + struct_ptr, /* Pointer to the destination structure */ + ptr, size, /* Buffer and its size */ + 0 /* Default tag mode is 0 */ + ); +} + +/* + * Check the set of >> tags matches the definition. + */ +asn_dec_rval_t +ber_check_tags(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, asn_struct_ctx_t *opt_ctx, + const void *ptr, size_t size, int tag_mode, int last_tag_form, + ber_tlv_len_t *last_length, int *opt_tlv_form) { + ssize_t consumed_myself = 0; + ssize_t tag_len; + ssize_t len_len; + ber_tlv_tag_t tlv_tag; + ber_tlv_len_t tlv_len; + ber_tlv_len_t limit_len = -1; + int expect_00_terminators = 0; + int tlv_constr = -1; /* If CHOICE, opt_tlv_form is not given */ + int step = opt_ctx ? opt_ctx->step : 0; /* Where we left previously */ + int tagno; + + /* + * Make sure we didn't exceed the maximum stack size. + */ + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + RETURN(RC_FAIL); + + /* + * So what does all this implicit skip stuff mean? + * Imagine two types, + * A ::= [5] IMPLICIT T + * B ::= [2] EXPLICIT T + * Where T is defined as + * T ::= [4] IMPLICIT SEQUENCE { ... } + * + * Let's say, we are starting to decode type A, given the + * following TLV stream: <5> <0>. What does this mean? + * It means that the type A contains type T which is, + * in turn, empty. + * Remember though, that we are still in A. We cannot + * just pass control to the type T decoder. Why? Because + * the type T decoder expects <4> <0>, not <5> <0>. + * So, we must make sure we are going to receive <5> while + * still in A, then pass control to the T decoder, indicating + * that the tag <4> was implicitly skipped. The decoder of T + * hence will be prepared to treat <4> as valid tag, and decode + * it appropriately. + */ + + tagno = step /* Continuing where left previously */ + + (tag_mode==1?-1:0) + ; + ASN_DEBUG("ber_check_tags(%s, size=%ld, tm=%d, step=%d, tagno=%d)", + td->name, (long)size, tag_mode, step, tagno); + /* assert(td->tags_count >= 1) May not be the case for CHOICE or ANY */ + + if(tag_mode == 0 && tagno == (int)td->tags_count) { + /* + * This must be the _untagged_ ANY type, + * which outermost tag isn't known in advance. + * Fetch the tag and length separately. + */ + tag_len = ber_fetch_tag(ptr, size, &tlv_tag); + switch(tag_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + tlv_constr = BER_TLV_CONSTRUCTED(ptr); + len_len = ber_fetch_length(tlv_constr, + (const char *)ptr + tag_len, size - tag_len, &tlv_len); + switch(len_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + ASN_DEBUG("Advancing %ld in ANY case", + (long)(tag_len + len_len)); + ADVANCE(tag_len + len_len); + } else { + assert(tagno < (int)td->tags_count); /* At least one loop */ + } + for((void)tagno; tagno < (int)td->tags_count; tagno++, step++) { + + /* + * Fetch and process T from TLV. + */ + tag_len = ber_fetch_tag(ptr, size, &tlv_tag); + ASN_DEBUG("Fetching tag from {%p,%ld}: " + "len %ld, step %d, tagno %d got %s", + ptr, (long)size, + (long)tag_len, step, tagno, + ber_tlv_tag_string(tlv_tag)); + switch(tag_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + tlv_constr = BER_TLV_CONSTRUCTED(ptr); + + /* + * If {I}, don't check anything. + * If {I,B,C}, check B and C unless we're at I. + */ + if(tag_mode != 0 && step == 0) { + /* + * We don't expect tag to match here. + * It's just because we don't know how the tag + * is supposed to look like. + */ + } else { + assert(tagno >= 0); /* Guaranteed by the code above */ + if(tlv_tag != td->tags[tagno]) { + /* + * Unexpected tag. Too bad. + */ + ASN_DEBUG("Expected: %s, " + "expectation failed (tn=%d, tm=%d)", + ber_tlv_tag_string(td->tags[tagno]), + tagno, tag_mode + ); + RETURN(RC_FAIL); + } + } + + /* + * Attention: if there are more tags expected, + * ensure that the current tag is presented + * in constructed form (it contains other tags!). + * If this one is the last one, check that the tag form + * matches the one given in descriptor. + */ + if(tagno < ((int)td->tags_count - 1)) { + if(tlv_constr == 0) { + ASN_DEBUG("tlv_constr = %d, expfail", + tlv_constr); + RETURN(RC_FAIL); + } + } else { + if(last_tag_form != tlv_constr + && last_tag_form != -1) { + ASN_DEBUG("last_tag_form %d != %d", + last_tag_form, tlv_constr); + RETURN(RC_FAIL); + } + } + + /* + * Fetch and process L from TLV. + */ + len_len = ber_fetch_length(tlv_constr, + (const char *)ptr + tag_len, size - tag_len, &tlv_len); + ASN_DEBUG("Fetching len = %ld", (long)len_len); + switch(len_len) { + case -1: RETURN(RC_FAIL); + case 0: RETURN(RC_WMORE); + } + + /* + * FIXME + * As of today, the chain of tags + * must either contain several indefinite length TLVs, + * or several definite length ones. + * No mixing is allowed. + */ + if(tlv_len == -1) { + /* + * Indefinite length. + */ + if(limit_len == -1) { + expect_00_terminators++; + } else { + ASN_DEBUG("Unexpected indefinite length " + "in a chain of definite lengths"); + RETURN(RC_FAIL); + } + ADVANCE(tag_len + len_len); + continue; + } else { + if(expect_00_terminators) { + ASN_DEBUG("Unexpected definite length " + "in a chain of indefinite lengths"); + RETURN(RC_FAIL); + } + } + + /* + * Check that multiple TLVs specify ever decreasing length, + * which is consistent. + */ + if(limit_len == -1) { + limit_len = tlv_len + tag_len + len_len; + if(limit_len < 0) { + /* Too great tlv_len value? */ + RETURN(RC_FAIL); + } + } else if(limit_len != tlv_len + tag_len + len_len) { + /* + * Inner TLV specifies length which is inconsistent + * with the outer TLV's length value. + */ + ASN_DEBUG("Outer TLV is %ld and inner is %ld", + (long)limit_len, (long)tlv_len); + RETURN(RC_FAIL); + } + + ADVANCE(tag_len + len_len); + + limit_len -= (tag_len + len_len); + if((ssize_t)size > limit_len) { + /* + * Make sure that we won't consume more bytes + * from the parent frame than the inferred limit. + */ + size = limit_len; + } + } + + if(opt_tlv_form) + *opt_tlv_form = tlv_constr; + if(expect_00_terminators) + *last_length = -expect_00_terminators; + else + *last_length = tlv_len; + + RETURN(RC_OK); +} diff --git a/Bouncer/e2sm_rc/lib/ber_tlv_length.c b/Bouncer/e2sm_rc/lib/ber_tlv_length.c new file mode 100644 index 0000000..0a0deec --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ber_tlv_length.c @@ -0,0 +1,168 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +ssize_t +ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, + ber_tlv_len_t *len_r) { + const uint8_t *buf = (const uint8_t *)bufptr; + unsigned oct; + + if(size == 0) + return 0; /* Want more */ + + oct = *(const uint8_t *)buf; + if((oct & 0x80) == 0) { + /* + * Short definite length. + */ + *len_r = oct; /* & 0x7F */ + return 1; + } else { + ber_tlv_len_t len; + size_t skipped; + + if(_is_constructed && oct == 0x80) { + *len_r = -1; /* Indefinite length */ + return 1; + } + + if(oct == 0xff) { + /* Reserved in standard for future use. */ + return -1; + } + + oct &= 0x7F; /* Leave only the 7 LS bits */ + for(len = 0, buf++, skipped = 1; + oct && (++skipped <= size); buf++, oct--) { + + /* Verify that we won't overflow. */ + if(!(len >> ((8 * sizeof(len)) - (8+1)))) { + len = (len << 8) | *buf; + } else { + /* Too large length value. */ + return -1; + } + } + + if(oct == 0) { + if(len < 0 || len > RSSIZE_MAX) { + /* Length value out of sane range. */ + return -1; + } + + *len_r = len; + return skipped; + } + + return 0; /* Want more */ + } + +} + +ssize_t +ber_skip_length(const asn_codec_ctx_t *opt_codec_ctx, + int _is_constructed, const void *ptr, size_t size) { + ber_tlv_len_t vlen; /* Length of V in TLV */ + ssize_t tl; /* Length of L in TLV */ + ssize_t ll; /* Length of L in TLV */ + size_t skip; + + /* + * Make sure we didn't exceed the maximum stack size. + */ + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + return -1; + + /* + * Determine the size of L in TLV. + */ + ll = ber_fetch_length(_is_constructed, ptr, size, &vlen); + if(ll <= 0) return ll; + + /* + * Definite length. + */ + if(vlen >= 0) { + skip = ll + vlen; + if(skip > size) + return 0; /* Want more */ + return skip; + } + + /* + * Indefinite length! + */ + ASN_DEBUG("Skipping indefinite length"); + for(skip = ll, ptr = ((const char *)ptr) + ll, size -= ll;;) { + ber_tlv_tag_t tag; + + /* Fetch the tag */ + tl = ber_fetch_tag(ptr, size, &tag); + if(tl <= 0) return tl; + + ll = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + ((const char *)ptr) + tl, size - tl); + if(ll <= 0) return ll; + + skip += tl + ll; + + /* + * This may be the end of the indefinite length structure, + * two consecutive 0 octets. + * Check if it is true. + */ + if(((const uint8_t *)ptr)[0] == 0 + && ((const uint8_t *)ptr)[1] == 0) + return skip; + + ptr = ((const char *)ptr) + tl + ll; + size -= tl + ll; + } + + /* UNREACHABLE */ +} + +size_t +der_tlv_length_serialize(ber_tlv_len_t len, void *bufp, size_t size) { + size_t required_size; /* Size of len encoding */ + uint8_t *buf = (uint8_t *)bufp; + uint8_t *end; + int i; + + if(len <= 127) { + /* Encoded in 1 octet */ + if(size) *buf = (uint8_t)len; + return 1; + } + + /* + * Compute the size of the subsequent bytes. + */ + for(required_size = 1, i = 8; i < 8 * (int)sizeof(len); i += 8) { + if(len >> i) + required_size++; + else + break; + } + + if(size <= required_size) + return required_size + 1; + + *buf++ = (uint8_t)(0x80 | required_size); /* Length of the encoding */ + + /* + * Produce the len encoding, space permitting. + */ + end = buf + required_size; + for(i -= 8; buf < end; i -= 8, buf++) + *buf = (uint8_t)(len >> i); + + return required_size + 1; +} + diff --git a/Bouncer/e2sm_rc/lib/ber_tlv_tag.c b/Bouncer/e2sm_rc/lib/ber_tlv_tag.c new file mode 100644 index 0000000..4a7d732 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/ber_tlv_tag.c @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +ssize_t +ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { + ber_tlv_tag_t val; + ber_tlv_tag_t tclass; + size_t skipped; + + if(size == 0) + return 0; + + val = *(const uint8_t *)ptr; + tclass = (val >> 6); + if((val &= 0x1F) != 0x1F) { + /* + * Simple form: everything encoded in a single octet. + * Tag Class is encoded using two least significant bits. + */ + *tag_r = (val << 2) | tclass; + return 1; + } + + /* + * Each octet contains 7 bits of useful information. + * The MSB is 0 if it is the last octet of the tag. + */ + for(val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; + skipped <= size; + ptr = ((const char *)ptr) + 1, skipped++) { + unsigned int oct = *(const uint8_t *)ptr; + if(oct & 0x80) { + val = (val << 7) | (oct & 0x7F); + /* + * Make sure there are at least 9 bits spare + * at the MS side of a value. + */ + if(val >> ((8 * sizeof(val)) - 9)) { + /* + * We would not be able to accomodate + * any more tag bits. + */ + return -1; + } + } else { + val = (val << 7) | oct; + *tag_r = (val << 2) | tclass; + return skipped; + } + } + + return 0; /* Want more */ +} + + +ssize_t +ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *f) { + char buf[sizeof("[APPLICATION ]") + 32]; + ssize_t ret; + + ret = ber_tlv_tag_snprint(tag, buf, sizeof(buf)); + if(ret >= (ssize_t)sizeof(buf) || ret < 2) { + errno = EPERM; + return -1; + } + + return fwrite(buf, 1, ret, f); +} + +ssize_t +ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t size) { + const char *type = 0; + int ret; + + switch(tag & 0x3) { + case ASN_TAG_CLASS_UNIVERSAL: type = "UNIVERSAL "; break; + case ASN_TAG_CLASS_APPLICATION: type = "APPLICATION "; break; + case ASN_TAG_CLASS_CONTEXT: type = ""; break; + case ASN_TAG_CLASS_PRIVATE: type = "PRIVATE "; break; + } + + ret = snprintf(buf, size, "[%s%u]", type, ((unsigned)tag) >> 2); + if(ret <= 0 && size) buf[0] = '\0'; /* against broken libc's */ + + return ret; +} + +char * +ber_tlv_tag_string(ber_tlv_tag_t tag) { + static char buf[sizeof("[APPLICATION ]") + 32]; + + (void)ber_tlv_tag_snprint(tag, buf, sizeof(buf)); + + return buf; +} + + +size_t +ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufp, size_t size) { + int tclass = BER_TAG_CLASS(tag); + ber_tlv_tag_t tval = BER_TAG_VALUE(tag); + uint8_t *buf = (uint8_t *)bufp; + uint8_t *end; + size_t required_size; + size_t i; + + if(tval <= 30) { + /* Encoded in 1 octet */ + if(size) buf[0] = (tclass << 6) | tval; + return 1; + } else if(size) { + *buf++ = (tclass << 6) | 0x1F; + size--; + } + + /* + * Compute the size of the subsequent bytes. + */ + for(required_size = 1, i = 7; i < 8 * sizeof(tval); i += 7) { + if(tval >> i) + required_size++; + else + break; + } + + if(size < required_size) + return required_size + 1; + + /* + * Fill in the buffer, space permitting. + */ + end = buf + required_size - 1; + for(i -= 7; buf < end; i -= 7, buf++) + *buf = 0x80 | ((tval >> i) & 0x7F); + *buf = (tval & 0x7F); /* Last octet without high bit */ + + return required_size + 1; +} + diff --git a/Bouncer/e2sm_rc/lib/constr_CHOICE.c b/Bouncer/e2sm_rc/lib/constr_CHOICE.c new file mode 100644 index 0000000..86dcbb0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_CHOICE.c @@ -0,0 +1,1533 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num;\ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * See the definitions. + */ +static unsigned _fetch_present_idx(const void *struct_ptr, unsigned off, + unsigned size); +static void _set_present_idx(void *sptr, unsigned offset, unsigned size, + unsigned pres); +static const void *_get_member_ptr(const asn_TYPE_descriptor_t *, + const void *sptr, asn_TYPE_member_t **elm, + unsigned *present); + +/* + * Tags are canonically sorted in the tag to member table. + */ +static int +_search4tag(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) + return 0; + else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + +/* + * The decoder of the CHOICE type. + */ +asn_dec_rval_t +CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + ssize_t tag_len; /* Length of TLV's T */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + ASN_DEBUG("Decoding %s as CHOICE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + if(tag_mode || td->tags_count) { + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, -1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) { + /* ?Substracted below! */ + ctx->left += rval.consumed; + } + ADVANCE(rval.consumed); + } else { + ctx->left = -1; + } + + NEXT_PHASE(ctx); + + ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", + (long)ctx->left, (long)size); + + /* Fall through */ + case 1: + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + ASN_DEBUG("In %s CHOICE tag length %d", td->name, (int)tag_len); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + do { + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key; + + key.el_tag = tlv_tag; + t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, + specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _search4tag); + if(t2m) { + /* + * Found the element corresponding to the tag. + */ + NEXT_PHASE(ctx); + ctx->step = t2m->el_no; + break; + } else if(specs->ext_start == -1) { + ASN_DEBUG("Unexpected tag %s " + "in non-extensible CHOICE %s", + ber_tlv_tag_string(tlv_tag), td->name); + RETURN(RC_FAIL); + } else { + /* Skip this tag */ + ssize_t skip; + + ASN_DEBUG("Skipping unknown tag %s", + ber_tlv_tag_string(tlv_tag)); + + skip = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tag_len, + LEFT - tag_len); + + switch(skip) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(skip + tag_len); + RETURN(RC_OK); + } + } while(0); + + case 2: + /* + * PHASE 2. + * Read in the element. + */ + do { + asn_TYPE_member_t *elm;/* CHOICE's element */ + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + elm = &elements[ctx->step]; + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + /* Set presence to be able to free it properly at any time */ + _set_present_idx(st, specs->pres_offset, + specs->pres_size, ctx->step + 1); + /* + * Invoke the member fetch routine according to member's type + */ + rval = elm->type->op->ber_decoder(opt_codec_ctx, elm->type, + memb_ptr2, ptr, LEFT, elm->tag_mode); + switch(rval.code) { + case RC_OK: + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + RETURN(RC_FAIL); + case RC_FAIL: /* Fatal error */ + RETURN(rval.code); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } while(0); + + NEXT_PHASE(ctx); + + /* Fall through */ + case 3: + ASN_DEBUG("CHOICE %s Leftover: %ld, size = %ld, tm=%d, tc=%d", + td->name, (long)ctx->left, (long)size, + tag_mode, td->tags_count); + + if(ctx->left > 0) { + /* + * The type must be fully decoded + * by the CHOICE member-specific decoder. + */ + RETURN(RC_FAIL); + } + + if(ctx->left == -1 + && !(tag_mode || td->tags_count)) { + /* + * This is an untagged CHOICE. + * It doesn't contain nothing + * except for the member itself, including all its tags. + * The decoding is completed. + */ + NEXT_PHASE(ctx); + break; + } + + /* + * Read in the "end of data chunks"'s. + */ + while(ctx->left < 0) { + ssize_t tl; + + tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tl) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + /* + * Expected <0><0>... + */ + if(((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Correctly finished with <0><0>. + */ + ADVANCE(2); + ctx->left++; + continue; + } + } else { + ASN_DEBUG("Unexpected continuation in %s", + td->name); + RETURN(RC_FAIL); + } + + /* UNREACHABLE */ + } + + NEXT_PHASE(ctx); + case 4: + /* No meaningful work here */ + break; + } + + RETURN(RC_OK); +} + +asn_enc_rval_t +CHOICE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE element */ + asn_enc_rval_t erval = {0,0,0}; + const void *memb_ptr; + size_t computed_size = 0; + unsigned present; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("%s %s as CHOICE", + cb?"Encoding":"Estimating", td->name); + + present = _fetch_present_idx(sptr, + specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present == 0 || present > td->elements_count) { + if(present == 0 && td->elements_count == 0) { + /* The CHOICE is empty?! */ + erval.encoded = 0; + ASN__ENCODED_OK(erval); + } + ASN__ENCODE_FAILED; + } + + /* + * Seek over the present member of the structure. + */ + elm = &td->elements[present-1]; + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(memb_ptr == 0) { + if(elm->optional) { + erval.encoded = 0; + ASN__ENCODED_OK(erval); + } + /* Mandatory element absent */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* + * If the CHOICE itself is tagged EXPLICIT: + * T ::= [2] EXPLICIT CHOICE { ... } + * Then emit the appropriate tags. + */ + if(tag_mode == 1 || td->tags_count) { + /* + * For this, we need to pre-compute the member. + */ + ssize_t ret; + + /* Encode member with its tag */ + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + elm->tag_mode, elm->tag, 0, 0); + if(erval.encoded == -1) + return erval; + + /* Encode CHOICE with parent or my own tag */ + ret = der_write_tags(td, erval.encoded, tag_mode, 1, tag, + cb, app_key); + if(ret == -1) + ASN__ENCODE_FAILED; + computed_size += ret; + } + + /* + * Encode the single underlying member. + */ + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + elm->tag_mode, elm->tag, cb, app_key); + if(erval.encoded == -1) + return erval; + + ASN_DEBUG("Encoded CHOICE member in %ld bytes (+%ld)", + (long)erval.encoded, (long)computed_size); + + erval.encoded += computed_size; + + return erval; +} + +ber_tlv_tag_t +CHOICE_outmost_tag(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + assert(tag_mode == 0); (void)tag_mode; + assert(tag == 0); (void)tag; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); + + if(present > 0 && present <= td->elements_count) { + const asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *) + ((const char *)ptr + elm->memb_offset); + } else { + memb_ptr = (const void *) + ((const char *)ptr + elm->memb_offset); + } + + return asn_TYPE_outmost_tag(elm->type, memb_ptr, + elm->tag_mode, elm->tag); + } else { + return (ber_tlv_tag_t)-1; + } +} + +int +CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) + return 0; + ASN__CTFAIL(app_key, td, sptr, + "%s: mandatory CHOICE element %s absent (%s:%d)", + td->name, elm->name, __FILE__, __LINE__); + return -1; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(elm->encoding_constraints.general_constraints) { + return elm->encoding_constraints.general_constraints(elm->type, memb_ptr, + ctfailcb, app_key); + } else { + return elm->type->encoding_constraints.general_constraints(elm->type, + memb_ptr, ctfailcb, app_key); + } + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: no CHOICE element given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + buf_ptr = (const void *)(((const char *)buf_ptr) + num); \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +CHOICE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval; /* Return value of a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* Element index */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + if(ctx->phase == 0 && !*xml_tag) + ctx->phase = 1; /* Skip the outer tag checking phase */ + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + * Phase 3: Only waiting for closing tag. + * Phase 4: Skipping unknown extensions. + * Phase 5: PHASED OUT + */ + for(edx = ctx->step; ctx->phase <= 4;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + asn_TYPE_member_t *elm; + + /* + * Go inside the member. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + unsigned old_present; + + elm = &td->elements[edx]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Start/Continue decoding the inner member */ + tmprval = elm->type->op->xer_decoder(opt_codec_ctx, + elm->type, memb_ptr2, elm->name, + buf_ptr, size); + XER_ADVANCE(tmprval.consumed); + ASN_DEBUG("XER/CHOICE: itdf: [%s] code=%d", + elm->type->name, tmprval.code); + old_present = _fetch_present_idx(st, + specs->pres_offset, specs->pres_size); + assert(old_present == 0 || old_present == edx + 1); + /* Record what we've got */ + _set_present_idx(st, + specs->pres_offset, specs->pres_size, edx + 1); + if(tmprval.code != RC_OK) + RETURN(tmprval.code); + ctx->phase = 3; + /* Fall through */ + } + + /* No need to wait for closing tag; special mode. */ + if(ctx->phase == 3 && !*xml_tag) { + ctx->phase = 5; /* Phase out */ + RETURN(RC_OK); + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, buf_ptr, size, &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + ASN_DEBUG("XER/CHOICE checked [%c%c%c%c] vs [%s], tcv=%d", + ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', + ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', + ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', + ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', + xml_tag, tcv); + + /* Skip the extensions section */ + if(ctx->phase == 4) { + ASN_DEBUG("skip_unknown(%d, %ld)", + tcv, (long)ctx->left); + switch(xer_skip_unknown(tcv, &ctx->left)) { + case -1: + ctx->phase = 5; + RETURN(RC_FAIL); + case 1: + ctx->phase = 3; + /* Fall through */ + case 0: + XER_ADVANCE(ch_size); + continue; + case 2: + ctx->phase = 3; + break; + } + } + + switch(tcv) { + case XCT_BOTH: + break; /* No CHOICE? */ + case XCT_CLOSING: + if(ctx->phase != 3) + break; + XER_ADVANCE(ch_size); + ctx->phase = 5; /* Phase out */ + RETURN(RC_OK); + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + if(ctx->phase != 1) + break; /* Really unexpected */ + + /* + * Search which inner member corresponds to this tag. + */ + for(edx = 0; edx < td->elements_count; edx++) { + elm = &td->elements[edx]; + tcv = xer_check_tag(buf_ptr,ch_size,elm->name); + switch(tcv) { + case XCT_BOTH: + case XCT_OPENING: + /* + * Process this member. + */ + ctx->step = edx; + ctx->phase = 2; + break; + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + continue; + default: + edx = td->elements_count; + break; /* Phase out */ + } + break; + } + if(edx != td->elements_count) + continue; + + /* It is expected extension */ + if(specs->ext_start != -1) { + ASN_DEBUG("Got anticipated extension"); + /* + * Check for (XCT_BOTH or XCT_UNKNOWN_BO) + * By using a mask. Only record a pure + * tags. + */ + if(tcv & XCT_CLOSING) { + /* Found without body */ + ctx->phase = 3; /* Terminating */ + } else { + ctx->left = 1; + ctx->phase = 4; /* Skip ...'s */ + } + XER_ADVANCE(ch_size); + continue; + } + + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag [%c%c%c%c] in CHOICE [%s]" + " (ph=%d, tag=%s)", + ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', + ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', + ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', + ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', + td->name, ctx->phase, xml_tag); + break; + } + + ctx->phase = 5; /* Phase out, just in case */ + RETURN(RC_FAIL); +} + + +asn_enc_rval_t +CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + unsigned present = 0; + + if(!sptr) + ASN__ENCODE_FAILED; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + + if(present == 0 || present > td->elements_count) { + ASN__ENCODE_FAILED; + } else { + asn_enc_rval_t tmper = {0,0,0}; + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr = NULL; + const char *mname = elm->name; + unsigned int mlen = strlen(mname); + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + er.encoded = 0; + + if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, + ilevel + 1, flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("", 1); + } + + if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +asn_dec_rval_t +CHOICE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_dec_rval_t rv; + const asn_per_constraint_t *ct; + asn_TYPE_member_t *elm; /* CHOICE's element */ + void *memb_ptr; + void **memb_ptr2; + void *st = *sptr; + int value; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) ct = 0; /* Not restricted */ + } + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + ASN_DEBUG("CHOICE %s got index %d in range %d", + td->name, value, ct->range_bits); + if(value > ct->upper_bound) + ASN__DECODE_FAILED; + } else { + if(specs->ext_start == -1) + ASN__DECODE_FAILED; + value = uper_get_nsnnwn(pd); + if(value < 0) ASN__DECODE_STARVED; + value += specs->ext_start; + if((unsigned)value >= td->elements_count) + ASN__DECODE_FAILED; + } + + /* Adjust if canonical order is different from natural order */ + if(specs->from_canonical_order) { + ASN_DEBUG("CHOICE presence from wire %d", value); + value = specs->from_canonical_order[value]; + ASN_DEBUG("CHOICE presence index effective %d", value); + } + + /* Set presence to be able to free it later */ + _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); + + elm = &td->elements[value]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); + + if(ct && ct->range_bits >= 0) { + rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } else { + rv = uper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + + if(rv.code != RC_OK) + ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", + elm->name, td->name, rv.code); + return rv; +} + +asn_enc_rval_t +CHOICE_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE's element */ + const asn_per_constraint_t *ct; + const void *memb_ptr; + unsigned present; + int present_enc; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s as CHOICE", td->name); + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized properly, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present == 0 || present > td->elements_count) + ASN__ENCODE_FAILED; + else + present--; + + ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); + + /* Adjust if canonical order is different from natural order */ + if(specs->to_canonical_order) + present_enc = specs->to_canonical_order[present]; + else + present_enc = present; + + if(ct && ct->range_bits >= 0) { + if(present_enc < ct->lower_bound + || present_enc > ct->upper_bound) { + if(ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG( + "CHOICE member %d (enc %d) is an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + if(per_put_few_bits(po, 1, 1)) + ASN__ENCODE_FAILED; + } else { + ASN__ENCODE_FAILED; + } + ct = 0; + } + } + if(ct && ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + if(per_put_few_bits(po, 0, 1)) + ASN__ENCODE_FAILED; + } + + + elm = &td->elements[present]; + ASN_DEBUG("CHOICE member \"%s\" %d (as %d)", elm->name, present, + present_enc); + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(ct && ct->range_bits >= 0) { + if(per_put_few_bits(po, present_enc, ct->range_bits)) + ASN__ENCODE_FAILED; + + return elm->type->op->uper_encoder( + elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); + } else { + asn_enc_rval_t rval = {0,0,0}; + if(specs->ext_start == -1) ASN__ENCODE_FAILED; + if(uper_put_nsnnwn(po, present_enc - specs->ext_start)) + ASN__ENCODE_FAILED; + if(uper_open_type_put(elm->type, + elm->encoding_constraints.per_constraints, + memb_ptr, po)) + ASN__ENCODE_FAILED; + rval.encoded = 0; + ASN__ENCODED_OK(rval); + } +} + +asn_dec_rval_t +CHOICE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + asn_dec_rval_t rv; + const asn_per_constraint_t *ct; + const asn_per_constraint_t *ext_ct = NULL; + asn_TYPE_member_t *elm; /* CHOICE's element */ + void *memb_ptr; + void **memb_ptr2; + void *st = *sptr; + int value; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) { + ext_ct = ct; + ct = 0; /* Not restricted */ + } + } + + + if(ct && ct->range_bits >= 0) { + value = per_get_few_bits(pd, ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + ASN_DEBUG("CHOICE %s got index %d in range %d", + td->name, value, ct->range_bits); + if(value > ct->upper_bound) + ASN__DECODE_FAILED; + } else { + if(specs->ext_start == -1) + ASN__DECODE_FAILED; + value = aper_get_nsnnwn(pd, ext_ct->range_bits); + if(value < 0) ASN__DECODE_STARVED; + value += specs->ext_start; + if((unsigned)value >= td->elements_count) + ASN__DECODE_FAILED; + } + + /* Adjust if canonical order is different from natural order */ + if(specs->from_canonical_order) + value = specs->from_canonical_order[value]; + + /* Set presence to be able to free it later */ + _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); + + elm = &td->elements[value]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); + + if(ct && ct->range_bits >= 0) { + rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } else { + rv = aper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + + if(rv.code != RC_OK) + ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", + elm->name, td->name, rv.code); + return rv; +} + +asn_enc_rval_t +CHOICE_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm; /* CHOICE's element */ + const asn_per_constraint_t *ct = NULL; + const asn_per_constraint_t *ext_ct = NULL; + const void *memb_ptr; + unsigned present; + int present_enc; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s as CHOICE using ALIGNED PER", td->name); + + if(constraints) ct = &constraints->value; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->value; + else ct = NULL; + + present = _fetch_present_idx(sptr, + specs->pres_offset, specs->pres_size); + + /* + * If the structure was not initialized properly, it cannot be encoded: + * can't deduce what to encode in the choice type. + */ + if(present <= 0 || (unsigned)present > td->elements_count) + ASN__ENCODE_FAILED; + else + present--; + + /* Adjust if canonical order is different from natural order */ + if(specs->to_canonical_order) + present_enc = specs->to_canonical_order[present]; + else + present_enc = present; + + ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); + + if(ct && (ct->range_bits >= 0)) { + // Value is not within the range of the primary values ? + if(present < ct->lower_bound || present > ct->upper_bound) { + if(ct->flags & APC_EXTENSIBLE) { + ASN_DEBUG("CHOICE member %d (enc %d) is an extension (%ld..%ld)", + present, present_enc, ct->lower_bound, ct->upper_bound); + // X691/23.5 Extension marker = 1 + if(per_put_few_bits(po, 1, 1)) { + ASN__ENCODE_FAILED; + } + } else { + ASN__ENCODE_FAILED; + } + // no more need of constraint. + ext_ct = ct; + ct = NULL; + } + } + + if(ct && (ct->flags & APC_EXTENSIBLE)) { + ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", + present, present, ct->lower_bound, ct->upper_bound); + // X691.23.5 Extension marker = 0 + if(per_put_few_bits(po, 0, 1)) { + ASN__ENCODE_FAILED; + } + } + + elm = &td->elements[present]; + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) ASN__ENCODE_FAILED; + } else { + memb_ptr = (const char *)sptr + elm->memb_offset; + } + + if(ct && (ct->range_bits >= 0)) { + // By construction (ct != 0), the alternative value is a non extended one. + // X691/23.7 X691/23.6 alternative value encoded as a range_bits bits value. + if(per_put_few_bits(po, present_enc, ct->range_bits)) + ASN__ENCODE_FAILED; + + return elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, + memb_ptr, po); + } else { + asn_enc_rval_t rval = {0,0,0}; + if(specs->ext_start == -1) + ASN__ENCODE_FAILED; + // X691/23.8 normally encoded as a small non negative whole number + + if(ext_ct && aper_put_nsnnwn(po, ext_ct->range_bits, present_enc - specs->ext_start)) + ASN__ENCODE_FAILED; + if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, + memb_ptr, po)) + ASN__ENCODE_FAILED; + rval.encoded = 0; + ASN__ENCODED_OK(rval); + } +} + +int +CHOICE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); + + /* + * Print that element. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* Print member's name and stuff */ + if(0) { + if(cb(elm->name, strlen(elm->name), app_key) < 0 + || cb(": ", 2, app_key) < 0) + return -1; + } + + return elm->type->op->print_struct(elm->type, memb_ptr, ilevel, + cb, app_key); + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} + +void +CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!td || !ptr) + return; + + ASN_DEBUG("Freeing %s as CHOICE", td->name); + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); + + /* + * Free that element. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *elm = &td->elements[present-1]; + void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(void **)((char *)ptr + elm->memb_offset); + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } else { + memb_ptr = (void *)((char *)ptr + elm->memb_offset); + ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); + } + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, specs->struct_size); + break; + } +} + + +/* + * The following functions functions offer protection against -fshort-enums, + * compatible with little- and big-endian machines. + * If assertion is triggered, either disable -fshort-enums, or add an entry + * here with the ->pres_size of your target stracture. + * Unless the target structure is packed, the ".present" member + * is guaranteed to be aligned properly. ASN.1 compiler itself does not + * produce packed code. + */ +static unsigned +_fetch_present_idx(const void *struct_ptr, unsigned pres_offset, + unsigned pres_size) { + const void *present_ptr; + unsigned present; + + present_ptr = ((const char *)struct_ptr) + pres_offset; + + switch(pres_size) { + case sizeof(int): present = *(const unsigned int *)present_ptr; break; + case sizeof(short): present = *(const unsigned short *)present_ptr; break; + case sizeof(char): present = *(const unsigned char *)present_ptr; break; + default: + /* ANSI C mandates enum to be equivalent to integer */ + assert(pres_size != sizeof(int)); + return 0; /* If not aborted, pass back safe value */ + } + + return present; +} + +static void +_set_present_idx(void *struct_ptr, unsigned pres_offset, unsigned pres_size, + unsigned present) { + void *present_ptr; + present_ptr = ((char *)struct_ptr) + pres_offset; + + switch(pres_size) { + case sizeof(int): *(unsigned int *)present_ptr = present; break; + case sizeof(short): *(unsigned short *)present_ptr = present; break; + case sizeof(char): *(unsigned char *)present_ptr = present; break; + default: + /* ANSI C mandates enum to be equivalent to integer */ + assert(pres_size != sizeof(int)); + } +} + +static const void * +_get_member_ptr(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_TYPE_member_t **elm_ptr, unsigned *present_out) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned present; + + if(!sptr) { + *elm_ptr = NULL; + *present_out = 0; + return NULL; + } + + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + *present_out = present; + + /* + * The presence index is intentionally 1-based to avoid + * treating zeroed structure as a valid one. + */ + if(present > 0 && present <= td->elements_count) { + asn_TYPE_member_t *const elm = &td->elements[present - 1]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + *elm_ptr = elm; + return memb_ptr; + } else { + *elm_ptr = NULL; + return NULL; + } + +} + +int +CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { + asn_TYPE_member_t *aelm; + asn_TYPE_member_t *belm; + unsigned apresent = 0; + unsigned bpresent = 0; + const void *amember = _get_member_ptr(td, aptr, &aelm, &apresent); + const void *bmember = _get_member_ptr(td, bptr, &belm, &bpresent); + + if(amember && bmember) { + if(apresent == bpresent) { + assert(aelm == belm); + return aelm->type->op->compare_struct(aelm->type, amember, bmember); + } else if(apresent < bpresent) { + return -1; + } else { + return 1; + } + } else if(!amember) { + return -1; + } else { + return 1; + } +} + +/* + * Return the 1-based choice variant presence index. + * Returns 0 in case of error. + */ +unsigned +CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, const void *sptr) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + return _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); +} + +/* + * Sets or resets the 1-based choice variant presence index. + * In case a previous index is not zero, the currently selected structure + * member is freed and zeroed-out first. + * Returns 0 on success and -1 on error. + */ +int +CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, + unsigned present) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + unsigned old_present; + + if(!sptr) { + return -1; + } + + if(present > td->elements_count) + return -1; + + old_present = + _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); + if(present == old_present) + return 0; + + if(old_present != 0) { + assert(old_present <= td->elements_count); + ASN_STRUCT_RESET(*td, sptr); + } + + _set_present_idx(sptr, specs->pres_offset, specs->pres_size, present); + + return 0; +} + + +asn_random_fill_result_t +CHOICE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constr, + size_t max_length) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_random_fill_result_t res; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + const asn_TYPE_member_t *elm; + unsigned present; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + void *st = *sptr; + + if(max_length == 0) return result_skipped; + + (void)constr; + + if(st == NULL) { + st = CALLOC(1, specs->struct_size); + if(st == NULL) { + return result_failed; + } + } + + present = asn_random_between(1, td->elements_count); + elm = &td->elements[present - 1]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + res = elm->type->op->random_fill(elm->type, memb_ptr2, + &elm->encoding_constraints, max_length); + _set_present_idx(st, specs->pres_offset, specs->pres_size, present); + if(res.code == ARFILL_OK) { + *sptr = st; + } else { + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + } + + return res; +} + + +asn_TYPE_operation_t asn_OP_CHOICE = { + CHOICE_free, + CHOICE_print, + CHOICE_compare, + CHOICE_decode_ber, + CHOICE_encode_der, + CHOICE_decode_xer, + CHOICE_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + CHOICE_decode_oer, + CHOICE_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + CHOICE_decode_uper, + CHOICE_encode_uper, + CHOICE_decode_aper, + CHOICE_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + CHOICE_random_fill, + CHOICE_outmost_tag +}; diff --git a/Bouncer/e2sm_rc/lib/constr_CHOICE_oer.c b/Bouncer/e2sm_rc/lib/constr_CHOICE_oer.c new file mode 100644 index 0000000..a4c591c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_CHOICE_oer.c @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#undef SET_PHASE +#define SET_PHASE(ctx, value) \ + do { \ + ctx->phase = value; \ + ctx->step = 0; \ + } while(0) + +/* + * Tags are canonically sorted in the tag to member table. + */ +static int +_search4tag(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) + return 0; + else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + +/* + * X.696 (08/2015) #8.7 Encoding of tags + */ +static ssize_t +oer_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { + ber_tlv_tag_t val; + ber_tlv_tag_t tclass; + size_t skipped; + + if(size == 0) + return 0; + + val = *(const uint8_t *)ptr; + tclass = (val >> 6); + if((val & 0x3F) != 0x3F) { + /* #8.7.1 */ + *tag_r = ((val & 0x3F) << 2) | tclass; + return 1; + } + + /* + * Each octet contains 7 bits of useful information. + * The MSB is 0 if it is the last octet of the tag. + */ + for(val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; skipped <= size; + ptr = ((const char *)ptr) + 1, skipped++) { + unsigned int oct = *(const uint8_t *)ptr; + if(oct & 0x80) { + val = (val << 7) | (oct & 0x7F); + /* + * Make sure there are at least 9 bits spare + * at the MS side of a value. + */ + if(val >> ((8 * sizeof(val)) - 9)) { + /* + * We would not be able to accomodate + * any more tag bits. + */ + return -1; + } + } else { + val = (val << 7) | oct; + *tag_r = (val << 2) | tclass; + return skipped; + } + } + + return 0; /* Want more */ +} + +asn_dec_rval_t +CHOICE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + (void)constraints; + + ASN_DEBUG("Decoding %s as CHOICE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + switch(ctx->phase) { + case 0: { + /* + * Discover the tag. + */ + ber_tlv_tag_t tlv_tag; /* T from TLV */ + ssize_t tag_len; /* Length of TLV's T */ + + tag_len = oer_fetch_tag(ptr, size, &tlv_tag); + switch(tag_len) { + case 0: + ASN__DECODE_STARVED; + case -1: + ASN__DECODE_FAILED; + } + + do { + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key = {0, 0, 0, 0}; + key.el_tag = tlv_tag; + + t2m = (const asn_TYPE_tag2member_t *)bsearch( + &key, specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _search4tag); + if(t2m) { + /* + * Found the element corresponding to the tag. + */ + NEXT_PHASE(ctx); + ctx->step = t2m->el_no; + break; + } else if(specs->ext_start == -1) { + ASN_DEBUG( + "Unexpected tag %s " + "in non-extensible CHOICE %s", + ber_tlv_tag_string(tlv_tag), td->name); + RETURN(RC_FAIL); + } else { + /* Skip open type extension */ + ASN_DEBUG( + "Not implemented skipping open type extension for tag %s", + ber_tlv_tag_string(tlv_tag)); + RETURN(RC_FAIL); + } + } while(0); + + + ADVANCE(tag_len); + } + /* Fall through */ + case 1: { + asn_TYPE_member_t *elm = &elements[ctx->step]; /* CHOICE's element */ + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + asn_dec_rval_t rval = {0,0}; + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Set presence to be able to free it properly at any time */ + (void)CHOICE_variant_set_presence(td, st, ctx->step + 1); + + if(specs->ext_start >= 0 && specs->ext_start <= ctx->step) { + ssize_t got = + oer_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr2, ptr, size); + if(got < 0) ASN__DECODE_FAILED; + if(got == 0) ASN__DECODE_STARVED; + rval.code = RC_OK; + rval.consumed = got; + } else { + rval = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, + size); + } + rval.consumed += consumed_myself; + switch(rval.code) { + case RC_OK: + NEXT_PHASE(ctx); + case RC_WMORE: + break; + case RC_FAIL: + SET_PHASE(ctx, 3); /* => 3 */ + } + return rval; + } + case 2: + /* Already decoded everything */ + RETURN(RC_OK); + case 3: + /* Failed to decode, after all */ + RETURN(RC_FAIL); + } + + RETURN(RC_FAIL); +} + +/* + * X.696 (08/2015) #8.7 Encoding of tags + */ +static ssize_t +oer_put_tag(ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { + uint8_t tclass = BER_TAG_CLASS(tag); + ber_tlv_tag_t tval = BER_TAG_VALUE(tag); + + if(tval < 0x3F) { + uint8_t b = (uint8_t)((tclass << 6) | tval); + if(cb(&b, 1, app_key) < 0) { + return -1; + } + return 1; + } else { + uint8_t buf[1 + 2 * sizeof(tval)]; + uint8_t *b = &buf[sizeof(buf)-1]; /* Last addressable */ + size_t encoded; + for(; ; tval >>= 7) { + if(tval >> 7) { + *b-- = 0x80 | (tval & 0x7f); + } else { + *b-- = tval & 0x7f; + break; + } + } + *b = (uint8_t)((tclass << 6) | 0x3F); + encoded = sizeof(buf) - (b - buf); + if(cb(b, encoded, app_key) < 0) { + return -1; + } + return encoded; + } + +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +CHOICE_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_CHOICE_specifics_t *specs = + (const asn_CHOICE_specifics_t *)td->specifics; + asn_TYPE_member_t *elm; /* CHOICE element */ + unsigned present; + const void *memb_ptr; + ber_tlv_tag_t tag; + ssize_t tag_len; + asn_enc_rval_t er = {0, 0, 0}; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + ASN_DEBUG("OER %s encoding as CHOICE", td->name); + + present = CHOICE_variant_get_presence(td, sptr); + if(present == 0 || present > td->elements_count) { + ASN_DEBUG("CHOICE %s member is not selected", td->name); + ASN__ENCODE_FAILED; + } + + elm = &td->elements[present-1]; + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(memb_ptr == 0) { + /* Mandatory element absent */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + tag = asn_TYPE_outmost_tag(elm->type, memb_ptr, elm->tag_mode, elm->tag); + if(tag == 0) { + ASN__ENCODE_FAILED; + } + + tag_len = oer_put_tag(tag, cb, app_key); + if(tag_len < 0) { + ASN__ENCODE_FAILED; + } + + if(specs->ext_start >= 0 && (unsigned)specs->ext_start <= (present-1)) { + ssize_t encoded = oer_open_type_put(elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr, cb, app_key); + if(encoded < 0) ASN__ENCODE_FAILED; + er.encoded = tag_len + encoded; + } else { + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded >= 0) er.encoded += tag_len; + } + + return er; +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/constr_SEQUENCE.c b/Bouncer/e2sm_rc/lib/constr_SEQUENCE.c new file mode 100644 index 0000000..43dcac7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_SEQUENCE.c @@ -0,0 +1,2059 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#undef PHASE_OUT +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * Check whether we are inside the extensions group. + */ +#define IN_EXTENSION_GROUP(specs, memb_idx) \ + ((specs)->first_extension >= 0 \ + && (unsigned)(specs)->first_extension <= (memb_idx)) + +/* + * Tags are canonically sorted in the tag2element map. + */ +static int +_t2e_cmp(const void *ap, const void *bp) { + const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; + const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; + + int a_class = BER_TAG_CLASS(a->el_tag); + int b_class = BER_TAG_CLASS(b->el_tag); + + if(a_class == b_class) { + ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); + ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); + + if(a_value == b_value) { + if(a->el_no > b->el_no) + return 1; + /* + * Important: we do not check + * for a->el_no <= b->el_no! + */ + return 0; + } else if(a_value < b_value) + return -1; + else + return 1; + } else if(a_class < b_class) { + return -1; + } else { + return 1; + } +} + + +/* + * The decoder of the SEQUENCE type. + */ +asn_dec_rval_t +SEQUENCE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + const asn_TYPE_member_t *elements = td->elements; + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* SEQUENCE element's index */ + + ASN_DEBUG("Decoding %s as SEQUENCE", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, 1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) + ctx->left += rval.consumed; /* ?Substracted below! */ + ADVANCE(rval.consumed); + + NEXT_PHASE(ctx); + + ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", + (long)ctx->left, (long)size); + + /* Fall through */ + case 1: + /* + * PHASE 1. + * From the place where we've left it previously, + * try to decode the next member from the list of + * this structure's elements. + * (ctx->step) stores the member being processed + * between invocations and the microphase {0,1} of parsing + * that member: + * step = ( * 2 + ). + */ + for(edx = ((size_t)ctx->step >> 1); edx < td->elements_count; + edx++, ctx->step = (ctx->step & ~1) + 2) { + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + ssize_t tag_len; /* Length of TLV's T */ + size_t opt_edx_end; /* Next non-optional element */ + size_t n; + int use_bsearch; + + if(ctx->step & 1) + goto microphase2; + + /* + * MICROPHASE 1: Synchronize decoding. + */ + ASN_DEBUG("In %s SEQUENCE left %d, edx=%" ASN_PRI_SIZE " flags=%d" + " opt=%d ec=%d", + td->name, (int)ctx->left, edx, + elements[edx].flags, elements[edx].optional, + td->elements_count); + + if(ctx->left == 0 /* No more stuff is expected */ + && ( + /* Explicit OPTIONAL specification reaches the end */ + (edx + elements[edx].optional == td->elements_count) || + /* All extensions are optional */ + IN_EXTENSION_GROUP(specs, edx))) { + ASN_DEBUG("End of SEQUENCE %s", td->name); + /* + * Found the legitimate end of the structure. + */ + PHASE_OUT(ctx); + RETURN(RC_OK); + } + + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + ASN_DEBUG("Current tag in %s SEQUENCE for element %" ASN_PRI_SIZE " " + "(%s) is %s encoded in %d bytes, of frame %ld", + td->name, edx, elements[edx].name, + ber_tlv_tag_string(tlv_tag), (int)tag_len, (long)LEFT); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) { + RETURN(RC_FAIL); + } else { + RETURN(RC_WMORE); + } + } else if(((const uint8_t *)ptr)[1] == 0) { + ASN_DEBUG("edx = %" ASN_PRI_SIZE ", opt = %d, ec=%d", edx, + elements[edx].optional, td->elements_count); + if((edx + elements[edx].optional == td->elements_count) + || IN_EXTENSION_GROUP(specs, edx)) { + /* + * Yeah, baby! Found the terminator + * of the indefinite length structure. + */ + /* + * Proceed to the canonical + * finalization function. + * No advancing is necessary. + */ + goto phase3; + } + } + } + + /* + * Find the next available type with this tag. + */ + use_bsearch = 0; + opt_edx_end = edx + elements[edx].optional + 1; + if(opt_edx_end > td->elements_count) + opt_edx_end = td->elements_count; /* Cap */ + else if(opt_edx_end - edx > 8) { + /* Limit the scope of linear search... */ + opt_edx_end = edx + 8; + use_bsearch = 1; + /* ... and resort to bsearch() */ + } + for(n = edx; n < opt_edx_end; n++) { + if(BER_TAGS_EQUAL(tlv_tag, elements[n].tag)) { + /* + * Found element corresponding to the tag + * being looked at. + * Reposition over the right element. + */ + edx = n; + ctx->step = 1 + 2 * edx; /* Remember! */ + goto microphase2; + } else if(elements[n].flags & ATF_ANY_TYPE) { + /* + * This is the ANY type, which may bear + * any flag whatsoever. + */ + edx = n; + ctx->step = 1 + 2 * edx; /* Remember! */ + goto microphase2; + } else if(elements[n].tag == (ber_tlv_tag_t)-1) { + use_bsearch = 1; + break; + } + } + if(use_bsearch) { + /* + * Resort to a binary search over + * sorted array of tags. + */ + const asn_TYPE_tag2member_t *t2m; + asn_TYPE_tag2member_t key = {0, 0, 0, 0}; + key.el_tag = tlv_tag; + key.el_no = edx; + t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, + specs->tag2el, specs->tag2el_count, + sizeof(specs->tag2el[0]), _t2e_cmp); + if(t2m) { + const asn_TYPE_tag2member_t *best = 0; + const asn_TYPE_tag2member_t *t2m_f, *t2m_l; + size_t edx_max = edx + elements[edx].optional; + /* + * Rewind to the first element with that tag, + * `cause bsearch() does not guarantee order. + */ + t2m_f = t2m + t2m->toff_first; + t2m_l = t2m + t2m->toff_last; + for(t2m = t2m_f; t2m <= t2m_l; t2m++) { + if(t2m->el_no > edx_max) break; + if(t2m->el_no < edx) continue; + best = t2m; + } + if(best) { + edx = best->el_no; + ctx->step = 1 + 2 * edx; + goto microphase2; + } + } + n = opt_edx_end; + } + if(n == opt_edx_end) { + /* + * If tag is unknown, it may be either + * an unknown (thus, incorrect) tag, + * or an extension (...), + * or an end of the indefinite-length structure. + */ + if(!IN_EXTENSION_GROUP(specs, + edx + elements[edx].optional)) { + ASN_DEBUG("Unexpected tag %s (at %" ASN_PRI_SIZE ")", + ber_tlv_tag_string(tlv_tag), edx); + ASN_DEBUG("Expected tag %s (%s)%s", + ber_tlv_tag_string(elements[edx].tag), + elements[edx].name, + elements[edx].optional + ?" or alternatives":""); + RETURN(RC_FAIL); + } else { + /* Skip this tag */ + ssize_t skip; + edx += elements[edx].optional; + + ASN_DEBUG("Skipping unexpected %s (at %" ASN_PRI_SIZE ")", + ber_tlv_tag_string(tlv_tag), edx); + skip = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tag_len, + LEFT - tag_len); + ASN_DEBUG("Skip length %d in %s", + (int)skip, td->name); + switch(skip) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(skip + tag_len); + ctx->step -= 2; + edx--; + continue; /* Try again with the next tag */ + } + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + ctx->step |= 1; /* Confirm entering next microphase */ + microphase2: + ASN_DEBUG("Inside SEQUENCE %s MF2", td->name); + + /* + * Compute the position of the member inside a structure, + * and also a type of containment (it may be contained + * as pointer or using inline inclusion). + */ + if(elements[edx].flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset); + } else { + /* + * A pointer to a pointer + * holding the start of the structure + */ + memb_ptr = (char *)st + elements[edx].memb_offset; + memb_ptr2 = &memb_ptr; + } + /* + * Invoke the member fetch routine according to member's type + */ + if(elements[edx].flags & ATF_OPEN_TYPE) { + rval = OPEN_TYPE_ber_get(opt_codec_ctx, td, st, &elements[edx], ptr, LEFT); + } else { + rval = elements[edx].type->op->ber_decoder(opt_codec_ctx, + elements[edx].type, + memb_ptr2, ptr, LEFT, + elements[edx].tag_mode); + } + ASN_DEBUG("In %s SEQUENCE decoded %" ASN_PRI_SIZE " %s of %d " + "in %d bytes rval.code %d, size=%d", + td->name, edx, elements[edx].type->name, + (int)LEFT, (int)rval.consumed, rval.code, (int)size); + switch(rval.code) { + case RC_OK: + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + ASN_DEBUG("Size violation (c->l=%ld <= s=%ld)", + (long)ctx->left, (long)size); + /* Fall through */ + case RC_FAIL: /* Fatal error */ + RETURN(RC_FAIL); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } /* for(all structure members) */ + + phase3: + ctx->phase = 3; + /* Fall through */ + case 3: /* 00 and other tags expected */ + case 4: /* only 00's expected */ + + ASN_DEBUG("SEQUENCE %s Leftover: %ld, size = %ld", + td->name, (long)ctx->left, (long)size); + + /* + * Skip everything until the end of the SEQUENCE. + */ + while(ctx->left) { + ssize_t tl, ll; + + tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tl) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + /* + * If expected <0><0>... + */ + if(ctx->left < 0 + && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Correctly finished with <0><0>. + */ + ADVANCE(2); + ctx->left++; + ctx->phase = 4; + continue; + } + } + + if(!IN_EXTENSION_GROUP(specs, td->elements_count) + || ctx->phase == 4) { + ASN_DEBUG("Unexpected continuation " + "of a non-extensible type " + "%s (SEQUENCE): %s", + td->name, + ber_tlv_tag_string(tlv_tag)); + RETURN(RC_FAIL); + } + + ll = ber_skip_length(opt_codec_ctx, + BER_TLV_CONSTRUCTED(ptr), + (const char *)ptr + tl, LEFT - tl); + switch(ll) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + ADVANCE(tl + ll); + } + + PHASE_OUT(ctx); + } + + RETURN(RC_OK); +} + + +/* + * The DER encoder of the SEQUENCE type. + */ +asn_enc_rval_t +SEQUENCE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t computed_size = 0; + asn_enc_rval_t erval = {0,0,0}; + ssize_t ret; + size_t edx; + + ASN_DEBUG("%s %s as SEQUENCE", + cb?"Encoding":"Estimating", td->name); + + /* + * Gather the length of the underlying members sequence. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) { + ASN_DEBUG("Element %s %" ASN_PRI_SIZE " not present", + elm->name, edx); + if(elm->optional) + continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) + continue; + + erval = elm->type->op->der_encoder(elm->type, *memb_ptr2, + elm->tag_mode, elm->tag, + 0, 0); + if(erval.encoded == -1) + return erval; + computed_size += erval.encoded; + ASN_DEBUG("Member %" ASN_PRI_SIZE " %s estimated %ld bytes", + edx, elm->name, (long)erval.encoded); + } + + /* + * Encode the TLV for the sequence itself. + */ + ret = der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); + ASN_DEBUG("Wrote tags: %ld (+%ld)", (long)ret, (long)computed_size); + if(ret == -1) + ASN__ENCODE_FAILED; + erval.encoded = computed_size + ret; + + if(!cb) ASN__ENCODED_OK(erval); + + /* + * Encode all members. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + asn_enc_rval_t tmperval = {0,0,0}; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) continue; + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) + continue; + + tmperval = elm->type->op->der_encoder(elm->type, *memb_ptr2, + elm->tag_mode, elm->tag, cb, app_key); + if(tmperval.encoded == -1) + return tmperval; + computed_size -= tmperval.encoded; + ASN_DEBUG("Member %" ASN_PRI_SIZE " %s of SEQUENCE %s encoded in %ld bytes", + edx, elm->name, td->name, (long)tmperval.encoded); + } + + if(computed_size != 0) + /* + * Encoded size is not equal to the computed size. + */ + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(erval); +} + + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) \ + do { \ + size_t num = (num_bytes); \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +SEQUENCE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_TYPE_member_t *elements = td->elements; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * ... and parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval; /* Return value from a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + size_t edx; /* Element index */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + * Phase 3: Skipping unknown extensions. + * Phase 4: PHASED OUT + */ + for(edx = ctx->step; ctx->phase <= 3;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + asn_TYPE_member_t *elm; + + /* + * Go inside the inner member of a sequence. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval; + void *memb_ptr_dontuse; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + elm = &td->elements[edx]; + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr_dontuse = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr_dontuse; /* Only use of memb_ptr_dontuse */ + } + + if(elm->flags & ATF_OPEN_TYPE) { + tmprval = OPEN_TYPE_xer_get(opt_codec_ctx, td, st, elm, ptr, size); + } else { + /* Invoke the inner type decoder, m.b. multiple times */ + tmprval = elm->type->op->xer_decoder(opt_codec_ctx, + elm->type, memb_ptr2, elm->name, + ptr, size); + } + XER_ADVANCE(tmprval.consumed); + if(tmprval.code != RC_OK) + RETURN(tmprval.code); + ctx->phase = 1; /* Back to body processing */ + ctx->step = ++edx; + ASN_DEBUG("XER/SEQUENCE phase => %d, step => %d", + ctx->phase, ctx->step); + /* Fall through */ + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, ptr, size, + &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(ptr, ch_size, xml_tag); + ASN_DEBUG("XER/SEQUENCE: tcv = %d, ph=%d [%s]", + tcv, ctx->phase, xml_tag); + + /* Skip the extensions section */ + if(ctx->phase == 3) { + switch(xer_skip_unknown(tcv, &ctx->left)) { + case -1: + ctx->phase = 4; + RETURN(RC_FAIL); + case 0: + XER_ADVANCE(ch_size); + continue; + case 1: + XER_ADVANCE(ch_size); + ctx->phase = 1; + continue; + case 2: + ctx->phase = 1; + break; + } + } + + switch(tcv) { + case XCT_CLOSING: + if(ctx->phase == 0) break; + ctx->phase = 0; + /* Fall through */ + case XCT_BOTH: + if(ctx->phase == 0) { + if(edx >= td->elements_count || + /* Explicit OPTIONAL specs reaches the end */ + (edx + elements[edx].optional == td->elements_count) || + /* All extensions are optional */ + IN_EXTENSION_GROUP(specs, edx)) { + XER_ADVANCE(ch_size); + ctx->phase = 4; /* Phase out */ + RETURN(RC_OK); + } else { + ASN_DEBUG("Premature end of XER SEQUENCE"); + RETURN(RC_FAIL); + } + } + /* Fall through */ + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + ASN_DEBUG("XER/SEQUENCE: tcv=%d, ph=%d, edx=%" ASN_PRI_SIZE "", + tcv, ctx->phase, edx); + if(ctx->phase != 1) { + break; /* Really unexpected */ + } + + if(edx < td->elements_count) { + /* + * Search which member corresponds to this tag. + */ + size_t n; + size_t edx_end = edx + elements[edx].optional + 1; + if(edx_end > td->elements_count) + edx_end = td->elements_count; + for(n = edx; n < edx_end; n++) { + elm = &td->elements[n]; + tcv = xer_check_tag(ptr, ch_size, elm->name); + switch(tcv) { + case XCT_BOTH: + case XCT_OPENING: + /* + * Process this member. + */ + ctx->step = edx = n; + ctx->phase = 2; + break; + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + continue; + default: + n = edx_end; + break; /* Phase out */ + } + break; + } + if(n != edx_end) + continue; + } else { + ASN_DEBUG("Out of defined members: %" ASN_PRI_SIZE "/%u", + edx, td->elements_count); + } + + /* It is expected extension */ + if(IN_EXTENSION_GROUP(specs, + edx + (edx < td->elements_count + ? elements[edx].optional : 0))) { + ASN_DEBUG("Got anticipated extension at %" ASN_PRI_SIZE "", + edx); + /* + * Check for (XCT_BOTH or XCT_UNKNOWN_BO) + * By using a mask. Only record a pure + * tags. + */ + if(tcv & XCT_CLOSING) { + /* Found without body */ + } else { + ctx->left = 1; + ctx->phase = 3; /* Skip ...'s */ + } + XER_ADVANCE(ch_size); + continue; + } + + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag in SEQUENCE [%c%c%c%c%c%c]", + size>0?((const char *)ptr)[0]:'.', + size>1?((const char *)ptr)[1]:'.', + size>2?((const char *)ptr)[2]:'.', + size>3?((const char *)ptr)[3]:'.', + size>4?((const char *)ptr)[4]:'.', + size>5?((const char *)ptr)[5]:'.'); + break; + } + + ctx->phase = 4; /* "Phase out" on hard failure */ + RETURN(RC_FAIL); +} + +asn_enc_rval_t +SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0,0,0}; + int xcan = (flags & XER_F_CANONICAL); + asn_TYPE_descriptor_t *tmp_def_val_td = 0; + void *tmp_def_val = 0; + size_t edx; + + if(!sptr) ASN__ENCODE_FAILED; + + er.encoded = 0; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_enc_rval_t tmper = {0,0,0}; + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + const char *mname = elm->name; + unsigned int mlen = strlen(mname); + + if(elm->flags & ATF_POINTER) { + memb_ptr = + *(const void *const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + assert(tmp_def_val == 0); + if(elm->default_value_set) { + if(elm->default_value_set(&tmp_def_val)) { + ASN__ENCODE_FAILED; + } else { + memb_ptr = tmp_def_val; + tmp_def_val_td = elm->type; + } + } else if(elm->optional) { + continue; + } else { + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + /* Print the member itself */ + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1, + flags, cb, app_key); + if(tmp_def_val) { + ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val); + tmp_def_val = 0; + } + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("", 1); + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + if(tmp_def_val) ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val); + ASN__ENCODE_FAILED; +} + +int +SEQUENCE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t edx; + int ret; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* Dump preamble */ + if(cb(td->name, strlen(td->name), app_key) < 0 + || cb(" ::= {", 6, app_key) < 0) + return -1; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) continue; + /* Print line */ + /* Fall through */ + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + /* Indentation */ + _i_INDENT(1); + + /* Print the member's name and stuff */ + if(cb(elm->name, strlen(elm->name), app_key) < 0 + || cb(": ", 2, app_key) < 0) + return -1; + + /* Print the member itself */ + ret = elm->type->op->print_struct(elm->type, memb_ptr, ilevel + 1, + cb, app_key); + if(ret) return ret; + } + + ilevel--; + _i_INDENT(1); + + return (cb("}", 1, app_key) < 0) ? -1 : 0; +} + +void +SEQUENCE_free(const asn_TYPE_descriptor_t *td, void *sptr, + enum asn_struct_free_method method) { + size_t edx; + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_struct_ctx_t *ctx; /* Decoder context */ + + if(!td || !sptr) + return; + + ASN_DEBUG("Freeing %s as SEQUENCE", td->name); + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; + if(elm->flags & ATF_POINTER) { + memb_ptr = *(void **)((char *)sptr + elm->memb_offset); + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } else { + memb_ptr = (void *)((char *)sptr + elm->memb_offset); + ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); + } + } + + /* Clean parsing context */ + ctx = (asn_struct_ctx_t *)((char *)sptr + specs->ctx_offset); + FREEMEM(ctx->ptr); + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(sptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset( + sptr, 0, + ((const asn_SEQUENCE_specifics_t *)(td->specifics))->struct_size); + break; + } +} + +int +SEQUENCE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t edx; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* + * Iterate over structure members and check their validity. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; + + if(elm->flags & ATF_POINTER) { + memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); + if(!memb_ptr) { + if(elm->optional) + continue; + ASN__CTFAIL(app_key, td, sptr, + "%s: mandatory element %s absent (%s:%d)", + td->name, elm->name, __FILE__, __LINE__); + return -1; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + } + + if(elm->encoding_constraints.general_constraints) { + int ret = elm->encoding_constraints.general_constraints(elm->type, memb_ptr, + ctfailcb, app_key); + if(ret) return ret; + } else { + return elm->type->encoding_constraints.general_constraints(elm->type, + memb_ptr, ctfailcb, app_key); + } + } + + return 0; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +SEQUENCE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + void *st = *sptr; /* Target structure. */ + int extpresent; /* Extension additions are present */ + uint8_t *opres; /* Presence of optional root members */ + asn_per_data_t opmd; + asn_dec_rval_t rv; + size_t edx; + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as SEQUENCE (UPER)", td->name); + + /* Handle extensions */ + if(specs->first_extension < 0) { + extpresent = 0; + } else { + extpresent = per_get_few_bits(pd, 1); + if(extpresent < 0) ASN__DECODE_STARVED; + } + + /* Prepare a place and read-in the presence bitmap */ + memset(&opmd, 0, sizeof(opmd)); + if(specs->roms_count) { + opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1); + if(!opres) ASN__DECODE_FAILED; + /* Get the presence map */ + if(per_get_many_bits(pd, opres, 0, specs->roms_count)) { + FREEMEM(opres); + ASN__DECODE_STARVED; + } + opmd.buffer = opres; + opmd.nbits = specs->roms_count; + ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)", + td->name, specs->roms_count, *opres); + } else { + opres = 0; + } + + /* + * Get the sequence ROOT elements. + */ + for(edx = 0; + edx < (specs->first_extension < 0 ? td->elements_count + : (size_t)specs->first_extension); + edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + + assert(!IN_EXTENSION_GROUP(specs, edx)); + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + /* Deal with optionality */ + if(elm->optional) { + int present = per_get_few_bits(&opmd, 1); + ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)", + td->name, elm->name, present, + (int)opmd.nboff, (int)opmd.nbits); + if(present == 0) { + /* This element is not present */ + if(elm->default_value_set) { + /* Fill-in DEFAULT */ + if(elm->default_value_set(memb_ptr2)) { + FREEMEM(opres); + ASN__DECODE_FAILED; + } + ASN_DEBUG("Filled-in default"); + } + /* The member is just not present */ + continue; + } + /* Fall through */ + } + + /* Fetch the member from the stream */ + ASN_DEBUG("Decoding member \"%s\" in %s", elm->name, td->name); + + if(elm->flags & ATF_OPEN_TYPE) { + rv = OPEN_TYPE_uper_get(opt_codec_ctx, td, st, elm, pd); + } else { + rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + if(rv.code != RC_OK) { + ASN_DEBUG("Failed decode %s in %s", + elm->name, td->name); + FREEMEM(opres); + return rv; + } + } + + /* Optionality map is not needed anymore */ + FREEMEM(opres); + + /* + * Deal with extensions. + */ + if(extpresent) { + ssize_t bmlength; + uint8_t *epres; /* Presence of extension members */ + asn_per_data_t epmd; + + bmlength = uper_get_nslength(pd); + if(bmlength < 0) ASN__DECODE_STARVED; + + ASN_DEBUG("Extensions %" ASN_PRI_SSIZE " present in %s", bmlength, td->name); + + epres = (uint8_t *)MALLOC((bmlength + 15) >> 3); + if(!epres) ASN__DECODE_STARVED; + + /* Get the extensions map */ + if(per_get_many_bits(pd, epres, 0, bmlength)) { + FREEMEM(epres); + ASN__DECODE_STARVED; + } + + memset(&epmd, 0, sizeof(epmd)); + epmd.buffer = epres; + epmd.nbits = bmlength; + ASN_DEBUG("Read in extensions bitmap for %s of %ld bits (%x..)", + td->name, (long)bmlength, *epres); + + /* Go over extensions and read them in */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + int present; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (void *)((char *)st + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + present = per_get_few_bits(&epmd, 1); + if(present <= 0) { + if(present < 0) break; /* No more extensions */ + continue; + } + + ASN_DEBUG("Decoding member %s in %s %p", elm->name, td->name, + *memb_ptr2); + rv = uper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, + memb_ptr2, pd); + if(rv.code != RC_OK) { + FREEMEM(epres); + return rv; + } + } + + /* Skip over overflow extensions which aren't present + * in this system's version of the protocol */ + for(;;) { + ASN_DEBUG("Getting overflow extensions"); + switch(per_get_few_bits(&epmd, 1)) { + case -1: break; + case 0: continue; + default: + if(uper_open_type_skip(opt_codec_ctx, pd)) { + FREEMEM(epres); + ASN__DECODE_STARVED; + } + ASN_DEBUG("Skipped overflow extension"); + continue; + } + break; + } + + FREEMEM(epres); + } + + if(specs->first_extension >= 0) { + unsigned i; + /* Fill DEFAULT members in extensions */ + for(i = specs->roms_count; i < specs->roms_count + specs->aoms_count; + i++) { + asn_TYPE_member_t *elm; + void **memb_ptr2; /* Pointer to member pointer */ + + edx = specs->oms[i]; + elm = &td->elements[edx]; + + if(!elm->default_value_set) continue; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + if(*memb_ptr2) continue; + } else { + continue; /* Extensions are all optionals */ + } + + /* Set default value */ + if(elm->default_value_set(memb_ptr2)) { + ASN__DECODE_FAILED; + } + } + } + + rv.consumed = 0; + rv.code = RC_OK; + return rv; +} + +static int +SEQUENCE__handle_extensions(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_per_outp_t *po1, asn_per_outp_t *po2) { + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + int exts_present = 0; + int exts_count = 0; + size_t edx; + + if(specs->first_extension < 0) { + return 0; + } + + /* Find out which extensions are present */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + int present; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + ASN_DEBUG("checking %s:%s (@%" ASN_PRI_SIZE ") present => %d", elm->name, + elm->type->name, edx, present); + exts_count++; + exts_present += present; + + /* Encode as presence marker */ + if(po1 && per_put_few_bits(po1, present, 1)) { + return -1; + } + /* Encode as open type field */ + if(po2 && present + && uper_open_type_put(elm->type, + elm->encoding_constraints.per_constraints, + *memb_ptr2, po2)) + return -1; + } + + return exts_present ? exts_count : 0; +} + +asn_enc_rval_t +SEQUENCE_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + int n_extensions; + size_t edx; + size_t i; + + (void)constraints; + + if(!sptr) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE (UPER)", td->name); + + /* + * X.691#18.1 Whether structure is extensible + * and whether to encode extensions + */ + if(specs->first_extension < 0) { + n_extensions = 0; /* There are no extensions to encode */ + } else { + n_extensions = SEQUENCE__handle_extensions(td, sptr, 0, 0); + if(n_extensions < 0) ASN__ENCODE_FAILED; + if(per_put_few_bits(po, n_extensions ? 1 : 0, 1)) { + ASN__ENCODE_FAILED; + } + } + + /* Encode a presence bitmap */ + for(i = 0; i < specs->roms_count; i++) { + asn_TYPE_member_t *elm; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + int present; + + edx = specs->oms[i]; + elm = &td->elements[edx]; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + /* Eliminate default values */ + if(present && elm->default_value_cmp + && elm->default_value_cmp(*memb_ptr2) == 0) + present = 0; + + ASN_DEBUG("Element %s %s %s->%s is %s", + elm->flags & ATF_POINTER ? "ptr" : "inline", + elm->default_value_cmp ? "def" : "wtv", + td->name, elm->name, present ? "present" : "absent"); + if(per_put_few_bits(po, present, 1)) + ASN__ENCODE_FAILED; + } + + /* + * Encode the sequence ROOT elements. + */ + ASN_DEBUG("first_extension = %d, elements = %d", specs->first_extension, + td->elements_count); + for(edx = 0; + edx < ((specs->first_extension < 0) ? td->elements_count + : (size_t)specs->first_extension); + edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void *const *memb_ptr2; /* Pointer to that pointer */ + + ASN_DEBUG("About to encode %s", elm->type->name); + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = + (const void *const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) { + ASN_DEBUG("Element %s %" ASN_PRI_SIZE " not present", + elm->name, edx); + if(elm->optional) + continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) + continue; + + ASN_DEBUG("Encoding %s->%s:%s", td->name, elm->name, elm->type->name); + er = elm->type->op->uper_encoder( + elm->type, elm->encoding_constraints.per_constraints, *memb_ptr2, + po); + if(er.encoded == -1) return er; + } + + /* No extensions to encode */ + if(!n_extensions) ASN__ENCODED_OK(er); + + ASN_DEBUG("Length of extensions %d bit-map", n_extensions); + /* #18.8. Write down the presence bit-map length. */ + if(uper_put_nslength(po, n_extensions)) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Bit-map of %d elements", n_extensions); + /* #18.7. Encoding the extensions presence bit-map. */ + /* TODO: act upon NOTE in #18.7 for canonical PER */ + if(SEQUENCE__handle_extensions(td, sptr, po, 0) != n_extensions) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Writing %d extensions", n_extensions); + /* #18.9. Encode extensions as open type fields. */ + if(SEQUENCE__handle_extensions(td, sptr, 0, po) != n_extensions) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +asn_dec_rval_t +SEQUENCE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + void *st = *sptr; /* Target structure. */ + int extpresent; /* Extension additions are present */ + uint8_t *opres; /* Presence of optional root members */ + asn_per_data_t opmd; + asn_dec_rval_t rv; + size_t edx; + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + + ASN_DEBUG("Decoding %s as SEQUENCE (APER)", td->name); + + /* Handle extensions */ + if(specs->first_extension < 0) { + extpresent = 0; + } else { + extpresent = per_get_few_bits(pd, 1); + if(extpresent < 0) ASN__DECODE_STARVED; + } + + /* Prepare a place and read-in the presence bitmap */ + memset(&opmd, 0, sizeof(opmd)); + if(specs->roms_count) { + opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1); + if(!opres) ASN__DECODE_FAILED; + /* Get the presence map */ + if(per_get_many_bits(pd, opres, 0, specs->roms_count)) { + FREEMEM(opres); + ASN__DECODE_STARVED; + } + opmd.buffer = opres; + opmd.nbits = specs->roms_count; + ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)", + td->name, specs->roms_count, *opres); + } else { + opres = 0; + } + + /* + * Get the sequence ROOT elements. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ +#if 0 + int padding; +#endif + + if(IN_EXTENSION_GROUP(specs, edx)) + continue; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } +#if 0 + /* Get Padding */ + padding = (8 - (pd->moved % 8)) % 8; + if(padding > 0) + ASN_DEBUG("For element %s,offset= %ld Padding bits = %d", td->name, pd->moved, padding); +#if 0 /* old way of removing padding */ + per_get_few_bits(pd, padding); +#else /* Experimental fix proposed by @mhanna123 */ + if(edx != (td->elements_count-1)) + per_get_few_bits(pd, padding); + else { + if(specs->roms_count && (padding > 0)) + ASN_DEBUG(">>>>> not skipping padding of %d bits for element:%ld out of %d", padding, edx, td->elements_count); + else + per_get_few_bits(pd, padding); + } +#endif /* dealing with padding */ +#endif + /* Deal with optionality */ + if(elm->optional) { + int present = per_get_few_bits(&opmd, 1); + ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)", + td->name, elm->name, present, + (int)opmd.nboff, (int)opmd.nbits); + if(present == 0) { + /* This element is not present */ + if(elm->default_value_set) { + /* Fill-in DEFAULT */ + if(elm->default_value_set(memb_ptr2)) { + FREEMEM(opres); + ASN__DECODE_FAILED; + } + ASN_DEBUG("Filled-in default"); + } + /* The member is just not present */ + continue; + } + /* Fall through */ + } + + /* Fetch the member from the stream */ + ASN_DEBUG("Decoding member \"%s\" in %s", elm->name, td->name); + + if(elm->flags & ATF_OPEN_TYPE) { + rv = OPEN_TYPE_aper_get(opt_codec_ctx, td, st, elm, pd); + } else { + rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + } + if(rv.code != RC_OK) { + ASN_DEBUG("Failed decode %s in %s", + elm->name, td->name); + FREEMEM(opres); + return rv; + } + } + + /* Optionality map is not needed anymore */ + FREEMEM(opres); + + /* + * Deal with extensions. + */ + if(extpresent) { + ssize_t bmlength; + uint8_t *epres; /* Presence of extension members */ + asn_per_data_t epmd; + + bmlength = aper_get_nslength(pd); + if(bmlength < 0) ASN__DECODE_STARVED; + + ASN_DEBUG("Extensions %" ASN_PRI_SSIZE " present in %s", bmlength, td->name); + + epres = (uint8_t *)MALLOC((bmlength + 15) >> 3); + if(!epres) ASN__DECODE_STARVED; + + /* Get the extensions map */ + if(per_get_many_bits(pd, epres, 0, bmlength)) + ASN__DECODE_STARVED; + + memset(&epmd, 0, sizeof(epmd)); + epmd.buffer = epres; + epmd.nbits = bmlength; + ASN_DEBUG("Read in extensions bitmap for %s of %ld bits (%x..)", + td->name, bmlength, *epres); + + /* Go over extensions and read them in */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + int present; + + if(!IN_EXTENSION_GROUP(specs, edx)) { + ASN_DEBUG("%ld is not extension", edx); + continue; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (void *)((char *)st + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + present = per_get_few_bits(&epmd, 1); + if(present <= 0) { + if(present < 0) break; /* No more extensions */ + continue; + } + + ASN_DEBUG("Decoding member %s in %s %p", elm->name, td->name, *memb_ptr2); + rv = aper_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, memb_ptr2, pd); + if(rv.code != RC_OK) { + FREEMEM(epres); + return rv; + } + } + + /* Skip over overflow extensions which aren't present + * in this system's version of the protocol */ + for(;;) { + ASN_DEBUG("Getting overflow extensions"); + switch(per_get_few_bits(&epmd, 1)) { + case -1: + break; + case 0: + continue; + default: + if(aper_open_type_skip(opt_codec_ctx, pd)) { + FREEMEM(epres); + ASN__DECODE_STARVED; + } + } + break; + } + + FREEMEM(epres); + } + + /* Fill DEFAULT members in extensions */ + for(edx = specs->roms_count; edx < specs->roms_count + + specs->aoms_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + void **memb_ptr2; /* Pointer to member pointer */ + + if(!elm->default_value_set) continue; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (void **)((char *)st + + elm->memb_offset); + if(*memb_ptr2) continue; + } else { + continue; /* Extensions are all optionals */ + } + + /* Set default value */ + if(elm->default_value_set(memb_ptr2)) { + ASN__DECODE_FAILED; + } + } + + rv.consumed = 0; + rv.code = RC_OK; + return rv; +} + +static int +SEQUENCE_handle_extensions_aper(const asn_TYPE_descriptor_t *td, + const void *sptr, + asn_per_outp_t *po1, asn_per_outp_t *po2) { + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + int exts_present = 0; + int exts_count = 0; + size_t edx; + + if(specs->first_extension < 0) { + return 0; + } + + /* Find out which extensions are present */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void * const *memb_ptr2; /* Pointer to that pointer */ + int present; + + if(!IN_EXTENSION_GROUP(specs, edx)) { + ASN_DEBUG("%s (@%ld) is not extension", elm->type->name, edx); + continue; + } + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + ASN_DEBUG("checking %s (@%ld) present => %d", + elm->type->name, edx, present); + exts_count++; + exts_present += present; + + /* Encode as presence marker */ + if(po1 && per_put_few_bits(po1, present, 1)) + return -1; + /* Encode as open type field */ + if(po2 && present && aper_open_type_put(elm->type, + elm->encoding_constraints.per_constraints, *memb_ptr2, po2)) + return -1; + + } + + return exts_present ? exts_count : 0; +} + +asn_enc_rval_t +SEQUENCE_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_SEQUENCE_specifics_t *specs + = (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_enc_rval_t er = {0,0,0}; + int n_extensions; + size_t edx; + size_t i; + + (void)constraints; + + if(!sptr) + ASN__ENCODE_FAILED; + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE (APER)", td->name); + + /* + * X.691#18.1 Whether structure is extensible + * and whether to encode extensions + */ + if(specs->first_extension < 0) { + n_extensions = 0; /* There are no extensions to encode */ + } else { + n_extensions = SEQUENCE_handle_extensions_aper(td, sptr, 0, 0); + if(n_extensions < 0) ASN__ENCODE_FAILED; + if(per_put_few_bits(po, n_extensions ? 1 : 0, 1)) { + ASN__ENCODE_FAILED; + } + } + + /* Encode a presence bitmap */ + for(i = 0; i < specs->roms_count; i++) { + asn_TYPE_member_t *elm; + const void *memb_ptr; /* Pointer to the member */ + const void * const *memb_ptr2; /* Pointer to that pointer */ + int present; + + edx = specs->oms[i]; + elm = &td->elements[edx]; + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); + present = (*memb_ptr2 != 0); + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + present = 1; + } + + /* Eliminate default values */ + if(present && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr2) == 1) + present = 0; + + ASN_DEBUG("Element %s %s %s->%s is %s", + elm->flags & ATF_POINTER ? "ptr" : "inline", + elm->default_value_cmp ? "def" : "wtv", + td->name, elm->name, present ? "present" : "absent"); + if(per_put_few_bits(po, present, 1)) + ASN__ENCODE_FAILED; + } + + /* + * Encode the sequence ROOT elements. + */ + ASN_DEBUG("first_extension = %d, elements = %d", specs->first_extension, + td->elements_count); + for(edx = 0; + edx < ((specs->first_extension < 0) ? td->elements_count + : (size_t)specs->first_extension); + edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr; /* Pointer to the member */ + const void * const *memb_ptr2; /* Pointer to that pointer */ + + if(IN_EXTENSION_GROUP(specs, edx)) + continue; + + ASN_DEBUG("About to encode %s", elm->type->name); + + /* Fetch the pointer to this member */ + if(elm->flags & ATF_POINTER) { + memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); + if(!*memb_ptr2) { + ASN_DEBUG("Element %s %ld not present", + elm->name, edx); + if(elm->optional) + continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + } else { + memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); + memb_ptr2 = &memb_ptr; + } + + /* Eliminate default values */ + if(elm->default_value_cmp && elm->default_value_cmp(memb_ptr2) == 1) + continue; + + ASN_DEBUG("Encoding %s->%s", td->name, elm->name); + er = elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, + *memb_ptr2, po); + if(er.encoded == -1) + return er; + } + + /* No extensions to encode */ + if(!n_extensions) ASN__ENCODED_OK(er); + + ASN_DEBUG("Length of %d bit-map", n_extensions); + /* #18.8. Write down the presence bit-map length. */ + if(aper_put_nslength(po, n_extensions)) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Bit-map of %d elements", n_extensions); + /* #18.7. Encoding the extensions presence bit-map. */ + /* TODO: act upon NOTE in #18.7 for canonical PER */ + if(SEQUENCE_handle_extensions_aper(td, sptr, po, 0) != n_extensions) + ASN__ENCODE_FAILED; + + ASN_DEBUG("Writing %d extensions", n_extensions); + /* #18.9. Encode extensions as open type fields. */ + if(SEQUENCE_handle_extensions_aper(td, sptr, 0, po) != n_extensions) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +int +SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + size_t edx; + + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *amemb; + const void *bmemb; + int ret; + + if(elm->flags & ATF_POINTER) { + amemb = + *(const void *const *)((const char *)aptr + elm->memb_offset); + bmemb = + *(const void *const *)((const char *)bptr + elm->memb_offset); + if(!amemb) { + if(!bmemb) continue; + if(elm->default_value_cmp + && elm->default_value_cmp(bmemb) == 0) { + /* A is absent, but B is present and equal to DEFAULT */ + continue; + } + return -1; + } else if(!bmemb) { + if(elm->default_value_cmp + && elm->default_value_cmp(amemb) == 0) { + /* B is absent, but A is present and equal to DEFAULT */ + continue; + } + return 1; + } + } else { + amemb = (const void *)((const char *)aptr + elm->memb_offset); + bmemb = (const void *)((const char *)bptr + elm->memb_offset); + } + + ret = elm->type->op->compare_struct(elm->type, amemb, bmemb); + if(ret != 0) return ret; + } + + return 0; +} + +asn_TYPE_operation_t asn_OP_SEQUENCE = { + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_compare, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + SEQUENCE_decode_oer, + SEQUENCE_encode_oer, +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + SEQUENCE_decode_uper, + SEQUENCE_encode_uper, + SEQUENCE_decode_aper, + SEQUENCE_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + SEQUENCE_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; + + +asn_random_fill_result_t +SEQUENCE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constr, + size_t max_length) { + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_random_fill_result_t result_ok = {ARFILL_OK, 0}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + void *st = *sptr; + size_t edx; + + if(max_length == 0) return result_skipped; + + (void)constr; + + if(st == NULL) { + st = CALLOC(1, specs->struct_size); + if(st == NULL) { + return result_failed; + } + } + + for(edx = 0; edx < td->elements_count; edx++) { + const asn_TYPE_member_t *elm = &td->elements[edx]; + void *memb_ptr; /* Pointer to the member */ + void **memb_ptr2; /* Pointer to that pointer */ + asn_random_fill_result_t tmpres; + + if(elm->optional && asn_random_between(0, 4) == 2) { + /* Sometimes decide not to fill the optional value */ + continue; + } + + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + memb_ptr2 = (void **)((char *)st + elm->memb_offset); + } else { + memb_ptr = (char *)st + elm->memb_offset; + memb_ptr2 = &memb_ptr; + } + + tmpres = elm->type->op->random_fill( + elm->type, memb_ptr2, &elm->encoding_constraints, + max_length > result_ok.length ? max_length - result_ok.length : 0); + switch(tmpres.code) { + case ARFILL_OK: + result_ok.length += tmpres.length; + continue; + case ARFILL_SKIPPED: + assert(!(elm->flags & ATF_POINTER) || *memb_ptr2 == NULL); + continue; + case ARFILL_FAILED: + if(st == *sptr) { + ASN_STRUCT_RESET(*td, st); + } else { + ASN_STRUCT_FREE(*td, st); + } + return tmpres; + } + } + + *sptr = st; + + return result_ok; +} + diff --git a/Bouncer/e2sm_rc/lib/constr_SEQUENCE_OF.c b/Bouncer/e2sm_rc/lib/constr_SEQUENCE_OF.c new file mode 100644 index 0000000..10f18cf --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_SEQUENCE_OF.c @@ -0,0 +1,358 @@ +/*- + * Copyright (c) 2003, 2004, 2006 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * The DER encoder of the SEQUENCE OF type. + */ +asn_enc_rval_t +SEQUENCE_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, + int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(ptr); + size_t computed_size = 0; + ssize_t encoding_size = 0; + asn_enc_rval_t erval = {0,0,0}; + int edx; + + ASN_DEBUG("Estimating size of SEQUENCE OF %s", td->name); + + /* + * Gather the length of the underlying members sequence. + */ + for(edx = 0; edx < list->count; edx++) { + void *memb_ptr = list->array[edx]; + if(!memb_ptr) continue; + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + 0, elm->tag, + 0, 0); + if(erval.encoded == -1) + return erval; + computed_size += erval.encoded; + } + + /* + * Encode the TLV for the sequence itself. + */ + encoding_size = der_write_tags(td, computed_size, tag_mode, 1, tag, + cb, app_key); + if(encoding_size == -1) { + erval.encoded = -1; + erval.failed_type = td; + erval.structure_ptr = ptr; + return erval; + } + + computed_size += encoding_size; + if(!cb) { + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } + + ASN_DEBUG("Encoding members of SEQUENCE OF %s", td->name); + + /* + * Encode all members. + */ + for(edx = 0; edx < list->count; edx++) { + void *memb_ptr = list->array[edx]; + if(!memb_ptr) continue; + erval = elm->type->op->der_encoder(elm->type, memb_ptr, + 0, elm->tag, + cb, app_key); + if(erval.encoded == -1) + return erval; + encoding_size += erval.encoded; + } + + if(computed_size != (size_t)encoding_size) { + /* + * Encoded size is not equal to the computed size. + */ + erval.encoded = -1; + erval.failed_type = td; + erval.structure_ptr = ptr; + } else { + erval.encoded = computed_size; + erval.structure_ptr = 0; + erval.failed_type = 0; + } + + return erval; +} + +asn_enc_rval_t +SEQUENCE_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0,0,0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(sptr); + const char *mname = specs->as_XMLValueList + ? 0 + : ((*elm->name) ? elm->name : elm->type->xml_tag); + size_t mlen = mname ? strlen(mname) : 0; + int xcan = (flags & XER_F_CANONICAL); + int i; + + if(!sptr) ASN__ENCODE_FAILED; + + er.encoded = 0; + + for(i = 0; i < list->count; i++) { + asn_enc_rval_t tmper = {0,0,0}; + void *memb_ptr = list->array[i]; + if(!memb_ptr) continue; + + if(mname) { + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + } + + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1, + flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + if(tmper.encoded == 0 && specs->as_XMLValueList) { + const char *name = elm->type->xml_tag; + size_t len = strlen(name); + if(!xcan) ASN__TEXT_INDENT(1, ilevel + 1); + ASN__CALLBACK3("<", 1, name, len, "/>", 2); + } + + if(mname) { + ASN__CALLBACK3("", 1); + } + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_enc_rval_t +SEQUENCE_OF_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_anonymous_sequence_ *list; + const asn_per_constraint_t *ct; + asn_enc_rval_t er = {0,0,0}; + const asn_TYPE_member_t *elm = td->elements; + size_t encoded_edx; + + if(!sptr) ASN__ENCODE_FAILED; + list = _A_CSEQUENCE_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE OF (%d)", td->name, list->count); + + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + /* If extensible constraint, check if size is in root */ + if(ct) { + int not_in_root = + (list->count < ct->lower_bound || list->count > ct->upper_bound); + ASN_DEBUG("lb %ld ub %ld %s", ct->lower_bound, ct->upper_bound, + ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); + if(ct->flags & APC_EXTENSIBLE) { + /* Declare whether size is in extension root */ + if(per_put_few_bits(po, not_in_root, 1)) ASN__ENCODE_FAILED; + if(not_in_root) ct = 0; + } else if(not_in_root && ct->effective_bits >= 0) { + ASN__ENCODE_FAILED; + } + + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + if(per_put_few_bits(po, list->count - ct->lower_bound, + ct->effective_bits)) + ASN__ENCODE_FAILED; + } else if(list->count == 0) { + /* When the list is empty add only the length determinant + * X.691, #20.6 and #11.9.4.1 + */ + if (uper_put_length(po, 0, 0)) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } + + for(encoded_edx = 0; (ssize_t)encoded_edx < list->count;) { + ssize_t may_encode; + size_t edx; + int need_eom = 0; + + if(ct && ct->effective_bits >= 0) { + may_encode = list->count; + } else { + may_encode = + uper_put_length(po, list->count - encoded_edx, &need_eom); + if(may_encode < 0) ASN__ENCODE_FAILED; + } + + for(edx = encoded_edx; edx < encoded_edx + may_encode; edx++) { + void *memb_ptr = list->array[edx]; + if(!memb_ptr) ASN__ENCODE_FAILED; + er = elm->type->op->uper_encoder( + elm->type, elm->encoding_constraints.per_constraints, memb_ptr, + po); + if(er.encoded == -1) ASN__ENCODE_FAILED; + } + + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + + encoded_edx += may_encode; + } + + ASN__ENCODED_OK(er); +} + +asn_enc_rval_t +SEQUENCE_OF_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + const asn_anonymous_sequence_ *list; + const asn_per_constraint_t *ct; + asn_enc_rval_t er = {0,0,0}; + asn_TYPE_member_t *elm = td->elements; + int seq; + + if(!sptr) ASN__ENCODE_FAILED; + list = _A_CSEQUENCE_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE OF size (%d) using ALIGNED PER", td->name, list->count); + + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + /* If extensible constraint, check if size is in root */ + if(ct) { + int not_in_root = (list->count < ct->lower_bound + || list->count > ct->upper_bound); + ASN_DEBUG("lb %ld ub %ld %s", + ct->lower_bound, ct->upper_bound, + ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); + if(ct->flags & APC_EXTENSIBLE) { + /* Declare whether size is in extension root */ + if(per_put_few_bits(po, not_in_root, 1)) + ASN__ENCODE_FAILED; + if(not_in_root) ct = 0; + } else if(not_in_root && ct->effective_bits >= 0) + ASN__ENCODE_FAILED; + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ +/* if(per_put_few_bits(po, list->count - ct->lower_bound, + ct->effective_bits)) + ASN__ENCODE_FAILED; +*/ + if (aper_put_length(po, ct->upper_bound - ct->lower_bound + 1, list->count - ct->lower_bound) < 0) + ASN__ENCODE_FAILED; + } + + for(seq = -1; seq < list->count;) { + ssize_t mayEncode; + if(seq < 0) seq = 0; + if(ct && ct->effective_bits >= 0) { + mayEncode = list->count; + } else { + mayEncode = aper_put_length(po, -1, list->count - seq); + if(mayEncode < 0) ASN__ENCODE_FAILED; + } + + while(mayEncode--) { + void *memb_ptr = list->array[seq++]; + if(!memb_ptr) ASN__ENCODE_FAILED; + er = elm->type->op->aper_encoder(elm->type, + elm->encoding_constraints.per_constraints, memb_ptr, po); + if(er.encoded == -1) + ASN__ENCODE_FAILED; + } + } + + ASN__ENCODED_OK(er); +} +#endif /* ASN_DISABLE_PER_SUPPORT */ + +int +SEQUENCE_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const asn_anonymous_sequence_ *a = _A_CSEQUENCE_FROM_VOID(aptr); + const asn_anonymous_sequence_ *b = _A_CSEQUENCE_FROM_VOID(bptr); + ssize_t idx; + + if(a && b) { + ssize_t common_length = (a->count < b->count ? a->count : b->count); + for(idx = 0; idx < common_length; idx++) { + int ret = td->elements->type->op->compare_struct( + td->elements->type, a->array[idx], b->array[idx]); + if(ret) return ret; + } + + if(idx < b->count) /* more elements in b */ + return -1; /* a is shorter, so put it first */ + if(idx < a->count) return 1; + + } else if(!a) { + return -1; + } else if(!b) { + return 1; + } + + return 0; +} + + +asn_TYPE_operation_t asn_OP_SEQUENCE_OF = { + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_compare, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + SEQUENCE_OF_decode_oer, /* Same as SET OF decoder. */ + SEQUENCE_OF_encode_oer, /* Same as SET OF encoder */ +#endif /* ASN_DISABLE_OER_SUPPORT */ +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + SEQUENCE_OF_decode_uper, /* Same as SET OF decoder */ + SEQUENCE_OF_encode_uper, + SEQUENCE_OF_decode_aper, + SEQUENCE_OF_encode_aper, +#endif /* ASN_DISABLE_PER_SUPPORT */ + SEQUENCE_OF_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; + diff --git a/Bouncer/e2sm_rc/lib/constr_SEQUENCE_oer.c b/Bouncer/e2sm_rc/lib/constr_SEQUENCE_oer.c new file mode 100644 index 0000000..ecb589c --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_SEQUENCE_oer.c @@ -0,0 +1,561 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include +#include + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#undef PHASE_OUT +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) + +/* + * Check whether we are inside the extensions group. + */ +#define IN_EXTENSION_GROUP(specs, memb_idx) \ + ((specs)->first_extension >= 0 \ + && (unsigned)(specs)->first_extension <= (memb_idx)) + +#define IN_ROOT_GROUP_PRED(edx) \ + edx < (specs->first_extension < 0 ? td->elements_count \ + : (size_t)specs->first_extension) + +#define FOR_IN_ROOT_GROUP(edx) for(edx = 0; IN_ROOT_GROUP_PRED(edx); edx++) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * Return pointer to a member. + */ +static void ** +element_ptrptr(void *struct_ptr, asn_TYPE_member_t *elm, void **tmp_save_ptr) { + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + return (void **)((char *)struct_ptr + elm->memb_offset); + } else { + assert(tmp_save_ptr); + *tmp_save_ptr = (void *)((char *)struct_ptr + elm->memb_offset); + return tmp_save_ptr; + } +} + +static const void * +element_ptr(const void *struct_ptr, const asn_TYPE_member_t *elm) { + if(elm->flags & ATF_POINTER) { + /* Member is a pointer to another structure */ + return *(const void *const *)((const char *)struct_ptr + + elm->memb_offset); + } else { + return (const void *)((const char *)struct_ptr + elm->memb_offset); + } +} + +asn_dec_rval_t +SEQUENCE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + const asn_SEQUENCE_specifics_t *specs = + (const asn_SEQUENCE_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + void *st = *struct_ptr; /* Target structure */ + asn_struct_ctx_t *ctx; /* Decoder context */ + size_t consumed_myself = 0; /* Consumed bytes from ptr. */ + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously. + */ + switch(ctx->phase) { + case 0: { + /* + * Fetch preamble. + */ + asn_bit_data_t *preamble; + int has_extensions_bit = (specs->first_extension >= 0); + size_t preamble_bits = (has_extensions_bit + specs->roms_count); + size_t preamble_bytes = ((7 + preamble_bits) >> 3); + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 0", td->name); + + ASN_DEBUG( + "Expecting preamble bits %" ASN_PRI_SIZE " for %s (including %d extension bits)", + preamble_bits, td->name, has_extensions_bit); + + if(preamble_bytes > size) { + ASN__DECODE_STARVED; + } + + preamble = asn_bit_data_new_contiguous(ptr, preamble_bits); + if(!preamble) { + RETURN(RC_FAIL); + } + preamble->nboff = has_extensions_bit; + ctx->ptr = preamble; + ADVANCE(preamble_bytes); + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 1: { + /* Decode components of the extension root */ + asn_bit_data_t *preamble = ctx->ptr; + size_t edx; + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 1 (Root)", td->name); + + assert(preamble); + + for(edx = (ctx->step >> 1); IN_ROOT_GROUP_PRED(edx); + edx++, ctx->step = (ctx->step & ~1) + 2) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + ASN_DEBUG("Decoding %s->%s", td->name, elm->name); + + assert(!IN_EXTENSION_GROUP(specs, edx)); + + if(ctx->step & 1) { + goto microphase2_decode_continues; + } + + + if(elm->optional) { + int32_t present = asn_get_few_bits(preamble, 1); + if(present < 0) { + ASN_DEBUG("Presence map ended prematurely: %d", present); + RETURN(RC_FAIL); + } else if(present == 0) { + if(elm->default_value_set) { + /* Fill-in DEFAULT */ + void *tmp; + if(elm->default_value_set( + element_ptrptr(st, elm, &tmp))) { + RETURN(RC_FAIL); + } + } + /* The member is not present. */ + continue; + } + /* Present OPTIONAL or DEFAULT component. */ + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + ctx->step |= 1; /* Confirm entering next microphase */ + microphase2_decode_continues: + if(elm->flags & ATF_OPEN_TYPE) { + rval = OPEN_TYPE_oer_get(opt_codec_ctx, td, st, elm, ptr, size); + } else { + void *save_memb_ptr; /* Temporary reference. */ + void **memb_ptr2; /* Pointer to a pointer to a memmber */ + + memb_ptr2 = element_ptrptr(st, elm, &save_memb_ptr); + + rval = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, + size); + } + switch(rval.code) { + case RC_OK: + ADVANCE(rval.consumed); + break; + case RC_WMORE: + ASN_DEBUG("More bytes needed at element %s \"%s\"", td->name, + elm->name); + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + case RC_FAIL: + ASN_DEBUG("Decoding failed at element %s \"%s\"", td->name, + elm->name); + RETURN(RC_FAIL); + } + } /* for(all root members) */ + + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 2: + assert(ctx->ptr); + { + /* Cleanup preamble. */ + asn_bit_data_t *preamble = ctx->ptr; + asn_bit_data_t *extadds; + int has_extensions_bit = (specs->first_extension >= 0); + int extensions_present = + has_extensions_bit + && (preamble->buffer == NULL + || (((const uint8_t *)preamble->buffer)[0] & 0x80)); + uint8_t unused_bits; + size_t len = 0; + ssize_t len_len; + + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 2", td->name); + + preamble->buffer = 0; /* Will do extensions_present==1 next time. */ + + if(!extensions_present) { + ctx->phase = 10; + RETURN(RC_OK); + } + + /* + * X.696 (08/2015) #16.1 (c), #16.4 + * Read in the extension addition presence bitmap. + */ + + len_len = oer_fetch_length(ptr, size, &len); + if(len_len > 0) { + ADVANCE(len_len); + } else if(len_len < 0) { + RETURN(RC_FAIL); + } else { + RETURN(RC_WMORE); + } + + if(len == 0) { + /* 16.4.1-2 */ + RETURN(RC_FAIL); + } else if(len > size) { + RETURN(RC_WMORE); + } + + /* Account for unused bits */ + unused_bits = 0x7 & *(const uint8_t *)ptr; + ADVANCE(1); + len--; + if(unused_bits && len == 0) { + RETURN(RC_FAIL); + } + + /* Get the extensions map */ + extadds = asn_bit_data_new_contiguous(ptr, len * 8 - unused_bits); + if(!extadds) { + RETURN(RC_FAIL); + } + FREEMEM(preamble); + ctx->ptr = extadds; + ADVANCE(len); + } + NEXT_PHASE(ctx); + ctx->step = + (specs->first_extension < 0 ? td->elements_count + : (size_t)specs->first_extension); + /* Fall through */ + case 3: + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 3 (Extensions)", td->name); + for(; ctx->step < (signed)td->elements_count; ctx->step++) { + asn_bit_data_t *extadds = ctx->ptr; + size_t edx = ctx->step; + asn_TYPE_member_t *elm = &td->elements[edx]; + void *tmp_memb_ptr; + void **memb_ptr2 = element_ptrptr(st, elm, &tmp_memb_ptr); + + switch(asn_get_few_bits(extadds, 1)) { + case -1: + /* + * Not every one of our extensions is known to the remote side. + * Continue filling in their defaults though. + */ + /* Fall through */ + case 0: + /* Fill-in DEFAULT */ + if(elm->default_value_set + && elm->default_value_set(memb_ptr2)) { + RETURN(RC_FAIL); + } + continue; + case 1: { + /* Read OER open type */ + ssize_t ot_size = + oer_open_type_get(opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, + memb_ptr2, ptr, size); + assert(ot_size <= (ssize_t)size); + if(ot_size > 0) { + ADVANCE(ot_size); + } else if(ot_size < 0) { + RETURN(RC_FAIL); + } else { + /* Roll back open type parsing */ + asn_get_undo(extadds, 1); + RETURN(RC_WMORE); + } + break; + } + default: + RETURN(RC_FAIL); + } + } + + NEXT_PHASE(ctx); + /* Fall through */ + case 4: + ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 4", td->name); + /* Read in the rest of Open Types while ignoring them */ + for(;;) { + asn_bit_data_t *extadds = ctx->ptr; + switch(asn_get_few_bits(extadds, 1)) { + case 0: + continue; + case 1: { + ssize_t skipped = oer_open_type_skip(ptr, size); + if(skipped > 0) { + ADVANCE(skipped); + } else if(skipped < 0) { + RETURN(RC_FAIL); + } else { + asn_get_undo(extadds, 1); + RETURN(RC_WMORE); + } + continue; + } + case -1: + /* No more Open Type encoded components */ + break; + default: + RETURN(RC_FAIL); + } + break; + } + } + + RETURN(RC_OK); +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; + size_t computed_size = 0; + int has_extensions_bit = (specs->first_extension >= 0); + size_t preamble_bits = (has_extensions_bit + specs->roms_count); + uint32_t has_extensions = 0; + size_t edx; + int ret; + + (void)constraints; + + if(preamble_bits) { + asn_bit_outp_t preamble; + + memset(&preamble, 0, sizeof(preamble)); + preamble.output = cb; + preamble.op_key = app_key; + + if(has_extensions_bit) { + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Do not encode default values in extensions */ + } else { + has_extensions = 1; + break; + } + } + } + ret = asn_put_few_bits(&preamble, has_extensions, 1); + assert(ret == 0); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + } + + /* + * Encode optional components bitmap. + */ + if(specs->roms_count) { + FOR_IN_ROOT_GROUP(edx) { + asn_TYPE_member_t *elm = &td->elements[edx]; + + if(IN_EXTENSION_GROUP(specs, edx)) break; + + if(elm->optional) { + const void *memb_ptr = element_ptr(sptr, elm); + uint32_t has_component = memb_ptr != NULL; + if(has_component && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + has_component = 0; + } + ret = asn_put_few_bits(&preamble, has_component, 1); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + } + } + } + + asn_put_aligned_flush(&preamble); + computed_size += preamble.flushed_bytes; + } /* if(preamble_bits) */ + + /* + * Put root components and extensions root. + */ + for(edx = 0; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + asn_enc_rval_t er = {0,0,0}; + const void *memb_ptr; + + if(IN_EXTENSION_GROUP(specs, edx)) break; + + memb_ptr = element_ptr(sptr, elm); + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Skip default values in encoding */ + continue; + } + } else { + if(elm->optional) continue; + /* Mandatory element is missing */ + ASN__ENCODE_FAILED; + } + if(!elm->type->op->oer_encoder) { + ASN_DEBUG("OER encoder is not defined for type %s", elm->type->name); + ASN__ENCODE_FAILED; + } + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded == -1) { + ASN_DEBUG("... while encoding %s member \"%s\"\n", td->name, + elm->name); + return er; + } + computed_size += er.encoded; + } + + /* + * Before encode extensions, encode extensions additions presense bitmap + # X.696 (08/2015) #16.4. + */ + if(has_extensions) { + asn_bit_outp_t extadds; + + /* Special case allowing us to use exactly one byte for #8.6 */ + size_t aoms_length_bits = specs->aoms_count; + size_t aoms_length_bytes = (7 + aoms_length_bits) >> 3; + uint8_t unused_bits = 0x07 & (8 - (aoms_length_bits & 0x07)); + + assert(1 + aoms_length_bytes <= 127); + + memset(&extadds, 0, sizeof(extadds)); + extadds.output = cb; + extadds.op_key = app_key; + + /* #8.6 length determinant */ + ret = asn_put_few_bits(&extadds, (1 + aoms_length_bytes), 8); + if(ret < 0) ASN__ENCODE_FAILED; + + /* Number of unused bytes, #16.4.2 */ + ret = asn_put_few_bits(&extadds, unused_bits, 8); + if(ret < 0) ASN__ENCODE_FAILED; + + /* Encode presence bitmap #16.4.3 */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + if(memb_ptr && elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + memb_ptr = 0; /* Do not encode default value. */ + } + ret |= asn_put_few_bits(&extadds, memb_ptr ? 1 : 0, 1); + } + if(ret < 0) ASN__ENCODE_FAILED; + + asn_put_aligned_flush(&extadds); + computed_size += extadds.flushed_bytes; + + /* Now, encode extensions */ + for(edx = specs->first_extension; edx < td->elements_count; edx++) { + asn_TYPE_member_t *elm = &td->elements[edx]; + const void *memb_ptr = element_ptr(sptr, elm); + + if(memb_ptr) { + if(elm->default_value_cmp + && elm->default_value_cmp(memb_ptr) == 0) { + /* Do not encode default value. */ + } else { + ssize_t wrote = oer_open_type_put( + elm->type, elm->encoding_constraints.oer_constraints, + memb_ptr, cb, app_key); + if(wrote == -1) { + ASN__ENCODE_FAILED; + } + computed_size += wrote; + } + } else if(!elm->optional) { + ASN__ENCODE_FAILED; + } + } + } /* if(has_extensions) */ + + + { + asn_enc_rval_t er = {0, 0, 0}; + er.encoded = computed_size; + ASN__ENCODED_OK(er); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/constr_SET_OF.c b/Bouncer/e2sm_rc/lib/constr_SET_OF.c new file mode 100644 index 0000000..bf1dc27 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_SET_OF.c @@ -0,0 +1,1441 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Number of bytes left for this structure. + * (ctx->left) indicates the number of bytes _transferred_ for the structure. + * (size) contains the number of bytes in the buffer passed. + */ +#define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) + +/* + * If the subprocessor function returns with an indication that it wants + * more data, it may well be a fatal decoding problem, because the + * size is constrained by the 's L, even if the buffer size allows + * reading more data. + * For example, consider the buffer containing the following TLVs: + * ... + * The TLV length clearly indicates that one byte is expected in V, but + * if the V processor returns with "want more data" even if the buffer + * contains way more data than the V processor have seen. + */ +#define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num;\ + size -= num; \ + if(ctx->left >= 0) \ + ctx->left -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#undef PHASE_OUT +#define NEXT_PHASE(ctx) do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself;\ + return rval; \ + } while(0) + +/* + * The decoder of the SET OF type. + */ +asn_dec_rval_t +SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *ptr, size_t size, int tag_mode) { + /* + * Bring closer parts of structure description. + */ + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; /* Single one */ + + /* + * Parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + ber_tlv_tag_t tlv_tag; /* T from TLV */ + asn_dec_rval_t rval; /* Return code from subparsers */ + + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + ASN_DEBUG("Decoding %s as SET OF", td->name); + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously + */ + switch(ctx->phase) { + case 0: + /* + * PHASE 0. + * Check that the set of tags associated with given structure + * perfectly fits our expectations. + */ + + rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, + tag_mode, 1, &ctx->left, 0); + if(rval.code != RC_OK) { + ASN_DEBUG("%s tagging check failed: %d", + td->name, rval.code); + return rval; + } + + if(ctx->left >= 0) + ctx->left += rval.consumed; /* ?Substracted below! */ + ADVANCE(rval.consumed); + + ASN_DEBUG("Structure consumes %ld bytes, " + "buffer %ld", (long)ctx->left, (long)size); + + NEXT_PHASE(ctx); + /* Fall through */ + case 1: + /* + * PHASE 1. + * From the place where we've left it previously, + * try to decode the next item. + */ + for(;; ctx->step = 0) { + ssize_t tag_len; /* Length of TLV's T */ + + if(ctx->step & 1) + goto microphase2; + + /* + * MICROPHASE 1: Synchronize decoding. + */ + + if(ctx->left == 0) { + ASN_DEBUG("End of SET OF %s", td->name); + /* + * No more things to decode. + * Exit out of here. + */ + PHASE_OUT(ctx); + RETURN(RC_OK); + } + + /* + * Fetch the T from TLV. + */ + tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); + switch(tag_len) { + case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); + /* Fall through */ + case -1: RETURN(RC_FAIL); + } + + if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { + if(LEFT < 2) { + if(SIZE_VIOLATION) + RETURN(RC_FAIL); + else + RETURN(RC_WMORE); + } else if(((const uint8_t *)ptr)[1] == 0) { + /* + * Found the terminator of the + * indefinite length structure. + */ + break; + } + } + + /* Outmost tag may be unknown and cannot be fetched/compared */ + if(elm->tag != (ber_tlv_tag_t)-1) { + if(BER_TAGS_EQUAL(tlv_tag, elm->tag)) { + /* + * The new list member of expected type has arrived. + */ + } else { + ASN_DEBUG("Unexpected tag %s fixed SET OF %s", + ber_tlv_tag_string(tlv_tag), td->name); + ASN_DEBUG("%s SET OF has tag %s", + td->name, ber_tlv_tag_string(elm->tag)); + RETURN(RC_FAIL); + } + } + + /* + * MICROPHASE 2: Invoke the member-specific decoder. + */ + ctx->step |= 1; /* Confirm entering next microphase */ + microphase2: + + /* + * Invoke the member fetch routine according to member's type + */ + rval = elm->type->op->ber_decoder(opt_codec_ctx, + elm->type, &ctx->ptr, ptr, LEFT, 0); + ASN_DEBUG("In %s SET OF %s code %d consumed %d", + td->name, elm->type->name, + rval.code, (int)rval.consumed); + switch(rval.code) { + case RC_OK: + { + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + if(ASN_SET_ADD(list, ctx->ptr) != 0) + RETURN(RC_FAIL); + else + ctx->ptr = 0; + } + break; + case RC_WMORE: /* More data expected */ + if(!SIZE_VIOLATION) { + ADVANCE(rval.consumed); + RETURN(RC_WMORE); + } + /* Fall through */ + case RC_FAIL: /* Fatal error */ + ASN_STRUCT_FREE(*elm->type, ctx->ptr); + ctx->ptr = 0; + RETURN(RC_FAIL); + } /* switch(rval) */ + + ADVANCE(rval.consumed); + } /* for(all list members) */ + + NEXT_PHASE(ctx); + case 2: + /* + * Read in all "end of content" TLVs. + */ + while(ctx->left < 0) { + if(LEFT < 2) { + if(LEFT > 0 && ((const char *)ptr)[0] != 0) { + /* Unexpected tag */ + RETURN(RC_FAIL); + } else { + RETURN(RC_WMORE); + } + } + if(((const char *)ptr)[0] == 0 + && ((const char *)ptr)[1] == 0) { + ADVANCE(2); + ctx->left++; + } else { + RETURN(RC_FAIL); + } + } + + PHASE_OUT(ctx); + } + + RETURN(RC_OK); +} + +/* + * Internally visible buffer holding a single encoded element. + */ +struct _el_buffer { + uint8_t *buf; + size_t length; + size_t allocated_size; + unsigned bits_unused; +}; +/* Append bytes to the above structure */ +static int _el_addbytes(const void *buffer, size_t size, void *el_buf_ptr) { + struct _el_buffer *el_buf = (struct _el_buffer *)el_buf_ptr; + + if(el_buf->length + size > el_buf->allocated_size) { + size_t new_size = el_buf->allocated_size ? el_buf->allocated_size : 8; + void *p; + + do { + new_size <<= 2; + } while(el_buf->length + size > new_size); + + p = REALLOC(el_buf->buf, new_size); + if(p) { + el_buf->buf = p; + el_buf->allocated_size = new_size; + } else { + return -1; + } + } + + memcpy(el_buf->buf + el_buf->length, buffer, size); + + el_buf->length += size; + return 0; +} + +static void assert_unused_bits(const struct _el_buffer* p) { + if(p->length) { + assert((p->buf[p->length-1] & ~(0xff << p->bits_unused)) == 0); + } else { + assert(p->bits_unused == 0); + } +} + +static int _el_buf_cmp(const void *ap, const void *bp) { + const struct _el_buffer *a = (const struct _el_buffer *)ap; + const struct _el_buffer *b = (const struct _el_buffer *)bp; + size_t common_len; + int ret = 0; + + if(a->length < b->length) + common_len = a->length; + else + common_len = b->length; + + if (a->buf && b->buf) { + ret = memcmp(a->buf, b->buf, common_len); + } + if(ret == 0) { + if(a->length < b->length) + ret = -1; + else if(a->length > b->length) + ret = 1; + /* Ignore unused bits. */ + assert_unused_bits(a); + assert_unused_bits(b); + } + + return ret; +} + +static void +SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count) { + size_t i; + + for(i = 0; i < count; i++) { + FREEMEM(el_buf[i].buf); + } + + FREEMEM(el_buf); +} + +enum SET_OF__encode_method { + SOES_DER, /* Distinguished Encoding Rules */ + SOES_CUPER /* Canonical Unaligned Packed Encoding Rules */ +}; + +static struct _el_buffer * +SET_OF__encode_sorted(const asn_TYPE_member_t *elm, + const asn_anonymous_set_ *list, + enum SET_OF__encode_method method) { + struct _el_buffer *encoded_els; + int edx; + + encoded_els = + (struct _el_buffer *)CALLOC(list->count, sizeof(encoded_els[0])); + if(encoded_els == NULL) { + return NULL; + } + + /* + * Encode all members. + */ + for(edx = 0; edx < list->count; edx++) { + const void *memb_ptr = list->array[edx]; + struct _el_buffer *encoding_el = &encoded_els[edx]; + asn_enc_rval_t erval = {0,0,0}; + + if(!memb_ptr) break; + + /* + * Encode the member into the prepared space. + */ + switch(method) { + case SOES_DER: + erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, + _el_addbytes, encoding_el); + break; + case SOES_CUPER: + erval = uper_encode(elm->type, + elm->encoding_constraints.per_constraints, + memb_ptr, _el_addbytes, encoding_el); + if(erval.encoded != -1) { + size_t extra_bits = erval.encoded % 8; + assert(encoding_el->length == (size_t)(erval.encoded + 7) / 8); + encoding_el->bits_unused = (8 - extra_bits) & 0x7; + } + break; + default: + assert(!"Unreachable"); + break; + } + if(erval.encoded < 0) break; + } + + if(edx == list->count) { + /* + * Sort the encoded elements according to their encoding. + */ + qsort(encoded_els, list->count, sizeof(encoded_els[0]), _el_buf_cmp); + + return encoded_els; + } else { + SET_OF__encode_sorted_free(encoded_els, edx); + return NULL; + } +} + + +/* + * The DER encoder of the SET OF type. + */ +asn_enc_rval_t +SET_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, + int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, + void *app_key) { + const asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + size_t computed_size = 0; + ssize_t encoding_size = 0; + struct _el_buffer *encoded_els; + int edx; + + ASN_DEBUG("Estimating size for SET OF %s", td->name); + + /* + * Gather the length of the underlying members sequence. + */ + for(edx = 0; edx < list->count; edx++) { + void *memb_ptr = list->array[edx]; + asn_enc_rval_t erval = {0,0,0}; + + if(!memb_ptr) ASN__ENCODE_FAILED; + + erval = + elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, 0, 0); + if(erval.encoded == -1) return erval; + computed_size += erval.encoded; + } + + + /* + * Encode the TLV for the sequence itself. + */ + encoding_size = + der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); + if(encoding_size < 0) { + ASN__ENCODE_FAILED; + } + computed_size += encoding_size; + + if(!cb || list->count == 0) { + asn_enc_rval_t erval = {0,0,0}; + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } + + ASN_DEBUG("Encoding members of %s SET OF", td->name); + + /* + * DER mandates dynamic sorting of the SET OF elements + * according to their encodings. Build an array of the + * encoded elements. + */ + encoded_els = SET_OF__encode_sorted(elm, list, SOES_DER); + + /* + * Report encoded elements to the application. + * Dispose of temporary sorted members table. + */ + for(edx = 0; edx < list->count; edx++) { + struct _el_buffer *encoded_el = &encoded_els[edx]; + /* Report encoded chunks to the application */ + if(cb(encoded_el->buf, encoded_el->length, app_key) < 0) { + break; + } else { + encoding_size += encoded_el->length; + } + } + + SET_OF__encode_sorted_free(encoded_els, list->count); + + if(edx == list->count) { + asn_enc_rval_t erval = {0,0,0}; + assert(computed_size == (size_t)encoding_size); + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } else { + ASN__ENCODE_FAILED; + } +} + +#undef XER_ADVANCE +#define XER_ADVANCE(num_bytes) do { \ + size_t num = num_bytes; \ + buf_ptr = ((const char *)buf_ptr) + num;\ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Decode the XER (XML) data. + */ +asn_dec_rval_t +SET_OF_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const char *opt_mname, const void *buf_ptr, size_t size) { + /* + * Bring closer parts of structure description. + */ + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *element = td->elements; + const char *elm_tag; + const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; + + /* + * ... and parts of the structure being constructed. + */ + void *st = *struct_ptr; /* Target structure. */ + asn_struct_ctx_t *ctx; /* Decoder context */ + + asn_dec_rval_t rval = {RC_OK, 0};/* Return value from a decoder */ + ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) RETURN(RC_FAIL); + } + + /* Which tag is expected for the downstream */ + if(specs->as_XMLValueList) { + elm_tag = (specs->as_XMLValueList == 1) ? 0 : ""; + } else { + elm_tag = (*element->name) + ? element->name : element->type->xml_tag; + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + * Phase 2: Processing inner type. + */ + for(; ctx->phase <= 2;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + + /* + * Go inside the inner member of a set. + */ + if(ctx->phase == 2) { + asn_dec_rval_t tmprval = {RC_OK, 0}; + + /* Invoke the inner type decoder, m.b. multiple times */ + ASN_DEBUG("XER/SET OF element [%s]", elm_tag); + tmprval = element->type->op->xer_decoder(opt_codec_ctx, + element->type, &ctx->ptr, elm_tag, + buf_ptr, size); + if(tmprval.code == RC_OK) { + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + if(ASN_SET_ADD(list, ctx->ptr) != 0) + RETURN(RC_FAIL); + ctx->ptr = 0; + XER_ADVANCE(tmprval.consumed); + } else { + XER_ADVANCE(tmprval.consumed); + RETURN(tmprval.code); + } + ctx->phase = 1; /* Back to body processing */ + ASN_DEBUG("XER/SET OF phase => %d", ctx->phase); + /* Fall through */ + } + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, + buf_ptr, size, &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + case PXER_TEXT: /* Ignore free-standing text */ + XER_ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + ASN_DEBUG("XER/SET OF: tcv = %d, ph=%d t=%s", + tcv, ctx->phase, xml_tag); + switch(tcv) { + case XCT_CLOSING: + if(ctx->phase == 0) break; + ctx->phase = 0; + /* Fall through */ + case XCT_BOTH: + if(ctx->phase == 0) { + /* No more things to decode */ + XER_ADVANCE(ch_size); + ctx->phase = 3; /* Phase out */ + RETURN(RC_OK); + } + /* Fall through */ + case XCT_OPENING: + if(ctx->phase == 0) { + XER_ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + } + /* Fall through */ + case XCT_UNKNOWN_OP: + case XCT_UNKNOWN_BO: + + ASN_DEBUG("XER/SET OF: tcv=%d, ph=%d", tcv, ctx->phase); + if(ctx->phase == 1) { + /* + * Process a single possible member. + */ + ctx->phase = 2; + continue; + } + /* Fall through */ + default: + break; + } + + ASN_DEBUG("Unexpected XML tag in SET OF"); + break; + } + + ctx->phase = 3; /* "Phase out" on hard failure */ + RETURN(RC_FAIL); +} + + + +typedef struct xer_tmp_enc_s { + void *buffer; + size_t offset; + size_t size; +} xer_tmp_enc_t; +static int +SET_OF_encode_xer_callback(const void *buffer, size_t size, void *key) { + xer_tmp_enc_t *t = (xer_tmp_enc_t *)key; + if(t->offset + size >= t->size) { + size_t newsize = (t->size << 2) + size; + void *p = REALLOC(t->buffer, newsize); + if(!p) return -1; + t->buffer = p; + t->size = newsize; + } + memcpy((char *)t->buffer + t->offset, buffer, size); + t->offset += size; + return 0; +} +static int +SET_OF_xer_order(const void *aptr, const void *bptr) { + const xer_tmp_enc_t *a = (const xer_tmp_enc_t *)aptr; + const xer_tmp_enc_t *b = (const xer_tmp_enc_t *)bptr; + size_t minlen = a->offset; + int ret; + if(b->offset < minlen) minlen = b->offset; + /* Well-formed UTF-8 has this nice lexicographical property... */ + ret = memcmp(a->buffer, b->buffer, minlen); + if(ret != 0) return ret; + if(a->offset == b->offset) + return 0; + if(a->offset == minlen) + return -1; + return 1; +} + + +asn_enc_rval_t +SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0,0,0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + const char *mname = specs->as_XMLValueList + ? 0 : ((*elm->name) ? elm->name : elm->type->xml_tag); + size_t mlen = mname ? strlen(mname) : 0; + int xcan = (flags & XER_F_CANONICAL); + xer_tmp_enc_t *encs = 0; + size_t encs_count = 0; + void *original_app_key = app_key; + asn_app_consume_bytes_f *original_cb = cb; + int i; + + if(!sptr) ASN__ENCODE_FAILED; + + if(xcan) { + encs = (xer_tmp_enc_t *)MALLOC(list->count * sizeof(encs[0])); + if(!encs) ASN__ENCODE_FAILED; + cb = SET_OF_encode_xer_callback; + } + + er.encoded = 0; + + for(i = 0; i < list->count; i++) { + asn_enc_rval_t tmper = {0,0,0}; + + void *memb_ptr = list->array[i]; + if(!memb_ptr) continue; + + if(encs) { + memset(&encs[encs_count], 0, sizeof(encs[0])); + app_key = &encs[encs_count]; + encs_count++; + } + + if(mname) { + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + } + + if(!xcan && specs->as_XMLValueList == 1) + ASN__TEXT_INDENT(1, ilevel + 1); + tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, + ilevel + (specs->as_XMLValueList != 2), + flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + if(tmper.encoded == 0 && specs->as_XMLValueList) { + const char *name = elm->type->xml_tag; + size_t len = strlen(name); + ASN__CALLBACK3("<", 1, name, len, "/>", 2); + } + + if(mname) { + ASN__CALLBACK3("", 1); + } + + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + + if(encs) { + xer_tmp_enc_t *enc = encs; + xer_tmp_enc_t *end = encs + encs_count; + ssize_t control_size = 0; + + er.encoded = 0; + cb = original_cb; + app_key = original_app_key; + qsort(encs, encs_count, sizeof(encs[0]), SET_OF_xer_order); + + for(; enc < end; enc++) { + ASN__CALLBACK(enc->buffer, enc->offset); + FREEMEM(enc->buffer); + enc->buffer = 0; + control_size += enc->offset; + } + assert(control_size == er.encoded); + } + + goto cleanup; +cb_failed: + ASN__ENCODE_FAILED; +cleanup: + if(encs) { + size_t n; + for(n = 0; n < encs_count; n++) { + FREEMEM(encs[n].buffer); + } + FREEMEM(encs); + } + ASN__ENCODED_OK(er); +} + +int +SET_OF_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_TYPE_member_t *elm = td->elements; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + int ret; + int i; + + if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; + + /* Dump preamble */ + if(cb(td->name, strlen(td->name), app_key) < 0 + || cb(" ::= {", 6, app_key) < 0) + return -1; + + for(i = 0; i < list->count; i++) { + const void *memb_ptr = list->array[i]; + if(!memb_ptr) continue; + + _i_INDENT(1); + + ret = elm->type->op->print_struct(elm->type, memb_ptr, + ilevel + 1, cb, app_key); + if(ret) return ret; + } + + ilevel--; + _i_INDENT(1); + + return (cb("}", 1, app_key) < 0) ? -1 : 0; +} + +void +SET_OF_free(const asn_TYPE_descriptor_t *td, void *ptr, + enum asn_struct_free_method method) { + if(td && ptr) { + const asn_SET_OF_specifics_t *specs; + asn_TYPE_member_t *elm = td->elements; + asn_anonymous_set_ *list = _A_SET_FROM_VOID(ptr); + asn_struct_ctx_t *ctx; /* Decoder context */ + int i; + + /* + * Could not use set_of_empty() because of (*free) + * incompatibility. + */ + for(i = 0; i < list->count; i++) { + void *memb_ptr = list->array[i]; + if(memb_ptr) + ASN_STRUCT_FREE(*elm->type, memb_ptr); + } + list->count = 0; /* No meaningful elements left */ + + asn_set_empty(list); /* Remove (list->array) */ + + specs = (const asn_SET_OF_specifics_t *)td->specifics; + ctx = (asn_struct_ctx_t *)((char *)ptr + specs->ctx_offset); + if(ctx->ptr) { + ASN_STRUCT_FREE(*elm->type, ctx->ptr); + ctx->ptr = 0; + } + + switch(method) { + case ASFM_FREE_EVERYTHING: + FREEMEM(ptr); + break; + case ASFM_FREE_UNDERLYING: + break; + case ASFM_FREE_UNDERLYING_AND_RESET: + memset(ptr, 0, specs->struct_size); + break; + } + } +} + +int +SET_OF_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const asn_TYPE_member_t *elm = td->elements; + asn_constr_check_f *constr; + const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); + int i; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + constr = elm->encoding_constraints.general_constraints; + if(!constr) constr = elm->type->encoding_constraints.general_constraints; + + /* + * Iterate over the members of an array. + * Validate each in turn, until one fails. + */ + for(i = 0; i < list->count; i++) { + const void *memb_ptr = list->array[i]; + int ret; + + if(!memb_ptr) continue; + + ret = constr(elm->type, memb_ptr, ctfailcb, app_key); + if(ret) return ret; + } + + return 0; +} + +#ifndef ASN_DISABLE_PER_SUPPORT + +asn_dec_rval_t +SET_OF_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rv = {RC_OK, 0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; /* Single one */ + void *st = *sptr; + asn_anonymous_set_ *list; + const asn_per_constraint_t *ct; + int repeat = 0; + ssize_t nelems; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + list = _A_SET_FROM_VOID(st); + + /* Figure out which constraints to use */ + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) ct = 0; /* Not restricted! */ + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + nelems = per_get_few_bits(pd, ct->effective_bits); + ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s", + (long)nelems, ct->lower_bound, td->name); + if(nelems < 0) ASN__DECODE_STARVED; + nelems += ct->lower_bound; + } else { + nelems = -1; + } + + do { + int i; + if(nelems < 0) { + nelems = uper_get_length(pd, -1, 0, &repeat); + ASN_DEBUG("Got to decode %" ASN_PRI_SSIZE " elements (eff %d)", + nelems, (int)(ct ? ct->effective_bits : -1)); + if(nelems < 0) ASN__DECODE_STARVED; + } + + for(i = 0; i < nelems; i++) { + void *ptr = 0; + ASN_DEBUG("SET OF %s decoding", elm->type->name); + rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, &ptr, pd); + ASN_DEBUG("%s SET OF %s decoded %d, %p", + td->name, elm->type->name, rv.code, ptr); + if(rv.code == RC_OK) { + if(ASN_SET_ADD(list, ptr) == 0) { + if(rv.consumed == 0 && nelems > 200) { + /* Protect from SET OF NULL compression bombs. */ + ASN__DECODE_FAILED; + } + continue; + } + ASN_DEBUG("Failed to add element into %s", + td->name); + /* Fall through */ + rv.code = RC_FAIL; + } else { + ASN_DEBUG("Failed decoding %s of %s (SET OF)", + elm->type->name, td->name); + } + if(ptr) ASN_STRUCT_FREE(*elm->type, ptr); + return rv; + } + + nelems = -1; /* Allow uper_get_length() */ + } while(repeat); + + ASN_DEBUG("Decoded %s as SET OF", td->name); + + rv.code = RC_OK; + rv.consumed = 0; + return rv; +} + +asn_enc_rval_t +SET_OF_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + const asn_anonymous_set_ *list; + const asn_per_constraint_t *ct; + const asn_TYPE_member_t *elm = td->elements; + struct _el_buffer *encoded_els; + asn_enc_rval_t er = {0,0,0}; + size_t encoded_edx; + + if(!sptr) ASN__ENCODE_FAILED; + + list = _A_CSET_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SEQUENCE OF (%d)", td->name, list->count); + + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + /* If extensible constraint, check if size is in root */ + if(ct) { + int not_in_root = + (list->count < ct->lower_bound || list->count > ct->upper_bound); + ASN_DEBUG("lb %ld ub %ld %s", ct->lower_bound, ct->upper_bound, + ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); + if(ct->flags & APC_EXTENSIBLE) { + /* Declare whether size is in extension root */ + if(per_put_few_bits(po, not_in_root, 1)) ASN__ENCODE_FAILED; + if(not_in_root) ct = 0; + } else if(not_in_root && ct->effective_bits >= 0) { + ASN__ENCODE_FAILED; + } + + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + if(per_put_few_bits(po, list->count - ct->lower_bound, + ct->effective_bits)) + ASN__ENCODE_FAILED; + } else if(list->count == 0) { + /* When the list is empty add only the length determinant + * X.691, #20.6 and #11.9.4.1 + */ + if (uper_put_length(po, 0, 0)) { + ASN__ENCODE_FAILED; + } + ASN__ENCODED_OK(er); + } + + + /* + * Canonical UPER #22.1 mandates dynamic sorting of the SET OF elements + * according to their encodings. Build an array of the encoded elements. + */ + encoded_els = SET_OF__encode_sorted(elm, list, SOES_CUPER); + + for(encoded_edx = 0; (ssize_t)encoded_edx < list->count;) { + ssize_t may_encode; + size_t edx; + int need_eom = 0; + + if(ct && ct->effective_bits >= 0) { + may_encode = list->count; + } else { + may_encode = + uper_put_length(po, list->count - encoded_edx, &need_eom); + if(may_encode < 0) ASN__ENCODE_FAILED; + } + + for(edx = encoded_edx; edx < encoded_edx + may_encode; edx++) { + const struct _el_buffer *el = &encoded_els[edx]; + if(asn_put_many_bits(po, el->buf, + (8 * el->length) - el->bits_unused) < 0) { + break; + } + } + + if(need_eom && uper_put_length(po, 0, 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + + encoded_edx += may_encode; + } + + SET_OF__encode_sorted_free(encoded_els, list->count); + + if((ssize_t)encoded_edx == list->count) { + ASN__ENCODED_OK(er); + } else { + ASN__ENCODE_FAILED; + } +} + +asn_dec_rval_t +SET_OF_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + asn_dec_rval_t rv = {RC_OK, 0}; + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + const asn_TYPE_member_t *elm = td->elements; /* Single one */ + void *st = *sptr; + asn_anonymous_set_ *list; + const asn_per_constraint_t *ct; + int repeat = 0; + ssize_t nelems; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(!st) { + st = *sptr = CALLOC(1, specs->struct_size); + if(!st) ASN__DECODE_FAILED; + } + list = _A_SET_FROM_VOID(st); + + /* Figure out which constraints to use */ + if(constraints) ct = &constraints->size; + else if(td->encoding_constraints.per_constraints) + ct = &td->encoding_constraints.per_constraints->size; + else ct = 0; + + if(ct && ct->flags & APC_EXTENSIBLE) { + int value = per_get_few_bits(pd, 1); + if(value < 0) ASN__DECODE_STARVED; + if(value) ct = 0; /* Not restricted! */ + } + + if(ct && ct->effective_bits >= 0) { + /* X.691, #19.5: No length determinant */ + nelems = aper_get_nsnnwn(pd, ct->upper_bound - ct->lower_bound + 1); + ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s", + (long)nelems, ct->lower_bound, td->name); + if(nelems < 0) ASN__DECODE_STARVED; + nelems += ct->lower_bound; + } else { + nelems = -1; + } + + do { + int i; + if(nelems < 0) { + nelems = aper_get_length(pd, ct ? ct->upper_bound - ct->lower_bound + 1 : -1, + ct ? ct->effective_bits : -1, &repeat); + ASN_DEBUG("Got to decode %d elements (eff %d)", + (int)nelems, (int)(ct ? ct->effective_bits : -1)); + if(nelems < 0) ASN__DECODE_STARVED; + } + + for(i = 0; i < nelems; i++) { + void *ptr = 0; + ASN_DEBUG("SET OF %s decoding", elm->type->name); + rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, + elm->encoding_constraints.per_constraints, &ptr, pd); + ASN_DEBUG("%s SET OF %s decoded %d, %p", + td->name, elm->type->name, rv.code, ptr); + if(rv.code == RC_OK) { + if(ASN_SET_ADD(list, ptr) == 0) + continue; + ASN_DEBUG("Failed to add element into %s", + td->name); + /* Fall through */ + rv.code = RC_FAIL; + } else { + ASN_DEBUG("Failed decoding %s of %s (SET OF)", + elm->type->name, td->name); + } + if(ptr) ASN_STRUCT_FREE(*elm->type, ptr); + return rv; + } + + nelems = -1; /* Allow uper_get_length() */ + } while(repeat); + + ASN_DEBUG("Decoded %s as SET OF", td->name); + + rv.code = RC_OK; + rv.consumed = 0; + return rv; +} + +#endif /* ASN_DISABLE_PER_SUPPORT */ + +struct comparable_ptr { + const asn_TYPE_descriptor_t *td; + const void *sptr; +}; + +static int +SET_OF__compare_cb(const void *aptr, const void *bptr) { + const struct comparable_ptr *a = aptr; + const struct comparable_ptr *b = bptr; + assert(a->td == b->td); + return a->td->op->compare_struct(a->td, a->sptr, b->sptr); +} + +int +SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, + const void *bptr) { + const asn_anonymous_set_ *a = _A_CSET_FROM_VOID(aptr); + const asn_anonymous_set_ *b = _A_CSET_FROM_VOID(bptr); + + if(a && b) { + struct comparable_ptr *asorted; + struct comparable_ptr *bsorted; + ssize_t common_length; + ssize_t idx; + + if(a->count == 0) { + if(b->count) return -1; + return 0; + } else if(b->count == 0) { + return 1; + } + + asorted = MALLOC(a->count * sizeof(asorted[0])); + bsorted = MALLOC(b->count * sizeof(bsorted[0])); + if(!asorted || !bsorted) { + FREEMEM(asorted); + FREEMEM(bsorted); + return -1; + } + + for(idx = 0; idx < a->count; idx++) { + asorted[idx].td = td->elements->type; + asorted[idx].sptr = a->array[idx]; + } + + for(idx = 0; idx < b->count; idx++) { + bsorted[idx].td = td->elements->type; + bsorted[idx].sptr = b->array[idx]; + } + + qsort(asorted, a->count, sizeof(asorted[0]), SET_OF__compare_cb); + qsort(bsorted, b->count, sizeof(bsorted[0]), SET_OF__compare_cb); + + common_length = (a->count < b->count ? a->count : b->count); + for(idx = 0; idx < common_length; idx++) { + int ret = td->elements->type->op->compare_struct( + td->elements->type, asorted[idx].sptr, bsorted[idx].sptr); + if(ret) { + FREEMEM(asorted); + FREEMEM(bsorted); + return ret; + } + } + + FREEMEM(asorted); + FREEMEM(bsorted); + + if(idx < b->count) /* more elements in b */ + return -1; /* a is shorter, so put it first */ + if(idx < a->count) return 1; + } else if(!a) { + return -1; + } else if(!b) { + return 1; + } + + return 0; +} + + +asn_TYPE_operation_t asn_OP_SET_OF = { + SET_OF_free, + SET_OF_print, + SET_OF_compare, + SET_OF_decode_ber, + SET_OF_encode_der, + SET_OF_decode_xer, + SET_OF_encode_xer, +#ifdef ASN_DISABLE_OER_SUPPORT + 0, + 0, +#else + SET_OF_decode_oer, + SET_OF_encode_oer, +#endif +#ifdef ASN_DISABLE_PER_SUPPORT + 0, + 0, + 0, + 0, +#else + SET_OF_decode_uper, + SET_OF_encode_uper, + SET_OF_decode_aper, + 0, /* SET_OF_encode_aper */ +#endif /* ASN_DISABLE_PER_SUPPORT */ + SET_OF_random_fill, + 0 /* Use generic outmost tag fetcher */ +}; + + +asn_random_fill_result_t +SET_OF_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constraints, + size_t max_length) { + const asn_SET_OF_specifics_t *specs = + (const asn_SET_OF_specifics_t *)td->specifics; + asn_random_fill_result_t res_ok = {ARFILL_OK, 0}; + asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; + asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; + const asn_TYPE_member_t *elm = td->elements; + void *st = *sptr; + long max_elements = 5; + long slb = 0; /* Lower size bound */ + long sub = 0; /* Upper size bound */ + size_t rnd_len; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (*sptr = CALLOC(1, specs->struct_size)); + if(st == NULL) { + return result_failed; + } + } + + switch(asn_random_between(0, 6)) { + case 0: max_elements = 0; break; + case 1: max_elements = 1; break; + case 2: max_elements = 5; break; + case 3: max_elements = max_length; break; + case 4: max_elements = max_length / 2; break; + case 5: max_elements = max_length / 4; break; + default: break; + } + sub = slb + max_elements; + + if(!constraints || !constraints->per_constraints) + constraints = &td->encoding_constraints; + if(constraints->per_constraints) { + const asn_per_constraint_t *pc = &constraints->per_constraints->size; + if(pc->flags & APC_SEMI_CONSTRAINED) { + slb = pc->lower_bound; + sub = pc->lower_bound + max_elements; + } else if(pc->flags & APC_CONSTRAINED) { + slb = pc->lower_bound; + sub = pc->upper_bound; + if(sub - slb > max_elements) sub = slb + max_elements; + } + } + + /* Bias towards edges of allowed space */ + switch(asn_random_between(-1, 4)) { + default: + case -1: + /* Prepare lengths somewhat outside of constrained range. */ + if(constraints->per_constraints + && (constraints->per_constraints->size.flags & APC_EXTENSIBLE)) { + switch(asn_random_between(0, 5)) { + default: + case 0: + rnd_len = 0; + break; + case 1: + if(slb > 0) { + rnd_len = slb - 1; + } else { + rnd_len = 0; + } + break; + case 2: + rnd_len = asn_random_between(0, slb); + break; + case 3: + if(sub < (ssize_t)max_length) { + rnd_len = sub + 1; + } else { + rnd_len = max_length; + } + break; + case 4: + if(sub < (ssize_t)max_length) { + rnd_len = asn_random_between(sub + 1, max_length); + } else { + rnd_len = max_length; + } + break; + case 5: + rnd_len = max_length; + break; + } + break; + } + /* Fall through */ + case 0: + rnd_len = asn_random_between(slb, sub); + break; + case 1: + if(slb < sub) { + rnd_len = asn_random_between(slb + 1, sub); + break; + } + /* Fall through */ + case 2: + rnd_len = asn_random_between(slb, slb); + break; + case 3: + if(slb < sub) { + rnd_len = asn_random_between(slb, sub - 1); + break; + } + /* Fall through */ + case 4: + rnd_len = asn_random_between(sub, sub); + break; + } + + for(; rnd_len > 0; rnd_len--) { + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + void *ptr = 0; + asn_random_fill_result_t tmpres = elm->type->op->random_fill( + elm->type, &ptr, &elm->encoding_constraints, + (max_length > res_ok.length ? max_length - res_ok.length : 0) + / rnd_len); + switch(tmpres.code) { + case ARFILL_OK: + ASN_SET_ADD(list, ptr); + res_ok.length += tmpres.length; + break; + case ARFILL_SKIPPED: + break; + case ARFILL_FAILED: + assert(ptr == 0); + return tmpres; + } + } + + return res_ok; +} + diff --git a/Bouncer/e2sm_rc/lib/constr_SET_OF_oer.c b/Bouncer/e2sm_rc/lib/constr_SET_OF_oer.c new file mode 100644 index 0000000..5200518 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_SET_OF_oer.c @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef ASN_DISABLE_OER_SUPPORT + +#include +#include +#include +#include + +/* + * This macro "eats" the part of the buffer which is definitely "consumed", + * i.e. was correctly converted into local representation or rightfully skipped. + */ +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +/* + * Switch to the next phase of parsing. + */ +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) \ + do { \ + ctx->phase++; \ + ctx->step = 0; \ + } while(0) +#undef SET_PHASE +#define SET_PHASE(ctx, value) \ + do { \ + ctx->phase = value; \ + ctx->step = 0; \ + } while(0) + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t rval; \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +/* + * The SEQUENCE OF and SET OF values utilize a "quantity field". + * It is is a pointless combination of #8.6 (length determinant, capable + * of encoding tiny and huge numbers in the shortest possible number of octets) + * and the variable sized integer. What could have been encoded by #8.6 alone + * is required to be encoded by #8.6 followed by that number of unsigned octets. + * This doesn't make too much sense. It seems that the original version of OER + * standard have been using the unconstrained unsigned integer as a quantity + * field, and this legacy have gone through ISO/ITU-T standardization process. + */ +static ssize_t +oer_fetch_quantity(const void *ptr, size_t size, size_t *qty_r) { + const uint8_t *b; + const uint8_t *bend; + size_t len = 0; + size_t qty; + + ssize_t len_len = oer_fetch_length(ptr, size, &len); + if(len_len <= 0) { + *qty_r = 0; + return len_len; + } + + if((len_len + len) > size) { + *qty_r = 0; + return 0; + } + + b = (const uint8_t *)ptr + len_len; + bend = b + len; + + /* Skip the leading 0-bytes */ + for(; b < bend && *b == 0; b++) { + } + + if((bend - b) > (ssize_t)sizeof(size_t)) { + /* Length is not representable by the native size_t type */ + *qty_r = 0; + return -1; + } + + for(qty = 0; b < bend; b++) { + qty = (qty << 8) + *b; + } + + if(qty > RSIZE_MAX) { /* A bit of C11 validation */ + *qty_r = 0; + return -1; + } + + *qty_r = qty; + assert((size_t)len_len + len == (size_t)(bend - (const uint8_t *)ptr)); + return len_len + len; +} + +asn_dec_rval_t +SET_OF_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *ptr, size_t size) { + const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; + asn_dec_rval_t rval = {RC_OK, 0}; + void *st = *struct_ptr; /* Target structure */ + asn_struct_ctx_t *ctx; /* Decoder context */ + size_t consumed_myself = 0; /* Consumed bytes from ptr. */ + + (void)constraints; + + if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) + ASN__DECODE_FAILED; + + /* + * Create the target structure if it is not present already. + */ + if(st == 0) { + st = *struct_ptr = CALLOC(1, specs->struct_size); + if(st == 0) { + RETURN(RC_FAIL); + } + } + + /* + * Restore parsing context. + */ + ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); + + /* + * Start to parse where left previously. + */ + switch(ctx->phase) { + case 0: { + /* + * Fetch number of elements to decode. + */ + size_t length = 0; + size_t len_size = oer_fetch_quantity(ptr, size, &length); + switch(len_size) { + case 0: + RETURN(RC_WMORE); + case -1: + RETURN(RC_FAIL); + default: + ADVANCE(len_size); + ctx->left = length; + } + } + NEXT_PHASE(ctx); + /* FALL THROUGH */ + case 1: { + /* Decode components of the extension root */ + asn_TYPE_member_t *elm = td->elements; + asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); + const void *base_ptr = ptr; + ber_tlv_len_t base_ctx_left = ctx->left; + + assert(td->elements_count == 1); + + ASN_DEBUG("OER SET OF %s Decoding PHASE 1", td->name); + + for(; ctx->left > 0; ctx->left--) { + asn_dec_rval_t rv = elm->type->op->oer_decoder( + opt_codec_ctx, elm->type, + elm->encoding_constraints.oer_constraints, &ctx->ptr, ptr, + size); + ADVANCE(rv.consumed); + switch(rv.code) { + case RC_OK: + if(ASN_SET_ADD(list, ctx->ptr) != 0) { + RETURN(RC_FAIL); + } else { + ctx->ptr = 0; + /* + * This check is to avoid compression bomb with + * specs like SEQUENCE/SET OF NULL which don't + * consume data at all. + */ + if(rv.consumed == 0 && base_ptr == ptr + && (base_ctx_left - ctx->left) > 200) { + ASN__DECODE_FAILED; + } + break; + } + case RC_WMORE: + RETURN(RC_WMORE); + case RC_FAIL: + ASN_STRUCT_FREE(*elm->type, ctx->ptr); + ctx->ptr = 0; + SET_PHASE(ctx, 3); + RETURN(RC_FAIL); + } + } + /* Decoded decently. */ + NEXT_PHASE(ctx); + } + /* Fall through */ + case 2: + /* Ignore fully decoded */ + assert(ctx->left == 0); + RETURN(RC_OK); + case 3: + /* Failed to decode. */ + RETURN(RC_FAIL); + } + + return rval; +} + +static ssize_t +oer_put_quantity(size_t qty, asn_app_consume_bytes_f *cb, void *app_key) { + uint8_t buf[1 + sizeof(size_t)]; + uint8_t *b = &buf[sizeof(size_t)]; /* Last addressable */ + size_t encoded; + + do { + *b-- = qty; + qty >>= 8; + } while(qty); + + *b = sizeof(buf) - (b-buf) - 1; + encoded = sizeof(buf) - (b-buf); + if(cb(b, encoded, app_key) < 0) + return -1; + return encoded; +} + +/* + * Encode as Canonical OER. + */ +asn_enc_rval_t +SET_OF_encode_oer(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const asn_TYPE_member_t *elm; + const asn_anonymous_set_ *list; + size_t computed_size = 0; + ssize_t qty_len; + int n; + + (void)constraints; + + if(!sptr) ASN__ENCODE_FAILED; + + elm = td->elements; + list = _A_CSET_FROM_VOID(sptr); + + qty_len = oer_put_quantity(list->count, cb, app_key); + if(qty_len < 0) { + ASN__ENCODE_FAILED; + } + computed_size += qty_len; + + for(n = 0; n < list->count; n++) { + void *memb_ptr = list->array[n]; + asn_enc_rval_t er = {0,0,0}; + er = elm->type->op->oer_encoder( + elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, + app_key); + if(er.encoded < 0) { + return er; + } else { + computed_size += er.encoded; + } + } + + { + asn_enc_rval_t erval = {0,0,0}; + erval.encoded = computed_size; + ASN__ENCODED_OK(erval); + } +} + +#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/Bouncer/e2sm_rc/lib/constr_TYPE.c b/Bouncer/e2sm_rc/lib/constr_TYPE.c new file mode 100644 index 0000000..aefaefd --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constr_TYPE.c @@ -0,0 +1,80 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * Version of the ASN.1 infrastructure shipped with compiler. + */ +int get_asn1c_environment_version() { return ASN1C_ENVIRONMENT_VERSION; } + +static asn_app_consume_bytes_f _print2fp; + +/* + * Return the outmost tag of the type. + */ +ber_tlv_tag_t +asn_TYPE_outmost_tag(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag) { + + if(tag_mode) + return tag; + + if(type_descriptor->tags_count) + return type_descriptor->tags[0]; + + return type_descriptor->op->outmost_tag(type_descriptor, struct_ptr, 0, 0); +} + +/* + * Print the target language's structure in human readable form. + */ +int +asn_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, + const void *struct_ptr) { + if(!stream) stream = stdout; + if(!td || !struct_ptr) { + errno = EINVAL; + return -1; + } + + /* Invoke type-specific printer */ + if(td->op->print_struct(td, struct_ptr, 1, _print2fp, stream)) { + return -1; + } + + /* Terminate the output */ + if(_print2fp("\n", 1, stream)) { + return -1; + } + + return fflush(stream); +} + +/* Dump the data into the specified stdio stream */ +static int +_print2fp(const void *buffer, size_t size, void *app_key) { + FILE *stream = (FILE *)app_key; + + if(fwrite(buffer, 1, size, stream) != size) + return -1; + + return 0; +} + + +/* + * Some compilers do not support variable args macros. + * This function is a replacement of ASN_DEBUG() macro. + */ +void ASN_DEBUG_f(const char *fmt, ...); +void ASN_DEBUG_f(const char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} diff --git a/Bouncer/e2sm_rc/lib/constraints.c b/Bouncer/e2sm_rc/lib/constraints.c new file mode 100644 index 0000000..df3c6c1 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/constraints.c @@ -0,0 +1,93 @@ +#include +#include + +int +asn_generic_no_constraint(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, + asn_app_constraint_failed_f *cb, void *key) { + (void)type_descriptor; /* Unused argument */ + (void)struct_ptr; /* Unused argument */ + (void)cb; /* Unused argument */ + (void)key; /* Unused argument */ + + /* Nothing to check */ + return 0; +} + +int +asn_generic_unknown_constraint(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, + asn_app_constraint_failed_f *cb, void *key) { + (void)type_descriptor; /* Unused argument */ + (void)struct_ptr; /* Unused argument */ + (void)cb; /* Unused argument */ + (void)key; /* Unused argument */ + + /* Unknown how to check */ + return 0; +} + +struct errbufDesc { + const asn_TYPE_descriptor_t *failed_type; + const void *failed_struct_ptr; + char *errbuf; + size_t errlen; +}; + +static void +_asn_i_ctfailcb(void *key, const asn_TYPE_descriptor_t *td, const void *sptr, + const char *fmt, ...) { + struct errbufDesc *arg = key; + va_list ap; + ssize_t vlen; + ssize_t maxlen; + + arg->failed_type = td; + arg->failed_struct_ptr = sptr; + + maxlen = arg->errlen; + if(maxlen <= 0) + return; + + va_start(ap, fmt); + vlen = vsnprintf(arg->errbuf, maxlen, fmt, ap); + va_end(ap); + if(vlen >= maxlen) { + arg->errbuf[maxlen-1] = '\0'; /* Ensuring libc correctness */ + arg->errlen = maxlen - 1; /* Not counting termination */ + return; + } else if(vlen >= 0) { + arg->errbuf[vlen] = '\0'; /* Ensuring libc correctness */ + arg->errlen = vlen; /* Not counting termination */ + } else { + /* + * The libc on this system is broken. + */ + vlen = sizeof("") - 1; + maxlen--; + arg->errlen = vlen < maxlen ? vlen : maxlen; + memcpy(arg->errbuf, "", arg->errlen); + arg->errbuf[arg->errlen] = 0; + } + + return; +} + +int +asn_check_constraints(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, char *errbuf, size_t *errlen) { + struct errbufDesc arg; + int ret; + + arg.failed_type = 0; + arg.failed_struct_ptr = 0; + arg.errbuf = errbuf; + arg.errlen = errlen ? *errlen : 0; + + ret = type_descriptor->encoding_constraints.general_constraints( + type_descriptor, struct_ptr, _asn_i_ctfailcb, &arg); + if(ret == -1 && errlen) *errlen = arg.errlen; + + return ret; +} + diff --git a/Bouncer/e2sm_rc/lib/der_encoder.c b/Bouncer/e2sm_rc/lib/der_encoder.c new file mode 100644 index 0000000..2c6a6f7 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/der_encoder.c @@ -0,0 +1,194 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +static ssize_t der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len, + asn_app_consume_bytes_f *cb, void *app_key, int constructed); + +/* + * The DER encoder of any type. + */ +asn_enc_rval_t +der_encode(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes, void *app_key) { + ASN_DEBUG("DER encoder invoked for %s", + type_descriptor->name); + + /* + * Invoke type-specific encoder. + */ + return type_descriptor->op->der_encoder( + type_descriptor, struct_ptr, /* Pointer to the destination structure */ + 0, 0, consume_bytes, app_key); +} + +/* + * Argument type and callback necessary for der_encode_to_buffer(). + */ +typedef struct enc_to_buf_arg { + void *buffer; + size_t left; +} enc_to_buf_arg; +static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) { + enc_to_buf_arg *arg = (enc_to_buf_arg *)key; + + if(arg->left < size) + return -1; /* Data exceeds the available buffer size */ + + memcpy(arg->buffer, buffer, size); + arg->buffer = ((char *)arg->buffer) + size; + arg->left -= size; + + return 0; +} + +/* + * A variant of the der_encode() which encodes the data into the provided buffer + */ +asn_enc_rval_t +der_encode_to_buffer(const asn_TYPE_descriptor_t *type_descriptor, + const void *struct_ptr, void *buffer, size_t buffer_size) { + enc_to_buf_arg arg; + asn_enc_rval_t ec; + + arg.buffer = buffer; + arg.left = buffer_size; + + ec = type_descriptor->op->der_encoder(type_descriptor, + struct_ptr, /* Pointer to the destination structure */ + 0, 0, encode_to_buffer_cb, &arg); + if(ec.encoded != -1) { + assert(ec.encoded == (ssize_t)(buffer_size - arg.left)); + /* Return the encoded contents size */ + } + return ec; +} + + +/* + * Write out leading TL[v] sequence according to the type definition. + */ +ssize_t +der_write_tags(const asn_TYPE_descriptor_t *sd, size_t struct_length, + int tag_mode, int last_tag_form, + ber_tlv_tag_t tag, /* EXPLICIT or IMPLICIT tag */ + asn_app_consume_bytes_f *cb, void *app_key) { +#define ASN1_DER_MAX_TAGS_COUNT 4 + ber_tlv_tag_t + tags_buf_scratch[ASN1_DER_MAX_TAGS_COUNT * sizeof(ber_tlv_tag_t)]; + ssize_t lens[ASN1_DER_MAX_TAGS_COUNT * sizeof(ssize_t)]; + const ber_tlv_tag_t *tags; /* Copy of tags stream */ + int tags_count; /* Number of tags */ + size_t overall_length; + int i; + + ASN_DEBUG("Writing tags (%s, tm=%d, tc=%d, tag=%s, mtc=%d)", + sd->name, tag_mode, sd->tags_count, + ber_tlv_tag_string(tag), + tag_mode + ?(sd->tags_count+1 + -((tag_mode == -1) && sd->tags_count)) + :sd->tags_count + ); + + if(sd->tags_count + 1 > ASN1_DER_MAX_TAGS_COUNT) { + ASN_DEBUG("System limit %d on tags count", ASN1_DER_MAX_TAGS_COUNT); + return -1; + } + + if(tag_mode) { + /* + * Instead of doing shaman dance like we do in ber_check_tags(), + * allocate a small array on the stack + * and initialize it appropriately. + */ + int stag_offset; + ber_tlv_tag_t *tags_buf = tags_buf_scratch; + tags_count = sd->tags_count + + 1 /* EXPLICIT or IMPLICIT tag is given */ + - ((tag_mode == -1) && sd->tags_count); + /* Copy tags over */ + tags_buf[0] = tag; + stag_offset = -1 + ((tag_mode == -1) && sd->tags_count); + for(i = 1; i < tags_count; i++) + tags_buf[i] = sd->tags[i + stag_offset]; + tags = tags_buf; + } else { + tags = sd->tags; + tags_count = sd->tags_count; + } + + /* No tags to write */ + if(tags_count == 0) + return 0; + + /* + * Array of tags is initialized. + * Now, compute the size of the TLV pairs, from right to left. + */ + overall_length = struct_length; + for(i = tags_count - 1; i >= 0; --i) { + lens[i] = der_write_TL(tags[i], overall_length, 0, 0, 0); + if(lens[i] == -1) return -1; + overall_length += lens[i]; + lens[i] = overall_length - lens[i]; + } + + if(!cb) return overall_length - struct_length; + + ASN_DEBUG("Encoding %s TL sequence (%d elements)", sd->name, + tags_count); + + /* + * Encode the TL sequence for real. + */ + for(i = 0; i < tags_count; i++) { + ssize_t len; + int _constr; + + /* Check if this tag happens to be constructed */ + _constr = (last_tag_form || i < (tags_count - 1)); + + len = der_write_TL(tags[i], lens[i], cb, app_key, _constr); + if(len == -1) return -1; + } + + return overall_length - struct_length; +} + +static ssize_t +der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len, + asn_app_consume_bytes_f *cb, void *app_key, + int constructed) { + uint8_t buf[32]; + size_t size = 0; + int buf_size = cb?sizeof(buf):0; + ssize_t tmp; + + /* Serialize tag (T from TLV) into possibly zero-length buffer */ + tmp = ber_tlv_tag_serialize(tag, buf, buf_size); + if(tmp == -1 || tmp > (ssize_t)sizeof(buf)) return -1; + size += tmp; + + /* Serialize length (L from TLV) into possibly zero-length buffer */ + tmp = der_tlv_length_serialize(len, buf+size, buf_size?buf_size-size:0); + if(tmp == -1) return -1; + size += tmp; + + if(size > sizeof(buf)) + return -1; + + /* + * If callback is specified, invoke it, and check its return value. + */ + if(cb) { + if(constructed) *buf |= 0x20; + if(cb(buf, size, app_key) < 0) + return -1; + } + + return size; +} diff --git a/Bouncer/e2sm_rc/lib/oer_decoder.c b/Bouncer/e2sm_rc/lib/oer_decoder.c new file mode 100644 index 0000000..0701738 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/oer_decoder.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * The OER decoder of any type. + */ +asn_dec_rval_t +oer_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, + const void *ptr, size_t size) { + asn_codec_ctx_t s_codec_ctx; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* + * Invoke type-specific decoder. + */ + return type_descriptor->op->oer_decoder(opt_codec_ctx, type_descriptor, 0, + struct_ptr, /* Pointer to the destination structure */ + ptr, size /* Buffer and its size */ + ); +} + +/* + * Open Type is encoded as a length (#8.6) followed by that number of bytes. + * Since we're just skipping, reading the length would be enough. + */ +ssize_t +oer_open_type_skip(const void *bufptr, size_t size) { + size_t len = 0; + return oer_fetch_length(bufptr, size, &len); +} + +/* + * Read the Open Type (X.696 (08/2015), #30). + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t +oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, + const struct asn_TYPE_descriptor_s *td, + const asn_oer_constraints_t *constraints, void **struct_ptr, + const void *bufptr, size_t size) { + asn_dec_rval_t dr; + size_t container_len = 0; + ssize_t len_len; + enum asn_struct_free_method dispose_method = + (*struct_ptr) ? ASFM_FREE_UNDERLYING_AND_RESET : ASFM_FREE_EVERYTHING; + + /* Get the size of a length determinant */ + len_len = oer_fetch_length(bufptr, size, &container_len); + if(len_len <= 0) { + return len_len; /* Error or more data expected */ + } + + /* + * len_len can't be bigger than size, but size without len_len + * should be bigger or equal to container length + */ + if(size - len_len < container_len) { + /* More data is expected */ + return 0; + } + + dr = td->op->oer_decoder(opt_codec_ctx, td, constraints, struct_ptr, + (const uint8_t *)bufptr + len_len, container_len); + if(dr.code == RC_OK) { + return len_len + container_len; + } else { + /* Even if RC_WMORE, we can't get more data into a closed container. */ + td->op->free_struct(td, *struct_ptr, dispose_method); + *struct_ptr = NULL; + return -1; + } +} + + +asn_dec_rval_t +oer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, void **sptr, + const void *ptr, size_t size) { + ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr; + asn_dec_rval_t rval = {RC_OK, 0}; + size_t expected_length = 0; + ssize_t len_len; + + (void)td; + (void)opt_codec_ctx; + (void)constraints; + + if(!st) { + st = (ASN__PRIMITIVE_TYPE_t *)(*sptr = CALLOC( + 1, sizeof(ASN__PRIMITIVE_TYPE_t))); + if(!st) ASN__DECODE_FAILED; + } + + + /* + * X.696 (08/2015) #27.2 + * Encode length determinant as _number of octets_, but only + * if upper bound is not equal to lower bound. + */ + len_len = oer_fetch_length(ptr, size, &expected_length); + if(len_len > 0) { + rval.consumed = len_len; + ptr = (const char *)ptr + len_len; + size -= len_len; + } else if(len_len == 0) { + ASN__DECODE_STARVED; + } else if(len_len < 0) { + ASN__DECODE_FAILED; + } + + if(size < expected_length) { + ASN__DECODE_STARVED; + } else { + uint8_t *buf = MALLOC(expected_length + 1); + if(buf == NULL) { + ASN__DECODE_FAILED; + } else { + memcpy(buf, ptr, expected_length); + buf[expected_length] = '\0'; + } + FREEMEM(st->buf); + st->buf = buf; + st->size = expected_length; + + rval.consumed += expected_length; + return rval; + } +} diff --git a/Bouncer/e2sm_rc/lib/oer_encoder.c b/Bouncer/e2sm_rc/lib/oer_encoder.c new file mode 100644 index 0000000..a284cc2 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/oer_encoder.c @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * The OER encoder of any type. + */ +asn_enc_rval_t +oer_encode(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, + asn_app_consume_bytes_f *consume_bytes, void *app_key) { + ASN_DEBUG("OER encoder invoked for %s", type_descriptor->name); + + /* + * Invoke type-specific encoder. + */ + return type_descriptor->op->oer_encoder( + type_descriptor, 0, + struct_ptr, /* Pointer to the destination structure */ + consume_bytes, app_key); +} + +/* + * Argument type and callback necessary for oer_encode_to_buffer(). + */ +typedef struct enc_to_buf_arg { + void *buffer; + size_t left; +} enc_to_buf_arg; +static int +encode_to_buffer_cb(const void *buffer, size_t size, void *key) { + enc_to_buf_arg *arg = (enc_to_buf_arg *)key; + + if(arg->left < size) return -1; /* Data exceeds the available buffer size */ + + memcpy(arg->buffer, buffer, size); + arg->buffer = ((char *)arg->buffer) + size; + arg->left -= size; + + return 0; +} + +/* + * A variant of the oer_encode() which encodes the data into the provided buffer + */ +asn_enc_rval_t +oer_encode_to_buffer(const asn_TYPE_descriptor_t *type_descriptor, + const asn_oer_constraints_t *constraints, + const void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ +) { + enc_to_buf_arg arg; + asn_enc_rval_t ec; + + arg.buffer = buffer; + arg.left = buffer_size; + + if(type_descriptor->op->oer_encoder == NULL) { + ec.encoded = -1; + ec.failed_type = type_descriptor; + ec.structure_ptr = struct_ptr; + ASN_DEBUG("OER encoder is not defined for %s", + type_descriptor->name); + } else { + ec = type_descriptor->op->oer_encoder( + type_descriptor, constraints, + struct_ptr, /* Pointer to the destination structure */ + encode_to_buffer_cb, &arg); + if(ec.encoded != -1) { + assert(ec.encoded == (ssize_t)(buffer_size - arg.left)); + /* Return the encoded contents size */ + } + } + return ec; +} + +asn_enc_rval_t +oer_encode_primitive(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr; + asn_enc_rval_t er = {0, 0, 0}; + ssize_t ret; + + (void)constraints; + + if(!st) ASN__ENCODE_FAILED; + + ASN_DEBUG("Encoding %s (%" ASN_PRI_SIZE " bytes)", td ? td->name : "", st->size); + + /* + * X.696 (08/2015) #27.2 + */ + ret = oer_serialize_length(st->size, cb, app_key); + if(ret < 0) { + ASN__ENCODE_FAILED; + } + er.encoded += ret; + + er.encoded += st->size; + if(cb(st->buf, st->size, app_key) < 0) { + ASN__ENCODE_FAILED; + } else { + ASN__ENCODED_OK(er); + } +} + +static int +oer__count_bytes(const void *buffer, size_t size, void *bytes_ptr) { + size_t *bytes = bytes_ptr; + (void)buffer; + *bytes += size; + return 0; +} + +ssize_t +oer_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_oer_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + size_t serialized_byte_count = 0; + asn_enc_rval_t er = {0,0,0}; + ssize_t len_len; + + er = td->op->oer_encoder(td, constraints, sptr, oer__count_bytes, + &serialized_byte_count); + if(er.encoded < 0) return -1; + assert(serialized_byte_count == (size_t)er.encoded); + + len_len = oer_serialize_length(serialized_byte_count, cb, app_key); + if(len_len == -1) return -1; + + er = td->op->oer_encoder(td, constraints, sptr, cb, app_key); + if(er.encoded < 0) return -1; + assert(serialized_byte_count == (size_t)er.encoded); + + return len_len + er.encoded; +} + diff --git a/Bouncer/e2sm_rc/lib/oer_support.c b/Bouncer/e2sm_rc/lib/oer_support.c new file mode 100644 index 0000000..b15a3bc --- /dev/null +++ b/Bouncer/e2sm_rc/lib/oer_support.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +#include + +/* + * Fetch the length determinant (X.696 08/2015, #8.6) into *len_r. + * RETURN VALUES: + * 0: More data expected than bufptr contains. + * -1: Fatal error deciphering length. + * >0: Number of bytes used from bufptr. + */ +ssize_t +oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) { + uint8_t first_byte; + size_t len_len; /* Length of the length determinant */ + const uint8_t *b; + const uint8_t *bend; + size_t len; + + if(size == 0) { + *len_r = 0; + return 0; + } + + first_byte = *(const uint8_t *)bufptr; + if((first_byte & 0x80) == 0) { /* Short form */ + *len_r = first_byte; /* 0..127 */ + return 1; + } + + len_len = (first_byte & 0x7f); + if((1 + len_len) > size) { + *len_r = 0; + return 0; + } + + b = (const uint8_t *)bufptr + 1; + bend = b + len_len; + + for(; b < bend && *b == 0; b++) { + /* Skip the leading 0-bytes */ + } + + if((bend - b) > (ssize_t)sizeof(size_t)) { + /* Length is not representable by the native size_t type */ + *len_r = 0; + return -1; + } + + for(len = 0; b < bend; b++) { + len = (len << 8) + *b; + } + + if(len > RSIZE_MAX) { /* A bit of C11 validation */ + *len_r = 0; + return -1; + } + + *len_r = len; + assert(len_len + 1 == (size_t)(bend - (const uint8_t *)bufptr)); + return len_len + 1; +} + + +/* + * Serialize OER length. Returns the number of bytes serialized + * or -1 if a given callback returned with negative result. + */ +ssize_t +oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, + void *app_key) { + uint8_t scratch[1 + sizeof(length)]; + uint8_t *sp = scratch; + int littleEndian = 1; /* Run-time detection */ + const uint8_t *pstart; + const uint8_t *pend; + const uint8_t *p; + int add; + + if(length <= 127) { + uint8_t b = length; + if(cb(&b, 1, app_key) < 0) { + return -1; + } + return 1; + } + + if(*(char *)&littleEndian) { + pstart = (const uint8_t *)&length + sizeof(length) - 1; + pend = (const uint8_t *)&length; + add = -1; + } else { + pstart = (const uint8_t *)&length; + pend = pstart + sizeof(length); + add = 1; + } + + for(p = pstart; p != pend; p += add) { + /* Skip leading zeros. */ + if(*p) break; + } + + for(sp = scratch + 1; ; p += add) { + *sp++ = *p; + if(p == pend) break; + } + assert((sp - scratch) - 1 <= 0x7f); + scratch[0] = 0x80 + ((sp - scratch) - 1); + + if(cb(scratch, sp - scratch, app_key) < 0) { + return -1; + } + + return sp - scratch; +} + diff --git a/Bouncer/e2sm_rc/lib/per_decoder.c b/Bouncer/e2sm_rc/lib/per_decoder.c new file mode 100644 index 0000000..8a3e39d --- /dev/null +++ b/Bouncer/e2sm_rc/lib/per_decoder.c @@ -0,0 +1,185 @@ +#include +#include +#include + +/* + * Decode a "Production of a complete encoding", X.691#10.1. + * The complete encoding contains at least one byte, and is an integral + * multiple of 8 bytes. + */ +asn_dec_rval_t +uper_decode_complete(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buffer, size_t size) { + asn_dec_rval_t rval; + + rval = uper_decode(opt_codec_ctx, td, sptr, buffer, size, 0, 0); + if(rval.consumed) { + /* + * We've always given 8-aligned data, + * so convert bits to integral bytes. + */ + rval.consumed += 7; + rval.consumed >>= 3; + } else if(rval.code == RC_OK) { + if(size) { + if(((const uint8_t *)buffer)[0] == 0) { + rval.consumed = 1; /* 1 byte */ + } else { + ASN_DEBUG("Expecting single zeroed byte"); + rval.code = RC_FAIL; + } + } else { + /* Must contain at least 8 bits. */ + rval.code = RC_WMORE; + } + } + + return rval; +} + +asn_dec_rval_t +uper_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, + size_t size, int skip_bits, int unused_bits) { + asn_codec_ctx_t s_codec_ctx; + asn_dec_rval_t rval; + asn_per_data_t pd; + + if(skip_bits < 0 || skip_bits > 7 + || unused_bits < 0 || unused_bits > 7 + || (unused_bits > 0 && !size)) + ASN__DECODE_FAILED; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* Fill in the position indicator */ + memset(&pd, 0, sizeof(pd)); + pd.buffer = (const uint8_t *)buffer; + pd.nboff = skip_bits; + pd.nbits = 8 * size - unused_bits; /* 8 is CHAR_BIT from */ + if(pd.nboff > pd.nbits) + ASN__DECODE_FAILED; + + /* + * Invoke type-specific decoder. + */ + if(!td->op->uper_decoder) + ASN__DECODE_FAILED; /* PER is not compiled in */ + rval = td->op->uper_decoder(opt_codec_ctx, td, 0, sptr, &pd); + if(rval.code == RC_OK) { + /* Return the number of consumed bits */ + rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3) + + pd.nboff - skip_bits; + ASN_DEBUG("PER decoding consumed %ld, counted %ld", + (long)rval.consumed, (long)pd.moved); + assert(rval.consumed == pd.moved); + } else { + /* PER codec is not a restartable */ + rval.consumed = 0; + } + return rval; +} + +asn_dec_rval_t +aper_decode_complete(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buffer, size_t size) { + asn_dec_rval_t rval; + + rval = aper_decode(opt_codec_ctx, td, sptr, buffer, size, 0, 0); + if(rval.consumed) { + /* + * We've always given 8-aligned data, + * so convert bits to integral bytes. + */ + rval.consumed += 7; + rval.consumed >>= 3; + } else if(rval.code == RC_OK) { + if(size) { + if(((const uint8_t *)buffer)[0] == 0) { + rval.consumed = 1; /* 1 byte */ + } else { + ASN_DEBUG("Expecting single zeroed byte"); + rval.code = RC_FAIL; + } + } else { + /* Must contain at least 8 bits. */ + rval.code = RC_WMORE; + } + } + + return rval; +} + +asn_dec_rval_t +aper_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, + size_t size, int skip_bits, int unused_bits) { + asn_codec_ctx_t s_codec_ctx; + asn_dec_rval_t rval; + asn_per_data_t pd; + + if(skip_bits < 0 || skip_bits > 7 + || unused_bits < 0 || unused_bits > 7 + || (unused_bits > 0 && !size)) + ASN__DECODE_FAILED; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* Fill in the position indicator */ + memset(&pd, 0, sizeof(pd)); + pd.buffer = (const uint8_t *)buffer; + pd.nboff = skip_bits; + pd.nbits = 8 * size - unused_bits; /* 8 is CHAR_BIT from */ + if(pd.nboff > pd.nbits) + ASN__DECODE_FAILED; + + /* + * Invoke type-specific decoder. + */ + if(!td->op->aper_decoder) + ASN__DECODE_FAILED; /* PER is not compiled in */ + rval = td->op->aper_decoder(opt_codec_ctx, td, 0, sptr, &pd); + if(rval.code == RC_OK) { + /* Return the number of consumed bits */ + rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3) + + pd.nboff - skip_bits; + ASN_DEBUG("PER decoding consumed %zu, counted %zu", + rval.consumed, pd.moved); + assert(rval.consumed == pd.moved); + } else { + /* PER codec is not a restartable */ + rval.consumed = 0; + } + return rval; +} + diff --git a/Bouncer/e2sm_rc/lib/per_encoder.c b/Bouncer/e2sm_rc/lib/per_encoder.c new file mode 100644 index 0000000..a35e1f0 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/per_encoder.c @@ -0,0 +1,265 @@ +#include +#include +#include + +static int _uper_encode_flush_outp(asn_per_outp_t *po); + +static int +ignore_output(const void *data, size_t size, void *app_key) { + (void)data; + (void)size; + (void)app_key; + return 0; +} + +asn_enc_rval_t +uper_encode(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_per_outp_t po; + asn_enc_rval_t er = {0,0,0}; + + /* + * Invoke type-specific encoder. + */ + if(!td || !td->op->uper_encoder) + ASN__ENCODE_FAILED; /* PER is not compiled in */ + + po.buffer = po.tmpspace; + po.nboff = 0; + po.nbits = 8 * sizeof(po.tmpspace); + po.output = cb ? cb : ignore_output; + po.op_key = app_key; + po.flushed_bytes = 0; + + er = td->op->uper_encoder(td, constraints, sptr, &po); + if(er.encoded != -1) { + size_t bits_to_flush; + + bits_to_flush = ((po.buffer - po.tmpspace) << 3) + po.nboff; + + /* Set number of bits encoded to a firm value */ + er.encoded = (po.flushed_bytes << 3) + bits_to_flush; + + if(_uper_encode_flush_outp(&po)) ASN__ENCODE_FAILED; + } + + return er; +} + +/* + * Argument type and callback necessary for uper_encode_to_buffer(). + */ +typedef struct enc_to_buf_arg { + void *buffer; + size_t left; +} enc_to_buf_arg; +static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) { + enc_to_buf_arg *arg = (enc_to_buf_arg *)key; + + if(arg->left < size) + return -1; /* Data exceeds the available buffer size */ + + memcpy(arg->buffer, buffer, size); + arg->buffer = ((char *)arg->buffer) + size; + arg->left -= size; + + return 0; +} + +asn_enc_rval_t +uper_encode_to_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void *buffer, size_t buffer_size) { + enc_to_buf_arg key; + + key.buffer = buffer; + key.left = buffer_size; + + if(td) ASN_DEBUG("Encoding \"%s\" using UNALIGNED PER", td->name); + + return uper_encode(td, constraints, sptr, encode_to_buffer_cb, &key); +} + +typedef struct enc_dyn_arg { + void *buffer; + size_t length; + size_t allocated; +} enc_dyn_arg; +static int +encode_dyn_cb(const void *buffer, size_t size, void *key) { + enc_dyn_arg *arg = key; + if(arg->length + size >= arg->allocated) { + size_t new_size = arg->allocated ? arg->allocated : 8; + void *p; + + do { + new_size <<= 2; + } while(arg->length + size >= new_size); + + p = REALLOC(arg->buffer, new_size); + if(!p) { + FREEMEM(arg->buffer); + memset(arg, 0, sizeof(*arg)); + return -1; + } + arg->buffer = p; + arg->allocated = new_size; + } + memcpy(((char *)arg->buffer) + arg->length, buffer, size); + arg->length += size; + return 0; +} +ssize_t +uper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void **buffer_r) { + asn_enc_rval_t er = {0,0,0}; + enc_dyn_arg key; + + memset(&key, 0, sizeof(key)); + + er = uper_encode(td, constraints, sptr, encode_dyn_cb, &key); + switch(er.encoded) { + case -1: + FREEMEM(key.buffer); + return -1; + case 0: + FREEMEM(key.buffer); + key.buffer = MALLOC(1); + if(key.buffer) { + *(char *)key.buffer = '\0'; + *buffer_r = key.buffer; + return 1; + } else { + return -1; + } + default: + *buffer_r = key.buffer; + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + return ((er.encoded + 7) >> 3); + } +} + +/* + * Internally useful functions. + */ + +/* Flush partially filled buffer */ +static int +_uper_encode_flush_outp(asn_per_outp_t *po) { + uint8_t *buf; + + if(po->nboff == 0 && po->buffer == po->tmpspace) + return 0; + + buf = po->buffer + (po->nboff >> 3); + /* Make sure we account for the last, partially filled */ + if(po->nboff & 0x07) { + buf[0] &= 0xff << (8 - (po->nboff & 0x07)); + buf++; + } + + return po->output(po->tmpspace, buf - po->tmpspace, po->op_key); +} + +asn_enc_rval_t +aper_encode_to_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void *buffer, size_t buffer_size) { + enc_to_buf_arg key; + + key.buffer = buffer; + key.left = buffer_size; + + if(td) ASN_DEBUG("Encoding \"%s\" using ALIGNED PER", td->name); + + return aper_encode(td, constraints, sptr, encode_to_buffer_cb, &key); +} + +ssize_t +aper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, void **buffer_r) { + asn_enc_rval_t er = {0,0,0}; + enc_dyn_arg key; + + memset(&key, 0, sizeof(key)); + + er = aper_encode(td, constraints, sptr, encode_dyn_cb, &key); + switch(er.encoded) { + case -1: + FREEMEM(key.buffer); + return -1; + case 0: + FREEMEM(key.buffer); + key.buffer = MALLOC(1); + if(key.buffer) { + *(char *)key.buffer = '\0'; + *buffer_r = key.buffer; + return 1; + } else { + return -1; + } + default: + *buffer_r = key.buffer; + ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); + return ((er.encoded + 7) >> 3); + } +} + +static int +_aper_encode_flush_outp(asn_per_outp_t *po) { + uint8_t *buf; + + if(po->nboff == 0 && po->buffer == po->tmpspace) + return 0; + + buf = po->buffer + (po->nboff >> 3); + /* Make sure we account for the last, partially filled */ + if(po->nboff & 0x07) { + buf[0] &= 0xff << (8 - (po->nboff & 0x07)); + buf++; + } + + if (po->output) { + return po->output(po->tmpspace, buf - po->tmpspace, po->op_key); + } + return 0; +} + +asn_enc_rval_t +aper_encode(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { + asn_per_outp_t po; + asn_enc_rval_t er = {0,0,0}; + + /* + * Invoke type-specific encoder. + */ + if(!td || !td->op->aper_encoder) + ASN__ENCODE_FAILED; /* PER is not compiled in */ + + po.buffer = po.tmpspace; + po.nboff = 0; + po.nbits = 8 * sizeof(po.tmpspace); + po.output = cb; + po.op_key = app_key; + po.flushed_bytes = 0; + + er = td->op->aper_encoder(td, constraints, sptr, &po); + if(er.encoded != -1) { + size_t bits_to_flush; + + bits_to_flush = ((po.buffer - po.tmpspace) << 3) + po.nboff; + + /* Set number of bits encoded to a firm value */ + er.encoded = (po.flushed_bytes << 3) + bits_to_flush; + + if(_aper_encode_flush_outp(&po)) + ASN__ENCODE_FAILED; + } + + return er; +} diff --git a/Bouncer/e2sm_rc/lib/per_opentype.c b/Bouncer/e2sm_rc/lib/per_opentype.c new file mode 100644 index 0000000..28f3cb6 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/per_opentype.c @@ -0,0 +1,533 @@ +/* + * Copyright (c) 2007 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +typedef struct uper_ugot_key { + asn_per_data_t oldpd; /* Old per data source */ + size_t unclaimed; + size_t ot_moved; /* Number of bits moved by OT processing */ + int repeat; +} uper_ugot_key; + +static int uper_ugot_refill(asn_per_data_t *pd); +static int per_skip_bits(asn_per_data_t *pd, int skip_nbits); +static asn_dec_rval_t uper_sot_suck(const asn_codec_ctx_t *, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd); + +/* + * Encode an "open type field". + * #10.1, #10.2 + */ +int +uper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + void *buf; + void *bptr; + ssize_t size; + + ASN_DEBUG("Open type put %s ...", td->name); + + size = uper_encode_to_new_buffer(td, constraints, sptr, &buf); + if(size <= 0) return -1; + + ASN_DEBUG("Open type put %s of length %" ASN_PRI_SSIZE " + overhead (1byte?)", td->name, + size); + + bptr = buf; + do { + int need_eom = 0; + ssize_t may_save = uper_put_length(po, size, &need_eom); + ASN_DEBUG("Prepending length %" ASN_PRI_SSIZE + " to %s and allowing to save %" ASN_PRI_SSIZE, + size, td->name, may_save); + if(may_save < 0) break; + if(per_put_many_bits(po, bptr, may_save * 8)) break; + bptr = (char *)bptr + may_save; + size -= may_save; + if(need_eom && uper_put_length(po, 0, 0)) { + FREEMEM(buf); + return -1; + } + } while(size); + + FREEMEM(buf); + if(size) return -1; + + return 0; +} + +static asn_dec_rval_t +uper_open_type_get_simple(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rv; + ssize_t chunk_bytes; + int repeat; + uint8_t *buf = 0; + size_t bufLen = 0; + size_t bufSize = 0; + asn_per_data_t spd; + size_t padding; + + ASN__STACK_OVERFLOW_CHECK(ctx); + + ASN_DEBUG("Getting open type %s...", td->name); + + do { + chunk_bytes = uper_get_length(pd, -1, 0, &repeat); + if(chunk_bytes < 0) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + if(bufLen + chunk_bytes > bufSize) { + void *ptr; + bufSize = chunk_bytes + (bufSize << 2); + ptr = REALLOC(buf, bufSize); + if(!ptr) { + FREEMEM(buf); + ASN__DECODE_FAILED; + } + buf = ptr; + } + if(per_get_many_bits(pd, buf + bufLen, 0, chunk_bytes << 3)) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + bufLen += chunk_bytes; + } while(repeat); + + ASN_DEBUG("Getting open type %s encoded in %ld bytes", td->name, + (long)bufLen); + + memset(&spd, 0, sizeof(spd)); + spd.buffer = buf; + spd.nbits = bufLen << 3; + + ASN_DEBUG_INDENT_ADD(+4); + rv = td->op->uper_decoder(ctx, td, constraints, sptr, &spd); + ASN_DEBUG_INDENT_ADD(-4); + + if(rv.code == RC_OK) { + /* Check padding validity */ + padding = spd.nbits - spd.nboff; + if (((padding > 0 && padding < 8) || + /* X.691#10.1.3 */ + (spd.nboff == 0 && spd.nbits == 8 && spd.buffer == buf)) && + per_get_few_bits(&spd, padding) == 0) { + /* Everything is cool */ + FREEMEM(buf); + return rv; + } + FREEMEM(buf); + if(padding >= 8) { + ASN_DEBUG("Too large padding %d in open type", (int)padding); + ASN__DECODE_FAILED; + } else { + ASN_DEBUG("No padding"); + } + } else { + FREEMEM(buf); + /* rv.code could be RC_WMORE, nonsense in this context */ + rv.code = RC_FAIL; /* Noone would give us more */ + } + + return rv; +} + +static asn_dec_rval_t CC_NOTUSED +uper_open_type_get_complex(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + uper_ugot_key arg; + asn_dec_rval_t rv; + ssize_t padding; + + ASN__STACK_OVERFLOW_CHECK(ctx); + + ASN_DEBUG("Getting open type %s from %s", td->name, + asn_bit_data_string(pd)); + arg.oldpd = *pd; + arg.unclaimed = 0; + arg.ot_moved = 0; + arg.repeat = 1; + pd->refill = uper_ugot_refill; + pd->refill_key = &arg; + pd->nbits = pd->nboff; /* 0 good bits at this point, will refill */ + pd->moved = 0; /* This now counts the open type size in bits */ + + ASN_DEBUG_INDENT_ADD(+4); + rv = td->op->uper_decoder(ctx, td, constraints, sptr, pd); + ASN_DEBUG_INDENT_ADD(-4); + +#define UPDRESTOREPD do { \ + /* buffer and nboff are valid, preserve them. */ \ + pd->nbits = arg.oldpd.nbits - (pd->moved - arg.ot_moved); \ + pd->moved = arg.oldpd.moved + (pd->moved - arg.ot_moved); \ + pd->refill = arg.oldpd.refill; \ + pd->refill_key = arg.oldpd.refill_key; \ + } while(0) + + if(rv.code != RC_OK) { + UPDRESTOREPD; + return rv; + } + + ASN_DEBUG("OpenType %s pd%s old%s unclaimed=%d, repeat=%d", td->name, + asn_bit_data_string(pd), + asn_bit_data_string(&arg.oldpd), + (int)arg.unclaimed, (int)arg.repeat); + + padding = pd->moved % 8; + if(padding) { + int32_t pvalue; + if(padding > 7) { + ASN_DEBUG("Too large padding %d in open type", + (int)padding); + rv.code = RC_FAIL; + UPDRESTOREPD; + return rv; + } + padding = 8 - padding; + ASN_DEBUG("Getting padding of %d bits", (int)padding); + pvalue = per_get_few_bits(pd, padding); + switch(pvalue) { + case -1: + ASN_DEBUG("Padding skip failed"); + UPDRESTOREPD; + ASN__DECODE_STARVED; + case 0: break; + default: + ASN_DEBUG("Non-blank padding (%d bits 0x%02x)", + (int)padding, (int)pvalue); + UPDRESTOREPD; + ASN__DECODE_FAILED; + } + } + if(pd->nboff != pd->nbits) { + ASN_DEBUG("Open type %s overhead pd%s old%s", td->name, + asn_bit_data_string(pd), asn_bit_data_string(&arg.oldpd)); + if(1) { + UPDRESTOREPD; + ASN__DECODE_FAILED; + } else { + arg.unclaimed += pd->nbits - pd->nboff; + } + } + + /* Adjust pd back so it points to original data */ + UPDRESTOREPD; + + /* Skip data not consumed by the decoder */ + if(arg.unclaimed) { + ASN_DEBUG("Getting unclaimed %d", (int)arg.unclaimed); + switch(per_skip_bits(pd, arg.unclaimed)) { + case -1: + ASN_DEBUG("Claim of %d failed", (int)arg.unclaimed); + ASN__DECODE_STARVED; + case 0: + ASN_DEBUG("Got claim of %d", (int)arg.unclaimed); + break; + default: + /* Padding must be blank */ + ASN_DEBUG("Non-blank unconsumed padding"); + ASN__DECODE_FAILED; + } + arg.unclaimed = 0; + } + + if(arg.repeat) { + ASN_DEBUG("Not consumed the whole thing"); + rv.code = RC_FAIL; + return rv; + } + + return rv; +} + + +asn_dec_rval_t +uper_open_type_get(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + return uper_open_type_get_simple(ctx, td, constraints, sptr, pd); +} + +int +uper_open_type_skip(const asn_codec_ctx_t *ctx, asn_per_data_t *pd) { + asn_TYPE_descriptor_t s_td; + asn_TYPE_operation_t s_op; + asn_dec_rval_t rv; + + s_td.name = ""; + s_td.op = &s_op; + s_op.uper_decoder = uper_sot_suck; + + rv = uper_open_type_get(ctx, &s_td, 0, 0, pd); + if(rv.code != RC_OK) + return -1; + else + return 0; +} + +/* + * Internal functions. + */ + +static asn_dec_rval_t +uper_sot_suck(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, + asn_per_data_t *pd) { + asn_dec_rval_t rv; + + (void)ctx; + (void)td; + (void)constraints; + (void)sptr; + + while(per_get_few_bits(pd, 1) >= 0); + + rv.code = RC_OK; + rv.consumed = pd->moved; + + return rv; +} + +static int +uper_ugot_refill(asn_per_data_t *pd) { + uper_ugot_key *arg = pd->refill_key; + ssize_t next_chunk_bytes, next_chunk_bits; + ssize_t avail; + + asn_per_data_t *oldpd = &arg->oldpd; + + ASN_DEBUG("REFILLING pd->moved=%ld, oldpd->moved=%ld", + (long)pd->moved, (long)oldpd->moved); + + /* Advance our position to where pd is */ + oldpd->buffer = pd->buffer; + oldpd->nboff = pd->nboff; + oldpd->nbits -= pd->moved - arg->ot_moved; + oldpd->moved += pd->moved - arg->ot_moved; + arg->ot_moved = pd->moved; + + if(arg->unclaimed) { + /* Refill the container */ + if(per_get_few_bits(oldpd, 1)) + return -1; + if(oldpd->nboff == 0) { + assert(0); + return -1; + } + pd->buffer = oldpd->buffer; + pd->nboff = oldpd->nboff - 1; + pd->nbits = oldpd->nbits; + ASN_DEBUG("UNCLAIMED <- return from (pd->moved=%ld)", + (long)pd->moved); + return 0; + } + + if(!arg->repeat) { + ASN_DEBUG("Want more but refill doesn't have it"); + return -1; + } + + next_chunk_bytes = uper_get_length(oldpd, -1, 0, &arg->repeat); + ASN_DEBUG("Open type LENGTH %ld bytes at off %ld, repeat %ld", + (long)next_chunk_bytes, (long)oldpd->moved, (long)arg->repeat); + if(next_chunk_bytes < 0) return -1; + if(next_chunk_bytes == 0) { + pd->refill = 0; /* No more refills, naturally */ + assert(!arg->repeat); /* Implementation guarantee */ + } + next_chunk_bits = next_chunk_bytes << 3; + avail = oldpd->nbits - oldpd->nboff; + if(avail >= next_chunk_bits) { + pd->nbits = oldpd->nboff + next_chunk_bits; + arg->unclaimed = 0; + ASN_DEBUG("!+Parent frame %ld bits, alloting %ld [%ld..%ld] (%ld)", + (long)next_chunk_bits, (long)oldpd->moved, + (long)oldpd->nboff, (long)oldpd->nbits, + (long)(oldpd->nbits - oldpd->nboff)); + } else { + pd->nbits = oldpd->nbits; + arg->unclaimed = next_chunk_bits - avail; + ASN_DEBUG("!-Parent frame %ld, require %ld, will claim %ld", + (long)avail, (long)next_chunk_bits, + (long)arg->unclaimed); + } + pd->buffer = oldpd->buffer; + pd->nboff = oldpd->nboff; + ASN_DEBUG("Refilled pd%s old%s", + asn_bit_data_string(pd), asn_bit_data_string(oldpd)); + return 0; +} + +static int +per_skip_bits(asn_per_data_t *pd, int skip_nbits) { + int hasNonZeroBits = 0; + while(skip_nbits > 0) { + int skip; + + /* per_get_few_bits() is more efficient when nbits <= 24 */ + if(skip_nbits < 24) + skip = skip_nbits; + else + skip = 24; + skip_nbits -= skip; + + switch(per_get_few_bits(pd, skip)) { + case -1: return -1; /* Starving */ + case 0: continue; /* Skipped empty space */ + default: hasNonZeroBits = 1; continue; + } + } + return hasNonZeroBits; +} + +static asn_dec_rval_t +aper_open_type_get_simple(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { + asn_dec_rval_t rv; + ssize_t chunk_bytes; + int repeat; + uint8_t *buf = 0; + size_t bufLen = 0; + size_t bufSize = 0; + asn_per_data_t spd; + size_t padding; + + ASN__STACK_OVERFLOW_CHECK(ctx); + + ASN_DEBUG("Getting open type %s...", td->name); + + do { + chunk_bytes = aper_get_length(pd, -1, -1, &repeat); + if(chunk_bytes < 0) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + if(bufLen + chunk_bytes > bufSize) { + void *ptr; + bufSize = chunk_bytes + (bufSize << 2); + ptr = REALLOC(buf, bufSize); + if(!ptr) { + FREEMEM(buf); + ASN__DECODE_FAILED; + } + buf = ptr; + } + if(per_get_many_bits(pd, buf + bufLen, 0, chunk_bytes << 3)) { + FREEMEM(buf); + ASN__DECODE_STARVED; + } + bufLen += chunk_bytes; + } while(repeat); + + ASN_DEBUG("Getting open type %s encoded in %ld bytes", td->name, + (long)bufLen); + + memset(&spd, 0, sizeof(spd)); + spd.buffer = buf; + spd.nbits = bufLen << 3; + + ASN_DEBUG_INDENT_ADD(+4); + rv = td->op->aper_decoder(ctx, td, constraints, sptr, &spd); + ASN_DEBUG_INDENT_ADD(-4); + + if(rv.code == RC_OK) { + /* Check padding validity */ + padding = spd.nbits - spd.nboff; + if (((padding > 0 && padding < 8) || + /* X.691#10.1.3 */ + (spd.nboff == 0 && spd.nbits == 8 && spd.buffer == buf)) && + per_get_few_bits(&spd, padding) == 0) { + /* Everything is cool */ + FREEMEM(buf); + return rv; + } + FREEMEM(buf); + if(padding >= 8) { + ASN_DEBUG("Too large padding %d in open type", (int)padding); + ASN__DECODE_FAILED; + } else { + ASN_DEBUG("No padding"); + } + } else { + FREEMEM(buf); + /* rv.code could be RC_WMORE, nonsense in this context */ + rv.code = RC_FAIL; /* Noone would give us more */ + } + + return rv; +} + +int +aper_open_type_put(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + void *buf; + void *bptr; + ssize_t size; + size_t toGo; + + ASN_DEBUG("Open type put %s ...", td->name); + + size = aper_encode_to_new_buffer(td, constraints, sptr, &buf); + if(size <= 0) return -1; + + for(bptr = buf, toGo = size; toGo;) { + ssize_t maySave = aper_put_length(po, -1, toGo); + if(maySave < 0) break; + if(per_put_many_bits(po, bptr, maySave * 8)) break; + bptr = (char *)bptr + maySave; + toGo -= maySave; + } + + FREEMEM(buf); + if(toGo) return -1; + + ASN_DEBUG("Open type put %s of length %ld + overhead (1byte?)", + td->name, size); + + return 0; +} + +asn_dec_rval_t +aper_open_type_get(const asn_codec_ctx_t *ctx, + const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + void **sptr, asn_per_data_t *pd) { + + return aper_open_type_get_simple(ctx, td, constraints, sptr, pd); +} + +int +aper_open_type_skip(const asn_codec_ctx_t *ctx, asn_per_data_t *pd) { + asn_TYPE_descriptor_t s_td; + asn_dec_rval_t rv; + asn_TYPE_operation_t op_t; + + memset(&op_t, 0, sizeof(op_t)); + s_td.name = ""; + s_td.op = &op_t; + s_td.op->aper_decoder = uper_sot_suck; + + rv = aper_open_type_get(ctx, &s_td, 0, 0, pd); + if(rv.code != RC_OK) + return -1; + else + return 0; +} + + diff --git a/Bouncer/e2sm_rc/lib/per_support.c b/Bouncer/e2sm_rc/lib/per_support.c new file mode 100644 index 0000000..2c87a76 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/per_support.c @@ -0,0 +1,492 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * X.691-201508 #10.9 General rules for encoding a length determinant. + * Get the optionally constrained length "n" from the stream. + */ +ssize_t +uper_get_length(asn_per_data_t *pd, int ebits, size_t lower_bound, + int *repeat) { + ssize_t value; + + *repeat = 0; + + /* #11.9.4.1 Encoding if constrained (according to effective bits) */ + if(ebits >= 0 && ebits <= 16) { + value = per_get_few_bits(pd, ebits); + if(value >= 0) value += lower_bound; + return value; + } + + value = per_get_few_bits(pd, 8); + if((value & 0x80) == 0) { /* #11.9.3.6 */ + return (value & 0x7F); + } else if((value & 0x40) == 0) { /* #11.9.3.7 */ + /* bit 8 ... set to 1 and bit 7 ... set to zero */ + value = ((value & 0x3f) << 8) | per_get_few_bits(pd, 8); + return value; /* potential -1 from per_get_few_bits passes through. */ + } else if(value < 0) { + ASN_DEBUG("END of stream reached for PER"); + return -1; + } + value &= 0x3f; /* this is "m" from X.691, #11.9.3.8 */ + if(value < 1 || value > 4) { + return -1; /* Prohibited by #11.9.3.8 */ + } + *repeat = 1; + return (16384 * value); +} + +/* + * Get the normally small length "n". + * This procedure used to decode length of extensions bit-maps + * for SET and SEQUENCE types. + */ +ssize_t +uper_get_nslength(asn_per_data_t *pd) { + ssize_t length; + + ASN_DEBUG("Getting normally small length"); + + if(per_get_few_bits(pd, 1) == 0) { + length = per_get_few_bits(pd, 6) + 1; + if(length <= 0) return -1; + ASN_DEBUG("l=%d", (int)length); + return length; + } else { + int repeat; + length = uper_get_length(pd, -1, 0, &repeat); + if(length >= 0 && !repeat) return length; + return -1; /* Error, or do not support >16K extensions */ + } +} + +/* + * Get the normally small non-negative whole number. + * X.691, #10.6 + */ +ssize_t +uper_get_nsnnwn(asn_per_data_t *pd) { + ssize_t value; + + value = per_get_few_bits(pd, 7); + if(value & 64) { /* implicit (value < 0) */ + value &= 63; + value <<= 2; + value |= per_get_few_bits(pd, 2); + if(value & 128) /* implicit (value < 0) */ + return -1; + if(value == 0) + return 0; + if(value >= 3) + return -1; + value = per_get_few_bits(pd, 8 * value); + return value; + } + + return value; +} + +/* + * X.691-11/2008, #11.6 + * Encoding of a normally small non-negative whole number + */ +int +uper_put_nsnnwn(asn_per_outp_t *po, int n) { + int bytes; + + if(n <= 63) { + if(n < 0) return -1; + return per_put_few_bits(po, n, 7); + } + if(n < 256) + bytes = 1; + else if(n < 65536) + bytes = 2; + else if(n < 256 * 65536) + bytes = 3; + else + return -1; /* This is not a "normally small" value */ + if(per_put_few_bits(po, bytes, 8)) + return -1; + + return per_put_few_bits(po, n, 8 * bytes); +} + + +/* X.691-2008/11, #11.5.6 -> #11.3 */ +int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *out_value, int nbits) { + unsigned long lhalf; /* Lower half of the number*/ + long half; + + if(nbits <= 31) { + half = per_get_few_bits(pd, nbits); + if(half < 0) return -1; + *out_value = half; + return 0; + } + + if((size_t)nbits > 8 * sizeof(*out_value)) + return -1; /* RANGE */ + + half = per_get_few_bits(pd, 31); + if(half < 0) return -1; + + if(uper_get_constrained_whole_number(pd, &lhalf, nbits - 31)) + return -1; + + *out_value = ((unsigned long)half << (nbits - 31)) | lhalf; + return 0; +} + + +/* X.691-2008/11, #11.5.6 -> #11.3 */ +int +uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, + int nbits) { + if(nbits <= 31) { + return per_put_few_bits(po, v, nbits); + } else { + /* Put higher portion first, followed by lower 31-bit */ + if(uper_put_constrained_whole_number_u(po, v >> 31, nbits - 31)) + return -1; + return per_put_few_bits(po, v, 31); + } +} + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Put the length "n" (or part of it) into the stream. + */ +ssize_t +uper_put_length(asn_per_outp_t *po, size_t length, int *need_eom) { + int dummy = 0; + if(!need_eom) need_eom = &dummy; + + if(length <= 127) { /* #11.9.3.6 */ + *need_eom = 0; + return per_put_few_bits(po, length, 8) + ? -1 : (ssize_t)length; + } else if(length < 16384) { /* #10.9.3.7 */ + *need_eom = 0; + return per_put_few_bits(po, length|0x8000, 16) + ? -1 : (ssize_t)length; + } + + *need_eom = 0 == (length & 16383); + length >>= 14; + if(length > 4) { + *need_eom = 0; + length = 4; + } + + return per_put_few_bits(po, 0xC0 | length, 8) + ? -1 : (ssize_t)(length << 14); + +} + + +/* + * Put the normally small length "n" into the stream. + * This procedure used to encode length of extensions bit-maps + * for SET and SEQUENCE types. + */ +int +uper_put_nslength(asn_per_outp_t *po, size_t length) { + if(length <= 64) { + /* #11.9.3.4 */ + if(length == 0) return -1; + return per_put_few_bits(po, length - 1, 7) ? -1 : 0; + } else { + int need_eom = 0; + if(uper_put_length(po, length, &need_eom) != (ssize_t)length + || need_eom) { + /* This might happen in case of >16K extensions */ + return -1; + } + } + + return 0; +} + +static int +per__long_range(long lb, long ub, unsigned long *range_r) { + unsigned long bounds_range; + if((ub < 0) == (lb < 0)) { + bounds_range = ub - lb; + } else if(lb < 0) { + assert(ub >= 0); + bounds_range = 1 + ((unsigned long)ub + (unsigned long)-(lb + 1)); + } else { + assert(!"Unreachable"); + return -1; + } + *range_r = bounds_range; + return 0; +} + +int +per_long_range_rebase(long v, long lb, long ub, unsigned long *output) { + unsigned long range; + + assert(lb <= ub); + + if(v < lb || v > ub || per__long_range(lb, ub, &range) < 0) { + /* Range error. */ + return -1; + } + + /* + * Fundamentally what we're doing is returning (v-lb). + * However, this triggers undefined behavior when the word width + * of signed (v) is the same as the size of unsigned (*output). + * In practice, it triggers the UndefinedSanitizer. Therefore we shall + * compute the ranges accurately to avoid C's undefined behavior. + */ + if((v < 0) == (lb < 0)) { + *output = v-lb; + return 0; + } else if(v < 0) { + unsigned long rebased = 1 + (unsigned long)-(v+1) + (unsigned long)lb; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else if(lb < 0) { + unsigned long rebased = 1 + (unsigned long)-(lb+1) + (unsigned long)v; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else { + assert(!"Unreachable"); + return -1; + } +} + +int +per_long_range_unrebase(unsigned long inp, long lb, long ub, long *outp) { + unsigned long range; + + if(per__long_range(lb, ub, &range) != 0) { + return -1; + } + + if(inp > range) { + /* + * We can encode something in the given number of bits that technically + * exceeds the range. This is an avenue for security errors, + * so we don't allow that. + */ + return -1; + } + + if(inp <= LONG_MAX) { + *outp = (long)inp + lb; + } else { + *outp = (lb + LONG_MAX + 1) + (long)((inp - LONG_MAX) - 1); + } + + return 0; +} + +int32_t +aper_get_align(asn_per_data_t *pd) { + + if(pd->nboff & 0x7) { + ASN_DEBUG("Aligning %ld bits", 8 - ((unsigned long)pd->nboff & 0x7)); + return per_get_few_bits(pd, 8 - (pd->nboff & 0x7)); + } + return 0; +} + +ssize_t +aper_get_length(asn_per_data_t *pd, int range, int ebits, int *repeat) { + ssize_t value; + + *repeat = 0; + + // First check effective_bits parameter. + if (ebits >= 0) { + if (range <= 65536 && range >= 0) + return aper_get_nsnnwn(pd, range); + } + + if (aper_get_align(pd) < 0) + return -1; + + if(ebits >= 0) return per_get_few_bits(pd, ebits); + + value = per_get_few_bits(pd, 8); + if(value < 0) return -1; + if((value & 128) == 0) /* #10.9.3.6 */ + return (value & 0x7F); + if((value & 64) == 0) { /* #10.9.3.7 */ + value = ((value & 63) << 8) | per_get_few_bits(pd, 8); + if(value < 0) return -1; + return value; + } + value &= 63; /* this is "m" from X.691, #10.9.3.8 */ + if(value < 1 || value > 4) + return -1; + *repeat = 1; + return (16384 * value); +} + +ssize_t +aper_get_nslength(asn_per_data_t *pd) { + ssize_t length; + + ASN_DEBUG("Getting normally small length"); + + if(per_get_few_bits(pd, 1) == 0) { + length = per_get_few_bits(pd, 6) + 1; + if(length <= 0) return -1; + ASN_DEBUG("l=%ld", length); + return length; + } else { + int repeat; + length = aper_get_length(pd, -1, -1, &repeat); + if(length >= 0 && !repeat) return length; + return -1; /* Error, or do not support >16K extensions */ + } +} + +ssize_t +aper_get_nsnnwn(asn_per_data_t *pd, int range) { + ssize_t value; + int bytes = 0; + + ASN_DEBUG("getting nsnnwn with range %d", range); + + if(range <= 255) { + int i; + + if (range < 0) return -1; + /* 1 -> 8 bits */ + for (i = 1; i <= 8; i++) { + int upper = 1 << i; + if (upper >= range) + break; + } + value = per_get_few_bits(pd, i); + return value; + } else if (range == 256){ + /* 1 byte */ + bytes = 1; + } else if (range <= 65536) { + /* 2 bytes */ + bytes = 2; + } else { + return -1; + } + if (aper_get_align(pd) < 0) + return -1; + value = per_get_few_bits(pd, 8 * bytes); + return value; +} + +int aper_put_align(asn_per_outp_t *po) { + + if(po->nboff & 0x7) { + ASN_DEBUG("Aligning %ld bits", 8 - ((unsigned long)po->nboff & 0x7)); + if(per_put_few_bits(po, 0x00, (8 - (po->nboff & 0x7)))) + return -1; + } + return 0; +} + +ssize_t +aper_put_length(asn_per_outp_t *po, int range, size_t length) { + + ASN_DEBUG("APER put length %zu with range %d", length, range); + + /* 10.9 X.691 Note 2 */ + if (range <= 65536 && range >= 0) + return aper_put_nsnnwn(po, range, length); + + if (aper_put_align(po) < 0) + return -1; + + if(length <= 127) /* #10.9.3.6 */{ + return per_put_few_bits(po, length, 8) + ? -1 : (ssize_t)length; + } + else if(length < 16384) /* #10.9.3.7 */ + return per_put_few_bits(po, length|0x8000, 16) + ? -1 : (ssize_t)length; + + length >>= 14; + if(length > 4) length = 4; + + return per_put_few_bits(po, 0xC0 | length, 8) + ? -1 : (ssize_t)(length << 14); +} + + +int +aper_put_nslength(asn_per_outp_t *po, size_t length) { + + if(length <= 64) { + /* #10.9.3.4 */ + if(length == 0) return -1; + return per_put_few_bits(po, length-1, 7) ? -1 : 0; + } else { + if(aper_put_length(po, -1, length) != (ssize_t)length) { + /* This might happen in case of >16K extensions */ + return -1; + } + } + + return 0; +} + +int +aper_put_nsnnwn(asn_per_outp_t *po, int range, int number) { + int bytes; + + ASN_DEBUG("aper put nsnnwn %d with range %d", number, range); + /* 10.5.7.1 X.691 */ + if(range < 0) { + int i; + for (i = 1; ; i++) { + int bits = 1 << (8 * i); + if (number <= bits) + break; + } + bytes = i; + assert(i <= 4); + } + if(range <= 255) { + int i; + for (i = 1; i <= 8; i++) { + int bits = 1 << i; + if (range <= bits) + break; + } + return per_put_few_bits(po, number, i); + } else if(range == 256) { + bytes = 1; + } else if(range <= 65536) { + bytes = 2; + } else { /* Ranges > 64K */ + int i; + for (i = 1; ; i++) { + int bits = 1 << (8 * i); + if (range <= bits) + break; + } + assert(i <= 4); + bytes = i; + } + if(aper_put_align(po) < 0) /* Aligning on octet */ + return -1; +/* if(per_put_few_bits(po, bytes, 8)) + return -1; +*/ + return per_put_few_bits(po, number, 8 * bytes); +} diff --git a/Bouncer/e2sm_rc/lib/xer_decoder.c b/Bouncer/e2sm_rc/lib/xer_decoder.c new file mode 100644 index 0000000..5b87703 --- /dev/null +++ b/Bouncer/e2sm_rc/lib/xer_decoder.c @@ -0,0 +1,369 @@ +/* + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* XER/XML parsing support */ + + +/* + * Decode the XER encoding of a given type. + */ +asn_dec_rval_t +xer_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **struct_ptr, + const void *buffer, size_t size) { + asn_codec_ctx_t s_codec_ctx; + + /* + * Stack checker requires that the codec context + * must be allocated on the stack. + */ + if(opt_codec_ctx) { + if(opt_codec_ctx->max_stack_size) { + s_codec_ctx = *opt_codec_ctx; + opt_codec_ctx = &s_codec_ctx; + } + } else { + /* If context is not given, be security-conscious anyway */ + memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); + s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; + opt_codec_ctx = &s_codec_ctx; + } + + /* + * Invoke type-specific decoder. + */ + return td->op->xer_decoder(opt_codec_ctx, td, struct_ptr, 0, buffer, size); +} + + + +struct xer__cb_arg { + pxml_chunk_type_e chunk_type; + size_t chunk_size; + const void *chunk_buf; + int callback_not_invoked; +}; + +static int +xer__token_cb(pxml_chunk_type_e type, const void *_chunk_data, size_t _chunk_size, void *key) { + struct xer__cb_arg *arg = (struct xer__cb_arg *)key; + arg->chunk_type = type; + arg->chunk_size = _chunk_size; + arg->chunk_buf = _chunk_data; + arg->callback_not_invoked = 0; + return -1; /* Terminate the XML parsing */ +} + +/* + * Fetch the next token from the XER/XML stream. + */ +ssize_t +xer_next_token(int *stateContext, const void *buffer, size_t size, pxer_chunk_type_e *ch_type) { + struct xer__cb_arg arg; + int new_stateContext = *stateContext; + ssize_t ret; + + arg.callback_not_invoked = 1; + ret = pxml_parse(&new_stateContext, buffer, size, xer__token_cb, &arg); + if(ret < 0) return -1; + if(arg.callback_not_invoked) { + assert(ret == 0); /* No data was consumed */ + *ch_type = PXER_WMORE; + return 0; /* Try again with more data */ + } else { + assert(arg.chunk_size); + assert(arg.chunk_buf == buffer); + } + + /* + * Translate the XML chunk types into more convenient ones. + */ + switch(arg.chunk_type) { + case PXML_TEXT: + *ch_type = PXER_TEXT; + break; + case PXML_TAG: + *ch_type = PXER_WMORE; + return 0; /* Want more */ + case PXML_TAG_END: + *ch_type = PXER_TAG; + break; + case PXML_COMMENT: + case PXML_COMMENT_END: + *ch_type = PXER_COMMENT; + break; + } + + *stateContext = new_stateContext; + return arg.chunk_size; +} + +#define CSLASH 0x2f /* '/' */ +#define LANGLE 0x3c /* '<' */ +#define RANGLE 0x3e /* '>' */ + +xer_check_tag_e +xer_check_tag(const void *buf_ptr, int size, const char *need_tag) { + const char *buf = (const char *)buf_ptr; + const char *end; + xer_check_tag_e ct = XCT_OPENING; + + if(size < 2 || buf[0] != LANGLE || buf[size-1] != RANGLE) { + if(size >= 2) + ASN_DEBUG("Broken XML tag: \"%c...%c\"", + buf[0], buf[size - 1]); + return XCT_BROKEN; + } + + /* + * Determine the tag class. + */ + if(buf[1] == CSLASH) { + buf += 2; /* advance past "" */ + ct = XCT_CLOSING; + if(size > 0 && buf[size-1] == CSLASH) + return XCT_BROKEN; /* */ + } else { + buf++; /* advance past "<" */ + size -= 2; /* strip "<" and ">" */ + if(size > 0 && buf[size-1] == CSLASH) { + ct = XCT_BOTH; + size--; /* One more, for "/" */ + } + } + + /* Sometimes we don't care about the tag */ + if(!need_tag || !*need_tag) + return (xer_check_tag_e)(XCT__UNK__MASK | ct); + + /* + * Determine the tag name. + */ + for(end = buf + size; buf < end; buf++, need_tag++) { + int b = *buf, n = *need_tag; + if(b != n) { + if(n == 0) { + switch(b) { + case 0x09: case 0x0a: case 0x0c: case 0x0d: + case 0x20: + /* "": whitespace is normal */ + return ct; + } + } + return (xer_check_tag_e)(XCT__UNK__MASK | ct); + } + if(b == 0) + return XCT_BROKEN; /* Embedded 0 in buf?! */ + } + if(*need_tag) + return (xer_check_tag_e)(XCT__UNK__MASK | ct); + + return ct; +} + + +#undef ADVANCE +#define ADVANCE(num_bytes) do { \ + size_t num = (num_bytes); \ + buf_ptr = ((const char *)buf_ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + +#undef RETURN +#define RETURN(_code) do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + if(rval.code != RC_OK) \ + ASN_DEBUG("Failed with %d", rval.code); \ + return rval; \ + } while(0) + +#define XER_GOT_BODY(chunk_buf, chunk_size, size) do { \ + ssize_t converted_size = body_receiver \ + (struct_key, chunk_buf, chunk_size, \ + (size_t)chunk_size < size); \ + if(converted_size == -1) RETURN(RC_FAIL); \ + if(converted_size == 0 \ + && size == (size_t)chunk_size) \ + RETURN(RC_WMORE); \ + chunk_size = converted_size; \ + } while(0) +#define XER_GOT_EMPTY() do { \ + if(body_receiver(struct_key, 0, 0, size > 0) == -1) \ + RETURN(RC_FAIL); \ + } while(0) + +/* + * Generalized function for decoding the primitive values. + */ +asn_dec_rval_t +xer_decode_general(const asn_codec_ctx_t *opt_codec_ctx, + asn_struct_ctx_t *ctx, /* Type decoder context */ + void *struct_key, + const char *xml_tag, /* Expected XML tag */ + const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder) + (void *struct_key, const void *chunk_buf, size_t chunk_size), + ssize_t (*body_receiver) + (void *struct_key, const void *chunk_buf, size_t chunk_size, + int have_more) + ) { + + asn_dec_rval_t rval; + ssize_t consumed_myself = 0; + + (void)opt_codec_ctx; + + /* + * Phases of XER/XML processing: + * Phase 0: Check that the opening tag matches our expectations. + * Phase 1: Processing body and reacting on closing tag. + */ + if(ctx->phase > 1) RETURN(RC_FAIL); + for(;;) { + pxer_chunk_type_e ch_type; /* XER chunk type */ + ssize_t ch_size; /* Chunk size */ + xer_check_tag_e tcv; /* Tag check value */ + + /* + * Get the next part of the XML stream. + */ + ch_size = xer_next_token(&ctx->context, buf_ptr, size, + &ch_type); + if(ch_size == -1) { + RETURN(RC_FAIL); + } else { + switch(ch_type) { + case PXER_WMORE: + RETURN(RC_WMORE); + case PXER_COMMENT: /* Got XML comment */ + ADVANCE(ch_size); /* Skip silently */ + continue; + case PXER_TEXT: + if(ctx->phase == 0) { + /* + * We have to ignore whitespace here, + * but in order to be forward compatible + * with EXTENDED-XER (EMBED-VALUES, #25) + * any text is just ignored here. + */ + } else { + XER_GOT_BODY(buf_ptr, ch_size, size); + } + ADVANCE(ch_size); + continue; + case PXER_TAG: + break; /* Check the rest down there */ + } + } + + assert(ch_type == PXER_TAG && size); + + tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); + /* + * Phase 0: + * Expecting the opening tag + * for the type being processed. + * Phase 1: + * Waiting for the closing XML tag. + */ + switch(tcv) { + case XCT_BOTH: + if(ctx->phase) break; + /* Finished decoding of an empty element */ + XER_GOT_EMPTY(); + ADVANCE(ch_size); + ctx->phase = 2; /* Phase out */ + RETURN(RC_OK); + case XCT_OPENING: + if(ctx->phase) break; + ADVANCE(ch_size); + ctx->phase = 1; /* Processing body phase */ + continue; + case XCT_CLOSING: + if(!ctx->phase) break; + ADVANCE(ch_size); + ctx->phase = 2; /* Phase out */ + RETURN(RC_OK); + case XCT_UNKNOWN_BO: + /* + * Certain tags in the body may be expected. + */ + if(opt_unexpected_tag_decoder + && opt_unexpected_tag_decoder(struct_key, + buf_ptr, ch_size) >= 0) { + /* Tag's processed fine */ + ADVANCE(ch_size); + if(!ctx->phase) { + /* We are not expecting + * the closing tag anymore. */ + ctx->phase = 2; /* Phase out */ + RETURN(RC_OK); + } + continue; + } + /* Fall through */ + default: + break; /* Unexpected tag */ + } + + ASN_DEBUG("Unexpected XML tag (expected \"%s\")", xml_tag); + break; /* Dark and mysterious things have just happened */ + } + + RETURN(RC_FAIL); +} + + +size_t +xer_whitespace_span(const void *chunk_buf, size_t chunk_size) { + const char *p = (const char *)chunk_buf; + const char *pend = p + chunk_size; + + for(; p < pend; p++) { + switch(*p) { + /* X.693, #8.1.4 + * HORISONTAL TAB (9) + * LINE FEED (10) + * CARRIAGE RETURN (13) + * SPACE (32) + */ + case 0x09: case 0x0a: case 0x0d: case 0x20: + continue; + default: + break; + } + break; + } + return (p - (const char *)chunk_buf); +} + +/* + * This is a vastly simplified, non-validating XML tree skipper. + */ +int +xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth) { + assert(*depth > 0); + switch(tcv) { + case XCT_BOTH: + case XCT_UNKNOWN_BO: + /* These negate each other. */ + return 0; + case XCT_OPENING: + case XCT_UNKNOWN_OP: + ++(*depth); + return 0; + case XCT_CLOSING: + case XCT_UNKNOWN_CL: + if(--(*depth) == 0) + return (tcv == XCT_CLOSING) ? 2 : 1; + return 0; + default: + return -1; + } +} diff --git a/Bouncer/e2sm_rc/lib/xer_encoder.c b/Bouncer/e2sm_rc/lib/xer_encoder.c new file mode 100644 index 0000000..4177ede --- /dev/null +++ b/Bouncer/e2sm_rc/lib/xer_encoder.c @@ -0,0 +1,237 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * The XER encoder of any type. May be invoked by the application. + */ +asn_enc_rval_t +xer_encode(const asn_TYPE_descriptor_t *td, const void *sptr, + enum xer_encoder_flags_e xer_flags, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + asn_enc_rval_t tmper; + const char *mname; + size_t mlen; + int xcan = (xer_flags & XER_F_CANONICAL) ? 1 : 2; + + if(!td || !sptr) goto cb_failed; + + mname = td->xml_tag; + mlen = strlen(mname); + + ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); + + tmper = td->op->xer_encoder(td, sptr, 1, xer_flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK3("\n", xcan); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +/* + * This is a helper function for xer_fprint, which directs all incoming data + * into the provided file descriptor. + */ +static int +xer__print2fp(const void *buffer, size_t size, void *app_key) { + FILE *stream = (FILE *)app_key; + + if(fwrite(buffer, 1, size, stream) != size) + return -1; + + return 0; +} + +int +xer_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, const void *sptr) { + asn_enc_rval_t er = {0,0,0}; + + if(!stream) stream = stdout; + if(!td || !sptr) + return -1; + + er = xer_encode(td, sptr, XER_F_BASIC, xer__print2fp, stream); + if(er.encoded == -1) + return -1; + + return fflush(stream); +} + +struct xer_buffer { + char *buffer; + size_t buffer_size; + size_t allocated_size; +}; + +static int +xer__buffer_append(const void *buffer, size_t size, void *app_key) { + struct xer_buffer *xb = app_key; + + while(xb->buffer_size + size + 1 > xb->allocated_size) { + size_t new_size = 2 * (xb->allocated_size ? xb->allocated_size : 64); + char *new_buf = MALLOC(new_size); + if(!new_buf) return -1; + if (xb->buffer) { + memcpy(new_buf, xb->buffer, xb->buffer_size); + } + FREEMEM(xb->buffer); + xb->buffer = new_buf; + xb->allocated_size = new_size; + } + + memcpy(xb->buffer + xb->buffer_size, buffer, size); + xb->buffer_size += size; + xb->buffer[xb->buffer_size] = '\0'; + return 0; +} + +enum xer_equivalence_e +xer_equivalent(const struct asn_TYPE_descriptor_s *td, const void *struct1, + const void *struct2, FILE *opt_debug_stream) { + struct xer_buffer xb1 = {0, 0, 0}; + struct xer_buffer xb2 = {0, 0, 0}; + asn_enc_rval_t e1, e2; + asn_dec_rval_t rval; + void *sptr = NULL; + + if(!td || !struct1 || !struct2) { + if(opt_debug_stream) { + if(!td) fprintf(opt_debug_stream, "Type descriptor missing\n"); + if(!struct1) fprintf(opt_debug_stream, "Structure 1 missing\n"); + if(!struct2) fprintf(opt_debug_stream, "Structure 2 missing\n"); + } + return XEQ_FAILURE; + } + + e1 = xer_encode(td, struct1, XER_F_BASIC, xer__buffer_append, &xb1); + if(e1.encoded == -1) { + if(opt_debug_stream) { + fprintf(stderr, "XER Encoding of %s failed\n", td->name); + } + FREEMEM(xb1.buffer); + return XEQ_ENCODE1_FAILED; + } + + e2 = xer_encode(td, struct2, XER_F_BASIC, xer__buffer_append, &xb2); + if(e2.encoded == -1) { + if(opt_debug_stream) { + fprintf(stderr, "XER Encoding of %s failed\n", td->name); + } + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ENCODE1_FAILED; + } + + if(xb1.buffer_size != xb2.buffer_size + || memcmp(xb1.buffer, xb2.buffer, xb1.buffer_size) != 0) { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Structures XER-encoded into different byte streams:\n=== " + "Structure 1 ===\n%s\n=== Structure 2 ===\n%s\n", + xb1.buffer, xb2.buffer); + } + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_DIFFERENT; + } else { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Both structures encoded into the same XER byte stream " + "of size %" ASN_PRI_SIZE ":\n%s", + xb1.buffer_size, xb1.buffer); + } + } + + rval = xer_decode(NULL, td, (void **)&sptr, xb1.buffer, + xb1.buffer_size); + switch(rval.code) { + case RC_OK: + break; + case RC_WMORE: + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Structure %s XER decode unexpectedly requires " + "more data:\n%s\n", + td->name, xb1.buffer); + } + /* Fall through */ + case RC_FAIL: + default: + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Structure %s XER decoding resulted in failure.\n", + td->name); + } + ASN_STRUCT_FREE(*td, sptr); + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_DECODE_FAILED; + } + + if(rval.consumed != xb1.buffer_size + && ((rval.consumed > xb1.buffer_size) + || xer_whitespace_span(xb1.buffer + rval.consumed, + xb1.buffer_size - rval.consumed) + != (xb1.buffer_size - rval.consumed))) { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "Round-trip decode of %s required less bytes (%" ASN_PRI_SIZE ") than " + "encoded (%" ASN_PRI_SIZE ")\n", + td->name, rval.consumed, xb1.buffer_size); + } + ASN_STRUCT_FREE(*td, sptr); + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ROUND_TRIP_FAILED; + } + + /* + * Reuse xb2 to encode newly decoded structure. + */ + FREEMEM(xb2.buffer); + memset(&xb2, 0, sizeof(xb2)); + + e2 = xer_encode(td, sptr, XER_F_BASIC, xer__buffer_append, &xb2); + if(e2.encoded == -1) { + if(opt_debug_stream) { + fprintf(stderr, "XER Encoding of round-trip decode of %s failed\n", + td->name); + } + ASN_STRUCT_FREE(*td, sptr); + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ROUND_TRIP_FAILED; + } + + ASN_STRUCT_FREE(*td, sptr); + sptr = 0; + + if(xb1.buffer_size != xb2.buffer_size + || memcmp(xb1.buffer, xb2.buffer, xb1.buffer_size) != 0) { + if(opt_debug_stream) { + fprintf(opt_debug_stream, + "XER Encoding of round-trip decode of %s resulted in " + "different byte stream:\n" + "=== Original ===\n%s\n" + "=== Round-tripped ===\n%s\n", + xb1.buffer, xb2.buffer, td->name); + } + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_ROUND_TRIP_FAILED; + } + + FREEMEM(xb1.buffer); + FREEMEM(xb2.buffer); + return XEQ_SUCCESS; +} + diff --git a/Bouncer/e2sm_rc/lib/xer_support.c b/Bouncer/e2sm_rc/lib/xer_support.c new file mode 100644 index 0000000..36b4bfb --- /dev/null +++ b/Bouncer/e2sm_rc/lib/xer_support.c @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2003, 2004 X/IO Labs, xiolabs.com. + * Copyright (c) 2003, 2004, 2005 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* Parser states */ +typedef enum { + ST_TEXT, + ST_TAG_START, + ST_TAG_BODY, + ST_TAG_QUOTE_WAIT, + ST_TAG_QUOTED_STRING, + ST_TAG_UNQUOTED_STRING, + ST_COMMENT_WAIT_DASH1, /* ""[0] */ + ST_COMMENT_CLO_RT /* "-->"[1] */ +} pstate_e; + +static const int +_charclass[256] = { + 0,0,0,0,0,0,0,0, 0,1,1,0,1,1,0,0, + 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, + 1,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, + 2,2,2,2,2,2,2,2, 2,2,0,0,0,0,0,0, /* 01234567 89 */ + 0,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, /* ABCDEFG HIJKLMNO */ + 3,3,3,3,3,3,3,3, 3,3,3,0,0,0,0,0, /* PQRSTUVW XYZ */ + 0,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, /* abcdefg hijklmno */ + 3,3,3,3,3,3,3,3, 3,3,3,0,0,0,0,0 /* pqrstuvw xyz */ +}; +#define WHITESPACE(c) (_charclass[(unsigned char)(c)] == 1) +#define ALNUM(c) (_charclass[(unsigned char)(c)] >= 2) +#define ALPHA(c) (_charclass[(unsigned char)(c)] == 3) + +/* Aliases for characters, ASCII/UTF-8 */ +#define EXCLAM 0x21 /* '!' */ +#define CQUOTE 0x22 /* '"' */ +#define CDASH 0x2d /* '-' */ +#define CSLASH 0x2f /* '/' */ +#define LANGLE 0x3c /* '<' */ +#define CEQUAL 0x3d /* '=' */ +#define RANGLE 0x3e /* '>' */ +#define CQUEST 0x3f /* '?' */ + +/* Invoke token callback */ +#define TOKEN_CB_CALL(type, _ns, _current_too, _final) do { \ + int _ret; \ + pstate_e ns = _ns; \ + ssize_t _sz = (p - chunk_start) + _current_too; \ + if (!_sz) { \ + /* Shortcut */ \ + state = _ns; \ + break; \ + } \ + _ret = cb(type, chunk_start, _sz, key); \ + if(_ret < _sz) { \ + if(_current_too && _ret == -1) \ + state = ns; \ + goto finish; \ + } \ + chunk_start = p + _current_too; \ + state = ns; \ + } while(0) + +#define TOKEN_CB(_type, _ns, _current_too) \ + TOKEN_CB_CALL(_type, _ns, _current_too, 0) + +#define PXML_TAG_FINAL_CHUNK_TYPE PXML_TAG_END +#define PXML_COMMENT_FINAL_CHUNK_TYPE PXML_COMMENT_END + +#define TOKEN_CB_FINAL(_type, _ns, _current_too) \ + TOKEN_CB_CALL( _type ## _FINAL_CHUNK_TYPE , _ns, _current_too, 1) + +/* + * Parser itself + */ +ssize_t pxml_parse(int *stateContext, const void *xmlbuf, size_t size, pxml_callback_f *cb, void *key) { + pstate_e state = (pstate_e)*stateContext; + const char *chunk_start = (const char *)xmlbuf; + const char *p = chunk_start; + const char *end = p + size; + + for(; p < end; p++) { + int C = *(const unsigned char *)p; + switch(state) { + case ST_TEXT: + /* + * Initial state: we're in the middle of some text, + * or just have started. + */ + if (C == LANGLE) + /* We're now in the tag, probably */ + TOKEN_CB(PXML_TEXT, ST_TAG_START, 0); + break; + case ST_TAG_START: + if (ALPHA(C) || (C == CSLASH)) + state = ST_TAG_BODY; + else if (C == EXCLAM) + state = ST_COMMENT_WAIT_DASH1; + else + /* + * Not characters and not whitespace. + * Must be something like "3 < 4". + */ + TOKEN_CB(PXML_TEXT, ST_TEXT, 1);/* Flush as data */ + break; + case ST_TAG_BODY: + switch(C) { + case RANGLE: + /* End of the tag */ + TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); + break; + case LANGLE: + /* + * The previous tag wasn't completed, but still + * recognized as valid. (Mozilla-compatible) + */ + TOKEN_CB_FINAL(PXML_TAG, ST_TAG_START, 0); + break; + case CEQUAL: + state = ST_TAG_QUOTE_WAIT; + break; + } + break; + case ST_TAG_QUOTE_WAIT: + /* + * State after the equal sign ("=") in the tag. + */ + switch(C) { + case CQUOTE: + state = ST_TAG_QUOTED_STRING; + break; + case RANGLE: + /* End of the tag */ + TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); + break; + default: + if(!WHITESPACE(C)) + /* Unquoted string value */ + state = ST_TAG_UNQUOTED_STRING; + } + break; + case ST_TAG_QUOTED_STRING: + /* + * Tag attribute's string value in quotes. + */ + if(C == CQUOTE) { + /* Return back to the tag state */ + state = ST_TAG_BODY; + } + break; + case ST_TAG_UNQUOTED_STRING: + if(C == RANGLE) { + /* End of the tag */ + TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); + } else if(WHITESPACE(C)) { + /* Return back to the tag state */ + state = ST_TAG_BODY; + } + break; + case ST_COMMENT_WAIT_DASH1: + if(C == CDASH) { + state = ST_COMMENT_WAIT_DASH2; + } else { + /* Some ordinary tag. */ + state = ST_TAG_BODY; + } + break; + case ST_COMMENT_WAIT_DASH2: + if(C == CDASH) { + /* Seen "<--" */ + state = ST_COMMENT; + } else { + /* Some ordinary tag */ + state = ST_TAG_BODY; + } + break; + case ST_COMMENT: + if(C == CDASH) { + state = ST_COMMENT_CLO_DASH2; + } + break; + case ST_COMMENT_CLO_DASH2: + if(C == CDASH) { + state = ST_COMMENT_CLO_RT; + } else { + /* This is not an end of a comment */ + state = ST_COMMENT; + } + break; + case ST_COMMENT_CLO_RT: + if(C == RANGLE) { + TOKEN_CB_FINAL(PXML_COMMENT, ST_TEXT, 1); + } else if(C == CDASH) { + /* Maintain current state, still waiting for '>' */ + } else { + state = ST_COMMENT; + } + break; + } /* switch(*ptr) */ + } /* for() */ + + /* + * Flush the partially processed chunk, state permitting. + */ + if(p - chunk_start) { + switch (state) { + case ST_COMMENT: + TOKEN_CB(PXML_COMMENT, state, 0); + break; + case ST_TEXT: + TOKEN_CB(PXML_TEXT, state, 0); + break; + default: break; /* a no-op */ + } + } + +finish: + *stateContext = (int)state; + return chunk_start - (const char *)xmlbuf; +} + diff --git a/Bouncer/e2sm_rc/wrapper.c b/Bouncer/e2sm_rc/wrapper.c new file mode 100755 index 0000000..b28e1b1 --- /dev/null +++ b/Bouncer/e2sm_rc/wrapper.c @@ -0,0 +1,617 @@ +#include +#include "wrapper.h" +#include "OCTET_STRING.h" + +ssize_t e2sm_encode_ric_control_header(void *buffer, size_t buf_size,struct uEID *inUEID,long f1AP[],size_t f1AP_len,long e1AP[],size_t e1Ap_len,long ricControlStyleType, long ricControlActionID, void* plmnId, size_t plmnIdSize) +{ + fprintf(stderr,"e2SM wrapper function Entered\n"); + fprintf(stderr,"plmn Size = %ld and aMFRegionID Size = %ld and aMFSetID_size = %ld and aMFPointer_size = %ld \n", inUEID->pLMNIdentity_size,inUEID->aMFRegionID_size,inUEID->aMFSetID_size,inUEID->aMFPointer_size); + + E2SM_RC_ControlHeader_t *controlHeaderIE = (E2SM_RC_ControlHeader_t *)calloc(1, sizeof(E2SM_RC_ControlHeader_t)); + if(!controlHeaderIE) + { + fprintf(stderr, "alloc E2SM_RC_ControlHeader failed\n"); + return -1; + } + + controlHeaderIE->ric_controlHeader_formats.present = E2SM_RC_ControlHeader__ric_controlHeader_formats_PR_controlHeader_Format1; + //E2SM_RC_ControlHeader_Format1_t *controlHeader_Fmt1 = (E2SM_RC_ControlHeader_Format1_t *)calloc(1, sizeof(E2SM_RC_ControlHeader_Format1_t)); + E2SM_RC_ControlHeader_Format1_t *controlHeader_Fmt1 = NULL; + controlHeaderIE->ric_controlHeader_formats.choice.controlHeader_Format1 = (E2SM_RC_ControlHeader_Format1_t *)calloc(1, sizeof(E2SM_RC_ControlHeader_Format1_t)); + controlHeader_Fmt1 = controlHeaderIE->ric_controlHeader_formats.choice.controlHeader_Format1; + if(!controlHeader_Fmt1) + { + fprintf(stderr, "alloc E2SM_RC_ControlHeader failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + return -1; + } + + controlHeader_Fmt1->ueID.present = UEID_PR_gNB_UEID; + controlHeader_Fmt1->ueID.choice.gNB_UEID = (UEID_GNB_t *)calloc(1,sizeof(UEID_GNB_t)); + if(! controlHeader_Fmt1->ueID.choice.gNB_UEID) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + fprintf(stderr, "alloc gNB_UEID failed\n"); + return -1; + } + + asn_long2INTEGER(&controlHeader_Fmt1->ueID.choice.gNB_UEID->amf_UE_NGAP_ID,inUEID->amf_UE_NGAP_Id); + + fprintf(stderr, "e2sm_encode_ric_control_header amf_UE_NGAP_ID encoded \n"); + + //OCTET_STRING_fromBuf(&controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.pLMNIdentity,inUEID->pLMNIdentity, inUEID->pLMNIdentity_size); + + OCTET_STRING_fromBuf(&controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.pLMNIdentity, plmnId,plmnIdSize); + fprintf(stderr, "e2smrc_encode_ric_control_header pLMNIdentity encoded \n"); + + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.buf = (uint8_t*)calloc(1,inUEID->aMFRegionID_size); + if(!controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.buf) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + fprintf(stderr, "alloc aMFRegionID Value failed\n"); + return -1; + } + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.size = 1;//inUEID->aMFRegionID_size; + int decimal_num= (int)strtol(inUEID->aMFRegionID, NULL, 2); + memcpy(controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.buf, (char*)&decimal_num,sizeof(unsigned int)); + //AMFR->size=1; + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.bits_unused=0; + //controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.buf[0] = inUEID->aMFRegionID && 0XFF; + //controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.buf[0] = *(inUEID->aMFRegionID ) & 0XFF; + //memcpy(controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFRegionID.buf,inUEID->aMFRegionID,inUEID->aMFRegionID_size); + + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFSetID.buf = (uint8_t*)calloc(1, inUEID->aMFSetID_size); + if(!controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFSetID.buf) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + fprintf(stderr, "alloc aMFSetID Value failed\n"); + return -1; + } + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFSetID.size = inUEID->aMFSetID_size; + //controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFSetID.buf[0] = (inUEID->aMFSetID && 0xFF00) >> 8; + //controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFSetID.buf[1] = inUEID->aMFSetID && 0XFF00 && 0X00FF; + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFSetID.buf[0] = (*(inUEID->aMFSetID) & 0xFFC0) >> 8; + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFSetID.bits_unused = 6; + + + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFPointer.buf = (uint8_t*)calloc(1, inUEID->aMFPointer_size); + if(!controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFPointer.buf) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + fprintf(stderr, "alloc aMFPointer Value failed\n"); + return -1; + } + + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFPointer.size = 1;//inUEID->aMFPointer_size; + //controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFPointer.buf[0] = inUEID->aMFPointer && 0XFF; + //controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFPointer.buf[0] = (*(inUEID->aMFPointer) & 0xFC) >> 2; + int decimal_num3= (int)strtol(inUEID->aMFPointer, NULL, 2); + decimal_num3=decimal_num3<<2; + memcpy(controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFPointer.buf, (char*)&decimal_num3,sizeof(unsigned int)); + + controlHeader_Fmt1->ueID.choice.gNB_UEID->guami.aMFPointer.bits_unused = 2; + + + controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_UE_F1AP_ID_List = (UEID_GNB_CU_F1AP_ID_List_t *)calloc(1,sizeof(UEID_GNB_CU_F1AP_ID_List_t)); + if(! controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_UE_F1AP_ID_List) + { + fprintf(stderr, "alloc gNB_CU_CP_UE_E1AP_ID_list failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + return -1; + } + //f1AP is an array of data + //int n = sizeof(f1AP)/sizeof(long int); + + for(int i =0; i < f1AP_len; i++) + { + UEID_GNB_CU_CP_F1AP_ID_Item_t *F1AP_ID_Item = (UEID_GNB_CU_CP_F1AP_ID_Item_t *)calloc (1, sizeof(UEID_GNB_CU_CP_F1AP_ID_Item_t )); + if(! F1AP_ID_Item) + { + fprintf(stderr, "alloc UEID_GNB_CU_CP_F1AP_ID_Item failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + return -1; + } + F1AP_ID_Item->gNB_CU_UE_F1AP_ID = f1AP[i]; + fprintf(stderr, "F1AP_id %d =%lu\n",i,*((unsigned long *) F1AP_id +i )); + ASN_SEQUENCE_ADD(&controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_UE_F1AP_ID_List->list,F1AP_ID_Item); + } + //F1AP_ID_Item->gNB_CU_UE_F1AP_ID = f1AP[0]; + //ASN_SEQUENCE_ADD(&controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_UE_F1AP_ID_List->list,F1AP_ID_Item); + + + controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_CP_UE_E1AP_ID_List = (UEID_GNB_CU_CP_E1AP_ID_List_t *)calloc(1,sizeof(UEID_GNB_CU_CP_E1AP_ID_List_t)); + + if(! controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_CP_UE_E1AP_ID_List) + { + fprintf(stderr, "alloc gNB_CU_CP_UE_E1AP_ID_list failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + return -1; + } + + + //n = sizeof(e1AP)/sizeof(long int); + for(int i =0; i < e1Ap_len; i++) + { + UEID_GNB_CU_CP_E1AP_ID_Item_t *E1AP_ID_Item = (UEID_GNB_CU_CP_E1AP_ID_Item_t *)calloc (1, sizeof(UEID_GNB_CU_CP_E1AP_ID_Item_t )); + if(! E1AP_ID_Item) + { + fprintf(stderr, "alloc UEID_GNB_CU_CP_E1AP_ID_Item failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + return -1; + + } + E1AP_ID_Item->gNB_CU_CP_UE_E1AP_ID = e1AP[i]; + ASN_SEQUENCE_ADD(&controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_CP_UE_E1AP_ID_List->list,E1AP_ID_Item); + //E1AP_ID_Item->gNB_CU_CP_UE_E1AP_ID = (*(unsigned long *) E1AP_id) ; + //ASN_SEQUENCE_ADD(&controlHeader_Fmt1->ueID.choice.gNB_UEID->gNB_CU_CP_UE_E1AP_ID_List->list,E1AP_ID_Item); + } + + + controlHeader_Fmt1->ric_Style_Type = ricControlStyleType; + controlHeader_Fmt1->ric_ControlAction_ID = ricControlActionID; + + controlHeaderIE->ric_controlHeader_formats.choice.controlHeader_Format1 = controlHeader_Fmt1; + + + fprintf(stderr, "showing xer of asn_DEF_E2SM_RC_ControlHeader data\n"); + xer_fprint(stderr, &asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + fprintf(stderr, "\n"); + fprintf(stderr, "After xer of asn_DEF_E2SM_RC_ControlHeader data\n"); + + asn_enc_rval_t encode_result; + encode_result = aper_encode_to_buffer(&asn_DEF_E2SM_RC_ControlHeader, NULL, controlHeaderIE, buffer, buf_size); + + + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlHeader, controlHeaderIE); + if(encode_result.encoded == -1) + { + fprintf(stderr, "Cannot encode %s: %s\n", encode_result.failed_type->name, strerror(errno)); + return -1; + } + else + { + return encode_result.encoded; + } +} + +ssize_t e2sm_encode_nrcgi(NR_CGI_t *nr_cgi, void* plmnIdValue, size_t plmnId_size,ulong lNRCellId, uint8_t* buffer, size_t buf_size) +{ + nr_cgi = (NR_CGI_t*)calloc(1, sizeof(NR_CGI_t)); + if(!nr_cgi) { + fprintf(stderr, "e2src_encode_nrcgi alloc nr_cgi failed \n"); + return -1; + } + OCTET_STRING_fromBuf(&nr_cgi->pLMNIdentity,plmnIdValue, plmnId_size); + //fprintf(stderr, "encodec Plmn Id = %s plmnIdValue %s and lNRCellId = %lu \n", nr_cgi->pLMNIdentity, plmnIdValue,lNRCellId); + //fprintf(stderr, "encodec Plmn Id = %s and lNRCellId = %d \n", nr_cgi->pLMNIdentity,plmnIdValue,lNRCellId); + BIT_STRING_t *nr_cell_id = &nr_cgi->nRCellIdentity ; + nr_cell_id->buf = (uint8_t*)calloc(1,5); + if(nr_cell_id->buf) + { + nr_cell_id->size = 5; + nr_cell_id->buf[0] = ((lNRCellId & 0X0FF0000000) >> 28); + nr_cell_id->buf[1] = ((lNRCellId & 0X000FF00000) >> 20); + nr_cell_id->buf[2] = ((lNRCellId & 0X00000FF000) >> 12); + nr_cell_id->buf[3] = ((lNRCellId & 0X0000000FF0) >> 4); + nr_cell_id->buf[4] = (lNRCellId & 0X000000000F) << 4; + nr_cell_id->bits_unused = 4; + + } + + fprintf(stderr, "showing xer of asn_DEF_NR_CGI NR_CGI_t data\n"); + xer_fprint(stderr, &asn_DEF_NR_CGI, nr_cgi); + + asn_enc_rval_t encode_result = aper_encode_to_buffer(&asn_DEF_NR_CGI, NULL, nr_cgi, buffer, buf_size); + + if(encode_result.encoded != -1) + { + fprintf(stderr, "nr_cgi encodedi length = %zd \n", encode_result.encoded) ; + return encode_result.encoded; + } + else + { + fprintf(stderr, "nr_cgi encode failed =%zd \n", encode_result.encoded) ; + return -1 ; + } +} + +ssize_t e2sm_encode_ric_control_message(void *buffer, size_t buf_size, long targetPrimaryCell, + long targetCell, long nrOrEUtraCell, long nrCGIOrECGI, void* ranParameterValue,size_t ranParameterValue_size){ + + E2SM_RC_ControlMessage_t *e2smrcRcControlMsg = (E2SM_RC_ControlMessage_t*)calloc(1, sizeof(E2SM_RC_ControlMessage_t)); + if(!e2smrcRcControlMsg) { + fprintf(stderr, "alloc E2SM_ControlMessage_t failed\n"); + return -1; + } + e2smrcRcControlMsg->ric_controlMessage_formats.present = E2SM_RC_ControlMessage__ric_controlMessage_formats_PR_controlMessage_Format1; + E2SM_RC_ControlMessage_Format1_t *e2smrcRcControlFormat1 = (E2SM_RC_ControlMessage_Format1_t*)calloc(1, sizeof(E2SM_RC_ControlMessage_Format1_t)); + if(!e2smrcRcControlFormat1) { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc E2SM_ControlMessage_Format1_t failed\n"); + return -1; + } + RANParameter_ValueType_Choice_Structure_t *ranParameter_choice_Structure4 = (struct RANParameter_ValueType_Choice_Structure*)calloc(2, sizeof(struct RANParameter_ValueType_Choice_Structure)); + //RANParameter_STRUCTURE_t* RPS4=(RANParameter_STRUCTURE_t*)calloc(1,sizeof(RANParameter_STRUCTURE_t)); + //ranParameter_choice_Structure4[0]=(RANParameter_ValueType_Choice_Structure_t*)calloc(1,sizeof(RANParameter_ValueType_Choice_Structure_t)); + //ranParameter_choice_Structure4[1]=(RANParameter_ValueType_Choice_Structure_t*)calloc(1,sizeof(RANParameter_ValueType_Choice_Structure_t)); + //PLMN ################################ + //void *p={"001F01"}; + //void *nR={"12345C0010"}; +// void *z={"00"}; +/* + int newSize = strlen((char*)ranParameterValue1) + strlen((char*)ranParameterValue2) + 2; + + // Allocate new buffer + char * newBuffer = (char *)malloc(newSize); + //strcpy(newBuffer,z); + strcat(newBuffer,(char *)ranParameterValue1); // or strncat + strcat(newBuffer,(char *)ranParameterValue2); + + //newBuffer=00001F0112345C0010; + printf("%s\n",newBuffer); + u_int64_t lol3 = (u_int64_t)strtoll(newBuffer, NULL, 16); + + int c0=lol3 & 0X0000000000000000FF; + int c1=(lol3>>8) & 0X0000000000000000FF; + int c2=(lol3>>16) & 0X0000000000000000FF; + int c3=(lol3>>24) & 0X0000000000000000FF; + int c4=(lol3>>32) & 0X0000000000000000FF; + int c5=(lol3>>40) & 0X0000000000000000FF; + int c6=(lol3>>48) & 0X0000000000000000FF; + int c7=(lol3>>56) & 0X0000000000000000FF; + int c8=lol3 & 0X000000000000000000; +*/ + RANParameter_STRUCTURE_Item_t *ranParameter_structure_Item_nrcgi = (RANParameter_STRUCTURE_Item_t *)calloc(1,sizeof(RANParameter_STRUCTURE_Item_t)); + ranParameter_structure_Item_nrcgi->ranParameter_ID=4; + RANParameter_ValueType_t* RPV_t_nrcgi=(RANParameter_ValueType_t*)calloc(1,sizeof(RANParameter_ValueType_t)); + RPV_t_nrcgi->present=RANParameter_ValueType_PR_ranP_Choice_ElementFalse; + RANParameter_ValueType_Choice_ElementFalse_t * RPVCEF_nrcgi=(RANParameter_ValueType_Choice_ElementFalse_t *)calloc(1, sizeof(RANParameter_ValueType_Choice_ElementFalse_t)); + RANParameter_Value_t *RPV_nrcgi=(RANParameter_Value_t *)calloc(1, sizeof(RANParameter_Value_t)); + RPV_nrcgi->present= RANParameter_Value_PR_valueOctS; + + + + OCTET_STRING_t *NRCGI=(OCTET_STRING_t *)calloc(1,sizeof(OCTET_STRING_t)); + OCTET_STRING_fromBuf(NRCGI, ranParameterValue,ranParameterValue_size); + RPV_nrcgi->choice.valueOctS=*NRCGI; + RPVCEF_nrcgi->ranParameter_value=RPV_nrcgi; + RPV_t_nrcgi->choice.ranP_Choice_ElementFalse=RPVCEF_nrcgi; + ranParameter_structure_Item_nrcgi->ranParameter_valueType=RPV_t_nrcgi; + ranParameter_choice_Structure4->ranParameter_Structure = (RANParameter_STRUCTURE_t*)calloc(1,sizeof(RANParameter_STRUCTURE_t)); + ranParameter_choice_Structure4->ranParameter_Structure->sequence_of_ranParameters = (struct RANParameter_STRUCTURE__sequence_of_ranParameters*)calloc(1,sizeof(struct RANParameter_STRUCTURE__sequence_of_ranParameters)); + int result1 = ASN_SEQUENCE_ADD(&ranParameter_choice_Structure4->ranParameter_Structure->sequence_of_ranParameters->list, ranParameter_structure_Item_nrcgi); + if (result1==-1) + { + fprintf(stderr,"Unable to assign memory to add PLMN %s",strerror(errno)); + return -1; + } + + + RANParameter_STRUCTURE_Item_t* ranParameter_structure_Item3= (RANParameter_STRUCTURE_Item_t *)calloc(1,sizeof(RANParameter_STRUCTURE_Item_t)); + ranParameter_structure_Item3->ranParameter_ID=3; + RANParameter_ValueType_t* RPV_t3=(RANParameter_ValueType_t*)calloc(1,sizeof(RANParameter_ValueType_t)); + RPV_t3->present=RANParameter_ValueType_PR_ranP_Choice_Structure; + RPV_t3->choice.ranP_Choice_Structure=ranParameter_choice_Structure4; + ranParameter_structure_Item3->ranParameter_valueType=RPV_t3; + RANParameter_ValueType_Choice_Structure_t *ranParameter_choice_Structure3 = (struct RANParameter_ValueType_Choice_Structure*)calloc(2, sizeof(struct RANParameter_ValueType_Choice_Structure)); + ranParameter_choice_Structure3->ranParameter_Structure = (RANParameter_STRUCTURE_t*)calloc(1,sizeof(RANParameter_STRUCTURE_t)); + ranParameter_choice_Structure3->ranParameter_Structure->sequence_of_ranParameters= (struct RANParameter_STRUCTURE__sequence_of_ranParameters*)calloc(1,sizeof(struct RANParameter_STRUCTURE__sequence_of_ranParameters)); + int result3 = ASN_SEQUENCE_ADD(&ranParameter_choice_Structure3->ranParameter_Structure->sequence_of_ranParameters->list, ranParameter_structure_Item3); + if (result3==-1) + { + fprintf(stderr,"Unable to assign memory to add ranParameter_structure_Item3 %s",strerror(errno)); + return -1; + } + RANParameter_STRUCTURE_Item_t * ranParameter_structure_Item2= (RANParameter_STRUCTURE_Item_t *)calloc(1,sizeof(RANParameter_STRUCTURE_Item_t)); + ranParameter_structure_Item2->ranParameter_ID=2; + RANParameter_ValueType_t* RPV_t2=(RANParameter_ValueType_t*)calloc(1,sizeof(RANParameter_ValueType_t)); + RPV_t2->present=RANParameter_ValueType_PR_ranP_Choice_Structure; + RPV_t2->choice.ranP_Choice_Structure=ranParameter_choice_Structure3; + ranParameter_structure_Item2->ranParameter_valueType=RPV_t2; + RANParameter_ValueType_Choice_Structure_t *ranParameter_choice_Structure2 = (struct RANParameter_ValueType_Choice_Structure*)calloc(2, sizeof(struct RANParameter_ValueType_Choice_Structure)); + ranParameter_choice_Structure2->ranParameter_Structure = (RANParameter_STRUCTURE_t*)calloc(1,sizeof(RANParameter_STRUCTURE_t)); + ranParameter_choice_Structure2->ranParameter_Structure->sequence_of_ranParameters= (struct RANParameter_STRUCTURE__sequence_of_ranParameters*)calloc(1,sizeof(struct RANParameter_STRUCTURE__sequence_of_ranParameters)); + int result4 = ASN_SEQUENCE_ADD(&ranParameter_choice_Structure2->ranParameter_Structure->sequence_of_ranParameters->list, ranParameter_structure_Item2); + if (result4==-1) + { + fprintf(stderr,"Unable to assign memory to add ranParameter_structure_Item2 %s",strerror(errno)); + return -1; + } + RANParameter_ValueType_t* RPV_t1=(RANParameter_ValueType_t*)calloc(1,sizeof(RANParameter_ValueType_t)); + RPV_t1->present=RANParameter_ValueType_PR_ranP_Choice_Structure; + RPV_t1->choice.ranP_Choice_Structure=ranParameter_choice_Structure2; + E2SM_RC_ControlMessage_Format1_Item_t *format1item = (E2SM_RC_ControlMessage_Format1_Item_t *) calloc(1,sizeof( + E2SM_RC_ControlMessage_Format1_Item_t)); + if(!format1item) { + fprintf(stderr, "alloc format1item failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + return -1; + } + format1item->ranParameter_ID=1; + format1item->ranParameter_valueType.present = RANParameter_ValueType_PR_ranP_Choice_Structure; + format1item->ranParameter_valueType=*RPV_t1; + int result5 = ASN_SEQUENCE_ADD(&e2smrcRcControlFormat1->ranP_List.list, format1item); + if (result5==-1) + { + fprintf(stderr,"Unable to assign memory to add format1item %s",strerror(errno)); + return -1; + } + e2smrcRcControlMsg->ric_controlMessage_formats.choice.controlMessage_Format1=e2smrcRcControlFormat1; + asn_enc_rval_t encode_result; + encode_result = aper_encode_to_buffer(&asn_DEF_E2SM_RC_ControlMessage, NULL, e2smrcRcControlMsg, buffer,buf_size ); + fprintf(stderr, "encoded length = %ld \n", encode_result.encoded); + if(encode_result.encoded == -1) + { + fprintf(stderr, "Cannot encode %s: %s\n", encode_result.failed_type->name, strerror(errno)); + return -1; + } + else + { + xer_fprint(stderr, &asn_DEF_E2SM_RC_ControlMessage,e2smrcRcControlMsg); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + return encode_result.encoded; + } + + +} +/* +ssize_t e2sm_encode_ric_control_message(void *buffer, size_t buf_size, long targetPrimaryCell, + long targetCell, long nrOrEUtraCell, long nrCGIOrECGI, void* ranParameterValue, size_t ranParameterValue_size) +{ + fprintf(stderr, "e2sm_encode_ric_control_message \n") ; + //NR_CGI_t *nr_cgi = NULL; + //uint8_t nrcgiBuf[buf_size]; + //ssize_t nrcgiBuf_size,nrcgiLen; + + + E2SM_RC_ControlMessage_t *e2smrcRcControlMsg = (E2SM_RC_ControlMessage_t*)calloc(1, sizeof(E2SM_RC_ControlMessage_t)); + if(!e2smrcRcControlMsg) { + fprintf(stderr, "alloc E2SM_ControlMessage_t failed\n"); + return -1; + } + e2smrcRcControlMsg->ric_controlMessage_formats.present = E2SM_RC_ControlMessage__ric_controlMessage_formats_PR_controlMessage_Format1; + + E2SM_RC_ControlMessage_Format1_t *e2smrcRcControlFormat1 = (E2SM_RC_ControlMessage_Format1_t*)calloc(1, sizeof(E2SM_RC_ControlMessage_Format1_t)); + if(!e2smrcRcControlFormat1) { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc E2SM_ControlMessage_Format1_t failed\n"); + return -1; + } + // Start Target Primary Cell + E2SM_RC_ControlMessage_Format1_Item_t *ranParameterItem1 = (E2SM_RC_ControlMessage_Format1_Item_t *) calloc(1,sizeof( + E2SM_RC_ControlMessage_Format1_Item_t)); + if(!ranParameterItem1) { + fprintf(stderr, "alloc RANParameter_Item_t1 failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + return -1; + } + + ranParameterItem1->ranParameter_ID = targetPrimaryCell; // Target Primary Cell ID value = 1 + ranParameterItem1->ranParameter_valueType.present = RANParameter_ValueType_PR_ranP_Choice_Structure; + + RANParameter_ValueType_Choice_Structure_t *ranParameterStructure1 = (RANParameter_ValueType_Choice_Structure_t*)calloc(1, sizeof(RANParameter_ValueType_Choice_Structure_t)); + if(!ranParameterStructure1) + { + fprintf(stderr, "alloc RANParameter_STRUCTURE_t1 failed\n"); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + return -1; + } + + fprintf(stderr, "targetPrimaryCell encoded \n"); + + // Start Target Cell + RANParameter_STRUCTURE_Item_t *ranParameterItem2 = (RANParameter_STRUCTURE_Item_t *)calloc(1,sizeof(RANParameter_STRUCTURE_Item_t)); + + if(!ranParameterItem2) + { + + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc RANParameter_Item_t2 failed\n"); + return -1; + } + + ranParameterItem2->ranParameter_ID = targetCell; // Target Cell ID value = 2 + + RANParameter_ValueType_Choice_Structure_t *ranParameterStructure2 = (RANParameter_ValueType_Choice_Structure_t*)calloc(1, sizeof(struct RANParameter_ValueType_Choice_Structure)); + if(!ranParameterStructure2) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc RANParameter_STRUCTURE_t2 failed\n"); + return -1; + } + + fprintf(stderr, "targetPrimaryCellId Value encoded \n"); + + // Start NR Cell (or E-UTRA Cell) + RANParameter_STRUCTURE_Item_t *ranParameterItem3 = (RANParameter_STRUCTURE_Item_t*)calloc(1,sizeof(RANParameter_STRUCTURE_Item_t)); + if(!ranParameterItem3) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc RANParameter_Item_t3 failed\n"); + return -1; + } + + ranParameterItem3->ranParameter_ID = nrOrEUtraCell; // NR Cell ID (or E-UTRA Cell ID) value = + + RANParameter_ValueType_Choice_Structure_t *ranParameterStructure3 = (struct RANParameter_ValueType_Choice_Structure*)calloc(1, sizeof(struct RANParameter_ValueType_Choice_Structure)); + if(!ranParameterStructure3) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc RANParameter_Item_t3 failed\n"); + return -1; + } + fprintf(stderr, " NR Cell ID Value encoded \n"); + + // Start NR CGI (or ECGI) + RANParameter_STRUCTURE_Item_t *ranParameterItem4 = (RANParameter_STRUCTURE_Item_t *) calloc(1,sizeof( + RANParameter_STRUCTURE_Item_t)); + if(!ranParameterItem4) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc RANParameter_Item_t4 failed\n"); + return -1; + } + + ranParameterItem4->ranParameter_ID = nrCGIOrECGI; // NR CGI ID (or ECGI ID) value = + + ranParameterItem4->ranParameter_valueType = (RANParameter_ValueType_t*)calloc(1,sizeof(RANParameter_ValueType_t)); + if(!ranParameterItem4->ranParameter_valueType) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterItem4->ranParameter_valueType failed\n"); + return -1; + } + + ranParameterItem4->ranParameter_valueType->present = RANParameter_ValueType_PR_ranP_Choice_ElementFalse; + ranParameterItem4->ranParameter_valueType->choice.ranP_Choice_ElementFalse = (RANParameter_ValueType_Choice_ElementFalse_t *)calloc(1, sizeof(RANParameter_ValueType_Choice_ElementFalse_t)); + if(!ranParameterItem4->ranParameter_valueType->choice.ranP_Choice_ElementFalse) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc RANParameter_Item_t4 failed\n"); + return -1; + } + + ranParameterItem4->ranParameter_valueType->choice.ranP_Choice_ElementFalse->ranParameter_value = (RANParameter_Value_t *)calloc(1, sizeof(RANParameter_Value_t)); + if(!ranParameterItem4->ranParameter_valueType->choice.ranP_Choice_ElementFalse->ranParameter_value) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameter_value failed\n"); + return -1; + } + ranParameterItem4->ranParameter_valueType->choice.ranP_Choice_ElementFalse->ranParameter_value->present = RANParameter_Value_PR_valueOctS; + OCTET_STRING_fromBuf(&ranParameterItem4->ranParameter_valueType->choice.ranP_Choice_ElementFalse->ranParameter_value->choice.valueOctS,ranParameterValue, ranParameterValue_size); + + + fprintf(stderr, "Target Plmn Id = %s ranParameterValue and lNRCellId = %lu \n", ranParameterValue,lNRCellId); + nrcgiLen = e2sm_encode_nrcgi(nr_cgi, ranParameterValue, ranParameterValue_size, lNRCellId,nrcgiBuf,nrcgiBuf_size); + if(nrcgiLen == -1 ) + { + fprintf(stderr,"e2srmc_encode_nrcgi failed \n"); + return nrcgiLen; + } + OCTET_STRING_fromBuf(&ranParameterItem4->ranParameter_valueType->choice.ranP_Choice_ElementFalse->ranParameter_value->choice.valueOctS,nrcgiBuf,nrcgiLen); + + fprintf(stderr, " NR CGI encoded \n"); + + ranParameterStructure3->ranParameter_Structure = (RANParameter_STRUCTURE_t*)calloc(1,sizeof(RANParameter_STRUCTURE_t)); + if(!ranParameterStructure3->ranParameter_Structure) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterStructure3->ranParameter_Structure failed\n"); + return -1; + } + + ranParameterStructure3->ranParameter_Structure->sequence_of_ranParameters = (struct RANParameter_STRUCTURE__sequence_of_ranParameters*)calloc(1,sizeof(struct RANParameter_STRUCTURE__sequence_of_ranParameters)); + if(!ranParameterStructure3->ranParameter_Structure->sequence_of_ranParameters) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterStructure3->ranParameter_Structure->sequence_of_ranParameters failed\n"); + return -1; + } + + + + ASN_SEQUENCE_ADD(&ranParameterStructure3->ranParameter_Structure->sequence_of_ranParameters->list, ranParameterItem4); // NR CGI (or ECGI) + ranParameterItem3->ranParameter_valueType = (RANParameter_ValueType_t*)calloc(1,sizeof(RANParameter_ValueType_t)); + if(!ranParameterItem3->ranParameter_valueType) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterItem3->ranParameter_valueType failed\n"); + return -1; + } + ranParameterItem3->ranParameter_valueType->present = RANParameter_ValueType_PR_ranP_Choice_Structure; + ranParameterItem3->ranParameter_valueType->choice.ranP_Choice_Structure = ranParameterStructure3; // NR Cell (or E-UTRA Cell) + fprintf(stderr, " ranParameterStructure3 encoded \n"); + + ranParameterStructure2->ranParameter_Structure = (RANParameter_STRUCTURE_t*)calloc(1,sizeof(RANParameter_STRUCTURE_t)); + if(!ranParameterStructure2->ranParameter_Structure) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterStructure2->ranParameter_Structure failed\n"); + return -1; + } + + ranParameterStructure2->ranParameter_Structure->sequence_of_ranParameters = (struct RANParameter_STRUCTURE__sequence_of_ranParameters*)calloc(1,sizeof(struct RANParameter_STRUCTURE__sequence_of_ranParameters)); + if(!ranParameterStructure2->ranParameter_Structure->sequence_of_ranParameters) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterStructure3->ranParameter_Structure->sequence_of_ranParameters failed\n"); + return -1; + } + + ASN_SEQUENCE_ADD(&ranParameterStructure2->ranParameter_Structure->sequence_of_ranParameters->list, ranParameterItem3); // NR Cell (or E-UTRA Cell) + ranParameterItem2->ranParameter_valueType = (RANParameter_ValueType_t*)calloc(1,sizeof(RANParameter_ValueType_t)); + if(!ranParameterItem2->ranParameter_valueType) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterItem2->ranParameter_valueType failed\n"); + return -1; + } + ranParameterItem2->ranParameter_valueType->present = RANParameter_ValueType_PR_ranP_Choice_Structure; + ranParameterItem2->ranParameter_valueType->choice.ranP_Choice_Structure = ranParameterStructure2; // Target Cell + fprintf(stderr, " ranParameterStructure2 encoded \n"); + + ranParameterStructure1->ranParameter_Structure = (RANParameter_STRUCTURE_t*)calloc(1,sizeof(RANParameter_STRUCTURE_t)); + if(!ranParameterStructure1->ranParameter_Structure) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterStructure1->ranParameter_Structure failed\n"); + return -1; + } + + ranParameterStructure1->ranParameter_Structure->sequence_of_ranParameters = (struct RANParameter_STRUCTURE__sequence_of_ranParameters*)calloc(1,sizeof(struct RANParameter_STRUCTURE__sequence_of_ranParameters)); + if(!ranParameterStructure1->ranParameter_Structure->sequence_of_ranParameters) + { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "alloc ranParameterStructure1->ranParameter_Structure->sequence_of_ranParameters failed\n"); + return -1; + } + fprintf(stderr, " ranParameterStructure1 encoded \n"); + + ASN_SEQUENCE_ADD(&ranParameterStructure1->ranParameter_Structure->sequence_of_ranParameters->list, ranParameterItem2); // Target Cell + ranParameterItem1->ranParameter_valueType.choice.ranP_Choice_Structure = ranParameterStructure1; // Target Primary Cell + + ASN_SEQUENCE_ADD(&e2smrcRcControlFormat1->ranP_List.list, ranParameterItem1); // Target Primary Cell + e2smrcRcControlMsg->ric_controlMessage_formats.choice.controlMessage_Format1 = e2smrcRcControlFormat1; + + + fprintf(stderr, "showing xer of asn_DEF_E2SM_RC_ControlMessage data\n"); + xer_fprint(stderr, &asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "\n"); + fprintf(stderr, "After xer of asn_DEF_E2SM_RC_ControlMessage data\n"); + + asn_enc_rval_t encode_result; + encode_result = aper_encode_to_buffer(&asn_DEF_E2SM_RC_ControlMessage, NULL, e2smrcRcControlMsg, buffer, buf_size); + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlMessage, e2smrcRcControlMsg); + fprintf(stderr, "encoded length = %ld \n", encode_result.encoded); + if(encode_result.encoded == -1) + { + fprintf(stderr, "Cannot encode %s: %s\n", encode_result.failed_type->name, strerror(errno)); + return -1; + } + else + { + return encode_result.encoded; + } +} +*/ + +E2SM_RC_ControlOutcome_t* e2sm_decode_ric_call_process_outcome(void *buffer, size_t buf_size) +{ + fprintf(stderr, "e2sm_decode_ric_call_process_outcome Enter \n"); + asn_dec_rval_t decode_result; + E2SM_RC_ControlOutcome_t* controlOutcome = NULL; + decode_result = aper_decode_complete(NULL, &asn_DEF_E2SM_RC_ControlOutcome, (void **)&controlOutcome, buffer, buf_size); + if(decode_result.code == RC_OK) { + xer_fprint(stdout, &asn_DEF_E2SM_RC_ControlOutcome, controlOutcome); + return controlOutcome; + } + else { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlOutcome, controlOutcome); + return NULL; + } +} + +void e2sm_free_ric_call_process_outcome(E2SM_RC_ControlOutcome_t* controlOutcome) { + ASN_STRUCT_FREE(asn_DEF_E2SM_RC_ControlOutcome, controlOutcome); +} diff --git a/Bouncer/e2sm_rc/wrapper.h b/Bouncer/e2sm_rc/wrapper.h new file mode 100755 index 0000000..64cf78d --- /dev/null +++ b/Bouncer/e2sm_rc/wrapper.h @@ -0,0 +1,70 @@ +#ifndef _WRAPPER_H_ +#define _WRAPPER_H_ + +#include "BOOLEAN.h" +#include "NativeReal.h" +#include "REAL.h" +#include "OCTET_STRING.h" +#include "E2SM-RC-ControlHeader-Format1.h" +#include "E2SM-RC-ControlHeader.h" +#include "E2SM-RC-ControlMessage-Format1.h" +#include "E2SM-RC-ControlMessage.h" +#include "E2SM-RC-RANFunctionDefinition.h" +#include "INTEGER.h" +#include "NativeInteger.h" +#include "OPEN_TYPE.h" +#include "PrintableString.h" +#include "RANParameter-ID.h" +#include "RANParameter-LIST.h" +#include "RANParameter-Name.h" +#include "RANParameter-STRUCTURE.h" +#include "RANParameter-Value.h" +#include "RANParameter-ValueType.h" +#include "RANfunction-Name.h" +#include "RIC-ControlAction-ID.h" +#include "RIC-ControlAction-Name.h" +#include "RIC-Format-Type.h" +#include "RIC-Style-Name.h" +#include "RIC-Style-Type.h" +#include "RANParameter-ValueType-Choice-ElementFalse.h" +#include "RANParameter-ValueType-Choice-Structure.h" +#include "UEID.h" +#include "UEID-GNB.h" +#include "UEID-GNB-CU-F1AP-ID-List.h" +#include "UEID-GNB-CU-CP-E1AP-ID-List.h" +#include "UEID-GNB-CU-CP-F1AP-ID-Item.h" +#include "UEID-GNB-CU-CP-E1AP-ID-Item.h" +#include "E2SM-RC-ControlMessage-Format1-Item.h" +#include "RANParameter-STRUCTURE-Item.h" +#include "E2SM-RC-ControlOutcome.h" +#include "E2SM-RC-ControlOutcome-Format1.h" +#include "E2SM-RC-ControlOutcome-Format1-Item.h" +#include "NR-CGI.h" + + +long F1AP_id[1]; +long E1AP_id[1]; +struct uEID { + long amf_UE_NGAP_Id; + //size_t amf_UE_NGAP_Id_size; + const char* pLMNIdentity; + size_t pLMNIdentity_size; + const char* aMFRegionID; + size_t aMFRegionID_size; + const char* aMFSetID; + size_t aMFSetID_size; + const char* aMFPointer; + size_t aMFPointer_size; +}; + + +extern ssize_t e2sm_encode_ric_control_header(void *buffer, size_t buf_size,struct uEID *in,long f1AP[],size_t f1AP_len,long e1AP[],size_t e1Ap_len,long ricControlStyleType, long ricControlActionID, void *ranParameterValue, size_t ranParameterValue_size); + +extern ssize_t e2sm_encode_ric_control_message(void *buffer, size_t buf_size, long targetPrimaryCell, long targetCell, long nrOrEUtraCell, long nrCGIOrECGI, void *ranParameterValue, size_t ranParameterValue_size); + +extern E2SM_RC_ControlOutcome_t* e2sm_decode_ric_call_process_outcome(void *buffer, size_t buf_size); +extern void e2sm_free_ric_call_process_outcome(E2SM_RC_ControlOutcome_t* controlOutcome) ; +extern ssize_t e2sm_encode_nrcgi(NR_CGI_t *nr_cgi, void* ranParameterValue, size_t ranParameterValue_size, + ulong lNRCellId,uint8_t* buffer, size_t buf_size); + +#endif /* _WRAPPER_H_ */ diff --git a/Bouncer/init/config-file.json b/Bouncer/init/config-file.json deleted file mode 100644 index 958136e..0000000 --- a/Bouncer/init/config-file.json +++ /dev/null @@ -1,52 +0,0 @@ - { - "xapp_name": "bouncer-xapp", - "version": "2.0.0", - "containers": [ - { - "name": "bouncer-xapp", - "image": { - "registry": "nexus3.o-ran-sc.org:10002", - "name": "o-ran-sc/ric-app-bouncer", - "tag": "2.0.0" - } - } - ], - "messaging": { - "ports": [ - { - "name": "http", - "container": "bouncer-xapp", - "port": 8080, - "description": "http service" - }, - { - "name": "rmr-data", - "container": "bouncer-xapp", - "port": 4560, - - "rxMessages": ["RIC_SUB_RESP", "RIC_INDICATION","RIC_SUB_DEL_RESP"], - "txMessages": ["RIC_SUB_REQ","RIC_SUB_DEL_REQ"], - "policies": [1], - "description": "rmr receive data port for Bouncer xApp" - }, - { - "name": "rmr-route", - "container": "bouncer-xapp", - "port": 4561, - "description": "rmr route port for Bouncer xApp" - } - ] - }, - "rmr": { - "protPort": "tcp:4560", - "maxSize": 2072, - "numWorkers": 1, - "txMessages": ["RIC_SUB_REQ","RIC_SUB_DEL_REQ"], - "rxMessages": ["RIC_SUB_RESP", "RIC_INDICATION","RIC_SUB_DEL_RESP"], - "policies": [1] - }, - "http":{ - "protPort": "tcp:8080" - - } - } diff --git a/Bouncer/init/init_script.py b/Bouncer/init/init_script.py deleted file mode 100644 index d645227..0000000 --- a/Bouncer/init/init_script.py +++ /dev/null @@ -1,132 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - -# This initialization script reads in a json from the specified config map path -# to set up the initializations (route config map, variables etc) for the main -# xapp process - -import json; -import sys; -import os; -import signal; -import time; -import ast; - -def signal_handler(signum, frame): - print("Received signal {0}\n".format(signum)); - if(xapp_subprocess == None or xapp_pid == None): - print("No xapp running. Quiting without sending signal to xapp\n"); - else: - print("Sending signal {0} to xapp ...".format(signum)); - xapp_subprocess.send_signal(signum); - - -def parseConfigJson(config): - - for k1 in config.keys(): - if k1 in ParseSection: - result = ParseSection[k1](config); - if result == False: - return False; - - -# for k2 in config[k1].keys(): - #print(k2); -# if k2 in ParseSection: -# result = ParseSection[k2](config[k1]); -# if result == False: -# return False; - - - -def getMessagingInfo(config): - if 'messaging' in config.keys() and 'ports' in config['messaging'].keys(): - port_list = config['messaging']['ports'] - for portdesc in port_list : - if 'port' in portdesc.keys() and 'name' in portdesc.keys() and portdesc['name'] == 'rmr-data': - lport = portdesc['port'] - # Set the environment variable - os.environ["BOUNCER_PORT"] = str(lport) - return True; - if lport == 0: - print("Error! No valid listening port"); - return False; - -def getXappName(config): - myKey = "xapp_name"; - if myKey not in config.keys(): - print(("Error ! No information found for {0} in config\n".format(myKey))); - return False; - - xapp_name = config[myKey]; - print("Xapp Name is: " + xapp_name); - os.environ["XAPP_NAME"] = xapp_name; - -default_routing_file = "/tmp/routeinfo/routes.txt"; -lport = 0; -ParseSection = {}; -ParseSection["xapp_name"] = getXappName; -ParseSection["messaging"] = getMessagingInfo; - - -#================================================================ -if __name__ == "__main__": - - import subprocess; - cmd = ["/usr/local/bin/b_xapp_main"]; - - if len(sys.argv) > 1: - config_file = sys.argv[1]; - else: - print("Error! No configuration file specified\n"); - sys.exit(1); - - if len(sys.argv) > 2: - cmd[0] = sys.argv[2]; - - with open(config_file, 'r') as f: - try: - config = json.load(f); - except Exception as e: - print(("Error loading json file from {0}. Reason = {1}\n".format(config_file, e))); - sys.exit(1); - - result = parseConfigJson(config); - time.sleep(10); - if result == False: - print("Error parsing json. Not executing xAPP"); - sys.exit(1); - - else: - - # Register signal handlers - signal.signal(signal.SIGINT, signal_handler); - signal.signal(signal.SIGTERM, signal_handler); - - # Start the xAPP - #print("Executing xAPP ...."); - xapp_subprocess = subprocess.Popen(cmd, shell = False, stdin=None, stdout=None, stderr = None); - xapp_pid = xapp_subprocess.pid; - - # Periodically poll the process every 5 seconds to check if still alive - while(1): - xapp_status = xapp_subprocess.poll(); - if xapp_status == None: - time.sleep(5); - else: - print("XaPP terminated via signal {0}\n".format(-1 * xapp_status)); - break; - diff --git a/Bouncer/init/routes.txt b/Bouncer/init/routes.txt deleted file mode 100644 index 4d7de5f..0000000 --- a/Bouncer/init/routes.txt +++ /dev/null @@ -1,5 +0,0 @@ -newrt|start -rte|20011|service-ricplt-a1mediator-rmr.ricplt:4562 -rte|20012|service-ricplt-a1mediator-rmr.ricplt:4562 -rte|12010|service-ricplt-submgr-rmr.ricplt:4560 -newrt|end diff --git a/Bouncer/releases/container-release-app_bxApp.yaml b/Bouncer/releases/container-release-app_bxApp.yaml deleted file mode 100644 index ad868a8..0000000 --- a/Bouncer/releases/container-release-app_bxApp.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -distribution_type: container -container_release_tag: 2.0.0 -container_pull_registry: nexus3.o-ran-sc.org:10004 -container_push_registry: nexus3.o-ran-sc.org:10002 -project: ric-app/benchmarking -ref: -containers: - - name: ric-app-benchmarking - version: 2.0.0 - diff --git a/Bouncer/rmr-version.yaml b/Bouncer/rmr-version.yaml deleted file mode 100644 index ceaf505..0000000 --- a/Bouncer/rmr-version.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# Communicate to CI which version of RMR to install in the build/vet environment ---- -version: 4.0.5 diff --git a/Bouncer/routes.txt b/Bouncer/routes.txt new file mode 100644 index 0000000..4472044 --- /dev/null +++ b/Bouncer/routes.txt @@ -0,0 +1,7 @@ +newrt|start +rte|20011|service-ricplt-a1mediator-rmr.ricplt:4562 +rte|20012|service-ricplt-a1mediator-rmr.ricplt:4562 +rte|12010|service-ricplt-submgr-rmr.ricplt:4560 +rte|12010|service-ricplt-e2term-rmr-alpha.ricplt:38000 +rte|12040|service-ricplt-e2term-rmr-alpha.ricplt:38000 +newrt|end diff --git a/Bouncer/schemas/b_xapp-policy.json b/Bouncer/schemas/b_xapp-policy.json deleted file mode 100644 index 3ab4438..0000000 --- a/Bouncer/schemas/b_xapp-policy.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "downstream_policy_message": { - "policy_type_id":21000, - "operation":"CREATE", - "policy_instance_id":"Bouncer", - "payload":{ - "class":12, - "enforce":true, - "window_length":20, - "blocking_rate":20, - "trigger_threshold":10 - } - }, - - "notify_policy_message": { - "policy_instance_id":"Bouncer", - "policy_type_id":21000, - "status":"OK", - "handler_id":"BxAPP1234" - } -} - diff --git a/Bouncer/schemas/b_xapp-ves.json b/Bouncer/schemas/b_xapp-ves.json deleted file mode 100644 index 8897ebd..0000000 --- a/Bouncer/schemas/b_xapp-ves.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - - "metrics": { - "event": { - "commonEventHeader": { - "startEpochMicrosec": 1542231546086613, - "eventId": "Bouncer Requests", - "eventType": "Bouncer Request Rate", - "priority": "Normal", - "version": "4.0.1", - "reportingEntityName": "Bouncer xAPP", - "sequence": 0, - "domain": "measurement", - "lastEpochMicrosec": 1542231556086613, - "eventName": "Measurement_vGMUX", - "sourceName": "bouncer-xapp", - "vesEventListenerVersion": "7.0.1" - }, - "measurementFields": { - "additionalFields":{ - "Class Id":1, - "Bouncer Request Count":"100", - "Bouncer Accept Count":"10" - }, - "measurementInterval":60, - "measurementFieldsVersion":"4.0" - } - } - } -} diff --git a/Bouncer/src/Makefile b/Bouncer/src/Makefile deleted file mode 100644 index f6c3946..0000000 --- a/Bouncer/src/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -CXX:= g++ --std=c++14 -O2 -L/usr/local/lib -CC:= gcc -O2 -L/usr/local/lib - -SRC:=./ -B_SRC:=./ -UTILSRC=./xapp-utils -MSGSRC:=./xapp-mgmt - -ASNSRC:=../asn1c_defs -E2APSRC:=./xapp-asn/e2ap -E2SMSRC:=./xapp-asn/e2sm - -####### Logging library and flags -CLOGFLAGS:= `pkg-config mdclog --cflags` -LOG_LIBS:= `pkg-config mdclog --libs` -CURL_LIBS:= `pkg-config libcurl --libs` -RNIB_LIBS:= -pthread /usr/local/include/rnib/rnibreader.a -######## Keep include dirs separate so we have transparency - - -BASEFLAGS= -Wall -std=c++14 $(CLOGFLAGS) -C_BASEFLAGS= -Wall $(CLOGFLAGS) -DASN_DISABLE_OER_SUPPORT - -XAPPFLAGS= -I./ -B_FLAGS= -I./ -UTILFLAGS= -I$(UTILSRC) -MSGFLAGS= -I$(MSGSRC) - -ASNFLAGS=-I$(ASNSRC) -DASN_DISABLE_OER_SUPPORT -E2APFLAGS = -I$(E2APSRC) -E2SMFLAGS = -I$(E2SMSRC) - -########libs - -LIBS= -lsdl -lrmr_si -lpthread -lm -lboost_system -lcrypto -lssl -lcpprest $(LOG_LIBS) $(CURL_LIBS) $(RNIB_LIBS) -COV_FLAGS= -fprofile-arcs -ftest-coverage - -####### -B_XAPP_SRC= b_xapp_main.cc -XAPP_SRC= xapp.cc -UTIL_SRC= $(wildcard $(UTILSRC)/*.cc) -MSG_SRC= $(wildcard $(MSGSRC)/*.cc) - -E2AP_SRC= $(wildcard $(E2APSRC)/*.cc) -E2SM_SRC= $(wildcard $(E2SMSRC)/*.cc) -ASN1C_SRC= $(wildcard $(ASNSRC)/*.c) - -##############Objects -UTIL_OBJ=${UTIL_SRC:.cc=.o} -XAPP_OBJ=${XAPP_SRC:.cc=.o} -B_XAPP_OBJ= ${B_XAPP_SRC:.cc=.o} -MSG_OBJ= ${MSG_SRC:.cc=.o} - -E2AP_OBJ = $(E2AP_SRC:.cc=.o) -E2SM_OBJ = $(E2SM_SRC:.cc=.o) -ASN1C_MODULES = $(ASN1C_SRC:.c=.o) - -$(ASN1C_MODULES): export CFLAGS = $(C_BASEFLAGS) $(ASNFLAGS) -$(UTIL_OBJ):export CPPFLAGS=$(BASEFLAGS) $(UTILFLAGS) $(E2APFLAGS) $(E2SMFLAGS) $(ASNFLAGS) $(MSGFLAGS) - -$(MSG_OBJ):export CPPFLAGS=$(BASEFLAGS) $(MSGFLAGS) $(ASNFLAGS) $(E2APFLAGS) $(E2SMFLAGS) -$(E2AP_OBJ): export CPPFLAGS = $(BASEFLAGS) $(ASNFLAGS) $(E2APFLAGS) -$(E2SM_OBJ): export CPPFLAGS = $(BASEFLAGS) $(ASNFLAGS) $(E2SMFLAGS) -$(XAPP_OBJ): export CPPFLAGS = $(BASEFLAGS) $(XAPPFLAGS) $(UTILFLAGS) $(MSGFLAGS) $(E2APFLAGS) $(E2SMFLAGS) $(ASNFLAGS) - -$(B_XAPP_OBJ):export CPPFLAGS=$(BASEFLAGS) $(B_FLAGS) $(XAPPFLAGS) $(UTILFLAGS) $(MSGFLAGS) $(E2APFLAGS) $(E2SMFLAGS) $(ASNFLAGS) - -OBJ= $(B_XAPP_OBJ) $(UTIL_OBJ) $(MSG_OBJ) $(ASN1C_MODULES) $(E2AP_OBJ) $(E2SM_OBJ) $(XAPP_OBJ) - -print-% : ; @echo $* = $($*) - -b_xapp_main: $(OBJ) - $(CXX) -o $@ $(OBJ) $(LIBS) $(RNIBFLAGS) $(CPPFLAGS) $(CLOGFLAGS) - -install: b_xapp_main - install -D b_xapp_main /usr/local/bin/b_xapp_main - -clean: - -rm *.o $(ASNSRC)/*.o $(E2APSRC)/*.o $(UTILSRC)/*.o $(E2SMSRC)/*.o $(MSGSRC)/*.o $(SRC)/*.o b_xapp_main diff --git a/Bouncer/src/README b/Bouncer/src/README deleted file mode 100644 index e7a1325..0000000 --- a/Bouncer/src/README +++ /dev/null @@ -1,44 +0,0 @@ -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== - - -This repository consists of Bouncer Xapp developed in C++. Its envisioned to do simple RIC Benchmarking example Xapp. -It is required to have following features: - -1) E2 Subscription Handling -2) DB Access: SDL and RNIB -3) RMR Message handling -4) Bouncer E2SM -5) RIC Indication -6) RIC Indication Acknowledgment Message - -Steps for installation/running Bouncer Xapp. -$ cd init -$ source ./xapp_env.sh -$cd ../src -$ make -$ ./b_xapp_main - -Testing: -======== - -To test the bouncer xapp, E2simulator is required to be build and run. -1. Take the E2simulator code under RIC-Benchmarking/E2-interface. -2. Run/Restart the Near RT RIC Platform pods. -3. Run E2sim Pod using helm chart( build e2sim using docker file available in e2-interface/e2sim/e2sm_examples/kpm_e2sm/Dockerfile) -4. Deploy bouncer xapp by following the xapp onboarding steps - -Login to the bouncer xapp container using kubectl exec to see the benchmarking timestamp file under /tmp directory. \ No newline at end of file diff --git a/Bouncer/src/b_xapp_main.cc b/Bouncer/src/b_xapp_main.cc deleted file mode 100644 index 0492e39..0000000 --- a/Bouncer/src/b_xapp_main.cc +++ /dev/null @@ -1,184 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - -#include "xapp.hpp" -#include -#include -#include -using namespace web; -using namespace web::http; -using namespace web::http::experimental::listener; -using namespace utility; -std::vectorSubscriptionIds; -#define TRACE(msg) wcout << msg - - -void display_json( - json::value const & jvalue) -{ - cout<<"\ndisplaying REST Notification\n"; - wcout << jvalue.serialize().c_str() << endl; -} - - -void handle_request(http_request request) -{ -auto answer = json::value::object(); -cout<<"\nPrinting POST request content\n"; -cout< task) { - try - { - answer = task.get(); - display_json(answer); - } - catch (http_exception const & e) - { - cout<<"\ninside catch block"; - wcout << e.what() << endl; - } - - }) - .wait(); - - request.reply(status_codes::OK, answer); -} - -void handle_post(http_request request) -{ - TRACE("\nhandle POST\n"); - - handle_request(request); -} - -void handle_put(http_request request) -{ - TRACE("\nhandle PUT\n"); - - handle_request(request); -} - -void start_server() -{ - - utility::string_t port = U("8080"); - utility::string_t address = U("http://0.0.0.0:"); - address.append(port); - address.append(U("/ric/v1/subscriptions/response")); - uri_builder uri(address); - - auto addr = uri.to_uri().to_string(); - http_listener listener(addr); - //http_listener listener("http://localhost:8080/ric"); - cout<<"validated uri = "< rmr = std::make_unique(port); - rmr->xapp_rmr_init(true); - - - //Create Subscription Handler if Xapp deals with Subscription. - //std::unique_ptr sub_handler = std::make_unique(); - - SubscriptionHandler sub_handler; - - //create Bouncer Xapp Instance. - std::unique_ptr b_xapp; - b_xapp = std::make_unique(std::ref(config),std::ref(*rmr)); - - mdclog_write(MDCLOG_INFO, "Created Bouncer Xapp Instance"); - //Startup E2 subscription - std::thread t1(std::ref(start_server)); - t1.detach(); - b_xapp->startup(sub_handler); - - sleep(10); - - - //start listener threads and register message handlers. - int num_threads = std::stoi(config[XappSettings::SettingName::THREADS]); - mdclog_write(MDCLOG_INFO, "Starting Listener Threads. Number of Workers = %d", num_threads); - - std::unique_ptr mp_handler = std::make_unique(config[XappSettings::SettingName::XAPP_ID], sub_handler); - - b_xapp->start_xapp_receiver(std::ref(*mp_handler)); - - sleep(20);//waiting for some time before sending delete. - - - b_xapp->shutdown();//will start the sending delete procedure. - while(1){ - sleep(1); - } - - return 0; -} - - - diff --git a/Bouncer/src/bouncer.cpp b/Bouncer/src/bouncer.cpp new file mode 100644 index 0000000..bae5820 --- /dev/null +++ b/Bouncer/src/bouncer.cpp @@ -0,0 +1,48 @@ +#include"bouncer.h" +//using namespace xapp; + +Bouncer::Bouncer(){ + set_gnb(); +} + +void Bouncer::set_gnb(){ + cpprestclient obj("http://service-ricplt-e2mgr-http.ricplt:3800"); + response_t res; + res=obj.do_get("/v1/nodeb/states"); + NodebListHandler handler; + + if( res.status_code == 200 ) + { + //Reader reader; + //StringStream ss( res.body.dump().c_str() ); + //reader.Parse( ss, handler ); + //std::cout << "[INFO] nodeb list is " << res.body.dump().c_str() << std::endl; + std::cout << "[INFO] nodeb list is " << res.body<< std::endl; + std::vector inventoryNames; + std::cout <<"pol"<gnb_list.push_back(inventoryName); + } + + } + + else + { + if( res.body.empty() ) + { + std::cout << "[ERROR] Unexpected HTTP code " << res.status_code << std::endl; + } + + else + { + std::cout << "[ERROR] Unexpected HTTP code " << res.status_code <<" HTTP payload is " << res.body.dump().c_str() << std::endl; + } + } + + //this->gnb_list= handler.nodeb_list; + +} + diff --git a/Bouncer/src/bouncer.h b/Bouncer/src/bouncer.h new file mode 100644 index 0000000..cc09fef --- /dev/null +++ b/Bouncer/src/bouncer.h @@ -0,0 +1,10 @@ +#include"subscription.h" +#include"helper.h" +class Bouncer{ + + public: + Bouncer(); + std::vector gnb_list; + void set_gnb(); +}; + diff --git a/Bouncer/src/header.h b/Bouncer/src/header.h new file mode 100644 index 0000000..e285ce5 --- /dev/null +++ b/Bouncer/src/header.h @@ -0,0 +1,18 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../e2ap/headers/E2AP-PDU.h" +using namespace rapidjson; +using namespace std; +using namespace xapp; diff --git a/Bouncer/src/helper.h b/Bouncer/src/helper.h new file mode 100644 index 0000000..03c3286 --- /dev/null +++ b/Bouncer/src/helper.h @@ -0,0 +1,18 @@ +#include"header.h" +struct NodebListHandler : public BaseReaderHandler, NodebListHandler> { + vector nodeb_list; + string curr_key = ""; + + bool Key(const Ch* str, SizeType length, bool copy) { + curr_key = str; + return true; + } + + bool String(const Ch* str, SizeType length, bool copy) { + if( curr_key.compare( "inventoryName" ) == 0 ) { + std::cout< xfw; + +void display_json(web::json::value const & jvalue){ + std::cout<<"\ndisplaying REST Notification\n"; + std::wcout << jvalue.serialize().c_str() << std::endl; +} + + +void indication_callback( Message& mbuf, int mtype, int subid, int len, Msg_component payload, void* data ) { + + std::cout << "[INFO] indication Callback got a message, type=" << mtype << ", length=" << len << std::endl; + //std::string json ((char *)payload.get(), len); // RMR payload might not have a nil terminanted char + + E2AP_PDU_t* e2pdu = (E2AP_PDU_t*)calloc(1, sizeof(E2AP_PDU)); + asn_transfer_syntax syntax; + syntax = ATS_ALIGNED_BASIC_PER; + auto rval = asn_decode(nullptr, syntax, &asn_DEF_E2AP_PDU, (void**)&e2pdu, (char *)payload.get(), len); + if(rval.code == RC_OK) + { + std::cout << "[INFO] E2AP indication decode successfull rval.code = "< task) { + try + { + answer = task.get(); + display_json(answer); + } + catch (web::http::http_exception const & e) + { + std::wcout << e.what() << std::endl; + } + + }) + .wait(); + + request.reply(web::http::status_codes::OK, answer); +} + +extern int main( int argc, char** argv ) { + + int nthreads = 1; + char* port = (char *) "4560"; + xfw = std::unique_ptr( new Xapp( port, true ) ); + xfw->Add_msg_cb( RIC_INDICATION , indication_callback, NULL ); + + Bouncer B; + + + while(B.gnb_list.size() ==0){ + B.set_gnb(); + } + std::cout << "[INFO] size of gnb list is "<Run( nthreads ); + +} diff --git a/Bouncer/src/routes.txt b/Bouncer/src/routes.txt deleted file mode 100644 index 6012ac3..0000000 --- a/Bouncer/src/routes.txt +++ /dev/null @@ -1,15 +0,0 @@ -newrt|start -rte|100|127.0.0.1:4560 -rte|101|127.0.0.1:4560 -rte|20010|127.0.0.1:4560 -rte|20011|127.0.0.1:4560 -rte|20012|127.0.0.1:4560 -rte|12010|127.0.0.1:4560 -rte|12011|127.0.0.1:4560 -rte|12012|127.0.0.1:4560 -rte|12020|127.0.0.1:4560 -rte|12021|127.0.0.1:4560 -rte|12022|127.0.0.1:4560 -rte|12050|127.0.0.1:4560 -rte|12040|127.0.0.1:4560 -newrt|end diff --git a/Bouncer/src/run_xapp.sh b/Bouncer/src/run_xapp.sh deleted file mode 100644 index 5cca845..0000000 --- a/Bouncer/src/run_xapp.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/bash - -export RMR_SEED_RT="routes.txt" -export RMR_RTG_SVC="9999" -export XAPP_NAME="BOUNCER_XAPP" -export BOUNCER_PORT="4560" -export MSG_MAX_BUFFER="2048" -export THREADS="1" -export VERBOSE="0" -export CONFIG_FILE="config/config-file.json" -export GNODEB="NYC123" -export XAPP_ID="3489-er492k-92389" -export VES_SCHEMA_FILE="schemas/b_xapp-ves.json" -export VES_COLLECTOR_URL="127.0.0.1:6350" -export VES_MEASUREMENT_INTERVAL="10" -export LOG_LEVEL="MDCLOG_ERR" -export OPERATING_MODE="CONTROL" - - - diff --git a/Bouncer/src/subscription.h b/Bouncer/src/subscription.h new file mode 100644 index 0000000..f05118c --- /dev/null +++ b/Bouncer/src/subscription.h @@ -0,0 +1,29 @@ +#include"header.h" +struct subscriptionJson{ + nlohmann::json jsonObject = + { + + + + {"SubscriptionId",""}, + {"ClientEndpoint",{{"Host","service-ricxapp-bouncer-xapp-http.ricxapp"},{"HTTPPort",8080},{"RMRPort",4560}}}, + {"Meid","meid"}, + {"RANFunctionID",1}, + {"SubscriptionDetails", + { + { + {"XappEventInstanceId",12345},{"EventTriggers",{8,39,15}}, + {"ActionToBeSetupList", + { + { + {"ActionID",1},{"ActionType","report"},{"ActionDefinition",{0}},{"SubsequentAction",{{"SubsequentActionType","continue"},{"TimeToWait","zero"}}} + } + } + } + } + } + } + + }; + +}; diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_control.cc b/Bouncer/src/xapp-asn/e2ap/e2ap_control.cc deleted file mode 100644 index 638b618..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_control.cc +++ /dev/null @@ -1,266 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_control_request.c - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#include "e2ap_control.hpp" - -// Set up memory allocations for each IE for encoding -// We are responsible for memory management for each IE for encoding -// Hence destructor should clear out memory -// When decoding, we rely on asn1c macro (ASN_STRUCT_FREE to be called -// for releasing memory by external calling function) -ric_control_request::ric_control_request(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2AP_PDU_t * )calloc(1, sizeof(E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = 0; - initMsg = (InitiatingMessage_t * )calloc(1, sizeof(InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = 0; - IE_array = (RICcontrolRequest_IEs_t *)calloc(NUM_CONTROL_REQUEST_IES, sizeof(RICcontrolRequest_IEs_t)); - assert(IE_array != 0); - - e2ap_pdu_obj->present = E2AP_PDU_PR_initiatingMessage; - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - - -}; - - -// Clear assigned protocolIE list from RIC control_request IE container -ric_control_request::~ric_control_request(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing E2AP Control Request object memory"); - - RICcontrolRequest_t *ricControl_Request = &(initMsg->value.choice.RICcontrolRequest); - for(int i = 0; i < ricControl_Request->protocolIEs.list.size; i++){ - ricControl_Request->protocolIEs.list.array[i] = 0; - } - - if (ricControl_Request->protocolIEs.list.size > 0){ - free(ricControl_Request->protocolIEs.list.array); - ricControl_Request->protocolIEs.list.size = 0; - ricControl_Request->protocolIEs.list.count = 0; - } - - free(IE_array); - free(initMsg); - e2ap_pdu_obj->choice.initiatingMessage = 0; - - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed E2AP Control Request object mempory"); - -} - - -bool ric_control_request::encode_e2ap_control_request(unsigned char *buf, size_t *size, ric_control_helper & dinput){ - - initMsg->procedureCode = ProcedureCode_id_RICcontrol; - initMsg->criticality = Criticality_ignore; - initMsg->value.present = InitiatingMessage__value_PR_RICcontrolRequest; - - bool res; - - res = set_fields(initMsg, dinput); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding control . Reason = " + error_string; - return false; - } - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding event trigger definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool ric_control_request::set_fields(InitiatingMessage_t *initMsg, ric_control_helper &dinput){ - unsigned int ie_index; - - if (initMsg == 0){ - error_string = "Invalid reference for E2AP Control_Request message in set_fields"; - return false; - } - - RICcontrolRequest_t * ric_control_request = &(initMsg->value.choice.RICcontrolRequest); - ric_control_request->protocolIEs.list.count = 0; // reset - - // for(i = 0; i < NUM_CONTROL_REQUEST_IES;i++){ - // memset(&(IE_array[i]), 0, sizeof(RICcontrolRequest_IEs_t)); - // } - - // Mandatory IE - ie_index = 0; - RICcontrolRequest_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICcontrolRequest_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = dinput.req_id; - //ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - // Mandatory IE - ie_index = 1; - RICcontrolRequest_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICcontrolRequest_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = dinput.func_id; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - - // Mandatory IE - ie_index = 2; - RICcontrolRequest_IEs_t *ies_richead = &IE_array[ie_index]; - ies_richead->criticality = Criticality_reject; - ies_richead->id = ProtocolIE_ID_id_RICcontrolHeader; - ies_richead->value.present = RICcontrolRequest_IEs__value_PR_RICcontrolHeader; - RICcontrolHeader_t *richeader_ie = &ies_richead->value.choice.RICcontrolHeader; - richeader_ie->buf = dinput.control_header; - richeader_ie->size = dinput.control_header_size; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - // Mandatory IE - ie_index = 3; - RICcontrolRequest_IEs_t *ies_indmsg = &IE_array[ie_index]; - ies_indmsg->criticality = Criticality_reject; - ies_indmsg->id = ProtocolIE_ID_id_RICcontrolMessage; - ies_indmsg->value.present = RICcontrolRequest_IEs__value_PR_RICcontrolMessage; - RICcontrolMessage_t *ricmsg_ie = &ies_indmsg->value.choice.RICcontrolMessage; - ricmsg_ie->buf = dinput.control_msg; - ricmsg_ie->size = dinput.control_msg_size; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - // Optional IE - ie_index = 4; - if (dinput.control_ack >= 0){ - RICcontrolRequest_IEs_t *ies_indtyp = &IE_array[ie_index]; - ies_indtyp->criticality = Criticality_reject; - ies_indtyp->id = ProtocolIE_ID_id_RICcontrolAckRequest; - ies_indtyp->value.present = RICcontrolRequest_IEs__value_PR_RICcontrolAckRequest; - RICcontrolAckRequest_t *ricackreq_ie = &ies_indtyp->value.choice.RICcontrolAckRequest; - *ricackreq_ie = dinput.control_ack; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - } - - // Optional IE - ie_index = 5; - if(dinput.call_process_id_size > 0){ - RICcontrolRequest_IEs_t *ies_callprocid = &IE_array[ie_index]; - ies_callprocid->criticality = Criticality_reject; - ies_callprocid->id = ProtocolIE_ID_id_RICcallProcessID; - ies_callprocid->value.present = RICcontrolRequest_IEs__value_PR_RICcallProcessID; - RICcallProcessID_t *riccallprocessid_ie = &ies_callprocid->value.choice.RICcallProcessID; - riccallprocessid_ie->buf = dinput.call_process_id; - riccallprocessid_ie->size = dinput.call_process_id_size; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - } - return true; - -}; - - - - -bool ric_control_request:: get_fields(InitiatingMessage_t * init_msg, ric_control_helper &dout) -{ - if (init_msg == 0){ - error_string = "Invalid reference for E2AP Control_Request message in get_fields"; - return false; - } - - - for(int edx = 0; edx < init_msg->value.choice.RICcontrolRequest.protocolIEs.list.count; edx++) { - RICcontrolRequest_IEs_t *memb_ptr = init_msg->value.choice.RICcontrolRequest.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICcontrolHeader): - dout.control_header = memb_ptr->value.choice.RICcontrolHeader.buf; - dout.control_header_size = memb_ptr->value.choice.RICcontrolHeader.size; - break; - - case (ProtocolIE_ID_id_RICcontrolMessage): - dout.control_msg = memb_ptr->value.choice.RICcontrolMessage.buf; - dout.control_msg_size = memb_ptr->value.choice.RICcontrolMessage.size; - break; - - case (ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - break; - - case (ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - //dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - case (ProtocolIE_ID_id_RICcontrolAckRequest): - dout.control_ack = memb_ptr->value.choice.RICcontrolAckRequest; - break; - - default: - break; - } - - } - - return true; - -} - -InitiatingMessage_t * ric_control_request::get_message(void) { - return initMsg; -} diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_control.hpp b/Bouncer/src/xapp-asn/e2ap/e2ap_control.hpp deleted file mode 100644 index 2a2272c..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_control.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef E2AP_RIC_CONTROL_REQUEST_H_ -#define E2AP_RIC_CONTROL_REQUEST_H_ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "e2ap_control_helper.hpp" - -#define NUM_CONTROL_REQUEST_IES 6 - - -class ric_control_request{ - -public: - ric_control_request(void); - ~ric_control_request(void); - - bool encode_e2ap_control_request(unsigned char *, size_t *, ric_control_helper &); - InitiatingMessage_t * get_message (void) ; - bool set_fields(InitiatingMessage_t *, ric_control_helper &); - bool get_fields(InitiatingMessage_t *, ric_control_helper &); - std::string get_error(void) const {return error_string ; }; -private: - - E2AP_PDU_t * e2ap_pdu_obj; - InitiatingMessage_t *initMsg; - RICcontrolRequest_IEs_t *IE_array; - std::string error_string; - - char errbuf[128]; - size_t errbuf_len = 128; -}; - - -#endif /* E2AP_RIC_CONTROL_REQUEST_H_ */ diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_control_helper.hpp b/Bouncer/src/xapp-asn/e2ap/e2ap_control_helper.hpp deleted file mode 100644 index d01013e..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_control_helper.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef CONTROL_HELPER_H -#define CONTROL_HELPER_H - -// control and indication helper objects are very similar and can be merged into one -// currently leaving them as two distnict entities till final design becomes clear - -typedef struct ric_control_helper ric_control_helper; - -struct ric_control_helper{ - ric_control_helper(void):req_id(1), req_seq_no(1), func_id(0), action_id(1), control_ack(-1), cause(0), sub_cause(0), control_status(1), control_msg(0), control_msg_size(0), control_header(0), control_header_size(0), call_process_id(0), call_process_id_size(0){}; - - long int req_id, req_seq_no, func_id, action_id, control_ack, cause, sub_cause, control_status; - - unsigned char* control_msg; - size_t control_msg_size; - - unsigned char* control_header; - size_t control_header_size; - - unsigned char *call_process_id; - size_t call_process_id_size; - -}; - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_control_response.cc b/Bouncer/src/xapp-asn/e2ap/e2ap_control_response.cc deleted file mode 100644 index 6b7c9b5..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_control_response.cc +++ /dev/null @@ -1,415 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== - */ -/* - * ric_control_response.c - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#include "e2ap_control_response.hpp" - -// Set up the initiating message and also allocate protocolIEs in container -// Note : this bypasses requirement to use ASN_SEQUENCE_ADD. We can directly -// assign pointers to the array in ProtocolIE. However, this also leaves us on the -// hook to manually clear the memory - -ric_control_response::ric_control_response(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2AP_PDU_t * )calloc(1, sizeof(E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - successMsg = 0; - successMsg = (SuccessfulOutcome_t * )calloc(1, sizeof(SuccessfulOutcome_t)); - assert(successMsg != 0); - - successMsg->procedureCode = ProcedureCode_id_RICcontrol; - successMsg->criticality = Criticality_reject; - successMsg->value.present = SuccessfulOutcome__value_PR_RICcontrolAcknowledge; - - - unsuccessMsg = 0; - unsuccessMsg = (UnsuccessfulOutcome_t * )calloc(1, sizeof(UnsuccessfulOutcome_t)); - assert(unsuccessMsg != 0); - - - unsuccessMsg->procedureCode = ProcedureCode_id_RICcontrol; - unsuccessMsg->criticality = Criticality_reject; - unsuccessMsg->value.present = UnsuccessfulOutcome__value_PR_RICcontrolFailure; - - IE_array = 0; - IE_array = (RICcontrolAcknowledge_IEs_t *)calloc(NUM_CONTROL_ACKNOWLEDGE_IES, sizeof(RICcontrolAcknowledge_IEs_t)); - assert(IE_array != 0); - - RICcontrolAcknowledge_t * ric_acknowledge = &(successMsg->value.choice.RICcontrolAcknowledge); - for(int i = 0; i < NUM_CONTROL_ACKNOWLEDGE_IES; i++){ - ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), &(IE_array[i])); - } - - - IE_failure_array = 0; - IE_failure_array = (RICcontrolFailure_IEs_t *)calloc(NUM_CONTROL_FAILURE_IES, sizeof(RICcontrolFailure_IEs_t)); - assert(IE_failure_array != 0); - - RICcontrolFailure_t * ric_failure = &(unsuccessMsg->value.choice.RICcontrolFailure); - for(int i = 0; i < NUM_CONTROL_FAILURE_IES; i++){ - ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), &(IE_failure_array[i])); - } - -}; - - -// Clear assigned protocolIE list from RIC control_request IE container -ric_control_response::~ric_control_response(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing E2AP Control Response object memory"); - - RICcontrolAcknowledge_t * ric_acknowledge = &(successMsg->value.choice.RICcontrolAcknowledge); - for(int i = 0; i < ric_acknowledge->protocolIEs.list.size; i++){ - ric_acknowledge->protocolIEs.list.array[i] = 0; - } - if (ric_acknowledge->protocolIEs.list.size > 0){ - free(ric_acknowledge->protocolIEs.list.array); - ric_acknowledge->protocolIEs.list.array = 0; - ric_acknowledge->protocolIEs.list.count = 0; - } - - RICcontrolFailure_t * ric_failure = &(unsuccessMsg->value.choice.RICcontrolFailure); - for(int i = 0; i < ric_failure->protocolIEs.list.size; i++){ - ric_failure->protocolIEs.list.array[i] = 0; - } - if (ric_failure->protocolIEs.list.size > 0){ - free(ric_failure->protocolIEs.list.array); - ric_failure->protocolIEs.list.array = 0; - ric_failure->protocolIEs.list.count = 0; - } - - free(IE_array); - free(IE_failure_array); - free(successMsg); - free(unsuccessMsg); - - e2ap_pdu_obj->choice.initiatingMessage = 0; - e2ap_pdu_obj->present = E2AP_PDU_PR_initiatingMessage; - - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed E2AP Control Response object mempory"); -} - - -bool ric_control_response::encode_e2ap_control_response(unsigned char *buf, size_t *size, ric_control_helper & dinput, bool is_success){ - - bool res; - if (is_success){ - res = set_fields(successMsg, dinput); - } - else{ - res = set_fields(unsuccessMsg, dinput); - } - - if (!res){ - return false; - } - - - if (is_success){ - e2ap_pdu_obj->choice.successfulOutcome = successMsg; - e2ap_pdu_obj->present = E2AP_PDU_PR_successfulOutcome ; - } - else{ - e2ap_pdu_obj->choice.unsuccessfulOutcome = unsuccessMsg; - e2ap_pdu_obj->present = E2AP_PDU_PR_unsuccessfulOutcome ; - - } - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - int ret_constr = asn_check_constraints(&asn_DEF_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding control response. Reason = " + error_string; - return false; - } - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding E2AP Control response . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool ric_control_response::set_fields(SuccessfulOutcome_t *successMsg, ric_control_helper &dinput){ - unsigned int ie_index; - - if (successMsg == 0){ - error_string = "Invalid reference for E2AP Control Acknowledge in set_fields"; - return false; - } - - // for(i = 0; i < NUM_CONTROL_ACKNOWLEDGE_IES;i++){ - // memset(&(IE_array[i]), 0, sizeof(RICcontrolAcknowledge_IEs_t)); - // } - - //RICcontrolAcknowledge_t * ric_acknowledge = &(successMsg->value.choice.RICcontrolAcknowledge); - //ric_acknowledge->protocolIEs.list.count = 0; - - ie_index = 0; - RICcontrolAcknowledge_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICcontrolAcknowledge_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = dinput.req_id; - //ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - //ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_ricreq); - - ie_index = 1; - RICcontrolAcknowledge_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICcontrolAcknowledge_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = dinput.func_id; - //ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_ranfunc); - - // ie_index = 2; - // RICcontrolAcknowledge_IEs_t *ies_riccallprocessid = &IE_array[ie_index]; - // ies_riccallprocessid->criticality = Criticality_reject; - // ies_riccallprocessid->id = ProtocolIE_ID_id_RICcallProcessID; - // ies_riccallprocessid->value.present = RICcontrolAcknowledge_IEs__value_PR_RICcallProcessID; - // RICcallProcessID_t *riccallprocessid_ie = &ies_riccallprocessid->value.choice.RICcallProcessID; - // riccallprocessid_ie->buf = dinput.call_process_id; - // riccallprocessid_ie->size = dinput.call_process_id_size; - // ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_riccallprocessid); - - ie_index = 2; - RICcontrolAcknowledge_IEs_t *ies_ric_cause = &IE_array[ie_index]; - ies_ric_cause->criticality = Criticality_reject; - ies_ric_cause->id = ProtocolIE_ID_id_RICcontrolStatus; - ies_ric_cause->value.present = RICcontrolAcknowledge_IEs__value_PR_RICcontrolStatus; - ies_ric_cause->value.choice.RICcontrolStatus = dinput.control_status; - //ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_ric_cause); - - return true; - -}; - -bool ric_control_response::set_fields(UnsuccessfulOutcome_t *unsuccessMsg, ric_control_helper &dinput){ - unsigned int ie_index; - - if (unsuccessMsg == 0){ - error_string = "Invalid reference for E2AP Control Failure in set_fields"; - return false; - } - - // for(i = 0; i < NUM_CONTROL_FAILURE_IES;i++){ - // memset(&(IE_failure_array[i]), 0, sizeof(RICcontrolFailure_IEs_t)); - // } - - //RICcontrolFailure_t * ric_failure = &(unsuccessMsg->value.choice.RICcontrolFailure); - //ric_failure->protocolIEs.list.count = 0; - - ie_index = 0; - RICcontrolFailure_IEs_t *ies_ricreq = &IE_failure_array[ie_index]; - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICcontrolFailure_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &(ies_ricreq->value.choice.RICrequestID); - ricrequest_ie->ricRequestorID = dinput.req_id; - //ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - //ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_ricreq); - - ie_index = 1; - RICcontrolFailure_IEs_t *ies_ranfunc = &IE_failure_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICcontrolFailure_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &(ies_ranfunc->value.choice.RANfunctionID); - *ranfunction_ie = dinput.func_id; - //ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_ranfunc); - - // ie_index = 2; - // RICcontrolFailure_IEs_t *ies_riccallprocessid = &IE_failure_array[i]; - // ies_riccallprocessid->criticality = Criticality_reject; - // ies_riccallprocessid->id = ProtocolIE_ID_id_RICcallProcessID; - // ies_riccallprocessid->value.present = RICcontrolFailure_IEs__value_PR_RICcallProcessID; - // RICcallProcessID_t *riccallprocessid_ie = &(ies_riccallprocessid->value.choice.RICcallProcessID); - // riccallprocessid_ie->buf = dinput.call_process_id; - // riccallprocessid_ie->size = dinput.call_process_id_size; - // ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_riccallprocessid); - - ie_index = 2; - RICcontrolFailure_IEs_t *ies_ric_cause = &IE_failure_array[ie_index]; - ies_ric_cause->criticality = Criticality_ignore; - ies_ric_cause->id = ProtocolIE_ID_id_Cause; - ies_ric_cause->value.present = RICcontrolFailure_IEs__value_PR_Cause; - Cause_t * ric_cause = &(ies_ric_cause->value.choice.Cause); - ric_cause->present = (Cause_PR)dinput.cause; - - switch(dinput.cause){ - case Cause_PR_ricService: - ric_cause->choice.ricService = dinput.sub_cause; - break; - case Cause_PR_transport: - ric_cause->choice.transport = dinput.sub_cause; - break; - case Cause_PR_protocol: - ric_cause->choice.protocol= dinput.sub_cause; - break; - case Cause_PR_misc: - ric_cause->choice.misc = dinput.sub_cause; - break; - case Cause_PR_ricRequest: - ric_cause->choice.ricRequest = dinput.sub_cause; - break; - default: - std::cout <<"Error ! Illegal cause enum" << dinput.cause << std::endl; - return false; - } - - //ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_ric_cause); - return true; - -}; - - - - -bool ric_control_response:: get_fields(SuccessfulOutcome_t * success_msg, ric_control_helper &dout) -{ - if (success_msg == 0){ - error_string = "Invalid reference for E2AP Control Acknowledge message in get_fields"; - return false; - } - - - for(int edx = 0; edx < success_msg->value.choice.RICcontrolAcknowledge.protocolIEs.list.count; edx++) { - RICcontrolAcknowledge_IEs_t *memb_ptr = success_msg->value.choice.RICcontrolAcknowledge.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - - case (ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - break; - - case (ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - //dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - case (ProtocolIE_ID_id_Cause): - dout.control_status = memb_ptr->value.choice.RICcontrolStatus; - break; - - } - - } - - return true; - -} - - -bool ric_control_response:: get_fields(UnsuccessfulOutcome_t * unsuccess_msg, ric_control_helper &dout) -{ - if (unsuccess_msg == 0){ - error_string = "Invalid reference for E2AP Control Failure message in get_fields"; - return false; - } - - - for(int edx = 0; edx < unsuccess_msg->value.choice.RICcontrolFailure.protocolIEs.list.count; edx++) { - RICcontrolFailure_IEs_t *memb_ptr = unsuccess_msg->value.choice.RICcontrolFailure.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - - case (ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - break; - - case (ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - //dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - - case (ProtocolIE_ID_id_Cause): - dout.cause = memb_ptr->value.choice.Cause.present; - switch(dout.cause){ - case Cause_PR_ricService : - dout.sub_cause = memb_ptr->value.choice.Cause.choice.ricService; - break; - - case Cause_PR_transport : - dout.sub_cause = memb_ptr->value.choice.Cause.choice.transport; - break; - - case Cause_PR_protocol : - dout.sub_cause = memb_ptr->value.choice.Cause.choice.protocol; - break; - - case Cause_PR_misc : - dout.sub_cause = memb_ptr->value.choice.Cause.choice.misc; - break; - - case Cause_PR_ricRequest : - dout.sub_cause = memb_ptr->value.choice.Cause.choice.ricRequest; - break; - - default: - dout.sub_cause = -1; - break; - } - - default: - break; - } - - } - - return true; - -} - diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_control_response.hpp b/Bouncer/src/xapp-asn/e2ap/e2ap_control_response.hpp deleted file mode 100644 index 1d6af17..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_control_response.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef E2AP_RIC_CONTROL_RESPONSE_H_ -#define E2AP_RIC_CONTROL_RESPONSE_H_ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "e2ap_control_helper.hpp" - -#define NUM_CONTROL_ACKNOWLEDGE_IES 3 -#define NUM_CONTROL_FAILURE_IES 3 - - -class ric_control_response{ - -public: - ric_control_response(void); - ~ric_control_response(void); - - bool encode_e2ap_control_response(unsigned char *, size_t *, ric_control_helper &, bool); - - - bool set_fields(SuccessfulOutcome_t *, ric_control_helper &); - bool get_fields(SuccessfulOutcome_t *, ric_control_helper &); - - bool set_fields(UnsuccessfulOutcome_t *, ric_control_helper &); - bool get_fields(UnsuccessfulOutcome_t *, ric_control_helper &); - - std::string get_error(void) const {return error_string ; }; - -private: - - E2AP_PDU_t * e2ap_pdu_obj; - SuccessfulOutcome_t * successMsg; - UnsuccessfulOutcome_t * unsuccessMsg; - - RICcontrolAcknowledge_IEs_t *IE_array; - RICcontrolFailure_IEs_t *IE_failure_array; - - std::string error_string; - - char errbuf[128]; - size_t errbuf_len = 128; -}; - - -#endif /* E2AP_RIC_CONTROL_RESPONSE_H_ */ diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_indication.cc b/Bouncer/src/xapp-asn/e2ap/e2ap_indication.cc deleted file mode 100644 index c9f9130..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_indication.cc +++ /dev/null @@ -1,283 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.c - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#include "e2ap_indication.hpp" - -// Set up memory allocations for each IE for encoding -// We are responsible for memory management for each IE for encoding -// Hence destructor should clear out memory -// When decoding, we rely on asn1c macro (ASN_STRUCT_FREE to be called -// for releasing memory by external calling function) -ric_indication::ric_indication(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2AP_PDU_t * )calloc(1, sizeof(E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = 0; - initMsg = (InitiatingMessage_t * )calloc(1, sizeof(InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = 0; - IE_array = (RICindication_IEs_t *)calloc(NUM_INDICATION_IES, sizeof(RICindication_IEs_t)); - assert(IE_array != 0); - - e2ap_pdu_obj->present = E2AP_PDU_PR_initiatingMessage; - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - - - - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -ric_indication::~ric_indication(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing E2AP Indication object memory"); - RICindication_t *ricIndication = &(initMsg->value.choice.RICindication); - for(int i = 0; i < ricIndication->protocolIEs.list.size; i++){ - ricIndication->protocolIEs.list.array[i] = 0; - } - if (ricIndication->protocolIEs.list.size > 0){ - free(ricIndication->protocolIEs.list.array); - ricIndication->protocolIEs.list.array = 0; - ricIndication->protocolIEs.list.count = 0; - ricIndication->protocolIEs.list.size = 0; - } - - free(IE_array); - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed E2AP Indication object mempory"); -} - - -bool ric_indication::encode_e2ap_indication(unsigned char *buf, size_t *size, ric_indication_helper & dinput){ - - initMsg->procedureCode = ProcedureCode_id_RICindication; - initMsg->criticality = Criticality_ignore; - initMsg->value.present = InitiatingMessage__value_PR_RICindication; - - bool res; - asn_enc_rval_t retval; - - res = set_fields(initMsg, dinput); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2AP_PDU, e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - error_string = "Error encoding E2AP Indication message. Reason = " + error_string; - return false; - } - - // std::cout <<"Constraint check ok ...." << std::endl; - // xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding E2AP Indication . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool ric_indication::set_fields(InitiatingMessage_t *initMsg, ric_indication_helper &dinput){ - unsigned int ie_index; - - if (initMsg == 0){ - error_string = "Invalid reference for E2AP Indication message in set_fields"; - return false; - } - - - RICindication_t * ric_indication = &(initMsg->value.choice.RICindication); - ric_indication->protocolIEs.list.count = 0; - - ie_index = 0; - - RICindication_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICindication_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = dinput.req_id; - //ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 1; - RICindication_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICindication_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = dinput.func_id; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 2; - RICindication_IEs_t *ies_actid = &IE_array[ie_index]; - ies_actid->criticality = Criticality_reject; - ies_actid->id = ProtocolIE_ID_id_RICactionID; - ies_actid->value.present = RICindication_IEs__value_PR_RICactionID; - RICactionID_t *ricaction_ie = &ies_actid->value.choice.RICactionID; - *ricaction_ie = dinput.action_id; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 3; - RICindication_IEs_t *ies_ricsn = &IE_array[ie_index]; - ies_ricsn->criticality = Criticality_reject; - ies_ricsn->id = ProtocolIE_ID_id_RICindicationSN; - ies_ricsn->value.present = RICindication_IEs__value_PR_RICindicationSN; - RICindicationSN_t *ricsn_ie = &ies_ricsn->value.choice.RICindicationSN; - *ricsn_ie = dinput.indication_sn; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - - ie_index = 4; - RICindication_IEs_t *ies_indtyp = &IE_array[ie_index]; - ies_indtyp->criticality = Criticality_reject; - ies_indtyp->id = ProtocolIE_ID_id_RICindicationType; - ies_indtyp->value.present = RICindication_IEs__value_PR_RICindicationType; - RICindicationType_t *rictype_ie = &ies_indtyp->value.choice.RICindicationType; - *rictype_ie = dinput.indication_type; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 5; - RICindication_IEs_t *ies_richead = &IE_array[ie_index]; - ies_richead->criticality = Criticality_reject; - ies_richead->id = ProtocolIE_ID_id_RICindicationHeader; - ies_richead->value.present = RICindication_IEs__value_PR_RICindicationHeader; - RICindicationHeader_t *richeader_ie = &ies_richead->value.choice.RICindicationHeader; - richeader_ie->buf = dinput.indication_header; - richeader_ie->size = dinput.indication_header_size; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 6; - RICindication_IEs_t *ies_indmsg = &IE_array[ie_index]; - ies_indmsg->criticality = Criticality_reject; - ies_indmsg->id = ProtocolIE_ID_id_RICindicationMessage; - ies_indmsg->value.present = RICindication_IEs__value_PR_RICindicationMessage; - RICindicationMessage_t *ricmsg_ie = &ies_indmsg->value.choice.RICindicationMessage; - ricmsg_ie->buf = dinput.indication_msg; - ricmsg_ie->size = dinput.indication_msg_size; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - - // optional call process id .. - if (dinput.call_process_id_size > 0){ - ie_index = 7; - RICindication_IEs_t *ies_ind_callprocessid = &IE_array[ie_index]; - ies_ind_callprocessid->criticality = Criticality_reject; - ies_ind_callprocessid->id = ProtocolIE_ID_id_RICcallProcessID; - ies_ind_callprocessid->value.present = RICindication_IEs__value_PR_RICcallProcessID; - RICcallProcessID_t *riccallprocessid_ie = &ies_ind_callprocessid->value.choice.RICcallProcessID; - riccallprocessid_ie->buf = dinput.indication_msg; - riccallprocessid_ie->size = dinput.indication_msg_size; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - } - - return true; - -}; - - - - -bool ric_indication:: get_fields(InitiatingMessage_t * init_msg, ric_indication_helper &dout) -{ - if (init_msg == 0){ - error_string = "Invalid reference for E2AP Indication message in get_fields"; - return false; - } - - - for(int edx = 0; edx < init_msg->value.choice.RICindication.protocolIEs.list.count; edx++) { - RICindication_IEs_t *memb_ptr = init_msg->value.choice.RICindication.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICindicationHeader): - dout.indication_header = memb_ptr->value.choice.RICindicationHeader.buf; - dout.indication_header_size = memb_ptr->value.choice.RICindicationHeader.size; - break; - - case (ProtocolIE_ID_id_RICindicationMessage): - dout.indication_msg = memb_ptr->value.choice.RICindicationMessage.buf; - dout.indication_msg_size = memb_ptr->value.choice.RICindicationMessage.size; - break; - - case (ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - //dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - case (ProtocolIE_ID_id_RICindicationSN): - dout.indication_sn = memb_ptr->value.choice.RICindicationSN; - break; - - case (ProtocolIE_ID_id_RICindicationType): - dout.indication_type = memb_ptr->value.choice.RICindicationType; - break; - - case (ProtocolIE_ID_id_RICactionID): - dout.action_id = memb_ptr->value.choice.RICactionID; - break; - - case (ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - - default: - break; - } - - } - - return true; - -} - -InitiatingMessage_t * ric_indication::get_message(void) { - return initMsg; -} diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_indication.hpp b/Bouncer/src/xapp-asn/e2ap/e2ap_indication.hpp deleted file mode 100644 index 6c8abf1..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_indication.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef E2AP_RIC_INDICATION_H_ -#define E2AP_RIC_INDICATION_H_ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "e2ap_indication_helper.hpp" - -#define NUM_INDICATION_IES 8 - - - -class ric_indication{ - -public: - ric_indication(void); - ~ric_indication(void); - - bool encode_e2ap_indication(unsigned char *, size_t *, ric_indication_helper &); - InitiatingMessage_t * get_message (void) ; - bool set_fields(InitiatingMessage_t *, ric_indication_helper &); - bool get_fields(InitiatingMessage_t *, ric_indication_helper &); - std::string get_error(void) const {return error_string ; }; - -private: - - E2AP_PDU_t * e2ap_pdu_obj; - InitiatingMessage_t *initMsg; - RICindication_IEs_t *IE_array; - std::string error_string; - char errbuf[128]; - size_t errbuf_len = 128; -}; - - -#endif /* E2AP_RIC_INDICATION_H_ */ diff --git a/Bouncer/src/xapp-asn/e2ap/e2ap_indication_helper.hpp b/Bouncer/src/xapp-asn/e2ap/e2ap_indication_helper.hpp deleted file mode 100644 index e319c9f..0000000 --- a/Bouncer/src/xapp-asn/e2ap/e2ap_indication_helper.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - - -#ifndef E2AP_INDICATION_HELPER_ -#define E2AP_INDICATION_HELPER_ - -typedef struct ric_indication_helper ric_indication_helper; - -struct ric_indication_helper{ - ric_indication_helper(void) : req_id(1), req_seq_no(1), func_id(0), action_id(1), indication_type(0), indication_sn(0), indication_msg(0), indication_msg_size(0), indication_header(0), indication_header_size(0), call_process_id(0), call_process_id_size(0) {}; - long int req_id, req_seq_no, func_id, action_id, indication_type, indication_sn; - - unsigned char* indication_msg; - size_t indication_msg_size; - - unsigned char* indication_header; - size_t indication_header_size; - - unsigned char *call_process_id; - size_t call_process_id_size; - -}; - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/generic_helpers.hpp b/Bouncer/src/xapp-asn/e2ap/generic_helpers.hpp deleted file mode 100644 index 3e0c2df..0000000 --- a/Bouncer/src/xapp-asn/e2ap/generic_helpers.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#pragma once -#ifndef GENERIC_HELPERS -#define GENERIC_HELPERS - -#include - -/* Utilities */ - -class octet_helper { - -public: - octet_helper(void):_ref(NULL), _size(0){}; - octet_helper(const void *ref, int size):_ref(ref), _size(size){}; - void set_ref(const void *ref){ - _ref = ref; - } - - void set_size(size_t size){ - _size = size; - } - - const void * get_ref(void){return _ref ; }; - size_t get_size(void) const {return _size ; } ; - -private: - const void *_ref; - size_t _size; -}; - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/response_helper.hpp b/Bouncer/src/xapp-asn/e2ap/response_helper.hpp deleted file mode 100644 index e6aa65e..0000000 --- a/Bouncer/src/xapp-asn/e2ap/response_helper.hpp +++ /dev/null @@ -1,181 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_RESPONSE_HELPER_ -#define S_RESPONSE_HELPER_ - -#include -#include - -/* Simple structure to store action for RICaction of the Subscription response based on E2 v0.31 */ -struct ActionResponse { -public: - ActionResponse(int id): _is_admit(true), _id(id), _cause(-1), _sub_cause(-1){}; - ActionResponse(int id, int cause, int sub_cause): _is_admit(false), _id(id), _cause(cause), _sub_cause(sub_cause){}; - - int get_id() const{ - return _id; - }; - - int get_cause() const{ - return _cause; - }; - - int get_sub_cause() const{ - return _sub_cause; - }; - - bool is_admitted(void){ - return _is_admit; - }; - -private: - - bool _is_admit; - int _id, _cause, _sub_cause; - -}; - - -struct subscription_response_helper { - -public: - - using action_t = std::vector; - - subscription_response_helper(void){ - _action_admitted_ref = std::make_unique(); - _action_not_admitted_ref = std::make_unique(); - - }; - - // copy operator - subscription_response_helper(const subscription_response_helper &he ){ - _action_admitted_ref = std::make_unique(); - _action_not_admitted_ref = std::make_unique(); - - _req_id = he.get_request_id(); - _req_seq_no = he.get_req_seq(); - _func_id = he.get_function_id(); - - // Take care of the actions - for (auto const & e: *(he.get_admitted_list())){ - add_action(e.get_id()); - } - - for(auto const & e: *(he.get_not_admitted_list())){ - add_action(e.get_id(), e.get_cause(), e.get_sub_cause()); - }; - } - - - // assignment operator - void operator=(const subscription_response_helper & he){ - _action_admitted_ref = std::make_unique(); - _action_not_admitted_ref = std::make_unique(); - - _req_id = he.get_request_id(); - _req_seq_no = he.get_req_seq(); - _func_id = he.get_function_id(); - - - // Take care of the actions - for (auto const & e: *(he.get_admitted_list())){ - add_action(e.get_id()); - } - - for(auto const & e: *(he.get_not_admitted_list())){ - add_action(e.get_id(), e.get_cause(), e.get_sub_cause()); - }; - - } - - action_t * get_admitted_list (void ) const {return _action_admitted_ref.get();}; - action_t * get_not_admitted_list (void ) const{return _action_not_admitted_ref.get();}; - - void set_request(int id, int seq_no){ - _req_id = id; - _req_seq_no = seq_no; - - }; - - void clear(void){ - _action_admitted_ref.get()->clear(); - _action_not_admitted_ref.get()->clear(); - } - - - void set_function_id(int id){ - _func_id = id; - }; - - void add_action(int id){ - ActionResponse a(id) ; - _action_admitted_ref.get()->push_back(a); - }; - - void add_action(int id, int cause, int sub_cause){ - ActionResponse a (id, cause, sub_cause); - _action_not_admitted_ref.get()->push_back(a); - }; - - - int get_request_id(void) const{ - return _req_id; - } - - int get_req_seq(void) const{ - return _req_seq_no; - } - - int get_function_id(void) const{ - return _func_id; - } - - std::string to_string(void){ - std::string Info; - Info += "Request ID = " + std::to_string(_req_id) + "\n"; - Info += "Request Sequence No = " + std::to_string(_req_seq_no) + "\n"; - Info += "RAN Function ID = " + std::to_string(_func_id) + "\n"; - Info += "Actions Admitted =\n"; - int i = 0; - for(auto & e: *(_action_admitted_ref)){ - Info += std::to_string(i) + ": ID=" + std::to_string(e.get_id()) + "\n"; - i++; - } - Info += "Actions Not Admitted =\n"; - i = 0; - for(auto & e: *(_action_not_admitted_ref)){ - Info += std::to_string(i) + ": ID=" + std::to_string(e.get_id()) + ": Cause =" + std::to_string(e.get_cause()) + ": Sub-Cause=" + std::to_string(e.get_sub_cause()) + "\n"; - i++; - } - - return Info; - } - -private: - int _req_id, _req_seq_no, _func_id; - std::unique_ptr _action_admitted_ref; - std::unique_ptr _action_not_admitted_ref; - -}; - - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_delete_request.cc b/Bouncer/src/xapp-asn/e2ap/subscription_delete_request.cc deleted file mode 100644 index f63376e..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_delete_request.cc +++ /dev/null @@ -1,185 +0,0 @@ - - -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_delete_request.hpp" - -subscription_delete::subscription_delete(void){ - - _name = "default"; - - e2ap_pdu_obj = (E2AP_PDU_t * )calloc(1, sizeof(E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = (InitiatingMessage_t * )calloc(1, sizeof(InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = (RICsubscriptionDeleteRequest_IEs_t *)calloc(NUM_SUBSCRIPTION_DELETE_IES, sizeof(RICsubscriptionDeleteRequest_IEs_t)); - assert(IE_array != 0); - - RICsubscriptionDeleteRequest_t * subscription_delete = &(initMsg->value.choice.RICsubscriptionDeleteRequest); - for(int i = 0; i < NUM_SUBSCRIPTION_DELETE_IES; i++){ - ASN_SEQUENCE_ADD(&subscription_delete->protocolIEs, &(IE_array[i])); - } - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -subscription_delete::~subscription_delete(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription delete request object memory"); - RICsubscriptionDeleteRequest_t * subscription_delete = &(initMsg->value.choice.RICsubscriptionDeleteRequest); - - for(int i = 0; i < subscription_delete->protocolIEs.list.size; i++){ - subscription_delete->protocolIEs.list.array[i] = 0; - } - - if (subscription_delete->protocolIEs.list.size > 0){ - free(subscription_delete->protocolIEs.list.array); - subscription_delete->protocolIEs.list.count = 0; - subscription_delete->protocolIEs.list.size = 0; - subscription_delete->protocolIEs.list.array = 0; - } - - free(IE_array); - free(initMsg); - e2ap_pdu_obj->choice.initiatingMessage = 0; - - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed subscription delete request object memory"); - - -}; - - -bool subscription_delete::encode_e2ap_subscription(unsigned char *buf, size_t *size, subscription_helper &dinput){ - - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - e2ap_pdu_obj->present = E2AP_PDU_PR_initiatingMessage; - set_fields( dinput); - - initMsg->procedureCode = ProcedureCode_id_RICsubscriptionDelete; - initMsg->criticality = Criticality_reject; - initMsg->value.present = InitiatingMessage__value_PR_RICsubscriptionDeleteRequest; - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - int ret_constr = asn_check_constraints(&asn_DEF_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding subscription delete request. Reason = " + error_string; - return false; - } - - asn_enc_rval_t res = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(res.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding Subscription Delete Request. Reason = " + error_string; - return false; - } - else { - if(*size < res.encoded){ - std::stringstream ss; - ss <<"Error encoding Subscription Delete Request . Reason = encoded pdu size " << res.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - res.encoded = -1; - return false; - } - } - - *size = res.encoded; - return true; - -} - - -bool subscription_delete::set_fields( subscription_helper &helper) -{ - static long update_instance=0;//static variable to update ricInstaceID for sending delete req - unsigned int ie_index; - ie_index = 0; - RICsubscriptionDeleteRequest_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICsubscriptionDeleteRequest_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - update_instance++;//incrementing ricInstanceID by one, each time the bouncer send delete req - ricrequest_ie->ricInstanceID = update_instance; - mdclog_write(MDCLOG_INFO,"instance id for subsdelreq = %d", update_instance); - //ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - - - - ie_index = 1; - RICsubscriptionDeleteRequest_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICsubscriptionDeleteRequest_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - mdclog_write(MDCLOG_INFO,"ran function id for subsdelreq = %d", helper.get_function_id()); - //*ranfunction_ie =1; - - return true; -}; - - - - -bool subscription_delete:: get_fields(InitiatingMessage_t * init_msg, subscription_helper & dout) -{ - - if (init_msg == 0){ - error_string = "Invalid reference for initiating message for get string"; - return false; - } - - RICrequestID_t *requestid; - RANfunctionID_t * ranfunctionid; - - for(int edx = 0; edx < init_msg->value.choice.RICsubscriptionDeleteRequest.protocolIEs.list.count; edx++) { - RICsubscriptionDeleteRequest_IEs_t *memb_ptr = init_msg->value.choice.RICsubscriptionDeleteRequest.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - //dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - } - - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); - } - - return true; -} - - - diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_delete_request.hpp b/Bouncer/src/xapp-asn/e2ap/subscription_delete_request.hpp deleted file mode 100644 index b6d5bba..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_delete_request.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_DELETE_ -#define S_DELETE_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "subscription_helper.hpp" - -#define NUM_SUBSCRIPTION_DELETE_IES 2 - -class subscription_delete{ -public: - - subscription_delete(void); - ~subscription_delete(void); - - bool encode_e2ap_subscription(unsigned char *, size_t *, subscription_helper &); - bool set_fields(subscription_helper &); - bool get_fields(InitiatingMessage_t *, subscription_helper &); - - std::string get_error(void) const { - return error_string ; - } - -private: - - InitiatingMessage_t *initMsg; - E2AP_PDU_t * e2ap_pdu_obj; - - RICsubscriptionDeleteRequest_IEs_t * IE_array; - - - char errbuf[128]; - size_t errbuf_len = 128; - std::string _name; - std::string error_string; -}; - - - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_delete_response.cc b/Bouncer/src/xapp-asn/e2ap/subscription_delete_response.cc deleted file mode 100644 index 249b3cd..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_delete_response.cc +++ /dev/null @@ -1,292 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_delete_response.hpp" - -/* The xAPP need only worry about the get_fields from a response, since it does -not generate a response. Generating response however is included to support testing. -*/ - - -// Primarly for generation -subscription_delete_response::subscription_delete_response(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2AP_PDU_t *)calloc(1, sizeof(E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - successMsg = 0; - successMsg = (SuccessfulOutcome_t *)calloc(1, sizeof(SuccessfulOutcome_t)); - assert(successMsg != 0); - - unsuccessMsg = 0; - unsuccessMsg = (UnsuccessfulOutcome_t *)calloc(1, sizeof(UnsuccessfulOutcome_t)); - assert(unsuccessMsg != 0); - - IE_array = 0; - IE_array = (RICsubscriptionDeleteResponse_IEs_t *)calloc(NUM_SUBSCRIPTION_DELETE_RESPONSE_IES, sizeof(RICsubscriptionDeleteResponse_IEs_t)); - assert(IE_array != 0); - - IE_Failure_array = 0; - IE_Failure_array = (RICsubscriptionDeleteFailure_IEs_t *)calloc(NUM_SUBSCRIPTION_DELETE_FAILURE_IES, sizeof(RICsubscriptionDeleteFailure_IEs_t)); - assert(IE_Failure_array != 0); - - - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -subscription_delete_response::~subscription_delete_response(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription delete response memory"); - RICsubscriptionDeleteResponse_t * ric_subscription_delete_response = &(successMsg->value.choice.RICsubscriptionDeleteResponse); - - for(unsigned int i = 0; i < ric_subscription_delete_response->protocolIEs.list.size ; i++){ - ric_subscription_delete_response->protocolIEs.list.array[i] = 0; - } - - - RICsubscriptionDeleteFailure_t * ric_subscription_failure = &(unsuccessMsg->value.choice.RICsubscriptionDeleteFailure); - for(unsigned int i = 0; i < ric_subscription_failure->protocolIEs.list.size; i++){ - ric_subscription_failure->protocolIEs.list.array[i] = 0; - } - - free(IE_array); - free(IE_Failure_array); - - ASN_STRUCT_FREE(asn_DEF_SuccessfulOutcome, successMsg); - - ASN_STRUCT_FREE(asn_DEF_UnsuccessfulOutcome, unsuccessMsg); - - e2ap_pdu_obj->choice.successfulOutcome = NULL; - e2ap_pdu_obj->choice.unsuccessfulOutcome = NULL; - - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed subscription delete response memory"); - -}; - - -bool subscription_delete_response::encode_e2ap_subscription_delete_response(unsigned char *buf, size_t *size, subscription_response_helper &dinput, bool is_success){ - - bool res; - - if(is_success){ - res = set_fields(successMsg, dinput); - if (!res){ - return false; - } - e2ap_pdu_obj->present = E2AP_PDU_PR_successfulOutcome; - e2ap_pdu_obj->choice.successfulOutcome = successMsg; - } - else{ - res = set_fields(unsuccessMsg, dinput); - if(! res){ - return false; - } - e2ap_pdu_obj->present = E2AP_PDU_PR_unsuccessfulOutcome; - e2ap_pdu_obj->choice.unsuccessfulOutcome = unsuccessMsg; - } - - - int ret_constr = asn_check_constraints(&asn_DEF_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - return false; - } - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding subcription delete response. Reason = " + error_string; - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding Subscription Delete Response . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - retval.encoded = -1; - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool subscription_delete_response::set_fields(SuccessfulOutcome_t *success, subscription_response_helper &helper){ - - if (success == 0){ - error_string = "Invalid reference to success message in set fields subscription delete response"; - return false; - } - - unsigned int ie_index; - - success->procedureCode = ProcedureCode_id_RICsubscriptionDelete; - success->criticality = Criticality_reject; - success->value.present = SuccessfulOutcome__value_PR_RICsubscriptionDeleteResponse; - - RICsubscriptionDeleteResponse_t * subscription_delete_response = &(success->value.choice.RICsubscriptionDeleteResponse); - subscription_delete_response->protocolIEs.list.count = 0; - - ie_index = 0; - RICsubscriptionDeleteResponse_IEs_t *ies_ricreq = &IE_array[ie_index]; - - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICsubscriptionDeleteResponse_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - //ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&subscription_delete_response->protocolIEs, ies_ricreq); - - - ie_index = 1; - RICsubscriptionDeleteResponse_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICsubscriptionDeleteResponse_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&subscription_delete_response->protocolIEs, ies_ranfunc); - - return true; - - -} - -bool subscription_delete_response:: get_fields(SuccessfulOutcome_t * success_msg, subscription_response_helper & dout) -{ - - if (success_msg == 0){ - error_string = "Invalid reference to success message inn get fields subscription delete response"; - return false; - } - - RICrequestID_t *requestid; - RANfunctionID_t * ranfunctionid; - - for(int edx = 0; edx < success_msg->value.choice.RICsubscriptionDeleteResponse.protocolIEs.list.count; edx++) { - RICsubscriptionDeleteResponse_IEs_t *memb_ptr = success_msg->value.choice.RICsubscriptionDeleteResponse.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - //dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - } - - } - - return true; - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - -bool subscription_delete_response::set_fields(UnsuccessfulOutcome_t *unsuccess, subscription_response_helper &helper){ - - if (unsuccess == 0){ - error_string = "Invalid reference to unsuccess message in set fields subscription delete response"; - return false; - } - - unsigned int ie_index; - - unsuccess->procedureCode = ProcedureCode_id_RICsubscriptionDelete; - unsuccess->criticality = Criticality_reject; - unsuccess->value.present = UnsuccessfulOutcome__value_PR_RICsubscriptionDeleteFailure; - - RICsubscriptionDeleteFailure_t * ric_subscription_failure = &(unsuccess->value.choice.RICsubscriptionDeleteFailure); - ric_subscription_failure->protocolIEs.list.count = 0; - - ie_index = 0; - RICsubscriptionDeleteFailure_IEs_t *ies_ricreq = &IE_Failure_array[ie_index]; - - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICsubscriptionDeleteFailure_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - //ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, ies_ricreq); - - ie_index = 1; - RICsubscriptionDeleteFailure_IEs_t *ies_ranfunc = &IE_Failure_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICsubscriptionDeleteFailure_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, ies_ranfunc); - - - return true; - -} - -bool subscription_delete_response:: get_fields(UnsuccessfulOutcome_t * unsuccess_msg, subscription_response_helper & dout) -{ - - if (unsuccess_msg == 0){ - error_string = "Invalid reference to unsuccess message in get fields subscription delete response"; - return false; - } - - RICrequestID_t *requestid; - RANfunctionID_t * ranfunctionid; - - for(int edx = 0; edx < unsuccess_msg->value.choice.RICsubscriptionDeleteFailure.protocolIEs.list.count; edx++) { - RICsubscriptionDeleteFailure_IEs_t *memb_ptr = unsuccess_msg->value.choice.RICsubscriptionDeleteFailure.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - //dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - } - - } - - return true; - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - - diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_delete_response.hpp b/Bouncer/src/xapp-asn/e2ap/subscription_delete_response.hpp deleted file mode 100644 index 14589e5..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_delete_response.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_DEL_RESPONSE_ -#define S_DEL_RESPONSE_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "response_helper.hpp" - -#define NUM_SUBSCRIPTION_DELETE_RESPONSE_IES 2 -#define NUM_SUBSCRIPTION_DELETE_FAILURE_IES 2 - -class subscription_delete_response { -public: - - subscription_delete_response(void); - ~subscription_delete_response(void); - - bool encode_e2ap_subscription_delete_response(unsigned char *, size_t *, subscription_response_helper &, bool); - bool set_fields(SuccessfulOutcome_t *, subscription_response_helper &); - bool get_fields(SuccessfulOutcome_t *, subscription_response_helper &); - - bool set_fields(UnsuccessfulOutcome_t *, subscription_response_helper &); - bool get_fields(UnsuccessfulOutcome_t *, subscription_response_helper &); - - std::string get_error_string(void) const { - return error_string; - } - -private: - - E2AP_PDU_t * e2ap_pdu_obj; - SuccessfulOutcome_t * successMsg; - UnsuccessfulOutcome_t * unsuccessMsg; - - - RICsubscriptionDeleteResponse_IEs_t *IE_array; - RICsubscriptionDeleteFailure_IEs_t *IE_Failure_array; - - - char errbuf[128]; - size_t errbuf_len = 128; - std::string error_string; - -}; - - - - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_helper.hpp b/Bouncer/src/xapp-asn/e2ap/subscription_helper.hpp deleted file mode 100644 index b43df7d..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_helper.hpp +++ /dev/null @@ -1,181 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#ifndef SUB_HELPER_ -#define SUB_HELPER_ - -/* - Simple structure to store action related information based on E2 v0.22 - Used for subscription request, response etc - - ricActionID RICactionID, - ricActionType RICactionType, - ricActionDefinition RICactionDefinition OPTIONAL, - ricSubsequentAction RICsubsequentAction OPTIONAL, - ricCause -*/ - -#include -#include -#include - -#include "generic_helpers.hpp" - - -// Note : if no action definition specified, octet length of action definition is NULL -// If no subsequent action specified, default is subsequent_action = 0, time to wait is 0 -struct Action { - -public: - - Action(int id, int type): _is_def(false), _is_subs_act(false), _id(id), _type(type), _next_action(0){}; - Action(int id, int type, const void *def, size_t def_size, int next_action): _is_def(false), _is_subs_act(false), _id(id), _type(type){ - - _is_def = true; - _action_definition.set_ref(def); - _action_definition.set_size(def_size); - _is_subs_act = true; - _next_action = next_action; - - }; - - - int get_id() const{ - return _id; - } - - int get_type() const { - return _type; - } - - - const void * get_definition(void ) { - return _action_definition.get_ref(); - } - - int get_definition_size(void) const { - return _action_definition.get_size(); - }; - - - int get_subsequent_action() const { - return _next_action; - }; - - bool is_definition() const{ - - return _is_def; - } - - bool is_subsequent_action() const{ - return _is_subs_act; - } - -private: - - bool _is_def; - bool _is_subs_act; - int _id, _type, _next_action, _cause, _sub_cause; - bool _is_admit; - octet_helper _action_definition; - -}; - - -/* - Helper class that stores subscription data -*/ - - -struct subscription_helper { - -public: - - using action_t = std::vector; - subscription_helper(){ - _action_ref = std::make_unique(); - }; - - action_t * get_list() const {return _action_ref.get();}; - - void clear(void){ - _action_ref.get()->clear(); - } - - void set_request(int id){ - _req_id = id; - - }; - - void set_function_id(int id){ - _func_id = id; - }; - - void set_event_def(const void *ref, size_t size){ - _event_def.set_ref(ref); - _event_def.set_size(size); - }; - - - void add_action(int id, int type){ - Action a(id, type) ; - _action_ref.get()->push_back(a); - }; - - void add_action(int id, int type, const void *action_def, size_t size, int next_action){ - Action a (id, type, action_def, size, next_action); - _action_ref.get()->push_back(a); - }; - - - int get_request_id(void) const{ - return _req_id; - } - - - int get_function_id(void) const{ - return _func_id; - } - - const void * get_event_def(void) { - return _event_def.get_ref(); - } - - int get_event_def_size(void) const { - return _event_def.get_size(); - } - - void print_sub_info(void){ - std::cout <<"Request ID = " << _req_id << std::endl; - std::cout <<"RAN Function ID = " << _func_id << std::endl; - for(auto const & e: *(_action_ref.get())){ - std::cout <<"Action ID = " << e.get_id() << " Action Type = " << e.get_type() << std::endl; - } - }; - -private: - - std::unique_ptr _action_ref; - int curr_index; - int _req_id, _func_id; - octet_helper _event_def; - -}; - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_request.cc b/Bouncer/src/xapp-asn/e2ap/subscription_request.cc deleted file mode 100644 index 4d23bd9..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_request.cc +++ /dev/null @@ -1,307 +0,0 @@ - - -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_request.hpp" - - -// Set up memory allocations for each IE for encoding -// We are responsible for memory management for each IE for encoding -// Hence destructor should clear out memory -// When decoding, we rely on asn1c macro (ASN_STRUCT_FREE to be called -// for releasing memory by external calling function) -subscription_request::subscription_request(void){ - - _name = "default"; - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2AP_PDU_t * )calloc(1, sizeof(E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = 0; - initMsg = (InitiatingMessage_t * )calloc(1, sizeof(InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = 0; - IE_array = (RICsubscriptionRequest_IEs_t *)calloc(NUM_SUBSCRIPTION_REQUEST_IES, sizeof(RICsubscriptionRequest_IEs_t)); - assert(IE_array != 0); - - action_array = 0; - action_array = (RICaction_ToBeSetup_ItemIEs_t *)calloc(INITIAL_REQUEST_LIST_SIZE, sizeof(RICaction_ToBeSetup_ItemIEs_t)); - assert(action_array != 0); - action_array_size = INITIAL_REQUEST_LIST_SIZE; - // also need to add subsequent action and time to wait .. - for (unsigned int i = 0; i < action_array_size; i++){ - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction = (struct RICsubsequentAction *)calloc(1, sizeof(struct RICsubsequentAction)); - assert(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction != 0); - } - - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - e2ap_pdu_obj->present = E2AP_PDU_PR_initiatingMessage; - - - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -subscription_request::~subscription_request(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription request memory");; - - // Sequence of actions to be admitted causes special heart-ache. Free ric subscription element manually and reset the ie pointer - RICsubscriptionDetails_t * ricsubscription_ie = &(IE_array[2].value.choice.RICsubscriptionDetails); - - for(int i = 0; i < ricsubscription_ie->ricAction_ToBeSetup_List.list.size; i++){ - ricsubscription_ie->ricAction_ToBeSetup_List.list.array[i] = 0; - } - - if (ricsubscription_ie->ricAction_ToBeSetup_List.list.size > 0){ - free(ricsubscription_ie->ricAction_ToBeSetup_List.list.array); - ricsubscription_ie->ricAction_ToBeSetup_List.list.size = 0; - ricsubscription_ie->ricAction_ToBeSetup_List.list.count = 0; - ricsubscription_ie->ricAction_ToBeSetup_List.list.array = 0; - } - - // clear subsequent action array - for (unsigned int i = 0; i < action_array_size; i++){ - free(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction ); - } - - free(action_array); - RICsubscriptionRequest_t * subscription_request = &(initMsg->value.choice.RICsubscriptionRequest); - - for(int i = 0; i < subscription_request->protocolIEs.list.size; i++){ - subscription_request->protocolIEs.list.array[i] = 0; - } - - if( subscription_request->protocolIEs.list.size > 0){ - free( subscription_request->protocolIEs.list.array); - subscription_request->protocolIEs.list.array = 0; - subscription_request->protocolIEs.list.size = 0; - subscription_request->protocolIEs.list.count = 0; - } - - free(IE_array); - free(initMsg); - e2ap_pdu_obj->choice.initiatingMessage = 0; - - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed subscription request memory "); -}; - - -bool subscription_request::encode_e2ap_subscription(unsigned char *buf, size_t *size, subscription_helper &dinput){ - - bool res; - - initMsg->procedureCode = ProcedureCode_id_RICsubscription; - initMsg->criticality = Criticality_ignore; - initMsg->value.present = InitiatingMessage__value_PR_RICsubscriptionRequest; - - res = set_fields(initMsg, dinput); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding subscription request. Reason = " + error_string; - return false; - } - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding Subscription Request. Reason = " + error_string; - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding Subscription Request . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - retval.encoded = -1; - return false; - } - } - - *size = retval.encoded; - return true; - -} - - -bool subscription_request::set_fields( InitiatingMessage_t * init_msg, subscription_helper &helper){ - - - int ie_index; - int result = 0; - - if (init_msg == 0){ - error_string = "Error. Invalid reference when getting fields from subscription request"; - return false; - } - - RICsubscriptionRequest_t * ric_subscription = &(init_msg->value.choice.RICsubscriptionRequest); - ric_subscription->protocolIEs.list.count = 0; - - ie_index = 0; - RICsubscriptionRequest_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICsubscriptionRequest_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - mdclog_write(MDCLOG_INFO,"instance id for subsreq = %d", ricrequest_ie->ricInstanceID); - //ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - result = ASN_SEQUENCE_ADD(&(ric_subscription->protocolIEs), &IE_array[ie_index]); - assert(result == 0); - - ie_index = 1; - RICsubscriptionRequest_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICsubscriptionRequest_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - result = ASN_SEQUENCE_ADD(&(ric_subscription->protocolIEs), &IE_array[ie_index]); - assert(result == 0); - - - ie_index = 2; - RICsubscriptionRequest_IEs_t *ies_actid = &IE_array[ie_index]; - ies_actid->criticality = Criticality_reject; - ies_actid->id = ProtocolIE_ID_id_RICsubscriptionDetails; - ies_actid->value.present = RICsubscriptionRequest_IEs__value_PR_RICsubscriptionDetails; - RICsubscriptionDetails_t *ricsubscription_ie = &ies_actid->value.choice.RICsubscriptionDetails; - - ricsubscription_ie->ricEventTriggerDefinition.buf = (uint8_t *) helper.get_event_def(); - ricsubscription_ie->ricEventTriggerDefinition.size = helper.get_event_def_size(); - - std::vector * ref_action_array = helper.get_list(); - // do we need to resize ? - // we don't care about contents, so just do a free/calloc - if(action_array_size < ref_action_array->size()){ - std::cout <<"re-allocating action array from " << action_array_size << " to " << 2 * ref_action_array->size() << std::endl; - // free subsequent allocation - for (unsigned int i = 0; i < action_array_size; i++){ - free(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction ); - } - - action_array_size = 2 * ref_action_array->size(); - free(action_array); - action_array = (RICaction_ToBeSetup_ItemIEs_t *)calloc(action_array_size, sizeof(RICaction_ToBeSetup_ItemIEs_t)); - assert(action_array != 0); - - // also need to add subsequent action and time to wait .. - for (unsigned int i = 0; i < action_array_size; i++){ - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction = (struct RICsubsequentAction *)calloc(1, sizeof(struct RICsubsequentAction)); - assert(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction != 0); - } - - } - - // reset the list count on ricAction_ToBeSetup_List; - ricsubscription_ie->ricAction_ToBeSetup_List.list.count = 0; - - for(unsigned int i = 0; i < ref_action_array->size(); i ++){ - action_array[i].criticality = Criticality_ignore; - action_array[i].id = ProtocolIE_ID_id_RICaction_ToBeSetup_Item ; - action_array[i].value.present = RICaction_ToBeSetup_ItemIEs__value_PR_RICaction_ToBeSetup_Item; - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricActionID = (*ref_action_array)[i].get_id(); - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricActionType = (*ref_action_array)[i].get_type(); - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction->ricSubsequentActionType = (*ref_action_array)[i].get_subsequent_action(); - - result = ASN_SEQUENCE_ADD(&ricsubscription_ie->ricAction_ToBeSetup_List, &(action_array[i])); - if (result == -1){ - error_string = "Erorr : Unable to assign memory to add Action item to set up list"; - return false; - } - - } - - result = ASN_SEQUENCE_ADD(&(ric_subscription->protocolIEs), &IE_array[ie_index]); - assert(result == 0); - - - - return true; -}; - - - -bool subscription_request:: get_fields(InitiatingMessage_t * init_msg, subscription_helper & dout) -{ - - if (init_msg == 0){ - error_string = "Error. Invalid reference when getting fields from subscription request"; - return false; - } - - RICrequestID_t *requestid; - RANfunctionID_t * ranfunctionid; - RICsubscriptionDetails_t * ricsubscription; - - for(int edx = 0; edx < init_msg->value.choice.RICsubscriptionRequest.protocolIEs.list.count; edx++) { - RICsubscriptionRequest_IEs_t *memb_ptr = init_msg->value.choice.RICsubscriptionRequest.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - //dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - case (ProtocolIE_ID_id_RICsubscriptionDetails): - ricsubscription = &memb_ptr->value.choice.RICsubscriptionDetails; - dout.set_event_def(ricsubscription->ricEventTriggerDefinition.buf, ricsubscription->ricEventTriggerDefinition.size); - - for(int index = 0; index < ricsubscription->ricAction_ToBeSetup_List.list.count; index ++){ - RICaction_ToBeSetup_ItemIEs_t * item = (RICaction_ToBeSetup_ItemIEs_t *)ricsubscription->ricAction_ToBeSetup_List.list.array[index]; - if (item->value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction == NULL){ - dout.add_action(item->value.choice.RICaction_ToBeSetup_Item.ricActionID, item->value.choice.RICaction_ToBeSetup_Item.ricActionType); - } - else{ - std::string action_def = ""; // for now we are ignoring action definition - } - }; - - break; - } - - } - - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); - return true; -}; - - - diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_request.hpp b/Bouncer/src/xapp-asn/e2ap/subscription_request.hpp deleted file mode 100644 index 15695c3..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_request.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_REQUEST_ -#define S_REQUEST_ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "subscription_helper.hpp" - -#define NUM_SUBSCRIPTION_REQUEST_IES 3 -#define INITIAL_REQUEST_LIST_SIZE 4 - -class subscription_request{ -public: - - subscription_request(std::string name); - subscription_request(void); - ~subscription_request(void); - - bool encode_e2ap_subscription(unsigned char *, size_t *, subscription_helper &); - bool set_fields(InitiatingMessage_t *, subscription_helper &); - bool get_fields(InitiatingMessage_t *, subscription_helper &); - - std::string get_error(void) const{ - return error_string; - } - -private: - - InitiatingMessage_t *initMsg; - E2AP_PDU_t * e2ap_pdu_obj; - - RICsubscriptionRequest_IEs_t * IE_array; - RICaction_ToBeSetup_ItemIEs_t * action_array; - unsigned int action_array_size; - char errbuf[128]; - size_t errbuf_len = 128; - std::string _name; - std::string error_string; -}; - - - -#endif diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_response.cc b/Bouncer/src/xapp-asn/e2ap/subscription_response.cc deleted file mode 100644 index 5ed72fa..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_response.cc +++ /dev/null @@ -1,583 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_response.hpp" - -/* The xAPP need only worry about the get_fields from a response, since it does -not generate a response. Generating response however is included to support testing. -*/ - - -// Primarly for generation -subscription_response::subscription_response(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2AP_PDU_t *)calloc(1, sizeof(E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - successMsg = 0; - successMsg = (SuccessfulOutcome_t *)calloc(1, sizeof(SuccessfulOutcome_t)); - assert(successMsg != 0); - - unsuccessMsg = 0; - unsuccessMsg = (UnsuccessfulOutcome_t *)calloc(1, sizeof(UnsuccessfulOutcome_t)); - assert(unsuccessMsg != 0); - - IE_array = 0; - IE_array = (RICsubscriptionResponse_IEs_t *)calloc(NUM_SUBSCRIPTION_RESPONSE_IES, sizeof(RICsubscriptionResponse_IEs_t)); - assert(IE_array != 0); - - IE_Failure_array = 0; - IE_Failure_array = (RICsubscriptionFailure_IEs_t *)calloc(NUM_SUBSCRIPTION_FAILURE_IES, sizeof(RICsubscriptionFailure_IEs_t)); - assert(IE_Failure_array != 0); - - ie_admitted_list = 0; - ie_admitted_list = (RICaction_Admitted_ItemIEs_t *)calloc(INITIAL_RESPONSE_LIST_SIZE, sizeof(RICaction_Admitted_ItemIEs_t)); - assert(ie_admitted_list != 0); - ie_admitted_list_size = INITIAL_RESPONSE_LIST_SIZE; - - ie_not_admitted_list = 0; - ie_not_admitted_list = (RICaction_NotAdmitted_ItemIEs_t *)calloc(INITIAL_RESPONSE_LIST_SIZE, sizeof(RICaction_NotAdmitted_ItemIEs_t)); - assert(ie_not_admitted_list != 0); - ie_not_admitted_list_size = INITIAL_RESPONSE_LIST_SIZE; - - - - - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -subscription_response::~subscription_response(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription response memory"); - RICaction_Admitted_List_t * response_admitted_list = (RICaction_Admitted_List_t *) &(IE_array[2].value.choice.RICaction_Admitted_List); - - for(int i = 0; i < response_admitted_list->list.size; i++){ - response_admitted_list->list.array[i] = 0; - } - - - if (response_admitted_list->list.size > 0){ - free(response_admitted_list->list.array); - response_admitted_list->list.array = 0; - response_admitted_list->list.size = 0; - response_admitted_list->list.count = 0; - } - - - RICaction_NotAdmitted_List_t * response_not_admitted_list = &(IE_array[3].value.choice.RICaction_NotAdmitted_List); - for(int i = 0; i < response_not_admitted_list->list.size; i++){ - response_not_admitted_list->list.array[i] = 0; - } - - if (response_not_admitted_list->list.size > 0){ - free(response_not_admitted_list->list.array); - response_not_admitted_list->list.array = 0; - response_not_admitted_list->list.size = 0; - response_not_admitted_list->list.count = 0; - } - - RICsubscriptionResponse_t * ric_subscription_response = &(successMsg->value.choice.RICsubscriptionResponse); - for(int i = 0; i < ric_subscription_response->protocolIEs.list.size ; i++){ - ric_subscription_response->protocolIEs.list.array[i] = 0; - } - - if (ric_subscription_response->protocolIEs.list.size > 0){ - free(ric_subscription_response->protocolIEs.list.array); - ric_subscription_response->protocolIEs.list.array = 0; - ric_subscription_response->protocolIEs.list.size = 0; - ric_subscription_response->protocolIEs.list.count = 0; - } - - - RICaction_NotAdmitted_List_t * failure_not_admitted_list = &(IE_Failure_array[2].value.choice.RICaction_NotAdmitted_List); - for(int i = 0; i < failure_not_admitted_list->list.size; i++){ - failure_not_admitted_list->list.array[i] = 0; - } - - if ( failure_not_admitted_list->list.size > 0){ - free( failure_not_admitted_list->list.array); - failure_not_admitted_list->list.array = 0; - failure_not_admitted_list->list.size = 0; - failure_not_admitted_list->list.count = 0; - } - - - RICsubscriptionFailure_t * ric_subscription_failure = &(unsuccessMsg->value.choice.RICsubscriptionFailure); - for(int i = 0; i < ric_subscription_failure->protocolIEs.list.size; i++){ - ric_subscription_failure->protocolIEs.list.array[i] = 0; - } - - if ( ric_subscription_failure->protocolIEs.list.size > 0){ - free(ric_subscription_failure->protocolIEs.list.array); - ric_subscription_failure->protocolIEs.list.array = 0; - ric_subscription_failure->protocolIEs.list.size = 0; - ric_subscription_failure->protocolIEs.list.count = 0; - } - - - free(ie_admitted_list); - free(ie_not_admitted_list); - free(IE_Failure_array); - free(IE_array); - - - ASN_STRUCT_FREE(asn_DEF_SuccessfulOutcome, successMsg); - ASN_STRUCT_FREE(asn_DEF_UnsuccessfulOutcome, unsuccessMsg); - - - e2ap_pdu_obj->choice.initiatingMessage = NULL; - e2ap_pdu_obj->present = E2AP_PDU_PR_NOTHING; - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - mdclog_write(MDCLOG_DEBUG, "Freed subscription response memory "); - - -}; - - -bool subscription_response::encode_e2ap_subscription_response(unsigned char *buf, size_t *size, subscription_response_helper &dinput, bool is_success){ - - - if(is_success){ - set_fields_success(dinput); - e2ap_pdu_obj->present = E2AP_PDU_PR_successfulOutcome; - e2ap_pdu_obj->choice.successfulOutcome = successMsg; - - successMsg->procedureCode = ProcedureCode_id_RICsubscription; - successMsg->criticality = Criticality_reject; - successMsg->value.present = SuccessfulOutcome__value_PR_RICsubscriptionResponse; - - } - else{ - set_fields_unsuccess(dinput); - e2ap_pdu_obj->present = E2AP_PDU_PR_unsuccessfulOutcome; - e2ap_pdu_obj->choice.unsuccessfulOutcome = unsuccessMsg; - - unsuccessMsg->procedureCode = ProcedureCode_id_RICsubscription; - unsuccessMsg->criticality = Criticality_reject; - unsuccessMsg->value.present = UnsuccessfulOutcome__value_PR_RICsubscriptionFailure; - - } - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - int ret_constr = asn_check_constraints(&asn_DEF_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding subscription response. Reason = " + error_string; - return false; - } - - asn_enc_rval_t res = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(res.encoded == -1){ - std::cout <<"Error encoding PDU. Reason =" << strerror(errno) << std::endl; - return false; - } - else { - if(*size < res.encoded){ - fprintf(stderr, "Buffer assigned too small to encode: %s",(char *)(asn_DEF_E2AP_PDU.name)); - res.encoded = -1; - return false; - } - } - - *size = res.encoded; - return true; - -} - -void subscription_response::set_fields_success(subscription_response_helper &helper){ - - int ie_index; - - RICsubscriptionResponse_t * subscription_response = &(successMsg->value.choice.RICsubscriptionResponse); - //reset list count .. - subscription_response->protocolIEs.list.count = 0; - - ie_index = 0; - RICsubscriptionResponse_IEs_t *ies_ricreq = &IE_array[ie_index]; - - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICsubscriptionResponse_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - // ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - - - ie_index = 1; - RICsubscriptionResponse_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICsubscriptionResponse_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - - - ie_index = 2; - RICsubscriptionResponse_IEs_t *ies_admitted_actid = &IE_array[ie_index]; - ies_admitted_actid->criticality = Criticality_reject; - ies_admitted_actid->id = ProtocolIE_ID_id_RICactions_Admitted; - RICaction_Admitted_List_t *ric_admitted_actions_ie = &ies_admitted_actid->value.choice.RICaction_Admitted_List; - ric_admitted_actions_ie->list.count = 0; - std::vector * ref_admitted_action_array = helper.get_admitted_list(); - - if(ref_admitted_action_array->size() == 0){ - ies_admitted_actid->value.present = RICsubscriptionResponse_IEs__value_PR_NOTHING; - } - else{ - ies_admitted_actid->value.present = RICsubscriptionResponse_IEs__value_PR_RICaction_Admitted_List; - - // resize memory ? - if (ref_admitted_action_array->size() >= ie_admitted_list_size){ - ie_admitted_list_size = 2 * ref_admitted_action_array->size(); - free(ie_admitted_list); - ie_admitted_list = (RICaction_Admitted_ItemIEs_t *)calloc(ie_admitted_list_size, sizeof(RICaction_Admitted_ItemIEs_t)); - assert(ie_admitted_list != 0); - }; - - - for(unsigned int i = 0; i < ref_admitted_action_array->size(); i ++){ - ie_admitted_list[i].criticality = Criticality_ignore; - ie_admitted_list[i].id = ProtocolIE_ID_id_RICaction_Admitted_Item ; - ie_admitted_list[i].value.present = RICaction_Admitted_ItemIEs__value_PR_RICaction_Admitted_Item; - ie_admitted_list[i].value.choice.RICaction_Admitted_Item.ricActionID = (*ref_admitted_action_array)[i].get_id(); - ASN_SEQUENCE_ADD(ric_admitted_actions_ie, &(ie_admitted_list[i])); - } - } - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - - // optional IE : add only if non-zero list - ie_index = 3; - std::vector * ref_notadmitted_action_array = helper.get_not_admitted_list(); - if (ref_notadmitted_action_array->size() > 0){ - - RICsubscriptionResponse_IEs_t *ies_notadmitted_actid = &IE_array[ie_index]; - ies_notadmitted_actid->criticality = Criticality_reject; - ies_notadmitted_actid->id = ProtocolIE_ID_id_RICactions_NotAdmitted; - - RICaction_NotAdmitted_List_t *ric_not_admitted_actions_ie = &ies_notadmitted_actid->value.choice.RICaction_NotAdmitted_List; - ric_not_admitted_actions_ie->list.count = 0; - - - ies_notadmitted_actid->value.present = RICsubscriptionResponse_IEs__value_PR_RICaction_NotAdmitted_List; - - // resize memory ? - if (ref_notadmitted_action_array->size() >= ie_not_admitted_list_size){ - ie_not_admitted_list_size = 2 * ref_notadmitted_action_array->size(); - free(ie_not_admitted_list); - ie_not_admitted_list = (RICaction_NotAdmitted_ItemIEs_t *)calloc(ie_not_admitted_list_size, sizeof(RICaction_NotAdmitted_ItemIEs_t)); - assert(ie_not_admitted_list != 0); - - }; - - - for(unsigned int i = 0; i < ref_notadmitted_action_array->size(); i ++){ - ie_not_admitted_list[i].criticality = Criticality_ignore; - ie_not_admitted_list[i].id = ProtocolIE_ID_id_RICaction_NotAdmitted_Item ; - ie_not_admitted_list[i].value.present = RICaction_NotAdmitted_ItemIEs__value_PR_RICaction_NotAdmitted_Item;; - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricActionID = (*ref_notadmitted_action_array)[i].get_id(); - - int cause = (*ref_notadmitted_action_array)[i].get_cause(); - switch(cause){ - case Cause_PR_ricService: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.ricService = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_transport: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.transport = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_protocol: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.protocol= (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_misc: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.misc = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_ricRequest: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.ricRequest = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - default: - mdclog_write(MDCLOG_ERR, "Error :: %s, %d : Unknown RIC cause %d\n", __FILE__, __LINE__, cause); - return; - } - - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.present = (Cause_PR)cause; - ASN_SEQUENCE_ADD(ric_not_admitted_actions_ie, &(ie_not_admitted_list[i])); - } - - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - } - -} - -void subscription_response:: get_fields(SuccessfulOutcome_t * success_msg, subscription_response_helper & dout) -{ - - assert(success_msg != NULL); - - RICrequestID_t *requestid; - RANfunctionID_t * ranfunctionid; - RICaction_Admitted_List_t * ric_admitted_action_list; - RICaction_NotAdmitted_List_t * ric_not_admitted_action_list; - - for(int edx = 0; edx < success_msg->value.choice.RICsubscriptionResponse.protocolIEs.list.count; edx++) { - RICsubscriptionResponse_IEs_t *memb_ptr = success_msg->value.choice.RICsubscriptionResponse.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - //dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - case (ProtocolIE_ID_id_RICactions_Admitted): - ric_admitted_action_list = &memb_ptr->value.choice.RICaction_Admitted_List; - - // admitted actions - for(int index = 0; index < ric_admitted_action_list->list.count; index ++){ - RICaction_Admitted_ItemIEs_t * item = (RICaction_Admitted_ItemIEs_t *)ric_admitted_action_list->list.array[index]; - long int id = item->value.choice.RICaction_Admitted_Item.ricActionID; - dout.get_admitted_list()->push_back(ActionResponse(id)); - }; - - break; - - case (ProtocolIE_ID_id_RICactions_NotAdmitted): - ric_not_admitted_action_list = &memb_ptr->value.choice.RICaction_NotAdmitted_List; - - for(int index = 0; index < ric_not_admitted_action_list->list.count; index ++){ - RICaction_NotAdmitted_ItemIEs_t * item = (RICaction_NotAdmitted_ItemIEs_t *)ric_not_admitted_action_list->list.array[index]; - long int id = item->value.choice.RICaction_NotAdmitted_Item.ricActionID; - int cause = item->value.choice.RICaction_NotAdmitted_Item.cause.present; - int sub_cause; - switch(cause){ - - case Cause_PR_ricService : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.ricService; - break; - - case Cause_PR_transport : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.transport; - break; - - case Cause_PR_protocol : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.protocol; - break; - - case Cause_PR_misc : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.misc; - break; - - case Cause_PR_ricRequest : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.ricRequest; - break; - - default: - std::cout <<"Error ! Illegal cause enum" << cause << std::endl; - return; - } - dout.get_not_admitted_list()->push_back(ActionResponse(id, cause, sub_cause)); - } - break; - } - - } - - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - -void subscription_response::set_fields_unsuccess( subscription_response_helper &helper){ - - int ie_index; - RICsubscriptionFailure_t * ric_subscription_failure = &(unsuccessMsg->value.choice.RICsubscriptionFailure); - // reset list count - ric_subscription_failure->protocolIEs.list.count = 0; - - ie_index = 0; - RICsubscriptionFailure_IEs_t *ies_ricreq = &IE_Failure_array[ie_index]; - ies_ricreq->criticality = Criticality_reject; - ies_ricreq->id = ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = RICsubscriptionFailure_IEs__value_PR_RICrequestID; - RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); -// ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, &(IE_Failure_array[ie_index])); - - ie_index = 1; - RICsubscriptionFailure_IEs_t *ies_ranfunc = &IE_Failure_array[ie_index]; - ies_ranfunc->criticality = Criticality_reject; - ies_ranfunc->id = ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = RICsubscriptionFailure_IEs__value_PR_RANfunctionID; - RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, &(IE_Failure_array[ie_index])); - - ie_index = 2; - RICsubscriptionFailure_IEs_t *ies_notadmitted_actid = &IE_Failure_array[ie_index]; - ies_notadmitted_actid->criticality = Criticality_reject; - ies_notadmitted_actid->id = ProtocolIE_ID_id_RICactions_NotAdmitted; - RICaction_NotAdmitted_List_t *ric_not_admitted_actions_ie = &ies_notadmitted_actid->value.choice.RICaction_NotAdmitted_List; - ric_not_admitted_actions_ie->list.count = 0; - std::vector * ref_notadmitted_action_array = helper.get_not_admitted_list(); - if(ref_notadmitted_action_array->size() == 0){ - ies_notadmitted_actid->value.present = RICsubscriptionFailure_IEs__value_PR_NOTHING; - } - else{ - ies_notadmitted_actid->value.present = RICsubscriptionFailure_IEs__value_PR_RICaction_NotAdmitted_List; - - // resize memory ? - if (ref_notadmitted_action_array->size() >= ie_not_admitted_list_size){ - ie_not_admitted_list_size = 2 * ref_notadmitted_action_array->size(); - free(ie_not_admitted_list); - ie_not_admitted_list = (RICaction_NotAdmitted_ItemIEs_t *)calloc(ie_not_admitted_list_size, sizeof(RICaction_NotAdmitted_ItemIEs_t)); - assert(ie_not_admitted_list != 0); - }; - - - // reset the list count on ricAction_ToBeSetup_List; - for(unsigned int i = 0; i < ref_notadmitted_action_array->size(); i ++){ - ie_not_admitted_list[i].criticality = Criticality_ignore; - ie_not_admitted_list[i].id = ProtocolIE_ID_id_RICaction_NotAdmitted_Item ; - ie_not_admitted_list[i].value.present = RICaction_NotAdmitted_ItemIEs__value_PR_RICaction_NotAdmitted_Item;; - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricActionID = (*ref_notadmitted_action_array)[i].get_id(); - - int cause = (*ref_notadmitted_action_array)[i].get_cause(); - switch(cause){ - case Cause_PR_ricService: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.ricService = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_transport: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.transport = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_protocol: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.protocol= (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_misc: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.misc = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case Cause_PR_ricRequest: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.choice.ricRequest = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - default: - mdclog_write(MDCLOG_ERR, "Error :: %s, %d : Unknown RIC cause %d\n", __FILE__, __LINE__, cause); - return ; - } - - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.cause.present = (Cause_PR)cause; - - ASN_SEQUENCE_ADD(ric_not_admitted_actions_ie, &(ie_not_admitted_list[i])); - } - - } - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, &(IE_Failure_array[ie_index])); - - - // // criticality diagnostics is not generated/parsed currently since optional - // i = 3; - // RICsubscriptionFailure_IEs_t *ies_criticality_diagnostics= &IE_Failure_array[i]; - // ies_criticality_diagnostics->criticality = Criticality_ignore; - // ies_criticality_diagnostics->id = ProtocolIE_ID_id_CriticalityDiagnostics ; - // ies_criticality_diagnostics->value.present = RICsubscriptionFailure_IEs__value_PR_NOTHING; - - -} - -void subscription_response:: get_fields(UnsuccessfulOutcome_t * unsuccess_msg, subscription_response_helper & dout) -{ - - assert(unsuccess_msg != NULL); - - RICrequestID_t *requestid; - RANfunctionID_t * ranfunctionid; - RICaction_NotAdmitted_List_t * ric_not_admitted_action_list; - - for(int edx = 0; edx < unsuccess_msg->value.choice.RICsubscriptionFailure.protocolIEs.list.count; edx++) { - RICsubscriptionFailure_IEs_t *memb_ptr = unsuccess_msg->value.choice.RICsubscriptionFailure.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - //dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - - case (ProtocolIE_ID_id_RICactions_NotAdmitted): - ric_not_admitted_action_list = &memb_ptr->value.choice.RICaction_NotAdmitted_List; - - for(int index = 0; index < ric_not_admitted_action_list->list.count; index ++){ - RICaction_NotAdmitted_ItemIEs_t * item = (RICaction_NotAdmitted_ItemIEs_t *)ric_not_admitted_action_list->list.array[index]; - long int id = item->value.choice.RICaction_NotAdmitted_Item.ricActionID; - int cause = item->value.choice.RICaction_NotAdmitted_Item.cause.present; - int sub_cause; - switch(cause){ - - case Cause_PR_ricService : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.ricService; - break; - - case Cause_PR_transport : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.transport; - break; - - case Cause_PR_protocol : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.protocol; - break; - - case Cause_PR_misc : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.misc; - break; - - case Cause_PR_ricRequest : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.cause.choice.ricRequest; - break; - - default: - mdclog_write(MDCLOG_ERR, "Error :: %s, %d : Unknown RIC cause %d\n", __FILE__, __LINE__, cause); - return; - } - dout.get_not_admitted_list()->push_back(ActionResponse(id, cause, sub_cause)); - } - break; - } - - } - - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - - diff --git a/Bouncer/src/xapp-asn/e2ap/subscription_response.hpp b/Bouncer/src/xapp-asn/e2ap/subscription_response.hpp deleted file mode 100644 index 85469bf..0000000 --- a/Bouncer/src/xapp-asn/e2ap/subscription_response.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_RESPONSE_ -#define S_RESPONSE_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "response_helper.hpp" - -#define NUM_SUBSCRIPTION_RESPONSE_IES 4 -#define NUM_SUBSCRIPTION_FAILURE_IES 3 -#define INITIAL_RESPONSE_LIST_SIZE 4 - -class subscription_response{ -public: - - subscription_response(void); - ~subscription_response(void); - - bool encode_e2ap_subscription_response(unsigned char *, size_t *, subscription_response_helper &, bool); - void get_fields(SuccessfulOutcome_t *, subscription_response_helper &); - void get_fields(UnsuccessfulOutcome_t *, subscription_response_helper &); - - std::string get_error(void) const{ - return error_string; - } - -private: - - void set_fields_success( subscription_response_helper &); - void set_fields_unsuccess( subscription_response_helper &); - - E2AP_PDU_t * e2ap_pdu_obj; - SuccessfulOutcome_t * successMsg; - UnsuccessfulOutcome_t * unsuccessMsg; - - - RICsubscriptionResponse_IEs_t *IE_array; - RICsubscriptionFailure_IEs_t *IE_Failure_array; - - - RICaction_Admitted_ItemIEs_t * ie_admitted_list; - RICaction_NotAdmitted_ItemIEs_t * ie_not_admitted_list; - unsigned int ie_admitted_list_size, ie_not_admitted_list_size; - - char errbuf[128]; - size_t errbuf_len = 128; - std::string error_string; -}; - - - - -#endif diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_control.cc b/Bouncer/src/xapp-asn/e2sm/e2sm_control.cc deleted file mode 100644 index f7f2d70..0000000 --- a/Bouncer/src/xapp-asn/e2sm/e2sm_control.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -/* Classes to handle E2 service model based on e2sm-Bouncer-v001.asn */ -#include "e2sm_control.hpp" - - //initialize - e2sm_control::e2sm_control(void){ - - memset(&head_fmt1, 0, sizeof(E2SM_Bouncer_ControlHeader_Format1_t)); - - memset(&msg_fmt1, 0, sizeof(E2SM_Bouncer_ControlMessage_Format1_t)); - - - - control_head = 0; - control_head = ( E2SM_Bouncer_ControlHeader_t *)calloc(1, sizeof( E2SM_Bouncer_ControlHeader_t)); - assert(control_head != 0); - - control_msg = 0; - control_msg = (E2SM_Bouncer_ControlMessage_t*)calloc(1, sizeof(E2SM_Bouncer_ControlMessage_t)); - assert(control_msg !=0); - - errbuf_len = 128; - }; - - e2sm_control::~e2sm_control(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing event trigger object memory"); - - control_head->choice.controlHeader_Format1 = 0; - - control_msg->choice.controlMessage_Format1 = 0; - - ASN_STRUCT_FREE(asn_DEF_E2SM_Bouncer_ControlHeader, control_head); - ASN_STRUCT_FREE(asn_DEF_E2SM_Bouncer_ControlMessage, control_msg); - - -}; - -bool e2sm_control::encode_control_header(unsigned char *buf, size_t *size, e2sm_control_helper &helper){ - - ASN_STRUCT_RESET(asn_DEF_E2SM_Bouncer_ControlHeader, control_head); - - bool res; - res = set_fields(control_head, helper); - if (!res){ - - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2SM_Bouncer_ControlHeader, control_head, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - return false; - } - - xer_fprint(stdout, &asn_DEF_E2SM_Bouncer_ControlHeader, control_head); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2SM_Bouncer_ControlHeader, control_head, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding event trigger definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - -bool e2sm_control::encode_control_message(unsigned char *buf, size_t *size, e2sm_control_helper &helper){ - - bool res; - res = set_fields(control_msg, helper); - if (!res){ - return false; - } - - - int ret_constr = asn_check_constraints(&asn_DEF_E2SM_Bouncer_ControlMessage, control_msg, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - return false; - } - - xer_fprint(stdout, &asn_DEF_E2SM_Bouncer_ControlMessage, control_msg); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2SM_Bouncer_ControlMessage, control_msg, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding action definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - -bool e2sm_control::set_fields(E2SM_Bouncer_ControlHeader_t * ref_control_head, e2sm_control_helper & helper){ - - if(ref_control_head == 0){ - error_string = "Invalid reference for Event Trigger Definition set fields"; - return false; - } - - ref_control_head->present = E2SM_Bouncer_ControlHeader_PR_controlHeader_Format1; - - head_fmt1.controlHeaderParam = helper.header; - - ref_control_head->choice.controlHeader_Format1 = &head_fmt1; - - return true; -}; - -bool e2sm_control::set_fields(E2SM_Bouncer_ControlMessage_t * ref_control_msg, e2sm_control_helper & helper){ - - if(ref_control_msg == 0){ - error_string = "Invalid reference for Event Action Definition set fields"; - return false; - } - ref_control_msg->present = E2SM_Bouncer_ControlMessage_PR_controlMessage_Format1; - - msg_fmt1.controlMsgParam.buf = helper.message; - msg_fmt1.controlMsgParam.size = helper.message_len; - - - ref_control_msg->choice.controlMessage_Format1 = &msg_fmt1; - - - return true; -}; - -bool e2sm_control::get_fields(E2SM_Bouncer_ControlHeader_t * ref_indictaion_header, e2sm_control_helper & helper){ - - if (ref_indictaion_header == 0){ - error_string = "Invalid reference for Control Header get fields"; - return false; - } - - helper.header = ref_indictaion_header->choice.controlHeader_Format1->controlHeaderParam; - return true; -} - -bool e2sm_control::get_fields(E2SM_Bouncer_ControlMessage_t * ref_control_message, e2sm_control_helper & helper){ - - if (ref_control_message == 0){ - error_string = "Invalid reference for Control Message get fields"; - return false; - } - helper.message = ref_control_message->choice.controlMessage_Format1->controlMsgParam.buf; - helper.message_len = ref_control_message->choice.controlMessage_Format1->controlMsgParam.size; - - return true; - } - - - - diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_control.hpp b/Bouncer/src/xapp-asn/e2sm/e2sm_control.hpp deleted file mode 100644 index 75be447..0000000 --- a/Bouncer/src/xapp-asn/e2sm/e2sm_control.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -/* Classes to handle E2 service model based on Bouncer-v001.asn */ -#ifndef SRC_XAPP_ASN_E2SM_E2SM_CONTROL_HPP_ -#define SRC_XAPP_ASN_E2SM_E2SM_CONTROL_HPP_ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -class e2sm_control { -public: - e2sm_control(void); - ~e2sm_control(void); - - bool set_fields(E2SM_Bouncer_ControlHeader_t *, e2sm_control_helper &); - bool set_fields(E2SM_Bouncer_ControlMessage_t *, e2sm_control_helper &); - - bool get_fields(E2SM_Bouncer_ControlHeader_t *, e2sm_control_helper &); - bool get_fields(E2SM_Bouncer_ControlMessage_t *, e2sm_control_helper &); - - bool encode_control_header(unsigned char *, size_t *, e2sm_control_helper &); - bool encode_control_message(unsigned char*, size_t *, e2sm_control_helper &); - - - std::string get_error (void) const {return error_string ;}; - -private: - - E2SM_Bouncer_ControlHeader_t * control_head; // used for encoding - E2SM_Bouncer_ControlMessage_t* control_msg; - E2SM_Bouncer_ControlHeader_Format1_t head_fmt1; - E2SM_Bouncer_ControlMessage_Format1_t msg_fmt1; - - - size_t errbuf_len; - char errbuf[128]; - std::string error_string; -}; - - - -#endif /* SRC_XAPP_ASN_E2SM_E2SM_CONTROL_HPP_ */ diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_helpers.hpp b/Bouncer/src/xapp-asn/e2sm/e2sm_helpers.hpp deleted file mode 100644 index 7eafb18..0000000 --- a/Bouncer/src/xapp-asn/e2sm/e2sm_helpers.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -/* Classes to handle E2 service model based on e2sm-Bouncer-v001.asn */ -#ifndef E2SM_HELPER_ -#define E2SM_HELPER_ - -#include -#include -#include -#include -#include - -typedef struct ranparam_helper ranparam_helper; -struct ranparam_helper { - long int _param_id; - unsigned char* _param_name; - size_t _param_name_len; - int _param_test; - unsigned char* _param_value; - size_t _param_value_len; - -}; -class RANParam_Helper{ -private: - ranparam_helper _ranparam_helper; - -public: - - RANParam_Helper(int id, unsigned char *param_name, size_t param_name_len, int param_test, unsigned char* param_value, size_t param_value_len){ - _ranparam_helper._param_id = id; - _ranparam_helper._param_name = param_name; - _ranparam_helper._param_name_len = param_name_len; - _ranparam_helper._param_test = param_test; - _ranparam_helper._param_value = param_value; - _ranparam_helper._param_value_len = param_value_len; - } - - const ranparam_helper & getran_helper() const { - return _ranparam_helper; - } - void print_ranparam_info(void){ - std::cout <<"Param ID = " << _ranparam_helper._param_id << std::endl; - std::cout << "Parame Name =" << _ranparam_helper._param_name << std::endl; - std::cout <<"Param Test = " << _ranparam_helper._param_test << std::endl; - std::cout <<"Param Value = " << _ranparam_helper._param_value << std::endl; - } -}; - - -using ranparam_helper_t = std::vector; - -typedef struct e2sm_subscription_helper e2sm_subscription_helper; -struct e2sm_subscription_helper { -public: - - - int triger_nature; - ranparam_helper_t param; - void add_param(int id, unsigned char *param_name, size_t param_name_len, int param_test, unsigned char* param_value, size_t param_value_len){ - RANParam_Helper rparam(id,param_name,param_name_len,param_test,param_value,param_value_len); - param.push_back(rparam); - }; - ranparam_helper_t get_paramlist() const {return param;}; - - - -}; - - -typedef struct e2sm_indication_helper e2sm_indication_helper; - - -struct e2sm_indication_helper { - long int header; - unsigned char* message; - size_t message_len; -}; - -typedef struct e2sm_control_helper e2sm_control_helper; - -struct e2sm_control_helper { - long int header; - unsigned char* message; - size_t message_len; -}; - -#endif diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_indication.cc b/Bouncer/src/xapp-asn/e2sm/e2sm_indication.cc deleted file mode 100644 index 0fd834d..0000000 --- a/Bouncer/src/xapp-asn/e2sm/e2sm_indication.cc +++ /dev/null @@ -1,187 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -/* Classes to handle E2 service model based on e2sm-Bouncer-v001.asn */ -#include "e2sm_indication.hpp" - - //initialize - e2sm_indication::e2sm_indication(void){ - - memset(&head_fmt1, 0, sizeof(E2SM_Bouncer_IndicationHeader_Format1_t)); - - memset(&msg_fmt1, 0, sizeof(E2SM_Bouncer_IndicationMessage_Format1_t)); - - - - indication_head = 0; - indication_head = ( E2SM_Bouncer_IndicationHeader_t *)calloc(1, sizeof( E2SM_Bouncer_IndicationHeader_t)); - assert(indication_head != 0); - - indication_msg = 0; - indication_msg = (E2SM_Bouncer_IndicationMessage_t*)calloc(1, sizeof(E2SM_Bouncer_IndicationMessage_t)); - assert(indication_msg !=0); - - errbuf_len = 128; - }; - - e2sm_indication::~e2sm_indication(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing event trigger object memory"); - - indication_head->choice.indicationHeader_Format1 = 0; - - indication_msg->choice.indicationMessage_Format1 = 0; - - ASN_STRUCT_FREE(asn_DEF_E2SM_Bouncer_IndicationHeader, indication_head); - ASN_STRUCT_FREE(asn_DEF_E2SM_Bouncer_IndicationMessage, indication_msg); - - -}; - -bool e2sm_indication::encode_indication_header(unsigned char *buf, size_t *size, e2sm_indication_helper &helper){ - - ASN_STRUCT_RESET(asn_DEF_E2SM_Bouncer_IndicationHeader, indication_head); - - bool res; - res = set_fields(indication_head, helper); - if (!res){ - - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2SM_Bouncer_IndicationHeader, indication_head, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - return false; - } - - xer_fprint(stdout, &asn_DEF_E2SM_Bouncer_IndicationHeader, indication_head); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2SM_Bouncer_IndicationHeader, indication_head, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding event trigger definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - -bool e2sm_indication::encode_indication_message(unsigned char *buf, size_t *size, e2sm_indication_helper &helper){ - - bool res; - res = set_fields(indication_msg, helper); - if (!res){ - return false; - } - - - int ret_constr = asn_check_constraints(&asn_DEF_E2SM_Bouncer_IndicationMessage, indication_msg, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - return false; - } - - xer_fprint(stdout, &asn_DEF_E2SM_Bouncer_IndicationMessage, indication_msg); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2SM_Bouncer_IndicationMessage, indication_msg, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding action definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - -bool e2sm_indication::set_fields(E2SM_Bouncer_IndicationHeader_t * ref_indication_head, e2sm_indication_helper & helper){ - - if(ref_indication_head == 0){ - error_string = "Invalid reference for Event Trigger Definition set fields"; - return false; - } - - ref_indication_head->present = E2SM_Bouncer_IndicationHeader_PR_indicationHeader_Format1; - - head_fmt1.indicationHeaderParam = helper.header; - - ref_indication_head->choice.indicationHeader_Format1 = &head_fmt1; - - return true; -}; - -bool e2sm_indication::set_fields(E2SM_Bouncer_IndicationMessage_t * ref_indication_msg, e2sm_indication_helper & helper){ - - if(ref_indication_msg == 0){ - error_string = "Invalid reference for Event Action Definition set fields"; - return false; - } - ref_indication_msg->present = E2SM_Bouncer_IndicationMessage_PR_indicationMessage_Format1; - - msg_fmt1.indicationMsgParam.buf = helper.message; - msg_fmt1.indicationMsgParam.size = helper.message_len; - - - ref_indication_msg->choice.indicationMessage_Format1 = &msg_fmt1; - - - return true; -}; - -bool e2sm_indication::get_fields(E2SM_Bouncer_IndicationHeader_t * ref_indictaion_header, e2sm_indication_helper & helper){ - - if (ref_indictaion_header == 0){ - error_string = "Invalid reference for Indication Header get fields"; - return false; - } - - helper.header = ref_indictaion_header->choice.indicationHeader_Format1->indicationHeaderParam; - return true; -} - -bool e2sm_indication::get_fields(E2SM_Bouncer_IndicationMessage_t * ref_indication_message, e2sm_indication_helper & helper){ - - if (ref_indication_message == 0){ - error_string = "Invalid reference for Indication Message get fields"; - return false; - } - helper.message = ref_indication_message->choice.indicationMessage_Format1->indicationMsgParam.buf; - helper.message_len = ref_indication_message->choice.indicationMessage_Format1->indicationMsgParam.size; - - return true; - } - diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_indication.hpp b/Bouncer/src/xapp-asn/e2sm/e2sm_indication.hpp deleted file mode 100644 index 1976b79..0000000 --- a/Bouncer/src/xapp-asn/e2sm/e2sm_indication.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -/* Classes to handle E2 service model based on e2sm-Bouncer-v001.asn */ -#ifndef SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_ -#define SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -class e2sm_indication { -public: - e2sm_indication(void); - ~e2sm_indication(void); - - bool set_fields(E2SM_Bouncer_IndicationHeader_t *, e2sm_indication_helper &); - bool set_fields(E2SM_Bouncer_IndicationMessage_t *, e2sm_indication_helper &); - - bool get_fields(E2SM_Bouncer_IndicationHeader_t *, e2sm_indication_helper &); - bool get_fields(E2SM_Bouncer_IndicationMessage_t *, e2sm_indication_helper &); - - bool encode_indication_header(unsigned char *, size_t *, e2sm_indication_helper &); - bool encode_indication_message(unsigned char*, size_t *, e2sm_indication_helper &); - - - std::string get_error (void) const {return error_string ;}; - -private: - - E2SM_Bouncer_IndicationHeader_t * indication_head; // used for encoding - E2SM_Bouncer_IndicationMessage_t* indication_msg; - E2SM_Bouncer_IndicationHeader_Format1_t head_fmt1; - E2SM_Bouncer_IndicationMessage_Format1_t msg_fmt1; - - - size_t errbuf_len; - char errbuf[128]; - std::string error_string; -}; - - - - -#endif /* SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_ */ diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_subscription.cc b/Bouncer/src/xapp-asn/e2sm/e2sm_subscription.cc deleted file mode 100644 index e860e31..0000000 --- a/Bouncer/src/xapp-asn/e2sm/e2sm_subscription.cc +++ /dev/null @@ -1,179 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - -/* Classes to handle E2 service model based on e2sm-Bouncer-v001.asn */ - -#include "e2sm_subscription.hpp" - - //initialize - e2sm_subscription::e2sm_subscription(void){ - - memset(&event_fmt1, 0, sizeof(E2SM_Bouncer_EventTriggerDefinition_Format1_t)); - - memset(&actn_fmt1, 0, sizeof(E2SM_Bouncer_ActionDefinition_Format1_t)); - - - ran_param = 0; - ran_param = (RANparameter_Item_t*)calloc(1, sizeof(RANparameter_Item_t)); - assert(ran_param != 0); - - event_trigger = 0; - event_trigger = ( E2SM_Bouncer_EventTriggerDefinition_t *)calloc(1, sizeof( E2SM_Bouncer_EventTriggerDefinition_t)); - assert(event_trigger != 0); - - action_defn = 0; - action_defn = (E2SM_Bouncer_ActionDefinition_t*)calloc(1, sizeof(E2SM_Bouncer_ActionDefinition_t)); - assert(action_defn !=0); - - errbuf_len = 128; - }; - - e2sm_subscription::~e2sm_subscription(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing event trigger object memory"); - - event_trigger->choice.eventDefinition_Format1 = 0; - - action_defn->choice.actionDefinition_Format1 = 0; - - free(ran_param); - - ASN_STRUCT_FREE(asn_DEF_E2SM_Bouncer_EventTriggerDefinition, event_trigger); - ASN_STRUCT_FREE(asn_DEF_E2SM_Bouncer_ActionDefinition, action_defn); - - -}; - -bool e2sm_subscription::encode_event_trigger(unsigned char *buf, size_t *size, e2sm_subscription_helper &helper){ - - ASN_STRUCT_RESET(asn_DEF_E2SM_Bouncer_EventTriggerDefinition, event_trigger); - - bool res; - res = set_fields(event_trigger, helper); - if (!res){ - - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2SM_Bouncer_EventTriggerDefinition, event_trigger, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - return false; - } - - xer_fprint(stdout, &asn_DEF_E2SM_Bouncer_EventTriggerDefinition, event_trigger); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2SM_Bouncer_EventTriggerDefinition, event_trigger, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding event trigger definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - -bool e2sm_subscription::encode_action_defn(unsigned char *buf, size_t *size, e2sm_subscription_helper &helper){ - - bool res; - res = set_fields(action_defn, helper); - if (!res){ - return false; - } - - - int ret_constr = asn_check_constraints(&asn_DEF_E2SM_Bouncer_ActionDefinition, action_defn, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - return false; - } - - xer_fprint(stdout, &asn_DEF_E2SM_Bouncer_ActionDefinition, action_defn); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2SM_Bouncer_ActionDefinition, action_defn, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding action definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - -bool e2sm_subscription::set_fields(E2SM_Bouncer_EventTriggerDefinition_t * ref_event_trigger, e2sm_subscription_helper & helper){ - - if(ref_event_trigger == 0){ - error_string = "Invalid reference for Event Trigger Definition set fields"; - return false; - } - - ref_event_trigger->present = E2SM_Bouncer_EventTriggerDefinition_PR_eventDefinition_Format1; - - event_fmt1.triggerNature = helper.triger_nature; - - ref_event_trigger->choice.eventDefinition_Format1 = &event_fmt1; - - return true; -}; - -bool e2sm_subscription::set_fields(E2SM_Bouncer_ActionDefinition_t * ref_action_defn, e2sm_subscription_helper & helper){ - - if(ref_action_defn == 0){ - error_string = "Invalid reference for Event Action Definition set fields"; - return false; - } - ref_action_defn->present = E2SM_Bouncer_ActionDefinition_PR_actionDefinition_Format1; - - - ranparam_helper_t paramlst = helper.get_paramlist(); - - for(RANParam_Helper item:paramlst){ - ran_param->ranParameter_ID = item.getran_helper()._param_id; - ran_param->ranParameter_Name.buf = item.getran_helper()._param_name; - ran_param->ranParameter_Name.size = item.getran_helper()._param_name_len; - ran_param->ranParameter_Test = item.getran_helper()._param_test; - ran_param->ranParameter_Value.buf = item.getran_helper()._param_value; - ran_param->ranParameter_Value.size = item.getran_helper()._param_value_len; - ASN_SEQUENCE_ADD(&(actn_fmt1.ranParameter_List->list.array), ran_param); - } - - - ref_action_defn->choice.actionDefinition_Format1 = &actn_fmt1; - - - return true; -}; - diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_subscription.hpp b/Bouncer/src/xapp-asn/e2sm/e2sm_subscription.hpp deleted file mode 100644 index 4d159f9..0000000 --- a/Bouncer/src/xapp-asn/e2sm/e2sm_subscription.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -/* Classes to handle E2 service model based on e2sm-Bouncer-v001.asn */ -#ifndef E2SM_ -#define E2SM_ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* builder class for E2SM event trigger definition */ - -class e2sm_subscription { -public: - e2sm_subscription(void); - ~e2sm_subscription(void); - - bool set_fields(E2SM_Bouncer_EventTriggerDefinition_t *, e2sm_subscription_helper &); - bool set_fields(E2SM_Bouncer_ActionDefinition_t *, e2sm_subscription_helper &); - - bool encode_event_trigger(unsigned char *, size_t *, e2sm_subscription_helper &); - bool encode_action_defn(unsigned char*, size_t *, e2sm_subscription_helper &); - - - std::string get_error (void) const {return error_string ;}; - -private: - - E2SM_Bouncer_EventTriggerDefinition_t * event_trigger; // used for encoding - E2SM_Bouncer_ActionDefinition_t* action_defn; - E2SM_Bouncer_EventTriggerDefinition_Format1_t event_fmt1; - E2SM_Bouncer_ActionDefinition_Format1_t actn_fmt1; - RANparameter_Item_t *ran_param; - - - size_t errbuf_len; - char errbuf[128]; - std::string error_string; -}; - - - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_control.cc b/Bouncer/src/xapp-formats/e2ap/e2ap_control.cc deleted file mode 100644 index e66ddec..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_control.cc +++ /dev/null @@ -1,266 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_control_request.c - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#include "e2ap_control.hpp" - -// Set up memory allocations for each IE for encoding -// We are responsible for memory management for each IE for encoding -// Hence destructor should clear out memory -// When decoding, we rely on asn1c macro (ASN_STRUCT_FREE to be called -// for releasing memory by external calling function) -ric_control_request::ric_control_request(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2N_E2AP_PDU_t * )calloc(1, sizeof(E2N_E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = 0; - initMsg = (E2N_InitiatingMessage_t * )calloc(1, sizeof(E2N_InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = 0; - IE_array = (E2N_RICcontrolRequest_IEs_t *)calloc(NUM_CONTROL_REQUEST_IES, sizeof(E2N_RICcontrolRequest_IEs_t)); - assert(IE_array != 0); - - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_initiatingMessage; - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - - -}; - - -// Clear assigned protocolIE list from RIC control_request IE container -ric_control_request::~ric_control_request(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing E2AP Control Request object memory"); - - E2N_RICcontrolRequest_t *ricControl_Request = &(initMsg->value.choice.RICcontrolRequest); - for(int i = 0; i < ricControl_Request->protocolIEs.list.size; i++){ - ricControl_Request->protocolIEs.list.array[i] = 0; - } - - if (ricControl_Request->protocolIEs.list.size > 0){ - free(ricControl_Request->protocolIEs.list.array); - ricControl_Request->protocolIEs.list.size = 0; - ricControl_Request->protocolIEs.list.count = 0; - } - - free(IE_array); - free(initMsg); - e2ap_pdu_obj->choice.initiatingMessage = 0; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed E2N_E2AP Control Request object mempory"); - -} - - -bool ric_control_request::encode_e2ap_control_request(unsigned char *buf, size_t *size, ric_control_helper & dinput){ - - initMsg->procedureCode = E2N_ProcedureCode_id_ricControl; - initMsg->criticality = E2N_Criticality_ignore; - initMsg->value.present = E2N_InitiatingMessage__value_PR_RICcontrolRequest; - - bool res; - - res = set_fields(initMsg, dinput); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding control . Reason = " + error_string; - return false; - } - - //xer_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding event trigger definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool ric_control_request::set_fields(E2N_InitiatingMessage_t *initMsg, ric_control_helper &dinput){ - unsigned int ie_index; - - if (initMsg == 0){ - error_string = "Invalid reference for E2AP Control_Request message in set_fields"; - return false; - } - - E2N_RICcontrolRequest_t * ric_control_request = &(initMsg->value.choice.RICcontrolRequest); - ric_control_request->protocolIEs.list.count = 0; // reset - - // for(i = 0; i < NUM_CONTROL_REQUEST_IES;i++){ - // memset(&(IE_array[i]), 0, sizeof(RICcontrolRequest_IEs_t)); - // } - - // Mandatory IE - ie_index = 0; - E2N_RICcontrolRequest_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICcontrolRequest_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = dinput.req_id; - ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - // Mandatory IE - ie_index = 1; - E2N_RICcontrolRequest_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICcontrolRequest_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = dinput.func_id; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - - // Mandatory IE - ie_index = 2; - E2N_RICcontrolRequest_IEs_t *ies_richead = &IE_array[ie_index]; - ies_richead->criticality = E2N_Criticality_reject; - ies_richead->id = E2N_ProtocolIE_ID_id_RICcontrolHeader; - ies_richead->value.present = E2N_RICcontrolRequest_IEs__value_PR_RICcontrolHeader; - E2N_RICcontrolHeader_t *richeader_ie = &ies_richead->value.choice.RICcontrolHeader; - richeader_ie->buf = dinput.control_header; - richeader_ie->size = dinput.control_header_size; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - // Mandatory IE - ie_index = 3; - E2N_RICcontrolRequest_IEs_t *ies_indmsg = &IE_array[ie_index]; - ies_indmsg->criticality = E2N_Criticality_reject; - ies_indmsg->id = E2N_ProtocolIE_ID_id_RICcontrolMessage; - ies_indmsg->value.present = E2N_RICcontrolRequest_IEs__value_PR_RICcontrolMessage; - E2N_RICcontrolMessage_t *ricmsg_ie = &ies_indmsg->value.choice.RICcontrolMessage; - ricmsg_ie->buf = dinput.control_msg; - ricmsg_ie->size = dinput.control_msg_size; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - // Optional IE - ie_index = 4; - if (dinput.control_ack >= 0){ - E2N_RICcontrolRequest_IEs_t *ies_indtyp = &IE_array[ie_index]; - ies_indtyp->criticality = E2N_Criticality_reject; - ies_indtyp->id = E2N_ProtocolIE_ID_id_RICcontrolAckRequest; - ies_indtyp->value.present = E2N_RICcontrolRequest_IEs__value_PR_RICcontrolAckRequest; - E2N_RICcontrolAckRequest_t *ricackreq_ie = &ies_indtyp->value.choice.RICcontrolAckRequest; - *ricackreq_ie = dinput.control_ack; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - } - - // Optional IE - ie_index = 5; - if(dinput.call_process_id_size > 0){ - E2N_RICcontrolRequest_IEs_t *ies_callprocid = &IE_array[ie_index]; - ies_callprocid->criticality = E2N_Criticality_reject; - ies_callprocid->id = E2N_ProtocolIE_ID_id_RICcallProcessID; - ies_callprocid->value.present = E2N_RICcontrolRequest_IEs__value_PR_RICcallProcessID; - E2N_RICcallProcessID_t *riccallprocessid_ie = &ies_callprocid->value.choice.RICcallProcessID; - riccallprocessid_ie->buf = dinput.call_process_id; - riccallprocessid_ie->size = dinput.call_process_id_size; - ASN_SEQUENCE_ADD(&(ric_control_request->protocolIEs), &(IE_array[ie_index])); - - } - return true; - -}; - - - - -bool ric_control_request:: get_fields(E2N_InitiatingMessage_t * init_msg, ric_control_helper &dout) -{ - if (init_msg == 0){ - error_string = "Invalid reference for E2AP Control_Request message in get_fields"; - return false; - } - - - for(int edx = 0; edx < init_msg->value.choice.RICcontrolRequest.protocolIEs.list.count; edx++) { - E2N_RICcontrolRequest_IEs_t *memb_ptr = init_msg->value.choice.RICcontrolRequest.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICcontrolHeader): - dout.control_header = memb_ptr->value.choice.RICcontrolHeader.buf; - dout.control_header_size = memb_ptr->value.choice.RICcontrolHeader.size; - break; - - case (E2N_ProtocolIE_ID_id_RICcontrolMessage): - dout.control_msg = memb_ptr->value.choice.RICcontrolMessage.buf; - dout.control_msg_size = memb_ptr->value.choice.RICcontrolMessage.size; - break; - - case (E2N_ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - break; - - case (E2N_ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - case (E2N_ProtocolIE_ID_id_RICcontrolAckRequest): - dout.control_ack = memb_ptr->value.choice.RICcontrolAckRequest; - break; - - default: - break; - } - - } - - return true; - -} - -E2N_InitiatingMessage_t * ric_control_request::get_message(void) { - return initMsg; -} diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_control.hpp b/Bouncer/src/xapp-formats/e2ap/e2ap_control.hpp deleted file mode 100644 index 57a2e2d..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_control.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef E2AP_RIC_CONTROL_REQUEST_H_ -#define E2AP_RIC_CONTROL_REQUEST_H_ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "e2ap_control_helper.hpp" - -#define NUM_CONTROL_REQUEST_IES 6 - - -class ric_control_request{ - -public: - ric_control_request(void); - ~ric_control_request(void); - - bool encode_e2ap_control_request(unsigned char *, size_t *, ric_control_helper &); - E2N_InitiatingMessage_t * get_message (void) ; - bool set_fields(E2N_InitiatingMessage_t *, ric_control_helper &); - bool get_fields(E2N_InitiatingMessage_t *, ric_control_helper &); - std::string get_error(void) const {return error_string ; }; -private: - - E2N_E2AP_PDU_t * e2ap_pdu_obj; - E2N_InitiatingMessage_t *initMsg; - E2N_RICcontrolRequest_IEs_t *IE_array; - std::string error_string; - - char errbuf[128]; - size_t errbuf_len = 128; -}; - - -#endif /* E2AP_RIC_CONTROL_REQUEST_H_ */ diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_control_helper.hpp b/Bouncer/src/xapp-formats/e2ap/e2ap_control_helper.hpp deleted file mode 100644 index 11f668c..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_control_helper.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef CONTROL_HELPER_H -#define CONTROL_HELPER_H - -// control and indication helper objects are very similar and can be merged into one -// currently leaving them as two distnict entities till final design becomes clear - -typedef struct ric_control_helper ric_control_helper; - -struct ric_control_helper{ - ric_control_helper(void):req_id(1), req_seq_no(1), func_id(0), action_id(1), control_ack(-1), cause(0), sub_cause(0), control_status(1), control_msg(0), control_msg_size(0), control_header(0), control_header_size(0), call_process_id(0), call_process_id_size(0){}; - - long int req_id, req_seq_no, func_id, action_id, control_ack, cause, sub_cause, control_status; - - unsigned char* control_msg; - size_t control_msg_size; - - unsigned char* control_header; - size_t control_header_size; - - unsigned char *call_process_id; - size_t call_process_id_size; - -}; - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_control_response.cc b/Bouncer/src/xapp-formats/e2ap/e2ap_control_response.cc deleted file mode 100644 index 23ef9ae..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_control_response.cc +++ /dev/null @@ -1,415 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_control_response.c - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#include "e2ap_control_response.hpp" - -// Set up the initiating message and also allocate protocolIEs in container -// Note : this bypasses requirement to use ASN_SEQUENCE_ADD. We can directly -// assign pointers to the array in ProtocolIE. However, this also leaves us on the -// hook to manually clear the memory - -ric_control_response::ric_control_response(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2N_E2AP_PDU_t * )calloc(1, sizeof(E2N_E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - successMsg = 0; - successMsg = (E2N_SuccessfulOutcome_t * )calloc(1, sizeof(E2N_SuccessfulOutcome_t)); - assert(successMsg != 0); - - successMsg->procedureCode = E2N_ProcedureCode_id_ricControl; - successMsg->criticality = E2N_Criticality_reject; - successMsg->value.present = E2N_SuccessfulOutcome__value_PR_RICcontrolAcknowledge; - - - unsuccessMsg = 0; - unsuccessMsg = (E2N_UnsuccessfulOutcome_t * )calloc(1, sizeof(E2N_UnsuccessfulOutcome_t)); - assert(unsuccessMsg != 0); - - - unsuccessMsg->procedureCode = E2N_ProcedureCode_id_ricControl; - unsuccessMsg->criticality = E2N_Criticality_reject; - unsuccessMsg->value.present = E2N_UnsuccessfulOutcome__value_PR_RICcontrolFailure; - - IE_array = 0; - IE_array = (E2N_RICcontrolAcknowledge_IEs_t *)calloc(NUM_CONTROL_ACKNOWLEDGE_IES, sizeof(E2N_RICcontrolAcknowledge_IEs_t)); - assert(IE_array != 0); - - E2N_RICcontrolAcknowledge_t * ric_acknowledge = &(successMsg->value.choice.RICcontrolAcknowledge); - for(int i = 0; i < NUM_CONTROL_ACKNOWLEDGE_IES; i++){ - ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), &(IE_array[i])); - } - - - IE_failure_array = 0; - IE_failure_array = (E2N_RICcontrolFailure_IEs_t *)calloc(NUM_CONTROL_FAILURE_IES, sizeof(E2N_RICcontrolFailure_IEs_t)); - assert(IE_failure_array != 0); - - E2N_RICcontrolFailure_t * ric_failure = &(unsuccessMsg->value.choice.RICcontrolFailure); - for(int i = 0; i < NUM_CONTROL_FAILURE_IES; i++){ - ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), &(IE_failure_array[i])); - } - -}; - - -// Clear assigned protocolIE list from RIC control_request IE container -ric_control_response::~ric_control_response(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing E2AP Control Response object memory"); - - E2N_RICcontrolAcknowledge_t * ric_acknowledge = &(successMsg->value.choice.RICcontrolAcknowledge); - for(int i = 0; i < ric_acknowledge->protocolIEs.list.size; i++){ - ric_acknowledge->protocolIEs.list.array[i] = 0; - } - if (ric_acknowledge->protocolIEs.list.size > 0){ - free(ric_acknowledge->protocolIEs.list.array); - ric_acknowledge->protocolIEs.list.array = 0; - ric_acknowledge->protocolIEs.list.count = 0; - } - - E2N_RICcontrolFailure_t * ric_failure = &(unsuccessMsg->value.choice.RICcontrolFailure); - for(int i = 0; i < ric_failure->protocolIEs.list.size; i++){ - ric_failure->protocolIEs.list.array[i] = 0; - } - if (ric_failure->protocolIEs.list.size > 0){ - free(ric_failure->protocolIEs.list.array); - ric_failure->protocolIEs.list.array = 0; - ric_failure->protocolIEs.list.count = 0; - } - - free(IE_array); - free(IE_failure_array); - free(successMsg); - free(unsuccessMsg); - - e2ap_pdu_obj->choice.initiatingMessage = 0; - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_initiatingMessage; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed E2AP Control Response object mempory"); -} - - -bool ric_control_response::encode_e2ap_control_response(unsigned char *buf, size_t *size, ric_control_helper & dinput, bool is_success){ - - bool res; - if (is_success){ - res = set_fields(successMsg, dinput); - } - else{ - res = set_fields(unsuccessMsg, dinput); - } - - if (!res){ - return false; - } - - - if (is_success){ - e2ap_pdu_obj->choice.successfulOutcome = successMsg; - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_successfulOutcome ; - } - else{ - e2ap_pdu_obj->choice.unsuccessfulOutcome = unsuccessMsg; - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_unsuccessfulOutcome ; - - } - - //xer_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding control response. Reason = " + error_string; - return false; - } - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding E2AP Control response . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool ric_control_response::set_fields(E2N_SuccessfulOutcome_t *successMsg, ric_control_helper &dinput){ - unsigned int ie_index; - - if (successMsg == 0){ - error_string = "Invalid reference for E2AP Control Acknowledge in set_fields"; - return false; - } - - // for(i = 0; i < NUM_CONTROL_ACKNOWLEDGE_IES;i++){ - // memset(&(IE_array[i]), 0, sizeof(RICcontrolAcknowledge_IEs_t)); - // } - - //E2N_RICcontrolAcknowledge_t * ric_acknowledge = &(successMsg->value.choice.RICcontrolAcknowledge); - //ric_acknowledge->protocolIEs.list.count = 0; - - ie_index = 0; - E2N_RICcontrolAcknowledge_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICcontrolAcknowledge_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = dinput.req_id; - ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - //ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_ricreq); - - ie_index = 1; - E2N_RICcontrolAcknowledge_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICcontrolAcknowledge_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = dinput.func_id; - //ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_ranfunc); - - // ie_index = 2; - // E2N_RICcontrolAcknowledge_IEs_t *ies_riccallprocessid = &IE_array[ie_index]; - // ies_riccallprocessid->criticality = E2N_Criticality_reject; - // ies_riccallprocessid->id = E2N_ProtocolIE_ID_id_RICcallProcessID; - // ies_riccallprocessid->value.present = E2N_RICcontrolAcknowledge_IEs__value_PR_RICcallProcessID; - // RICcallProcessID_t *riccallprocessid_ie = &ies_riccallprocessid->value.choice.RICcallProcessID; - // riccallprocessid_ie->buf = dinput.call_process_id; - // riccallprocessid_ie->size = dinput.call_process_id_size; - // ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_riccallprocessid); - - ie_index = 2; - E2N_RICcontrolAcknowledge_IEs_t *ies_ric_cause = &IE_array[ie_index]; - ies_ric_cause->criticality = E2N_Criticality_reject; - ies_ric_cause->id = E2N_ProtocolIE_ID_id_RICcontrolStatus; - ies_ric_cause->value.present = E2N_RICcontrolAcknowledge_IEs__value_PR_RICcontrolStatus; - ies_ric_cause->value.choice.RICcontrolStatus = dinput.control_status; - //ASN_SEQUENCE_ADD(&(ric_acknowledge->protocolIEs), ies_ric_cause); - - return true; - -}; - -bool ric_control_response::set_fields(E2N_UnsuccessfulOutcome_t *unsuccessMsg, ric_control_helper &dinput){ - unsigned int ie_index; - - if (unsuccessMsg == 0){ - error_string = "Invalid reference for E2AP Control Failure in set_fields"; - return false; - } - - // for(i = 0; i < NUM_CONTROL_FAILURE_IES;i++){ - // memset(&(IE_failure_array[i]), 0, sizeof(RICcontrolFailure_IEs_t)); - // } - - //E2N_RICcontrolFailure_t * ric_failure = &(unsuccessMsg->value.choice.RICcontrolFailure); - //ric_failure->protocolIEs.list.count = 0; - - ie_index = 0; - E2N_RICcontrolFailure_IEs_t *ies_ricreq = &IE_failure_array[ie_index]; - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICcontrolFailure_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &(ies_ricreq->value.choice.RICrequestID); - ricrequest_ie->ricRequestorID = dinput.req_id; - ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - //ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_ricreq); - - ie_index = 1; - E2N_RICcontrolFailure_IEs_t *ies_ranfunc = &IE_failure_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICcontrolFailure_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &(ies_ranfunc->value.choice.RANfunctionID); - *ranfunction_ie = dinput.func_id; - //ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_ranfunc); - - // ie_index = 2; - // E2N_RICcontrolFailure_IEs_t *ies_riccallprocessid = &IE_failure_array[i]; - // ies_riccallprocessid->criticality = E2N_Criticality_reject; - // ies_riccallprocessid->id = E2N_ProtocolIE_ID_id_RICcallProcessID; - // ies_riccallprocessid->value.present = E2N_RICcontrolFailure_IEs__value_PR_RICcallProcessID; - // RICcallProcessID_t *riccallprocessid_ie = &(ies_riccallprocessid->value.choice.RICcallProcessID); - // riccallprocessid_ie->buf = dinput.call_process_id; - // riccallprocessid_ie->size = dinput.call_process_id_size; - // ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_riccallprocessid); - - ie_index = 2; - E2N_RICcontrolFailure_IEs_t *ies_ric_cause = &IE_failure_array[ie_index]; - ies_ric_cause->criticality = E2N_Criticality_ignore; - ies_ric_cause->id = E2N_ProtocolIE_ID_id_RICcause; - ies_ric_cause->value.present = E2N_RICcontrolFailure_IEs__value_PR_RICcause; - E2N_RICcause_t * ric_cause = &(ies_ric_cause->value.choice.RICcause); - ric_cause->present = (E2N_RICcause_PR)dinput.cause; - - switch(dinput.cause){ - case E2N_RICcause_PR_radioNetwork: - ric_cause->choice.radioNetwork = dinput.sub_cause; - break; - case E2N_RICcause_PR_transport: - ric_cause->choice.transport = dinput.sub_cause; - break; - case E2N_RICcause_PR_protocol: - ric_cause->choice.protocol= dinput.sub_cause; - break; - case E2N_RICcause_PR_misc: - ric_cause->choice.misc = dinput.sub_cause; - break; - case E2N_RICcause_PR_ric: - ric_cause->choice.ric = dinput.sub_cause; - break; - default: - std::cout <<"Error ! Illegal cause enum" << dinput.cause << std::endl; - return false; - } - - //ASN_SEQUENCE_ADD(&(ric_failure->protocolIEs), ies_ric_cause); - return true; - -}; - - - - -bool ric_control_response:: get_fields(E2N_SuccessfulOutcome_t * success_msg, ric_control_helper &dout) -{ - if (success_msg == 0){ - error_string = "Invalid reference for E2AP Control Acknowledge message in get_fields"; - return false; - } - - - for(int edx = 0; edx < success_msg->value.choice.RICcontrolAcknowledge.protocolIEs.list.count; edx++) { - E2N_RICcontrolAcknowledge_IEs_t *memb_ptr = success_msg->value.choice.RICcontrolAcknowledge.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - - case (E2N_ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - break; - - case (E2N_ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - case (E2N_ProtocolIE_ID_id_RICcause): - dout.control_status = memb_ptr->value.choice.RICcontrolStatus; - break; - - } - - } - - return true; - -} - - -bool ric_control_response:: get_fields(E2N_UnsuccessfulOutcome_t * unsuccess_msg, ric_control_helper &dout) -{ - if (unsuccess_msg == 0){ - error_string = "Invalid reference for E2AP Control Failure message in get_fields"; - return false; - } - - - for(int edx = 0; edx < unsuccess_msg->value.choice.RICcontrolFailure.protocolIEs.list.count; edx++) { - E2N_RICcontrolFailure_IEs_t *memb_ptr = unsuccess_msg->value.choice.RICcontrolFailure.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - - case (E2N_ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - break; - - case (E2N_ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - - case (E2N_ProtocolIE_ID_id_RICcause): - dout.cause = memb_ptr->value.choice.RICcause.present; - switch(dout.cause){ - case E2N_RICcause_PR_radioNetwork : - dout.sub_cause = memb_ptr->value.choice.RICcause.choice.radioNetwork; - break; - - case E2N_RICcause_PR_transport : - dout.sub_cause = memb_ptr->value.choice.RICcause.choice.transport; - break; - - case E2N_RICcause_PR_protocol : - dout.sub_cause = memb_ptr->value.choice.RICcause.choice.protocol; - break; - - case E2N_RICcause_PR_misc : - dout.sub_cause = memb_ptr->value.choice.RICcause.choice.misc; - break; - - case E2N_RICcause_PR_ric : - dout.sub_cause = memb_ptr->value.choice.RICcause.choice.ric; - break; - - default: - dout.sub_cause = -1; - break; - } - - default: - break; - } - - } - - return true; - -} - diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_control_response.hpp b/Bouncer/src/xapp-formats/e2ap/e2ap_control_response.hpp deleted file mode 100644 index 6880e48..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_control_response.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef E2AP_RIC_CONTROL_RESPONSE_H_ -#define E2AP_RIC_CONTROL_RESPONSE_H_ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "e2ap_control_helper.hpp" - -#define NUM_CONTROL_ACKNOWLEDGE_IES 3 -#define NUM_CONTROL_FAILURE_IES 3 - - -class ric_control_response{ - -public: - ric_control_response(void); - ~ric_control_response(void); - - bool encode_e2ap_control_response(unsigned char *, size_t *, ric_control_helper &, bool); - - - bool set_fields(E2N_SuccessfulOutcome_t *, ric_control_helper &); - bool get_fields(E2N_SuccessfulOutcome_t *, ric_control_helper &); - - bool set_fields(E2N_UnsuccessfulOutcome_t *, ric_control_helper &); - bool get_fields(E2N_UnsuccessfulOutcome_t *, ric_control_helper &); - - std::string get_error(void) const {return error_string ; }; - -private: - - E2N_E2AP_PDU_t * e2ap_pdu_obj; - E2N_SuccessfulOutcome_t * successMsg; - E2N_UnsuccessfulOutcome_t * unsuccessMsg; - - E2N_RICcontrolAcknowledge_IEs_t *IE_array; - E2N_RICcontrolFailure_IEs_t *IE_failure_array; - - std::string error_string; - - char errbuf[128]; - size_t errbuf_len = 128; -}; - - -#endif /* E2AP_RIC_CONTROL_RESPONSE_H_ */ diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_indication.cc b/Bouncer/src/xapp-formats/e2ap/e2ap_indication.cc deleted file mode 100644 index 33b2095..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_indication.cc +++ /dev/null @@ -1,283 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.c - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#include "e2ap_indication.hpp" - -// Set up memory allocations for each IE for encoding -// We are responsible for memory management for each IE for encoding -// Hence destructor should clear out memory -// When decoding, we rely on asn1c macro (ASN_STRUCT_FREE to be called -// for releasing memory by external calling function) -ric_indication::ric_indication(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2N_E2AP_PDU_t * )calloc(1, sizeof(E2N_E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = 0; - initMsg = (E2N_InitiatingMessage_t * )calloc(1, sizeof(E2N_InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = 0; - IE_array = (E2N_RICindication_IEs_t *)calloc(NUM_INDICATION_IES, sizeof(E2N_RICindication_IEs_t)); - assert(IE_array != 0); - - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_initiatingMessage; - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - - - - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -ric_indication::~ric_indication(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing E2AP Indication object memory"); - E2N_RICindication_t *ricIndication = &(initMsg->value.choice.RICindication); - for(int i = 0; i < ricIndication->protocolIEs.list.size; i++){ - ricIndication->protocolIEs.list.array[i] = 0; - } - if (ricIndication->protocolIEs.list.size > 0){ - free(ricIndication->protocolIEs.list.array); - ricIndication->protocolIEs.list.array = 0; - ricIndication->protocolIEs.list.count = 0; - ricIndication->protocolIEs.list.size = 0; - } - - free(IE_array); - ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed E2AP Indication object mempory"); -} - - -bool ric_indication::encode_e2ap_indication(unsigned char *buf, size_t *size, ric_indication_helper & dinput){ - - initMsg->procedureCode = E2N_ProcedureCode_id_ricIndication; - initMsg->criticality = E2N_Criticality_ignore; - initMsg->value.present = E2N_InitiatingMessage__value_PR_RICindication; - - bool res; - asn_enc_rval_t retval; - - res = set_fields(initMsg, dinput); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - error_string = "Error encoding E2AP Indication message. Reason = " + error_string; - return false; - } - - // std::cout <<"Constraint check ok ...." << std::endl; - // xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, buf, *size); - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding E2AP Indication . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool ric_indication::set_fields(E2N_InitiatingMessage_t *initMsg, ric_indication_helper &dinput){ - unsigned int ie_index; - - if (initMsg == 0){ - error_string = "Invalid reference for E2AP Indication message in set_fields"; - return false; - } - - - E2N_RICindication_t * ric_indication = &(initMsg->value.choice.RICindication); - ric_indication->protocolIEs.list.count = 0; - - ie_index = 0; - - E2N_RICindication_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICindication_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = dinput.req_id; - ricrequest_ie->ricRequestSequenceNumber = dinput.req_seq_no; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 1; - E2N_RICindication_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICindication_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = dinput.func_id; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 2; - E2N_RICindication_IEs_t *ies_actid = &IE_array[ie_index]; - ies_actid->criticality = E2N_Criticality_reject; - ies_actid->id = E2N_ProtocolIE_ID_id_RICactionID; - ies_actid->value.present = E2N_RICindication_IEs__value_PR_RICactionID; - E2N_RICactionID_t *ricaction_ie = &ies_actid->value.choice.RICactionID; - *ricaction_ie = dinput.action_id; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 3; - E2N_RICindication_IEs_t *ies_ricsn = &IE_array[ie_index]; - ies_ricsn->criticality = E2N_Criticality_reject; - ies_ricsn->id = E2N_ProtocolIE_ID_id_RICindicationSN; - ies_ricsn->value.present = E2N_RICindication_IEs__value_PR_RICindicationSN; - E2N_RICindicationSN_t *ricsn_ie = &ies_ricsn->value.choice.RICindicationSN; - *ricsn_ie = dinput.indication_sn; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - - ie_index = 4; - E2N_RICindication_IEs_t *ies_indtyp = &IE_array[ie_index]; - ies_indtyp->criticality = E2N_Criticality_reject; - ies_indtyp->id = E2N_ProtocolIE_ID_id_RICindicationType; - ies_indtyp->value.present = E2N_RICindication_IEs__value_PR_RICindicationType; - E2N_RICindicationType_t *rictype_ie = &ies_indtyp->value.choice.RICindicationType; - *rictype_ie = dinput.indication_type; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 5; - E2N_RICindication_IEs_t *ies_richead = &IE_array[ie_index]; - ies_richead->criticality = E2N_Criticality_reject; - ies_richead->id = E2N_ProtocolIE_ID_id_RICindicationHeader; - ies_richead->value.present = E2N_RICindication_IEs__value_PR_RICindicationHeader; - E2N_RICindicationHeader_t *richeader_ie = &ies_richead->value.choice.RICindicationHeader; - richeader_ie->buf = dinput.indication_header; - richeader_ie->size = dinput.indication_header_size; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - ie_index = 6; - E2N_RICindication_IEs_t *ies_indmsg = &IE_array[ie_index]; - ies_indmsg->criticality = E2N_Criticality_reject; - ies_indmsg->id = E2N_ProtocolIE_ID_id_RICindicationMessage; - ies_indmsg->value.present = E2N_RICindication_IEs__value_PR_RICindicationMessage; - E2N_RICindicationMessage_t *ricmsg_ie = &ies_indmsg->value.choice.RICindicationMessage; - ricmsg_ie->buf = dinput.indication_msg; - ricmsg_ie->size = dinput.indication_msg_size; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - - - // optional call process id .. - if (dinput.call_process_id_size > 0){ - ie_index = 7; - E2N_RICindication_IEs_t *ies_ind_callprocessid = &IE_array[ie_index]; - ies_ind_callprocessid->criticality = E2N_Criticality_reject; - ies_ind_callprocessid->id = E2N_ProtocolIE_ID_id_RICcallProcessID; - ies_ind_callprocessid->value.present = E2N_RICindication_IEs__value_PR_RICcallProcessID; - E2N_RICcallProcessID_t *riccallprocessid_ie = &ies_ind_callprocessid->value.choice.RICcallProcessID; - riccallprocessid_ie->buf = dinput.indication_msg; - riccallprocessid_ie->size = dinput.indication_msg_size; - ASN_SEQUENCE_ADD(&(ric_indication->protocolIEs), &(IE_array[ie_index])); - } - - return true; - -}; - - - - -bool ric_indication:: get_fields(E2N_InitiatingMessage_t * init_msg, ric_indication_helper &dout) -{ - if (init_msg == 0){ - error_string = "Invalid reference for E2AP Indication message in get_fields"; - return false; - } - - - for(int edx = 0; edx < init_msg->value.choice.RICindication.protocolIEs.list.count; edx++) { - E2N_RICindication_IEs_t *memb_ptr = init_msg->value.choice.RICindication.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICindicationHeader): - dout.indication_header = memb_ptr->value.choice.RICindicationHeader.buf; - dout.indication_header_size = memb_ptr->value.choice.RICindicationHeader.size; - break; - - case (E2N_ProtocolIE_ID_id_RICindicationMessage): - dout.indication_msg = memb_ptr->value.choice.RICindicationMessage.buf; - dout.indication_msg_size = memb_ptr->value.choice.RICindicationMessage.size; - break; - - case (E2N_ProtocolIE_ID_id_RICrequestID): - dout.req_id = memb_ptr->value.choice.RICrequestID.ricRequestorID; - dout.req_seq_no = memb_ptr->value.choice.RICrequestID.ricRequestSequenceNumber; - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - dout.func_id = memb_ptr->value.choice.RANfunctionID; - break; - - case (E2N_ProtocolIE_ID_id_RICindicationSN): - dout.indication_sn = memb_ptr->value.choice.RICindicationSN; - break; - - case (E2N_ProtocolIE_ID_id_RICindicationType): - dout.indication_type = memb_ptr->value.choice.RICindicationType; - break; - - case (E2N_ProtocolIE_ID_id_RICactionID): - dout.action_id = memb_ptr->value.choice.RICactionID; - break; - - case (E2N_ProtocolIE_ID_id_RICcallProcessID): - dout.call_process_id = memb_ptr->value.choice.RICcallProcessID.buf; - dout.call_process_id_size = memb_ptr->value.choice.RICcallProcessID.size; - - default: - break; - } - - } - - return true; - -} - -E2N_InitiatingMessage_t * ric_indication::get_message(void) { - return initMsg; -} diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_indication.hpp b/Bouncer/src/xapp-formats/e2ap/e2ap_indication.hpp deleted file mode 100644 index af43086..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_indication.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - -#ifndef E2AP_RIC_INDICATION_H_ -#define E2AP_RIC_INDICATION_H_ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "e2ap_indication_helper.hpp" - -#define NUM_INDICATION_IES 8 - - - -class ric_indication{ - -public: - ric_indication(void); - ~ric_indication(void); - - bool encode_e2ap_indication(unsigned char *, size_t *, ric_indication_helper &); - E2N_InitiatingMessage_t * get_message (void) ; - bool set_fields(E2N_InitiatingMessage_t *, ric_indication_helper &); - bool get_fields(E2N_InitiatingMessage_t *, ric_indication_helper &); - std::string get_error(void) const {return error_string ; }; - -private: - - E2N_E2AP_PDU_t * e2ap_pdu_obj; - E2N_InitiatingMessage_t *initMsg; - E2N_RICindication_IEs_t *IE_array; - std::string error_string; - char errbuf[128]; - size_t errbuf_len = 128; -}; - - -#endif /* E2AP_RIC_INDICATION_H_ */ diff --git a/Bouncer/src/xapp-formats/e2ap/e2ap_indication_helper.hpp b/Bouncer/src/xapp-formats/e2ap/e2ap_indication_helper.hpp deleted file mode 100644 index 276a2a7..0000000 --- a/Bouncer/src/xapp-formats/e2ap/e2ap_indication_helper.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * ric_indication.h - * - * Created on: Jul 11, 2019 - * Author: sjana, Ashwin Sridharan - */ - - -#ifndef E2AP_INDICATION_HELPER_ -#define E2AP_INDICATION_HELPER_ - -typedef struct ric_indication_helper ric_indication_helper; - -struct ric_indication_helper{ - ric_indication_helper(void) : req_id(1), req_seq_no(1), func_id(0), action_id(1), indication_type(0), indication_sn(0), indication_msg(0), indication_msg_size(0), indication_header(0), indication_header_size(0), call_process_id(0), call_process_id_size(0) {}; - long int req_id, req_seq_no, func_id, action_id, indication_type, indication_sn; - - unsigned char* indication_msg; - size_t indication_msg_size; - - unsigned char* indication_header; - size_t indication_header_size; - - unsigned char *call_process_id; - size_t call_process_id_size; - -}; - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/generic_helpers.hpp b/Bouncer/src/xapp-formats/e2ap/generic_helpers.hpp deleted file mode 100644 index 32c019a..0000000 --- a/Bouncer/src/xapp-formats/e2ap/generic_helpers.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#pragma once -#ifndef GENERIC_HELPERS -#define GENERIC_HELPERS - -#include - -/* Utilities */ - -class octet_helper { - -public: - octet_helper(void):_ref(NULL), _size(0){}; - octet_helper(const void *ref, int size):_ref(ref), _size(size){}; - void set_ref(const void *ref){ - _ref = ref; - } - - void set_size(size_t size){ - _size = size; - } - - const void * get_ref(void){return _ref ; }; - size_t get_size(void) const {return _size ; } ; - -private: - const void *_ref; - size_t _size; -}; - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/response_helper.hpp b/Bouncer/src/xapp-formats/e2ap/response_helper.hpp deleted file mode 100644 index b370ff2..0000000 --- a/Bouncer/src/xapp-formats/e2ap/response_helper.hpp +++ /dev/null @@ -1,181 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_RESPONSE_HELPER_ -#define S_RESPONSE_HELPER_ - -#include -#include - -/* Simple structure to store action for RICaction of the Subscription response based on E2 v0.31 */ -struct ActionResponse { -public: - ActionResponse(int id): _is_admit(true), _id(id), _cause(-1), _sub_cause(-1){}; - ActionResponse(int id, int cause, int sub_cause): _is_admit(false), _id(id), _cause(cause), _sub_cause(sub_cause){}; - - int get_id() const{ - return _id; - }; - - int get_cause() const{ - return _cause; - }; - - int get_sub_cause() const{ - return _sub_cause; - }; - - bool is_admitted(void){ - return _is_admit; - }; - -private: - - bool _is_admit; - int _id, _cause, _sub_cause; - -}; - - -struct subscription_response_helper { - -public: - - using action_t = std::vector; - - subscription_response_helper(void){ - _action_admitted_ref = std::make_unique(); - _action_not_admitted_ref = std::make_unique(); - - }; - - // copy operator - subscription_response_helper(const subscription_response_helper &he ){ - _action_admitted_ref = std::make_unique(); - _action_not_admitted_ref = std::make_unique(); - - _req_id = he.get_request_id(); - _req_seq_no = he.get_req_seq(); - _func_id = he.get_function_id(); - - // Take care of the actions - for (auto const & e: *(he.get_admitted_list())){ - add_action(e.get_id()); - } - - for(auto const & e: *(he.get_not_admitted_list())){ - add_action(e.get_id(), e.get_cause(), e.get_sub_cause()); - }; - } - - - // assignment operator - void operator=(const subscription_response_helper & he){ - _action_admitted_ref = std::make_unique(); - _action_not_admitted_ref = std::make_unique(); - - _req_id = he.get_request_id(); - _req_seq_no = he.get_req_seq(); - _func_id = he.get_function_id(); - - - // Take care of the actions - for (auto const & e: *(he.get_admitted_list())){ - add_action(e.get_id()); - } - - for(auto const & e: *(he.get_not_admitted_list())){ - add_action(e.get_id(), e.get_cause(), e.get_sub_cause()); - }; - - } - - action_t * get_admitted_list (void ) const {return _action_admitted_ref.get();}; - action_t * get_not_admitted_list (void ) const{return _action_not_admitted_ref.get();}; - - void set_request(int id, int seq_no){ - _req_id = id; - _req_seq_no = seq_no; - - }; - - void clear(void){ - _action_admitted_ref.get()->clear(); - _action_not_admitted_ref.get()->clear(); - } - - - void set_function_id(int id){ - _func_id = id; - }; - - void add_action(int id){ - ActionResponse a(id) ; - _action_admitted_ref.get()->push_back(a); - }; - - void add_action(int id, int cause, int sub_cause){ - ActionResponse a (id, cause, sub_cause); - _action_not_admitted_ref.get()->push_back(a); - }; - - - int get_request_id(void) const{ - return _req_id; - } - - int get_req_seq(void) const{ - return _req_seq_no; - } - - int get_function_id(void) const{ - return _func_id; - } - - std::string to_string(void){ - std::string Info; - Info += "Request ID = " + std::to_string(_req_id) + "\n"; - Info += "Request Sequence No = " + std::to_string(_req_seq_no) + "\n"; - Info += "RAN Function ID = " + std::to_string(_func_id) + "\n"; - Info += "Actions Admitted =\n"; - int i = 0; - for(auto & e: *(_action_admitted_ref)){ - Info += std::to_string(i) + ": ID=" + std::to_string(e.get_id()) + "\n"; - i++; - } - Info += "Actions Not Admitted =\n"; - i = 0; - for(auto & e: *(_action_not_admitted_ref)){ - Info += std::to_string(i) + ": ID=" + std::to_string(e.get_id()) + ": Cause =" + std::to_string(e.get_cause()) + ": Sub-Cause=" + std::to_string(e.get_sub_cause()) + "\n"; - i++; - } - - return Info; - } - -private: - int _req_id, _req_seq_no, _func_id; - std::unique_ptr _action_admitted_ref; - std::unique_ptr _action_not_admitted_ref; - -}; - - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_delete_request.cc b/Bouncer/src/xapp-formats/e2ap/subscription_delete_request.cc deleted file mode 100644 index d103d2e..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_delete_request.cc +++ /dev/null @@ -1,180 +0,0 @@ - - -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_delete_request.hpp" - -subscription_delete::subscription_delete(void){ - - _name = "default"; - - e2ap_pdu_obj = (E2N_E2AP_PDU_t * )calloc(1, sizeof(E2N_E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = (E2N_InitiatingMessage_t * )calloc(1, sizeof(E2N_InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = (E2N_RICsubscriptionDeleteRequest_IEs_t *)calloc(NUM_SUBSCRIPTION_DELETE_IES, sizeof(E2N_RICsubscriptionDeleteRequest_IEs_t)); - assert(IE_array != 0); - - E2N_RICsubscriptionDeleteRequest_t * subscription_delete = &(initMsg->value.choice.RICsubscriptionDeleteRequest); - for(int i = 0; i < NUM_SUBSCRIPTION_DELETE_IES; i++){ - ASN_SEQUENCE_ADD(&subscription_delete->protocolIEs, &(IE_array[i])); - } - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -subscription_delete::~subscription_delete(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription delete request object memory"); - E2N_RICsubscriptionDeleteRequest_t * subscription_delete = &(initMsg->value.choice.RICsubscriptionDeleteRequest); - - for(int i = 0; i < subscription_delete->protocolIEs.list.size; i++){ - subscription_delete->protocolIEs.list.array[i] = 0; - } - - if (subscription_delete->protocolIEs.list.size > 0){ - free(subscription_delete->protocolIEs.list.array); - subscription_delete->protocolIEs.list.count = 0; - subscription_delete->protocolIEs.list.size = 0; - subscription_delete->protocolIEs.list.array = 0; - } - - free(IE_array); - free(initMsg); - e2ap_pdu_obj->choice.initiatingMessage = 0; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed subscription delete request object memory"); - - -}; - - -bool subscription_delete::encode_e2ap_subscription(unsigned char *buf, size_t *size, subscription_helper &dinput){ - - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_initiatingMessage; - set_fields( dinput); - - initMsg->procedureCode = E2N_ProcedureCode_id_ricSubscriptionDelete; - initMsg->criticality = E2N_Criticality_reject; - initMsg->value.present = E2N_InitiatingMessage__value_PR_RICsubscriptionDeleteRequest; - - //xer_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding subscription delete request. Reason = " + error_string; - return false; - } - - asn_enc_rval_t res = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(res.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding Subscription Delete Request. Reason = " + error_string; - return false; - } - else { - if(*size < res.encoded){ - std::stringstream ss; - ss <<"Error encoding Subscription Delete Request . Reason = encoded pdu size " << res.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - res.encoded = -1; - return false; - } - } - - *size = res.encoded; - return true; - -} - - -bool subscription_delete::set_fields( subscription_helper &helper){ - unsigned int ie_index; - - ie_index = 0; - E2N_RICsubscriptionDeleteRequest_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICsubscriptionDeleteRequest_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - - - - ie_index = 1; - E2N_RICsubscriptionDeleteRequest_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICsubscriptionDeleteRequest_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - - - return true; -}; - - - - -bool subscription_delete:: get_fields(E2N_InitiatingMessage_t * init_msg, subscription_helper & dout) -{ - - if (init_msg == 0){ - error_string = "Invalid reference for initiating message for get string"; - return false; - } - - E2N_RICrequestID_t *requestid; - E2N_RANfunctionID_t * ranfunctionid; - - for(int edx = 0; edx < init_msg->value.choice.RICsubscriptionDeleteRequest.protocolIEs.list.count; edx++) { - E2N_RICsubscriptionDeleteRequest_IEs_t *memb_ptr = init_msg->value.choice.RICsubscriptionDeleteRequest.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - } - - //asn_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2pdu); - } - - return true; -} - - - diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_delete_request.hpp b/Bouncer/src/xapp-formats/e2ap/subscription_delete_request.hpp deleted file mode 100644 index e3c1d4e..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_delete_request.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_DELETE_ -#define S_DELETE_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "subscription_helper.hpp" - -#define NUM_SUBSCRIPTION_DELETE_IES 2 - -class subscription_delete{ -public: - - subscription_delete(void); - ~subscription_delete(void); - - bool encode_e2ap_subscription(unsigned char *, size_t *, subscription_helper &); - bool set_fields(subscription_helper &); - bool get_fields(E2N_InitiatingMessage_t *, subscription_helper &); - - std::string get_error(void) const { - return error_string ; - } - -private: - - E2N_InitiatingMessage_t *initMsg; - E2N_E2AP_PDU_t * e2ap_pdu_obj; - - E2N_RICsubscriptionDeleteRequest_IEs_t * IE_array; - - - char errbuf[128]; - size_t errbuf_len = 128; - std::string _name; - std::string error_string; -}; - - - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_delete_response.cc b/Bouncer/src/xapp-formats/e2ap/subscription_delete_response.cc deleted file mode 100644 index c1c166c..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_delete_response.cc +++ /dev/null @@ -1,292 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_delete_response.hpp" - -/* The xAPP need only worry about the get_fields from a response, since it does -not generate a response. Generating response however is included to support testing. -*/ - - -// Primarly for generation -subscription_delete_response::subscription_delete_response(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2N_E2AP_PDU_t *)calloc(1, sizeof(E2N_E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - successMsg = 0; - successMsg = (E2N_SuccessfulOutcome_t *)calloc(1, sizeof(E2N_SuccessfulOutcome_t)); - assert(successMsg != 0); - - unsuccessMsg = 0; - unsuccessMsg = (E2N_UnsuccessfulOutcome_t *)calloc(1, sizeof(E2N_UnsuccessfulOutcome_t)); - assert(unsuccessMsg != 0); - - IE_array = 0; - IE_array = (E2N_RICsubscriptionDeleteResponse_IEs_t *)calloc(NUM_SUBSCRIPTION_DELETE_RESPONSE_IES, sizeof(E2N_RICsubscriptionDeleteResponse_IEs_t)); - assert(IE_array != 0); - - IE_Failure_array = 0; - IE_Failure_array = (E2N_RICsubscriptionDeleteFailure_IEs_t *)calloc(NUM_SUBSCRIPTION_DELETE_FAILURE_IES, sizeof(E2N_RICsubscriptionDeleteFailure_IEs_t)); - assert(IE_Failure_array != 0); - - - -}; - - - -// Clear assigned protocolIE list from E2N_RIC indication IE container -subscription_delete_response::~subscription_delete_response(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription delete response memory"); - E2N_RICsubscriptionDeleteResponse_t * ric_subscription_delete_response = &(successMsg->value.choice.RICsubscriptionDeleteResponse); - - for(unsigned int i = 0; i < ric_subscription_delete_response->protocolIEs.list.size ; i++){ - ric_subscription_delete_response->protocolIEs.list.array[i] = 0; - } - - - E2N_RICsubscriptionDeleteFailure_t * ric_subscription_failure = &(unsuccessMsg->value.choice.RICsubscriptionDeleteFailure); - for(unsigned int i = 0; i < ric_subscription_failure->protocolIEs.list.size; i++){ - ric_subscription_failure->protocolIEs.list.array[i] = 0; - } - - free(IE_array); - free(IE_Failure_array); - - ASN_STRUCT_FREE(asn_DEF_E2N_SuccessfulOutcome, successMsg); - - ASN_STRUCT_FREE(asn_DEF_E2N_UnsuccessfulOutcome, unsuccessMsg); - - e2ap_pdu_obj->choice.successfulOutcome = NULL; - e2ap_pdu_obj->choice.unsuccessfulOutcome = NULL; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed subscription delete response memory"); - -}; - - -bool subscription_delete_response::encode_e2ap_subscription_delete_response(unsigned char *buf, size_t *size, subscription_response_helper &dinput, bool is_success){ - - bool res; - - if(is_success){ - res = set_fields(successMsg, dinput); - if (!res){ - return false; - } - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_successfulOutcome; - e2ap_pdu_obj->choice.successfulOutcome = successMsg; - } - else{ - res = set_fields(unsuccessMsg, dinput); - if(! res){ - return false; - } - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_unsuccessfulOutcome; - e2ap_pdu_obj->choice.unsuccessfulOutcome = unsuccessMsg; - } - - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - return false; - } - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding subcription delete response. Reason = " + error_string; - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding Subscription Delete Response . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - retval.encoded = -1; - return false; - } - } - - *size = retval.encoded; - return true; - -} - -bool subscription_delete_response::set_fields(E2N_SuccessfulOutcome_t *success, subscription_response_helper &helper){ - - if (success == 0){ - error_string = "Invalid reference to success message in set fields subscription delete response"; - return false; - } - - unsigned int ie_index; - - success->procedureCode = E2N_ProcedureCode_id_ricSubscriptionDelete; - success->criticality = E2N_Criticality_reject; - success->value.present = E2N_SuccessfulOutcome__value_PR_RICsubscriptionDeleteResponse; - - E2N_RICsubscriptionDeleteResponse_t * subscription_delete_response = &(success->value.choice.RICsubscriptionDeleteResponse); - subscription_delete_response->protocolIEs.list.count = 0; - - ie_index = 0; - E2N_RICsubscriptionDeleteResponse_IEs_t *ies_ricreq = &IE_array[ie_index]; - - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICsubscriptionDeleteResponse_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&subscription_delete_response->protocolIEs, ies_ricreq); - - - ie_index = 1; - E2N_RICsubscriptionDeleteResponse_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICsubscriptionDeleteResponse_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&subscription_delete_response->protocolIEs, ies_ranfunc); - - return true; - - -} - -bool subscription_delete_response:: get_fields(E2N_SuccessfulOutcome_t * success_msg, subscription_response_helper & dout) -{ - - if (success_msg == 0){ - error_string = "Invalid reference to success message inn get fields subscription delete response"; - return false; - } - - E2N_RICrequestID_t *requestid; - E2N_RANfunctionID_t * ranfunctionid; - - for(int edx = 0; edx < success_msg->value.choice.RICsubscriptionDeleteResponse.protocolIEs.list.count; edx++) { - E2N_RICsubscriptionDeleteResponse_IEs_t *memb_ptr = success_msg->value.choice.RICsubscriptionDeleteResponse.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - } - - } - - return true; - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - -bool subscription_delete_response::set_fields(E2N_UnsuccessfulOutcome_t *unsuccess, subscription_response_helper &helper){ - - if (unsuccess == 0){ - error_string = "Invalid reference to unsuccess message in set fields subscription delete response"; - return false; - } - - unsigned int ie_index; - - unsuccess->procedureCode = E2N_ProcedureCode_id_ricSubscriptionDelete; - unsuccess->criticality = E2N_Criticality_reject; - unsuccess->value.present = E2N_UnsuccessfulOutcome__value_PR_RICsubscriptionDeleteFailure; - - E2N_RICsubscriptionDeleteFailure_t * ric_subscription_failure = &(unsuccess->value.choice.RICsubscriptionDeleteFailure); - ric_subscription_failure->protocolIEs.list.count = 0; - - ie_index = 0; - E2N_RICsubscriptionDeleteFailure_IEs_t *ies_ricreq = &IE_Failure_array[ie_index]; - - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICsubscriptionDeleteFailure_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, ies_ricreq); - - ie_index = 1; - E2N_RICsubscriptionDeleteFailure_IEs_t *ies_ranfunc = &IE_Failure_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICsubscriptionDeleteFailure_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, ies_ranfunc); - - - return true; - -} - -bool subscription_delete_response:: get_fields(E2N_UnsuccessfulOutcome_t * unsuccess_msg, subscription_response_helper & dout) -{ - - if (unsuccess_msg == 0){ - error_string = "Invalid reference to unsuccess message in get fields subscription delete response"; - return false; - } - - E2N_RICrequestID_t *requestid; - E2N_RANfunctionID_t * ranfunctionid; - - for(int edx = 0; edx < unsuccess_msg->value.choice.RICsubscriptionDeleteFailure.protocolIEs.list.count; edx++) { - E2N_RICsubscriptionDeleteFailure_IEs_t *memb_ptr = unsuccess_msg->value.choice.RICsubscriptionDeleteFailure.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - } - - } - - return true; - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - - diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_delete_response.hpp b/Bouncer/src/xapp-formats/e2ap/subscription_delete_response.hpp deleted file mode 100644 index d9581e4..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_delete_response.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_DEL_RESPONSE_ -#define S_DEL_RESPONSE_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "response_helper.hpp" - -#define NUM_SUBSCRIPTION_DELETE_RESPONSE_IES 2 -#define NUM_SUBSCRIPTION_DELETE_FAILURE_IES 2 - -class subscription_delete_response { -public: - - subscription_delete_response(void); - ~subscription_delete_response(void); - - bool encode_e2ap_subscription_delete_response(unsigned char *, size_t *, subscription_response_helper &, bool); - bool set_fields(E2N_SuccessfulOutcome_t *, subscription_response_helper &); - bool get_fields(E2N_SuccessfulOutcome_t *, subscription_response_helper &); - - bool set_fields(E2N_UnsuccessfulOutcome_t *, subscription_response_helper &); - bool get_fields(E2N_UnsuccessfulOutcome_t *, subscription_response_helper &); - - std::string get_error_string(void) const { - return error_string; - } - -private: - - E2N_E2AP_PDU_t * e2ap_pdu_obj; - E2N_SuccessfulOutcome_t * successMsg; - E2N_UnsuccessfulOutcome_t * unsuccessMsg; - - - E2N_RICsubscriptionDeleteResponse_IEs_t *IE_array; - E2N_RICsubscriptionDeleteFailure_IEs_t *IE_Failure_array; - - - char errbuf[128]; - size_t errbuf_len = 128; - std::string error_string; - -}; - - - - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_helper.hpp b/Bouncer/src/xapp-formats/e2ap/subscription_helper.hpp deleted file mode 100644 index ae0c5a5..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_helper.hpp +++ /dev/null @@ -1,196 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#ifndef SUB_HELPER_ -#define SUB_HELPER_ - -/* - Simple structure to store action related information based on E2 v0.22 - Used for subscription request, response etc - - ricActionID RICactionID, - ricActionType RICactionType, - ricActionDefinition RICactionDefinition OPTIONAL, - ricSubsequentAction RICsubsequentAction OPTIONAL, - ricCause -*/ - -#include -#include -#include - -#include "generic_helpers.hpp" - - -// Note : if no action definition specified, octet length of action definition is NULL -// If no subsequent action specified, default is subsequent_action = 0, time to wait is 0 -struct Action { - -public: - - Action(int id, int type): _is_def(false), _is_subs_act(false), _id(id), _type(type), _next_action(0), _wait(0){}; - Action(int id, int type, const void *def, size_t def_size, int next, int wait): _is_def(false), _is_subs_act(false), _id(id), _type(type){ - - if (def_size > 0){ - _is_def = true; - _action_definition.set_ref(def); - _action_definition.set_size(def_size); - } - - if(next >= 0 && wait >= 0){ - _is_subs_act = true; - _next_action = next; - _wait = wait; - } - }; - - - int get_id() const{ - return _id; - } - - int get_type() const { - return _type; - } - - - const void * get_definition(void ) { - return _action_definition.get_ref(); - } - - int get_definition_size(void) const { - return _action_definition.get_size(); - }; - - - int get_subsequent_action() const { - return _next_action; - }; - - int get_wait() const { - return _wait; - } - - bool is_definition() const{ - - return _is_def; - } - - bool is_subsequent_action() const{ - return _is_subs_act; - } - -private: - - bool _is_def; - bool _is_subs_act; - int _id, _type, _next_action, _wait, _cause, _sub_cause; - bool _is_admit; - octet_helper _action_definition; - -}; - - -/* - Helper class that stores subscription data -*/ - - -struct subscription_helper { - -public: - - using action_t = std::vector; - - subscription_helper(){ - _action_ref = std::make_unique(); - curr_index = 0; - }; - - action_t * get_list() const {return _action_ref.get();}; - - void clear(void){ - _action_ref.get()->clear(); - } - - void set_request(int id, int seq_no){ - _req_id = id; - _req_seq_no = seq_no; - - }; - - void set_function_id(int id){ - _func_id = id; - }; - - void set_event_def(const void *ref, size_t size){ - _event_def.set_ref(ref); - _event_def.set_size(size); - }; - - - void add_action(int id, int type){ - Action a(id, type) ; - _action_ref.get()->push_back(a); - }; - - void add_action(int id, int type, std::string action_def, int next_action, int wait_time){ - Action a (id, type, action_def.c_str(), action_def.length(), next_action, wait_time); - _action_ref.get()->push_back(a); - }; - - - int get_request_id(void) const{ - return _req_id; - } - - int get_req_seq(void) const { - return _req_seq_no; - } - - int get_function_id(void) const{ - return _func_id; - } - - const void * get_event_def(void) { - return _event_def.get_ref(); - } - - int get_event_def_size(void) const { - return _event_def.get_size(); - } - - void print_sub_info(void){ - std::cout <<"Request ID = " << _req_id << std::endl; - std::cout <<"Request Sequence Number = " << _req_seq_no << std::endl; - std::cout <<"RAN Function ID = " << _func_id << std::endl; - for(auto const & e: *(_action_ref.get())){ - std::cout <<"Action ID = " << e.get_id() << " Action Type = " << e.get_type() << std::endl; - } - }; - -private: - - std::unique_ptr _action_ref; - int curr_index; - int _req_id, _req_seq_no, _func_id; - octet_helper _event_def; -}; - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_request.cc b/Bouncer/src/xapp-formats/e2ap/subscription_request.cc deleted file mode 100644 index 9b2f897..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_request.cc +++ /dev/null @@ -1,308 +0,0 @@ - - -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_request.hpp" - - -// Set up memory allocations for each IE for encoding -// We are responsible for memory management for each IE for encoding -// Hence destructor should clear out memory -// When decoding, we rely on asn1c macro (ASN_STRUCT_FREE to be called -// for releasing memory by external calling function) -subscription_request::subscription_request(void){ - - _name = "default"; - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2N_E2AP_PDU_t * )calloc(1, sizeof(E2N_E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - initMsg = 0; - initMsg = (E2N_InitiatingMessage_t * )calloc(1, sizeof(E2N_InitiatingMessage_t)); - assert(initMsg != 0); - - IE_array = 0; - IE_array = (E2N_RICsubscriptionRequest_IEs_t *)calloc(NUM_SUBSCRIPTION_REQUEST_IES, sizeof(E2N_RICsubscriptionRequest_IEs_t)); - assert(IE_array != 0); - - action_array = 0; - action_array = (E2N_RICaction_ToBeSetup_ItemIEs_t *)calloc(INITIAL_REQUEST_LIST_SIZE, sizeof(E2N_RICaction_ToBeSetup_ItemIEs_t)); - assert(action_array != 0); - action_array_size = INITIAL_REQUEST_LIST_SIZE; - // also need to add subsequent action and time to wait .. - for (unsigned int i = 0; i < action_array_size; i++){ - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction = (struct E2N_RICsubsequentAction *)calloc(1, sizeof(struct E2N_RICsubsequentAction)); - assert(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction != 0); - } - - e2ap_pdu_obj->choice.initiatingMessage = initMsg; - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_initiatingMessage; - - - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -subscription_request::~subscription_request(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription request memory for");; - - // Sequence of actions to be admitted causes special heart-ache. Free ric subscription element manually and reset the ie pointer - E2N_RICsubscription_t * ricsubscription_ie = &(IE_array[2].value.choice.RICsubscription); - - for(int i = 0; i < ricsubscription_ie->ricAction_ToBeSetup_List.list.size; i++){ - ricsubscription_ie->ricAction_ToBeSetup_List.list.array[i] = 0; - } - - if (ricsubscription_ie->ricAction_ToBeSetup_List.list.size > 0){ - free(ricsubscription_ie->ricAction_ToBeSetup_List.list.array); - ricsubscription_ie->ricAction_ToBeSetup_List.list.size = 0; - ricsubscription_ie->ricAction_ToBeSetup_List.list.count = 0; - ricsubscription_ie->ricAction_ToBeSetup_List.list.array = 0; - } - - // clear subsequent action array - for (unsigned int i = 0; i < action_array_size; i++){ - free(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction ); - } - - free(action_array); - E2N_RICsubscriptionRequest_t * subscription_request = &(initMsg->value.choice.RICsubscriptionRequest); - - for(int i = 0; i < subscription_request->protocolIEs.list.size; i++){ - subscription_request->protocolIEs.list.array[i] = 0; - } - - if( subscription_request->protocolIEs.list.size > 0){ - free( subscription_request->protocolIEs.list.array); - subscription_request->protocolIEs.list.array = 0; - subscription_request->protocolIEs.list.size = 0; - subscription_request->protocolIEs.list.count = 0; - } - - free(IE_array); - free(initMsg); - e2ap_pdu_obj->choice.initiatingMessage = 0; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - mdclog_write(MDCLOG_DEBUG, "Freed subscription request memory "); -}; - - -bool subscription_request::encode_e2ap_subscription(unsigned char *buf, size_t *size, subscription_helper &dinput){ - - bool res; - - initMsg->procedureCode = E2N_ProcedureCode_id_ricSubscription; - initMsg->criticality = E2N_Criticality_ignore; - initMsg->value.present = E2N_InitiatingMessage__value_PR_RICsubscriptionRequest; - - res = set_fields(initMsg, dinput); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding subscription request. Reason = " + error_string; - return false; - } - - //xer_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding Subscription Request. Reason = " + error_string; - return false; - } - else { - if(*size < retval.encoded){ - std::stringstream ss; - ss <<"Error encoding Subscription Request . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - retval.encoded = -1; - return false; - } - } - - *size = retval.encoded; - return true; - -} - - -bool subscription_request::set_fields( E2N_InitiatingMessage_t * init_msg, subscription_helper &helper){ - - - int ie_index; - int result = 0; - - if (init_msg == 0){ - error_string = "Error. Invalid reference when getting fields from subscription request"; - return false; - } - - E2N_RICsubscriptionRequest_t * ric_subscription = &(init_msg->value.choice.RICsubscriptionRequest); - ric_subscription->protocolIEs.list.count = 0; - - ie_index = 0; - E2N_RICsubscriptionRequest_IEs_t *ies_ricreq = &IE_array[ie_index]; - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICsubscriptionRequest_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - result = ASN_SEQUENCE_ADD(&(ric_subscription->protocolIEs), &IE_array[ie_index]); - assert(result == 0); - - ie_index = 1; - E2N_RICsubscriptionRequest_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICsubscriptionRequest_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - result = ASN_SEQUENCE_ADD(&(ric_subscription->protocolIEs), &IE_array[ie_index]); - assert(result == 0); - - - ie_index = 2; - E2N_RICsubscriptionRequest_IEs_t *ies_actid = &IE_array[ie_index]; - ies_actid->criticality = E2N_Criticality_reject; - ies_actid->id = E2N_ProtocolIE_ID_id_RICsubscription; - ies_actid->value.present = E2N_RICsubscriptionRequest_IEs__value_PR_RICsubscription; - E2N_RICsubscription_t *ricsubscription_ie = &ies_actid->value.choice.RICsubscription; - - ricsubscription_ie->ricEventTriggerDefinition.buf = (uint8_t *) helper.get_event_def(); - ricsubscription_ie->ricEventTriggerDefinition.size = helper.get_event_def_size(); - - std::vector * ref_action_array = helper.get_list(); - // do we need to resize ? - // we don't care about contents, so just do a free/calloc - if(action_array_size < ref_action_array->size()){ - std::cout <<"re-allocating action array from " << action_array_size << " to " << 2 * ref_action_array->size() << std::endl; - // free subsequent allocation - for (unsigned int i = 0; i < action_array_size; i++){ - free(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction ); - } - - action_array_size = 2 * ref_action_array->size(); - free(action_array); - action_array = (E2N_RICaction_ToBeSetup_ItemIEs_t *)calloc(action_array_size, sizeof(E2N_RICaction_ToBeSetup_ItemIEs_t)); - assert(action_array != 0); - - // also need to add subsequent action and time to wait .. - for (unsigned int i = 0; i < action_array_size; i++){ - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction = (struct E2N_RICsubsequentAction *)calloc(1, sizeof(struct E2N_RICsubsequentAction)); - assert(action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction != 0); - } - - } - - // reset the list count on ricAction_ToBeSetup_List; - ricsubscription_ie->ricAction_ToBeSetup_List.list.count = 0; - - for(unsigned int i = 0; i < ref_action_array->size(); i ++){ - action_array[i].criticality = E2N_Criticality_ignore; - action_array[i].id = E2N_ProtocolIE_ID_id_RICaction_ToBeSetup_Item ; - action_array[i].value.present = E2N_RICaction_ToBeSetup_ItemIEs__value_PR_RICaction_ToBeSetup_Item; - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricActionID = (*ref_action_array)[i].get_id(); - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricActionType = (*ref_action_array)[i].get_type(); - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction->ricSubsequentActionType = (*ref_action_array)[i].get_subsequent_action(); - action_array[i].value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction->ricTimeToWait = (*ref_action_array)[i].get_wait(); - - result = ASN_SEQUENCE_ADD(&ricsubscription_ie->ricAction_ToBeSetup_List, &(action_array[i])); - if (result == -1){ - error_string = "Erorr : Unable to assign memory to add Action item to set up list"; - return false; - } - - } - - result = ASN_SEQUENCE_ADD(&(ric_subscription->protocolIEs), &IE_array[ie_index]); - assert(result == 0); - - - - return true; -}; - - - -bool subscription_request:: get_fields(E2N_InitiatingMessage_t * init_msg, subscription_helper & dout) -{ - - if (init_msg == 0){ - error_string = "Error. Invalid reference when getting fields from subscription request"; - return false; - } - - E2N_RICrequestID_t *requestid; - E2N_RANfunctionID_t * ranfunctionid; - E2N_RICsubscription_t * ricsubscription; - - for(int edx = 0; edx < init_msg->value.choice.RICsubscriptionRequest.protocolIEs.list.count; edx++) { - E2N_RICsubscriptionRequest_IEs_t *memb_ptr = init_msg->value.choice.RICsubscriptionRequest.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - case (E2N_ProtocolIE_ID_id_RICsubscription): - ricsubscription = &memb_ptr->value.choice.RICsubscription; - dout.set_event_def(ricsubscription->ricEventTriggerDefinition.buf, ricsubscription->ricEventTriggerDefinition.size); - - for(int index = 0; index < ricsubscription->ricAction_ToBeSetup_List.list.count; index ++){ - E2N_RICaction_ToBeSetup_ItemIEs_t * item = (E2N_RICaction_ToBeSetup_ItemIEs_t *)ricsubscription->ricAction_ToBeSetup_List.list.array[index]; - if (item->value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction == NULL){ - dout.add_action(item->value.choice.RICaction_ToBeSetup_Item.ricActionID, item->value.choice.RICaction_ToBeSetup_Item.ricActionType); - } - else{ - std::string action_def = ""; // for now we are ignoring action definition - dout.add_action(item->value.choice.RICaction_ToBeSetup_Item.ricActionID, item->value.choice.RICaction_ToBeSetup_Item.ricActionType, action_def, item->value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction->ricSubsequentActionType, item->value.choice.RICaction_ToBeSetup_Item.ricSubsequentAction->ricTimeToWait); - } - }; - - break; - } - - } - - //asn_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2pdu); - return true; -}; - - - diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_request.hpp b/Bouncer/src/xapp-formats/e2ap/subscription_request.hpp deleted file mode 100644 index 28f419a..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_request.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_REQUEST_ -#define S_REQUEST_ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "subscription_helper.hpp" - -#define NUM_SUBSCRIPTION_REQUEST_IES 3 -#define INITIAL_REQUEST_LIST_SIZE 4 - -class subscription_request{ -public: - - subscription_request(std::string name); - subscription_request(void); - ~subscription_request(void); - - bool encode_e2ap_subscription(unsigned char *, size_t *, subscription_helper &); - bool set_fields(E2N_InitiatingMessage_t *, subscription_helper &); - bool get_fields(E2N_InitiatingMessage_t *, subscription_helper &); - - std::string get_error(void) const{ - return error_string; - } - -private: - - E2N_InitiatingMessage_t *initMsg; - E2N_E2AP_PDU_t * e2ap_pdu_obj; - - E2N_RICsubscriptionRequest_IEs_t * IE_array; - E2N_RICaction_ToBeSetup_ItemIEs_t * action_array; - unsigned int action_array_size; - char errbuf[128]; - size_t errbuf_len = 128; - std::string _name; - std::string error_string; -}; - - - -#endif diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_response.cc b/Bouncer/src/xapp-formats/e2ap/subscription_response.cc deleted file mode 100644 index 5308e81..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_response.cc +++ /dev/null @@ -1,583 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - - -#include "subscription_response.hpp" - -/* The xAPP need only worry about the get_fields from a response, since it does -not generate a response. Generating response however is included to support testing. -*/ - - -// Primarly for generation -subscription_response::subscription_response(void){ - - e2ap_pdu_obj = 0; - e2ap_pdu_obj = (E2N_E2AP_PDU_t *)calloc(1, sizeof(E2N_E2AP_PDU_t)); - assert(e2ap_pdu_obj != 0); - - successMsg = 0; - successMsg = (E2N_SuccessfulOutcome_t *)calloc(1, sizeof(E2N_SuccessfulOutcome_t)); - assert(successMsg != 0); - - unsuccessMsg = 0; - unsuccessMsg = (E2N_UnsuccessfulOutcome_t *)calloc(1, sizeof(E2N_UnsuccessfulOutcome_t)); - assert(unsuccessMsg != 0); - - IE_array = 0; - IE_array = (E2N_RICsubscriptionResponse_IEs_t *)calloc(NUM_SUBSCRIPTION_RESPONSE_IES, sizeof(E2N_RICsubscriptionResponse_IEs_t)); - assert(IE_array != 0); - - IE_Failure_array = 0; - IE_Failure_array = (E2N_RICsubscriptionFailure_IEs_t *)calloc(NUM_SUBSCRIPTION_FAILURE_IES, sizeof(E2N_RICsubscriptionFailure_IEs_t)); - assert(IE_Failure_array != 0); - - ie_admitted_list = 0; - ie_admitted_list = (E2N_RICaction_Admitted_ItemIEs_t *)calloc(INITIAL_RESPONSE_LIST_SIZE, sizeof(E2N_RICaction_Admitted_ItemIEs_t)); - assert(ie_admitted_list != 0); - ie_admitted_list_size = INITIAL_RESPONSE_LIST_SIZE; - - ie_not_admitted_list = 0; - ie_not_admitted_list = (E2N_RICaction_NotAdmitted_ItemIEs_t *)calloc(INITIAL_RESPONSE_LIST_SIZE, sizeof(E2N_RICaction_NotAdmitted_ItemIEs_t)); - assert(ie_not_admitted_list != 0); - ie_not_admitted_list_size = INITIAL_RESPONSE_LIST_SIZE; - - - - - -}; - - - -// Clear assigned protocolIE list from RIC indication IE container -subscription_response::~subscription_response(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing subscription response memory"); - E2N_RICaction_Admitted_List_t * response_admitted_list = (E2N_RICaction_Admitted_List_t *) &(IE_array[2].value.choice.RICaction_Admitted_List); - - for(int i = 0; i < response_admitted_list->list.size; i++){ - response_admitted_list->list.array[i] = 0; - } - - - if (response_admitted_list->list.size > 0){ - free(response_admitted_list->list.array); - response_admitted_list->list.array = 0; - response_admitted_list->list.size = 0; - response_admitted_list->list.count = 0; - } - - - E2N_RICaction_NotAdmitted_List_t * response_not_admitted_list = &(IE_array[3].value.choice.RICaction_NotAdmitted_List); - for(int i = 0; i < response_not_admitted_list->list.size; i++){ - response_not_admitted_list->list.array[i] = 0; - } - - if (response_not_admitted_list->list.size > 0){ - free(response_not_admitted_list->list.array); - response_not_admitted_list->list.array = 0; - response_not_admitted_list->list.size = 0; - response_not_admitted_list->list.count = 0; - } - - E2N_RICsubscriptionResponse_t * ric_subscription_response = &(successMsg->value.choice.RICsubscriptionResponse); - for(int i = 0; i < ric_subscription_response->protocolIEs.list.size ; i++){ - ric_subscription_response->protocolIEs.list.array[i] = 0; - } - - if (ric_subscription_response->protocolIEs.list.size > 0){ - free(ric_subscription_response->protocolIEs.list.array); - ric_subscription_response->protocolIEs.list.array = 0; - ric_subscription_response->protocolIEs.list.size = 0; - ric_subscription_response->protocolIEs.list.count = 0; - } - - - E2N_RICaction_NotAdmitted_List_t * failure_not_admitted_list = &(IE_Failure_array[2].value.choice.RICaction_NotAdmitted_List); - for(int i = 0; i < failure_not_admitted_list->list.size; i++){ - failure_not_admitted_list->list.array[i] = 0; - } - - if ( failure_not_admitted_list->list.size > 0){ - free( failure_not_admitted_list->list.array); - failure_not_admitted_list->list.array = 0; - failure_not_admitted_list->list.size = 0; - failure_not_admitted_list->list.count = 0; - } - - - E2N_RICsubscriptionFailure_t * ric_subscription_failure = &(unsuccessMsg->value.choice.RICsubscriptionFailure); - for(int i = 0; i < ric_subscription_failure->protocolIEs.list.size; i++){ - ric_subscription_failure->protocolIEs.list.array[i] = 0; - } - - if ( ric_subscription_failure->protocolIEs.list.size > 0){ - free(ric_subscription_failure->protocolIEs.list.array); - ric_subscription_failure->protocolIEs.list.array = 0; - ric_subscription_failure->protocolIEs.list.size = 0; - ric_subscription_failure->protocolIEs.list.count = 0; - } - - - free(ie_admitted_list); - free(ie_not_admitted_list); - free(IE_Failure_array); - free(IE_array); - - - ASN_STRUCT_FREE(asn_DEF_E2N_SuccessfulOutcome, successMsg); - ASN_STRUCT_FREE(asn_DEF_E2N_UnsuccessfulOutcome, unsuccessMsg); - - - e2ap_pdu_obj->choice.initiatingMessage = NULL; - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_NOTHING; - ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj); - - mdclog_write(MDCLOG_DEBUG, "Freed subscription response memory "); - - -}; - - -bool subscription_response::encode_e2ap_subscription_response(unsigned char *buf, size_t *size, subscription_response_helper &dinput, bool is_success){ - - - if(is_success){ - set_fields_success(dinput); - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_successfulOutcome; - e2ap_pdu_obj->choice.successfulOutcome = successMsg; - - successMsg->procedureCode = E2N_ProcedureCode_id_ricSubscription; - successMsg->criticality = E2N_Criticality_reject; - successMsg->value.present = E2N_SuccessfulOutcome__value_PR_RICsubscriptionResponse; - - } - else{ - set_fields_unsuccess(dinput); - e2ap_pdu_obj->present = E2N_E2AP_PDU_PR_unsuccessfulOutcome; - e2ap_pdu_obj->choice.unsuccessfulOutcome = unsuccessMsg; - - unsuccessMsg->procedureCode = E2N_ProcedureCode_id_ricSubscription; - unsuccessMsg->criticality = E2N_Criticality_reject; - unsuccessMsg->value.present = E2N_UnsuccessfulOutcome__value_PR_RICsubscriptionFailure; - - } - - //xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2ap_pdu_obj); - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2AP_PDU, (void *) e2ap_pdu_obj, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(errbuf, errbuf_len); - error_string = "Constraints failed for encoding subscription response. Reason = " + error_string; - return false; - } - - asn_enc_rval_t res = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, e2ap_pdu_obj, buf, *size); - - if(res.encoded == -1){ - std::cout <<"Error encoding PDU. Reason =" << strerror(errno) << std::endl; - return false; - } - else { - if(*size < res.encoded){ - fprintf(stderr, "Buffer assigned too small to encode: %s",(char *)(asn_DEF_E2N_E2AP_PDU.name)); - res.encoded = -1; - return false; - } - } - - *size = res.encoded; - return true; - -} - -void subscription_response::set_fields_success(subscription_response_helper &helper){ - - int ie_index; - - E2N_RICsubscriptionResponse_t * subscription_response = &(successMsg->value.choice.RICsubscriptionResponse); - //reset list count .. - subscription_response->protocolIEs.list.count = 0; - - ie_index = 0; - E2N_RICsubscriptionResponse_IEs_t *ies_ricreq = &IE_array[ie_index]; - - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICsubscriptionResponse_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - - - ie_index = 1; - E2N_RICsubscriptionResponse_IEs_t *ies_ranfunc = &IE_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICsubscriptionResponse_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - - - ie_index = 2; - E2N_RICsubscriptionResponse_IEs_t *ies_admitted_actid = &IE_array[ie_index]; - ies_admitted_actid->criticality = E2N_Criticality_reject; - ies_admitted_actid->id = E2N_ProtocolIE_ID_id_RICactions_Admitted; - E2N_RICaction_Admitted_List_t *ric_admitted_actions_ie = &ies_admitted_actid->value.choice.RICaction_Admitted_List; - ric_admitted_actions_ie->list.count = 0; - std::vector * ref_admitted_action_array = helper.get_admitted_list(); - - if(ref_admitted_action_array->size() == 0){ - ies_admitted_actid->value.present = E2N_RICsubscriptionResponse_IEs__value_PR_NOTHING; - } - else{ - ies_admitted_actid->value.present = E2N_RICsubscriptionResponse_IEs__value_PR_RICaction_Admitted_List; - - // resize memory ? - if (ref_admitted_action_array->size() >= ie_admitted_list_size){ - ie_admitted_list_size = 2 * ref_admitted_action_array->size(); - free(ie_admitted_list); - ie_admitted_list = (E2N_RICaction_Admitted_ItemIEs_t *)calloc(ie_admitted_list_size, sizeof(E2N_RICaction_Admitted_ItemIEs_t)); - assert(ie_admitted_list != 0); - }; - - - for(unsigned int i = 0; i < ref_admitted_action_array->size(); i ++){ - ie_admitted_list[i].criticality = E2N_Criticality_ignore; - ie_admitted_list[i].id = E2N_ProtocolIE_ID_id_RICaction_Admitted_Item ; - ie_admitted_list[i].value.present = E2N_RICaction_Admitted_ItemIEs__value_PR_RICaction_Admitted_Item; - ie_admitted_list[i].value.choice.RICaction_Admitted_Item.ricActionID = (*ref_admitted_action_array)[i].get_id(); - ASN_SEQUENCE_ADD(ric_admitted_actions_ie, &(ie_admitted_list[i])); - } - } - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - - // optional IE : add only if non-zero list - ie_index = 3; - std::vector * ref_notadmitted_action_array = helper.get_not_admitted_list(); - if (ref_notadmitted_action_array->size() > 0){ - - E2N_RICsubscriptionResponse_IEs_t *ies_notadmitted_actid = &IE_array[ie_index]; - ies_notadmitted_actid->criticality = E2N_Criticality_reject; - ies_notadmitted_actid->id = E2N_ProtocolIE_ID_id_RICactions_NotAdmitted; - - E2N_RICaction_NotAdmitted_List_t *ric_not_admitted_actions_ie = &ies_notadmitted_actid->value.choice.RICaction_NotAdmitted_List; - ric_not_admitted_actions_ie->list.count = 0; - - - ies_notadmitted_actid->value.present = E2N_RICsubscriptionResponse_IEs__value_PR_RICaction_NotAdmitted_List; - - // resize memory ? - if (ref_notadmitted_action_array->size() >= ie_not_admitted_list_size){ - ie_not_admitted_list_size = 2 * ref_notadmitted_action_array->size(); - free(ie_not_admitted_list); - ie_not_admitted_list = (E2N_RICaction_NotAdmitted_ItemIEs_t *)calloc(ie_not_admitted_list_size, sizeof(E2N_RICaction_NotAdmitted_ItemIEs_t)); - assert(ie_not_admitted_list != 0); - - }; - - - for(unsigned int i = 0; i < ref_notadmitted_action_array->size(); i ++){ - ie_not_admitted_list[i].criticality = E2N_Criticality_ignore; - ie_not_admitted_list[i].id = E2N_ProtocolIE_ID_id_RICaction_NotAdmitted_Item ; - ie_not_admitted_list[i].value.present = E2N_RICaction_NotAdmitted_ItemIEs__value_PR_RICaction_NotAdmitted_Item;; - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricActionID = (*ref_notadmitted_action_array)[i].get_id(); - - int cause = (*ref_notadmitted_action_array)[i].get_cause(); - switch(cause){ - case E2N_RICcause_PR_radioNetwork: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.radioNetwork = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_transport: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.transport = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_protocol: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.protocol= (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_misc: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.misc = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_ric: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.ric = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - default: - mdclog_write(MDCLOG_ERR, "Error :: %s, %d : Unknown RIC cause %d\n", __FILE__, __LINE__, cause); - return; - } - - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.present = (E2N_RICcause_PR)cause; - ASN_SEQUENCE_ADD(ric_not_admitted_actions_ie, &(ie_not_admitted_list[i])); - } - - ASN_SEQUENCE_ADD(&subscription_response->protocolIEs, &(IE_array[ie_index])); - } - -} - -void subscription_response:: get_fields(E2N_SuccessfulOutcome_t * success_msg, subscription_response_helper & dout) -{ - - assert(success_msg != NULL); - - E2N_RICrequestID_t *requestid; - E2N_RANfunctionID_t * ranfunctionid; - E2N_RICaction_Admitted_List_t * ric_admitted_action_list; - E2N_RICaction_NotAdmitted_List_t * ric_not_admitted_action_list; - - for(int edx = 0; edx < success_msg->value.choice.RICsubscriptionResponse.protocolIEs.list.count; edx++) { - E2N_RICsubscriptionResponse_IEs_t *memb_ptr = success_msg->value.choice.RICsubscriptionResponse.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - case (E2N_ProtocolIE_ID_id_RICactions_Admitted): - ric_admitted_action_list = &memb_ptr->value.choice.RICaction_Admitted_List; - - // admitted actions - for(int index = 0; index < ric_admitted_action_list->list.count; index ++){ - E2N_RICaction_Admitted_ItemIEs_t * item = (E2N_RICaction_Admitted_ItemIEs_t *)ric_admitted_action_list->list.array[index]; - long int id = item->value.choice.RICaction_Admitted_Item.ricActionID; - dout.get_admitted_list()->push_back(ActionResponse(id)); - }; - - break; - - case (E2N_ProtocolIE_ID_id_RICactions_NotAdmitted): - ric_not_admitted_action_list = &memb_ptr->value.choice.RICaction_NotAdmitted_List; - - for(int index = 0; index < ric_not_admitted_action_list->list.count; index ++){ - E2N_RICaction_NotAdmitted_ItemIEs_t * item = (E2N_RICaction_NotAdmitted_ItemIEs_t *)ric_not_admitted_action_list->list.array[index]; - long int id = item->value.choice.RICaction_NotAdmitted_Item.ricActionID; - int cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.present; - int sub_cause; - switch(cause){ - - case E2N_RICcause_PR_radioNetwork : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.radioNetwork; - break; - - case E2N_RICcause_PR_transport : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.transport; - break; - - case E2N_RICcause_PR_protocol : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.protocol; - break; - - case E2N_RICcause_PR_misc : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.misc; - break; - - case E2N_RICcause_PR_ric : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.ric; - break; - - default: - std::cout <<"Error ! Illegal cause enum" << cause << std::endl; - return; - } - dout.get_not_admitted_list()->push_back(ActionResponse(id, cause, sub_cause)); - } - break; - } - - } - - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - -void subscription_response::set_fields_unsuccess( subscription_response_helper &helper){ - - int ie_index; - E2N_RICsubscriptionFailure_t * ric_subscription_failure = &(unsuccessMsg->value.choice.RICsubscriptionFailure); - // reset list count - ric_subscription_failure->protocolIEs.list.count = 0; - - ie_index = 0; - E2N_RICsubscriptionFailure_IEs_t *ies_ricreq = &IE_Failure_array[ie_index]; - ies_ricreq->criticality = E2N_Criticality_reject; - ies_ricreq->id = E2N_ProtocolIE_ID_id_RICrequestID; - ies_ricreq->value.present = E2N_RICsubscriptionFailure_IEs__value_PR_RICrequestID; - E2N_RICrequestID_t *ricrequest_ie = &ies_ricreq->value.choice.RICrequestID; - ricrequest_ie->ricRequestorID = helper.get_request_id(); - ricrequest_ie->ricRequestSequenceNumber = helper.get_req_seq(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, &(IE_Failure_array[ie_index])); - - ie_index = 1; - E2N_RICsubscriptionFailure_IEs_t *ies_ranfunc = &IE_Failure_array[ie_index]; - ies_ranfunc->criticality = E2N_Criticality_reject; - ies_ranfunc->id = E2N_ProtocolIE_ID_id_RANfunctionID; - ies_ranfunc->value.present = E2N_RICsubscriptionFailure_IEs__value_PR_RANfunctionID; - E2N_RANfunctionID_t *ranfunction_ie = &ies_ranfunc->value.choice.RANfunctionID; - *ranfunction_ie = helper.get_function_id(); - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, &(IE_Failure_array[ie_index])); - - ie_index = 2; - E2N_RICsubscriptionFailure_IEs_t *ies_notadmitted_actid = &IE_Failure_array[ie_index]; - ies_notadmitted_actid->criticality = E2N_Criticality_reject; - ies_notadmitted_actid->id = E2N_ProtocolIE_ID_id_RICactions_NotAdmitted; - E2N_RICaction_NotAdmitted_List_t *ric_not_admitted_actions_ie = &ies_notadmitted_actid->value.choice.RICaction_NotAdmitted_List; - ric_not_admitted_actions_ie->list.count = 0; - std::vector * ref_notadmitted_action_array = helper.get_not_admitted_list(); - if(ref_notadmitted_action_array->size() == 0){ - ies_notadmitted_actid->value.present = E2N_RICsubscriptionFailure_IEs__value_PR_NOTHING; - } - else{ - ies_notadmitted_actid->value.present = E2N_RICsubscriptionFailure_IEs__value_PR_RICaction_NotAdmitted_List; - - // resize memory ? - if (ref_notadmitted_action_array->size() >= ie_not_admitted_list_size){ - ie_not_admitted_list_size = 2 * ref_notadmitted_action_array->size(); - free(ie_not_admitted_list); - ie_not_admitted_list = (E2N_RICaction_NotAdmitted_ItemIEs_t *)calloc(ie_not_admitted_list_size, sizeof(E2N_RICaction_NotAdmitted_ItemIEs_t)); - assert(ie_not_admitted_list != 0); - }; - - - // reset the list count on ricAction_ToBeSetup_List; - for(unsigned int i = 0; i < ref_notadmitted_action_array->size(); i ++){ - ie_not_admitted_list[i].criticality = E2N_Criticality_ignore; - ie_not_admitted_list[i].id = E2N_ProtocolIE_ID_id_RICaction_NotAdmitted_Item ; - ie_not_admitted_list[i].value.present = E2N_RICaction_NotAdmitted_ItemIEs__value_PR_RICaction_NotAdmitted_Item;; - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricActionID = (*ref_notadmitted_action_array)[i].get_id(); - - int cause = (*ref_notadmitted_action_array)[i].get_cause(); - switch(cause){ - case E2N_RICcause_PR_radioNetwork: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.radioNetwork = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_transport: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.transport = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_protocol: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.protocol= (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_misc: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.misc = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - case E2N_RICcause_PR_ric: - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.choice.ric = (*ref_notadmitted_action_array)[i].get_sub_cause(); - break; - default: - mdclog_write(MDCLOG_ERR, "Error :: %s, %d : Unknown RIC cause %d\n", __FILE__, __LINE__, cause); - return ; - } - - ie_not_admitted_list[i].value.choice.RICaction_NotAdmitted_Item.ricCause.present = (E2N_RICcause_PR)cause; - - ASN_SEQUENCE_ADD(ric_not_admitted_actions_ie, &(ie_not_admitted_list[i])); - } - - } - ASN_SEQUENCE_ADD(&ric_subscription_failure->protocolIEs, &(IE_Failure_array[ie_index])); - - - // // criticality diagnostics is not generated/parsed currently since optional - // i = 3; - // E2N_RICsubscriptionFailure_IEs_t *ies_criticality_diagnostics= &IE_Failure_array[i]; - // ies_criticality_diagnostics->criticality = E2N_Criticality_ignore; - // ies_criticality_diagnostics->id = E2N_ProtocolIE_ID_id_CriticalityDiagnostics ; - // ies_criticality_diagnostics->value.present = E2N_RICsubscriptionFailure_IEs__value_PR_NOTHING; - - -} - -void subscription_response:: get_fields(E2N_UnsuccessfulOutcome_t * unsuccess_msg, subscription_response_helper & dout) -{ - - assert(unsuccess_msg != NULL); - - E2N_RICrequestID_t *requestid; - E2N_RANfunctionID_t * ranfunctionid; - E2N_RICaction_NotAdmitted_List_t * ric_not_admitted_action_list; - - for(int edx = 0; edx < unsuccess_msg->value.choice.RICsubscriptionFailure.protocolIEs.list.count; edx++) { - E2N_RICsubscriptionFailure_IEs_t *memb_ptr = unsuccess_msg->value.choice.RICsubscriptionFailure.protocolIEs.list.array[edx]; - - switch(memb_ptr->id) - { - case (E2N_ProtocolIE_ID_id_RICrequestID): - requestid = &memb_ptr->value.choice.RICrequestID; - dout.set_request(requestid->ricRequestorID, requestid->ricRequestSequenceNumber); - break; - - case (E2N_ProtocolIE_ID_id_RANfunctionID): - ranfunctionid = &memb_ptr->value.choice.RANfunctionID; - dout.set_function_id(*ranfunctionid); - break; - - - case (E2N_ProtocolIE_ID_id_RICactions_NotAdmitted): - ric_not_admitted_action_list = &memb_ptr->value.choice.RICaction_NotAdmitted_List; - - for(int index = 0; index < ric_not_admitted_action_list->list.count; index ++){ - E2N_RICaction_NotAdmitted_ItemIEs_t * item = (E2N_RICaction_NotAdmitted_ItemIEs_t *)ric_not_admitted_action_list->list.array[index]; - long int id = item->value.choice.RICaction_NotAdmitted_Item.ricActionID; - int cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.present; - int sub_cause; - switch(cause){ - - case E2N_RICcause_PR_radioNetwork : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.radioNetwork; - break; - - case E2N_RICcause_PR_transport : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.transport; - break; - - case E2N_RICcause_PR_protocol : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.protocol; - break; - - case E2N_RICcause_PR_misc : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.misc; - break; - - case E2N_RICcause_PR_ric : - sub_cause = item->value.choice.RICaction_NotAdmitted_Item.ricCause.choice.ric; - break; - - default: - mdclog_write(MDCLOG_ERR, "Error :: %s, %d : Unknown RIC cause %d\n", __FILE__, __LINE__, cause); - return; - } - dout.get_not_admitted_list()->push_back(ActionResponse(id, cause, sub_cause)); - } - break; - } - - } - - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); -} - - - diff --git a/Bouncer/src/xapp-formats/e2ap/subscription_response.hpp b/Bouncer/src/xapp-formats/e2ap/subscription_response.hpp deleted file mode 100644 index 28fad4e..0000000 --- a/Bouncer/src/xapp-formats/e2ap/subscription_response.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* -================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#pragma once - -#ifndef S_RESPONSE_ -#define S_RESPONSE_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "response_helper.hpp" - -#define NUM_SUBSCRIPTION_RESPONSE_IES 4 -#define NUM_SUBSCRIPTION_FAILURE_IES 3 -#define INITIAL_RESPONSE_LIST_SIZE 4 - -class subscription_response{ -public: - - subscription_response(void); - ~subscription_response(void); - - bool encode_e2ap_subscription_response(unsigned char *, size_t *, subscription_response_helper &, bool); - void get_fields(E2N_SuccessfulOutcome_t *, subscription_response_helper &); - void get_fields(E2N_UnsuccessfulOutcome_t *, subscription_response_helper &); - - std::string get_error(void) const{ - return error_string; - } - -private: - - void set_fields_success( subscription_response_helper &); - void set_fields_unsuccess( subscription_response_helper &); - - E2N_E2AP_PDU_t * e2ap_pdu_obj; - E2N_SuccessfulOutcome_t * successMsg; - E2N_UnsuccessfulOutcome_t * unsuccessMsg; - - - E2N_RICsubscriptionResponse_IEs_t *IE_array; - E2N_RICsubscriptionFailure_IEs_t *IE_Failure_array; - - - E2N_RICaction_Admitted_ItemIEs_t * ie_admitted_list; - E2N_RICaction_NotAdmitted_ItemIEs_t * ie_not_admitted_list; - unsigned int ie_admitted_list_size, ie_not_admitted_list_size; - - char errbuf[128]; - size_t errbuf_len = 128; - std::string error_string; -}; - - - - -#endif diff --git a/Bouncer/src/xapp-formats/e2sm/e2sm.cc b/Bouncer/src/xapp-formats/e2sm/e2sm.cc deleted file mode 100644 index c476c83..0000000 --- a/Bouncer/src/xapp-formats/e2sm/e2sm.cc +++ /dev/null @@ -1,660 +0,0 @@ -/* - ================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, softwares - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ================================================================================== -*/ - -/* Classes to handle E2 service model based on e2sm-gNB-X2-release-1-v040.asn */ - -#include "e2sm.hpp" - - - - //initialize - e2sm_event_trigger::e2sm_event_trigger(void){ - - memset(&gNodeB_ID, 0, sizeof(E2N_GlobalGNB_ID_t)); - - event_trigger = 0; - event_trigger = ( E2N_E2SM_gNB_X2_eventTriggerDefinition_t *)calloc(1, sizeof( E2N_E2SM_gNB_X2_eventTriggerDefinition_t)); - assert(event_trigger != 0); - - // allocate space for gNodeB id (used for encoding) - gNodeB_ID.gNB_ID.choice.gNB_ID.buf = 0; - gNodeB_ID.gNB_ID.choice.gNB_ID.buf = (uint8_t *)calloc(4, sizeof(uint8_t)); - assert(gNodeB_ID.gNB_ID.choice.gNB_ID.buf != 0); - - // allocate space for plmn identity (used for encoding) - gNodeB_ID.pLMN_Identity.buf = 0; - gNodeB_ID.pLMN_Identity.buf = (uint8_t *) calloc(4, sizeof(uint8_t)); - assert(gNodeB_ID.pLMN_Identity.buf != 0); - - ie_list = 0; - ie_list = ( struct E2N_InterfaceProtocolIE_Item *) calloc(INITIAL_LIST_SIZE, sizeof( struct E2N_InterfaceProtocolIE_Item)); - assert(ie_list != 0); - ie_list_size = INITIAL_LIST_SIZE; - - condition_list = 0; - condition_list = (E2N_E2SM_gNB_X2_eventTriggerDefinition::E2N_E2SM_gNB_X2_eventTriggerDefinition__interfaceProtocolIE_List *) calloc(1, sizeof(E2N_E2SM_gNB_X2_eventTriggerDefinition::E2N_E2SM_gNB_X2_eventTriggerDefinition__interfaceProtocolIE_List )); - assert(condition_list != 0); - - - - }; - -e2sm_event_trigger::~e2sm_event_trigger(void){ - - mdclog_write(MDCLOG_DEBUG, "Freeing event trigger object memory"); - for(int i = 0; i < condition_list->list.size; i++){ - condition_list->list.array[i] = 0; - } - - if (condition_list->list.size > 0){ - free(condition_list->list.array); - condition_list->list.array = 0; - condition_list->list.size = 0; - condition_list->list.count = 0; - } - - free(condition_list); - condition_list = 0; - - free(gNodeB_ID.gNB_ID.choice.gNB_ID.buf); - gNodeB_ID.gNB_ID.choice.gNB_ID.buf = 0; - - free(gNodeB_ID.pLMN_Identity.buf); - gNodeB_ID.pLMN_Identity.buf = 0; - - free(ie_list); - ie_list = 0; - - event_trigger->interface_ID.choice.global_gNB_ID = 0; - event_trigger->interfaceProtocolIE_List = 0; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2SM_gNB_X2_eventTriggerDefinition, event_trigger); - mdclog_write(MDCLOG_DEBUG, "Freed event trigger object memory"); - - -}; - -bool e2sm_event_trigger::encode_event_trigger(unsigned char *buf, size_t *size, e2sm_event_trigger_helper &helper){ - - bool res; - res = set_fields(event_trigger, helper); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2SM_gNB_X2_eventTriggerDefinition, event_trigger, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - return false; - } - - //xer_fprint(stdout, &asn_DEF_E2N_E2SM_gNB_X2_eventTriggerDefinition, event_trigger); - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2SM_gNB_X2_eventTriggerDefinition, event_trigger, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding event trigger definition. Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - - -bool e2sm_event_trigger::set_fields(E2N_E2SM_gNB_X2_eventTriggerDefinition_t * ref_event_trigger, e2sm_event_trigger_helper & helper){ - if(ref_event_trigger == 0){ - error_string = "Invalid reference for Event Trigger Definition set fields"; - return false; - } - - // set the message type - ref_event_trigger->interfaceMessageType.procedureCode = helper.procedure_code; - ref_event_trigger->interfaceMessageType.typeOfMessage = helper.message_type; - - ref_event_trigger->interfaceDirection = helper.interface_direction; - ref_event_trigger->interface_ID.present = E2N_Interface_ID_PR_global_gNB_ID; - - ref_event_trigger->interface_ID.choice.global_gNB_ID = &gNodeB_ID; - - // to do : need to put correct code here for upding plmn id and gNodeB - // for now just place holders : - //================================================================ - memcpy(gNodeB_ID.pLMN_Identity.buf, helper.plmn_id.c_str(), 3); - gNodeB_ID.pLMN_Identity.size = 3; - - memcpy(gNodeB_ID.gNB_ID.choice.gNB_ID.buf, helper.egNB_id.c_str(), 3); - gNodeB_ID.gNB_ID.choice.gNB_ID.size = 3; - - // we only do global gNodeB id for now, not eNodeB - gNodeB_ID.gNB_ID.present = E2N_GNB_ID_PR_gNB_ID; - //================================================================ - - - // Add in any requested IE items - std::vector * ref_ie_array = helper.get_list(); - - if (ref_ie_array->size() == 0){ - ref_event_trigger->interfaceProtocolIE_List = 0; - - } - else{ - ref_event_trigger->interfaceProtocolIE_List = condition_list; - - //resize memory ? - if(ref_ie_array->size() > ie_list_size){ - ie_list_size = 2 * ref_ie_array->size(); - free(ie_list); - ie_list = (struct E2N_InterfaceProtocolIE_Item *)calloc(ie_list_size, sizeof(struct E2N_InterfaceProtocolIE_Item)); - assert(ie_list != 0); - } - - // reset the count so that adds start from the beginning - ref_event_trigger->interfaceProtocolIE_List->list.count = 0; - - for(unsigned int i = 0; i < ref_ie_array->size(); i++){ - - ie_list[i].interfaceProtocolIE_ID = (*ref_ie_array)[i].interface_id; - ie_list[i].interfaceProtocolIE_Test = (*ref_ie_array)[i].test; - - //switch(ie_list[i].interfaceProtocolIE_Value.present){ - switch((*ref_ie_array)[i].val_type){ - - case (E2N_InterfaceProtocolIE_Value_PR_valueInt): - ie_list[i].interfaceProtocolIE_Value.present = E2N_InterfaceProtocolIE_Value_PR_valueInt; - ie_list[i].interfaceProtocolIE_Value.choice.valueInt = (*ref_ie_array)[i].value_n; - break; - - case (E2N_InterfaceProtocolIE_Value_PR_valueEnum): - ie_list[i].interfaceProtocolIE_Value.present = E2N_InterfaceProtocolIE_Value_PR_valueEnum; - ie_list[i].interfaceProtocolIE_Value.choice.valueEnum = (*ref_ie_array)[i].value_n; - break; - - case (E2N_InterfaceProtocolIE_Value_PR_valueBool): - ie_list[i].interfaceProtocolIE_Value.present = E2N_InterfaceProtocolIE_Value_PR_valueBool; - ie_list[i].interfaceProtocolIE_Value.choice.valueBool = (*ref_ie_array)[i].value_n; - break; - - case (E2N_InterfaceProtocolIE_Value_PR_valueBitS): - ie_list[i].interfaceProtocolIE_Value.present = E2N_InterfaceProtocolIE_Value_PR_valueBitS; - ie_list[i].interfaceProtocolIE_Value.choice.valueBitS.buf = (uint8_t *)(*ref_ie_array)[i].value_s.c_str(); - ie_list[i].interfaceProtocolIE_Value.choice.valueBitS.size = (*ref_ie_array)[i].value_s.length(); - break; - - case (E2N_InterfaceProtocolIE_Value_PR_valueOctS): - ie_list[i].interfaceProtocolIE_Value.present = E2N_InterfaceProtocolIE_Value_PR_valueOctS; - ie_list[i].interfaceProtocolIE_Value.choice.valueOctS.buf = (uint8_t *)(*ref_ie_array)[i].value_s.c_str(); - ie_list[i].interfaceProtocolIE_Value.choice.valueOctS.size = (*ref_ie_array)[i].value_s.length(); - break; - - default: - { - std::stringstream ss; - ss <<"Error ! " << __FILE__ << "," << __LINE__ << " illegal enum " << (*ref_ie_array)[i].val_type << " for interface Protocol IE value" << std::endl; - std::string error_string = ss.str(); - return false; - } - } - - ASN_SEQUENCE_ADD(ref_event_trigger->interfaceProtocolIE_List, &ie_list[i]); - } - } - - return true; -}; - - -bool e2sm_event_trigger::get_fields(E2N_E2SM_gNB_X2_eventTriggerDefinition_t * ref_event_trigger, e2sm_event_trigger_helper & helper){ - - if (ref_event_trigger == 0){ - error_string = "Invalid reference for Event Trigger definition get fields"; - return false; - } - - helper.procedure_code = ref_event_trigger->interfaceMessageType.procedureCode; - helper.message_type = ref_event_trigger->interfaceMessageType.typeOfMessage; - helper.interface_direction = ref_event_trigger->interfaceDirection; - - helper.plmn_id.assign((const char *)ref_event_trigger->interface_ID.choice.global_gNB_ID->pLMN_Identity.buf, ref_event_trigger->interface_ID.choice.global_gNB_ID->pLMN_Identity.size); - helper.egNB_id.assign((const char *)ref_event_trigger->interface_ID.choice.global_gNB_ID->gNB_ID.choice.gNB_ID.buf, ref_event_trigger->interface_ID.choice.global_gNB_ID->gNB_ID.choice.gNB_ID.size); - for(int i = 0; i < ref_event_trigger->interfaceProtocolIE_List->list.count; i++){ - struct E2N_InterfaceProtocolIE_Item * ie_item = ref_event_trigger->interfaceProtocolIE_List->list.array[i]; - switch(ie_item->interfaceProtocolIE_Value.present){ - case (E2N_InterfaceProtocolIE_Value_PR_valueInt): - helper.add_protocol_ie_item(ie_item->interfaceProtocolIE_ID, ie_item->interfaceProtocolIE_Test, ie_item->interfaceProtocolIE_Value.present, ie_item->interfaceProtocolIE_Value.choice.valueInt); - break; - case (E2N_InterfaceProtocolIE_Value_PR_valueEnum): - helper.add_protocol_ie_item(ie_item->interfaceProtocolIE_ID, ie_item->interfaceProtocolIE_Test, ie_item->interfaceProtocolIE_Value.present, ie_item->interfaceProtocolIE_Value.choice.valueEnum); - break; - case (E2N_InterfaceProtocolIE_Value_PR_valueBool): - helper.add_protocol_ie_item(ie_item->interfaceProtocolIE_ID, ie_item->interfaceProtocolIE_Test, ie_item->interfaceProtocolIE_Value.present, ie_item->interfaceProtocolIE_Value.choice.valueBool); - break; - case (E2N_InterfaceProtocolIE_Value_PR_valueBitS): - helper.add_protocol_ie_item(ie_item->interfaceProtocolIE_ID, ie_item->interfaceProtocolIE_Test, ie_item->interfaceProtocolIE_Value.present, std::string((const char *)ie_item->interfaceProtocolIE_Value.choice.valueBitS.buf,ie_item->interfaceProtocolIE_Value.choice.valueBitS.size) ); - break; - case (E2N_InterfaceProtocolIE_Value_PR_valueOctS): - helper.add_protocol_ie_item(ie_item->interfaceProtocolIE_ID, ie_item->interfaceProtocolIE_Test, ie_item->interfaceProtocolIE_Value.present, std::string((const char *)ie_item->interfaceProtocolIE_Value.choice.valueOctS.buf,ie_item->interfaceProtocolIE_Value.choice.valueOctS.size) ); - break; - default: - mdclog_write(MDCLOG_ERR, "Error : %s, %d: Unkown interface protocol IE type %d in event trigger definition\n", __FILE__, __LINE__, ie_item->interfaceProtocolIE_Value.present); - return false; - } - } - - return true; -}; - - - - -// initialize -e2sm_indication::e2sm_indication(void) { - - memset(&gNodeB_ID, 0, sizeof(E2N_GlobalGNB_ID_t)); - - // allocate space for gNodeB id (used for encoding) - gNodeB_ID.gNB_ID.choice.gNB_ID.buf = (uint8_t *)calloc(4, sizeof(uint8_t)); - assert(gNodeB_ID.gNB_ID.choice.gNB_ID.buf != 0); - - // allocate space for plmn identity (used for encoding) - gNodeB_ID.pLMN_Identity.buf = (uint8_t *) calloc(4, sizeof(uint8_t)); - assert(gNodeB_ID.pLMN_Identity.buf != 0); - - header = 0; - header = (E2N_E2SM_gNB_X2_indicationHeader_t *)calloc(1, sizeof(E2N_E2SM_gNB_X2_indicationHeader_t)); - assert(header != 0); - - message = 0; - message = (E2N_E2SM_gNB_X2_indicationMessage_t *)calloc(1, sizeof(E2N_E2SM_gNB_X2_indicationMessage_t)); - assert(message != 0); -} - -e2sm_indication::~e2sm_indication(void){ - mdclog_write(MDCLOG_DEBUG, "Freeing E2N_E2SM Indication object memory"); - - free(gNodeB_ID.gNB_ID.choice.gNB_ID.buf); - free(gNodeB_ID.pLMN_Identity.buf); - - header->interface_ID.choice.global_gNB_ID = 0; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2SM_gNB_X2_indicationHeader, header); - - message->interfaceMessage.buf = 0; - message->interfaceMessage.size = 0; - - ASN_STRUCT_FREE(asn_DEF_E2N_E2SM_gNB_X2_indicationMessage, message); - mdclog_write(MDCLOG_DEBUG, "Freed E2SM Indication object memory"); - -} - - - -bool e2sm_indication::encode_indication_header(unsigned char *buf, size_t *size, e2sm_header_helper &helper){ - - bool res; - res = set_header_fields(header, helper); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2SM_gNB_X2_indicationHeader, header, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - error_string = "E2SM Indication Header Constraint failed : " + error_string; - - return false; - } - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2SM_gNB_X2_indicationHeader, header, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding E2N_E2SM Indication Header. Reason = " + error_string; - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding E2SM Indication Header . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - - -bool e2sm_indication::encode_indication_message(unsigned char *buf, size_t *size, e2sm_message_helper &helper){ - - set_message_fields(message, helper); - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2SM_gNB_X2_indicationMessage, message, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - error_string = "E2SM Indication Message Constraint failed : " + error_string; - return false; - } - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2SM_gNB_X2_indicationMessage, message, buf, *size); - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding E2SM Indication Header. Reason = " + error_string; - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding E2N_E2SM Indication Message . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - - - -// Used when generating an indication header -bool e2sm_indication::set_header_fields(E2N_E2SM_gNB_X2_indicationHeader_t *header, e2sm_header_helper &helper){ - - if (header == 0){ - error_string = "Invalid reference for E2SM Indication Header set fields"; - return false; - } - - - header->interfaceDirection = helper.interface_direction; - header->interface_ID.present = E2N_Interface_ID_PR_global_gNB_ID; - header->interface_ID.choice.global_gNB_ID = &gNodeB_ID; - - - // to do : need to put correct code here for upding plmn id and gNodeB - // for now just place holders : - memcpy(gNodeB_ID.pLMN_Identity.buf, helper.plmn_id.c_str(), 3); - gNodeB_ID.pLMN_Identity.size = 3; - - memcpy(gNodeB_ID.gNB_ID.choice.gNB_ID.buf, helper.egNB_id.c_str(), 3); - gNodeB_ID.gNB_ID.choice.gNB_ID.size = 3; - - // we only do global gNodeB id for now, not eNodeB - gNodeB_ID.gNB_ID.present = E2N_GNB_ID_PR_gNB_ID; - - return true; - -}; - - -// used when decoding an indication header -bool e2sm_indication::get_header_fields(E2N_E2SM_gNB_X2_indicationHeader_t *header, e2sm_header_helper &helper){ - - if (header == 0){ - error_string = "Invalid reference for E2SM Indication header get fields"; - return false; - } - - helper.interface_direction = header->interfaceDirection; - helper.plmn_id.assign((const char *)header->interface_ID.choice.global_gNB_ID->pLMN_Identity.buf, header->interface_ID.choice.global_gNB_ID->pLMN_Identity.size); - helper.egNB_id.assign((const char *)header->interface_ID.choice.global_gNB_ID->gNB_ID.choice.gNB_ID.buf, header->interface_ID.choice.global_gNB_ID->gNB_ID.choice.gNB_ID.size); - - // to do : add code to decipher plmn and global gnodeb from ints (since that is likely the convention for packing) - - return true; -} - - - -// Used when generating an indication message -bool e2sm_indication::set_message_fields(E2N_E2SM_gNB_X2_indicationMessage_t *interface_message, e2sm_message_helper &helper){ - - if(interface_message == 0){ - error_string = "Invalid reference for E2SM Indication Message set fields"; - return false; - } - - // interface-message is an octet string. just point it to the buffer - interface_message->interfaceMessage.buf = &(helper.x2ap_pdu[0]); - interface_message->interfaceMessage.size = helper.x2ap_pdu_size; - - return true; - -}; - -// used when decoding an indication message -bool e2sm_indication::get_message_fields( E2N_E2SM_gNB_X2_indicationMessage_t *interface_message, e2sm_message_helper &helper){ - - - if(interface_message == 0){ - error_string = "Invalid reference for E2SM Indication Message get fields"; - return false; - } - - // interface message is an octet string - helper.x2ap_pdu = interface_message->interfaceMessage.buf;; - helper.x2ap_pdu_size = interface_message->interfaceMessage.size; - - return true; - -} - - - -// initialize -e2sm_control::e2sm_control(void) { - - memset(&gNodeB_ID, 0, sizeof(E2N_GlobalGNB_ID_t)); - - // allocate space for gNodeB id (used for encoding) - gNodeB_ID.gNB_ID.choice.gNB_ID.buf = (uint8_t *)calloc(4, sizeof(uint8_t)); - assert(gNodeB_ID.gNB_ID.choice.gNB_ID.buf != 0); - - // allocate space for plmn identity (used for encoding) - gNodeB_ID.pLMN_Identity.buf = (uint8_t *) calloc(4, sizeof(uint8_t)); - assert(gNodeB_ID.pLMN_Identity.buf != 0); - - header = 0; - header = (E2N_E2SM_gNB_X2_controlHeader_t *)calloc(1, sizeof(E2N_E2SM_gNB_X2_controlHeader_t)); - assert(header != 0); - - message = 0; - message = (E2N_E2SM_gNB_X2_controlMessage_t *)calloc(1, sizeof(E2N_E2SM_gNB_X2_controlMessage_t)); - assert(message != 0); -} - -e2sm_control::~e2sm_control(void){ - mdclog_write(MDCLOG_DEBUG, "Freeing E2SM Control object memory"); - - free(gNodeB_ID.gNB_ID.choice.gNB_ID.buf); - free(gNodeB_ID.pLMN_Identity.buf); - header->interface_ID.choice.global_gNB_ID = 0; - ASN_STRUCT_FREE(asn_DEF_E2N_E2SM_gNB_X2_controlHeader, header); - - message->interfaceMessage.buf = 0; - ASN_STRUCT_FREE(asn_DEF_E2N_E2SM_gNB_X2_controlMessage, message); - - mdclog_write(MDCLOG_DEBUG, "Freed E2SM Control object memory"); - -} - - - -bool e2sm_control::encode_control_header(unsigned char *buf, size_t *size, e2sm_header_helper &helper){ - - bool res; - res = set_header_fields(header, helper); - if (!res){ - return false; - } - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2SM_gNB_X2_controlHeader, header, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - error_string = "E2SM Control Header Constraint failed : " + error_string; - - return false; - } - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2SM_gNB_X2_controlHeader, header, buf, *size); - - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding E2SM Control Header. Reason = " + error_string; - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding E2N_E2SM Control Header . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - - -bool e2sm_control::encode_control_message(unsigned char *buf, size_t *size, e2sm_message_helper &helper){ - - set_message_fields(message, helper); - - int ret_constr = asn_check_constraints(&asn_DEF_E2N_E2SM_gNB_X2_controlMessage, message, errbuf, &errbuf_len); - if(ret_constr){ - error_string.assign(&errbuf[0], errbuf_len); - error_string = "E2SM Control Message Constraint failed : " + error_string; - return false; - } - - asn_enc_rval_t retval = asn_encode_to_buffer(0, ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2SM_gNB_X2_controlMessage, message, buf, *size); - if(retval.encoded == -1){ - error_string.assign(strerror(errno)); - error_string = "Error encoding E2SM Control Message. Reason = " + error_string; - return false; - } - else if (retval.encoded > *size){ - std::stringstream ss; - ss <<"Error encoding E2SM Control Message . Reason = encoded pdu size " << retval.encoded << " exceeds buffer size " << *size << std::endl; - error_string = ss.str(); - - return false; - } - else{ - *size = retval.encoded; - } - - return true; -} - - - -// Used when generating an indication header -bool e2sm_control::set_header_fields(E2N_E2SM_gNB_X2_controlHeader_t *header, e2sm_header_helper &helper){ - - if (header == 0){ - error_string = "Invalid reference for E2SM Control Header set fields"; - return false; - } - - - header->interfaceDirection = helper.interface_direction; - header->interface_ID.present = E2N_Interface_ID_PR_global_gNB_ID; - header->interface_ID.choice.global_gNB_ID = &gNodeB_ID; - - - // to do : need to put correct code here for upding plmn id and gNodeB - // for now just place holders : - memcpy(gNodeB_ID.pLMN_Identity.buf, helper.plmn_id.c_str(), 3); - gNodeB_ID.pLMN_Identity.size = 3; - - memcpy(gNodeB_ID.gNB_ID.choice.gNB_ID.buf, helper.egNB_id.c_str(), 3); - gNodeB_ID.gNB_ID.choice.gNB_ID.size = 3; - - // we only do global gNodeB id for now, not eNodeB - gNodeB_ID.gNB_ID.present = E2N_GNB_ID_PR_gNB_ID; - - return true; - -}; - - -// used when decoding an indication header -bool e2sm_control::get_header_fields(E2N_E2SM_gNB_X2_controlHeader_t *header, e2sm_header_helper &helper){ - - if (header == 0){ - error_string = "Invalid reference for E2SM Control header get fields"; - return false; - } - - helper.interface_direction = header->interfaceDirection; - helper.plmn_id.assign((const char *)header->interface_ID.choice.global_gNB_ID->pLMN_Identity.buf, header->interface_ID.choice.global_gNB_ID->pLMN_Identity.size); - helper.egNB_id.assign((const char *)header->interface_ID.choice.global_gNB_ID->gNB_ID.choice.gNB_ID.buf, header->interface_ID.choice.global_gNB_ID->gNB_ID.choice.gNB_ID.size); - - // to do : add code to decipher plmn and global gnodeb from ints (since that is likely the convention for packing) - - return true; -} - - - -// Used when generating an indication message -bool e2sm_control::set_message_fields(E2N_E2SM_gNB_X2_controlMessage_t *interface_message, e2sm_message_helper &helper){ - - if(interface_message == 0){ - error_string = "Invalid reference for E2SM Control Message set fields"; - return false; - } - - // interface-message is an octet string. just point it to the buffer - interface_message->interfaceMessage.buf = &(helper.x2ap_pdu[0]); - interface_message->interfaceMessage.size = helper.x2ap_pdu_size; - - return true; - -}; - -// used when decoding an indication message -bool e2sm_control::get_message_fields( E2N_E2SM_gNB_X2_controlMessage_t *interface_message, e2sm_message_helper &helper){ - - - if(interface_message == 0){ - error_string = "Invalid reference for E2SM Control Message get fields"; - return false; - } - - // interface message is an octet string - helper.x2ap_pdu = interface_message->interfaceMessage.buf;; - helper.x2ap_pdu_size = interface_message->interfaceMessage.size; - - return true; - -} - diff --git a/Bouncer/src/xapp-formats/e2sm/e2sm.hpp b/Bouncer/src/xapp-formats/e2sm/e2sm.hpp deleted file mode 100644 index a16d95c..0000000 --- a/Bouncer/src/xapp-formats/e2sm/e2sm.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -/* Classes to handle E2 service model based on e2sm-gNB-X2-release-1-v040.asn */ - -#ifndef E2SM_ -#define E2SM_ - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include "../../xapp-formats/e2sm/e2sm_helpers.hpp" - -#define INITIAL_LIST_SIZE 4 - - - - -/* builder class for E2SM event trigger definition */ - -class e2sm_event_trigger { -public: - e2sm_event_trigger(void); - ~e2sm_event_trigger(void); - - bool set_fields(E2N_E2SM_gNB_X2_eventTriggerDefinition_t *, e2sm_event_trigger_helper &); - bool get_fields(E2N_E2SM_gNB_X2_eventTriggerDefinition_t *, e2sm_event_trigger_helper &); - bool encode_event_trigger(unsigned char *, size_t *, e2sm_event_trigger_helper &); - - std::string get_error (void) const {return error_string ;}; - -private: - - E2N_E2SM_gNB_X2_eventTriggerDefinition_t * event_trigger; // used for encoding - E2N_GlobalGNB_ID_t gNodeB_ID; - struct E2N_InterfaceProtocolIE_Item * ie_list; - unsigned int ie_list_size; - - //std::vector ie_list; - E2N_E2SM_gNB_X2_eventTriggerDefinition::E2N_E2SM_gNB_X2_eventTriggerDefinition__interfaceProtocolIE_List *condition_list; - - char errbuf[128]; - size_t errbuf_len; - std::string error_string; -}; - - -/* builder class for E2SM indication using ASN1c */ - -class e2sm_indication { -public: - - e2sm_indication(void); - ~e2sm_indication(void); - - E2N_E2SM_gNB_X2_indicationHeader_t * get_header(void); - E2N_E2SM_gNB_X2_indicationMessage_t * get_message(void); - - bool set_header_fields(E2N_E2SM_gNB_X2_indicationHeader_t *, e2sm_header_helper &); - bool get_header_fields(E2N_E2SM_gNB_X2_indicationHeader_t *, e2sm_header_helper &); - - bool set_message_fields(E2N_E2SM_gNB_X2_indicationMessage_t *, e2sm_message_helper &); - bool get_message_fields(E2N_E2SM_gNB_X2_indicationMessage_t *, e2sm_message_helper &); - - bool encode_indication_header(unsigned char * , size_t * , e2sm_header_helper &); - bool encode_indication_message(unsigned char *, size_t *, e2sm_message_helper &); - std::string get_error (void) const {return error_string ; }; - -private: - - E2N_E2SM_gNB_X2_indicationHeader_t *header; // used for encoding - E2N_E2SM_gNB_X2_indicationMessage_t *message; // used for encoding - - char errbuf[128]; - size_t errbuf_len; - E2N_GlobalGNB_ID_t gNodeB_ID; - std::string error_string; - - -}; - -/* builder class for E2SM control using ASN1c */ - -class e2sm_control { -public: - - e2sm_control(void); - ~e2sm_control(void); - - E2N_E2SM_gNB_X2_controlHeader_t * get_header(void); - E2N_E2SM_gNB_X2_controlMessage_t * get_message(void); - - bool set_header_fields(E2N_E2SM_gNB_X2_controlHeader_t *, e2sm_header_helper &); - bool get_header_fields(E2N_E2SM_gNB_X2_controlHeader_t *, e2sm_header_helper &); - - bool set_message_fields(E2N_E2SM_gNB_X2_controlMessage_t *, e2sm_message_helper &); - bool get_message_fields(E2N_E2SM_gNB_X2_controlMessage_t *, e2sm_message_helper &); - - bool encode_control_header(unsigned char * , size_t * , e2sm_header_helper &); - bool encode_control_message(unsigned char *, size_t *, e2sm_message_helper &); - std::string get_error (void) const {return error_string ; }; - -private: - - E2N_E2SM_gNB_X2_controlHeader_t *header; // used for encoding - E2N_E2SM_gNB_X2_controlMessage_t *message; // used for encoding - - char errbuf[128]; - size_t errbuf_len; - E2N_GlobalGNB_ID_t gNodeB_ID; - std::string error_string; - - -}; - -#endif diff --git a/Bouncer/src/xapp-formats/e2sm/e2sm_helpers.hpp b/Bouncer/src/xapp-formats/e2sm/e2sm_helpers.hpp deleted file mode 100644 index 95ab8ca..0000000 --- a/Bouncer/src/xapp-formats/e2sm/e2sm_helpers.hpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - ================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, softwares - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ================================================================================== -*/ - -/* Classes to handle E2 service model based on e2sm-gNB-X2-release-1-v040.asn */ - -#ifndef E2SM_HELPER_ -#define E2SM_HELPER_ - -#include -#include -#include -#include - - /* information holder for E2SM indication header */ -typedef struct e2sm_header_helper e2sm_header_helper; -struct e2sm_header_helper { - int egNB_id_type; - - std::string egNB_id; - std::string plmn_id; - - long int interface_direction; - unsigned char* timestamp; -}; - -/* information holder for E2SM indication message */ -typedef struct e2sm_message_helper e2sm_message_helper; -struct e2sm_message_helper { - unsigned char * x2ap_pdu; - size_t x2ap_pdu_size; -}; - - -/* information holder for E2SM Action Trigger Definition */ -struct Item -{ - Item(long int id, long int test, long int val_type, int value):interface_id(id), test(test), val_type(val_type), value_n(value){}; - Item(long int id, long int test, long int val_type, std::string value):interface_id(id), test(test), val_type(val_type), value_s(value){}; - - long int interface_id; - long int test; - long int val_type; - long int value_n; - std::string value_s; - -}; - -typedef struct e2sm_event_trigger_helper e2sm_event_trigger_helper; -struct e2sm_event_trigger_helper { - - int egNB_id_type; - std::string egNB_id; - std::string plmn_id; - - long int interface_direction; - long int procedure_code; - - long int message_type; - - - std::vector * get_list(void){ return &protocol_ie_list; }; - void add_protocol_ie_item(long int id, long int test , unsigned int val_type, long int value ){ - // into list - protocol_ie_list.emplace_back(id, test, val_type, value); - }; - - void add_protocol_ie_item(long int id, long int test, unsigned int val_type, std::string value){ - // into list - protocol_ie_list.emplace_back(id, test, val_type, value); - }; - - void clear(void){ - protocol_ie_list.clear(); - } - - std::string get_string(void) const { - std::stringstream ss; - ss << "egNB_ID_type = " << egNB_id_type << std::endl; - ss << "PLMN Id = " << plmn_id << std::endl; - ss << "Procedure Code = " << procedure_code << std::endl; - ss << "Message Type = " << message_type << std::endl; - - std::string info; - info = ss.str(); - return info; - } - - - -private: - - std::vector protocol_ie_list; - -}; - - - - -#endif diff --git a/Bouncer/src/xapp-mgmt/a1_helper.hpp b/Bouncer/src/xapp-mgmt/a1_helper.hpp deleted file mode 100644 index 6637209..0000000 --- a/Bouncer/src/xapp-mgmt/a1_helper.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * a1_policy.hpp - * - * Created on: Mar, 2020 - * Author: Shraboni Jana - */ - -#ifndef SRC_XAPP_MGMT_A1MSG_A1_POLICY_HELPER_HPP_ -#define SRC_XAPP_MGMT_A1MSG_A1_POLICY_HELPER_HPP_ - -#include -#include -#include -#include - -using namespace rapidjson; - -//typedef struct a1_policy_helper a1_policy_helper; - -/*struct a1_policy_helper{ - - std::string operation; - std::string policy_type_id; - std::string policy_instance_id; - std::string handler_id; - std::string status; - -};*/ - - -#endif /* SRC_XAPP_FORMATS_A1MSG_A1_POLICY_HELPER_HPP_ */ diff --git a/Bouncer/src/xapp-mgmt/format_helper.hpp b/Bouncer/src/xapp-mgmt/format_helper.hpp deleted file mode 100644 index 0c1bfbb..0000000 --- a/Bouncer/src/xapp-mgmt/format_helper.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2018-2019 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * a1_policy.hpp - * - * Created on: Mar, 2020 - * Author: Shraboni Jana - */ - -#ifndef SRC_XAPP_MGMT_A1MSG_A1_POLICY_HELPER_HPP_ -#define SRC_XAPP_MGMT_A1MSG_A1_POLICY_HELPER_HPP_ - -#include -#include -#include -#include - -using namespace rapidjson; - -//typedef struct a1_policy_helper a1_policy_helper; - -/*struct a1_policy_helper{ - - std::string operation; - std::string policy_type_id; - std::string policy_instance_id; - std::string handler_id; - std::string status; - -};*/ - -#endif /* SRC_XAPP_FORMATS_A1MSG_A1_POLICY_HELPER_HPP_ */ diff --git a/Bouncer/src/xapp-mgmt/msgs_proc.cc b/Bouncer/src/xapp-mgmt/msgs_proc.cc deleted file mode 100644 index 49b413a..0000000 --- a/Bouncer/src/xapp-mgmt/msgs_proc.cc +++ /dev/null @@ -1,293 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - -#include "msgs_proc.hpp" - - -bool XappMsgHandler::encode_subscription_delete_request(unsigned char* buffer, size_t *buf_len){ - - subscription_helper sub_helper; - sub_helper.set_request(0); // requirement of subscription manager ... ? - sub_helper.set_function_id(0); - - subscription_delete e2ap_sub_req_del; - - // generate the delete request pdu - - bool res = e2ap_sub_req_del.encode_e2ap_subscription(&buffer[0], buf_len, sub_helper); - if(! res){ - mdclog_write(MDCLOG_ERR, "%s, %d: Error encoding subscription delete request pdu. Reason = %s", __FILE__, __LINE__, e2ap_sub_req_del.get_error().c_str()); - return false; - } - - return true; - -} - -bool XappMsgHandler::decode_subscription_response(unsigned char* data_buf, size_t data_size){ - - subscription_helper subhelper; - subscription_response subresponse; - bool res = true; - E2AP_PDU_t *e2pdu = 0; - - asn_dec_rval_t rval; - - ASN_STRUCT_RESET(asn_DEF_E2AP_PDU, e2pdu); - - rval = asn_decode(0,ATS_ALIGNED_BASIC_PER, &asn_DEF_E2AP_PDU, (void**)&e2pdu, data_buf, data_size); - switch(rval.code) - { - case RC_OK: - //Put in Subscription Response Object. - //asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); - break; - case RC_WMORE: - mdclog_write(MDCLOG_ERR, "RC_WMORE"); - res = false; - break; - case RC_FAIL: - mdclog_write(MDCLOG_ERR, "RC_FAIL"); - res = false; - break; - default: - break; - } - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2pdu); - return res; - -} - -/*bool XappMsgHandler::a1_policy_handler(char * message, int *message_len, a1_policy_helper &helper){ - - rapidjson::Document doc; - if (doc.Parse(message).HasParseError()){ - mdclog_write(MDCLOG_ERR, "Error: %s, %d :: Could not decode A1 JSON message %s\n", __FILE__, __LINE__, message); - return false; - } - - //Extract Operation - rapidjson::Pointer temp1("/operation"); - rapidjson::Value * ref1 = temp1.Get(doc); - if (ref1 == NULL){ - mdclog_write(MDCLOG_ERR, "Error : %s, %d:: Could not extract policy type id from %s\n", __FILE__, __LINE__, message); - return false; - } - - helper.operation = ref1->GetString(); - - // Extract policy id type - rapidjson::Pointer temp2("/policy_type_id"); - rapidjson::Value * ref2 = temp2.Get(doc); - if (ref2 == NULL){ - mdclog_write(MDCLOG_ERR, "Error : %s, %d:: Could not extract policy type id from %s\n", __FILE__, __LINE__, message); - return false; - } - //helper.policy_type_id = ref2->GetString(); - helper.policy_type_id = to_string(ref2->GetInt()); - - // Extract policy instance id - rapidjson::Pointer temp("/policy_instance_id"); - rapidjson::Value * ref = temp.Get(doc); - if (ref == NULL){ - mdclog_write(MDCLOG_ERR, "Error : %s, %d:: Could not extract policy type id from %s\n", __FILE__, __LINE__, message); - return false; - } - helper.policy_instance_id = ref->GetString(); - - if (helper.policy_type_id == "1" && helper.operation == "CREATE"){ - helper.status = "OK"; - Document::AllocatorType& alloc = doc.GetAllocator(); - - Value handler_id; - handler_id.SetString(helper.handler_id.c_str(), helper.handler_id.length(), alloc); - - Value status; - status.SetString(helper.status.c_str(), helper.status.length(), alloc); - - - doc.AddMember("handler_id", handler_id, alloc); - doc.AddMember("status",status, alloc); - doc.RemoveMember("operation"); - StringBuffer buffer; - Writer writer(buffer); - doc.Accept(writer); - strncpy(message,buffer.GetString(), buffer.GetLength()); - *message_len = buffer.GetLength(); - return true; - } - return false; -}*/ - - -//For processing received messages.XappMsgHandler should mention if resend is required or not. -void XappMsgHandler::operator()(rmr_mbuf_t *message, bool *resend) -{ - - if (message->len > MAX_RMR_RECV_SIZE) - { - mdclog_write(MDCLOG_ERR, "Error : %s, %d, RMR message larger than %d. Ignoring ...", __FILE__, __LINE__, MAX_RMR_RECV_SIZE); - return; - } - //a1_policy_helper helper; - bool res=false; - E2AP_PDU_t* e2pdu = (E2AP_PDU_t*)calloc(1, sizeof(E2AP_PDU)); - int num = 0; - - switch(message->mtype) - { - //need to fix the health check. - case (RIC_HEALTH_CHECK_REQ): - message->mtype = RIC_HEALTH_CHECK_RESP; // if we're here we are running and all is ok - message->sub_id = -1; - strncpy( (char*)message->payload, "Bouncer OK\n", rmr_payload_size( message) ); - *resend = true; - break; - - case (RIC_SUB_RESP): - mdclog_write(MDCLOG_INFO, "Received subscription message of type = %d", message->mtype); - unsigned char *me_id; - if( (me_id = (unsigned char *) malloc( sizeof( unsigned char ) * RMR_MAX_MEID )) == NULL ) - { - mdclog_write(MDCLOG_ERR, "Error : %s, %d : malloc failed for me_id", __FILE__, __LINE__); - me_id = rmr_get_meid(message, NULL); - } - else - { - rmr_get_meid(message, me_id); - } - if(me_id == NULL) - { - mdclog_write(MDCLOG_ERR, " Error :: %s, %d : rmr_get_meid failed me_id is NULL", __FILE__, __LINE__); - break; - } - mdclog_write(MDCLOG_INFO,"RMR Received MEID: %s",me_id); - if(_ref_sub_handler !=NULL) - { - _ref_sub_handler->manage_subscription_response(message->mtype, reinterpret_cast< char const* >(me_id)); - } - else - { - mdclog_write(MDCLOG_ERR, " Error :: %s, %d : Subscription handler not assigned in message processor !", __FILE__, __LINE__); - } - *resend = false; - if (me_id != NULL) - { - mdclog_write(MDCLOG_INFO, "Free RMR Received MEID memory: %s(0x%x)", me_id, me_id); - free(me_id); - } - break; - - case (RIC_SUB_DEL_RESP): - mdclog_write(MDCLOG_INFO, "Received subscription delete message of type = %d", message->mtype); - //unsigned char *me_id; - if( (me_id = (unsigned char *) malloc( sizeof( unsigned char ) * RMR_MAX_MEID )) == NULL ) - { - mdclog_write(MDCLOG_ERR, "Error : %s, %d : malloc failed for me_id", __FILE__, __LINE__); - me_id = rmr_get_meid(message, NULL); - } - else - - { - rmr_get_meid(message, me_id); - } - if(me_id == NULL) - { - mdclog_write(MDCLOG_ERR, " Error :: %s, %d : rmr_get_meid failed me_id is NULL", __FILE__, __LINE__); - break; - } - mdclog_write(MDCLOG_INFO,"RMR Received MEID: %s",me_id); - if(_ref_sub_handler !=NULL) - { - _ref_sub_handler->manage_subscription_response(message->mtype, reinterpret_cast< char const* >(me_id)); - } - else - { - mdclog_write(MDCLOG_ERR, " Error :: %s, %d : Subscription handler not assigned in message processor !", __FILE__, __LINE__); - } - *resend = false; - if (me_id != NULL) - { - mdclog_write(MDCLOG_INFO, "Free RMR Received MEID memory: %s(0x%x)", me_id, me_id); - free(me_id); - } - break; - - case (RIC_INDICATION): - - if(message->mtype == 12050) - { - mdclog_write(MDCLOG_INFO, "Decoding indication for msg = %d", message->mtype); - - ASN_STRUCT_RESET(asn_DEF_E2AP_PDU, e2pdu); - asn_transfer_syntax syntax; - syntax = ATS_ALIGNED_BASIC_PER; - - mdclog_write(MDCLOG_INFO, "Data_size = %d", message->len); - - auto rval = asn_decode(nullptr, syntax, &asn_DEF_E2AP_PDU, (void**)&e2pdu, message->payload, message->len); - - if(rval.code == RC_OK) - { - mdclog_write(MDCLOG_INFO, "rval.code = %d ", rval.code); - } - else - { - mdclog_write(MDCLOG_ERR, " rval.code = %d ", rval.code); - break; - } - - asn_fprint(stdout, &asn_DEF_E2AP_PDU, e2pdu); - mdclog_write(MDCLOG_INFO, "Received indication message of type = %d", message->mtype); - num++; - message->mtype = RIC_CONTROL_REQ; // if we're here we are running and all is ok - message->sub_id = -1; - strncpy((char*)message->payload, "Bouncer Control OK\n", rmr_payload_size(message)); - *resend = true; - ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, e2pdu); - - } - mdclog_write(MDCLOG_INFO, "Number of Indications Received = %d", num); - break; - - /*case A1_POLICY_REQ: - - mdclog_write(MDCLOG_INFO, "In Message Handler: Received A1_POLICY_REQ."); - helper.handler_id = xapp_id; - - res = a1_policy_handler((char*)message->payload, &message->len, helper); - if(res) - { - message->mtype = A1_POLICY_RESP; // if we're here we are running and all is ok - message->sub_id = -1; - *resend = true; - } - break;*/ - - default: - { - mdclog_write(MDCLOG_ERR, "Error :: Unknown message type %d received from RMR", message->mtype); - *resend = false; - } - } - - return; - -}; - - diff --git a/Bouncer/src/xapp-mgmt/msgs_proc.hpp b/Bouncer/src/xapp-mgmt/msgs_proc.hpp deleted file mode 100644 index a0c97f6..0000000 --- a/Bouncer/src/xapp-mgmt/msgs_proc.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -#pragma once - -#ifndef XAPP_MSG_XAPP_MSG_HPP_ -#define XAPP_MSG_XAPP_MSG_HPP_ - -#include -#include -#include -#include - -#include "a1_helper.hpp" -#include "e2ap_control.hpp" -#include "e2ap_control_response.hpp" -#include "e2ap_indication.hpp" -#include "subscription_delete_request.hpp" -#include "subscription_delete_response.hpp" -#include "subscription_helper.hpp" -#include "subscription_request.hpp" -#include "subscription_request.hpp" -#include "subscription_response.hpp" -#include "e2sm_subscription.hpp" -#include "subs_mgmt.hpp" - -#define MAX_RMR_RECV_SIZE 2<<15 - -class XappMsgHandler{ - -private: - std::string xapp_id; - SubscriptionHandler *_ref_sub_handler; -public: - //constructor for xapp_id. - XappMsgHandler(std::string xid){xapp_id=xid; _ref_sub_handler=NULL;}; - XappMsgHandler(std::string xid, SubscriptionHandler &subhandler){xapp_id=xid; _ref_sub_handler=&subhandler;}; - - void operator() (rmr_mbuf_t *, bool*); - - void register_handler(); - bool encode_subscription_delete_request(unsigned char*, size_t* ); - - bool decode_subscription_response(unsigned char*, size_t ); - - //bool a1_policy_handler(char *, int* , a1_policy_helper &); - - void testfunction() {std::cout << "<<<<<<<<<<<<<<<<< -#include - -SubscriptionHandler::SubscriptionHandler(unsigned int timeout_seconds):_time_out(std::chrono::seconds(timeout_seconds)){ - _data_lock = std::make_unique(); - _cv = std::make_unique(); -}; - -void SubscriptionHandler::clear(void){ - { - std::lock_guard lock(*(_data_lock).get()); - status_table.clear(); - } - -}; - - -bool SubscriptionHandler::add_request_entry(transaction_identifier id, transaction_status status){ - - // add entry in hash table if it does not exist - auto search = status_table.find(id); - if(search != status_table.end()){ - return false; - } - - status_table[id] = status; - return true; - -}; - - - -bool SubscriptionHandler::delete_request_entry(transaction_identifier id){ - - auto search = status_table.find(id); - - if (!trans_table.empty()) { - auto search2 = trans_table.find(id); - if(search2 !=trans_table.end()){ - trans_table.erase(search2); - } - } - - if (search != status_table.end()){ - status_table.erase(search); - mdclog_write(MDCLOG_INFO,"Entry for Transaction ID deleted: %d",id); - return true; - } - mdclog_write(MDCLOG_INFO,"Entry not found in SubscriptionHandler for Transaction ID: %d",id); - - return false; -}; - - -bool SubscriptionHandler::set_request_status(transaction_identifier id, transaction_status status){ - - // change status of a request only if it exists. - for(auto &it:status_table){ - if(strcmp(it.first.c_str(), id.c_str())==0) { - it.second = status; - return true; - } - } - return false; - -}; - - -int SubscriptionHandler::get_request_status(transaction_identifier id){ - - for(auto it:status_table){ - if(strcmp(it.first.c_str(), id.c_str())==0) { - return it.second; - } - } - - - return -1; -} - - - -bool SubscriptionHandler::is_request_entry(transaction_identifier id){ - for(auto it:status_table){ - if(strcmp(it.first.c_str(), id.c_str())==0) { - return true; - } - } - return false; -} - - - - -// Handles subscription responses -void SubscriptionHandler::manage_subscription_response(int message_type, transaction_identifier id) -{ - // Make This Thread sleep for 1 Second - std::this_thread::sleep_for(std::chrono::milliseconds(1000)); - { - std::unique_lock _local_lock(*(_data_lock.get())); - mdclog_write(MDCLOG_INFO,"Subscription Handler: Status for meid %s WAS: %d",id.c_str(),this->get_request_status(id)); - - //from the message type we can know if its a success/failure etc. - if(message_type==RIC_SUB_RESP) - this->set_request_status(id, request_success); - - if(message_type==RIC_SUB_DEL_RESP) - this->set_request_status(id, request_success); - - if(message_type==RIC_SUB_FAILURE) - this->set_request_status(id,request_failed); - - if(message_type==RIC_SUB_DEL_FAILURE) - this->set_request_status(id,request_failed); - - mdclog_write(MDCLOG_INFO,"Subscription Handler: Status for meid %s IS: %d",id.c_str(),this->get_request_status(id)); - - - //this->print_subscription_status(); - } - //_cv.get()->notify_all(); - -} - diff --git a/Bouncer/src/xapp-mgmt/subs_mgmt.hpp b/Bouncer/src/xapp-mgmt/subs_mgmt.hpp deleted file mode 100644 index 1da8adc..0000000 --- a/Bouncer/src/xapp-mgmt/subs_mgmt.hpp +++ /dev/null @@ -1,253 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ -/* - * subs_mgmt.hpp - * Created on: 2019 - * Author: Ashwin Shridharan, Shraboni Jana - */ - -#pragma once - -#ifndef SUBSCRIPTION_HANDLER -#define SUBSCRIPTION_HANDLER - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "subscription_delete_request.hpp" -#include "subscription_delete_response.hpp" -#include "subscription_request.hpp" -#include "subscription_response.hpp" - -#define SUBSCR_SUCCESS 1 -#define SUBSCR_ERR_TX -1 -#define SUBSCR_ERR_TIMEOUT -2 -#define SUBSCR_ERR_FAIL -3 -#define SUBSCR_ERR_UNKNOWN -4 -#define SUBSCR_ERR_DUPLICATE -5 -#define SUBSCR_ERR_NOT_FOUND -6 -using namespace std; - -class TransmitterBase -{ -public: - virtual ~TransmitterBase() {} - - template - const T& getParam() const; //to be implemented after Parameter - - template - void setParam(const U& rhs); //to be implemented after Parameter -}; - -template -class Transmitter : public TransmitterBase -{ -public: - Transmitter(const T& tx) :obj(tx) {} - const T& getParam() const {return obj;} - void setParam(const T& tx) {obj=tx;} -private: - T obj; -}; - -//Here's the trick: dynamic_cast rather than virtual -template const T& TransmitterBase::getParam() const -{ - return dynamic_cast&>(*this).getParam(); -} -template void TransmitterBase::setParam(const U& rhs) -{ - dynamic_cast&>(*this).setParam(rhs); - return; -} - -typedef enum { - request_pending = 1, - request_success, - request_failed, - request_duplicate -}Subscription_Status_Types; - - -using transaction_identifier = std::string; -using transaction_status = Subscription_Status_Types; - -class SubscriptionHandler { - -public: - - SubscriptionHandler(unsigned int timeout_seconds = 30); - - template - int manage_subscription_request(transaction_identifier, AppTransmitter &&); - - template - int manage_subscription_delete_request(transaction_identifier, AppTransmitter &&); - - void manage_subscription_response(int message_type, transaction_identifier id); - - int get_request_status(transaction_identifier); - bool set_request_status(transaction_identifier, transaction_status); - bool is_request_entry(transaction_identifier); - void set_timeout(unsigned int); - void clear(void); - void set_ignore_subs_resp(bool b){_ignore_subs_resp = b;}; - - void print_subscription_status(){ for(auto it:status_table){std::cout << it.first << "::" << it.second << std::endl;}}; - -private: - - bool add_request_entry(transaction_identifier, transaction_status); - bool delete_request_entry(transaction_identifier); - - template - bool add_transmitter_entry(transaction_identifier, AppTransmitter&&); - - std::unordered_map trans_table; - std::unordered_map status_table; - - std::unique_ptr _data_lock; - std::unique_ptr _cv; - - std::chrono::seconds _time_out; - - bool _ignore_subs_resp = false; -}; - -template -bool SubscriptionHandler::add_transmitter_entry(transaction_identifier id, AppTransmitter &&trans){ - - mdclog_write(MDCLOG_INFO,"Entry added for Transaction ID: %s", id.c_str()); - - - // add entry in hash table if it does not exist - auto search = trans_table.find(id); - if(search != trans_table.end()){ - return false; - } - - Transmitter tptr(trans); - trans_table[id] = tptr; - return true; - -}; - -//this will work for both sending subscription request and subscription delete request. -//The handler is oblivious of the message content and follows the transaction id. -template -int SubscriptionHandler::manage_subscription_request(transaction_identifier rmr_trans_id, AppTransmitter && tx){ - int res; - // put entry in request table - { - std::lock_guard lock(*(_data_lock.get())); - res = add_request_entry(rmr_trans_id, request_pending); - if(! res){ - - mdclog_write(MDCLOG_ERR, "%s : Error adding new subscription request %s to queue because request with identical key already present", __FILE__, __LINE__); - - return SUBSCR_ERR_DUPLICATE; - } - } - - - // acquire lock ... - std::unique_lock _local_lock(*(_data_lock.get())); - // Send the message - bool flg = tx(); - if (!flg){ - // clear state - delete_request_entry(rmr_trans_id); - mdclog_write(MDCLOG_ERR, "%s, %d :: Error transmitting subscription request %s", __FILE__, __LINE__, rmr_trans_id.c_str()); - return SUBSCR_ERR_TX; - } else { - mdclog_write(MDCLOG_INFO, "%s, %d :: Transmitted subscription request for trans_id %s", __FILE__, __LINE__, rmr_trans_id.c_str()); - add_transmitter_entry(rmr_trans_id, tx); - - } - - // record time stamp .. - auto start = std::chrono::system_clock::now(); - std::chrono::milliseconds t_out(_time_out); - - //the wait functionality has been removed. - - - _local_lock.unlock(); - // std::cout <<"Returning res = " << res << " for request = " << rmr_trans_id << std::endl; - return res; -}; - -template -int SubscriptionHandler:: manage_subscription_delete_request(transaction_identifier rmr_trans_id, AppTransmitter && tx) -{ - int res; - // delete entry in request table - { - std::lock_guard lock(*(_data_lock.get())); - res = delete_request_entry(rmr_trans_id); - mdclog_write(MDCLOG_INFO,"res=%d",res); - if(! res) - { - mdclog_write(MDCLOG_ERR, "%s : Error deleting new subscription request %s from queue because request with key doesn't present", __FILE__, __LINE__); - - return SUBSCR_ERR_NOT_FOUND; - } - - } - - - // acquire lock ... - std::unique_lock _local_lock(*(_data_lock.get())); - // Send the message - bool flg = tx(); - - if (!flg) - { - // add state - res = add_request_entry(rmr_trans_id, request_pending); - mdclog_write(MDCLOG_ERR, "%s, %d :: Error transmitting subscription delete request %s", __FILE__, __LINE__, rmr_trans_id.c_str()); - return SUBSCR_ERR_TX; - } - else - { - mdclog_write(MDCLOG_INFO, "%s, %d :: Transmitted subscription delete request for trans_id %s", __FILE__, __LINE__, rmr_trans_id.c_str()); - - } - - // record time stamp .. - auto start = std::chrono::system_clock::now(); - std::chrono::milliseconds t_out(_time_out); - - //the wait functionality has been removed. - - - _local_lock.unlock(); - // std::cout <<"Returning res = " << res << " for request = " << rmr_trans_id << std::endl; - return res; -}; -#endif diff --git a/Bouncer/src/xapp-mgmt/xapp_handler.hpp b/Bouncer/src/xapp-mgmt/xapp_handler.hpp deleted file mode 100644 index 5b547b7..0000000 --- a/Bouncer/src/xapp-mgmt/xapp_handler.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/* - * xapp_handler.hpp - * - * Created on: Mar 16, 2020 - * Author: Shraboni Jana - */ - -#ifndef SRC_XAPP_MGMT_XAPP_HANDLER_HPP_ -#define SRC_XAPP_MGMT_XAPP_HANDLER_HPP_ - -class XappHandler{ - XappHandler *xhandler; -public: - virtual ~XappHandler(){delete xhandler;}; - virtual void register_handler(XappHandler *xhandler) = 0; - virtual XappHandler* get_handler() = 0; -}; - - - -#endif /* SRC_XAPP_MGMT_XAPP_HANDLER_HPP_ */ diff --git a/Bouncer/src/xapp-utils/xapp_config.cc b/Bouncer/src/xapp-utils/xapp_config.cc deleted file mode 100644 index b4a1bb2..0000000 --- a/Bouncer/src/xapp-utils/xapp_config.cc +++ /dev/null @@ -1,138 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - -#include "xapp_config.hpp" - -string& XappSettings::operator[](const SettingName& theName){ - return theSettings[theName]; -} - -void XappSettings::loadCmdlineSettings(int argc, char **argv){ - - // Parse command line options to over ride - static struct option long_options[] = - { - {"xappname", required_argument, 0, 'n'}, - {"xappid", required_argument, 0, 'x'}, - {"port", required_argument, 0, 'p'}, - {"threads", required_argument, 0, 't'}, - {"ves-interval", required_argument, 0, 'i'}, - {"gNodeB", required_argument, 0, 'g'} - - }; - - - while(1) { - - int option_index = 0; - char c = getopt_long(argc, argv, "n:p:t:s:g:a:v:u:i:c:x:", long_options, &option_index); - - if(c == -1){ - break; - } - - switch(c) - { - - case 'n': - theSettings[XAPP_NAME].assign(optarg); - break; - - case 'p': - theSettings[BOUNCER_PORT].assign(optarg); - break; - - case 't': - theSettings[THREADS].assign(optarg); - mdclog_write(MDCLOG_INFO, "Number of threads set to %s from command line e\n", theSettings[THREADS].c_str()); - break; - - - case 'x': - theSettings[XAPP_ID].assign(optarg); - mdclog_write(MDCLOG_INFO, "XAPP ID set to %s from command line ", theSettings[XAPP_ID].c_str()); - break; - - case 'h': - usage(argv[0]); - exit(0); - - default: - usage(argv[0]); - exit(1); - } - }; - -} - -void XappSettings::loadDefaultSettings(){ - - - if(theSettings[XAPP_NAME].empty()){ - theSettings[XAPP_NAME] = DEFAULT_XAPP_NAME; - } - - if(theSettings[XAPP_ID].empty()){ - theSettings[XAPP_ID] = DEFAULT_XAPP_NAME; //for now xapp_id is same as xapp_name since single xapp instance. - } - if(theSettings[LOG_LEVEL].empty()){ - theSettings[LOG_LEVEL] = DEFAULT_LOG_LEVEL; - } - if(theSettings[BOUNCER_PORT].empty()){ - theSettings[BOUNCER_PORT] = DEFAULT_PORT; - } - if(theSettings[MSG_MAX_BUFFER].empty()){ - theSettings[MSG_MAX_BUFFER] = DEFAULT_MSG_MAX_BUFFER; - } - - if(theSettings[THREADS].empty()){ - theSettings[THREADS] = DEFAULT_THREADS; - } - - -} - -void XappSettings::loadEnvVarSettings(){ - - if (const char *env_xname = std::getenv("XAPP_NAME")){ - theSettings[XAPP_NAME].assign(env_xname); - mdclog_write(MDCLOG_INFO,"Xapp Name set to %s from environment variable", theSettings[XAPP_NAME].c_str()); - } - if (const char *env_xid = std::getenv("XAPP_NAME")){ - theSettings[XAPP_ID].assign(env_xid); - mdclog_write(MDCLOG_INFO,"Xapp ID set to %s from environment variable", theSettings[XAPP_ID].c_str()); - } - - if (const char *env_ports = std::getenv("BOUNCER_PORT")){ - theSettings[BOUNCER_PORT].assign(env_ports); - mdclog_write(MDCLOG_INFO,"Ports set to %s from environment variable", theSettings[BOUNCER_PORT].c_str()); - } - if (const char *env_ports = std::getenv("MSG_MAX_BUFFER")){ - theSettings[MSG_MAX_BUFFER].assign(env_ports); - mdclog_write(MDCLOG_INFO,"Ports set to %s from environment variable", theSettings[MSG_MAX_BUFFER].c_str()); - } - -} - -void XappSettings::usage(char *command){ - std::cout <<"Usage : " << command << " " << std::endl; - std::cout <<" --name[-n] xapp_instance_name "<< std::endl; - std::cout <<" --port[-p] port to listen on e.g tcp:4561 "<< std::endl; - std::cout << "--threads[-t] number of listener threads "<< std::endl ; - -} diff --git a/Bouncer/src/xapp-utils/xapp_config.hpp b/Bouncer/src/xapp-utils/xapp_config.hpp deleted file mode 100644 index 4866fa0..0000000 --- a/Bouncer/src/xapp-utils/xapp_config.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -#ifndef SRC_XAPP_CONFIG_XAPP_CONFIG_HPP_ -#define SRC_XAPP_CONFIG_XAPP_CONFIG_HPP_ - -#include -#include -#include -#include -#include - -#define DEFAULT_XAPP_NAME "bouncer-xapp" -#define DEFAULT_PORT "4560" -#define DEFAULT_MSG_MAX_BUFFER "2072" -#define DEFAULT_THREADS "1" - -#define DEFAULT_LOG_LEVEL MDCLOG_WARN - -#define ASN_BUFF_MAX_SIZE 4096 -#define MAX_SUBSCRIPTION_ATTEMPTS 10 -#define BOUNCER_POLICY_ID 2 - -using namespace std; - -struct XappSettings{ - -public: - typedef enum{ - XAPP_ID, - XAPP_NAME, - BOUNCER_PORT, - MSG_MAX_BUFFER, - THREADS, - LOG_LEVEL - }SettingName; - - void loadDefaultSettings(); - void loadCmdlineSettings(int, char **); - void loadEnvVarSettings(); - void usage(char*); - string& operator[](const SettingName& theName); -private: - typedef map SettingCollection; - SettingCollection theSettings; - -}; - - - -#endif /* SRC_XAPP_CONFIG_XAPP_CONFIG_HPP_ */ diff --git a/Bouncer/src/xapp-utils/xapp_rmr.cc b/Bouncer/src/xapp-utils/xapp_rmr.cc deleted file mode 100644 index d31a54f..0000000 --- a/Bouncer/src/xapp-utils/xapp_rmr.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== - */ - - -#include "xapp_rmr.hpp" -#include -#define RMR_MAX_XID 32 - -XappRmr::XappRmr(std::string port, int rmrattempts){ - - _proto_port = port; - _nattempts = rmrattempts; - _xapp_rmr_ctx = NULL; - _xapp_received_buff = NULL; - _xapp_send_buff =NULL; - _rmr_is_ready = false; - _listen = false; - -}; - -XappRmr::~XappRmr(void){ - // free memory - if(_xapp_received_buff) - rmr_free_msg(_xapp_received_buff); - - if(_xapp_send_buff) - rmr_free_msg(_xapp_send_buff); - - if (_xapp_rmr_ctx){ - rmr_close(_xapp_rmr_ctx); - } -}; - -//Get RMR Context. -void XappRmr::xapp_rmr_init(bool rmr_listen){ - - - // Initialize the RMR context - _xapp_rmr_ctx = rmr_init(const_cast(_proto_port.c_str()), RMR_MAX_RCV_BYTES, RMRFL_NONE); - - if ( _xapp_rmr_ctx == NULL){ - mdclog_write(MDCLOG_ERR,"Error Initializing RMR, file= %s, line=%d",__FILE__,__LINE__); - } - while( ! rmr_ready(_xapp_rmr_ctx) ) { - mdclog_write(MDCLOG_INFO,">>> waiting for RMR, file= %s, line=%d",__FILE__,__LINE__); - sleep(1); - } - _rmr_is_ready = true; - mdclog_write(MDCLOG_INFO,"RMR Context is Ready, file= %s, line=%d",__FILE__,__LINE__); - - //Set the listener requirement - _listen = rmr_listen; - return; - -} - -bool XappRmr::rmr_header(xapp_rmr_header *hdr){ - - _xapp_send_buff->mtype = hdr->message_type; - _xapp_send_buff->len = hdr->payload_length; - _xapp_send_buff->sub_id = -1; - rmr_str2meid(_xapp_send_buff, hdr->meid); - rmr_str2xact(_xapp_send_buff, hdr->meid); - - mdclog_write(MDCLOG_INFO,"hdr->meid = %s",hdr->meid); - - return true; -} - -//RMR Send with payload and header. -bool XappRmr::xapp_rmr_send(xapp_rmr_header *hdr, void *payload){ - - // Get the thread id - std::thread::id my_id = std::this_thread::get_id(); - std::stringstream thread_id; - std::stringstream ss; - - thread_id << my_id; - mdclog_write(MDCLOG_INFO, "Sending thread %s", thread_id.str().c_str()); - - - int rmr_attempts = _nattempts; - - if( _xapp_send_buff == NULL ) { - _xapp_send_buff = rmr_alloc_msg(_xapp_rmr_ctx, RMR_DEF_SIZE); - } - - bool res = rmr_header(hdr); - if(!res){ - mdclog_write(MDCLOG_ERR,"RMR HEADERS were incorrectly populated, file= %s, line=%d",__FILE__,__LINE__); - return false; - } - - mdclog_write(MDCLOG_INFO,"------ start of Xid updated, file= %s, line=%d",__FILE__,__LINE__); - int test_support_xact_count = rand(); - char *xid = (char *) malloc( sizeof( char ) * RMR_MAX_SRC ); - memset(xid, '\0',RMR_MAX_SRC); - snprintf(xid, RMR_MAX_XID, "%010d", test_support_xact_count ); - - mdclog_write(MDCLOG_INFO,"before xapp_send_buff Xid=%s, file= %s, line=%d",xid,__FILE__,__LINE__); - memcpy(_xapp_send_buff->xaction, xid, RMR_MAX_XID); - - mdclog_write(MDCLOG_INFO,"Xid=%s, file= %s, line=%d",_xapp_send_buff->xaction,__FILE__,__LINE__); - - memcpy(_xapp_send_buff->payload, payload, hdr->payload_length); - _xapp_send_buff->len = hdr->payload_length; - - if(!_rmr_is_ready) { - mdclog_write(MDCLOG_ERR,"RMR Context is Not Ready in SENDER, file= %s, line=%d",__FILE__,__LINE__); - return false; - } - - while(rmr_attempts > 0){ - - _xapp_send_buff = rmr_send_msg(_xapp_rmr_ctx,_xapp_send_buff); - if(!_xapp_send_buff) { - mdclog_write(MDCLOG_ERR,"Error In Sending Message , file= %s, line=%d, attempt=%d",__FILE__,__LINE__,rmr_attempts); - rmr_attempts--; - } - else if (_xapp_send_buff->state == RMR_OK){ - mdclog_write(MDCLOG_INFO,"Message Sent: RMR State = RMR_OK"); - mdclog_write(MDCLOG_INFO,"_xapp_send_buff->xaction: %s",_xapp_send_buff->xaction); - rmr_attempts = 0; - _xapp_send_buff = NULL; - return true; - } - else - { - mdclog_write(MDCLOG_INFO,"Need to retry RMR: state=%d, attempt=%d, file=%s, line=%d",_xapp_send_buff->state, rmr_attempts,__FILE__,__LINE__); - if(_xapp_send_buff->state == RMR_ERR_RETRY){ - usleep(1); } - rmr_attempts--; - } - sleep(1); - } - return false; -} - -//---------------------------------------- -// Some get/set methods -//--------------------------------------- -bool XappRmr::get_listen(void){ - return _listen; -} - - -void XappRmr::set_listen(bool listen){ - _listen = listen; -} - -int XappRmr::get_is_ready(void){ - return _rmr_is_ready; -} - -bool XappRmr::get_isRunning(void){ - return _listen; -} - - -void * XappRmr::get_rmr_context(void){ - return _xapp_rmr_ctx; -} - - -void init_logger(const char *AppName, mdclog_severity_t log_level) -{ - mdclog_attr_t *attr; - mdclog_attr_init(&attr); - mdclog_attr_set_ident(attr, AppName); - mdclog_init(attr); - mdclog_level_set(log_level); - mdclog_attr_destroy(attr); -} - diff --git a/Bouncer/src/xapp-utils/xapp_rmr.hpp b/Bouncer/src/xapp-utils/xapp_rmr.hpp deleted file mode 100644 index 9225fcc..0000000 --- a/Bouncer/src/xapp-utils/xapp_rmr.hpp +++ /dev/null @@ -1,213 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -#ifndef XAPP_RMR_XAPP_RMR_H_ -#define XAPP_RMR_XAPP_RMR_H_ - - -#ifdef __GNUC__ -#define likely(x) __builtin_expect((x), 1) -#define unlikely(x) __builtin_expect((x), 0) -#else -#define likely(x) (x) -#define unlikely(x) (x) -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "a1_helper.hpp" -#include "e2ap_control.hpp" -#include "e2ap_control_response.hpp" -#include "e2ap_indication.hpp" -#include "subscription_delete_request.hpp" -#include "subscription_delete_response.hpp" -#include "subscription_helper.hpp" -#include "subscription_request.hpp" -#include "subscription_request.hpp" -#include "subscription_response.hpp" -#include "e2sm_subscription.hpp" -#include "subs_mgmt.hpp" - -typedef struct{ - struct timespec ts; - int32_t message_type; - int32_t state; - int32_t payload_length; - - unsigned char sid[RMR_MAX_SID]; //Subscription ID. - unsigned char src[RMR_MAX_SRC]; //Xapp Name - unsigned char meid[RMR_MAX_MEID]={}; - -} xapp_rmr_header; - - -class XappRmr{ -private: - std::string _proto_port; - int _nattempts; - bool _rmr_is_ready; - bool _listen; - void* _xapp_rmr_ctx; - rmr_mbuf_t* _xapp_send_buff; // send buffer - rmr_mbuf_t* _xapp_received_buff; // received buffer - - -public: - - XappRmr(std::string, int rmrattempts=10); - ~XappRmr(void); - void xapp_rmr_init(bool); - - template - void xapp_rmr_receive(MessageProcessor&&, XappRmr *parent); - - bool xapp_rmr_send(xapp_rmr_header*, void*); - - bool rmr_header(xapp_rmr_header*); - void set_listen(bool); - bool get_listen(void); - int get_is_ready(void); - bool get_isRunning(void); - void* get_rmr_context(void); - -}; - - -// main workhorse thread which does the listen->process->respond loop -template -void XappRmr::xapp_rmr_receive(MsgHandler&& msgproc, XappRmr *parent){ - - bool* resend = new bool(false); - // Get the thread id - std::thread::id my_id = std::this_thread::get_id(); - std::stringstream thread_id; - std::stringstream ss; - std::fstream io_file; - - thread_id << my_id; - - // Get the rmr context from parent (all threads and parent use same rmr context. rmr context is expected to be thread safe) - if(!parent->get_is_ready()){ - mdclog_write( MDCLOG_ERR, "RMR Shows Not Ready in RECEIVER, file= %s, line=%d ",__FILE__,__LINE__); - return; - } - void *rmr_context = parent->get_rmr_context(); - assert(rmr_context != NULL); - - // Get buffer specific to this thread - this->_xapp_received_buff = NULL; - this->_xapp_received_buff = rmr_alloc_msg(rmr_context, RMR_DEF_SIZE); - assert(this->_xapp_received_buff != NULL); - - mdclog_write(MDCLOG_INFO, "Starting receiver thread %s", thread_id.str().c_str()); - io_file.open("/tmp/timestamp.txt", std::ios::in|std::ios::out|std::ios::app); - std::time_t sentMsg_time; - std::time_t recvMsg_time; - struct timeval ts_recv; - struct timeval ts_sent; - int num = 0; - - while(parent->get_listen()) { - mdclog_write(MDCLOG_INFO, "Listening at Thread: %s", thread_id.str().c_str()); - - this->_xapp_received_buff = rmr_rcv_msg( rmr_context, this->_xapp_received_buff ); - //this->_xapp_received_buff = rmr_call( rmr_context, this->_xapp_received_buff); - - if (io_file) { - gettimeofday(&ts_recv, NULL); - io_file << "Received Msg with msgType: " << this->_xapp_received_buff->mtype << " at time: " << (ts_recv.tv_sec * 1000) + (ts_recv.tv_usec/1000) << std::endl; - } - - if( this->_xapp_received_buff->mtype < 0 || this->_xapp_received_buff->state != RMR_OK ) { - mdclog_write(MDCLOG_ERR, "bad msg: state=%d errno=%d, file= %s, line=%d", this->_xapp_received_buff->state, errno, __FILE__,__LINE__ ); - return; - } - else - { - mdclog_write(MDCLOG_INFO,"RMR Received Message of Type: %d",this->_xapp_received_buff->mtype); - mdclog_write(MDCLOG_INFO,"RMR Received Message: %s",(char*)this->_xapp_received_buff->payload); - - //in case message handler returns true, need to resend the message. - msgproc(this->_xapp_received_buff, resend); - - //start of code to check decoding indication payload - - num++; - mdclog_write(MDCLOG_DEBUG, "Total Indications received : %d", num); - - if(*resend){ - mdclog_write(MDCLOG_INFO,"RMR Return to Sender Message of Type: %d",this->_xapp_received_buff->mtype); - mdclog_write(MDCLOG_INFO,"RMR Return to Sender Message: %s",(char*)this->_xapp_received_buff->payload); - - if (io_file) { - gettimeofday(&ts_sent, NULL); - - io_file << "Send Msg with msgType: " << this->_xapp_received_buff->mtype << " at time: " << (ts_sent.tv_sec * 1000) + (ts_sent.tv_usec/1000) << std::endl; - - io_file << "Time diff: " << ((ts_sent.tv_sec - ts_recv.tv_sec)*1000 + (ts_sent.tv_usec - ts_recv.tv_usec)/1000) << std::endl; - } - - rmr_rts_msg(rmr_context, this->_xapp_received_buff ); - //sleep(1); - - *resend = false; - } - continue; - } - - } - - if (io_file) { - io_file.close(); - } - - // Clean up - try{ - delete resend; - rmr_free_msg(this->_xapp_received_buff); - } - catch(std::runtime_error &e){ - std::string identifier = __FILE__ + std::string(", Line: ") + std::to_string(__LINE__) ; - std::string error_string = identifier = " Error freeing RMR message "; - mdclog_write(MDCLOG_ERR, error_string.c_str(), ""); - } - - return; -} - -#endif /* XAPP_RMR_XAPP_RMR_H_ */ diff --git a/Bouncer/src/xapp-utils/xapp_sdl.cc b/Bouncer/src/xapp-utils/xapp_sdl.cc deleted file mode 100644 index 622348c..0000000 --- a/Bouncer/src/xapp-utils/xapp_sdl.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -================================================================================== - - Copyright (c) 2019-2020 AT&T Intellectual Property. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== - */ - -/* - * xapp_sdl.cc - * - * Created on: Mar, 2020 - * Author: Shraboni Jana - */ -#include "xapp_sdl.hpp" -/*need to work on the SDL FLow. Currently data hardcoded. -An xApp can use the SDL for two things: -- persisting state for itself (in case it fails and recovers) -- making information available for other xApps. The xApp would typically write using SDL directly. -- The consumer of the data could also use SDL directly or use an access library like in the case of the R-NIB. -*/ -/*bool XappSDL::set_data(shareddatalayer::SyncStorage *sdl){ - try{ - //connecting to the Redis and generating a random key for namespace "bouncer-xapp" - mdclog_write(MDCLOG_INFO, "IN SDL Set Data", __FILE__, __LINE__); - DataMap dmap; - char key[4]="abc"; - std::cout << "KEY: "<< key << std::endl; - Key k = key; - Data d; - uint8_t num = 101; - d.push_back(num); - dmap.insert({k,d}); - Namespace ns(sdl_namespace); - sdl->set(ns, dmap); - } - catch(...){ - mdclog_write(MDCLOG_ERR, "SDL Error in Set Data for Namespace=%s",sdl_namespace); - return false; - } - return true; -} - -void XappSDL::get_data(shareddatalayer::SyncStorage *sdl){ - Namespace ns(sdl_namespace); - DataMap dmap; - std::string prefix=""; - Keys K = sdl->findKeys(ns, prefix); // just the prefix - DataMap Dk = sdl->get(ns, K); - for(auto si=K.begin();si!=K.end();++si){ - std::vector val_v = Dk[(*si)]; // 4 lines to unpack a string - char val[val_v.size()+1]; // from Data - int i; - for(i=0;i -#include -#include -#include -#include -#include -#include -#include - -using namespace std; -using Namespace = std::string; -using Key = std::string; -using Data = std::vector; -using DataMap = std::map; -using Keys = std::set; - -/*class XappSDL{ -private: - std::string sdl_namespace; - -public: - XappSDL(std::string ns) { sdl_namespace=ns; } - void get_data(shareddatalayer::SyncStorage *); - bool set_data(shareddatalayer::SyncStorage *); -};*/ - -#endif /* SRC_XAPP_UTILS_XAPP_SDL_HPP_ */ diff --git a/Bouncer/src/xapp.cc b/Bouncer/src/xapp.cc deleted file mode 100644 index 2a07ff4..0000000 --- a/Bouncer/src/xapp.cc +++ /dev/null @@ -1,481 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - -#include "xapp.hpp" -#include -#include -#include -#include -#include -#include -#include -using namespace utility; -using namespace web; -using namespace web::http; -using namespace web::http::client; -using namespace concurrency::streams; -using jsonn = nlohmann::json; -#define BUFFER_SIZE 1024 -extern std::vectorSubscriptionIds; - Xapp::Xapp(XappSettings &config, XappRmr &rmr){ - - rmr_ref = &rmr; - config_ref = &config; - xapp_mutex = NULL; - subhandler_ref = NULL; - return; - } - -Xapp::~Xapp(void){ - - //Joining the threads - int threadcnt = xapp_rcv_thread.size(); - for(int i=0; i~mutex(); - delete xapp_mutex; - } -}; - -//Stop the xapp. Note- To be run only from unit test scripts. -void Xapp::stop(void){ - // Get the mutex lock - std::lock_guard guard(*xapp_mutex); - rmr_ref->set_listen(false); - rmr_ref->~XappRmr(); - - //Detaching the threads....not sure if this is the right way to stop the receiver threads. - //Hence function should be called only in Unit Tests - int threadcnt = xapp_rcv_thread.size(); - for(int i=0; iset_listen(true); - if(xapp_mutex == NULL){ - xapp_mutex = new std::mutex(); - } - std::lock_guard guard(*xapp_mutex); - - for(int j=0; j < _callbacks.size(); j++){ - std::thread th_recv([&](){ rmr_ref->xapp_rmr_receive(std::move(_callbacks[j]), rmr_ref);}); - xapp_rcv_thread.push_back(std::move(th_recv)); - } - - return; -} - -//Starting a seperate single receiver -void Xapp::start_xapp_receiver(XappMsgHandler& mp_handler){ - //start a receiver thread. Can be multiple receiver threads for more than 1 listening port. - rmr_ref->set_listen(true); - if(xapp_mutex == NULL){ - xapp_mutex = new std::mutex(); - } - - mdclog_write(MDCLOG_INFO,"Receiver Thread file= %s, line=%d",__FILE__,__LINE__); - std::lock_guard guard(*xapp_mutex); - std::thread th_recv([&](){ rmr_ref->xapp_rmr_receive(std::move(mp_handler), rmr_ref);}); - xapp_rcv_thread.push_back(std::move(th_recv)); - return; -} - -void Xapp::shutdown(){ - - sleep(70); - //send subscriptions delete. - shutdown_subscribe_deletes(); - return; -} - -void Xapp::shutdown_subscribe_deletes(void ) -{ - - bool res; - size_t data_size = ASN_BUFF_MAX_SIZE; - unsigned char data[data_size]; - //unsigned char meid[RMR_MAX_MEID]; - char meid[RMR_MAX_MEID]; - std::string xapp_id = config_ref->operator [](XappSettings::SettingName::XAPP_ID); - - mdclog_write(MDCLOG_INFO,"Preparing to send subscription Delete in file= %s, line=%d",__FILE__,__LINE__); - - auto gnblist = get_rnib_gnblist(); - - int sz = gnblist.size(); - mdclog_write(MDCLOG_INFO,"GNBList size : %d", sz); - - if(sz <= 0) - mdclog_write(MDCLOG_INFO,"Subscriptions Delete cannot be sent as GNBList in RNIB is NULL"); - - for(int i = 0; i0) - { - auto delJson = pplx::create_task([i,meid]() { - utility::string_t port = U("8088"); - utility::string_t address = U("http://service-ricplt-submgr-http.ricplt.svc.cluster.local:"); - address.append(port); - address.append(U("/ric/v1/subscriptions/")); - address.append( utility::string_t(SubscriptionIds.back())); - SubscriptionIds.pop_back(); - uri_builder uri(address); - auto addr = uri.to_uri().to_string(); - http_client client(addr); - ucout << utility::string_t(U("making requests at: ")) << addr <manage_subscription_delete_request(gnblist[i], transmitter); - - if(result==SUBSCR_SUCCESS) - { - - mdclog_write(MDCLOG_INFO,"Subscription Delete SUCCESSFUL in file= %s, line=%d for MEID %s",__FILE__,__LINE__, meid); - } - else - { - mdclog_write(MDCLOG_ERR,"Subscription Delete FAILED in file= %s, line=%d for MEID %s",__FILE__,__LINE__, meid); - } - */ - } -} - -void Xapp::startup_subscribe_requests(void ){ - bool res; - size_t data_size = ASN_BUFF_MAX_SIZE; - unsigned char data[data_size]; - char meid[RMR_MAX_MEID]; - std::string xapp_id = config_ref->operator [](XappSettings::SettingName::XAPP_ID); - //int a =std::stoi(xapp_id); - mdclog_write(MDCLOG_INFO,"Preparing to send subscription in file= %s, line=%d",__FILE__,__LINE__); - - auto gnblist = get_rnib_gnblist(); - - int sz = gnblist.size(); - mdclog_write(MDCLOG_INFO,"GNBList size : %d", sz); - if(sz <= 0) - mdclog_write(MDCLOG_INFO,"Subscriptions cannot be sent as GNBList in RNIB is NULL"); - - for(int i = 0; imanage_subscription_request(gnblist[i], transmitter); - - if(result==SUBSCR_SUCCESS){ - - mdclog_write(MDCLOG_INFO,"Subscription SUCCESSFUL in file= %s, line=%d for MEID %s",__FILE__,__LINE__, meid); - } - else { - mdclog_write(MDCLOG_ERR,"Subscription FAILED in file= %s, line=%d for MEID %s",__FILE__,__LINE__, meid); - } - */ - } - std::cout<<"\n SubscriptionIds vector size= "<xapp_rmr_send(&header, (void *)message); - free(message); - -} - -void Xapp::set_rnib_gnblist(void) { - - openSdl(); - - void *result = getListGnbIds(); - if(strlen((char*)result) < 1){ - mdclog_write(MDCLOG_ERR, "ERROR: no data from getListGnbIds\n"); - return; - } - - mdclog_write(MDCLOG_INFO, "GNB List in R-NIB %s\n", (char*)result); - - - Document doc; - ParseResult parseJson = doc.Parse((char*)result); - if (!parseJson) { - std::cerr << "JSON parse error: %s (%u)", GetParseErrorFunc(parseJson.Code()); - return; - } - - if(!doc.HasMember("gnb_list")){ - mdclog_write(MDCLOG_INFO, "JSON Has No GNB List Object"); - return; - } - assert(doc.HasMember("gnb_list")); - - const Value& gnblist = doc["gnb_list"]; - if (gnblist.IsNull()) - return; - - if(!gnblist.IsArray()){ - mdclog_write(MDCLOG_INFO, "GNB List is not an array"); - return; - } - - - assert(gnblist.IsArray()); - for (SizeType i = 0; i < gnblist.Size(); i++) // Uses SizeType instead of size_t - { - assert(gnblist[i].IsObject()); - const Value& gnbobj = gnblist[i]; - assert(gnbobj.HasMember("inventory_name")); - assert(gnbobj["inventory_name"].IsString()); - std::string name = gnbobj["inventory_name"].GetString(); - rnib_gnblist.push_back(name); - - } - closeSdl(); - return; - -} - diff --git a/Bouncer/src/xapp.hpp b/Bouncer/src/xapp.hpp deleted file mode 100644 index e436f98..0000000 --- a/Bouncer/src/xapp.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/* -# ================================================================================== -# Copyright (c) 2020 HCL Technologies Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -*/ - - -#pragma once - -#ifndef SRC_XAPP_HPP_ -#define SRC_XAPP_HPP_ - -#include -#include -#include -#include -#include -#include -#include -#include "xapp_rmr.hpp" -#include "xapp_sdl.hpp" -#include "rapidjson/writer.h" -#include "rapidjson/document.h" -#include "rapidjson/error/error.h" -#include -#include "msgs_proc.hpp" -#include "subs_mgmt.hpp" -#include "xapp_config.hpp" -extern "C" { -#include "rnib/rnibreader.h" -} -using namespace std; -using namespace std::placeholders; -using namespace rapidjson; - - -class Xapp{ -public: - - Xapp(XappSettings &, XappRmr &); - - ~Xapp(void); - - void stop(void); - - void startup(SubscriptionHandler &); - void shutdown(void); - - void start_xapp_receiver(XappMsgHandler &); - void Run(); - - //void sdl_data(void); - - Xapp(Xapp const &)=delete; - Xapp& operator=(Xapp const &) = delete; - - void register_handler(XappMsgHandler &fn){ - _callbacks.emplace_back(fn); - } - - //getters/setters. - void set_rnib_gnblist(void); - std::vector get_rnib_gnblist(){ return rnib_gnblist; } - -private: - void startup_subscribe_requests(void ); - void shutdown_subscribe_deletes(void); - void startup_get_policies(void ); - - - XappRmr * rmr_ref; - XappSettings * config_ref; - SubscriptionHandler *subhandler_ref; - - std::mutex *xapp_mutex; - std::vector xapp_rcv_thread; - std::vector rnib_gnblist; - std::vector _callbacks; -}; - - -#endif /* SRC_XAPP_HPP_ */ diff --git a/Bouncer/src/xapp_env.sh b/Bouncer/src/xapp_env.sh deleted file mode 100644 index 64b2cd4..0000000 --- a/Bouncer/src/xapp_env.sh +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/bash - -export RMR_SEED_RT="routes.txt" -export RMR_RTG_SVC="9999" -export MSG_MAX_BUFFER="2072" -export THREADS="1" -export VERBOSE="0" -export CONFIG_FILE="config/config-file.json" -export XAPP_ID="3489-er492k-92389" -export LOG_LEVEL="MDCLOG_ERR" -export DBAAS_SERVICE_HOST="127.0.0.1" -export DBAAS_SERVICE_PORT="6379" - - diff --git a/Bouncer/tox.ini b/Bouncer/tox.ini deleted file mode 100644 index e1a2967..0000000 --- a/Bouncer/tox.ini +++ /dev/null @@ -1,34 +0,0 @@ -# This work is licensed under a Creative Commons Attribution 4.0 International License. -# SPDX-License-Identifier: CC-BY-4.0 -# Copyright (C) 2020 AT&T Intellectual Property -# documentation only - -[tox] -minversion = 2.0 -envlist = - docs, - docs-linkcheck, -skipsdist = true - -[testenv:docs] -basepython = python3 -deps = - sphinx - sphinx-rtd-theme - sphinxcontrib-httpdomain - recommonmark - lfdocs-conf - -commands = - sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html - echo "Generated docs available in {toxinidir}/docs/_build/html" -whitelist_externals = echo - -[testenv:docs-linkcheck] -basepython = python3 -deps = sphinx - sphinx-rtd-theme - sphinxcontrib-httpdomain - recommonmark - lfdocs-conf -commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck diff --git a/Bouncer/xapp-descriptor/bouncer-register.json b/Bouncer/xapp-descriptor/bouncer-register.json new file mode 100644 index 0000000..280567c --- /dev/null +++ b/Bouncer/xapp-descriptor/bouncer-register.json @@ -0,0 +1,9 @@ +{ +"appName": "bouncer-xapp", +"appVersion": "2.0.0", +"configPath": "", +"appInstanceName": "bouncer-xapp", +"httpEndpoint": ":8080", +"rmrEndpoint": ":4560", +"config": "{\"xapp_name\":\"bouncer-xapp\",\"version\":\"2.0.0\",\"containers\":[{\"name\":\"bouncer-xapp\",\"image\":{\"registry\":\"nexus3.o-ran-sc.org:10004\",\"name\":\"oran-ric/bouncer_test\",\"tag\":\"2.0.0\"}}],\"messaging\":{\"ports\":[{\"name\":\"http\",\"container\":\"bouncer-xapp\",\"port\":8080,\"description\":\"http service\"},{\"name\":\"rmr-data\",\"container\":\"bouncer-xapp\",\"port\":4560,\"rxMessages\":[\"RIC_SUB_RESP\",\"RIC_INDICATION\"],\"txMessages\":[\"RIC_SUB_REQ\"],\"policies\":[],\"description\":\"rmr receive data port for bouncer-xapp\"},{\"name\":\"rmr-route\",\"container\":\"bouncer-xapp\",\"port\":4561,\"description\":\"rmr route port for bouncer-xapp\"}]},\"rmr\":{\"protPort\":\"tcp:4560\",\"maxSize\":2072,\"numWorkers\":1,\"rxMessages\":[\"RIC_SUB_RESP\",\"RIC_INDICATION\"],\"txMessages\":[\"RIC_SUB_REQ\"],\"policies\":[]}}" +} diff --git a/Bouncer/xapp-descriptor/config-file.json b/Bouncer/xapp-descriptor/config-file.json new file mode 100644 index 0000000..9b1d71f --- /dev/null +++ b/Bouncer/xapp-descriptor/config-file.json @@ -0,0 +1,53 @@ +{ + "xapp_name": "bouncer-xapp", + "version": "2.0.0", + "containers": [ + { + "name": "bouncer-xapp", + "image": { + "registry": "nexus3.o-ran-sc.org:10002", + "name": "oran-ric/bouncer_test", + "tag": "2.0.0" + } + } + ], + "messaging": { + "ports": [ + { + "name": "http", + "container": "bouncer-xapp", + "port": 8080, + "description": "http service" + }, + { + "name": "rmr-data", + "container": "bouncer-xapp", + "port": 4560, + + "rxMessages": ["RIC_SUB_RESP", "RIC_INDICATION","RIC_SUB_DEL_RESP"], + "txMessages": ["RIC_SUB_REQ","RIC_SUB_DEL_REQ"], + "policies": [1], + "description": "rmr receive data port for Bouncer xApp" + }, + { + "name": "rmr-route", + "container": "bouncer-xapp", + "port": 4561, + "description": "rmr route port for Bouncer xApp" + } + ] + }, + "rmr": { + "protPort": "tcp:4560", + "maxSize": 2072, + "numWorkers": 1, + "txMessages": ["RIC_SUB_REQ","RIC_SUB_DEL_REQ"], + "rxMessages": ["RIC_SUB_RESP", "RIC_INDICATION","RIC_SUB_DEL_RESP"], + "policies": [1] + }, + "http":{ + "protPort": "tcp:8080" + + } + } + diff --git a/Bouncer/xapp-descriptor/run.sh b/Bouncer/xapp-descriptor/run.sh new file mode 100755 index 0000000..1069f4d --- /dev/null +++ b/Bouncer/xapp-descriptor/run.sh @@ -0,0 +1,7 @@ +#!/bin/sh +#docker run --rm -u 0 -it -d -p 8090:8080 -e DEBUG=1 -e STORAGE=local -e STORAGE_LOCAL_ROOTDIR=/charts -v $(pwd)/charts:/charts chartmuseum/chartmuseum:latest +export CHART_REPO_URL=http://0.0.0.0:8090 +dms_cli onboard config-file.json schema.json +curl -X GET http://localhost:8090/api/charts | jq . +dms_cli install bouncer-xapp 2.0.0 ricxapp +curl -v -X POST "http://$(kubectl get service -n ricplt | grep appmgr-http| awk '{print $3}'):8080/ric/v1/register" -H "accept: application/json" -H "Content-Type: application/json" -d "@bouncer-register.json" diff --git a/Bouncer/init/schema.json b/Bouncer/xapp-descriptor/schema.json similarity index 100% rename from Bouncer/init/schema.json rename to Bouncer/xapp-descriptor/schema.json -- 2.16.6