From: sandeepindia Date: Wed, 29 Nov 2023 19:13:49 +0000 (+0000) Subject: RICAPP-224:- F1AP gnbDuConfigurationUpdate parser X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F12140%2F1;p=ric-app%2Fkpimon-go.git RICAPP-224:- F1AP gnbDuConfigurationUpdate parser Change-Id: I393e58404eebcc011e0099eff2c53cf44b15ec0d Signed-off-by: sandeepindia --- diff --git a/Dockerfile b/Dockerfile index 5af9b09..60ec0c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # FROM ubuntu:18.04 -FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as build-kpimon +#FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as build-kpimon +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 as build-kpimon WORKDIR /opt # Install RMR client #COPY bin/rmr* ./ @@ -11,11 +12,14 @@ RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb RUN rm -f rmr_${RMRVERSION}_amd64.deb rmr-dev_${RMRVERSION}_amd64.deb - RUN apt-get update && \ - apt-get -y install gcc + apt-get -y install g++ + COPY e2ap/ e2ap/ COPY e2sm/ e2sm/ +# f1ap size is 35 mb which makes repo size to exceede gerrit size limit +#COPY f1ap/ f1ap/ +COPY f1ap.tar.gz f1ap.tar.gz # "COMPILING E2AP Wrapper" RUN cd e2ap && \ gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ @@ -33,9 +37,22 @@ RUN cd e2sm && \ mkdir /usr/local/include/e2sm && \ cp wrapper.h headers/*.h /usr/local/include/e2sm && \ ldconfig +RUN apt-get install tar +# "COMPILING F1AP Wrapper and F1AP Parser " +RUN tar -xzvf f1ap.tar.gz +RUN cd f1ap && \ + gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \ + gcc *.o -shared -o libf1apwrapper.so&& \ + cp libf1apwrapper.so /usr/local/lib/ && \ + mkdir /usr/local/include/f1ap && \ + cp wrapper.h headers/*.h /usr/local/include/f1ap && \ + ldconfig +#RUN cp -r /usr/include/x86_64-linux-gnu/c++/9/bits /usr/include/c++/9 # Setup running environment COPY control/ control/ +COPY f1apPackage/ f1apPackage/ +COPY isolation/ isolation/ COPY ./go.mod ./go.mod COPY ./kpimon.go ./kpimon.go COPY testfile1.txt testfile1.txt @@ -49,11 +66,16 @@ ENV PATH=$DEFAULTPATH:/usr/local/go/bin:/opt/go/bin:/root/go/bin COPY go.sum go.sum RUN go build ./kpimon.go +COPY f1apHelper/ f1apHelper/ +RUN go build f1apHelper/f1apServer.go COPY config-file.yaml . ENV CFG_FILE=/opt/config-file.yaml COPY routes.txt . ENV RMR_SEED_RT=/opt/routes.txt ENV RMR_SRC_ID=service-ricxapp-kpimon-go-rmr.ricxapp:4560 - -ENTRYPOINT ["env","LD_LIBRARY_PATH=/usr/local/lib","./kpimon"] +ENV LD_LIBRARY_PATH=/usr/local/lib +ENV C_INCLUDE_PATH=/usr/local/include +COPY entripoint.sh entripoint.sh +ENTRYPOINT ["env","LD_LIBRARY_PATH=/usr/local/lib","./entripoint.sh"] +#ENTRYPOINT ["env","LD_LIBRARY_PATH=/usr/local/lib","f1apHelper/f1apServer","./kpimon"] diff --git a/control/control.go b/control/control.go index e101eaf..7b8fc61 100644 --- a/control/control.go +++ b/control/control.go @@ -1,8 +1,8 @@ package control /* #include -#cgo LDFLAGS: -le2smwrapper -lm -#cgo CFLAGS: -I/usr/local/include/e2sm +#cgo LDFLAGS: -lm -le2smwrapper +#cgo CFLAGS: -I/usr/local/include/e2sm */ import "C" import ( @@ -17,8 +17,8 @@ import ( // "bytes" // "encoding/binary" "strconv" - "encoding/base64" - "strings" + //"encoding/base64" + //"strings" "fmt" "reflect" "errors" @@ -44,6 +44,8 @@ var ( clientEndpoint = clientmodel.SubscriptionParamsClientEndpoint{Host: "service-ricxapp-kpimon-go-http.ricxapp", HTTPPort: &hPort, RMRPort: &rPort} ) var Glob_cell = make(map[string]bool) +var Glob_Ran_cell = make(map[string][]string) +var Glob_cell_Plmn = make(map[string]string) var ranUeKpi = make(map[string][]string) var ranCellKpi = make(map[string][]string) func (c Control) Consume(msg *xapp.RMRParams) error { @@ -187,7 +189,7 @@ func encode_action_format1(plmn string, cellid string, meid string) clientmodel. result:=C.encode_action_Definition(cString, C.int(determine)) for i := 0; i < int(result.length); i++ { - value := int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer(result.array)) + uintptr(i*8)))) + value := int64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(result.array)) + uintptr(i*4)))) format1 = append(format1, value) } format1 = append(format1, lol1...) //appending plmn @@ -244,7 +246,7 @@ func encode_action_format3(meid string) clientmodel.ActionDefinition { result:=C.encode_action_Definition(cString, C.int(determine)) for i := 0; i < int(result.length); i++ { - value := int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer(result.array)) + uintptr(i*8)))) + value := int64(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(result.array)) + uintptr(i*4)))) format3 = append(format3, value) } @@ -255,6 +257,7 @@ func encode_action_format3(meid string) clientmodel.ActionDefinition { } func encode_actionsToBeSetup(meid string) clientmodel.ActionsToBeSetup { var l clientmodel.ActionsToBeSetup + /* link:="http://service-ricplt-e2mgr-http.ricplt.svc.cluster.local:3800/v1/nodeb/" link=link+meid tmpr,err := http.Get(link) @@ -306,18 +309,34 @@ func encode_actionsToBeSetup(meid string) clientmodel.ActionsToBeSetup { fmt.Println(message[i : i+10]) } } + */ var n int64 = 1 + cells:=Glob_Ran_cell[meid] + fmt.Println("len of Tonga cells= ",len(cells)) + fmt.Println("Tonga cells = ", cells) + fmt.Println("Tonga = ", Glob_Ran_cell) + + var tempCells []string + for _, ele:=range cells{ + if ele!=""{ + tempCells =append(tempCells,ele) + } + } + fmt.Println("len of Tonga tmep cells= ",len(tempCells)) + fmt.Println("Tonga temp cells = ", tempCells) + //var ue int64 = 1 //get no of ue connected to du(if required) //for action def 1 - for n <= int64(len(cells)) { + for n <= int64(len(tempCells)) { + //fix double length issue/empty cell sting in Glob_Ran_cell map var tmp int64 = n var lol *int64 = &tmp s := clientmodel.ActionToBeSetup{ ActionID: lol, ActionType: &actionType, - ActionDefinition: encode_action_format1(resp.GlobalNbId.PlmnId, cells[n-1],meid), + ActionDefinition: encode_action_format1(Glob_cell_Plmn[tempCells[n-1]], tempCells[n-1],meid), SubsequentAction: &clientmodel.SubsequentAction{ SubsequentActionType: &subsequentActionType, TimeToWait: &timeToWait, @@ -965,13 +984,80 @@ func (c Control) xAppStartCB(d interface{}) { ueSlice = append(ueSlice, C.GoString(v)) } ranUeKpi[nb.InventoryName]=ueSlice + fmt.Println("len of ranUeKpi= ",len(ranUeKpi)) + fmt.Println("ranUeKpi map = ", ranUeKpi) + cellSlice := make([]string, result.cellKpiSize) for _, v := range unsafe.Slice(result.cellKpi, result.cellKpiSize) { cellSlice = append(cellSlice, C.GoString(v)) } - ranCellKpi[nb.InventoryName]=cellSlice + ranCellKpi[nb.InventoryName]=cellSlice + fmt.Println("len of ranCellKpi= ",len(ranCellKpi)) + fmt.Println("ranCellKpi map = ", ranCellKpi) + /* + counter = 0 + for i := 0; i < len(resp.Gnb.NodeConfigs); i++ { + if resp.Gnb.NodeConfigs[i].E2nodeComponentInterfaceType == "f1" { + counter = i + break + } + } + + + tm := resp.Gnb.NodeConfigs[counter].E2nodeComponentRequestPart + base64Text := make([]byte, base64.StdEncoding.DecodedLen(len(tm))) + nl, _ := base64.StdEncoding.Decode(base64Text, []byte(tm)) + message := string(base64Text[:nl]) + */ + /* + cString2 := C.CString(message) + fmt.Println("Ponga = ",tm) + fmt.Println("Ponga = ",message) + defer C.free(unsafe.Pointer(cString2)) // Free the allocated C string when done + result2:=C.decodeF1apGetCellIds(cString2) + cellList:=make([]string, result2.size) + for _, v := range unsafe.Slice(result2.cellids, result2.size) { + cellList = append(cellList, C.GoString(v)) + } + plmnList:=make([]string, result2.size) + for _, v := range unsafe.Slice(result2.plmn, result2.size) { + plmnList = append(plmnList, C.GoString(v)) + } + + */ + /* + var f1ap *F1ap + fmt.Println("Ponga = ",tm) + cellList,plmnList:=f1ap.F1apGetCellIds(message) + Glob_Ran_cell[nb.InventoryName]=cellList + for i := 0; i < len(cellList); i++ { + Glob_cell_Plmn[cellList[i]]=plmnList[i] + } + */ + response, err4 := http.Get("http://localhost:8090/getdata?gnbid="+nb.InventoryName) + if err4 != nil { + fmt.Println("Error:", err4) + panic(err4) + } + defer response.Body.Close() + + var response2 APIResponse + if err5 := json.NewDecoder(response.Body).Decode(&response2); err5 != nil { + fmt.Println("Error decoding response:", err5) + panic(err5) + } + + fmt.Printf("f1apSever Response: %+v\n", response2) + + Glob_Ran_cell[nb.InventoryName]=response2.Cellids + for i := 0; i < len(response2.Cellids); i++ { + Glob_cell_Plmn[response2.Cellids[i]]=response2.PlmnIds[i] + } + + fmt.Println("len of Glob_cell_Plmn= ",len(Glob_cell_Plmn)) + fmt.Println("Glob_cell_Plmn map = ", Glob_cell_Plmn) //C.freeMemorydRanCellUeKpi(result) @@ -991,8 +1077,8 @@ func (c Control) xAppStartCB(d interface{}) { } } - fmt.Println("len of Glob_cell= ",len(Glob_cell)) - fmt.Println("Glob_cell map = ", Glob_cell) + fmt.Println("len of Glob_Ran_cell= ",len(Glob_Ran_cell)) + fmt.Println("Glob_Ran_cell map = ", Glob_Ran_cell) go c.controlLoop() //go c.queryUEReports() diff --git a/control/f1ap.go b/control/f1ap.go new file mode 100644 index 0000000..3f60f57 --- /dev/null +++ b/control/f1ap.go @@ -0,0 +1,14 @@ +package control +import( + "fmt" + //"example.com/kpimon/f1apPackage" + "example.com/kpimon/isolation" +) +type F1ap struct { +} +func (c *F1ap)F1apGetCellIds(message string)(cellList [] string,plmnList [] string){ + fmt.Println("Ponga2 = ",message) + //cellList,plmnList=f1apPackage.GetCellIdsPlmnIds(message) + cellList,plmnList=isolation.IntermediateCaller(message) + return +} diff --git a/control/types.go b/control/types.go index 688a630..f999998 100644 --- a/control/types.go +++ b/control/types.go @@ -1,6 +1,10 @@ package control const MAX_SUBSCRIPTION_ATTEMPTS = 100 +type APIResponse struct { +Cellids []string `json:"Cellids"` +PlmnIds []string `json:"PlmnIds"` +} type RanFunctions struct { RanFunctionId int RanFunctionDefinition string diff --git a/e2ap/asn1/Makefile.am.libasncodec b/e2ap/asn1/Makefile.am.libasncodec new file mode 100644 index 0000000..50cb55a --- /dev/null +++ b/e2ap/asn1/Makefile.am.libasncodec @@ -0,0 +1,483 @@ +ASN_MODULE_SRCS= \ + Criticality.c \ + Presence.c \ + ProcedureCode.c \ + ProtocolIE-ID.c \ + TriggeringMessage.c \ + ProtocolIE-Container.c \ + ProtocolIE-SingleContainer.c \ + ProtocolIE-Field.c \ + ProtocolIE-ContainerPair.c \ + ProtocolIE-FieldPair.c \ + ProtocolIE-ContainerList.c \ + ProtocolIE-ContainerPairList.c \ + E2AP-PDU.c \ + InitiatingMessage.c \ + SuccessfulOutcome.c \ + UnsuccessfulOutcome.c \ + AMFName.c \ + Cause.c \ + CauseE2node.c \ + CauseMisc.c \ + CauseProtocol.c \ + CauseRICrequest.c \ + CauseRICservice.c \ + CauseTransport.c \ + CriticalityDiagnostics.c \ + CriticalityDiagnostics-IE-List.c \ + CriticalityDiagnostics-IE-Item.c \ + E2nodeComponentConfiguration.c \ + E2nodeComponentConfigurationAck.c \ + E2nodeComponentInterfaceType.c \ + E2nodeComponentID.c \ + E2nodeComponentInterfaceE1.c \ + E2nodeComponentInterfaceF1.c \ + E2nodeComponentInterfaceNG.c \ + E2nodeComponentInterfaceS1.c \ + E2nodeComponentInterfaceX2.c \ + E2nodeComponentInterfaceXn.c \ + E2nodeComponentInterfaceW1.c \ + ENB-ID.c \ + ENB-ID-Choice.c \ + ENGNB-ID.c \ + GlobalE2node-ID.c \ + GlobalE2node-en-gNB-ID.c \ + GlobalE2node-eNB-ID.c \ + GlobalE2node-gNB-ID.c \ + GlobalE2node-ng-eNB-ID.c \ + GlobalENB-ID.c \ + GlobalenGNB-ID.c \ + GlobalgNB-ID.c \ + GlobalngeNB-ID.c \ + GlobalNG-RANNode-ID.c \ + GlobalRIC-ID.c \ + GNB-CU-UP-ID.c \ + GNB-DU-ID.c \ + GNB-ID-Choice.c \ + MMEname.c \ + NGENB-DU-ID.c \ + PLMN-Identity.c \ + RANfunctionDefinition.c \ + RANfunctionID.c \ + RANfunctionOID.c \ + RANfunctionRevision.c \ + RICactionDefinition.c \ + RICactionID.c \ + RICactionType.c \ + RICcallProcessID.c \ + RICcontrolAckRequest.c \ + RICcontrolHeader.c \ + RICcontrolMessage.c \ + RICcontrolOutcome.c \ + RICeventTriggerDefinition.c \ + RICindicationHeader.c \ + RICindicationMessage.c \ + RICindicationSN.c \ + RICindicationType.c \ + RICrequestID.c \ + RICsubsequentAction.c \ + RICsubsequentActionType.c \ + RICtimeToWait.c \ + TimeToWait.c \ + TNLinformation.c \ + TNLusage.c \ + TransactionID.c \ + TypeOfError.c \ + RICsubscriptionRequest.c \ + RICsubscriptionDetails.c \ + RICactions-ToBeSetup-List.c \ + RICaction-ToBeSetup-Item.c \ + RICsubscriptionResponse.c \ + RICaction-Admitted-List.c \ + RICaction-Admitted-Item.c \ + RICaction-NotAdmitted-List.c \ + RICaction-NotAdmitted-Item.c \ + RICsubscriptionFailure.c \ + RICsubscriptionDeleteRequest.c \ + RICsubscriptionDeleteResponse.c \ + RICsubscriptionDeleteFailure.c \ + RICsubscriptionDeleteRequired.c \ + RICsubscription-List-withCause.c \ + RICsubscription-withCause-Item.c \ + RICindication.c \ + RICcontrolRequest.c \ + RICcontrolAcknowledge.c \ + RICcontrolFailure.c \ + ErrorIndication.c \ + E2setupRequest.c \ + E2setupResponse.c \ + E2setupFailure.c \ + E2connectionUpdate.c \ + E2connectionUpdate-List.c \ + E2connectionUpdate-Item.c \ + E2connectionUpdateRemove-List.c \ + E2connectionUpdateRemove-Item.c \ + E2connectionUpdateAcknowledge.c \ + E2connectionSetupFailed-List.c \ + E2connectionSetupFailed-Item.c \ + E2connectionUpdateFailure.c \ + E2nodeConfigurationUpdate.c \ + E2nodeComponentConfigAddition-List.c \ + E2nodeComponentConfigAddition-Item.c \ + E2nodeComponentConfigUpdate-List.c \ + E2nodeComponentConfigUpdate-Item.c \ + E2nodeComponentConfigRemoval-List.c \ + E2nodeComponentConfigRemoval-Item.c \ + E2nodeTNLassociationRemoval-List.c \ + E2nodeTNLassociationRemoval-Item.c \ + E2nodeConfigurationUpdateAcknowledge.c \ + E2nodeComponentConfigAdditionAck-List.c \ + E2nodeComponentConfigAdditionAck-Item.c \ + E2nodeComponentConfigUpdateAck-List.c \ + E2nodeComponentConfigUpdateAck-Item.c \ + E2nodeComponentConfigRemovalAck-List.c \ + E2nodeComponentConfigRemovalAck-Item.c \ + E2nodeConfigurationUpdateFailure.c \ + ResetRequest.c \ + ResetResponse.c \ + RICserviceUpdate.c \ + RANfunctions-List.c \ + RANfunction-Item.c \ + RANfunctionsID-List.c \ + RANfunctionID-Item.c \ + RICserviceUpdateAcknowledge.c \ + RANfunctionsIDcause-List.c \ + RANfunctionIDcause-Item.c \ + RICserviceUpdateFailure.c \ + RICserviceQuery.c \ + EXTERNAL.c + +ASN_MODULE_HDRS= \ + Criticality.h \ + Presence.h \ + ProcedureCode.h \ + ProtocolIE-ID.h \ + TriggeringMessage.h \ + ProtocolIE-Container.h \ + ProtocolIE-SingleContainer.h \ + ProtocolIE-Field.h \ + ProtocolIE-ContainerPair.h \ + ProtocolIE-FieldPair.h \ + ProtocolIE-ContainerList.h \ + ProtocolIE-ContainerPairList.h \ + E2AP-PDU.h \ + InitiatingMessage.h \ + SuccessfulOutcome.h \ + UnsuccessfulOutcome.h \ + AMFName.h \ + Cause.h \ + CauseE2node.h \ + CauseMisc.h \ + CauseProtocol.h \ + CauseRICrequest.h \ + CauseRICservice.h \ + CauseTransport.h \ + CriticalityDiagnostics.h \ + CriticalityDiagnostics-IE-List.h \ + CriticalityDiagnostics-IE-Item.h \ + E2nodeComponentConfiguration.h \ + E2nodeComponentConfigurationAck.h \ + E2nodeComponentInterfaceType.h \ + E2nodeComponentID.h \ + E2nodeComponentInterfaceE1.h \ + E2nodeComponentInterfaceF1.h \ + E2nodeComponentInterfaceNG.h \ + E2nodeComponentInterfaceS1.h \ + E2nodeComponentInterfaceX2.h \ + E2nodeComponentInterfaceXn.h \ + E2nodeComponentInterfaceW1.h \ + ENB-ID.h \ + ENB-ID-Choice.h \ + ENGNB-ID.h \ + GlobalE2node-ID.h \ + GlobalE2node-en-gNB-ID.h \ + GlobalE2node-eNB-ID.h \ + GlobalE2node-gNB-ID.h \ + GlobalE2node-ng-eNB-ID.h \ + GlobalENB-ID.h \ + GlobalenGNB-ID.h \ + GlobalgNB-ID.h \ + GlobalngeNB-ID.h \ + GlobalNG-RANNode-ID.h \ + GlobalRIC-ID.h \ + GNB-CU-UP-ID.h \ + GNB-DU-ID.h \ + GNB-ID-Choice.h \ + MMEname.h \ + NGENB-DU-ID.h \ + PLMN-Identity.h \ + RANfunctionDefinition.h \ + RANfunctionID.h \ + RANfunctionOID.h \ + RANfunctionRevision.h \ + RICactionDefinition.h \ + RICactionID.h \ + RICactionType.h \ + RICcallProcessID.h \ + RICcontrolAckRequest.h \ + RICcontrolHeader.h \ + RICcontrolMessage.h \ + RICcontrolOutcome.h \ + RICeventTriggerDefinition.h \ + RICindicationHeader.h \ + RICindicationMessage.h \ + RICindicationSN.h \ + RICindicationType.h \ + RICrequestID.h \ + RICsubsequentAction.h \ + RICsubsequentActionType.h \ + RICtimeToWait.h \ + TimeToWait.h \ + TNLinformation.h \ + TNLusage.h \ + TransactionID.h \ + TypeOfError.h \ + RICsubscriptionRequest.h \ + RICsubscriptionDetails.h \ + RICactions-ToBeSetup-List.h \ + RICaction-ToBeSetup-Item.h \ + RICsubscriptionResponse.h \ + RICaction-Admitted-List.h \ + RICaction-Admitted-Item.h \ + RICaction-NotAdmitted-List.h \ + RICaction-NotAdmitted-Item.h \ + RICsubscriptionFailure.h \ + RICsubscriptionDeleteRequest.h \ + RICsubscriptionDeleteResponse.h \ + RICsubscriptionDeleteFailure.h \ + RICsubscriptionDeleteRequired.h \ + RICsubscription-List-withCause.h \ + RICsubscription-withCause-Item.h \ + RICindication.h \ + RICcontrolRequest.h \ + RICcontrolAcknowledge.h \ + RICcontrolFailure.h \ + ErrorIndication.h \ + E2setupRequest.h \ + E2setupResponse.h \ + E2setupFailure.h \ + E2connectionUpdate.h \ + E2connectionUpdate-List.h \ + E2connectionUpdate-Item.h \ + E2connectionUpdateRemove-List.h \ + E2connectionUpdateRemove-Item.h \ + E2connectionUpdateAcknowledge.h \ + E2connectionSetupFailed-List.h \ + E2connectionSetupFailed-Item.h \ + E2connectionUpdateFailure.h \ + E2nodeConfigurationUpdate.h \ + E2nodeComponentConfigAddition-List.h \ + E2nodeComponentConfigAddition-Item.h \ + E2nodeComponentConfigUpdate-List.h \ + E2nodeComponentConfigUpdate-Item.h \ + E2nodeComponentConfigRemoval-List.h \ + E2nodeComponentConfigRemoval-Item.h \ + E2nodeTNLassociationRemoval-List.h \ + E2nodeTNLassociationRemoval-Item.h \ + E2nodeConfigurationUpdateAcknowledge.h \ + E2nodeComponentConfigAdditionAck-List.h \ + E2nodeComponentConfigAdditionAck-Item.h \ + E2nodeComponentConfigUpdateAck-List.h \ + E2nodeComponentConfigUpdateAck-Item.h \ + E2nodeComponentConfigRemovalAck-List.h \ + E2nodeComponentConfigRemovalAck-Item.h \ + E2nodeConfigurationUpdateFailure.h \ + ResetRequest.h \ + ResetResponse.h \ + RICserviceUpdate.h \ + RANfunctions-List.h \ + RANfunction-Item.h \ + RANfunctionsID-List.h \ + RANfunctionID-Item.h \ + RICserviceUpdateAcknowledge.h \ + RANfunctionsIDcause-List.h \ + RANfunctionIDcause-Item.h \ + RICserviceUpdateFailure.h \ + RICserviceQuery.h \ + EXTERNAL.h + +ASN_MODULE_HDRS+=ANY.h +ASN_MODULE_SRCS+=ANY.c +ASN_MODULE_HDRS+=OCTET_STRING.h +ASN_MODULE_HDRS+=OPEN_TYPE.h +ASN_MODULE_SRCS+=OPEN_TYPE.c +ASN_MODULE_HDRS+=constr_CHOICE.h +ASN_MODULE_HDRS+=GraphicString.h +ASN_MODULE_SRCS+=GraphicString.c +ASN_MODULE_HDRS+=INTEGER.h +ASN_MODULE_SRCS+=INTEGER.c +ASN_MODULE_HDRS+=NativeEnumerated.h +ASN_MODULE_SRCS+=NativeEnumerated.c +ASN_MODULE_HDRS+=NativeInteger.h +ASN_MODULE_SRCS+=NativeInteger.c +ASN_MODULE_HDRS+=OBJECT_IDENTIFIER.h +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER.c +ASN_MODULE_HDRS+=asn_codecs_prim.h +ASN_MODULE_HDRS+=ObjectDescriptor.h +ASN_MODULE_SRCS+=ObjectDescriptor.c +ASN_MODULE_HDRS+=PrintableString.h +ASN_MODULE_SRCS+=PrintableString.c +ASN_MODULE_HDRS+=asn_SEQUENCE_OF.h +ASN_MODULE_SRCS+=asn_SEQUENCE_OF.c +ASN_MODULE_HDRS+=asn_SET_OF.h +ASN_MODULE_SRCS+=asn_SET_OF.c +ASN_MODULE_SRCS+=constr_CHOICE.c +ASN_MODULE_HDRS+=constr_SEQUENCE.h +ASN_MODULE_SRCS+=constr_SEQUENCE.c +ASN_MODULE_HDRS+=constr_SEQUENCE_OF.h +ASN_MODULE_SRCS+=constr_SEQUENCE_OF.c +ASN_MODULE_HDRS+=constr_SET_OF.h +ASN_MODULE_SRCS+=constr_SET_OF.c +ASN_MODULE_HDRS+=asn_application.h +ASN_MODULE_SRCS+=asn_application.c +ASN_MODULE_HDRS+=asn_ioc.h +ASN_MODULE_HDRS+=asn_system.h +ASN_MODULE_HDRS+=asn_codecs.h +ASN_MODULE_HDRS+=asn_internal.h +ASN_MODULE_SRCS+=asn_internal.c +ASN_MODULE_HDRS+=asn_bit_data.h +ASN_MODULE_SRCS+=asn_bit_data.c +ASN_MODULE_SRCS+=OCTET_STRING.c +ASN_MODULE_HDRS+=BIT_STRING.h +ASN_MODULE_SRCS+=BIT_STRING.c +ASN_MODULE_SRCS+=asn_codecs_prim.c +ASN_MODULE_HDRS+=ber_tlv_length.h +ASN_MODULE_SRCS+=ber_tlv_length.c +ASN_MODULE_HDRS+=ber_tlv_tag.h +ASN_MODULE_SRCS+=ber_tlv_tag.c +ASN_MODULE_HDRS+=constr_TYPE.h +ASN_MODULE_SRCS+=constr_TYPE.c +ASN_MODULE_HDRS+=constraints.h +ASN_MODULE_SRCS+=constraints.c +ASN_MODULE_HDRS+=ber_decoder.h +ASN_MODULE_HDRS+=der_encoder.h +ASN_MODULE_SRCS+=ber_decoder.c +ASN_MODULE_SRCS+=der_encoder.c +ASN_MODULE_SRCS+=ANY_ber.c +ASN_MODULE_SRCS+=INTEGER_ber.c +ASN_MODULE_SRCS+=NativeInteger_ber.c +ASN_MODULE_SRCS+=OCTET_STRING_ber.c +ASN_MODULE_SRCS+=OPEN_TYPE_ber.c +ASN_MODULE_SRCS+=asn_codecs_prim_ber.c +ASN_MODULE_SRCS+=constr_CHOICE_ber.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_ber.c +ASN_MODULE_SRCS+=constr_SEQUENCE_ber.c +ASN_MODULE_SRCS+=constr_SET_OF_ber.c +ASN_MODULE_HDRS+=xer_support.h +ASN_MODULE_HDRS+=xer_decoder.h +ASN_MODULE_HDRS+=xer_encoder.h +ASN_MODULE_SRCS+=xer_support.c +ASN_MODULE_SRCS+=xer_decoder.c +ASN_MODULE_SRCS+=xer_encoder.c +ASN_MODULE_SRCS+=ANY_xer.c +ASN_MODULE_SRCS+=BIT_STRING_xer.c +ASN_MODULE_SRCS+=INTEGER_xer.c +ASN_MODULE_SRCS+=NativeEnumerated_xer.c +ASN_MODULE_SRCS+=NativeInteger_xer.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_xer.c +ASN_MODULE_SRCS+=OCTET_STRING_xer.c +ASN_MODULE_SRCS+=OPEN_TYPE_xer.c +ASN_MODULE_SRCS+=asn_codecs_prim_xer.c +ASN_MODULE_SRCS+=constr_CHOICE_xer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_xer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_xer.c +ASN_MODULE_SRCS+=constr_SET_OF_xer.c +ASN_MODULE_HDRS+=oer_decoder.h +ASN_MODULE_HDRS+=oer_encoder.h +ASN_MODULE_HDRS+=oer_support.h +ASN_MODULE_SRCS+=oer_decoder.c +ASN_MODULE_SRCS+=oer_encoder.c +ASN_MODULE_SRCS+=oer_support.c +ASN_MODULE_SRCS+=OPEN_TYPE_oer.c +ASN_MODULE_SRCS+=INTEGER_oer.c +ASN_MODULE_SRCS+=BIT_STRING_oer.c +ASN_MODULE_SRCS+=OCTET_STRING_oer.c +ASN_MODULE_SRCS+=NativeInteger_oer.c +ASN_MODULE_SRCS+=NativeEnumerated_oer.c +ASN_MODULE_SRCS+=constr_CHOICE_oer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_oer.c +ASN_MODULE_SRCS+=constr_SET_OF_oer.c +ASN_MODULE_HDRS+=per_decoder.h +ASN_MODULE_HDRS+=per_encoder.h +ASN_MODULE_HDRS+=per_support.h +ASN_MODULE_HDRS+=per_opentype.h +ASN_MODULE_SRCS+=per_decoder.c +ASN_MODULE_SRCS+=per_encoder.c +ASN_MODULE_SRCS+=per_support.c +ASN_MODULE_SRCS+=per_opentype.c +ASN_MODULE_HDRS+=uper_decoder.h +ASN_MODULE_HDRS+=uper_encoder.h +ASN_MODULE_HDRS+=uper_support.h +ASN_MODULE_HDRS+=uper_opentype.h +ASN_MODULE_SRCS+=uper_decoder.c +ASN_MODULE_SRCS+=uper_encoder.c +ASN_MODULE_SRCS+=uper_support.c +ASN_MODULE_SRCS+=uper_opentype.c +ASN_MODULE_SRCS+=ANY_uper.c +ASN_MODULE_SRCS+=BIT_STRING_uper.c +ASN_MODULE_SRCS+=INTEGER_uper.c +ASN_MODULE_SRCS+=NativeEnumerated_uper.c +ASN_MODULE_SRCS+=NativeInteger_uper.c +ASN_MODULE_SRCS+=OCTET_STRING_uper.c +ASN_MODULE_SRCS+=OPEN_TYPE_uper.c +ASN_MODULE_SRCS+=constr_CHOICE_uper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_uper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_uper.c +ASN_MODULE_SRCS+=constr_SET_OF_uper.c +ASN_MODULE_HDRS+=aper_decoder.h +ASN_MODULE_HDRS+=aper_encoder.h +ASN_MODULE_HDRS+=aper_support.h +ASN_MODULE_HDRS+=aper_opentype.h +ASN_MODULE_SRCS+=aper_decoder.c +ASN_MODULE_SRCS+=aper_encoder.c +ASN_MODULE_SRCS+=aper_support.c +ASN_MODULE_SRCS+=aper_opentype.c +ASN_MODULE_SRCS+=ANY_aper.c +ASN_MODULE_SRCS+=INTEGER_aper.c +ASN_MODULE_SRCS+=NativeEnumerated_aper.c +ASN_MODULE_SRCS+=NativeInteger_aper.c +ASN_MODULE_SRCS+=OCTET_STRING_aper.c +ASN_MODULE_SRCS+=OPEN_TYPE_aper.c +ASN_MODULE_SRCS+=constr_CHOICE_aper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_aper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_aper.c +ASN_MODULE_SRCS+=constr_SET_OF_aper.c +ASN_MODULE_SRCS+=BIT_STRING_print.c +ASN_MODULE_SRCS+=INTEGER_print.c +ASN_MODULE_SRCS+=NativeInteger_print.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_print.c +ASN_MODULE_SRCS+=OCTET_STRING_print.c +ASN_MODULE_SRCS+=constr_CHOICE_print.c +ASN_MODULE_SRCS+=constr_SEQUENCE_print.c +ASN_MODULE_SRCS+=constr_SET_OF_print.c +ASN_MODULE_HDRS+=asn_random_fill.h +ASN_MODULE_SRCS+=asn_random_fill.c +ASN_MODULE_SRCS+=BIT_STRING_rfill.c +ASN_MODULE_SRCS+=INTEGER_rfill.c +ASN_MODULE_SRCS+=NativeInteger_rfill.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_rfill.c +ASN_MODULE_SRCS+=OCTET_STRING_rfill.c +ASN_MODULE_SRCS+=constr_CHOICE_rfill.c +ASN_MODULE_SRCS+=constr_SEQUENCE_rfill.c +ASN_MODULE_SRCS+=constr_SET_OF_rfill.c +ASN_MODULE_HDRS+=jer_encoder.h +ASN_MODULE_SRCS+=jer_encoder.c +ASN_MODULE_SRCS+=ANY_jer.c +ASN_MODULE_SRCS+=BIT_STRING_jer.c +ASN_MODULE_SRCS+=INTEGER_jer.c +ASN_MODULE_SRCS+=NativeEnumerated_jer.c +ASN_MODULE_SRCS+=NativeInteger_jer.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_jer.c +ASN_MODULE_SRCS+=OCTET_STRING_jer.c +ASN_MODULE_SRCS+=constr_CHOICE_jer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_jer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_jer.c +ASN_MODULE_SRCS+=constr_SET_OF_jer.c + +ASN_MODULE_CFLAGS= + +lib_LTLIBRARIES+=libasncodec.la +libasncodec_la_SOURCES=$(ASN_MODULE_SRCS) $(ASN_MODULE_HDRS) +libasncodec_la_CPPFLAGS=-I$(top_srcdir)/ +libasncodec_la_CFLAGS=$(ASN_MODULE_CFLAGS) +libasncodec_la_LDFLAGS=-lm diff --git a/e2ap/asn1/commonDefinition.asn b/e2ap/asn1/commonDefinition.asn new file mode 100644 index 0000000..92f7bf9 --- /dev/null +++ b/e2ap/asn1/commonDefinition.asn @@ -0,0 +1,28 @@ +-- ASN1START +-- ************************************************************** +-- +-- Common definitions +-- Derived from 3GPP 38.413 (NGAP) +-- +-- ************************************************************** + +E2AP-CommonDataTypes { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53148 e2(1) version2 (2) e2ap(1) e2ap-CommonDataTypes (3) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +Criticality ::= ENUMERATED { reject, ignore, notify } + +Presence ::= ENUMERATED { optional, conditional, mandatory } + +ProcedureCode ::= INTEGER (0..255) + +ProtocolIE-ID ::= INTEGER (0..65535) + +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome } + +END +-- ASN1STOP + diff --git a/e2ap/asn1/constantDefinition.asn b/e2ap/asn1/constantDefinition.asn new file mode 100644 index 0000000..6d50677 --- /dev/null +++ b/e2ap/asn1/constantDefinition.asn @@ -0,0 +1,127 @@ +-- ASN1START +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** + +E2AP-Constants { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53148 e2(1) version2 (2) e2ap(1) e2ap-Constants (4) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + ProcedureCode, + ProtocolIE-ID +FROM E2AP-CommonDataTypes; + +-- ************************************************************** +-- +-- Elementary Procedures +-- +-- ************************************************************** +id-E2setup ProcedureCode ::= 1 +id-ErrorIndication ProcedureCode ::= 2 +id-Reset ProcedureCode ::= 3 +id-RICcontrol ProcedureCode ::= 4 +id-RICindication ProcedureCode ::= 5 +id-RICserviceQuery ProcedureCode ::= 6 +id-RICserviceUpdate ProcedureCode ::= 7 +id-RICsubscription ProcedureCode ::= 8 +id-RICsubscriptionDelete ProcedureCode ::= 9 +id-E2nodeConfigurationUpdate ProcedureCode ::= 10 +id-E2connectionUpdate ProcedureCode ::= 11 +id-RICsubscriptionDeleteRequired ProcedureCode ::= 12 + +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** + +maxProtocolIEs INTEGER ::= 65535 + + +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** +maxnoofErrors INTEGER ::= 256 +maxofE2nodeComponents INTEGER ::= 1024 +maxofRANfunctionID INTEGER ::= 256 +maxofRICactionID INTEGER ::= 16 +maxofTNLA INTEGER ::= 32 +maxofRICrequestID INTEGER ::= 4294967295 + + +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** +id-Cause ProtocolIE-ID ::= 1 +id-CriticalityDiagnostics ProtocolIE-ID ::= 2 +id-GlobalE2node-ID ProtocolIE-ID ::= 3 +id-GlobalRIC-ID ProtocolIE-ID ::= 4 +id-RANfunctionID ProtocolIE-ID ::= 5 +id-RANfunctionID-Item ProtocolIE-ID ::= 6 +id-RANfunctionIEcause-Item ProtocolIE-ID ::= 7 +id-RANfunction-Item ProtocolIE-ID ::= 8 +id-RANfunctionsAccepted ProtocolIE-ID ::= 9 +id-RANfunctionsAdded ProtocolIE-ID ::= 10 +id-RANfunctionsDeleted ProtocolIE-ID ::= 11 +id-RANfunctionsModified ProtocolIE-ID ::= 12 +id-RANfunctionsRejected ProtocolIE-ID ::= 13 +id-RICaction-Admitted-Item ProtocolIE-ID ::= 14 +id-RICactionID ProtocolIE-ID ::= 15 +id-RICaction-NotAdmitted-Item ProtocolIE-ID ::= 16 +id-RICactions-Admitted ProtocolIE-ID ::= 17 +id-RICactions-NotAdmitted ProtocolIE-ID ::= 18 +id-RICaction-ToBeSetup-Item ProtocolIE-ID ::= 19 +id-RICcallProcessID ProtocolIE-ID ::= 20 +id-RICcontrolAckRequest ProtocolIE-ID ::= 21 +id-RICcontrolHeader ProtocolIE-ID ::= 22 +id-RICcontrolMessage ProtocolIE-ID ::= 23 +id-RICcontrolStatus ProtocolIE-ID ::= 24 +id-RICindicationHeader ProtocolIE-ID ::= 25 +id-RICindicationMessage ProtocolIE-ID ::= 26 +id-RICindicationSN ProtocolIE-ID ::= 27 +id-RICindicationType ProtocolIE-ID ::= 28 +id-RICrequestID ProtocolIE-ID ::= 29 +id-RICsubscriptionDetails ProtocolIE-ID ::= 30 +id-TimeToWait ProtocolIE-ID ::= 31 +id-RICcontrolOutcome ProtocolIE-ID ::= 32 +id-E2nodeComponentConfigUpdate ProtocolIE-ID ::= 33 +id-E2nodeComponentConfigUpdate-Item ProtocolIE-ID ::= 34 +id-E2nodeComponentConfigUpdateAck ProtocolIE-ID ::= 35 +id-E2nodeComponentConfigUpdateAck-Item ProtocolIE-ID ::= 36 +id-E2connectionSetup ProtocolIE-ID ::= 39 +id-E2connectionSetupFailed ProtocolIE-ID ::= 40 +id-E2connectionSetupFailed-Item ProtocolIE-ID ::= 41 +id-E2connectionFailed-Item ProtocolIE-ID ::= 42 +id-E2connectionUpdate-Item ProtocolIE-ID ::= 43 +id-E2connectionUpdateAdd ProtocolIE-ID ::= 44 +id-E2connectionUpdateModify ProtocolIE-ID ::= 45 +id-E2connectionUpdateRemove ProtocolIE-ID ::= 46 +id-E2connectionUpdateRemove-Item ProtocolIE-ID ::= 47 +id-TNLinformation ProtocolIE-ID ::= 48 +id-TransactionID ProtocolIE-ID ::= 49 +id-E2nodeComponentConfigAddition ProtocolIE-ID ::= 50 +id-E2nodeComponentConfigAddition-Item ProtocolIE-ID ::= 51 +id-E2nodeComponentConfigAdditionAck ProtocolIE-ID ::= 52 +id-E2nodeComponentConfigAdditionAck-Item ProtocolIE-ID ::= 53 +id-E2nodeComponentConfigRemoval ProtocolIE-ID ::= 54 +id-E2nodeComponentConfigRemoval-Item ProtocolIE-ID ::= 55 +id-E2nodeComponentConfigRemovalAck ProtocolIE-ID ::= 56 +id-E2nodeComponentConfigRemovalAck-Item ProtocolIE-ID ::= 57 +id-E2nodeTNLassociationRemoval ProtocolIE-ID ::= 58 +id-E2nodeTNLassociationRemoval-Item ProtocolIE-ID ::= 59 +id-RICsubscriptionToBeRemoved ProtocolIE-ID ::= 50 +id-RICsubscription-withCause-Item ProtocolIE-ID ::= 51 + +END +-- ASN1STOP + diff --git a/e2ap/asn1/containerDefinition.asn b/e2ap/asn1/containerDefinition.asn new file mode 100644 index 0000000..8c25930 --- /dev/null +++ b/e2ap/asn1/containerDefinition.asn @@ -0,0 +1,131 @@ +-- ASN1START +-- ************************************************************** +-- +-- Container definitions +-- +-- derived from 3GPP 38.413 (NGAP) +-- ************************************************************** + +E2AP-Containers { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53148 e2(1) version2 (2) e2ap(1) e2ap-Containers (5) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + + Criticality, + Presence, + ProtocolIE-ID +FROM E2AP-CommonDataTypes + + maxProtocolIEs +FROM E2AP-Constants; + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +E2AP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +E2AP-PROTOCOL-IES-PAIR ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &firstCriticality Criticality, + &FirstValue, + &secondCriticality Criticality, + &SecondValue, + &presence Presence +} +WITH SYNTAX { + ID &id + FIRST CRITICALITY &firstCriticality + FIRST TYPE &FirstValue + SECOND CRITICALITY &secondCriticality + SECOND TYPE &SecondValue + PRESENCE &presence +} + + + + +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** + +ProtocolIE-Container {E2AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-SingleContainer {E2AP-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Field {E2AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id E2AP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality E2AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value E2AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol IE Pairs +-- +-- ************************************************************** + +ProtocolIE-ContainerPair {E2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-FieldPair {{IEsSetParam}} + +ProtocolIE-FieldPair {E2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE { + id E2AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}), + firstCriticality E2AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}), + firstValue E2AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}), + secondCriticality E2AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}), + secondValue E2AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container Lists for Protocol IE Containers +-- +-- ************************************************************** + +ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, E2AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-SingleContainer {{IEsSetParam}} + +ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, E2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-ContainerPair {{IEsSetParam}} + + +END +-- ASN1STOP + diff --git a/e2ap/asn1/elementryProcedureDefinition.asn b/e2ap/asn1/elementryProcedureDefinition.asn new file mode 100644 index 0000000..a52523d --- /dev/null +++ b/e2ap/asn1/elementryProcedureDefinition.asn @@ -0,0 +1,252 @@ +-- ASN1START +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- Derived from 3GPP 38.413 v15.4.0 NGAP +-- ************************************************************** + +E2AP-PDU-Descriptions { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53148 e2(1) version2 (2) e2ap(1) e2ap-PDU-Descriptions (0) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + ProcedureCode +FROM E2AP-CommonDataTypes + + + + E2connectionUpdate, + E2connectionUpdateAcknowledge, + E2connectionUpdateFailure, + E2nodeConfigurationUpdate, + E2nodeConfigurationUpdateAcknowledge, + E2nodeConfigurationUpdateFailure, + E2setupFailure, + E2setupRequest, + E2setupResponse, + ErrorIndication, + ResetRequest, + ResetResponse, + RICcontrolAcknowledge, + RICcontrolFailure, + RICcontrolRequest, + RICindication, + RICserviceQuery, + RICserviceUpdate, + RICserviceUpdateAcknowledge, + RICserviceUpdateFailure, + RICsubscriptionFailure, + RICsubscriptionRequest, + RICsubscriptionResponse, + RICsubscriptionDeleteFailure, + RICsubscriptionDeleteRequest, + RICsubscriptionDeleteResponse, + RICsubscriptionDeleteRequired +FROM E2AP-PDU-Contents + + id-E2connectionUpdate, + id-E2nodeConfigurationUpdate, + id-E2setup, + id-ErrorIndication, + id-Reset, + id-RICcontrol, + id-RICindication, + id-RICserviceQuery, + id-RICserviceUpdate, + id-RICsubscription, + id-RICsubscriptionDelete, + id-RICsubscriptionDeleteRequired +FROM E2AP-Constants; + +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** + +E2AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL , + &UnsuccessfulOutcome OPTIONAL , + &procedureCode ProcedureCode UNIQUE , + &criticality Criticality DEFAULT ignore +} + +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} + +-- ************************************************************** +-- +-- Interface PDU Definition +-- +-- ************************************************************** + +E2AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} + +InitiatingMessage ::= SEQUENCE { + procedureCode E2AP-ELEMENTARY-PROCEDURE.&procedureCode ({E2AP-ELEMENTARY-PROCEDURES}), + criticality E2AP-ELEMENTARY-PROCEDURE.&criticality ({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value E2AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +SuccessfulOutcome ::= SEQUENCE { + procedureCode E2AP-ELEMENTARY-PROCEDURE.&procedureCode ({E2AP-ELEMENTARY-PROCEDURES}), + criticality E2AP-ELEMENTARY-PROCEDURE.&criticality ({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value E2AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode E2AP-ELEMENTARY-PROCEDURE.&procedureCode ({E2AP-ELEMENTARY-PROCEDURES}), + criticality E2AP-ELEMENTARY-PROCEDURE.&criticality ({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value E2AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** + +E2AP-ELEMENTARY-PROCEDURES E2AP-ELEMENTARY-PROCEDURE ::= { + E2AP-ELEMENTARY-PROCEDURES-CLASS-1 | + E2AP-ELEMENTARY-PROCEDURES-CLASS-2, + ... +} + +E2AP-ELEMENTARY-PROCEDURES-CLASS-1 E2AP-ELEMENTARY-PROCEDURE ::= { + ricSubscription | + ricSubscriptionDelete | + ricServiceUpdate | + ricControl | + e2setup | + e2nodeConfigurationUpdate | + e2connectionUpdate | + reset, + ... +} + +E2AP-ELEMENTARY-PROCEDURES-CLASS-2 E2AP-ELEMENTARY-PROCEDURE ::= { + ricIndication | + ricServiceQuery | + errorIndication | + ricSubscriptionDeleteRequired, + ... +} + +-- ************************************************************** +-- +-- Interface Elementary Procedures +-- +-- ************************************************************** + +-- New for v01.01 +e2connectionUpdate E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E2connectionUpdate + SUCCESSFUL OUTCOME E2connectionUpdateAcknowledge + UNSUCCESSFUL OUTCOME E2connectionUpdateFailure + PROCEDURE CODE id-E2connectionUpdate + CRITICALITY reject +} + +e2nodeConfigurationUpdate E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E2nodeConfigurationUpdate + SUCCESSFUL OUTCOME E2nodeConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME E2nodeConfigurationUpdateFailure + PROCEDURE CODE id-E2nodeConfigurationUpdate + CRITICALITY reject +} + +e2setup E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E2setupRequest + SUCCESSFUL OUTCOME E2setupResponse + UNSUCCESSFUL OUTCOME E2setupFailure + PROCEDURE CODE id-E2setup + CRITICALITY reject +} + +errorIndication E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ErrorIndication + PROCEDURE CODE id-ErrorIndication + CRITICALITY ignore +} + +reset E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResetRequest + SUCCESSFUL OUTCOME ResetResponse + PROCEDURE CODE id-Reset + CRITICALITY reject +} + +ricControl E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RICcontrolRequest + SUCCESSFUL OUTCOME RICcontrolAcknowledge + UNSUCCESSFUL OUTCOME RICcontrolFailure + PROCEDURE CODE id-RICcontrol + CRITICALITY reject +} + +ricIndication E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RICindication + PROCEDURE CODE id-RICindication + CRITICALITY ignore +} + +ricServiceQuery E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RICserviceQuery + PROCEDURE CODE id-RICserviceQuery + CRITICALITY ignore +} + +ricServiceUpdate E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RICserviceUpdate + SUCCESSFUL OUTCOME RICserviceUpdateAcknowledge + UNSUCCESSFUL OUTCOME RICserviceUpdateFailure + PROCEDURE CODE id-RICserviceUpdate + CRITICALITY reject +} + +ricSubscription E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RICsubscriptionRequest + SUCCESSFUL OUTCOME RICsubscriptionResponse + UNSUCCESSFUL OUTCOME RICsubscriptionFailure + PROCEDURE CODE id-RICsubscription + CRITICALITY reject +} + +ricSubscriptionDelete E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RICsubscriptionDeleteRequest + SUCCESSFUL OUTCOME RICsubscriptionDeleteResponse + UNSUCCESSFUL OUTCOME RICsubscriptionDeleteFailure + PROCEDURE CODE id-RICsubscriptionDelete + CRITICALITY reject +} + +ricSubscriptionDeleteRequired E2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RICsubscriptionDeleteRequired + PROCEDURE CODE id-RICsubscriptionDeleteRequired + CRITICALITY ignore +} + +END +-- ASN1STOP + diff --git a/e2ap/asn1/informationElementDefinition.asn b/e2ap/asn1/informationElementDefinition.asn new file mode 100644 index 0000000..350ff74 --- /dev/null +++ b/e2ap/asn1/informationElementDefinition.asn @@ -0,0 +1,496 @@ +-- ASN1START +-- ************************************************************** +-- E2AP +-- Information Element Definitions +-- +-- ************************************************************** + +E2AP-IEs { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53148 e2(1) version2 (2) e2ap(1) e2ap-IEs (2)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + Criticality, + Presence, + ProcedureCode, + ProtocolIE-ID, + TriggeringMessage +FROM E2AP-CommonDataTypes + + maxnoofErrors, + maxProtocolIEs +FROM E2AP-Constants; + +-- A + +-- ************************************************************** +-- [New for E2AP v02.00] copied from 3GPP 38.413 (NGAP) IEs +-- ************************************************************** +AMFName ::= PrintableString (SIZE(1..150, ...)) + +-- B +-- C +Cause ::= CHOICE { + ricRequest CauseRICrequest, + ricService CauseRICservice, + e2Node CauseE2node, + transport CauseTransport, + protocol CauseProtocol, + misc CauseMisc, + ... +} + +CauseE2node ::= ENUMERATED { + e2node-component-unknown, + ... +} + +CauseMisc ::= ENUMERATED { + control-processing-overload, + hardware-failure, + om-intervention, + unspecified, + ... +} + +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + abstract-syntax-error-falsely-constructed-message, + unspecified, + ... +} + +CauseRICrequest ::= ENUMERATED { + ran-function-id-invalid, + action-not-supported, + excessive-actions, + duplicate-action, + duplicate-event-trigger, + function-resource-limit, + request-id-unknown, + inconsistent-action-subsequent-action-sequence, + control-message-invalid, + ric-call-process-id-invalid, + control-timer-expired, + control-failed-to-execute, + system-not-ready, + unspecified, + ... +} + +CauseRICservice ::= ENUMERATED{ + ran-function-not-supported, + excessive-functions, + ric-resource-limit, + ... +} +CauseTransport ::= ENUMERATED { + unspecified, + transport-resource-unavailable, + ... +} + +-- ************************************************************** +-- copied from 3GPP 38.413 (NGAP) IEs +-- note: ie-Extensions removed +-- ************************************************************** +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + ricRequestorID RICrequestID OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + ... +} + +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE(1..maxnoofErrors)) OF CriticalityDiagnostics-IE-Item + +CriticalityDiagnostics-IE-Item ::= SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + ... +} + +-- D +-- E + +-- Following IE used to carry 3GPP defined SETUP and RAN Configuration messages defined in F1AP, E1AP, XnAP, etc. +E2nodeComponentConfiguration ::= SEQUENCE{ + e2nodeComponentRequestPart OCTET STRING, + e2nodeComponentResponsePart OCTET STRING, + ... +} + +E2nodeComponentConfigurationAck ::= SEQUENCE{ + updateOutcome ENUMERATED {success, failure, ...}, + failureCause Cause OPTIONAL, + ... +} + +E2nodeComponentInterfaceType ::= ENUMERATED {ng, xn, e1, f1, w1, s1, x2,...} + +E2nodeComponentID ::= CHOICE{ + e2nodeComponentInterfaceTypeNG E2nodeComponentInterfaceNG, + e2nodeComponentInterfaceTypeXn E2nodeComponentInterfaceXn, + e2nodeComponentInterfaceTypeE1 E2nodeComponentInterfaceE1, + e2nodeComponentInterfaceTypeF1 E2nodeComponentInterfaceF1, + e2nodeComponentInterfaceTypeW1 E2nodeComponentInterfaceW1, + e2nodeComponentInterfaceTypeS1 E2nodeComponentInterfaceS1, + e2nodeComponentInterfaceTypeX2 E2nodeComponentInterfaceX2, + ... +} + +E2nodeComponentInterfaceE1 ::= SEQUENCE{ + gNB-CU-CP-ID GNB-CU-UP-ID, + ... +} + +E2nodeComponentInterfaceF1 ::= SEQUENCE{ + gNB-DU-ID GNB-DU-ID, + ... +} + +E2nodeComponentInterfaceNG ::= SEQUENCE{ + amf-name AMFName, + ... +} + +E2nodeComponentInterfaceS1 ::= SEQUENCE{ + mme-name MMEname, + ... +} + +E2nodeComponentInterfaceX2 ::= SEQUENCE{ + global-eNB-ID GlobalENB-ID OPTIONAL, + global-en-gNB-ID GlobalenGNB-ID OPTIONAL, + ... +} + +E2nodeComponentInterfaceXn ::= SEQUENCE{ + global-NG-RAN-Node-ID GlobalNG-RANNode-ID, + ... +} + +E2nodeComponentInterfaceW1 ::= SEQUENCE{ + ng-eNB-DU-ID NGENB-DU-ID, + ... +} + +-- ************************************************************** +-- copied from 3GPP 36.423 (X2AP) IEs +-- note: ie-Extensions removed +-- ************************************************************** +ENB-ID ::= CHOICE { + macro-eNB-ID BIT STRING (SIZE (20)), + home-eNB-ID BIT STRING (SIZE (28)), + ... , + short-Macro-eNB-ID BIT STRING (SIZE(18)), + long-Macro-eNB-ID BIT STRING (SIZE(21)) +} +-- ************************************************************** +-- copied from 3GPP 38.423 (XnAP) IEs +-- ************************************************************** +ENB-ID-Choice ::= CHOICE { + enb-ID-macro BIT STRING (SIZE(20)), + enb-ID-shortmacro BIT STRING (SIZE(18)), + enb-ID-longmacro BIT STRING (SIZE(21)), + ... +} + +-- ************************************************************** +-- copied from 3GPP 36.423 (X2AP) IEs +-- note: ie-Extensions removed +-- Note: to avoid duplicate names with XnAP, GNB-ID renamed ENGNB-ID, GlobalGNB-ID renamed GlobalenGNB-ID +-- ************************************************************** +ENGNB-ID ::= CHOICE { + gNB-ID BIT STRING (SIZE (22..32)), + ... +} + +-- F +-- G +GlobalE2node-ID ::= CHOICE{ + gNB GlobalE2node-gNB-ID, + en-gNB GlobalE2node-en-gNB-ID, + ng-eNB GlobalE2node-ng-eNB-ID, + eNB GlobalE2node-eNB-ID, + ... +} + +GlobalE2node-en-gNB-ID ::= SEQUENCE{ + global-en-gNB-ID GlobalenGNB-ID, + en-gNB-CU-UP-ID GNB-CU-UP-ID OPTIONAL, + en-gNB-DU-ID GNB-DU-ID OPTIONAL, + ... +} +GlobalE2node-eNB-ID ::= SEQUENCE{ + global-eNB-ID GlobalENB-ID, + ... +} +GlobalE2node-gNB-ID ::= SEQUENCE{ + global-gNB-ID GlobalgNB-ID, + global-en-gNB-ID GlobalenGNB-ID OPTIONAL, + gNB-CU-UP-ID GNB-CU-UP-ID OPTIONAL, + gNB-DU-ID GNB-DU-ID OPTIONAL, + ... +} +GlobalE2node-ng-eNB-ID ::= SEQUENCE{ + global-ng-eNB-ID GlobalngeNB-ID, + global-eNB-ID GlobalENB-ID OPTIONAL, + ngENB-DU-ID NGENB-DU-ID OPTIONAL, + ... +} +-- ************************************************************** +-- copied from 3GPP 36.423 (X2AP) IEs +-- note: ie-Extensions removed +-- ************************************************************** + +GlobalENB-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + eNB-ID ENB-ID, + ... +} +-- ************************************************************** +-- copied from 3GPP 36.423 (X2AP) IEs +-- Note: to avoid duplicate names with XnAP, GNB-ID renamed ENGNB-ID, GlobalGNB-ID renamed GlobalenGNB-ID +-- ************************************************************** +GlobalenGNB-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + gNB-ID ENGNB-ID, + ... +} +-- ************************************************************** +-- copied from 3GPP 38.423 (XnAP) IEs +-- ************************************************************** +GlobalgNB-ID ::= SEQUENCE { + plmn-id PLMN-Identity, + gnb-id GNB-ID-Choice, + ... +} + + +-- ************************************************************** +-- copied from 3GPP 38.423 (XnAP) IEs +-- ************************************************************** +GlobalngeNB-ID ::= SEQUENCE { + plmn-id PLMN-Identity, + enb-id ENB-ID-Choice, + ... +} + +-- ************************************************************** +-- [NEW for E2AP v02.00] copied from 3GPP 38.423 (XnAP) IEs +-- Note: extension field removed +-- ************************************************************** + +GlobalNG-RANNode-ID ::= CHOICE { + gNB GlobalgNB-ID, + ng-eNB GlobalngeNB-ID, + ... +} + +GlobalRIC-ID ::= SEQUENCE{ + pLMN-Identity PLMN-Identity, + ric-ID BIT STRING (SIZE (20)), + ... +} + +-- ************************************************************** +-- copied from 3GPP 38.463 (E1AP) IEs +-- ************************************************************** +GNB-CU-UP-ID::= INTEGER (0..68719476735) +GNB-DU-ID::= INTEGER (0..68719476735) + +-- ************************************************************** +-- copied from 3GPP 38.423 (XnAP) IEs +-- ************************************************************** +GNB-ID-Choice ::= CHOICE { + gnb-ID BIT STRING (SIZE(22..32)), + ... +} +-- H +-- I +-- J +-- K +-- L +-- M + +-- ************************************************************** +-- [New for E2AP v02.00] copied from 3GPP 36.413 (S1AP) IEs +-- ************************************************************** +MMEname ::= PrintableString (SIZE (1..150,...)) + +-- N + +-- ************************************************************** +-- copied from 3GPP 37.473 (W1AP) IEs +-- ************************************************************** +NGENB-DU-ID ::= INTEGER (0..68719476735) + + +-- O +-- P +-- ************************************************************** +-- copied from 3GPP 36.423 (X2AP) IEs +-- ************************************************************** +PLMN-Identity ::= OCTET STRING (SIZE(3)) + +-- Q +-- R +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RANfunctionDefinition ::= OCTET STRING + +RANfunctionID ::= INTEGER (0..4095) + +RANfunctionOID ::= PrintableString(SIZE(1..1000,...)) + +RANfunctionRevision ::= INTEGER (0..4095) + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICactionDefinition ::= OCTET STRING + +RICactionID ::= INTEGER (0..255) + +RICactionType ::= ENUMERATED{ + report, + insert, + policy, + ... +} + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICcallProcessID ::= OCTET STRING + +RICcontrolAckRequest ::= ENUMERATED{ + noAck, + ack, + ... +} + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICcontrolHeader ::= OCTET STRING + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICcontrolMessage ::= OCTET STRING + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICcontrolOutcome ::= OCTET STRING + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICeventTriggerDefinition ::= OCTET STRING + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICindicationHeader ::= OCTET STRING + +-- ************************************************************** +-- Following IE defined in E2SM +-- ************************************************************** +RICindicationMessage ::= OCTET STRING + +RICindicationSN ::= INTEGER (0..65535) + +RICindicationType ::= ENUMERATED{ + report, + insert, + ... +} + +RICrequestID ::= SEQUENCE { + ricRequestorID INTEGER (0..65535), + ricInstanceID INTEGER (0..65535), + ... +} + +RICsubsequentAction ::=SEQUENCE{ + ricSubsequentActionType RICsubsequentActionType, + ricTimeToWait RICtimeToWait, + ... +} + +RICsubsequentActionType ::= ENUMERATED{ + continue, + wait, + ... +} + +RICtimeToWait ::= ENUMERATED{ + w1ms, + w2ms, + w5ms, + w10ms, + w20ms, + w30ms, + w40ms, + w50ms, + w100ms, + w200ms, + w500ms, + w1s, + w2s, + w5s, + w10s, + w20s, + w60s, + ... +} +-- S +-- T +-- ************************************************************** +-- copied from 3GPP 38.413 (NGAP) IEs +-- ************************************************************** +TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...} + + +TNLinformation ::= SEQUENCE{ + tnlAddress BIT STRING (SIZE(1..160,...)), + tnlPort BIT STRING (SIZE(16)) OPTIONAL, + ... +} + +TNLusage ::= ENUMERATED{ric-service, support-function, both, ...} + +TransactionID ::= INTEGER (0..255,...) + +-- ************************************************************** +-- copied from 3GPP 38.413 (NGAP) IEs +-- ************************************************************** +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} + +-- U +-- V +-- W +-- X +-- Y +-- Z + +END +-- ASN1STOP + diff --git a/e2ap/asn1/pduDefinition.asn b/e2ap/asn1/pduDefinition.asn new file mode 100644 index 0000000..c7ff4e0 --- /dev/null +++ b/e2ap/asn1/pduDefinition.asn @@ -0,0 +1,934 @@ +-- ASN1START +-- ************************************************************** +-- +-- PDU definitions for E2AP +-- Derived from 3GPP 38.413 (NGAP) +-- +-- ************************************************************** + +E2AP-PDU-Contents { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53148 e2(1) version2 (2) e2ap(1) e2ap-PDU-Contents (1) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Cause, + CriticalityDiagnostics, + E2nodeComponentConfiguration, + E2nodeComponentConfigurationAck, + E2nodeComponentID, + E2nodeComponentInterfaceType, + GlobalE2node-ID, + GlobalRIC-ID, + RANfunctionDefinition, + RANfunctionID, + RANfunctionOID, + RANfunctionRevision, + RICactionDefinition, + RICactionID, + RICactionType, + RICcallProcessID, + RICcontrolAckRequest, + RICcontrolHeader, + RICcontrolMessage, + RICcontrolOutcome, + RICeventTriggerDefinition, + RICindicationHeader, + RICindicationMessage, + RICindicationSN, + RICindicationType, + RICrequestID, + RICsubsequentAction, + TimeToWait, + TNLinformation, + TNLusage, + TransactionID +FROM E2AP-IEs + + ProtocolIE-Container{}, + ProtocolIE-ContainerList{}, + ProtocolIE-SingleContainer{}, + E2AP-PROTOCOL-IES, + E2AP-PROTOCOL-IES-PAIR +FROM E2AP-Containers + + id-Cause, + id-CriticalityDiagnostics, + id-E2connectionSetup, + id-E2connectionSetupFailed, + id-E2connectionSetupFailed-Item, + id-E2connectionFailed-Item, + id-E2connectionUpdate-Item, + id-E2connectionUpdateAdd, + id-E2connectionUpdateModify, + id-E2connectionUpdateRemove, + id-E2connectionUpdateRemove-Item, + id-E2nodeComponentConfigAddition, + id-E2nodeComponentConfigAddition-Item, + id-E2nodeComponentConfigAdditionAck, + id-E2nodeComponentConfigAdditionAck-Item, + id-E2nodeComponentConfigRemoval, + id-E2nodeComponentConfigRemoval-Item, + id-E2nodeComponentConfigRemovalAck, + id-E2nodeComponentConfigRemovalAck-Item, + id-E2nodeComponentConfigUpdate, + id-E2nodeComponentConfigUpdate-Item, + id-E2nodeComponentConfigUpdateAck, + id-E2nodeComponentConfigUpdateAck-Item, + id-E2nodeTNLassociationRemoval, + id-E2nodeTNLassociationRemoval-Item, + id-GlobalE2node-ID, + id-GlobalRIC-ID, + id-RANfunctionID, + id-RANfunctionID-Item, + id-RANfunctionIEcause-Item, + id-RANfunction-Item, + id-RANfunctionsAccepted, + id-RANfunctionsAdded, + id-RANfunctionsDeleted, + id-RANfunctionsModified, + id-RANfunctionsRejected, + id-RICaction-Admitted-Item, + id-RICactionID, + id-RICaction-NotAdmitted-Item, + id-RICactions-Admitted, + id-RICactions-NotAdmitted, + id-RICaction-ToBeSetup-Item, + id-RICcallProcessID, + id-RICcontrolAckRequest, + id-RICcontrolHeader, + id-RICcontrolMessage, + id-RICcontrolOutcome, + id-RICindicationHeader, + id-RICindicationMessage, + id-RICindicationSN, + id-RICindicationType, + id-RICrequestID, + id-RICserviceQuery, + id-RICsubscriptionDetails, + id-RICsubscriptionToBeRemoved, + id-RICsubscription-withCause-Item, + id-TimeToWait, + id-TNLinformation, + id-TransactionID, + + maxofE2nodeComponents, + maxofRANfunctionID, + maxofRICactionID, + maxofRICrequestID, + maxofTNLA +FROM E2AP-Constants; + + +-- ************************************************************** +-- +-- MESSAGES FOR NEAR-RT RIC FUNCTIONAL PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- RIC Subscription Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- RIC SUBSCRIPTION REQUEST +-- +-- ************************************************************** +RICsubscriptionRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionRequest-IEs}}, + ... +} + +RICsubscriptionRequest-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICsubscriptionDetails CRITICALITY reject TYPE RICsubscriptionDetails PRESENCE mandatory}, + ... +} + + +RICsubscriptionDetails ::= SEQUENCE { + ricEventTriggerDefinition RICeventTriggerDefinition, + ricAction-ToBeSetup-List RICactions-ToBeSetup-List, + ... +} + +RICactions-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxofRICactionID)) OF ProtocolIE-SingleContainer { {RICaction-ToBeSetup-ItemIEs} } + +RICaction-ToBeSetup-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-RICaction-ToBeSetup-Item CRITICALITY ignore TYPE RICaction-ToBeSetup-Item PRESENCE mandatory }, + ... +} + +RICaction-ToBeSetup-Item ::= SEQUENCE { + ricActionID RICactionID, + ricActionType RICactionType, + ricActionDefinition RICactionDefinition OPTIONAL, + ricSubsequentAction RICsubsequentAction OPTIONAL, + ... +} + +-- ************************************************************** +-- +-- RIC SUBSCRIPTION RESPONSE +-- +-- ************************************************************** +RICsubscriptionResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container{{RICsubscriptionResponse-IEs}}, + ... +} + +RICsubscriptionResponse-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory } | + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory } | + { ID id-RICactions-Admitted CRITICALITY reject TYPE RICaction-Admitted-List PRESENCE mandatory } | + { ID id-RICactions-NotAdmitted CRITICALITY reject TYPE RICaction-NotAdmitted-List PRESENCE optional }, + ... +} + + + +RICaction-Admitted-List ::= SEQUENCE (SIZE(1..maxofRICactionID)) OF ProtocolIE-SingleContainer{{RICaction-Admitted-ItemIEs}} + +RICaction-Admitted-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-RICaction-Admitted-Item CRITICALITY ignore TYPE RICaction-Admitted-Item PRESENCE mandatory }, + ... +} + +RICaction-Admitted-Item ::= SEQUENCE { + ricActionID RICactionID, + ... +} + +RICaction-NotAdmitted-List ::= SEQUENCE (SIZE(0..maxofRICactionID)) OF ProtocolIE-SingleContainer { {RICaction-NotAdmitted-ItemIEs} } + +RICaction-NotAdmitted-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-RICaction-NotAdmitted-Item CRITICALITY ignore TYPE RICaction-NotAdmitted-Item PRESENCE mandatory }, + ... +} + +RICaction-NotAdmitted-Item ::= SEQUENCE { + ricActionID RICactionID, + cause Cause, + ... +} + +-- ************************************************************** +-- +-- RIC SUBSCRIPTION FAILURE +-- +-- ************************************************************** +RICsubscriptionFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionFailure-IEs}}, + ... +} + +RICsubscriptionFailure-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY reject TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- RIC Subscription Delete Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- RIC SUBSCRIPTION DELETE REQUEST +-- +-- ************************************************************** +RICsubscriptionDeleteRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionDeleteRequest-IEs}}, + ... +} + +RICsubscriptionDeleteRequest-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- RIC SUBSCRIPTION DELETE RESPONSE +-- +-- ************************************************************** +RICsubscriptionDeleteResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionDeleteResponse-IEs}}, + ... +} + +RICsubscriptionDeleteResponse-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }, + ... +} +-- ************************************************************** +-- +-- RIC SUBSCRIPTION DELETE FAILURE +-- +-- ************************************************************** +RICsubscriptionDeleteFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionDeleteFailure-IEs}}, + ... +} + +RICsubscriptionDeleteFailure-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- RIC Subscription Delete Required Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- RIC SUBSCRIPTION DELETE REQUIRED +-- +-- ************************************************************** + +RICsubscriptionDeleteRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionDeleteRequired-IEs}}, + ... +} + +RICsubscriptionDeleteRequired-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICsubscriptionToBeRemoved CRITICALITY ignore TYPE RICsubscription-List-withCause PRESENCE mandatory }, + ... +} + +RICsubscription-List-withCause ::= SEQUENCE (SIZE(1..maxofRICrequestID)) OF ProtocolIE-SingleContainer { {RICsubscription-withCause-ItemIEs} } + +RICsubscription-withCause-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-RICsubscription-withCause-Item CRITICALITY ignore TYPE RICsubscription-withCause-Item PRESENCE mandatory }, + ... +} + +RICsubscription-withCause-Item ::= SEQUENCE { + ricRequestID RICrequestID, + ranFunctionID RANfunctionID, + cause Cause, + ... +} + +-- ************************************************************** +-- +-- RIC Indication Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- RIC INDICATION +-- +-- ************************************************************** +RICindication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICindication-IEs}}, + ... +} + +RICindication-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }| + { ID id-RICactionID CRITICALITY reject TYPE RICactionID PRESENCE mandatory }| + { ID id-RICindicationSN CRITICALITY reject TYPE RICindicationSN PRESENCE optional }| + { ID id-RICindicationType CRITICALITY reject TYPE RICindicationType PRESENCE mandatory }| + { ID id-RICindicationHeader CRITICALITY reject TYPE RICindicationHeader PRESENCE mandatory }| + { ID id-RICindicationMessage CRITICALITY reject TYPE RICindicationMessage PRESENCE mandatory }| + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- RIC Control Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- RIC CONTROL REQUEST +-- +-- ************************************************************** +RICcontrolRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICcontrolRequest-IEs}}, + ... +} + +RICcontrolRequest-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }| + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional }| + { ID id-RICcontrolHeader CRITICALITY reject TYPE RICcontrolHeader PRESENCE mandatory }| + { ID id-RICcontrolMessage CRITICALITY reject TYPE RICcontrolMessage PRESENCE mandatory }| + { ID id-RICcontrolAckRequest CRITICALITY reject TYPE RICcontrolAckRequest PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- RIC CONTROL ACKNOWLEDGE +-- +-- ************************************************************** +RICcontrolAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICcontrolAcknowledge-IEs}}, + ... +} + +RICcontrolAcknowledge-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }| + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional }| + { ID id-RICcontrolOutcome CRITICALITY reject TYPE RICcontrolOutcome PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- RIC CONTROL FAILURE +-- +-- ************************************************************** +RICcontrolFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICcontrolFailure-IEs}}, + ... +} + +RICcontrolFailure-IEs E2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory }| + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-RICcontrolOutcome CRITICALITY reject TYPE RICcontrolOutcome PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- MESSAGES FOR GLOBAL PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Error Indication Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- ERROR INDICATION +-- +-- ************************************************************** +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ErrorIndication-IEs}}, + ... +} + +ErrorIndication-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE optional }| + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE optional }| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- E2 Setup Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- E2 SETUP REQUEST +-- +-- ************************************************************** + +E2setupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E2setupRequestIEs} }, + ... +} + +E2setupRequestIEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-GlobalE2node-ID CRITICALITY reject TYPE GlobalE2node-ID PRESENCE mandatory }| + { ID id-RANfunctionsAdded CRITICALITY reject TYPE RANfunctions-List PRESENCE mandatory }| + { ID id-E2nodeComponentConfigAddition CRITICALITY reject TYPE E2nodeComponentConfigAddition-List PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- E2 SETUP RESPONSE +-- +-- ************************************************************** + +E2setupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E2setupResponseIEs} }, + ... +} + +E2setupResponseIEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-GlobalRIC-ID CRITICALITY reject TYPE GlobalRIC-ID PRESENCE mandatory }| + { ID id-RANfunctionsAccepted CRITICALITY reject TYPE RANfunctionsID-List PRESENCE optional }| + { ID id-RANfunctionsRejected CRITICALITY reject TYPE RANfunctionsIDcause-List PRESENCE optional }| + { ID id-E2nodeComponentConfigAdditionAck CRITICALITY reject TYPE E2nodeComponentConfigAdditionAck-List PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- E2 SETUP FAILURE +-- +-- ************************************************************** + +E2setupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E2setupFailureIEs} }, + ... +} + +E2setupFailureIEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-TNLinformation CRITICALITY ignore TYPE TNLinformation PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- E2 Connection Update Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- E2 CONNECTION UPDATE +-- +-- ************************************************************** +E2connectionUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E2connectionUpdate-IEs}}, + ... +} + +E2connectionUpdate-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-E2connectionUpdateAdd CRITICALITY reject TYPE E2connectionUpdate-List PRESENCE optional }| + { ID id-E2connectionUpdateRemove CRITICALITY reject TYPE E2connectionUpdateRemove-List PRESENCE optional }| + { ID id-E2connectionUpdateModify CRITICALITY reject TYPE E2connectionUpdate-List PRESENCE optional }, + ... +} + +E2connectionUpdate-List ::= SEQUENCE (SIZE(1..maxofTNLA)) OF ProtocolIE-SingleContainer { {E2connectionUpdate-ItemIEs} } + +E2connectionUpdate-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2connectionUpdate-Item CRITICALITY ignore TYPE E2connectionUpdate-Item PRESENCE mandatory }, + ... +} + +E2connectionUpdate-Item ::= SEQUENCE { + tnlInformation TNLinformation, + tnlUsage TNLusage, + ... +} + +E2connectionUpdateRemove-List ::= SEQUENCE (SIZE(1..maxofTNLA)) OF ProtocolIE-SingleContainer { {E2connectionUpdateRemove-ItemIEs} } + +E2connectionUpdateRemove-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2connectionUpdateRemove-Item CRITICALITY ignore TYPE E2connectionUpdateRemove-Item PRESENCE mandatory }, + ... +} + +E2connectionUpdateRemove-Item ::= SEQUENCE { + tnlInformation TNLinformation, + ... +} + + + +-- ************************************************************** +-- +-- E2 CONNECTION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** +E2connectionUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E2connectionUpdateAck-IEs}}, + ... +} + +E2connectionUpdateAck-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-E2connectionSetup CRITICALITY reject TYPE E2connectionUpdate-List PRESENCE optional }| + { ID id-E2connectionSetupFailed CRITICALITY reject TYPE E2connectionSetupFailed-List PRESENCE optional }, + ... +} + +E2connectionSetupFailed-List ::= SEQUENCE (SIZE(1..maxofTNLA)) OF ProtocolIE-SingleContainer { {E2connectionSetupFailed-ItemIEs} } + +E2connectionSetupFailed-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2connectionSetupFailed-Item CRITICALITY ignore TYPE E2connectionSetupFailed-Item PRESENCE mandatory }, + ... +} + +E2connectionSetupFailed-Item ::= SEQUENCE { + tnlInformation TNLinformation, + cause Cause, + ... +} + +-- ************************************************************** +-- +-- E2 CONNECTION UPDATE FAILURE +-- +-- ************************************************************** +E2connectionUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E2connectionUpdateFailure-IEs}}, + ... +} + +E2connectionUpdateFailure-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY reject TYPE Cause PRESENCE optional }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- E2 Node Configuration Update Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- E2 NODE CONFIGURATION UPDATE +-- +-- ************************************************************** +E2nodeConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E2nodeConfigurationUpdate-IEs}}, + ... +} + +E2nodeConfigurationUpdate-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-GlobalE2node-ID CRITICALITY reject TYPE GlobalE2node-ID PRESENCE optional }| + { ID id-E2nodeComponentConfigAddition CRITICALITY reject TYPE E2nodeComponentConfigAddition-List PRESENCE optional }| + { ID id-E2nodeComponentConfigUpdate CRITICALITY reject TYPE E2nodeComponentConfigUpdate-List PRESENCE optional }| + { ID id-E2nodeComponentConfigRemoval CRITICALITY reject TYPE E2nodeComponentConfigRemoval-List PRESENCE optional }| + { ID id-E2nodeTNLassociationRemoval CRITICALITY reject TYPE E2nodeTNLassociationRemoval-List PRESENCE optional }, + ... +} + +E2nodeComponentConfigAddition-List ::= SEQUENCE (SIZE(1..maxofE2nodeComponents)) OF ProtocolIE-SingleContainer { {E2nodeComponentConfigAddition-ItemIEs} } + +E2nodeComponentConfigAddition-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2nodeComponentConfigAddition-Item CRITICALITY reject TYPE E2nodeComponentConfigAddition-Item PRESENCE mandatory }, + ... +} + +E2nodeComponentConfigAddition-Item ::= SEQUENCE { + e2nodeComponentInterfaceType E2nodeComponentInterfaceType, + e2nodeComponentID E2nodeComponentID, + e2nodeComponentConfiguration E2nodeComponentConfiguration, + ... +} + +E2nodeComponentConfigUpdate-List ::= SEQUENCE (SIZE(1..maxofE2nodeComponents)) OF ProtocolIE-SingleContainer { {E2nodeComponentConfigUpdate-ItemIEs} } + +E2nodeComponentConfigUpdate-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2nodeComponentConfigUpdate-Item CRITICALITY reject TYPE E2nodeComponentConfigUpdate-Item PRESENCE mandatory }, + ... +} + +E2nodeComponentConfigUpdate-Item ::= SEQUENCE { + e2nodeComponentInterfaceType E2nodeComponentInterfaceType, + e2nodeComponentID E2nodeComponentID, + e2nodeComponentConfiguration E2nodeComponentConfiguration, + ... +} + +E2nodeComponentConfigRemoval-List ::= SEQUENCE (SIZE(1..maxofE2nodeComponents)) OF ProtocolIE-SingleContainer { {E2nodeComponentConfigRemoval-ItemIEs} } + +E2nodeComponentConfigRemoval-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2nodeComponentConfigRemoval-Item CRITICALITY reject TYPE E2nodeComponentConfigRemoval-Item PRESENCE mandatory }, + ... +} + +E2nodeComponentConfigRemoval-Item ::= SEQUENCE { + e2nodeComponentInterfaceType E2nodeComponentInterfaceType, + e2nodeComponentID E2nodeComponentID, + ... +} + +E2nodeTNLassociationRemoval-List ::= SEQUENCE (SIZE(1..maxofTNLA)) OF ProtocolIE-SingleContainer { {E2nodeTNLassociationRemoval-ItemIEs} } + +E2nodeTNLassociationRemoval-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2nodeTNLassociationRemoval-Item CRITICALITY reject TYPE E2nodeTNLassociationRemoval-Item PRESENCE mandatory }, + ... +} + +E2nodeTNLassociationRemoval-Item ::= SEQUENCE { + tnlInformation TNLinformation, + tnlInformationRIC TNLinformation, + ... +} + +-- ************************************************************** +-- +-- E2 NODE CONFIGURATION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** +E2nodeConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E2nodeConfigurationUpdateAcknowledge-IEs}}, + ... +} + +E2nodeConfigurationUpdateAcknowledge-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-E2nodeComponentConfigAdditionAck CRITICALITY reject TYPE E2nodeComponentConfigAdditionAck-List PRESENCE optional }| + { ID id-E2nodeComponentConfigUpdateAck CRITICALITY reject TYPE E2nodeComponentConfigUpdateAck-List PRESENCE optional }| + { ID id-E2nodeComponentConfigRemovalAck CRITICALITY reject TYPE E2nodeComponentConfigRemovalAck-List PRESENCE optional }, + ... +} + +E2nodeComponentConfigAdditionAck-List ::= SEQUENCE (SIZE(1..maxofE2nodeComponents)) OF ProtocolIE-SingleContainer { {E2nodeComponentConfigAdditionAck-ItemIEs} } + +E2nodeComponentConfigAdditionAck-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2nodeComponentConfigAdditionAck-Item CRITICALITY reject TYPE E2nodeComponentConfigAdditionAck-Item PRESENCE mandatory }, + ... +} + +E2nodeComponentConfigAdditionAck-Item ::= SEQUENCE { + e2nodeComponentInterfaceType E2nodeComponentInterfaceType, + e2nodeComponentID E2nodeComponentID, + e2nodeComponentConfigurationAck E2nodeComponentConfigurationAck, + ... +} + +E2nodeComponentConfigUpdateAck-List ::= SEQUENCE (SIZE(1..maxofE2nodeComponents)) OF ProtocolIE-SingleContainer { {E2nodeComponentConfigUpdateAck-ItemIEs} } + +E2nodeComponentConfigUpdateAck-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2nodeComponentConfigUpdateAck-Item CRITICALITY reject TYPE E2nodeComponentConfigUpdateAck-Item PRESENCE mandatory }, + ... +} + +E2nodeComponentConfigUpdateAck-Item ::= SEQUENCE { + e2nodeComponentInterfaceType E2nodeComponentInterfaceType, + e2nodeComponentID E2nodeComponentID, + e2nodeComponentConfigurationAck E2nodeComponentConfigurationAck, + ... +} + +E2nodeComponentConfigRemovalAck-List ::= SEQUENCE (SIZE(1..maxofE2nodeComponents)) OF ProtocolIE-SingleContainer { {E2nodeComponentConfigRemovalAck-ItemIEs} } + +E2nodeComponentConfigRemovalAck-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-E2nodeComponentConfigRemovalAck-Item CRITICALITY reject TYPE E2nodeComponentConfigRemovalAck-Item PRESENCE mandatory }, + ... +} + +E2nodeComponentConfigRemovalAck-Item ::= SEQUENCE { + e2nodeComponentInterfaceType E2nodeComponentInterfaceType, + e2nodeComponentID E2nodeComponentID, + e2nodeComponentConfigurationAck E2nodeComponentConfigurationAck, + ... +} + +-- ************************************************************** +-- +-- E2 NODE CONFIGURATION UPDATE FAILURE +-- +-- ************************************************************** +E2nodeConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E2nodeConfigurationUpdateFailure-IEs}}, + ... +} + +E2nodeConfigurationUpdateFailure-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- Reset Elementary Procedure +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- RESET REQUEST +-- +-- ************************************************************** + +ResetRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetRequestIEs} }, + ... +} + +ResetRequestIEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- RESET RESPONSE +-- +-- ************************************************************** + +ResetResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetResponseIEs} }, + ... +} + +ResetResponseIEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- RIC Service Update Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- RIC SERVICE UPDATE +-- +-- ************************************************************** +RICserviceUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceUpdate-IEs}}, + ... +} + +RICserviceUpdate-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-RANfunctionsAdded CRITICALITY reject TYPE RANfunctions-List PRESENCE optional }| + { ID id-RANfunctionsModified CRITICALITY reject TYPE RANfunctions-List PRESENCE optional }| + { ID id-RANfunctionsDeleted CRITICALITY reject TYPE RANfunctionsID-List PRESENCE optional }, + ... +} + +RANfunctions-List ::= SEQUENCE (SIZE(1..maxofRANfunctionID)) OF ProtocolIE-SingleContainer { {RANfunction-ItemIEs} } + +RANfunction-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-RANfunction-Item CRITICALITY ignore TYPE RANfunction-Item PRESENCE mandatory }, + ... +} + + +RANfunction-Item ::= SEQUENCE { + ranFunctionID RANfunctionID, + ranFunctionDefinition RANfunctionDefinition, + ranFunctionRevision RANfunctionRevision, + ranFunctionOID RANfunctionOID, + ... +} + +RANfunctionsID-List ::= SEQUENCE (SIZE(1..maxofRANfunctionID)) OF ProtocolIE-SingleContainer{{RANfunctionID-ItemIEs}} + +RANfunctionID-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionID-Item CRITICALITY ignore TYPE RANfunctionID-Item PRESENCE mandatory }, + ... +} + +RANfunctionID-Item ::= SEQUENCE { + ranFunctionID RANfunctionID, + ranFunctionRevision RANfunctionRevision, + ... +} + +-- ************************************************************** +-- +-- RIC SERVICE UPDATE ACKNOWLEDGE +-- +-- ************************************************************** +RICserviceUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceUpdateAcknowledge-IEs}}, + ... +} + +RICserviceUpdateAcknowledge-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-RANfunctionsAccepted CRITICALITY reject TYPE RANfunctionsID-List PRESENCE mandatory }| + { ID id-RANfunctionsRejected CRITICALITY reject TYPE RANfunctionsIDcause-List PRESENCE optional }, + ... +} + +RANfunctionsIDcause-List ::= SEQUENCE (SIZE(1..maxofRANfunctionID)) OF ProtocolIE-SingleContainer { {RANfunctionIDcause-ItemIEs} } + +RANfunctionIDcause-ItemIEs E2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionIEcause-Item CRITICALITY ignore TYPE RANfunctionIDcause-Item PRESENCE mandatory }, + ... +} + + +RANfunctionIDcause-Item ::= SEQUENCE { + ranFunctionID RANfunctionID, + cause Cause, + ... +} + + +-- ************************************************************** +-- +-- RIC SERVICE UPDATE FAILURE +-- +-- ************************************************************** +RICserviceUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceUpdateFailure-IEs}}, + ... +} + +RICserviceUpdateFailure-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY reject TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- RIC Service Query Elementary Procedure +-- +-- ************************************************************** +-- ************************************************************** +-- +-- RIC SERVICE QUERY +-- +-- ************************************************************** +RICserviceQuery ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceQuery-IEs}}, + ... +} + +RICserviceQuery-IEs E2AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-RANfunctionsAccepted CRITICALITY reject TYPE RANfunctionsID-List PRESENCE optional }, + ... +} + +END +-- ASN1STOP + diff --git a/e2ap/headers/AMFName.h b/e2ap/headers/AMFName.h new file mode 100644 index 0000000..7a686be --- /dev/null +++ b/e2ap/headers/AMFName.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _AMFName_H_ +#define _AMFName_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PrintableString.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* AMFName */ +typedef PrintableString_t AMFName_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_AMFName_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_AMFName; +asn_struct_free_f AMFName_free; +asn_struct_print_f AMFName_print; +asn_constr_check_f AMFName_constraint; +ber_type_decoder_f AMFName_decode_ber; +der_type_encoder_f AMFName_encode_der; +xer_type_decoder_f AMFName_decode_xer; +xer_type_encoder_f AMFName_encode_xer; +jer_type_encoder_f AMFName_encode_jer; +oer_type_decoder_f AMFName_decode_oer; +oer_type_encoder_f AMFName_encode_oer; +per_type_decoder_f AMFName_decode_uper; +per_type_encoder_f AMFName_encode_uper; +per_type_decoder_f AMFName_decode_aper; +per_type_encoder_f AMFName_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _AMFName_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/ANY.h b/e2ap/headers/ANY.h index b30381f..871ed5e 100644 --- a/e2ap/headers/ANY.h +++ b/e2ap/headers/ANY.h @@ -22,23 +22,38 @@ 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; +#define ANY_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define ANY_print OCTET_STRING_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define ANY_compare OCTET_STRING_compare + +#define ANY_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define ANY_decode_ber OCTET_STRING_decode_ber +#define ANY_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define ANY_decode_xer OCTET_STRING_decode_xer_hex xer_type_encoder_f ANY_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f ANY_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f ANY_decode_uper; per_type_encoder_f ANY_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) 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 +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ /****************************** * Handy conversion routines. * @@ -46,13 +61,17 @@ per_type_encoder_f ANY_encode_aper; /* 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); +#if !defined(ASN_DISABLE_APER_SUPPORT) +int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr); ANY_t *ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr); +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ /* 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); +#if !defined(ASN_DISABLE_APER_SUPPORT) int ANY_to_type_aper(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr); +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ #define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size)) #define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf( \ diff --git a/e2ap/headers/BIT_STRING.h b/e2ap/headers/BIT_STRING.h index c1bdbbc..e755fe9 100644 --- a/e2ap/headers/BIT_STRING.h +++ b/e2ap/headers/BIT_STRING.h @@ -24,22 +24,49 @@ 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 */ +#define BIT_STRING_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +asn_struct_print_f BIT_STRING_print; /* Human-readable output */ +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f BIT_STRING_compare; + asn_constr_check_f BIT_STRING_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define BIT_STRING_decode_ber OCTET_STRING_decode_ber +#define BIT_STRING_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary xer_type_encoder_f BIT_STRING_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f BIT_STRING_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f BIT_STRING_decode_oer; oer_type_encoder_f BIT_STRING_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) 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 +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define BIT_STRING_decode_aper OCTET_STRING_decode_aper +#define BIT_STRING_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f BIT_STRING_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +const BIT_STRING_t *BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp); #ifdef __cplusplus } diff --git a/e2ap/headers/Cause.h b/e2ap/headers/Cause.h index 7bd7e80..ef3efef 100644 --- a/e2ap/headers/Cause.h +++ b/e2ap/headers/Cause.h @@ -1,23 +1,24 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _Cause_H_ #define _Cause_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include "CauseRIC.h" +#include "CauseRICrequest.h" #include "CauseRICservice.h" +#include "CauseE2node.h" #include "CauseTransport.h" #include "CauseProtocol.h" #include "CauseMisc.h" -#include +#include "constr_CHOICE.h" #ifdef __cplusplus extern "C" { @@ -28,6 +29,7 @@ typedef enum Cause_PR { Cause_PR_NOTHING, /* No components present */ Cause_PR_ricRequest, Cause_PR_ricService, + Cause_PR_e2Node, Cause_PR_transport, Cause_PR_protocol, Cause_PR_misc @@ -39,8 +41,9 @@ typedef enum Cause_PR { typedef struct Cause { Cause_PR present; union Cause_u { - CauseRIC_t ricRequest; + CauseRICrequest_t ricRequest; CauseRICservice_t ricService; + CauseE2node_t e2Node; CauseTransport_t transport; CauseProtocol_t protocol; CauseMisc_t misc; @@ -57,7 +60,7 @@ typedef struct Cause { /* 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_TYPE_member_t asn_MBR_Cause_1[6]; extern asn_per_constraints_t asn_PER_type_Cause_constr_1; #ifdef __cplusplus @@ -65,4 +68,4 @@ extern asn_per_constraints_t asn_PER_type_Cause_constr_1; #endif #endif /* _Cause_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/CauseE2node.h b/e2ap/headers/CauseE2node.h new file mode 100644 index 0000000..afb564e --- /dev/null +++ b/e2ap/headers/CauseE2node.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _CauseE2node_H_ +#define _CauseE2node_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CauseE2node { + CauseE2node_e2node_component_unknown = 0 + /* + * Enumeration is extensible + */ +} e_CauseE2node; + +/* CauseE2node */ +typedef long CauseE2node_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_CauseE2node_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_CauseE2node; +extern const asn_INTEGER_specifics_t asn_SPC_CauseE2node_specs_1; +asn_struct_free_f CauseE2node_free; +asn_struct_print_f CauseE2node_print; +asn_constr_check_f CauseE2node_constraint; +ber_type_decoder_f CauseE2node_decode_ber; +der_type_encoder_f CauseE2node_encode_der; +xer_type_decoder_f CauseE2node_decode_xer; +xer_type_encoder_f CauseE2node_encode_xer; +jer_type_encoder_f CauseE2node_encode_jer; +oer_type_decoder_f CauseE2node_decode_oer; +oer_type_encoder_f CauseE2node_encode_oer; +per_type_decoder_f CauseE2node_decode_uper; +per_type_encoder_f CauseE2node_encode_uper; +per_type_decoder_f CauseE2node_decode_aper; +per_type_encoder_f CauseE2node_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _CauseE2node_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/CauseMisc.h b/e2ap/headers/CauseMisc.h index 1b1efcf..5fbf855 100644 --- a/e2ap/headers/CauseMisc.h +++ b/e2ap/headers/CauseMisc.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CauseMisc_H_ #define _CauseMisc_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -43,6 +43,7 @@ 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; +jer_type_encoder_f CauseMisc_encode_jer; oer_type_decoder_f CauseMisc_decode_oer; oer_type_encoder_f CauseMisc_encode_oer; per_type_decoder_f CauseMisc_decode_uper; @@ -55,4 +56,4 @@ per_type_encoder_f CauseMisc_encode_aper; #endif #endif /* _CauseMisc_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/CauseProtocol.h b/e2ap/headers/CauseProtocol.h index 8b49178..6f24c46 100644 --- a/e2ap/headers/CauseProtocol.h +++ b/e2ap/headers/CauseProtocol.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CauseProtocol_H_ #define _CauseProtocol_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -46,6 +46,7 @@ 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; +jer_type_encoder_f CauseProtocol_encode_jer; oer_type_decoder_f CauseProtocol_decode_oer; oer_type_encoder_f CauseProtocol_encode_oer; per_type_decoder_f CauseProtocol_decode_uper; @@ -58,4 +59,4 @@ per_type_encoder_f CauseProtocol_encode_aper; #endif #endif /* _CauseProtocol_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/CauseRIC.h b/e2ap/headers/CauseRIC.h deleted file mode 100644 index 92cbb95..0000000 --- a/e2ap/headers/CauseRIC.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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/e2ap/headers/CauseRICrequest.h b/e2ap/headers/CauseRICrequest.h new file mode 100644 index 0000000..9f68b37 --- /dev/null +++ b/e2ap/headers/CauseRICrequest.h @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _CauseRICrequest_H_ +#define _CauseRICrequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum CauseRICrequest { + CauseRICrequest_ran_function_id_invalid = 0, + CauseRICrequest_action_not_supported = 1, + CauseRICrequest_excessive_actions = 2, + CauseRICrequest_duplicate_action = 3, + CauseRICrequest_duplicate_event_trigger = 4, + CauseRICrequest_function_resource_limit = 5, + CauseRICrequest_request_id_unknown = 6, + CauseRICrequest_inconsistent_action_subsequent_action_sequence = 7, + CauseRICrequest_control_message_invalid = 8, + CauseRICrequest_ric_call_process_id_invalid = 9, + CauseRICrequest_control_timer_expired = 10, + CauseRICrequest_control_failed_to_execute = 11, + CauseRICrequest_system_not_ready = 12, + CauseRICrequest_unspecified = 13 + /* + * Enumeration is extensible + */ +} e_CauseRICrequest; + +/* CauseRICrequest */ +typedef long CauseRICrequest_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_CauseRICrequest_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_CauseRICrequest; +extern const asn_INTEGER_specifics_t asn_SPC_CauseRICrequest_specs_1; +asn_struct_free_f CauseRICrequest_free; +asn_struct_print_f CauseRICrequest_print; +asn_constr_check_f CauseRICrequest_constraint; +ber_type_decoder_f CauseRICrequest_decode_ber; +der_type_encoder_f CauseRICrequest_encode_der; +xer_type_decoder_f CauseRICrequest_decode_xer; +xer_type_encoder_f CauseRICrequest_encode_xer; +jer_type_encoder_f CauseRICrequest_encode_jer; +oer_type_decoder_f CauseRICrequest_decode_oer; +oer_type_encoder_f CauseRICrequest_encode_oer; +per_type_decoder_f CauseRICrequest_decode_uper; +per_type_encoder_f CauseRICrequest_encode_uper; +per_type_decoder_f CauseRICrequest_decode_aper; +per_type_encoder_f CauseRICrequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _CauseRICrequest_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/CauseRICservice.h b/e2ap/headers/CauseRICservice.h index 99ec743..0dd7102 100644 --- a/e2ap/headers/CauseRICservice.h +++ b/e2ap/headers/CauseRICservice.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CauseRICservice_H_ #define _CauseRICservice_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -20,7 +20,7 @@ extern "C" { /* Dependencies */ typedef enum CauseRICservice { - CauseRICservice_function_not_required = 0, + CauseRICservice_ran_function_not_supported = 0, CauseRICservice_excessive_functions = 1, CauseRICservice_ric_resource_limit = 2 /* @@ -42,6 +42,7 @@ 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; +jer_type_encoder_f CauseRICservice_encode_jer; oer_type_decoder_f CauseRICservice_decode_oer; oer_type_encoder_f CauseRICservice_encode_oer; per_type_decoder_f CauseRICservice_decode_uper; @@ -54,4 +55,4 @@ per_type_encoder_f CauseRICservice_encode_aper; #endif #endif /* _CauseRICservice_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/CauseTransport.h b/e2ap/headers/CauseTransport.h index 5204d28..f534a49 100644 --- a/e2ap/headers/CauseTransport.h +++ b/e2ap/headers/CauseTransport.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CauseTransport_H_ #define _CauseTransport_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -41,6 +41,7 @@ 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; +jer_type_encoder_f CauseTransport_encode_jer; oer_type_decoder_f CauseTransport_decode_oer; oer_type_encoder_f CauseTransport_encode_oer; per_type_decoder_f CauseTransport_decode_uper; @@ -53,4 +54,4 @@ per_type_encoder_f CauseTransport_encode_aper; #endif #endif /* _CauseTransport_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/Criticality.h b/e2ap/headers/Criticality.h index 3d32aff..629b64e 100644 --- a/e2ap/headers/Criticality.h +++ b/e2ap/headers/Criticality.h @@ -1,18 +1,18 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _Criticality_H_ #define _Criticality_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -39,6 +39,7 @@ 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; +jer_type_encoder_f Criticality_encode_jer; oer_type_decoder_f Criticality_decode_oer; oer_type_encoder_f Criticality_encode_oer; per_type_decoder_f Criticality_decode_uper; @@ -51,4 +52,4 @@ per_type_encoder_f Criticality_encode_aper; #endif #endif /* _Criticality_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/CriticalityDiagnostics-IE-Item.h b/e2ap/headers/CriticalityDiagnostics-IE-Item.h index 5992ce7..4125a58 100644 --- a/e2ap/headers/CriticalityDiagnostics-IE-Item.h +++ b/e2ap/headers/CriticalityDiagnostics-IE-Item.h @@ -1,21 +1,21 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CriticalityDiagnostics_IE_Item_H_ #define _CriticalityDiagnostics_IE_Item_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "Criticality.h" #include "ProtocolIE-ID.h" #include "TypeOfError.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -45,4 +45,4 @@ extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[3]; #endif #endif /* _CriticalityDiagnostics_IE_Item_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/CriticalityDiagnostics-IE-List.h b/e2ap/headers/CriticalityDiagnostics-IE-List.h index b823da4..81d235c 100644 --- a/e2ap/headers/CriticalityDiagnostics-IE-List.h +++ b/e2ap/headers/CriticalityDiagnostics-IE-List.h @@ -1,19 +1,19 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CriticalityDiagnostics_IE_List_H_ #define _CriticalityDiagnostics_IE_List_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_per_constraints_t asn_PER_type_CriticalityDiagnostics_IE_List_constr_ #endif #endif /* _CriticalityDiagnostics_IE_List_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/CriticalityDiagnostics.h b/e2ap/headers/CriticalityDiagnostics.h index ae04eef..f99d952 100644 --- a/e2ap/headers/CriticalityDiagnostics.h +++ b/e2ap/headers/CriticalityDiagnostics.h @@ -1,21 +1,21 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CriticalityDiagnostics_H_ #define _CriticalityDiagnostics_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProcedureCode.h" #include "TriggeringMessage.h" #include "Criticality.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -51,4 +51,4 @@ extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[5]; #endif #endif /* _CriticalityDiagnostics_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/E2AP-PDU.h b/e2ap/headers/E2AP-PDU.h index 1cf3fc7..b3a83d4 100644 --- a/e2ap/headers/E2AP-PDU.h +++ b/e2ap/headers/E2AP-PDU.h @@ -1,18 +1,18 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2AP_PDU_H_ #define _E2AP_PDU_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "constr_CHOICE.h" #ifdef __cplusplus extern "C" { @@ -58,4 +58,4 @@ extern asn_TYPE_descriptor_t asn_DEF_E2AP_PDU; #endif #endif /* _E2AP_PDU_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionSetupFailed-Item.h b/e2ap/headers/E2connectionSetupFailed-Item.h new file mode 100644 index 0000000..d42cab9 --- /dev/null +++ b/e2ap/headers/E2connectionSetupFailed-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionSetupFailed_Item_H_ +#define _E2connectionSetupFailed_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TNLinformation.h" +#include "Cause.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2connectionSetupFailed-Item */ +typedef struct E2connectionSetupFailed_Item { + TNLinformation_t tnlInformation; + Cause_t cause; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionSetupFailed_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionSetupFailed_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionSetupFailed_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionSetupFailed_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionSetupFailed_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionSetupFailed-List.h b/e2ap/headers/E2connectionSetupFailed-List.h new file mode 100644 index 0000000..78b794f --- /dev/null +++ b/e2ap/headers/E2connectionSetupFailed-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionSetupFailed_List_H_ +#define _E2connectionSetupFailed_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 ProtocolIE_SingleContainer; + +/* E2connectionSetupFailed-List */ +typedef struct E2connectionSetupFailed_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionSetupFailed_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionSetupFailed_List; +extern asn_SET_OF_specifics_t asn_SPC_E2connectionSetupFailed_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionSetupFailed_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2connectionSetupFailed_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionSetupFailed_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionUpdate-Item.h b/e2ap/headers/E2connectionUpdate-Item.h new file mode 100644 index 0000000..c291479 --- /dev/null +++ b/e2ap/headers/E2connectionUpdate-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionUpdate_Item_H_ +#define _E2connectionUpdate_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TNLinformation.h" +#include "TNLusage.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2connectionUpdate-Item */ +typedef struct E2connectionUpdate_Item { + TNLinformation_t tnlInformation; + TNLusage_t tnlUsage; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionUpdate_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdate_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdate_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdate_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionUpdate_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionUpdate-List.h b/e2ap/headers/E2connectionUpdate-List.h new file mode 100644 index 0000000..7a093f1 --- /dev/null +++ b/e2ap/headers/E2connectionUpdate-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionUpdate_List_H_ +#define _E2connectionUpdate_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 ProtocolIE_SingleContainer; + +/* E2connectionUpdate-List */ +typedef struct E2connectionUpdate_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionUpdate_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdate_List; +extern asn_SET_OF_specifics_t asn_SPC_E2connectionUpdate_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdate_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2connectionUpdate_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionUpdate_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionUpdate.h b/e2ap/headers/E2connectionUpdate.h new file mode 100644 index 0000000..30b5111 --- /dev/null +++ b/e2ap/headers/E2connectionUpdate.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionUpdate_H_ +#define _E2connectionUpdate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2connectionUpdate */ +typedef struct E2connectionUpdate { + ProtocolIE_Container_85P15_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionUpdate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdate; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdate_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdate_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionUpdate_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionUpdateAcknowledge.h b/e2ap/headers/E2connectionUpdateAcknowledge.h new file mode 100644 index 0000000..58be754 --- /dev/null +++ b/e2ap/headers/E2connectionUpdateAcknowledge.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionUpdateAcknowledge_H_ +#define _E2connectionUpdateAcknowledge_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2connectionUpdateAcknowledge */ +typedef struct E2connectionUpdateAcknowledge { + ProtocolIE_Container_85P16_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionUpdateAcknowledge_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateAcknowledge; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateAcknowledge_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdateAcknowledge_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionUpdateAcknowledge_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionUpdateFailure.h b/e2ap/headers/E2connectionUpdateFailure.h new file mode 100644 index 0000000..6cbaf79 --- /dev/null +++ b/e2ap/headers/E2connectionUpdateFailure.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionUpdateFailure_H_ +#define _E2connectionUpdateFailure_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2connectionUpdateFailure */ +typedef struct E2connectionUpdateFailure { + ProtocolIE_Container_85P17_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionUpdateFailure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateFailure; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateFailure_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdateFailure_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionUpdateFailure_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionUpdateRemove-Item.h b/e2ap/headers/E2connectionUpdateRemove-Item.h new file mode 100644 index 0000000..f8b1caf --- /dev/null +++ b/e2ap/headers/E2connectionUpdateRemove-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionUpdateRemove_Item_H_ +#define _E2connectionUpdateRemove_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TNLinformation.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2connectionUpdateRemove-Item */ +typedef struct E2connectionUpdateRemove_Item { + TNLinformation_t tnlInformation; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionUpdateRemove_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateRemove_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateRemove_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdateRemove_Item_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionUpdateRemove_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2connectionUpdateRemove-List.h b/e2ap/headers/E2connectionUpdateRemove-List.h new file mode 100644 index 0000000..633995a --- /dev/null +++ b/e2ap/headers/E2connectionUpdateRemove-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2connectionUpdateRemove_List_H_ +#define _E2connectionUpdateRemove_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 ProtocolIE_SingleContainer; + +/* E2connectionUpdateRemove-List */ +typedef struct E2connectionUpdateRemove_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2connectionUpdateRemove_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateRemove_List; +extern asn_SET_OF_specifics_t asn_SPC_E2connectionUpdateRemove_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdateRemove_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2connectionUpdateRemove_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2connectionUpdateRemove_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigAddition-Item.h b/e2ap/headers/E2nodeComponentConfigAddition-Item.h new file mode 100644 index 0000000..c2a96a0 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigAddition-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigAddition_Item_H_ +#define _E2nodeComponentConfigAddition_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "E2nodeComponentInterfaceType.h" +#include "E2nodeComponentID.h" +#include "E2nodeComponentConfiguration.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentConfigAddition-Item */ +typedef struct E2nodeComponentConfigAddition_Item { + E2nodeComponentInterfaceType_t e2nodeComponentInterfaceType; + E2nodeComponentID_t e2nodeComponentID; + E2nodeComponentConfiguration_t e2nodeComponentConfiguration; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigAddition_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAddition_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigAddition_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAddition_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigAddition_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigAddition-List.h b/e2ap/headers/E2nodeComponentConfigAddition-List.h new file mode 100644 index 0000000..f2d465e --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigAddition-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigAddition_List_H_ +#define _E2nodeComponentConfigAddition_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 ProtocolIE_SingleContainer; + +/* E2nodeComponentConfigAddition-List */ +typedef struct E2nodeComponentConfigAddition_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigAddition_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAddition_List; +extern asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigAddition_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAddition_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2nodeComponentConfigAddition_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigAddition_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigAdditionAck-Item.h b/e2ap/headers/E2nodeComponentConfigAdditionAck-Item.h new file mode 100644 index 0000000..c30f1d2 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigAdditionAck-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigAdditionAck_Item_H_ +#define _E2nodeComponentConfigAdditionAck_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "E2nodeComponentInterfaceType.h" +#include "E2nodeComponentID.h" +#include "E2nodeComponentConfigurationAck.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentConfigAdditionAck-Item */ +typedef struct E2nodeComponentConfigAdditionAck_Item { + E2nodeComponentInterfaceType_t e2nodeComponentInterfaceType; + E2nodeComponentID_t e2nodeComponentID; + E2nodeComponentConfigurationAck_t e2nodeComponentConfigurationAck; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigAdditionAck_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAdditionAck_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigAdditionAck_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAdditionAck_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigAdditionAck_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigAdditionAck-List.h b/e2ap/headers/E2nodeComponentConfigAdditionAck-List.h new file mode 100644 index 0000000..acec1aa --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigAdditionAck-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigAdditionAck_List_H_ +#define _E2nodeComponentConfigAdditionAck_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 ProtocolIE_SingleContainer; + +/* E2nodeComponentConfigAdditionAck-List */ +typedef struct E2nodeComponentConfigAdditionAck_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigAdditionAck_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAdditionAck_List; +extern asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigAdditionAck_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAdditionAck_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2nodeComponentConfigAdditionAck_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigAdditionAck_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigRemoval-Item.h b/e2ap/headers/E2nodeComponentConfigRemoval-Item.h new file mode 100644 index 0000000..bbc8749 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigRemoval-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigRemoval_Item_H_ +#define _E2nodeComponentConfigRemoval_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "E2nodeComponentInterfaceType.h" +#include "E2nodeComponentID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentConfigRemoval-Item */ +typedef struct E2nodeComponentConfigRemoval_Item { + E2nodeComponentInterfaceType_t e2nodeComponentInterfaceType; + E2nodeComponentID_t e2nodeComponentID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigRemoval_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemoval_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemoval_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemoval_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigRemoval_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigRemoval-List.h b/e2ap/headers/E2nodeComponentConfigRemoval-List.h new file mode 100644 index 0000000..4378418 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigRemoval-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigRemoval_List_H_ +#define _E2nodeComponentConfigRemoval_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 ProtocolIE_SingleContainer; + +/* E2nodeComponentConfigRemoval-List */ +typedef struct E2nodeComponentConfigRemoval_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigRemoval_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemoval_List; +extern asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigRemoval_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemoval_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2nodeComponentConfigRemoval_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigRemoval_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigRemovalAck-Item.h b/e2ap/headers/E2nodeComponentConfigRemovalAck-Item.h new file mode 100644 index 0000000..fc24a27 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigRemovalAck-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigRemovalAck_Item_H_ +#define _E2nodeComponentConfigRemovalAck_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "E2nodeComponentInterfaceType.h" +#include "E2nodeComponentID.h" +#include "E2nodeComponentConfigurationAck.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentConfigRemovalAck-Item */ +typedef struct E2nodeComponentConfigRemovalAck_Item { + E2nodeComponentInterfaceType_t e2nodeComponentInterfaceType; + E2nodeComponentID_t e2nodeComponentID; + E2nodeComponentConfigurationAck_t e2nodeComponentConfigurationAck; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigRemovalAck_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemovalAck_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemovalAck_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemovalAck_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigRemovalAck_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigRemovalAck-List.h b/e2ap/headers/E2nodeComponentConfigRemovalAck-List.h new file mode 100644 index 0000000..2219198 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigRemovalAck-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigRemovalAck_List_H_ +#define _E2nodeComponentConfigRemovalAck_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 ProtocolIE_SingleContainer; + +/* E2nodeComponentConfigRemovalAck-List */ +typedef struct E2nodeComponentConfigRemovalAck_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigRemovalAck_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemovalAck_List; +extern asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigRemovalAck_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemovalAck_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2nodeComponentConfigRemovalAck_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigRemovalAck_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigUpdate-Item.h b/e2ap/headers/E2nodeComponentConfigUpdate-Item.h new file mode 100644 index 0000000..f1af129 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigUpdate-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigUpdate_Item_H_ +#define _E2nodeComponentConfigUpdate_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "E2nodeComponentInterfaceType.h" +#include "E2nodeComponentID.h" +#include "E2nodeComponentConfiguration.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentConfigUpdate-Item */ +typedef struct E2nodeComponentConfigUpdate_Item { + E2nodeComponentInterfaceType_t e2nodeComponentInterfaceType; + E2nodeComponentID_t e2nodeComponentID; + E2nodeComponentConfiguration_t e2nodeComponentConfiguration; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigUpdate_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdate_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigUpdate_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdate_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigUpdate_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigUpdate-List.h b/e2ap/headers/E2nodeComponentConfigUpdate-List.h new file mode 100644 index 0000000..c98f72b --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigUpdate-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigUpdate_List_H_ +#define _E2nodeComponentConfigUpdate_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 ProtocolIE_SingleContainer; + +/* E2nodeComponentConfigUpdate-List */ +typedef struct E2nodeComponentConfigUpdate_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigUpdate_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdate_List; +extern asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigUpdate_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdate_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2nodeComponentConfigUpdate_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigUpdate_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigUpdateAck-Item.h b/e2ap/headers/E2nodeComponentConfigUpdateAck-Item.h new file mode 100644 index 0000000..14ef64f --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigUpdateAck-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigUpdateAck_Item_H_ +#define _E2nodeComponentConfigUpdateAck_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "E2nodeComponentInterfaceType.h" +#include "E2nodeComponentID.h" +#include "E2nodeComponentConfigurationAck.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentConfigUpdateAck-Item */ +typedef struct E2nodeComponentConfigUpdateAck_Item { + E2nodeComponentInterfaceType_t e2nodeComponentInterfaceType; + E2nodeComponentID_t e2nodeComponentID; + E2nodeComponentConfigurationAck_t e2nodeComponentConfigurationAck; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigUpdateAck_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdateAck_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigUpdateAck_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdateAck_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigUpdateAck_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigUpdateAck-List.h b/e2ap/headers/E2nodeComponentConfigUpdateAck-List.h new file mode 100644 index 0000000..2e317c2 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigUpdateAck-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigUpdateAck_List_H_ +#define _E2nodeComponentConfigUpdateAck_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 ProtocolIE_SingleContainer; + +/* E2nodeComponentConfigUpdateAck-List */ +typedef struct E2nodeComponentConfigUpdateAck_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigUpdateAck_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdateAck_List; +extern asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigUpdateAck_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdateAck_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2nodeComponentConfigUpdateAck_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigUpdateAck_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfiguration.h b/e2ap/headers/E2nodeComponentConfiguration.h new file mode 100644 index 0000000..6a1d3da --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfiguration.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfiguration_H_ +#define _E2nodeComponentConfiguration_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentConfiguration */ +typedef struct E2nodeComponentConfiguration { + OCTET_STRING_t e2nodeComponentRequestPart; + OCTET_STRING_t e2nodeComponentResponsePart; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfiguration_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfiguration; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfiguration_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfiguration_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfiguration_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentConfigurationAck.h b/e2ap/headers/E2nodeComponentConfigurationAck.h new file mode 100644 index 0000000..441f4b4 --- /dev/null +++ b/e2ap/headers/E2nodeComponentConfigurationAck.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentConfigurationAck_H_ +#define _E2nodeComponentConfigurationAck_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2nodeComponentConfigurationAck__updateOutcome { + E2nodeComponentConfigurationAck__updateOutcome_success = 0, + E2nodeComponentConfigurationAck__updateOutcome_failure = 1 + /* + * Enumeration is extensible + */ +} e_E2nodeComponentConfigurationAck__updateOutcome; + +/* Forward declarations */ +struct Cause; + +/* E2nodeComponentConfigurationAck */ +typedef struct E2nodeComponentConfigurationAck { + long updateOutcome; + struct Cause *failureCause; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentConfigurationAck_t; + +/* Implementation */ +/* extern asn_TYPE_descriptor_t asn_DEF_updateOutcome_2; // (Use -fall-defs-global to expose) */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigurationAck; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigurationAck_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigurationAck_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentConfigurationAck_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentID.h b/e2ap/headers/E2nodeComponentID.h new file mode 100644 index 0000000..c4c0f58 --- /dev/null +++ b/e2ap/headers/E2nodeComponentID.h @@ -0,0 +1,76 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentID_H_ +#define _E2nodeComponentID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2nodeComponentID_PR { + E2nodeComponentID_PR_NOTHING, /* No components present */ + E2nodeComponentID_PR_e2nodeComponentInterfaceTypeNG, + E2nodeComponentID_PR_e2nodeComponentInterfaceTypeXn, + E2nodeComponentID_PR_e2nodeComponentInterfaceTypeE1, + E2nodeComponentID_PR_e2nodeComponentInterfaceTypeF1, + E2nodeComponentID_PR_e2nodeComponentInterfaceTypeW1, + E2nodeComponentID_PR_e2nodeComponentInterfaceTypeS1, + E2nodeComponentID_PR_e2nodeComponentInterfaceTypeX2 + /* Extensions may appear below */ + +} E2nodeComponentID_PR; + +/* Forward declarations */ +struct E2nodeComponentInterfaceNG; +struct E2nodeComponentInterfaceXn; +struct E2nodeComponentInterfaceE1; +struct E2nodeComponentInterfaceF1; +struct E2nodeComponentInterfaceW1; +struct E2nodeComponentInterfaceS1; +struct E2nodeComponentInterfaceX2; + +/* E2nodeComponentID */ +typedef struct E2nodeComponentID { + E2nodeComponentID_PR present; + union E2nodeComponentID_u { + struct E2nodeComponentInterfaceNG *e2nodeComponentInterfaceTypeNG; + struct E2nodeComponentInterfaceXn *e2nodeComponentInterfaceTypeXn; + struct E2nodeComponentInterfaceE1 *e2nodeComponentInterfaceTypeE1; + struct E2nodeComponentInterfaceF1 *e2nodeComponentInterfaceTypeF1; + struct E2nodeComponentInterfaceW1 *e2nodeComponentInterfaceTypeW1; + struct E2nodeComponentInterfaceS1 *e2nodeComponentInterfaceTypeS1; + struct E2nodeComponentInterfaceX2 *e2nodeComponentInterfaceTypeX2; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentID; +extern asn_CHOICE_specifics_t asn_SPC_E2nodeComponentID_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentID_1[7]; +extern asn_per_constraints_t asn_PER_type_E2nodeComponentID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentID_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceE1.h b/e2ap/headers/E2nodeComponentInterfaceE1.h new file mode 100644 index 0000000..d0d4e07 --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceE1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceE1_H_ +#define _E2nodeComponentInterfaceE1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GNB-CU-UP-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentInterfaceE1 */ +typedef struct E2nodeComponentInterfaceE1 { + GNB_CU_UP_ID_t gNB_CU_CP_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentInterfaceE1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceE1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceE1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceE1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceE1_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceF1.h b/e2ap/headers/E2nodeComponentInterfaceF1.h new file mode 100644 index 0000000..b6907fa --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceF1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceF1_H_ +#define _E2nodeComponentInterfaceF1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GNB-DU-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentInterfaceF1 */ +typedef struct E2nodeComponentInterfaceF1 { + 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; +} E2nodeComponentInterfaceF1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceF1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceF1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceF1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceF1_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceNG.h b/e2ap/headers/E2nodeComponentInterfaceNG.h new file mode 100644 index 0000000..f7b4efe --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceNG.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceNG_H_ +#define _E2nodeComponentInterfaceNG_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "AMFName.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentInterfaceNG */ +typedef struct E2nodeComponentInterfaceNG { + AMFName_t amf_name; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentInterfaceNG_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceNG; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceNG_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceNG_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceNG_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceS1.h b/e2ap/headers/E2nodeComponentInterfaceS1.h new file mode 100644 index 0000000..67b174b --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceS1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceS1_H_ +#define _E2nodeComponentInterfaceS1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MMEname.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentInterfaceS1 */ +typedef struct E2nodeComponentInterfaceS1 { + MMEname_t mme_name; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentInterfaceS1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceS1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceS1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceS1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceS1_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceType.h b/e2ap/headers/E2nodeComponentInterfaceType.h new file mode 100644 index 0000000..515bc6d --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceType.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceType_H_ +#define _E2nodeComponentInterfaceType_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum E2nodeComponentInterfaceType { + E2nodeComponentInterfaceType_ng = 0, + E2nodeComponentInterfaceType_xn = 1, + E2nodeComponentInterfaceType_e1 = 2, + E2nodeComponentInterfaceType_f1 = 3, + E2nodeComponentInterfaceType_w1 = 4, + E2nodeComponentInterfaceType_s1 = 5, + E2nodeComponentInterfaceType_x2 = 6 + /* + * Enumeration is extensible + */ +} e_E2nodeComponentInterfaceType; + +/* E2nodeComponentInterfaceType */ +typedef long E2nodeComponentInterfaceType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_E2nodeComponentInterfaceType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceType; +extern const asn_INTEGER_specifics_t asn_SPC_E2nodeComponentInterfaceType_specs_1; +asn_struct_free_f E2nodeComponentInterfaceType_free; +asn_struct_print_f E2nodeComponentInterfaceType_print; +asn_constr_check_f E2nodeComponentInterfaceType_constraint; +ber_type_decoder_f E2nodeComponentInterfaceType_decode_ber; +der_type_encoder_f E2nodeComponentInterfaceType_encode_der; +xer_type_decoder_f E2nodeComponentInterfaceType_decode_xer; +xer_type_encoder_f E2nodeComponentInterfaceType_encode_xer; +jer_type_encoder_f E2nodeComponentInterfaceType_encode_jer; +oer_type_decoder_f E2nodeComponentInterfaceType_decode_oer; +oer_type_encoder_f E2nodeComponentInterfaceType_encode_oer; +per_type_decoder_f E2nodeComponentInterfaceType_decode_uper; +per_type_encoder_f E2nodeComponentInterfaceType_encode_uper; +per_type_decoder_f E2nodeComponentInterfaceType_decode_aper; +per_type_encoder_f E2nodeComponentInterfaceType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceType_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceW1.h b/e2ap/headers/E2nodeComponentInterfaceW1.h new file mode 100644 index 0000000..00d2413 --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceW1.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceW1_H_ +#define _E2nodeComponentInterfaceW1_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NGENB-DU-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentInterfaceW1 */ +typedef struct E2nodeComponentInterfaceW1 { + 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; +} E2nodeComponentInterfaceW1_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceW1; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceW1_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceW1_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceW1_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceX2.h b/e2ap/headers/E2nodeComponentInterfaceX2.h new file mode 100644 index 0000000..88ff874 --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceX2.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceX2_H_ +#define _E2nodeComponentInterfaceX2_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct GlobalENB_ID; +struct GlobalenGNB_ID; + +/* E2nodeComponentInterfaceX2 */ +typedef struct E2nodeComponentInterfaceX2 { + struct GlobalENB_ID *global_eNB_ID; /* OPTIONAL */ + struct GlobalenGNB_ID *global_en_gNB_ID; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentInterfaceX2_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceX2; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceX2_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceX2_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceX2_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeComponentInterfaceXn.h b/e2ap/headers/E2nodeComponentInterfaceXn.h new file mode 100644 index 0000000..1ae75a2 --- /dev/null +++ b/e2ap/headers/E2nodeComponentInterfaceXn.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeComponentInterfaceXn_H_ +#define _E2nodeComponentInterfaceXn_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "GlobalNG-RANNode-ID.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeComponentInterfaceXn */ +typedef struct E2nodeComponentInterfaceXn { + GlobalNG_RANNode_ID_t global_NG_RAN_Node_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeComponentInterfaceXn_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceXn; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceXn_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceXn_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeComponentInterfaceXn_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeConfigurationUpdate.h b/e2ap/headers/E2nodeConfigurationUpdate.h new file mode 100644 index 0000000..0eda6c8 --- /dev/null +++ b/e2ap/headers/E2nodeConfigurationUpdate.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeConfigurationUpdate_H_ +#define _E2nodeConfigurationUpdate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeConfigurationUpdate */ +typedef struct E2nodeConfigurationUpdate { + ProtocolIE_Container_85P18_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeConfigurationUpdate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdate; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdate_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdate_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeConfigurationUpdate_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeConfigurationUpdateAcknowledge.h b/e2ap/headers/E2nodeConfigurationUpdateAcknowledge.h new file mode 100644 index 0000000..ce7297a --- /dev/null +++ b/e2ap/headers/E2nodeConfigurationUpdateAcknowledge.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeConfigurationUpdateAcknowledge_H_ +#define _E2nodeConfigurationUpdateAcknowledge_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeConfigurationUpdateAcknowledge */ +typedef struct E2nodeConfigurationUpdateAcknowledge { + ProtocolIE_Container_85P19_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeConfigurationUpdateAcknowledge_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdateAcknowledge; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateAcknowledge_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateAcknowledge_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeConfigurationUpdateAcknowledge_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeConfigurationUpdateFailure.h b/e2ap/headers/E2nodeConfigurationUpdateFailure.h new file mode 100644 index 0000000..79e4f47 --- /dev/null +++ b/e2ap/headers/E2nodeConfigurationUpdateFailure.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeConfigurationUpdateFailure_H_ +#define _E2nodeConfigurationUpdateFailure_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeConfigurationUpdateFailure */ +typedef struct E2nodeConfigurationUpdateFailure { + ProtocolIE_Container_85P20_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeConfigurationUpdateFailure_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdateFailure; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateFailure_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateFailure_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeConfigurationUpdateFailure_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeTNLassociationRemoval-Item.h b/e2ap/headers/E2nodeTNLassociationRemoval-Item.h new file mode 100644 index 0000000..bcea87b --- /dev/null +++ b/e2ap/headers/E2nodeTNLassociationRemoval-Item.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeTNLassociationRemoval_Item_H_ +#define _E2nodeTNLassociationRemoval_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TNLinformation.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* E2nodeTNLassociationRemoval-Item */ +typedef struct E2nodeTNLassociationRemoval_Item { + TNLinformation_t tnlInformation; + TNLinformation_t tnlInformationRIC; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeTNLassociationRemoval_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeTNLassociationRemoval_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeTNLassociationRemoval_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeTNLassociationRemoval_Item_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeTNLassociationRemoval_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2nodeTNLassociationRemoval-List.h b/e2ap/headers/E2nodeTNLassociationRemoval-List.h new file mode 100644 index 0000000..23433a5 --- /dev/null +++ b/e2ap/headers/E2nodeTNLassociationRemoval-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _E2nodeTNLassociationRemoval_List_H_ +#define _E2nodeTNLassociationRemoval_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 ProtocolIE_SingleContainer; + +/* E2nodeTNLassociationRemoval-List */ +typedef struct E2nodeTNLassociationRemoval_List { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} E2nodeTNLassociationRemoval_List_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_E2nodeTNLassociationRemoval_List; +extern asn_SET_OF_specifics_t asn_SPC_E2nodeTNLassociationRemoval_List_specs_1; +extern asn_TYPE_member_t asn_MBR_E2nodeTNLassociationRemoval_List_1[1]; +extern asn_per_constraints_t asn_PER_type_E2nodeTNLassociationRemoval_List_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _E2nodeTNLassociationRemoval_List_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/E2setupFailure.h b/e2ap/headers/E2setupFailure.h index 9bfcf0b..9a4a9c4 100644 --- a/e2ap/headers/E2setupFailure.h +++ b/e2ap/headers/E2setupFailure.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2setupFailure_H_ #define _E2setupFailure_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* E2setupFailure */ typedef struct E2setupFailure { - ProtocolIE_Container_87P13_t protocolIEs; + ProtocolIE_Container_85P14_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct E2setupFailure { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/E2setupRequest.h b/e2ap/headers/E2setupRequest.h index c70a6a5..6643f12 100644 --- a/e2ap/headers/E2setupRequest.h +++ b/e2ap/headers/E2setupRequest.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2setupRequest_H_ #define _E2setupRequest_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* E2setupRequest */ typedef struct E2setupRequest { - ProtocolIE_Container_87P11_t protocolIEs; + ProtocolIE_Container_85P12_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct E2setupRequest { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/E2setupResponse.h b/e2ap/headers/E2setupResponse.h index f8920af..40ecd73 100644 --- a/e2ap/headers/E2setupResponse.h +++ b/e2ap/headers/E2setupResponse.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2setupResponse_H_ #define _E2setupResponse_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* E2setupResponse */ typedef struct E2setupResponse { - ProtocolIE_Container_87P12_t protocolIEs; + ProtocolIE_Container_85P13_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct E2setupResponse { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/ENB-ID-Choice.h b/e2ap/headers/ENB-ID-Choice.h index 0ccc3ee..626466b 100644 --- a/e2ap/headers/ENB-ID-Choice.h +++ b/e2ap/headers/ENB-ID-Choice.h @@ -1,19 +1,19 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ENB_ID_Choice_H_ #define _ENB_ID_Choice_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "BIT_STRING.h" +#include "constr_CHOICE.h" #ifdef __cplusplus extern "C" { @@ -57,4 +57,4 @@ extern asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1; #endif #endif /* _ENB_ID_Choice_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ENB-ID.h b/e2ap/headers/ENB-ID.h index 500a7d2..4b3860e 100644 --- a/e2ap/headers/ENB-ID.h +++ b/e2ap/headers/ENB-ID.h @@ -1,19 +1,19 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ENB_ID_H_ #define _ENB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "BIT_STRING.h" +#include "constr_CHOICE.h" #ifdef __cplusplus extern "C" { @@ -58,4 +58,4 @@ extern asn_per_constraints_t asn_PER_type_ENB_ID_constr_1; #endif #endif /* _ENB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ENGNB-ID.h b/e2ap/headers/ENGNB-ID.h index 58a8c7c..828c139 100644 --- a/e2ap/headers/ENGNB-ID.h +++ b/e2ap/headers/ENGNB-ID.h @@ -1,19 +1,19 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ENGNB_ID_H_ #define _ENGNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "BIT_STRING.h" +#include "constr_CHOICE.h" #ifdef __cplusplus extern "C" { @@ -53,4 +53,4 @@ extern asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1; #endif #endif /* _ENGNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/EXTERNAL.h b/e2ap/headers/EXTERNAL.h new file mode 100644 index 0000000..fdb5fec --- /dev/null +++ b/e2ap/headers/EXTERNAL.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "ASN1C-UsefulInformationObjectClasses" + * found in "/usr/local/share/asn1c/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _EXTERNAL_H_ +#define _EXTERNAL_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OBJECT_IDENTIFIER.h" +#include "NativeInteger.h" +#include "ObjectDescriptor.h" +#include "ANY.h" +#include "OCTET_STRING.h" +#include "BIT_STRING.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EXTERNAL__encoding_PR { + EXTERNAL__encoding_PR_NOTHING, /* No components present */ + EXTERNAL__encoding_PR_single_ASN1_type, + EXTERNAL__encoding_PR_octet_aligned, + EXTERNAL__encoding_PR_arbitrary +} EXTERNAL__encoding_PR; + +/* EXTERNAL */ +typedef struct EXTERNAL { + OBJECT_IDENTIFIER_t *direct_reference; /* OPTIONAL */ + long *indirect_reference; /* OPTIONAL */ + ObjectDescriptor_t *data_value_descriptor; /* OPTIONAL */ + struct EXTERNAL__encoding { + EXTERNAL__encoding_PR present; + union EXTERNAL__encoding_u { + ANY_t single_ASN1_type; + OCTET_STRING_t octet_aligned; + BIT_STRING_t arbitrary; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } encoding; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EXTERNAL_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EXTERNAL; + +#ifdef __cplusplus +} +#endif + +#endif /* _EXTERNAL_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/ErrorIndication.h b/e2ap/headers/ErrorIndication.h index 88e402e..22598a7 100644 --- a/e2ap/headers/ErrorIndication.h +++ b/e2ap/headers/ErrorIndication.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ErrorIndication_H_ #define _ErrorIndication_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* ErrorIndication */ typedef struct ErrorIndication { - ProtocolIE_Container_87P10_t protocolIEs; + ProtocolIE_Container_85P11_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct ErrorIndication { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/GNB-CU-UP-ID.h b/e2ap/headers/GNB-CU-UP-ID.h index d7df7d8..c80e7fc 100644 --- a/e2ap/headers/GNB-CU-UP-ID.h +++ b/e2ap/headers/GNB-CU-UP-ID.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_CU_UP_ID_H_ #define _GNB_CU_UP_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "INTEGER.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f GNB_CU_UP_ID_encode_jer; 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; @@ -43,4 +44,4 @@ per_type_encoder_f GNB_CU_UP_ID_encode_aper; #endif #endif /* _GNB_CU_UP_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GNB-DU-ID.h b/e2ap/headers/GNB-DU-ID.h index b0889fe..7404228 100644 --- a/e2ap/headers/GNB-DU-ID.h +++ b/e2ap/headers/GNB-DU-ID.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_DU_ID_H_ #define _GNB_DU_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "INTEGER.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f GNB_DU_ID_encode_jer; 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; @@ -43,4 +44,4 @@ per_type_encoder_f GNB_DU_ID_encode_aper; #endif #endif /* _GNB_DU_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GNB-ID-Choice.h b/e2ap/headers/GNB-ID-Choice.h index ec65f85..4edd2e8 100644 --- a/e2ap/headers/GNB-ID-Choice.h +++ b/e2ap/headers/GNB-ID-Choice.h @@ -1,19 +1,19 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_ID_Choice_H_ #define _GNB_ID_Choice_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "BIT_STRING.h" +#include "constr_CHOICE.h" #ifdef __cplusplus extern "C" { @@ -53,4 +53,4 @@ extern asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1; #endif #endif /* _GNB_ID_Choice_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalE2node-ID.h b/e2ap/headers/GlobalE2node-ID.h index 843e1c2..f84f251 100644 --- a/e2ap/headers/GlobalE2node-ID.h +++ b/e2ap/headers/GlobalE2node-ID.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalE2node_ID_H_ #define _GlobalE2node_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "constr_CHOICE.h" #ifdef __cplusplus extern "C" { @@ -64,4 +64,4 @@ extern asn_per_constraints_t asn_PER_type_GlobalE2node_ID_constr_1; #endif #endif /* _GlobalE2node_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalE2node-eNB-ID.h b/e2ap/headers/GlobalE2node-eNB-ID.h index c92e774..0df8b82 100644 --- a/e2ap/headers/GlobalE2node-eNB-ID.h +++ b/e2ap/headers/GlobalE2node-eNB-ID.h @@ -1,19 +1,19 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalE2node_eNB_ID_H_ #define _GlobalE2node_eNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "GlobalENB-ID.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[1]; #endif #endif /* _GlobalE2node_eNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalE2node-en-gNB-ID.h b/e2ap/headers/GlobalE2node-en-gNB-ID.h index b13588a..426ed19 100644 --- a/e2ap/headers/GlobalE2node-en-gNB-ID.h +++ b/e2ap/headers/GlobalE2node-en-gNB-ID.h @@ -1,19 +1,21 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalE2node_en_gNB_ID_H_ #define _GlobalE2node_en_gNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "GlobalenGNB-ID.h" -#include +#include "GNB-CU-UP-ID.h" +#include "GNB-DU-ID.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +23,9 @@ extern "C" { /* GlobalE2node-en-gNB-ID */ typedef struct GlobalE2node_en_gNB_ID { - GlobalenGNB_ID_t global_gNB_ID; + GlobalenGNB_ID_t global_en_gNB_ID; + GNB_CU_UP_ID_t *en_gNB_CU_UP_ID; /* OPTIONAL */ + GNB_DU_ID_t *en_gNB_DU_ID; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. @@ -34,11 +38,11 @@ typedef struct GlobalE2node_en_gNB_ID { /* 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]; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_en_gNB_ID_1[3]; #ifdef __cplusplus } #endif #endif /* _GlobalE2node_en_gNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalE2node-gNB-ID.h b/e2ap/headers/GlobalE2node-gNB-ID.h index a2121b9..a18fe28 100644 --- a/e2ap/headers/GlobalE2node-gNB-ID.h +++ b/e2ap/headers/GlobalE2node-gNB-ID.h @@ -1,29 +1,33 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalE2node_gNB_ID_H_ #define _GlobalE2node_gNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "GlobalgNB-ID.h" #include "GNB-CU-UP-ID.h" #include "GNB-DU-ID.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { #endif +/* Forward declarations */ +struct GlobalenGNB_ID; + /* GlobalE2node-gNB-ID */ typedef struct GlobalE2node_gNB_ID { GlobalgNB_ID_t global_gNB_ID; + struct GlobalenGNB_ID *global_en_gNB_ID; /* OPTIONAL */ GNB_CU_UP_ID_t *gNB_CU_UP_ID; /* OPTIONAL */ GNB_DU_ID_t *gNB_DU_ID; /* OPTIONAL */ /* @@ -38,11 +42,11 @@ typedef struct GlobalE2node_gNB_ID { /* 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]; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_gNB_ID_1[4]; #ifdef __cplusplus } #endif #endif /* _GlobalE2node_gNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalE2node-ng-eNB-ID.h b/e2ap/headers/GlobalE2node-ng-eNB-ID.h index 7a3e0f5..7bbc3d5 100644 --- a/e2ap/headers/GlobalE2node-ng-eNB-ID.h +++ b/e2ap/headers/GlobalE2node-ng-eNB-ID.h @@ -1,27 +1,33 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalE2node_ng_eNB_ID_H_ #define _GlobalE2node_ng_eNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "GlobalngeNB-ID.h" -#include +#include "NGENB-DU-ID.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { #endif +/* Forward declarations */ +struct GlobalENB_ID; + /* GlobalE2node-ng-eNB-ID */ typedef struct GlobalE2node_ng_eNB_ID { GlobalngeNB_ID_t global_ng_eNB_ID; + struct GlobalENB_ID *global_eNB_ID; /* OPTIONAL */ + NGENB_DU_ID_t *ngENB_DU_ID; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. @@ -34,11 +40,11 @@ typedef struct GlobalE2node_ng_eNB_ID { /* 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]; +extern asn_TYPE_member_t asn_MBR_GlobalE2node_ng_eNB_ID_1[3]; #ifdef __cplusplus } #endif #endif /* _GlobalE2node_ng_eNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalENB-ID.h b/e2ap/headers/GlobalENB-ID.h index 2b6cf1c..5555c4e 100644 --- a/e2ap/headers/GlobalENB-ID.h +++ b/e2ap/headers/GlobalENB-ID.h @@ -1,20 +1,20 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalENB_ID_H_ #define _GlobalENB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "PLMN-Identity.h" #include "ENB-ID.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[2]; #endif #endif /* _GlobalENB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalNG-RANNode-ID.h b/e2ap/headers/GlobalNG-RANNode-ID.h new file mode 100644 index 0000000..326bcbe --- /dev/null +++ b/e2ap/headers/GlobalNG-RANNode-ID.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _GlobalNG_RANNode_ID_H_ +#define _GlobalNG_RANNode_ID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GlobalNG_RANNode_ID_PR { + GlobalNG_RANNode_ID_PR_NOTHING, /* No components present */ + GlobalNG_RANNode_ID_PR_gNB, + GlobalNG_RANNode_ID_PR_ng_eNB + /* Extensions may appear below */ + +} GlobalNG_RANNode_ID_PR; + +/* Forward declarations */ +struct GlobalgNB_ID; +struct GlobalngeNB_ID; + +/* GlobalNG-RANNode-ID */ +typedef struct GlobalNG_RANNode_ID { + GlobalNG_RANNode_ID_PR present; + union GlobalNG_RANNode_ID_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; +} GlobalNG_RANNode_ID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalNG_RANNode_ID; +extern asn_CHOICE_specifics_t asn_SPC_GlobalNG_RANNode_ID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalNG_RANNode_ID_1[2]; +extern asn_per_constraints_t asn_PER_type_GlobalNG_RANNode_ID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalNG_RANNode_ID_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalRIC-ID.h b/e2ap/headers/GlobalRIC-ID.h index ad389c3..a5a7dee 100644 --- a/e2ap/headers/GlobalRIC-ID.h +++ b/e2ap/headers/GlobalRIC-ID.h @@ -1,20 +1,20 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalRIC_ID_H_ #define _GlobalRIC_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "PLMN-Identity.h" -#include -#include +#include "BIT_STRING.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_GlobalRIC_ID_1[2]; #endif #endif /* _GlobalRIC_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalenGNB-ID.h b/e2ap/headers/GlobalenGNB-ID.h index 7df68b1..ae9a86c 100644 --- a/e2ap/headers/GlobalenGNB-ID.h +++ b/e2ap/headers/GlobalenGNB-ID.h @@ -1,20 +1,20 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalenGNB_ID_H_ #define _GlobalenGNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "PLMN-Identity.h" #include "ENGNB-ID.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[2]; #endif #endif /* _GlobalenGNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalgNB-ID.h b/e2ap/headers/GlobalgNB-ID.h index 242edf2..82478b4 100644 --- a/e2ap/headers/GlobalgNB-ID.h +++ b/e2ap/headers/GlobalgNB-ID.h @@ -1,20 +1,20 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalgNB_ID_H_ #define _GlobalgNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "PLMN-Identity.h" #include "GNB-ID-Choice.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[2]; #endif #endif /* _GlobalgNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GlobalngeNB-ID.h b/e2ap/headers/GlobalngeNB-ID.h index 8aba4cc..9834104 100644 --- a/e2ap/headers/GlobalngeNB-ID.h +++ b/e2ap/headers/GlobalngeNB-ID.h @@ -1,20 +1,20 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalngeNB_ID_H_ #define _GlobalngeNB_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "PLMN-Identity.h" #include "ENB-ID-Choice.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[2]; #endif #endif /* _GlobalngeNB_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/GraphicString.h b/e2ap/headers/GraphicString.h new file mode 100644 index 0000000..807e9d6 --- /dev/null +++ b/e2ap/headers/GraphicString.h @@ -0,0 +1,56 @@ +/*- + * 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 + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define GraphicString_print OCTET_STRING_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define GraphicString_compare OCTET_STRING_compare + +#define GraphicString_constraint asn_generic_unknown_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define GraphicString_decode_ber OCTET_STRING_decode_ber +#define GraphicString_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define GraphicString_decode_xer OCTET_STRING_decode_xer_hex +#define GraphicString_encode_xer OCTET_STRING_encode_xer +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define GraphicString_encode_jer OCTET_STRING_encode_jer +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define GraphicString_decode_uper OCTET_STRING_decode_uper +#define GraphicString_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define GraphicString_decode_aper OCTET_STRING_decode_aper +#define GraphicString_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _GraphicString_H_ */ diff --git a/e2ap/headers/INTEGER.h b/e2ap/headers/INTEGER.h index f776c07..1666e0b 100644 --- a/e2ap/headers/INTEGER.h +++ b/e2ap/headers/INTEGER.h @@ -35,21 +35,52 @@ typedef struct asn_INTEGER_specifics_s { 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 +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); + +#define INTEGER_free ASN__PRIMITIVE_TYPE_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f INTEGER_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f INTEGER_compare; + +#define INTEGER_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define INTEGER_decode_ber ber_decode_primitive der_type_encoder_f INTEGER_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f INTEGER_decode_xer; xer_type_encoder_f INTEGER_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f INTEGER_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f INTEGER_decode_oer; oer_type_encoder_f INTEGER_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f INTEGER_decode_uper; per_type_encoder_f INTEGER_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f INTEGER_decode_aper; per_type_encoder_f INTEGER_encode_aper; -asn_random_fill_f INTEGER_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f INTEGER_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ /*********************************** * Some handy conversion routines. * @@ -83,8 +114,8 @@ 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 */ + ASN_STRTOX_OK = 0, /* Conversion succeeded, number ends at (*end) */ + ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeeded, but the string has extra stuff */ }; enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end, long *l); diff --git a/e2ap/headers/InitiatingMessage.h b/e2ap/headers/InitiatingMessage.h index fd10bc7..42dbfaf 100644 --- a/e2ap/headers/InitiatingMessage.h +++ b/e2ap/headers/InitiatingMessage.h @@ -1,21 +1,21 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InitiatingMessage_H_ #define _InitiatingMessage_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProcedureCode.h" #include "Criticality.h" -#include -#include +#include "ANY.h" +#include "asn_ioc.h" #include "RICsubscriptionRequest.h" #include "RICsubscriptionResponse.h" #include "RICsubscriptionFailure.h" @@ -31,14 +31,21 @@ #include "E2setupRequest.h" #include "E2setupResponse.h" #include "E2setupFailure.h" +#include "E2nodeConfigurationUpdate.h" +#include "E2nodeConfigurationUpdateAcknowledge.h" +#include "E2nodeConfigurationUpdateFailure.h" +#include "E2connectionUpdate.h" +#include "E2connectionUpdateAcknowledge.h" +#include "E2connectionUpdateFailure.h" #include "ResetRequest.h" #include "ResetResponse.h" #include "RICindication.h" #include "RICserviceQuery.h" #include "ErrorIndication.h" -#include -#include -#include +#include "RICsubscriptionDeleteRequired.h" +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -52,10 +59,13 @@ typedef enum InitiatingMessage__value_PR { InitiatingMessage__value_PR_RICserviceUpdate, InitiatingMessage__value_PR_RICcontrolRequest, InitiatingMessage__value_PR_E2setupRequest, + InitiatingMessage__value_PR_E2nodeConfigurationUpdate, + InitiatingMessage__value_PR_E2connectionUpdate, InitiatingMessage__value_PR_ResetRequest, InitiatingMessage__value_PR_RICindication, InitiatingMessage__value_PR_RICserviceQuery, - InitiatingMessage__value_PR_ErrorIndication + InitiatingMessage__value_PR_ErrorIndication, + InitiatingMessage__value_PR_RICsubscriptionDeleteRequired } InitiatingMessage__value_PR; /* InitiatingMessage */ @@ -70,10 +80,13 @@ typedef struct InitiatingMessage { RICserviceUpdate_t RICserviceUpdate; RICcontrolRequest_t RICcontrolRequest; E2setupRequest_t E2setupRequest; + E2nodeConfigurationUpdate_t E2nodeConfigurationUpdate; + E2connectionUpdate_t E2connectionUpdate; ResetRequest_t ResetRequest; RICindication_t RICindication; RICserviceQuery_t RICserviceQuery; ErrorIndication_t ErrorIndication; + RICsubscriptionDeleteRequired_t RICsubscriptionDeleteRequired; } choice; /* Context for parsing across buffer boundaries */ @@ -94,4 +107,4 @@ extern asn_TYPE_member_t asn_MBR_InitiatingMessage_1[3]; #endif #endif /* _InitiatingMessage_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/MMEname.h b/e2ap/headers/MMEname.h new file mode 100644 index 0000000..20e8239 --- /dev/null +++ b/e2ap/headers/MMEname.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _MMEname_H_ +#define _MMEname_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PrintableString.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* MMEname */ +typedef PrintableString_t MMEname_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_MMEname_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_MMEname; +asn_struct_free_f MMEname_free; +asn_struct_print_f MMEname_print; +asn_constr_check_f MMEname_constraint; +ber_type_decoder_f MMEname_decode_ber; +der_type_encoder_f MMEname_encode_der; +xer_type_decoder_f MMEname_decode_xer; +xer_type_encoder_f MMEname_encode_xer; +jer_type_encoder_f MMEname_encode_jer; +oer_type_decoder_f MMEname_decode_oer; +oer_type_encoder_f MMEname_encode_oer; +per_type_decoder_f MMEname_decode_uper; +per_type_encoder_f MMEname_encode_uper; +per_type_decoder_f MMEname_decode_aper; +per_type_encoder_f MMEname_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _MMEname_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/NGENB-DU-ID.h b/e2ap/headers/NGENB-DU-ID.h new file mode 100644 index 0000000..307863e --- /dev/null +++ b/e2ap/headers/NGENB-DU-ID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#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; +jer_type_encoder_f NGENB_DU_ID_encode_jer; +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 "asn_internal.h" diff --git a/e2ap/headers/NativeEnumerated.h b/e2ap/headers/NativeEnumerated.h index 459f0e6..0c711e3 100644 --- a/e2ap/headers/NativeEnumerated.h +++ b/e2ap/headers/NativeEnumerated.h @@ -21,22 +21,53 @@ extern "C" { extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; extern asn_TYPE_operation_t asn_OP_NativeEnumerated; +#define NativeEnumerated_free NativeInteger_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define NativeEnumerated_print NativeInteger_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define NativeEnumerated_compare NativeInteger_compare + +#define NativeEnumerated_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define NativeEnumerated_decode_ber NativeInteger_decode_ber +#define NativeEnumerated_encode_der NativeInteger_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define NativeEnumerated_decode_xer NativeInteger_decode_xer xer_type_encoder_f NativeEnumerated_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f NativeEnumerated_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f NativeEnumerated_decode_oer; oer_type_encoder_f NativeEnumerated_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f NativeEnumerated_decode_uper; per_type_encoder_f NativeEnumerated_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f NativeEnumerated_decode_aper; per_type_encoder_f NativeEnumerated_encode_aper; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#define NativeEnumerated_free NativeInteger_free -#define NativeEnumerated_print NativeInteger_print -#define NativeEnumerated_compare NativeInteger_compare +#if !defined(ASN_DISABLE_RFILL_SUPPORT) #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 +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +int NativeEnumerated__compar_value2enum( + const void *ap, + const void *bp); +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2ap/headers/NativeInteger.h b/e2ap/headers/NativeInteger.h index c74406a..3a47c11 100644 --- a/e2ap/headers/NativeInteger.h +++ b/e2ap/headers/NativeInteger.h @@ -22,22 +22,47 @@ extern "C" { extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; extern asn_TYPE_operation_t asn_OP_NativeInteger; -asn_struct_free_f NativeInteger_free; +asn_struct_free_f NativeInteger_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f NativeInteger_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f NativeInteger_compare; + +#define NativeInteger_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f NativeInteger_decode_ber; der_type_encoder_f NativeInteger_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f NativeInteger_decode_xer; xer_type_encoder_f NativeInteger_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f NativeInteger_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f NativeInteger_decode_oer; oer_type_encoder_f NativeInteger_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f NativeInteger_decode_uper; per_type_encoder_f NativeInteger_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f NativeInteger_decode_aper; per_type_encoder_f NativeInteger_encode_aper; -asn_random_fill_f NativeInteger_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#define NativeInteger_constraint asn_generic_no_constraint +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f NativeInteger_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2ap/headers/OBJECT_IDENTIFIER.h b/e2ap/headers/OBJECT_IDENTIFIER.h new file mode 100644 index 0000000..f878055 --- /dev/null +++ b/e2ap/headers/OBJECT_IDENTIFIER.h @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _OBJECT_IDENTIFIER_H_ +#define _OBJECT_IDENTIFIER_H_ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef uint32_t asn_oid_arc_t; +#define ASN_OID_ARC_MAX (~((asn_oid_arc_t)0)) + +typedef ASN__PRIMITIVE_TYPE_t OBJECT_IDENTIFIER_t; + +extern asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER; +extern asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER; + +ssize_t OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st, + asn_app_consume_bytes_f *cb, + void *app_key); + +#define OBJECT_IDENTIFIER_free ASN__PRIMITIVE_TYPE_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +asn_struct_print_f OBJECT_IDENTIFIER_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define OBJECT_IDENTIFIER_compare OCTET_STRING_compare + +asn_constr_check_f OBJECT_IDENTIFIER_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_ber ber_decode_primitive +#define OBJECT_IDENTIFIER_encode_der der_encode_primitive +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +xer_type_decoder_f OBJECT_IDENTIFIER_decode_xer; +xer_type_encoder_f OBJECT_IDENTIFIER_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f OBJECT_IDENTIFIER_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_oer oer_decode_primitive +#define OBJECT_IDENTIFIER_encode_oer oer_encode_primitive +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_uper OCTET_STRING_decode_uper +#define OBJECT_IDENTIFIER_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_aper OCTET_STRING_decode_aper +#define OBJECT_IDENTIFIER_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f OBJECT_IDENTIFIER_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +/********************************** + * Some handy conversion routines * + **********************************/ + +/* + * This function fills an (arcs) array with OBJECT IDENTIFIER arcs + * up to specified (arc_slots) elements. + * + * EXAMPLE: + * void print_arcs(OBJECT_IDENTIFIER_t *oid) { + * asn_oid_arc_t fixed_arcs[10]; // Try with fixed space first + * asn_oid_arc_t *arcs = fixed_arcs; + * size_t arc_slots = sizeof(fixed_arcs)/sizeof(fixed_arcs[0]); // 10 + * ssize_t count; // Real number of arcs. + * int i; + * + * count = OBJECT_IDENTIFIER_get_arcs(oid, arcs, arc_slots); + * // If necessary, reallocate arcs array and try again. + * if(count > arc_slots) { + * arc_slots = count; + * arcs = malloc(sizeof(asn_oid_arc_t) * arc_slots); + * if(!arcs) return; + * count = OBJECT_IDENTIFIER_get_arcs(oid, arcs, arc_slots); + * assert(count == arc_slots); + * } + * + * // Print the contents of the arcs array. + * for(i = 0; i < count; i++) + * printf("%"PRIu32"\n", arcs[i]); + * + * // Avoid memory leak. + * if(arcs != fixed_arcs) free(arcs); + * } + * + * RETURN VALUES: + * -1/EINVAL: Invalid arguments (oid is missing) + * -1/ERANGE: One or more arcs have value out of array cell type range. + * >=0: Number of arcs contained in the OBJECT IDENTIFIER + * + * WARNING: The function always returns the actual number of arcs, + * even if there is no sufficient (arc_slots) provided. + */ +ssize_t OBJECT_IDENTIFIER_get_arcs(const OBJECT_IDENTIFIER_t *oid, + asn_oid_arc_t *arcs, size_t arc_slots); + +/* + * This functions initializes the OBJECT IDENTIFIER object with + * the given set of arcs. + * The minimum of two arcs must be present; some restrictions apply. + * RETURN VALUES: + * -1/EINVAL: Invalid arguments + * -1/ERANGE: The first two arcs do not conform to ASN.1 restrictions. + * -1/ENOMEM: Memory allocation failed + * 0: The object was initialized with new arcs. + */ +int OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *oid, + const asn_oid_arc_t *arcs, size_t arcs_count); + + +/* + * Parse the OBJECT IDENTIFIER textual representation ("1.3.6.1.4.1.9363"). + * No arc can exceed the (0..ASN_OID_ARC_MAX, which is the same as UINT32_MAX). + * This function is not specific to OBJECT IDENTIFIER, it may be used to parse + * the RELATIVE-OID data, or any other data consisting of dot-separated + * series of numeric values. + * + * If (oid_txt_length == -1), the strlen() will be invoked to determine the + * size of the (oid_text) string. + * + * After return, the optional (opt_oid_text_end) is set to the character after + * the last parsed one. (opt_oid_text_end) is never less than (oid_text). + * + * RETURN VALUES: + * -1: Parse error. + * >= 0: Number of arcs contained in the OBJECT IDENTIFIER. + * + * WARNING: The function always returns the real number of arcs, + * even if there is no sufficient (arc_slots) provided. + * This is useful for (arc_slots) value estimation. + */ +ssize_t OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, + ssize_t oid_txt_length, + asn_oid_arc_t *arcs, size_t arcs_count, + const char **opt_oid_text_end); + +/* + * Internal functions. + * Used by RELATIVE-OID implementation in particular. + */ + +/* + * Retrieve a single arc of size from the (arcbuf) buffer. + * RETURN VALUES: + * -1: Failed to retrieve the value from the (arcbuf). + * >0: Number of bytes consumed from the (arcbuf), <= (arcbuf_len). + */ +ssize_t OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, + size_t arcbuf_len, + asn_oid_arc_t *ret_value); + +/* + * Write the unterminated arc value into the (arcbuf) which has the size at + * least (arcbuf_len). + * RETURN VALUES: + * -1: (arcbuf_len) size is not sufficient to write the value. + * : Number of bytes appended to the arcbuf (<= arcbuf_len). + */ +ssize_t OBJECT_IDENTIFIER_set_single_arc(uint8_t *arcbuf, size_t arcbuf_len, + asn_oid_arc_t arc_value); + +#ifdef __cplusplus +} +#endif + +#endif /* _OBJECT_IDENTIFIER_H_ */ diff --git a/e2ap/headers/OCTET_STRING.h b/e2ap/headers/OCTET_STRING.h index c2f8bae..b1ace14 100644 --- a/e2ap/headers/OCTET_STRING.h +++ b/e2ap/headers/OCTET_STRING.h @@ -22,27 +22,73 @@ 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; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f OCTET_STRING_print; asn_struct_print_f OCTET_STRING_print_utf8; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f OCTET_STRING_compare; + +#define OCTET_STRING_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) 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 */ +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +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; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f OCTET_STRING_encode_jer; +jer_type_encoder_f OCTET_STRING_encode_jer_utf8; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f OCTET_STRING_decode_oer; oer_type_encoder_f OCTET_STRING_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f OCTET_STRING_decode_uper; per_type_encoder_f OCTET_STRING_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) 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 +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f OCTET_STRING_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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); + +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); +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ /****************************** * Handy conversion routines. * ******************************/ @@ -95,6 +141,23 @@ size_t OCTET_STRING_random_length_constrained( const asn_TYPE_descriptor_t *, const asn_encoding_constraints_t *, size_t max_length); +#if !defined(ASN_DISABLE_BER_SUPPORT) +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; +}; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + #ifdef __cplusplus } #endif diff --git a/e2ap/headers/OPEN_TYPE.h b/e2ap/headers/OPEN_TYPE.h index b0d023c..5e97977 100644 --- a/e2ap/headers/OPEN_TYPE.h +++ b/e2ap/headers/OPEN_TYPE.h @@ -6,70 +6,110 @@ #define ASN_OPEN_TYPE_H #include +///////////#include #ifdef __cplusplus extern "C" { #endif +/* + * Decode an Open Type which is potentially constraiend + * by the other members of the parent structure. + */ + +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + #define OPEN_TYPE_free CHOICE_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) #define OPEN_TYPE_print CHOICE_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + #define OPEN_TYPE_compare CHOICE_compare + #define OPEN_TYPE_constraint CHOICE_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +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); #define OPEN_TYPE_decode_ber NULL #define OPEN_TYPE_encode_der CHOICE_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +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); #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 +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ -extern asn_TYPE_operation_t asn_OP_OPEN_TYPE; +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define OPEN_TYPE_encode_jer CHOICE_encode_jer +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ -/* - * 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); +#if !defined(ASN_DISABLE_OER_SUPPORT) +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); +#define OPEN_TYPE_decode_oer NULL +#define OPEN_TYPE_encode_oer CHOICE_encode_oer +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) +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); +#define OPEN_TYPE_decode_uper NULL 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); - +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +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); +#define OPEN_TYPE_decode_aper NULL 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); +int OPEN_TYPE_aper_is_unknown_type( + const asn_TYPE_descriptor_t *td, + void *sptr, + const asn_TYPE_member_t *elm); + +asn_dec_rval_t OPEN_TYPE_aper_unknown_type_discard_bytes( + asn_per_data_t *pd); +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +extern asn_TYPE_operation_t asn_OP_OPEN_TYPE; + #ifdef __cplusplus } #endif diff --git a/e2ap/headers/ObjectDescriptor.h b/e2ap/headers/ObjectDescriptor.h new file mode 100644 index 0000000..852c45d --- /dev/null +++ b/e2ap/headers/ObjectDescriptor.h @@ -0,0 +1,54 @@ +/*- + * 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 + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define ObjectDescriptor_print OCTET_STRING_print_utf8 +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define ObjectDescriptor_constraint asn_generic_unknown_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define ObjectDescriptor_decode_ber OCTET_STRING_decode_ber +#define ObjectDescriptor_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define ObjectDescriptor_decode_xer OCTET_STRING_decode_xer_utf8 +#define ObjectDescriptor_encode_xer OCTET_STRING_encode_xer_utf8 +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define ObjectDescriptor_encode_jer OCTET_STRING_encode_jer_utf8 +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define ObjectDescriptor_decode_uper OCTET_STRING_decode_uper +#define ObjectDescriptor_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define ObjectDescriptor_decode_aper OCTET_STRING_decode_aper +#define ObjectDescriptor_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _ObjectDescriptor_H_ */ diff --git a/e2ap/headers/PLMN-Identity.h b/e2ap/headers/PLMN-Identity.h index 2fb1a85..d3fbb8c 100644 --- a/e2ap/headers/PLMN-Identity.h +++ b/e2ap/headers/PLMN-Identity.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _PLMN_Identity_H_ #define _PLMN_Identity_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f PLMN_Identity_encode_jer; oer_type_decoder_f PLMN_Identity_decode_oer; oer_type_encoder_f PLMN_Identity_encode_oer; per_type_decoder_f PLMN_Identity_decode_uper; @@ -43,4 +44,4 @@ per_type_encoder_f PLMN_Identity_encode_aper; #endif #endif /* _PLMN_Identity_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/Presence.h b/e2ap/headers/Presence.h index 06713ac..23a2f8d 100644 --- a/e2ap/headers/Presence.h +++ b/e2ap/headers/Presence.h @@ -1,18 +1,18 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _Presence_H_ #define _Presence_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -39,6 +39,7 @@ 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; +jer_type_encoder_f Presence_encode_jer; oer_type_decoder_f Presence_decode_oer; oer_type_encoder_f Presence_encode_oer; per_type_decoder_f Presence_decode_uper; @@ -51,4 +52,4 @@ per_type_encoder_f Presence_encode_aper; #endif #endif /* _Presence_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/PrintableString.h b/e2ap/headers/PrintableString.h new file mode 100644 index 0000000..c24861d --- /dev/null +++ b/e2ap/headers/PrintableString.h @@ -0,0 +1,56 @@ +/*- + * 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; + +#define PrintableString_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define PrintableString_print OCTET_STRING_print_utf8 +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define PrintableString_compare OCTET_STRING_compare + +asn_constr_check_f PrintableString_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define PrintableString_decode_ber OCTET_STRING_decode_ber +#define PrintableString_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define PrintableString_decode_xer OCTET_STRING_decode_xer_utf8 +#define PrintableString_encode_xer OCTET_STRING_encode_xer_utf8 +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define PrintableString_encode_jer OCTET_STRING_encode_jer_utf8 +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define PrintableString_decode_uper OCTET_STRING_decode_uper +#define PrintableString_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define PrintableString_decode_aper OCTET_STRING_decode_aper +#define PrintableString_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _PrintableString_H_ */ diff --git a/e2ap/headers/ProcedureCode.h b/e2ap/headers/ProcedureCode.h index 2b76e8b..f75ccb9 100644 --- a/e2ap/headers/ProcedureCode.h +++ b/e2ap/headers/ProcedureCode.h @@ -1,18 +1,18 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProcedureCode_H_ #define _ProcedureCode_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeInteger.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f ProcedureCode_encode_jer; oer_type_decoder_f ProcedureCode_decode_oer; oer_type_encoder_f ProcedureCode_encode_oer; per_type_decoder_f ProcedureCode_decode_uper; @@ -46,10 +47,13 @@ per_type_encoder_f ProcedureCode_encode_aper; #define ProcedureCode_id_RICserviceUpdate ((ProcedureCode_t)7) #define ProcedureCode_id_RICsubscription ((ProcedureCode_t)8) #define ProcedureCode_id_RICsubscriptionDelete ((ProcedureCode_t)9) +#define ProcedureCode_id_E2nodeConfigurationUpdate ((ProcedureCode_t)10) +#define ProcedureCode_id_E2connectionUpdate ((ProcedureCode_t)11) +#define ProcedureCode_id_RICsubscriptionDeleteRequired ((ProcedureCode_t)12) #ifdef __cplusplus } #endif #endif /* _ProcedureCode_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-Container.h b/e2ap/headers/ProtocolIE-Container.h index 361db9c..703ef75 100644 --- a/e2ap/headers/ProtocolIE-Container.h +++ b/e2ap/headers/ProtocolIE-Container.h @@ -1,19 +1,19 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_Container_H_ #define _ProtocolIE_Container_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -26,6 +26,7 @@ struct RICsubscriptionFailure_IEs; struct RICsubscriptionDeleteRequest_IEs; struct RICsubscriptionDeleteResponse_IEs; struct RICsubscriptionDeleteFailure_IEs; +struct RICsubscriptionDeleteRequired_IEs; struct RICindication_IEs; struct RICcontrolRequest_IEs; struct RICcontrolAcknowledge_IEs; @@ -34,6 +35,12 @@ struct ErrorIndication_IEs; struct E2setupRequestIEs; struct E2setupResponseIEs; struct E2setupFailureIEs; +struct E2connectionUpdate_IEs; +struct E2connectionUpdateAck_IEs; +struct E2connectionUpdateFailure_IEs; +struct E2nodeConfigurationUpdate_IEs; +struct E2nodeConfigurationUpdateAcknowledge_IEs; +struct E2nodeConfigurationUpdateFailure_IEs; struct ResetRequestIEs; struct ResetResponseIEs; struct RICserviceUpdate_IEs; @@ -42,212 +49,282 @@ struct RICserviceUpdateFailure_IEs; struct RICserviceQuery_IEs; /* ProtocolIE-Container */ -typedef struct ProtocolIE_Container_87P0 { +typedef struct ProtocolIE_Container_85P0 { 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 { +} ProtocolIE_Container_85P0_t; +typedef struct ProtocolIE_Container_85P1 { 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 { +} ProtocolIE_Container_85P1_t; +typedef struct ProtocolIE_Container_85P2 { 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 { +} ProtocolIE_Container_85P2_t; +typedef struct ProtocolIE_Container_85P3 { 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 { +} ProtocolIE_Container_85P3_t; +typedef struct ProtocolIE_Container_85P4 { 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 { +} ProtocolIE_Container_85P4_t; +typedef struct ProtocolIE_Container_85P5 { 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 { +} ProtocolIE_Container_85P5_t; +typedef struct ProtocolIE_Container_85P6 { + A_SEQUENCE_OF(struct RICsubscriptionDeleteRequired_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_85P6_t; +typedef struct ProtocolIE_Container_85P7 { 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 { +} ProtocolIE_Container_85P7_t; +typedef struct ProtocolIE_Container_85P8 { 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 { +} ProtocolIE_Container_85P8_t; +typedef struct ProtocolIE_Container_85P9 { 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 { +} ProtocolIE_Container_85P9_t; +typedef struct ProtocolIE_Container_85P10 { 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 { +} ProtocolIE_Container_85P10_t; +typedef struct ProtocolIE_Container_85P11 { 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 { +} ProtocolIE_Container_85P11_t; +typedef struct ProtocolIE_Container_85P12 { 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 { +} ProtocolIE_Container_85P12_t; +typedef struct ProtocolIE_Container_85P13 { 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 { +} ProtocolIE_Container_85P13_t; +typedef struct ProtocolIE_Container_85P14 { 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 { +} ProtocolIE_Container_85P14_t; +typedef struct ProtocolIE_Container_85P15 { + A_SEQUENCE_OF(struct E2connectionUpdate_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_85P15_t; +typedef struct ProtocolIE_Container_85P16 { + A_SEQUENCE_OF(struct E2connectionUpdateAck_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_85P16_t; +typedef struct ProtocolIE_Container_85P17 { + A_SEQUENCE_OF(struct E2connectionUpdateFailure_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_85P17_t; +typedef struct ProtocolIE_Container_85P18 { + A_SEQUENCE_OF(struct E2nodeConfigurationUpdate_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_85P18_t; +typedef struct ProtocolIE_Container_85P19 { + A_SEQUENCE_OF(struct E2nodeConfigurationUpdateAcknowledge_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_85P19_t; +typedef struct ProtocolIE_Container_85P20 { + A_SEQUENCE_OF(struct E2nodeConfigurationUpdateFailure_IEs) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ProtocolIE_Container_85P20_t; +typedef struct ProtocolIE_Container_85P21 { 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 { +} ProtocolIE_Container_85P21_t; +typedef struct ProtocolIE_Container_85P22 { 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 { +} ProtocolIE_Container_85P22_t; +typedef struct ProtocolIE_Container_85P23 { 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 { +} ProtocolIE_Container_85P23_t; +typedef struct ProtocolIE_Container_85P24 { 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 { +} ProtocolIE_Container_85P24_t; +typedef struct ProtocolIE_Container_85P25 { 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 { +} ProtocolIE_Container_85P25_t; +typedef struct ProtocolIE_Container_85P26 { A_SEQUENCE_OF(struct RICserviceQuery_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; -} ProtocolIE_Container_87P19_t; +} ProtocolIE_Container_85P26_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; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P0; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P0_specs_1; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P0_1[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P1; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P1_specs_3; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P1_3[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P1_constr_3; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P2; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P2_specs_5; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P2_5[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P2_constr_5; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P3; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P3_specs_7; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P3_7[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P3_constr_7; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P4; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P4_specs_9; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P4_9[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P4_constr_9; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P5; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P5_specs_11; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P5_11[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P5_constr_11; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P6; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P6_specs_13; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P6_13[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P6_constr_13; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P7; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P7_specs_15; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P7_15[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P7_constr_15; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P8; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P8_specs_17; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P8_17[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P8_constr_17; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P9; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P9_specs_19; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P9_19[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P9_constr_19; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P10; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P10_specs_21; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P10_21[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P10_constr_21; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P11; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P11_specs_23; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P11_23[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P11_constr_23; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P12; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P12_specs_25; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P12_25[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P12_constr_25; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P13; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P13_specs_27; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P13_27[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P13_constr_27; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P14; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P14_specs_29; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P14_29[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P14_constr_29; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P15; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P15_specs_31; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P15_31[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P15_constr_31; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P16; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P16_specs_33; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P16_33[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P16_constr_33; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P17; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P17_specs_35; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P17_35[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P17_constr_35; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P18; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P18_specs_37; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P18_37[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P18_constr_37; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P19; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P19_specs_39; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P19_39[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P19_constr_39; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P20; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P20_specs_41; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P20_41[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P20_constr_41; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P21; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P21_specs_43; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P21_43[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P21_constr_43; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P22; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P22_specs_45; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P22_45[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P22_constr_45; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P23; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P23_specs_47; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P23_47[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P23_constr_47; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P24; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P24_specs_49; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P24_49[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P24_constr_49; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P25; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P25_specs_51; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P25_51[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P25_constr_51; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P26; +extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P26_specs_53; +extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P26_53[1]; +extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P26_constr_53; #ifdef __cplusplus } #endif #endif /* _ProtocolIE_Container_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-ContainerList.h b/e2ap/headers/ProtocolIE-ContainerList.h index 44b1d2a..99777db 100644 --- a/e2ap/headers/ProtocolIE-ContainerList.h +++ b/e2ap/headers/ProtocolIE-ContainerList.h @@ -1,15 +1,15 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_ContainerList_H_ #define _ProtocolIE_ContainerList_H_ -#include +#include "asn_application.h" #ifdef __cplusplus extern "C" { @@ -20,4 +20,4 @@ extern "C" { #endif #endif /* _ProtocolIE_ContainerList_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-ContainerPair.h b/e2ap/headers/ProtocolIE-ContainerPair.h index cac7e26..ec1f4d6 100644 --- a/e2ap/headers/ProtocolIE-ContainerPair.h +++ b/e2ap/headers/ProtocolIE-ContainerPair.h @@ -1,15 +1,15 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_ContainerPair_H_ #define _ProtocolIE_ContainerPair_H_ -#include +#include "asn_application.h" #ifdef __cplusplus extern "C" { @@ -20,4 +20,4 @@ extern "C" { #endif #endif /* _ProtocolIE_ContainerPair_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-ContainerPairList.h b/e2ap/headers/ProtocolIE-ContainerPairList.h index 9d6a2d3..e8cc680 100644 --- a/e2ap/headers/ProtocolIE-ContainerPairList.h +++ b/e2ap/headers/ProtocolIE-ContainerPairList.h @@ -1,15 +1,15 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_ContainerPairList_H_ #define _ProtocolIE_ContainerPairList_H_ -#include +#include "asn_application.h" #ifdef __cplusplus extern "C" { @@ -20,4 +20,4 @@ extern "C" { #endif #endif /* _ProtocolIE_ContainerPairList_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-Field.h b/e2ap/headers/ProtocolIE-Field.h index 8bbef66..c4bf045 100644 --- a/e2ap/headers/ProtocolIE-Field.h +++ b/e2ap/headers/ProtocolIE-Field.h @@ -1,28 +1,39 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_Field_H_ #define _ProtocolIE_Field_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-ID.h" #include "Criticality.h" -#include -#include +#include "ANY.h" +#include "asn_ioc.h" #include "RICaction-ToBeSetup-Item.h" #include "Presence.h" -#include -#include -#include +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" #include "RICaction-Admitted-Item.h" #include "RICaction-NotAdmitted-Item.h" +#include "RICsubscription-withCause-Item.h" +#include "E2connectionUpdate-Item.h" +#include "E2connectionUpdateRemove-Item.h" +#include "E2connectionSetupFailed-Item.h" +#include "E2nodeComponentConfigAddition-Item.h" +#include "E2nodeComponentConfigUpdate-Item.h" +#include "E2nodeComponentConfigRemoval-Item.h" +#include "E2nodeTNLassociationRemoval-Item.h" +#include "E2nodeComponentConfigAdditionAck-Item.h" +#include "E2nodeComponentConfigUpdateAck-Item.h" +#include "E2nodeComponentConfigRemovalAck-Item.h" #include "RANfunction-Item.h" #include "RANfunctionID-Item.h" #include "RANfunctionIDcause-Item.h" @@ -31,8 +42,9 @@ #include "RICsubscriptionDetails.h" #include "RICaction-Admitted-List.h" #include "RICaction-NotAdmitted-List.h" -#include "CriticalityDiagnostics.h" #include "Cause.h" +#include "CriticalityDiagnostics.h" +#include "RICsubscription-List-withCause.h" #include "RICactionID.h" #include "RICindicationSN.h" #include "RICindicationType.h" @@ -42,14 +54,25 @@ #include "RICcontrolHeader.h" #include "RICcontrolMessage.h" #include "RICcontrolAckRequest.h" -#include "RICcontrolStatus.h" #include "RICcontrolOutcome.h" +#include "TransactionID.h" #include "GlobalE2node-ID.h" #include "RANfunctions-List.h" +#include "E2nodeComponentConfigAddition-List.h" #include "GlobalRIC-ID.h" #include "RANfunctionsID-List.h" #include "RANfunctionsIDcause-List.h" +#include "E2nodeComponentConfigAdditionAck-List.h" #include "TimeToWait.h" +#include "TNLinformation.h" +#include "E2connectionUpdate-List.h" +#include "E2connectionUpdateRemove-List.h" +#include "E2connectionSetupFailed-List.h" +#include "E2nodeComponentConfigUpdate-List.h" +#include "E2nodeComponentConfigRemoval-List.h" +#include "E2nodeTNLassociationRemoval-List.h" +#include "E2nodeComponentConfigUpdateAck-List.h" +#include "E2nodeComponentConfigRemovalAck-List.h" #ifdef __cplusplus extern "C" { @@ -68,6 +91,50 @@ 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 RICsubscription_withCause_ItemIEs__value_PR { + RICsubscription_withCause_ItemIEs__value_PR_NOTHING, /* No components present */ + RICsubscription_withCause_ItemIEs__value_PR_RICsubscription_withCause_Item +} RICsubscription_withCause_ItemIEs__value_PR; +typedef enum E2connectionUpdate_ItemIEs__value_PR { + E2connectionUpdate_ItemIEs__value_PR_NOTHING, /* No components present */ + E2connectionUpdate_ItemIEs__value_PR_E2connectionUpdate_Item +} E2connectionUpdate_ItemIEs__value_PR; +typedef enum E2connectionUpdateRemove_ItemIEs__value_PR { + E2connectionUpdateRemove_ItemIEs__value_PR_NOTHING, /* No components present */ + E2connectionUpdateRemove_ItemIEs__value_PR_E2connectionUpdateRemove_Item +} E2connectionUpdateRemove_ItemIEs__value_PR; +typedef enum E2connectionSetupFailed_ItemIEs__value_PR { + E2connectionSetupFailed_ItemIEs__value_PR_NOTHING, /* No components present */ + E2connectionSetupFailed_ItemIEs__value_PR_E2connectionSetupFailed_Item +} E2connectionSetupFailed_ItemIEs__value_PR; +typedef enum E2nodeComponentConfigAddition_ItemIEs__value_PR { + E2nodeComponentConfigAddition_ItemIEs__value_PR_NOTHING, /* No components present */ + E2nodeComponentConfigAddition_ItemIEs__value_PR_E2nodeComponentConfigAddition_Item +} E2nodeComponentConfigAddition_ItemIEs__value_PR; +typedef enum E2nodeComponentConfigUpdate_ItemIEs__value_PR { + E2nodeComponentConfigUpdate_ItemIEs__value_PR_NOTHING, /* No components present */ + E2nodeComponentConfigUpdate_ItemIEs__value_PR_E2nodeComponentConfigUpdate_Item +} E2nodeComponentConfigUpdate_ItemIEs__value_PR; +typedef enum E2nodeComponentConfigRemoval_ItemIEs__value_PR { + E2nodeComponentConfigRemoval_ItemIEs__value_PR_NOTHING, /* No components present */ + E2nodeComponentConfigRemoval_ItemIEs__value_PR_E2nodeComponentConfigRemoval_Item +} E2nodeComponentConfigRemoval_ItemIEs__value_PR; +typedef enum E2nodeTNLassociationRemoval_ItemIEs__value_PR { + E2nodeTNLassociationRemoval_ItemIEs__value_PR_NOTHING, /* No components present */ + E2nodeTNLassociationRemoval_ItemIEs__value_PR_E2nodeTNLassociationRemoval_Item +} E2nodeTNLassociationRemoval_ItemIEs__value_PR; +typedef enum E2nodeComponentConfigAdditionAck_ItemIEs__value_PR { + E2nodeComponentConfigAdditionAck_ItemIEs__value_PR_NOTHING, /* No components present */ + E2nodeComponentConfigAdditionAck_ItemIEs__value_PR_E2nodeComponentConfigAdditionAck_Item +} E2nodeComponentConfigAdditionAck_ItemIEs__value_PR; +typedef enum E2nodeComponentConfigUpdateAck_ItemIEs__value_PR { + E2nodeComponentConfigUpdateAck_ItemIEs__value_PR_NOTHING, /* No components present */ + E2nodeComponentConfigUpdateAck_ItemIEs__value_PR_E2nodeComponentConfigUpdateAck_Item +} E2nodeComponentConfigUpdateAck_ItemIEs__value_PR; +typedef enum E2nodeComponentConfigRemovalAck_ItemIEs__value_PR { + E2nodeComponentConfigRemovalAck_ItemIEs__value_PR_NOTHING, /* No components present */ + E2nodeComponentConfigRemovalAck_ItemIEs__value_PR_E2nodeComponentConfigRemovalAck_Item +} E2nodeComponentConfigRemovalAck_ItemIEs__value_PR; typedef enum RANfunction_ItemIEs__value_PR { RANfunction_ItemIEs__value_PR_NOTHING, /* No components present */ RANfunction_ItemIEs__value_PR_RANfunction_Item @@ -97,7 +164,7 @@ 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_Cause, RICsubscriptionFailure_IEs__value_PR_CriticalityDiagnostics } RICsubscriptionFailure_IEs__value_PR; typedef enum RICsubscriptionDeleteRequest_IEs__value_PR { @@ -117,6 +184,10 @@ typedef enum RICsubscriptionDeleteFailure_IEs__value_PR { RICsubscriptionDeleteFailure_IEs__value_PR_Cause, RICsubscriptionDeleteFailure_IEs__value_PR_CriticalityDiagnostics } RICsubscriptionDeleteFailure_IEs__value_PR; +typedef enum RICsubscriptionDeleteRequired_IEs__value_PR { + RICsubscriptionDeleteRequired_IEs__value_PR_NOTHING, /* No components present */ + RICsubscriptionDeleteRequired_IEs__value_PR_RICsubscription_List_withCause +} RICsubscriptionDeleteRequired_IEs__value_PR; typedef enum RICindication_IEs__value_PR { RICindication_IEs__value_PR_NOTHING, /* No components present */ RICindication_IEs__value_PR_RICrequestID, @@ -142,7 +213,6 @@ typedef enum RICcontrolAcknowledge_IEs__value_PR { 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 { @@ -155,6 +225,7 @@ typedef enum RICcontrolFailure_IEs__value_PR { } RICcontrolFailure_IEs__value_PR; typedef enum ErrorIndication_IEs__value_PR { ErrorIndication_IEs__value_PR_NOTHING, /* No components present */ + ErrorIndication_IEs__value_PR_TransactionID, ErrorIndication_IEs__value_PR_RICrequestID, ErrorIndication_IEs__value_PR_RANfunctionID, ErrorIndication_IEs__value_PR_Cause, @@ -162,47 +233,103 @@ typedef enum ErrorIndication_IEs__value_PR { } ErrorIndication_IEs__value_PR; typedef enum E2setupRequestIEs__value_PR { E2setupRequestIEs__value_PR_NOTHING, /* No components present */ + E2setupRequestIEs__value_PR_TransactionID, E2setupRequestIEs__value_PR_GlobalE2node_ID, - E2setupRequestIEs__value_PR_RANfunctions_List + E2setupRequestIEs__value_PR_RANfunctions_List, + E2setupRequestIEs__value_PR_E2nodeComponentConfigAddition_List } E2setupRequestIEs__value_PR; typedef enum E2setupResponseIEs__value_PR { E2setupResponseIEs__value_PR_NOTHING, /* No components present */ + E2setupResponseIEs__value_PR_TransactionID, E2setupResponseIEs__value_PR_GlobalRIC_ID, E2setupResponseIEs__value_PR_RANfunctionsID_List, - E2setupResponseIEs__value_PR_RANfunctionsIDcause_List + E2setupResponseIEs__value_PR_RANfunctionsIDcause_List, + E2setupResponseIEs__value_PR_E2nodeComponentConfigAdditionAck_List } E2setupResponseIEs__value_PR; typedef enum E2setupFailureIEs__value_PR { E2setupFailureIEs__value_PR_NOTHING, /* No components present */ + E2setupFailureIEs__value_PR_TransactionID, E2setupFailureIEs__value_PR_Cause, E2setupFailureIEs__value_PR_TimeToWait, - E2setupFailureIEs__value_PR_CriticalityDiagnostics + E2setupFailureIEs__value_PR_CriticalityDiagnostics, + E2setupFailureIEs__value_PR_TNLinformation } E2setupFailureIEs__value_PR; +typedef enum E2connectionUpdate_IEs__value_PR { + E2connectionUpdate_IEs__value_PR_NOTHING, /* No components present */ + E2connectionUpdate_IEs__value_PR_TransactionID, + E2connectionUpdate_IEs__value_PR_E2connectionUpdate_List, + E2connectionUpdate_IEs__value_PR_E2connectionUpdateRemove_List, + E2connectionUpdate_IEs__value_PR_E2connectionUpdate_List_1 +} E2connectionUpdate_IEs__value_PR; +typedef enum E2connectionUpdateAck_IEs__value_PR { + E2connectionUpdateAck_IEs__value_PR_NOTHING, /* No components present */ + E2connectionUpdateAck_IEs__value_PR_TransactionID, + E2connectionUpdateAck_IEs__value_PR_E2connectionUpdate_List, + E2connectionUpdateAck_IEs__value_PR_E2connectionSetupFailed_List +} E2connectionUpdateAck_IEs__value_PR; +typedef enum E2connectionUpdateFailure_IEs__value_PR { + E2connectionUpdateFailure_IEs__value_PR_NOTHING, /* No components present */ + E2connectionUpdateFailure_IEs__value_PR_TransactionID, + E2connectionUpdateFailure_IEs__value_PR_Cause, + E2connectionUpdateFailure_IEs__value_PR_TimeToWait, + E2connectionUpdateFailure_IEs__value_PR_CriticalityDiagnostics +} E2connectionUpdateFailure_IEs__value_PR; +typedef enum E2nodeConfigurationUpdate_IEs__value_PR { + E2nodeConfigurationUpdate_IEs__value_PR_NOTHING, /* No components present */ + E2nodeConfigurationUpdate_IEs__value_PR_TransactionID, + E2nodeConfigurationUpdate_IEs__value_PR_GlobalE2node_ID, + E2nodeConfigurationUpdate_IEs__value_PR_E2nodeComponentConfigAddition_List, + E2nodeConfigurationUpdate_IEs__value_PR_E2nodeComponentConfigUpdate_List, + E2nodeConfigurationUpdate_IEs__value_PR_E2nodeComponentConfigRemoval_List, + E2nodeConfigurationUpdate_IEs__value_PR_E2nodeTNLassociationRemoval_List +} E2nodeConfigurationUpdate_IEs__value_PR; +typedef enum E2nodeConfigurationUpdateAcknowledge_IEs__value_PR { + E2nodeConfigurationUpdateAcknowledge_IEs__value_PR_NOTHING, /* No components present */ + E2nodeConfigurationUpdateAcknowledge_IEs__value_PR_TransactionID, + E2nodeConfigurationUpdateAcknowledge_IEs__value_PR_E2nodeComponentConfigAdditionAck_List, + E2nodeConfigurationUpdateAcknowledge_IEs__value_PR_E2nodeComponentConfigUpdateAck_List, + E2nodeConfigurationUpdateAcknowledge_IEs__value_PR_E2nodeComponentConfigRemovalAck_List +} E2nodeConfigurationUpdateAcknowledge_IEs__value_PR; +typedef enum E2nodeConfigurationUpdateFailure_IEs__value_PR { + E2nodeConfigurationUpdateFailure_IEs__value_PR_NOTHING, /* No components present */ + E2nodeConfigurationUpdateFailure_IEs__value_PR_TransactionID, + E2nodeConfigurationUpdateFailure_IEs__value_PR_Cause, + E2nodeConfigurationUpdateFailure_IEs__value_PR_TimeToWait, + E2nodeConfigurationUpdateFailure_IEs__value_PR_CriticalityDiagnostics +} E2nodeConfigurationUpdateFailure_IEs__value_PR; typedef enum ResetRequestIEs__value_PR { ResetRequestIEs__value_PR_NOTHING, /* No components present */ + ResetRequestIEs__value_PR_TransactionID, ResetRequestIEs__value_PR_Cause } ResetRequestIEs__value_PR; typedef enum ResetResponseIEs__value_PR { ResetResponseIEs__value_PR_NOTHING, /* No components present */ + ResetResponseIEs__value_PR_TransactionID, 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_TransactionID, RICserviceUpdate_IEs__value_PR_RANfunctions_List, + RICserviceUpdate_IEs__value_PR_RANfunctions_List_1, 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_TransactionID, 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_TransactionID, + RICserviceUpdateFailure_IEs__value_PR_Cause, 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_TransactionID, RICserviceQuery_IEs__value_PR_RANfunctionsID_List } RICserviceQuery_IEs__value_PR; @@ -255,6 +382,182 @@ typedef struct RICaction_NotAdmitted_ItemIEs { /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } RICaction_NotAdmitted_ItemIEs_t; +typedef struct RICsubscription_withCause_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscription_withCause_ItemIEs__value { + RICsubscription_withCause_ItemIEs__value_PR present; + union RICsubscription_withCause_ItemIEs__value_u { + RICsubscription_withCause_Item_t RICsubscription_withCause_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; +} RICsubscription_withCause_ItemIEs_t; +typedef struct E2connectionUpdate_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2connectionUpdate_ItemIEs__value { + E2connectionUpdate_ItemIEs__value_PR present; + union E2connectionUpdate_ItemIEs__value_u { + E2connectionUpdate_Item_t E2connectionUpdate_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; +} E2connectionUpdate_ItemIEs_t; +typedef struct E2connectionUpdateRemove_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2connectionUpdateRemove_ItemIEs__value { + E2connectionUpdateRemove_ItemIEs__value_PR present; + union E2connectionUpdateRemove_ItemIEs__value_u { + E2connectionUpdateRemove_Item_t E2connectionUpdateRemove_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; +} E2connectionUpdateRemove_ItemIEs_t; +typedef struct E2connectionSetupFailed_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2connectionSetupFailed_ItemIEs__value { + E2connectionSetupFailed_ItemIEs__value_PR present; + union E2connectionSetupFailed_ItemIEs__value_u { + E2connectionSetupFailed_Item_t E2connectionSetupFailed_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; +} E2connectionSetupFailed_ItemIEs_t; +typedef struct E2nodeComponentConfigAddition_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeComponentConfigAddition_ItemIEs__value { + E2nodeComponentConfigAddition_ItemIEs__value_PR present; + union E2nodeComponentConfigAddition_ItemIEs__value_u { + E2nodeComponentConfigAddition_Item_t E2nodeComponentConfigAddition_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; +} E2nodeComponentConfigAddition_ItemIEs_t; +typedef struct E2nodeComponentConfigUpdate_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeComponentConfigUpdate_ItemIEs__value { + E2nodeComponentConfigUpdate_ItemIEs__value_PR present; + union E2nodeComponentConfigUpdate_ItemIEs__value_u { + E2nodeComponentConfigUpdate_Item_t E2nodeComponentConfigUpdate_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; +} E2nodeComponentConfigUpdate_ItemIEs_t; +typedef struct E2nodeComponentConfigRemoval_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeComponentConfigRemoval_ItemIEs__value { + E2nodeComponentConfigRemoval_ItemIEs__value_PR present; + union E2nodeComponentConfigRemoval_ItemIEs__value_u { + E2nodeComponentConfigRemoval_Item_t E2nodeComponentConfigRemoval_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; +} E2nodeComponentConfigRemoval_ItemIEs_t; +typedef struct E2nodeTNLassociationRemoval_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeTNLassociationRemoval_ItemIEs__value { + E2nodeTNLassociationRemoval_ItemIEs__value_PR present; + union E2nodeTNLassociationRemoval_ItemIEs__value_u { + E2nodeTNLassociationRemoval_Item_t E2nodeTNLassociationRemoval_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; +} E2nodeTNLassociationRemoval_ItemIEs_t; +typedef struct E2nodeComponentConfigAdditionAck_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeComponentConfigAdditionAck_ItemIEs__value { + E2nodeComponentConfigAdditionAck_ItemIEs__value_PR present; + union E2nodeComponentConfigAdditionAck_ItemIEs__value_u { + E2nodeComponentConfigAdditionAck_Item_t E2nodeComponentConfigAdditionAck_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; +} E2nodeComponentConfigAdditionAck_ItemIEs_t; +typedef struct E2nodeComponentConfigUpdateAck_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeComponentConfigUpdateAck_ItemIEs__value { + E2nodeComponentConfigUpdateAck_ItemIEs__value_PR present; + union E2nodeComponentConfigUpdateAck_ItemIEs__value_u { + E2nodeComponentConfigUpdateAck_Item_t E2nodeComponentConfigUpdateAck_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; +} E2nodeComponentConfigUpdateAck_ItemIEs_t; +typedef struct E2nodeComponentConfigRemovalAck_ItemIEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeComponentConfigRemovalAck_ItemIEs__value { + E2nodeComponentConfigRemovalAck_ItemIEs__value_PR present; + union E2nodeComponentConfigRemovalAck_ItemIEs__value_u { + E2nodeComponentConfigRemovalAck_Item_t E2nodeComponentConfigRemovalAck_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; +} E2nodeComponentConfigRemovalAck_ItemIEs_t; typedef struct RANfunction_ItemIEs { ProtocolIE_ID_t id; Criticality_t criticality; @@ -348,7 +651,7 @@ typedef struct RICsubscriptionFailure_IEs { union RICsubscriptionFailure_IEs__value_u { RICrequestID_t RICrequestID; RANfunctionID_t RANfunctionID; - RICaction_NotAdmitted_List_t RICaction_NotAdmitted_List; + Cause_t Cause; CriticalityDiagnostics_t CriticalityDiagnostics; } choice; @@ -412,6 +715,22 @@ typedef struct RICsubscriptionDeleteFailure_IEs { /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } RICsubscriptionDeleteFailure_IEs_t; +typedef struct RICsubscriptionDeleteRequired_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct RICsubscriptionDeleteRequired_IEs__value { + RICsubscriptionDeleteRequired_IEs__value_PR present; + union RICsubscriptionDeleteRequired_IEs__value_u { + RICsubscription_List_withCause_t RICsubscription_List_withCause; + } 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; +} RICsubscriptionDeleteRequired_IEs_t; typedef struct RICindication_IEs { ProtocolIE_ID_t id; Criticality_t criticality; @@ -465,7 +784,6 @@ typedef struct RICcontrolAcknowledge_IEs { RICrequestID_t RICrequestID; RANfunctionID_t RANfunctionID; RICcallProcessID_t RICcallProcessID; - RICcontrolStatus_t RICcontrolStatus; RICcontrolOutcome_t RICcontrolOutcome; } choice; @@ -502,6 +820,7 @@ typedef struct ErrorIndication_IEs { struct ErrorIndication_IEs__value { ErrorIndication_IEs__value_PR present; union ErrorIndication_IEs__value_u { + TransactionID_t TransactionID; RICrequestID_t RICrequestID; RANfunctionID_t RANfunctionID; Cause_t Cause; @@ -521,8 +840,10 @@ typedef struct E2setupRequestIEs { struct E2setupRequestIEs__value { E2setupRequestIEs__value_PR present; union E2setupRequestIEs__value_u { + TransactionID_t TransactionID; GlobalE2node_ID_t GlobalE2node_ID; RANfunctions_List_t RANfunctions_List; + E2nodeComponentConfigAddition_List_t E2nodeComponentConfigAddition_List; } choice; /* Context for parsing across buffer boundaries */ @@ -538,9 +859,11 @@ typedef struct E2setupResponseIEs { struct E2setupResponseIEs__value { E2setupResponseIEs__value_PR present; union E2setupResponseIEs__value_u { + TransactionID_t TransactionID; GlobalRIC_ID_t GlobalRIC_ID; RANfunctionsID_List_t RANfunctionsID_List; RANfunctionsIDcause_List_t RANfunctionsIDcause_List; + E2nodeComponentConfigAdditionAck_List_t E2nodeComponentConfigAdditionAck_List; } choice; /* Context for parsing across buffer boundaries */ @@ -556,9 +879,11 @@ typedef struct E2setupFailureIEs { struct E2setupFailureIEs__value { E2setupFailureIEs__value_PR present; union E2setupFailureIEs__value_u { + TransactionID_t TransactionID; Cause_t Cause; TimeToWait_t TimeToWait; CriticalityDiagnostics_t CriticalityDiagnostics; + TNLinformation_t TNLinformation; } choice; /* Context for parsing across buffer boundaries */ @@ -568,12 +893,128 @@ typedef struct E2setupFailureIEs { /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } E2setupFailureIEs_t; +typedef struct E2connectionUpdate_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2connectionUpdate_IEs__value { + E2connectionUpdate_IEs__value_PR present; + union E2connectionUpdate_IEs__value_u { + TransactionID_t TransactionID; + E2connectionUpdate_List_t E2connectionUpdate_List; + E2connectionUpdateRemove_List_t E2connectionUpdateRemove_List; + E2connectionUpdate_List_t E2connectionUpdate_List_1; + } 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; +} E2connectionUpdate_IEs_t; +typedef struct E2connectionUpdateAck_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2connectionUpdateAck_IEs__value { + E2connectionUpdateAck_IEs__value_PR present; + union E2connectionUpdateAck_IEs__value_u { + TransactionID_t TransactionID; + E2connectionUpdate_List_t E2connectionUpdate_List; + E2connectionSetupFailed_List_t E2connectionSetupFailed_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; +} E2connectionUpdateAck_IEs_t; +typedef struct E2connectionUpdateFailure_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2connectionUpdateFailure_IEs__value { + E2connectionUpdateFailure_IEs__value_PR present; + union E2connectionUpdateFailure_IEs__value_u { + TransactionID_t TransactionID; + 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; +} E2connectionUpdateFailure_IEs_t; +typedef struct E2nodeConfigurationUpdate_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeConfigurationUpdate_IEs__value { + E2nodeConfigurationUpdate_IEs__value_PR present; + union E2nodeConfigurationUpdate_IEs__value_u { + TransactionID_t TransactionID; + GlobalE2node_ID_t GlobalE2node_ID; + E2nodeComponentConfigAddition_List_t E2nodeComponentConfigAddition_List; + E2nodeComponentConfigUpdate_List_t E2nodeComponentConfigUpdate_List; + E2nodeComponentConfigRemoval_List_t E2nodeComponentConfigRemoval_List; + E2nodeTNLassociationRemoval_List_t E2nodeTNLassociationRemoval_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; +} E2nodeConfigurationUpdate_IEs_t; +typedef struct E2nodeConfigurationUpdateAcknowledge_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeConfigurationUpdateAcknowledge_IEs__value { + E2nodeConfigurationUpdateAcknowledge_IEs__value_PR present; + union E2nodeConfigurationUpdateAcknowledge_IEs__value_u { + TransactionID_t TransactionID; + E2nodeComponentConfigAdditionAck_List_t E2nodeComponentConfigAdditionAck_List; + E2nodeComponentConfigUpdateAck_List_t E2nodeComponentConfigUpdateAck_List; + E2nodeComponentConfigRemovalAck_List_t E2nodeComponentConfigRemovalAck_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; +} E2nodeConfigurationUpdateAcknowledge_IEs_t; +typedef struct E2nodeConfigurationUpdateFailure_IEs { + ProtocolIE_ID_t id; + Criticality_t criticality; + struct E2nodeConfigurationUpdateFailure_IEs__value { + E2nodeConfigurationUpdateFailure_IEs__value_PR present; + union E2nodeConfigurationUpdateFailure_IEs__value_u { + TransactionID_t TransactionID; + 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; +} E2nodeConfigurationUpdateFailure_IEs_t; typedef struct ResetRequestIEs { ProtocolIE_ID_t id; Criticality_t criticality; struct ResetRequestIEs__value { ResetRequestIEs__value_PR present; union ResetRequestIEs__value_u { + TransactionID_t TransactionID; Cause_t Cause; } choice; @@ -590,6 +1031,7 @@ typedef struct ResetResponseIEs { struct ResetResponseIEs__value { ResetResponseIEs__value_PR present; union ResetResponseIEs__value_u { + TransactionID_t TransactionID; CriticalityDiagnostics_t CriticalityDiagnostics; } choice; @@ -606,7 +1048,9 @@ typedef struct RICserviceUpdate_IEs { struct RICserviceUpdate_IEs__value { RICserviceUpdate_IEs__value_PR present; union RICserviceUpdate_IEs__value_u { + TransactionID_t TransactionID; RANfunctions_List_t RANfunctions_List; + RANfunctions_List_t RANfunctions_List_1; RANfunctionsID_List_t RANfunctionsID_List; } choice; @@ -623,6 +1067,7 @@ typedef struct RICserviceUpdateAcknowledge_IEs { struct RICserviceUpdateAcknowledge_IEs__value { RICserviceUpdateAcknowledge_IEs__value_PR present; union RICserviceUpdateAcknowledge_IEs__value_u { + TransactionID_t TransactionID; RANfunctionsID_List_t RANfunctionsID_List; RANfunctionsIDcause_List_t RANfunctionsIDcause_List; } choice; @@ -640,7 +1085,8 @@ typedef struct RICserviceUpdateFailure_IEs { struct RICserviceUpdateFailure_IEs__value { RICserviceUpdateFailure_IEs__value_PR present; union RICserviceUpdateFailure_IEs__value_u { - RANfunctionsIDcause_List_t RANfunctionsIDcause_List; + TransactionID_t TransactionID; + Cause_t Cause; TimeToWait_t TimeToWait; CriticalityDiagnostics_t CriticalityDiagnostics; } choice; @@ -658,6 +1104,7 @@ typedef struct RICserviceQuery_IEs { struct RICserviceQuery_IEs__value { RICserviceQuery_IEs__value_PR present; union RICserviceQuery_IEs__value_u { + TransactionID_t TransactionID; RANfunctionsID_List_t RANfunctionsID_List; } choice; @@ -679,79 +1126,133 @@ 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_RICsubscription_withCause_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscription_withCause_ItemIEs_specs_13; +extern asn_TYPE_member_t asn_MBR_RICsubscription_withCause_ItemIEs_13[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdate_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdate_ItemIEs_specs_17; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdate_ItemIEs_17[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateRemove_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateRemove_ItemIEs_specs_21; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdateRemove_ItemIEs_21[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2connectionSetupFailed_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionSetupFailed_ItemIEs_specs_25; +extern asn_TYPE_member_t asn_MBR_E2connectionSetupFailed_ItemIEs_25[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAddition_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigAddition_ItemIEs_specs_29; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAddition_ItemIEs_29[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdate_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigUpdate_ItemIEs_specs_33; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdate_ItemIEs_33[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemoval_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemoval_ItemIEs_specs_37; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemoval_ItemIEs_37[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeTNLassociationRemoval_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeTNLassociationRemoval_ItemIEs_specs_41; +extern asn_TYPE_member_t asn_MBR_E2nodeTNLassociationRemoval_ItemIEs_41[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigAdditionAck_ItemIEs_specs_45; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAdditionAck_ItemIEs_45[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigUpdateAck_ItemIEs_specs_49; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdateAck_ItemIEs_49[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemovalAck_ItemIEs_specs_53; +extern asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemovalAck_ItemIEs_53[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_SEQUENCE_specifics_t asn_SPC_RANfunction_ItemIEs_specs_57; +extern asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_57[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_SEQUENCE_specifics_t asn_SPC_RANfunctionID_ItemIEs_specs_61; +extern asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_61[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_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_ItemIEs_specs_65; +extern asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_65[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_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_IEs_specs_69; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_69[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_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_IEs_specs_73; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_73[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_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_IEs_specs_77; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_77[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_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_81; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_81[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_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_85; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_85[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_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_89; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_89[3]; +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequired_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequired_IEs_specs_93; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequired_IEs_93[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_SEQUENCE_specifics_t asn_SPC_RICindication_IEs_specs_97; +extern asn_TYPE_member_t asn_MBR_RICindication_IEs_97[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_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_IEs_specs_101; +extern asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_101[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_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_IEs_specs_105; +extern asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_105[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_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_IEs_specs_109; +extern asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_109[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_SEQUENCE_specifics_t asn_SPC_ErrorIndication_IEs_specs_113; +extern asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_113[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_SEQUENCE_specifics_t asn_SPC_E2setupRequestIEs_specs_117; +extern asn_TYPE_member_t asn_MBR_E2setupRequestIEs_117[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_SEQUENCE_specifics_t asn_SPC_E2setupResponseIEs_specs_121; +extern asn_TYPE_member_t asn_MBR_E2setupResponseIEs_121[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_SEQUENCE_specifics_t asn_SPC_E2setupFailureIEs_specs_125; +extern asn_TYPE_member_t asn_MBR_E2setupFailureIEs_125[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdate_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdate_IEs_specs_129; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdate_IEs_129[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateAck_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateAck_IEs_specs_133; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdateAck_IEs_133[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateFailure_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateFailure_IEs_specs_137; +extern asn_TYPE_member_t asn_MBR_E2connectionUpdateFailure_IEs_137[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdate_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdate_IEs_specs_141; +extern asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdate_IEs_141[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateAcknowledge_IEs_specs_145; +extern asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateAcknowledge_IEs_145[3]; +extern asn_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdateFailure_IEs; +extern asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateFailure_IEs_specs_149; +extern asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateFailure_IEs_149[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_SEQUENCE_specifics_t asn_SPC_ResetRequestIEs_specs_153; +extern asn_TYPE_member_t asn_MBR_ResetRequestIEs_153[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_SEQUENCE_specifics_t asn_SPC_ResetResponseIEs_specs_157; +extern asn_TYPE_member_t asn_MBR_ResetResponseIEs_157[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_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_IEs_specs_161; +extern asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_161[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_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_165; +extern asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_165[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_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_IEs_specs_169; +extern asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_169[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]; +extern asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_IEs_specs_173; +extern asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_173[3]; #ifdef __cplusplus } #endif #endif /* _ProtocolIE_Field_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-FieldPair.h b/e2ap/headers/ProtocolIE-FieldPair.h index 17a19c7..10a1c73 100644 --- a/e2ap/headers/ProtocolIE-FieldPair.h +++ b/e2ap/headers/ProtocolIE-FieldPair.h @@ -1,15 +1,15 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_FieldPair_H_ #define _ProtocolIE_FieldPair_H_ -#include +#include "asn_application.h" #ifdef __cplusplus extern "C" { @@ -20,4 +20,4 @@ extern "C" { #endif #endif /* _ProtocolIE_FieldPair_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-ID.h b/e2ap/headers/ProtocolIE-ID.h index dc75633..a38b70f 100644 --- a/e2ap/headers/ProtocolIE-ID.h +++ b/e2ap/headers/ProtocolIE-ID.h @@ -1,18 +1,18 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_ID_H_ #define _ProtocolIE_ID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeInteger.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f ProtocolIE_ID_encode_jer; oer_type_decoder_f ProtocolIE_ID_decode_oer; oer_type_encoder_f ProtocolIE_ID_encode_oer; per_type_decoder_f ProtocolIE_ID_decode_uper; @@ -69,10 +70,37 @@ per_type_encoder_f ProtocolIE_ID_encode_aper; #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) +#define ProtocolIE_ID_id_E2nodeComponentConfigUpdate ((ProtocolIE_ID_t)33) +#define ProtocolIE_ID_id_E2nodeComponentConfigUpdate_Item ((ProtocolIE_ID_t)34) +#define ProtocolIE_ID_id_E2nodeComponentConfigUpdateAck ((ProtocolIE_ID_t)35) +#define ProtocolIE_ID_id_E2nodeComponentConfigUpdateAck_Item ((ProtocolIE_ID_t)36) +#define ProtocolIE_ID_id_E2connectionSetup ((ProtocolIE_ID_t)39) +#define ProtocolIE_ID_id_E2connectionSetupFailed ((ProtocolIE_ID_t)40) +#define ProtocolIE_ID_id_E2connectionSetupFailed_Item ((ProtocolIE_ID_t)41) +#define ProtocolIE_ID_id_E2connectionFailed_Item ((ProtocolIE_ID_t)42) +#define ProtocolIE_ID_id_E2connectionUpdate_Item ((ProtocolIE_ID_t)43) +#define ProtocolIE_ID_id_E2connectionUpdateAdd ((ProtocolIE_ID_t)44) +#define ProtocolIE_ID_id_E2connectionUpdateModify ((ProtocolIE_ID_t)45) +#define ProtocolIE_ID_id_E2connectionUpdateRemove ((ProtocolIE_ID_t)46) +#define ProtocolIE_ID_id_E2connectionUpdateRemove_Item ((ProtocolIE_ID_t)47) +#define ProtocolIE_ID_id_TNLinformation ((ProtocolIE_ID_t)48) +#define ProtocolIE_ID_id_TransactionID ((ProtocolIE_ID_t)49) +#define ProtocolIE_ID_id_E2nodeComponentConfigAddition ((ProtocolIE_ID_t)50) +#define ProtocolIE_ID_id_E2nodeComponentConfigAddition_Item ((ProtocolIE_ID_t)51) +#define ProtocolIE_ID_id_E2nodeComponentConfigAdditionAck ((ProtocolIE_ID_t)52) +#define ProtocolIE_ID_id_E2nodeComponentConfigAdditionAck_Item ((ProtocolIE_ID_t)53) +#define ProtocolIE_ID_id_E2nodeComponentConfigRemoval ((ProtocolIE_ID_t)54) +#define ProtocolIE_ID_id_E2nodeComponentConfigRemoval_Item ((ProtocolIE_ID_t)55) +#define ProtocolIE_ID_id_E2nodeComponentConfigRemovalAck ((ProtocolIE_ID_t)56) +#define ProtocolIE_ID_id_E2nodeComponentConfigRemovalAck_Item ((ProtocolIE_ID_t)57) +#define ProtocolIE_ID_id_E2nodeTNLassociationRemoval ((ProtocolIE_ID_t)58) +#define ProtocolIE_ID_id_E2nodeTNLassociationRemoval_Item ((ProtocolIE_ID_t)59) +#define ProtocolIE_ID_id_RICsubscriptionToBeRemoved ((ProtocolIE_ID_t)50) +#define ProtocolIE_ID_id_RICsubscription_withCause_Item ((ProtocolIE_ID_t)51) #ifdef __cplusplus } #endif #endif /* _ProtocolIE_ID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ProtocolIE-SingleContainer.h b/e2ap/headers/ProtocolIE-SingleContainer.h index eadd741..8bdc61c 100644 --- a/e2ap/headers/ProtocolIE-SingleContainer.h +++ b/e2ap/headers/ProtocolIE-SingleContainer.h @@ -1,15 +1,15 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ProtocolIE_SingleContainer_H_ #define _ProtocolIE_SingleContainer_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Field.h" @@ -19,102 +19,284 @@ 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; +typedef RICaction_ToBeSetup_ItemIEs_t ProtocolIE_SingleContainer_88P0_t; +typedef RICaction_Admitted_ItemIEs_t ProtocolIE_SingleContainer_88P1_t; +typedef RICaction_NotAdmitted_ItemIEs_t ProtocolIE_SingleContainer_88P2_t; +typedef RICsubscription_withCause_ItemIEs_t ProtocolIE_SingleContainer_88P3_t; +typedef E2connectionUpdate_ItemIEs_t ProtocolIE_SingleContainer_88P4_t; +typedef E2connectionUpdateRemove_ItemIEs_t ProtocolIE_SingleContainer_88P5_t; +typedef E2connectionSetupFailed_ItemIEs_t ProtocolIE_SingleContainer_88P6_t; +typedef E2nodeComponentConfigAddition_ItemIEs_t ProtocolIE_SingleContainer_88P7_t; +typedef E2nodeComponentConfigUpdate_ItemIEs_t ProtocolIE_SingleContainer_88P8_t; +typedef E2nodeComponentConfigRemoval_ItemIEs_t ProtocolIE_SingleContainer_88P9_t; +typedef E2nodeTNLassociationRemoval_ItemIEs_t ProtocolIE_SingleContainer_88P10_t; +typedef E2nodeComponentConfigAdditionAck_ItemIEs_t ProtocolIE_SingleContainer_88P11_t; +typedef E2nodeComponentConfigUpdateAck_ItemIEs_t ProtocolIE_SingleContainer_88P12_t; +typedef E2nodeComponentConfigRemovalAck_ItemIEs_t ProtocolIE_SingleContainer_88P13_t; +typedef RANfunction_ItemIEs_t ProtocolIE_SingleContainer_88P14_t; +typedef RANfunctionID_ItemIEs_t ProtocolIE_SingleContainer_88P15_t; +typedef RANfunctionIDcause_ItemIEs_t ProtocolIE_SingleContainer_88P16_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; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P0; +asn_struct_free_f ProtocolIE_SingleContainer_88P0_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P0_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P0_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P0_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P0_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P0_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P0_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P0_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P0_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P0_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P0_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P0_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P0_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P0_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P1; +asn_struct_free_f ProtocolIE_SingleContainer_88P1_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P1_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P1_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P1_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P1_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P1_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P1_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P1_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P1_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P1_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P1_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P1_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P1_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P1_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P2; +asn_struct_free_f ProtocolIE_SingleContainer_88P2_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P2_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P2_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P2_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P2_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P2_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P2_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P2_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P2_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P2_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P2_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P2_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P2_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P2_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P3; +asn_struct_free_f ProtocolIE_SingleContainer_88P3_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P3_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P3_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P3_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P3_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P3_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P3_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P3_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P3_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P3_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P3_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P3_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P3_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P3_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P4; +asn_struct_free_f ProtocolIE_SingleContainer_88P4_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P4_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P4_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P4_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P4_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P4_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P4_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P4_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P4_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P4_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P4_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P4_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P4_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P4_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P5; +asn_struct_free_f ProtocolIE_SingleContainer_88P5_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P5_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P5_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P5_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P5_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P5_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P5_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P5_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P5_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P5_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P5_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P5_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P5_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P5_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P6; +asn_struct_free_f ProtocolIE_SingleContainer_88P6_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P6_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P6_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P6_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P6_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P6_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P6_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P6_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P6_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P6_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P6_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P6_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P6_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P6_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P7; +asn_struct_free_f ProtocolIE_SingleContainer_88P7_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P7_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P7_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P7_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P7_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P7_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P7_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P7_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P7_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P7_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P7_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P7_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P7_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P7_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P8; +asn_struct_free_f ProtocolIE_SingleContainer_88P8_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P8_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P8_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P8_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P8_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P8_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P8_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P8_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P8_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P8_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P8_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P8_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P8_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P8_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P9; +asn_struct_free_f ProtocolIE_SingleContainer_88P9_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P9_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P9_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P9_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P9_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P9_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P9_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P9_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P9_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P9_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P9_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P9_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P9_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P9_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P10; +asn_struct_free_f ProtocolIE_SingleContainer_88P10_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P10_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P10_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P10_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P10_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P10_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P10_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P10_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P10_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P10_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P10_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P10_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P10_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P10_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P11; +asn_struct_free_f ProtocolIE_SingleContainer_88P11_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P11_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P11_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P11_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P11_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P11_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P11_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P11_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P11_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P11_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P11_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P11_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P11_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P11_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P12; +asn_struct_free_f ProtocolIE_SingleContainer_88P12_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P12_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P12_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P12_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P12_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P12_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P12_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P12_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P12_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P12_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P12_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P12_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P12_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P12_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P13; +asn_struct_free_f ProtocolIE_SingleContainer_88P13_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P13_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P13_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P13_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P13_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P13_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P13_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P13_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P13_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P13_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P13_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P13_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P13_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P13_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P14; +asn_struct_free_f ProtocolIE_SingleContainer_88P14_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P14_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P14_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P14_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P14_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P14_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P14_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P14_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P14_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P14_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P14_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P14_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P14_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P14_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P15; +asn_struct_free_f ProtocolIE_SingleContainer_88P15_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P15_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P15_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P15_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P15_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P15_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P15_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P15_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P15_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P15_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P15_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P15_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P15_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P15_encode_aper; +extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P16; +asn_struct_free_f ProtocolIE_SingleContainer_88P16_free; +asn_struct_print_f ProtocolIE_SingleContainer_88P16_print; +asn_constr_check_f ProtocolIE_SingleContainer_88P16_constraint; +ber_type_decoder_f ProtocolIE_SingleContainer_88P16_decode_ber; +der_type_encoder_f ProtocolIE_SingleContainer_88P16_encode_der; +xer_type_decoder_f ProtocolIE_SingleContainer_88P16_decode_xer; +xer_type_encoder_f ProtocolIE_SingleContainer_88P16_encode_xer; +jer_type_encoder_f ProtocolIE_SingleContainer_88P16_encode_jer; +oer_type_decoder_f ProtocolIE_SingleContainer_88P16_decode_oer; +oer_type_encoder_f ProtocolIE_SingleContainer_88P16_encode_oer; +per_type_decoder_f ProtocolIE_SingleContainer_88P16_decode_uper; +per_type_encoder_f ProtocolIE_SingleContainer_88P16_encode_uper; +per_type_decoder_f ProtocolIE_SingleContainer_88P16_decode_aper; +per_type_encoder_f ProtocolIE_SingleContainer_88P16_encode_aper; #ifdef __cplusplus } #endif #endif /* _ProtocolIE_SingleContainer_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunction-Item.h b/e2ap/headers/RANfunction-Item.h index 38b5e97..58b2fa4 100644 --- a/e2ap/headers/RANfunction-Item.h +++ b/e2ap/headers/RANfunction-Item.h @@ -1,21 +1,22 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunction_Item_H_ #define _RANfunction_Item_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RANfunctionID.h" #include "RANfunctionDefinition.h" #include "RANfunctionRevision.h" -#include +#include "RANfunctionOID.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -26,6 +27,7 @@ typedef struct RANfunction_Item { RANfunctionID_t ranFunctionID; RANfunctionDefinition_t ranFunctionDefinition; RANfunctionRevision_t ranFunctionRevision; + RANfunctionOID_t ranFunctionOID; /* * This type is extensible, * possible extensions are below. @@ -38,11 +40,11 @@ typedef struct RANfunction_Item { /* 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]; +extern asn_TYPE_member_t asn_MBR_RANfunction_Item_1[4]; #ifdef __cplusplus } #endif #endif /* _RANfunction_Item_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionDefinition.h b/e2ap/headers/RANfunctionDefinition.h index 3676c45..1f49cbe 100644 --- a/e2ap/headers/RANfunctionDefinition.h +++ b/e2ap/headers/RANfunctionDefinition.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctionDefinition_H_ #define _RANfunctionDefinition_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RANfunctionDefinition_encode_jer; oer_type_decoder_f RANfunctionDefinition_decode_oer; oer_type_encoder_f RANfunctionDefinition_encode_oer; per_type_decoder_f RANfunctionDefinition_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RANfunctionDefinition_encode_aper; #endif #endif /* _RANfunctionDefinition_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionID-Item.h b/e2ap/headers/RANfunctionID-Item.h index f4a643d..e90b860 100644 --- a/e2ap/headers/RANfunctionID-Item.h +++ b/e2ap/headers/RANfunctionID-Item.h @@ -1,20 +1,20 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctionID_Item_H_ #define _RANfunctionID_Item_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RANfunctionID.h" #include "RANfunctionRevision.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_RANfunctionID_Item_1[2]; #endif #endif /* _RANfunctionID_Item_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionID.h b/e2ap/headers/RANfunctionID.h index 00c4765..713a944 100644 --- a/e2ap/headers/RANfunctionID.h +++ b/e2ap/headers/RANfunctionID.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctionID_H_ #define _RANfunctionID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeInteger.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f RANfunctionID_encode_jer; oer_type_decoder_f RANfunctionID_decode_oer; oer_type_encoder_f RANfunctionID_encode_oer; per_type_decoder_f RANfunctionID_decode_uper; @@ -43,4 +44,4 @@ per_type_encoder_f RANfunctionID_encode_aper; #endif #endif /* _RANfunctionID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionIDcause-Item.h b/e2ap/headers/RANfunctionIDcause-Item.h index 65d1d16..140438d 100644 --- a/e2ap/headers/RANfunctionIDcause-Item.h +++ b/e2ap/headers/RANfunctionIDcause-Item.h @@ -1,20 +1,20 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctionIDcause_Item_H_ #define _RANfunctionIDcause_Item_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RANfunctionID.h" #include "Cause.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_RANfunctionIDcause_Item_1[2]; #endif #endif /* _RANfunctionIDcause_Item_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionOID.h b/e2ap/headers/RANfunctionOID.h new file mode 100644 index 0000000..b768d82 --- /dev/null +++ b/e2ap/headers/RANfunctionOID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _RANfunctionOID_H_ +#define _RANfunctionOID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PrintableString.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANfunctionOID */ +typedef PrintableString_t RANfunctionOID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_RANfunctionOID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_RANfunctionOID; +asn_struct_free_f RANfunctionOID_free; +asn_struct_print_f RANfunctionOID_print; +asn_constr_check_f RANfunctionOID_constraint; +ber_type_decoder_f RANfunctionOID_decode_ber; +der_type_encoder_f RANfunctionOID_encode_der; +xer_type_decoder_f RANfunctionOID_decode_xer; +xer_type_encoder_f RANfunctionOID_encode_xer; +jer_type_encoder_f RANfunctionOID_encode_jer; +oer_type_decoder_f RANfunctionOID_decode_oer; +oer_type_encoder_f RANfunctionOID_encode_oer; +per_type_decoder_f RANfunctionOID_decode_uper; +per_type_encoder_f RANfunctionOID_encode_uper; +per_type_decoder_f RANfunctionOID_decode_aper; +per_type_encoder_f RANfunctionOID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANfunctionOID_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionRevision.h b/e2ap/headers/RANfunctionRevision.h index 76f500a..d927a6f 100644 --- a/e2ap/headers/RANfunctionRevision.h +++ b/e2ap/headers/RANfunctionRevision.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctionRevision_H_ #define _RANfunctionRevision_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeInteger.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f RANfunctionRevision_encode_jer; oer_type_decoder_f RANfunctionRevision_decode_oer; oer_type_encoder_f RANfunctionRevision_encode_oer; per_type_decoder_f RANfunctionRevision_decode_uper; @@ -43,4 +44,4 @@ per_type_encoder_f RANfunctionRevision_encode_aper; #endif #endif /* _RANfunctionRevision_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctions-List.h b/e2ap/headers/RANfunctions-List.h index c3fd3e3..30d75bd 100644 --- a/e2ap/headers/RANfunctions-List.h +++ b/e2ap/headers/RANfunctions-List.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctions_List_H_ #define _RANfunctions_List_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_per_constraints_t asn_PER_type_RANfunctions_List_constr_1; #endif #endif /* _RANfunctions_List_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionsID-List.h b/e2ap/headers/RANfunctionsID-List.h index 1a77d70..b1e7afb 100644 --- a/e2ap/headers/RANfunctionsID-List.h +++ b/e2ap/headers/RANfunctionsID-List.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctionsID_List_H_ #define _RANfunctionsID_List_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_per_constraints_t asn_PER_type_RANfunctionsID_List_constr_1; #endif #endif /* _RANfunctionsID_List_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RANfunctionsIDcause-List.h b/e2ap/headers/RANfunctionsIDcause-List.h index 3fd51d1..d4c2108 100644 --- a/e2ap/headers/RANfunctionsIDcause-List.h +++ b/e2ap/headers/RANfunctionsIDcause-List.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunctionsIDcause_List_H_ #define _RANfunctionsIDcause_List_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_per_constraints_t asn_PER_type_RANfunctionsIDcause_List_constr_1; #endif #endif /* _RANfunctionsIDcause_List_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICaction-Admitted-Item.h b/e2ap/headers/RICaction-Admitted-Item.h index 5031b7d..940e3c8 100644 --- a/e2ap/headers/RICaction-Admitted-Item.h +++ b/e2ap/headers/RICaction-Admitted-Item.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICaction_Admitted_Item_H_ #define _RICaction_Admitted_Item_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RICactionID.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_TYPE_member_t asn_MBR_RICaction_Admitted_Item_1[1]; #endif #endif /* _RICaction_Admitted_Item_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICaction-Admitted-List.h b/e2ap/headers/RICaction-Admitted-List.h index 9464982..34e9e7b 100644 --- a/e2ap/headers/RICaction-Admitted-List.h +++ b/e2ap/headers/RICaction-Admitted-List.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICaction_Admitted_List_H_ #define _RICaction_Admitted_List_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_per_constraints_t asn_PER_type_RICaction_Admitted_List_constr_1; #endif #endif /* _RICaction_Admitted_List_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICaction-NotAdmitted-Item.h b/e2ap/headers/RICaction-NotAdmitted-Item.h index b94f69c..ee0a069 100644 --- a/e2ap/headers/RICaction-NotAdmitted-Item.h +++ b/e2ap/headers/RICaction-NotAdmitted-Item.h @@ -1,20 +1,20 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICaction_NotAdmitted_Item_H_ #define _RICaction_NotAdmitted_Item_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RICactionID.h" #include "Cause.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_Item_1[2]; #endif #endif /* _RICaction_NotAdmitted_Item_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICaction-NotAdmitted-List.h b/e2ap/headers/RICaction-NotAdmitted-List.h index 642683d..2d880f3 100644 --- a/e2ap/headers/RICaction-NotAdmitted-List.h +++ b/e2ap/headers/RICaction-NotAdmitted-List.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICaction_NotAdmitted_List_H_ #define _RICaction_NotAdmitted_List_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_per_constraints_t asn_PER_type_RICaction_NotAdmitted_List_constr_1; #endif #endif /* _RICaction_NotAdmitted_List_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICaction-ToBeSetup-Item.h b/e2ap/headers/RICaction-ToBeSetup-Item.h index a616014..3231653 100644 --- a/e2ap/headers/RICaction-ToBeSetup-Item.h +++ b/e2ap/headers/RICaction-ToBeSetup-Item.h @@ -1,21 +1,21 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICaction_ToBeSetup_Item_H_ #define _RICaction_ToBeSetup_Item_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RICactionID.h" #include "RICactionType.h" #include "RICactionDefinition.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -49,4 +49,4 @@ extern asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[4]; #endif #endif /* _RICaction_ToBeSetup_Item_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICactionDefinition.h b/e2ap/headers/RICactionDefinition.h index 349e2a8..a9c80a3 100644 --- a/e2ap/headers/RICactionDefinition.h +++ b/e2ap/headers/RICactionDefinition.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICactionDefinition_H_ #define _RICactionDefinition_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICactionDefinition_encode_jer; oer_type_decoder_f RICactionDefinition_decode_oer; oer_type_encoder_f RICactionDefinition_encode_oer; per_type_decoder_f RICactionDefinition_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICactionDefinition_encode_aper; #endif #endif /* _RICactionDefinition_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICactionID.h b/e2ap/headers/RICactionID.h index b8f6447..4005e17 100644 --- a/e2ap/headers/RICactionID.h +++ b/e2ap/headers/RICactionID.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICactionID_H_ #define _RICactionID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeInteger.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f RICactionID_encode_jer; oer_type_decoder_f RICactionID_decode_oer; oer_type_encoder_f RICactionID_encode_oer; per_type_decoder_f RICactionID_decode_uper; @@ -43,4 +44,4 @@ per_type_encoder_f RICactionID_encode_aper; #endif #endif /* _RICactionID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICactionType.h b/e2ap/headers/RICactionType.h index e4349fd..64092d7 100644 --- a/e2ap/headers/RICactionType.h +++ b/e2ap/headers/RICactionType.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICactionType_H_ #define _RICactionType_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -42,6 +42,7 @@ 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; +jer_type_encoder_f RICactionType_encode_jer; oer_type_decoder_f RICactionType_decode_oer; oer_type_encoder_f RICactionType_encode_oer; per_type_decoder_f RICactionType_decode_uper; @@ -54,4 +55,4 @@ per_type_encoder_f RICactionType_encode_aper; #endif #endif /* _RICactionType_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICactions-ToBeSetup-List.h b/e2ap/headers/RICactions-ToBeSetup-List.h index 632b420..4e6fd5e 100644 --- a/e2ap/headers/RICactions-ToBeSetup-List.h +++ b/e2ap/headers/RICactions-ToBeSetup-List.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICactions_ToBeSetup_List_H_ #define _RICactions_ToBeSetup_List_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #ifdef __cplusplus extern "C" { @@ -41,4 +41,4 @@ extern asn_per_constraints_t asn_PER_type_RICactions_ToBeSetup_List_constr_1; #endif #endif /* _RICactions_ToBeSetup_List_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICcallProcessID.h b/e2ap/headers/RICcallProcessID.h index a1a4983..66253ec 100644 --- a/e2ap/headers/RICcallProcessID.h +++ b/e2ap/headers/RICcallProcessID.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcallProcessID_H_ #define _RICcallProcessID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICcallProcessID_encode_jer; oer_type_decoder_f RICcallProcessID_decode_oer; oer_type_encoder_f RICcallProcessID_encode_oer; per_type_decoder_f RICcallProcessID_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICcallProcessID_encode_aper; #endif #endif /* _RICcallProcessID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolAckRequest.h b/e2ap/headers/RICcontrolAckRequest.h index abb9553..82f4b16 100644 --- a/e2ap/headers/RICcontrolAckRequest.h +++ b/e2ap/headers/RICcontrolAckRequest.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcontrolAckRequest_H_ #define _RICcontrolAckRequest_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -21,8 +21,7 @@ extern "C" { /* Dependencies */ typedef enum RICcontrolAckRequest { RICcontrolAckRequest_noAck = 0, - RICcontrolAckRequest_ack = 1, - RICcontrolAckRequest_nAck = 2 + RICcontrolAckRequest_ack = 1 /* * Enumeration is extensible */ @@ -42,6 +41,7 @@ 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; +jer_type_encoder_f RICcontrolAckRequest_encode_jer; oer_type_decoder_f RICcontrolAckRequest_decode_oer; oer_type_encoder_f RICcontrolAckRequest_encode_oer; per_type_decoder_f RICcontrolAckRequest_decode_uper; @@ -54,4 +54,4 @@ per_type_encoder_f RICcontrolAckRequest_encode_aper; #endif #endif /* _RICcontrolAckRequest_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolAcknowledge.h b/e2ap/headers/RICcontrolAcknowledge.h index 361f3d6..022b8d0 100644 --- a/e2ap/headers/RICcontrolAcknowledge.h +++ b/e2ap/headers/RICcontrolAcknowledge.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcontrolAcknowledge_H_ #define _RICcontrolAcknowledge_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICcontrolAcknowledge */ typedef struct RICcontrolAcknowledge { - ProtocolIE_Container_87P8_t protocolIEs; + ProtocolIE_Container_85P9_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICcontrolAcknowledge { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolFailure.h b/e2ap/headers/RICcontrolFailure.h index 6eb6a04..94a96a2 100644 --- a/e2ap/headers/RICcontrolFailure.h +++ b/e2ap/headers/RICcontrolFailure.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcontrolFailure_H_ #define _RICcontrolFailure_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICcontrolFailure */ typedef struct RICcontrolFailure { - ProtocolIE_Container_87P9_t protocolIEs; + ProtocolIE_Container_85P10_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICcontrolFailure { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolHeader.h b/e2ap/headers/RICcontrolHeader.h index d7cad7d..90965dd 100644 --- a/e2ap/headers/RICcontrolHeader.h +++ b/e2ap/headers/RICcontrolHeader.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcontrolHeader_H_ #define _RICcontrolHeader_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICcontrolHeader_encode_jer; oer_type_decoder_f RICcontrolHeader_decode_oer; oer_type_encoder_f RICcontrolHeader_encode_oer; per_type_decoder_f RICcontrolHeader_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICcontrolHeader_encode_aper; #endif #endif /* _RICcontrolHeader_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolMessage.h b/e2ap/headers/RICcontrolMessage.h index 08fdf4a..9fd3968 100644 --- a/e2ap/headers/RICcontrolMessage.h +++ b/e2ap/headers/RICcontrolMessage.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcontrolMessage_H_ #define _RICcontrolMessage_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICcontrolMessage_encode_jer; oer_type_decoder_f RICcontrolMessage_decode_oer; oer_type_encoder_f RICcontrolMessage_encode_oer; per_type_decoder_f RICcontrolMessage_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICcontrolMessage_encode_aper; #endif #endif /* _RICcontrolMessage_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolOutcome.h b/e2ap/headers/RICcontrolOutcome.h index d70b5a5..eaa8f38 100644 --- a/e2ap/headers/RICcontrolOutcome.h +++ b/e2ap/headers/RICcontrolOutcome.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcontrolOutcome_H_ #define _RICcontrolOutcome_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICcontrolOutcome_encode_jer; oer_type_decoder_f RICcontrolOutcome_decode_oer; oer_type_encoder_f RICcontrolOutcome_encode_oer; per_type_decoder_f RICcontrolOutcome_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICcontrolOutcome_encode_aper; #endif #endif /* _RICcontrolOutcome_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolRequest.h b/e2ap/headers/RICcontrolRequest.h index db5ba24..70de383 100644 --- a/e2ap/headers/RICcontrolRequest.h +++ b/e2ap/headers/RICcontrolRequest.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICcontrolRequest_H_ #define _RICcontrolRequest_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICcontrolRequest */ typedef struct RICcontrolRequest { - ProtocolIE_Container_87P7_t protocolIEs; + ProtocolIE_Container_85P8_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICcontrolRequest { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICcontrolStatus.h b/e2ap/headers/RICcontrolStatus.h deleted file mode 100644 index 033f5a9..0000000 --- a/e2ap/headers/RICcontrolStatus.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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/e2ap/headers/RICeventTriggerDefinition.h b/e2ap/headers/RICeventTriggerDefinition.h index 58ec4d2..ca6c502 100644 --- a/e2ap/headers/RICeventTriggerDefinition.h +++ b/e2ap/headers/RICeventTriggerDefinition.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICeventTriggerDefinition_H_ #define _RICeventTriggerDefinition_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICeventTriggerDefinition_encode_jer; oer_type_decoder_f RICeventTriggerDefinition_decode_oer; oer_type_encoder_f RICeventTriggerDefinition_encode_oer; per_type_decoder_f RICeventTriggerDefinition_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICeventTriggerDefinition_encode_aper; #endif #endif /* _RICeventTriggerDefinition_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICindication.h b/e2ap/headers/RICindication.h index c984ab6..765c819 100644 --- a/e2ap/headers/RICindication.h +++ b/e2ap/headers/RICindication.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICindication_H_ #define _RICindication_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICindication */ typedef struct RICindication { - ProtocolIE_Container_87P6_t protocolIEs; + ProtocolIE_Container_85P7_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICindication { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICindicationHeader.h b/e2ap/headers/RICindicationHeader.h index 3220602..91b7132 100644 --- a/e2ap/headers/RICindicationHeader.h +++ b/e2ap/headers/RICindicationHeader.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICindicationHeader_H_ #define _RICindicationHeader_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICindicationHeader_encode_jer; oer_type_decoder_f RICindicationHeader_decode_oer; oer_type_encoder_f RICindicationHeader_encode_oer; per_type_decoder_f RICindicationHeader_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICindicationHeader_encode_aper; #endif #endif /* _RICindicationHeader_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICindicationMessage.h b/e2ap/headers/RICindicationMessage.h index f00ebe7..b538253 100644 --- a/e2ap/headers/RICindicationMessage.h +++ b/e2ap/headers/RICindicationMessage.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICindicationMessage_H_ #define _RICindicationMessage_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "OCTET_STRING.h" #ifdef __cplusplus extern "C" { @@ -30,6 +30,7 @@ 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; +jer_type_encoder_f RICindicationMessage_encode_jer; oer_type_decoder_f RICindicationMessage_decode_oer; oer_type_encoder_f RICindicationMessage_encode_oer; per_type_decoder_f RICindicationMessage_decode_uper; @@ -42,4 +43,4 @@ per_type_encoder_f RICindicationMessage_encode_aper; #endif #endif /* _RICindicationMessage_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICindicationSN.h b/e2ap/headers/RICindicationSN.h index 498aaef..8afed19 100644 --- a/e2ap/headers/RICindicationSN.h +++ b/e2ap/headers/RICindicationSN.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICindicationSN_H_ #define _RICindicationSN_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeInteger.h" #ifdef __cplusplus extern "C" { @@ -31,6 +31,7 @@ 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; +jer_type_encoder_f RICindicationSN_encode_jer; oer_type_decoder_f RICindicationSN_decode_oer; oer_type_encoder_f RICindicationSN_encode_oer; per_type_decoder_f RICindicationSN_decode_uper; @@ -43,4 +44,4 @@ per_type_encoder_f RICindicationSN_encode_aper; #endif #endif /* _RICindicationSN_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICindicationType.h b/e2ap/headers/RICindicationType.h index ffc0335..eda4009 100644 --- a/e2ap/headers/RICindicationType.h +++ b/e2ap/headers/RICindicationType.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICindicationType_H_ #define _RICindicationType_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -41,6 +41,7 @@ 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; +jer_type_encoder_f RICindicationType_encode_jer; oer_type_decoder_f RICindicationType_decode_oer; oer_type_encoder_f RICindicationType_encode_oer; per_type_decoder_f RICindicationType_decode_uper; @@ -53,4 +54,4 @@ per_type_encoder_f RICindicationType_encode_aper; #endif #endif /* _RICindicationType_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICrequestID.h b/e2ap/headers/RICrequestID.h index b76c37c..ea1c63a 100644 --- a/e2ap/headers/RICrequestID.h +++ b/e2ap/headers/RICrequestID.h @@ -1,19 +1,19 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICrequestID_H_ #define _RICrequestID_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include -#include +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -42,4 +42,4 @@ extern asn_TYPE_member_t asn_MBR_RICrequestID_1[2]; #endif #endif /* _RICrequestID_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICserviceQuery.h b/e2ap/headers/RICserviceQuery.h index 3b2c4ee..860573d 100644 --- a/e2ap/headers/RICserviceQuery.h +++ b/e2ap/headers/RICserviceQuery.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICserviceQuery_H_ #define _RICserviceQuery_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICserviceQuery */ typedef struct RICserviceQuery { - ProtocolIE_Container_87P19_t protocolIEs; + ProtocolIE_Container_85P26_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICserviceQuery { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICserviceUpdate.h b/e2ap/headers/RICserviceUpdate.h index 9ade74f..320dd09 100644 --- a/e2ap/headers/RICserviceUpdate.h +++ b/e2ap/headers/RICserviceUpdate.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICserviceUpdate_H_ #define _RICserviceUpdate_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICserviceUpdate */ typedef struct RICserviceUpdate { - ProtocolIE_Container_87P16_t protocolIEs; + ProtocolIE_Container_85P23_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICserviceUpdate { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICserviceUpdateAcknowledge.h b/e2ap/headers/RICserviceUpdateAcknowledge.h index 4b08d1a..8375ac4 100644 --- a/e2ap/headers/RICserviceUpdateAcknowledge.h +++ b/e2ap/headers/RICserviceUpdateAcknowledge.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICserviceUpdateAcknowledge_H_ #define _RICserviceUpdateAcknowledge_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICserviceUpdateAcknowledge */ typedef struct RICserviceUpdateAcknowledge { - ProtocolIE_Container_87P17_t protocolIEs; + ProtocolIE_Container_85P24_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICserviceUpdateAcknowledge { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICserviceUpdateFailure.h b/e2ap/headers/RICserviceUpdateFailure.h index c00559e..d7a2fd2 100644 --- a/e2ap/headers/RICserviceUpdateFailure.h +++ b/e2ap/headers/RICserviceUpdateFailure.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICserviceUpdateFailure_H_ #define _RICserviceUpdateFailure_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICserviceUpdateFailure */ typedef struct RICserviceUpdateFailure { - ProtocolIE_Container_87P18_t protocolIEs; + ProtocolIE_Container_85P25_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICserviceUpdateFailure { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscription-List-withCause.h b/e2ap/headers/RICsubscription-List-withCause.h new file mode 100644 index 0000000..bc47b09 --- /dev/null +++ b/e2ap/headers/RICsubscription-List-withCause.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _RICsubscription_List_withCause_H_ +#define _RICsubscription_List_withCause_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 ProtocolIE_SingleContainer; + +/* RICsubscription-List-withCause */ +typedef struct RICsubscription_List_withCause { + A_SEQUENCE_OF(struct ProtocolIE_SingleContainer) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscription_List_withCause_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscription_List_withCause; +extern asn_SET_OF_specifics_t asn_SPC_RICsubscription_List_withCause_specs_1; +extern asn_TYPE_member_t asn_MBR_RICsubscription_List_withCause_1[1]; +extern asn_per_constraints_t asn_PER_type_RICsubscription_List_withCause_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscription_List_withCause_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscription-withCause-Item.h b/e2ap/headers/RICsubscription-withCause-Item.h new file mode 100644 index 0000000..8ad4410 --- /dev/null +++ b/e2ap/headers/RICsubscription-withCause-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 "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _RICsubscription_withCause_Item_H_ +#define _RICsubscription_withCause_Item_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RICrequestID.h" +#include "RANfunctionID.h" +#include "Cause.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscription-withCause-Item */ +typedef struct RICsubscription_withCause_Item { + RICrequestID_t ricRequestID; + 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; +} RICsubscription_withCause_Item_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscription_withCause_Item; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscription_withCause_Item_specs_1; +extern asn_TYPE_member_t asn_MBR_RICsubscription_withCause_Item_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscription_withCause_Item_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionDeleteFailure.h b/e2ap/headers/RICsubscriptionDeleteFailure.h index 59bb7d4..f492729 100644 --- a/e2ap/headers/RICsubscriptionDeleteFailure.h +++ b/e2ap/headers/RICsubscriptionDeleteFailure.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubscriptionDeleteFailure_H_ #define _RICsubscriptionDeleteFailure_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICsubscriptionDeleteFailure */ typedef struct RICsubscriptionDeleteFailure { - ProtocolIE_Container_87P5_t protocolIEs; + ProtocolIE_Container_85P5_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICsubscriptionDeleteFailure { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionDeleteRequest.h b/e2ap/headers/RICsubscriptionDeleteRequest.h index 5019dab..ae4633b 100644 --- a/e2ap/headers/RICsubscriptionDeleteRequest.h +++ b/e2ap/headers/RICsubscriptionDeleteRequest.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubscriptionDeleteRequest_H_ #define _RICsubscriptionDeleteRequest_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICsubscriptionDeleteRequest */ typedef struct RICsubscriptionDeleteRequest { - ProtocolIE_Container_87P3_t protocolIEs; + ProtocolIE_Container_85P3_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICsubscriptionDeleteRequest { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionDeleteRequired.h b/e2ap/headers/RICsubscriptionDeleteRequired.h new file mode 100644 index 0000000..cb81247 --- /dev/null +++ b/e2ap/headers/RICsubscriptionDeleteRequired.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _RICsubscriptionDeleteRequired_H_ +#define _RICsubscriptionDeleteRequired_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ProtocolIE-Container.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* RICsubscriptionDeleteRequired */ +typedef struct RICsubscriptionDeleteRequired { + ProtocolIE_Container_85P6_t protocolIEs; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RICsubscriptionDeleteRequired_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequired; +extern asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequired_specs_1; +extern asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequired_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _RICsubscriptionDeleteRequired_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionDeleteResponse.h b/e2ap/headers/RICsubscriptionDeleteResponse.h index b1aeba6..828a07b 100644 --- a/e2ap/headers/RICsubscriptionDeleteResponse.h +++ b/e2ap/headers/RICsubscriptionDeleteResponse.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubscriptionDeleteResponse_H_ #define _RICsubscriptionDeleteResponse_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICsubscriptionDeleteResponse */ typedef struct RICsubscriptionDeleteResponse { - ProtocolIE_Container_87P4_t protocolIEs; + ProtocolIE_Container_85P4_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICsubscriptionDeleteResponse { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionDetails.h b/e2ap/headers/RICsubscriptionDetails.h index 9b0a03e..385b823 100644 --- a/e2ap/headers/RICsubscriptionDetails.h +++ b/e2ap/headers/RICsubscriptionDetails.h @@ -1,20 +1,20 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubscriptionDetails_H_ #define _RICsubscriptionDetails_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RICeventTriggerDefinition.h" #include "RICactions-ToBeSetup-List.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_RICsubscriptionDetails_1[2]; #endif #endif /* _RICsubscriptionDetails_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionFailure.h b/e2ap/headers/RICsubscriptionFailure.h index c8c4a77..1f4b435 100644 --- a/e2ap/headers/RICsubscriptionFailure.h +++ b/e2ap/headers/RICsubscriptionFailure.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubscriptionFailure_H_ #define _RICsubscriptionFailure_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICsubscriptionFailure */ typedef struct RICsubscriptionFailure { - ProtocolIE_Container_87P2_t protocolIEs; + ProtocolIE_Container_85P2_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICsubscriptionFailure { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionRequest.h b/e2ap/headers/RICsubscriptionRequest.h index 9e9e0bb..effadfc 100644 --- a/e2ap/headers/RICsubscriptionRequest.h +++ b/e2ap/headers/RICsubscriptionRequest.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubscriptionRequest_H_ #define _RICsubscriptionRequest_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICsubscriptionRequest */ typedef struct RICsubscriptionRequest { - ProtocolIE_Container_87P0_t protocolIEs; + ProtocolIE_Container_85P0_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICsubscriptionRequest { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubscriptionResponse.h b/e2ap/headers/RICsubscriptionResponse.h index 9b8bb17..206a91f 100644 --- a/e2ap/headers/RICsubscriptionResponse.h +++ b/e2ap/headers/RICsubscriptionResponse.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubscriptionResponse_H_ #define _RICsubscriptionResponse_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* RICsubscriptionResponse */ typedef struct RICsubscriptionResponse { - ProtocolIE_Container_87P1_t protocolIEs; + ProtocolIE_Container_85P1_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct RICsubscriptionResponse { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubsequentAction.h b/e2ap/headers/RICsubsequentAction.h index fffdc21..9549d4f 100644 --- a/e2ap/headers/RICsubsequentAction.h +++ b/e2ap/headers/RICsubsequentAction.h @@ -1,20 +1,20 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubsequentAction_H_ #define _RICsubsequentAction_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "RICsubsequentActionType.h" #include "RICtimeToWait.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -43,4 +43,4 @@ extern asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[2]; #endif #endif /* _RICsubsequentAction_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICsubsequentActionType.h b/e2ap/headers/RICsubsequentActionType.h index 1dea790..99c3241 100644 --- a/e2ap/headers/RICsubsequentActionType.h +++ b/e2ap/headers/RICsubsequentActionType.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICsubsequentActionType_H_ #define _RICsubsequentActionType_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -41,6 +41,7 @@ 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; +jer_type_encoder_f RICsubsequentActionType_encode_jer; oer_type_decoder_f RICsubsequentActionType_decode_oer; oer_type_encoder_f RICsubsequentActionType_encode_oer; per_type_decoder_f RICsubsequentActionType_decode_uper; @@ -53,4 +54,4 @@ per_type_encoder_f RICsubsequentActionType_encode_aper; #endif #endif /* _RICsubsequentActionType_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/RICtimeToWait.h b/e2ap/headers/RICtimeToWait.h index efe9b2a..45cdebc 100644 --- a/e2ap/headers/RICtimeToWait.h +++ b/e2ap/headers/RICtimeToWait.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RICtimeToWait_H_ #define _RICtimeToWait_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -20,24 +20,23 @@ extern "C" { /* 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 + RICtimeToWait_w1ms = 0, + RICtimeToWait_w2ms = 1, + RICtimeToWait_w5ms = 2, + RICtimeToWait_w10ms = 3, + RICtimeToWait_w20ms = 4, + RICtimeToWait_w30ms = 5, + RICtimeToWait_w40ms = 6, + RICtimeToWait_w50ms = 7, + RICtimeToWait_w100ms = 8, + RICtimeToWait_w200ms = 9, + RICtimeToWait_w500ms = 10, + RICtimeToWait_w1s = 11, + RICtimeToWait_w2s = 12, + RICtimeToWait_w5s = 13, + RICtimeToWait_w10s = 14, + RICtimeToWait_w20s = 15, + RICtimeToWait_w60s = 16 /* * Enumeration is extensible */ @@ -57,6 +56,7 @@ 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; +jer_type_encoder_f RICtimeToWait_encode_jer; oer_type_decoder_f RICtimeToWait_decode_oer; oer_type_encoder_f RICtimeToWait_encode_oer; per_type_decoder_f RICtimeToWait_decode_uper; @@ -69,4 +69,4 @@ per_type_encoder_f RICtimeToWait_encode_aper; #endif #endif /* _RICtimeToWait_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/ResetRequest.h b/e2ap/headers/ResetRequest.h index b8ccee4..800875a 100644 --- a/e2ap/headers/ResetRequest.h +++ b/e2ap/headers/ResetRequest.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ResetRequest_H_ #define _ResetRequest_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* ResetRequest */ typedef struct ResetRequest { - ProtocolIE_Container_87P14_t protocolIEs; + ProtocolIE_Container_85P21_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct ResetRequest { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/ResetResponse.h b/e2ap/headers/ResetResponse.h index cfd7a3c..778ce50 100644 --- a/e2ap/headers/ResetResponse.h +++ b/e2ap/headers/ResetResponse.h @@ -1,19 +1,19 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ResetResponse_H_ #define _ResetResponse_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProtocolIE-Container.h" -#include +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -21,7 +21,7 @@ extern "C" { /* ResetResponse */ typedef struct ResetResponse { - ProtocolIE_Container_87P15_t protocolIEs; + ProtocolIE_Container_85P22_t protocolIEs; /* * This type is extensible, * possible extensions are below. @@ -33,10 +33,12 @@ typedef struct ResetResponse { /* 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 +#include "asn_internal.h" diff --git a/e2ap/headers/SuccessfulOutcome.h b/e2ap/headers/SuccessfulOutcome.h index 734bd7e..b975932 100644 --- a/e2ap/headers/SuccessfulOutcome.h +++ b/e2ap/headers/SuccessfulOutcome.h @@ -1,21 +1,21 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _SuccessfulOutcome_H_ #define _SuccessfulOutcome_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProcedureCode.h" #include "Criticality.h" -#include -#include +#include "ANY.h" +#include "asn_ioc.h" #include "RICsubscriptionRequest.h" #include "RICsubscriptionResponse.h" #include "RICsubscriptionFailure.h" @@ -31,14 +31,21 @@ #include "E2setupRequest.h" #include "E2setupResponse.h" #include "E2setupFailure.h" +#include "E2nodeConfigurationUpdate.h" +#include "E2nodeConfigurationUpdateAcknowledge.h" +#include "E2nodeConfigurationUpdateFailure.h" +#include "E2connectionUpdate.h" +#include "E2connectionUpdateAcknowledge.h" +#include "E2connectionUpdateFailure.h" #include "ResetRequest.h" #include "ResetResponse.h" #include "RICindication.h" #include "RICserviceQuery.h" #include "ErrorIndication.h" -#include -#include -#include +#include "RICsubscriptionDeleteRequired.h" +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -52,6 +59,8 @@ typedef enum SuccessfulOutcome__value_PR { SuccessfulOutcome__value_PR_RICserviceUpdateAcknowledge, SuccessfulOutcome__value_PR_RICcontrolAcknowledge, SuccessfulOutcome__value_PR_E2setupResponse, + SuccessfulOutcome__value_PR_E2nodeConfigurationUpdateAcknowledge, + SuccessfulOutcome__value_PR_E2connectionUpdateAcknowledge, SuccessfulOutcome__value_PR_ResetResponse } SuccessfulOutcome__value_PR; @@ -67,6 +76,8 @@ typedef struct SuccessfulOutcome { RICserviceUpdateAcknowledge_t RICserviceUpdateAcknowledge; RICcontrolAcknowledge_t RICcontrolAcknowledge; E2setupResponse_t E2setupResponse; + E2nodeConfigurationUpdateAcknowledge_t E2nodeConfigurationUpdateAcknowledge; + E2connectionUpdateAcknowledge_t E2connectionUpdateAcknowledge; ResetResponse_t ResetResponse; } choice; @@ -88,4 +99,4 @@ extern asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[3]; #endif #endif /* _SuccessfulOutcome_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/TNLinformation.h b/e2ap/headers/TNLinformation.h new file mode 100644 index 0000000..5a05307 --- /dev/null +++ b/e2ap/headers/TNLinformation.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _TNLinformation_H_ +#define _TNLinformation_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* TNLinformation */ +typedef struct TNLinformation { + BIT_STRING_t tnlAddress; + BIT_STRING_t *tnlPort; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} TNLinformation_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_TNLinformation; +extern asn_SEQUENCE_specifics_t asn_SPC_TNLinformation_specs_1; +extern asn_TYPE_member_t asn_MBR_TNLinformation_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _TNLinformation_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/TNLusage.h b/e2ap/headers/TNLusage.h new file mode 100644 index 0000000..edc6a12 --- /dev/null +++ b/e2ap/headers/TNLusage.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _TNLusage_H_ +#define _TNLusage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum TNLusage { + TNLusage_ric_service = 0, + TNLusage_support_function = 1, + TNLusage_both = 2 + /* + * Enumeration is extensible + */ +} e_TNLusage; + +/* TNLusage */ +typedef long TNLusage_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_TNLusage_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_TNLusage; +extern const asn_INTEGER_specifics_t asn_SPC_TNLusage_specs_1; +asn_struct_free_f TNLusage_free; +asn_struct_print_f TNLusage_print; +asn_constr_check_f TNLusage_constraint; +ber_type_decoder_f TNLusage_decode_ber; +der_type_encoder_f TNLusage_encode_der; +xer_type_decoder_f TNLusage_decode_xer; +xer_type_encoder_f TNLusage_encode_xer; +jer_type_encoder_f TNLusage_encode_jer; +oer_type_decoder_f TNLusage_decode_oer; +oer_type_encoder_f TNLusage_encode_oer; +per_type_decoder_f TNLusage_decode_uper; +per_type_encoder_f TNLusage_encode_uper; +per_type_decoder_f TNLusage_decode_aper; +per_type_encoder_f TNLusage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _TNLusage_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/TimeToWait.h b/e2ap/headers/TimeToWait.h index 9627535..dff1b76 100644 --- a/e2ap/headers/TimeToWait.h +++ b/e2ap/headers/TimeToWait.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TimeToWait_H_ #define _TimeToWait_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -45,6 +45,7 @@ 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; +jer_type_encoder_f TimeToWait_encode_jer; oer_type_decoder_f TimeToWait_decode_oer; oer_type_encoder_f TimeToWait_encode_oer; per_type_decoder_f TimeToWait_decode_uper; @@ -57,4 +58,4 @@ per_type_encoder_f TimeToWait_encode_aper; #endif #endif /* _TimeToWait_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/TransactionID.h b/e2ap/headers/TransactionID.h new file mode 100644 index 0000000..2e32312 --- /dev/null +++ b/e2ap/headers/TransactionID.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _TransactionID_H_ +#define _TransactionID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* TransactionID */ +typedef long TransactionID_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_TransactionID_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_TransactionID; +asn_struct_free_f TransactionID_free; +asn_struct_print_f TransactionID_print; +asn_constr_check_f TransactionID_constraint; +ber_type_decoder_f TransactionID_decode_ber; +der_type_encoder_f TransactionID_encode_der; +xer_type_decoder_f TransactionID_decode_xer; +xer_type_encoder_f TransactionID_encode_xer; +jer_type_encoder_f TransactionID_encode_jer; +oer_type_decoder_f TransactionID_decode_oer; +oer_type_encoder_f TransactionID_encode_oer; +per_type_decoder_f TransactionID_decode_uper; +per_type_encoder_f TransactionID_encode_uper; +per_type_decoder_f TransactionID_decode_aper; +per_type_encoder_f TransactionID_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _TransactionID_H_ */ +#include "asn_internal.h" diff --git a/e2ap/headers/TriggeringMessage.h b/e2ap/headers/TriggeringMessage.h index 6f9f42e..17c3924 100644 --- a/e2ap/headers/TriggeringMessage.h +++ b/e2ap/headers/TriggeringMessage.h @@ -1,18 +1,18 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TriggeringMessage_H_ #define _TriggeringMessage_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -39,6 +39,7 @@ 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; +jer_type_encoder_f TriggeringMessage_encode_jer; oer_type_decoder_f TriggeringMessage_decode_oer; oer_type_encoder_f TriggeringMessage_encode_oer; per_type_decoder_f TriggeringMessage_decode_uper; @@ -51,4 +52,4 @@ per_type_encoder_f TriggeringMessage_encode_aper; #endif #endif /* _TriggeringMessage_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/TypeOfError.h b/e2ap/headers/TypeOfError.h index aec2d63..6eabb4f 100644 --- a/e2ap/headers/TypeOfError.h +++ b/e2ap/headers/TypeOfError.h @@ -1,18 +1,18 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TypeOfError_H_ #define _TypeOfError_H_ -#include +#include "asn_application.h" /* Including external dependencies */ -#include +#include "NativeEnumerated.h" #ifdef __cplusplus extern "C" { @@ -41,6 +41,7 @@ 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; +jer_type_encoder_f TypeOfError_encode_jer; oer_type_decoder_f TypeOfError_decode_oer; oer_type_encoder_f TypeOfError_encode_oer; per_type_decoder_f TypeOfError_decode_uper; @@ -53,4 +54,4 @@ per_type_encoder_f TypeOfError_encode_aper; #endif #endif /* _TypeOfError_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/UnsuccessfulOutcome.h b/e2ap/headers/UnsuccessfulOutcome.h index baf8838..3f27b24 100644 --- a/e2ap/headers/UnsuccessfulOutcome.h +++ b/e2ap/headers/UnsuccessfulOutcome.h @@ -1,21 +1,21 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UnsuccessfulOutcome_H_ #define _UnsuccessfulOutcome_H_ -#include +#include "asn_application.h" /* Including external dependencies */ #include "ProcedureCode.h" #include "Criticality.h" -#include -#include +#include "ANY.h" +#include "asn_ioc.h" #include "RICsubscriptionRequest.h" #include "RICsubscriptionResponse.h" #include "RICsubscriptionFailure.h" @@ -31,14 +31,21 @@ #include "E2setupRequest.h" #include "E2setupResponse.h" #include "E2setupFailure.h" +#include "E2nodeConfigurationUpdate.h" +#include "E2nodeConfigurationUpdateAcknowledge.h" +#include "E2nodeConfigurationUpdateFailure.h" +#include "E2connectionUpdate.h" +#include "E2connectionUpdateAcknowledge.h" +#include "E2connectionUpdateFailure.h" #include "ResetRequest.h" #include "ResetResponse.h" #include "RICindication.h" #include "RICserviceQuery.h" #include "ErrorIndication.h" -#include -#include -#include +#include "RICsubscriptionDeleteRequired.h" +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { @@ -51,7 +58,9 @@ typedef enum UnsuccessfulOutcome__value_PR { UnsuccessfulOutcome__value_PR_RICsubscriptionDeleteFailure, UnsuccessfulOutcome__value_PR_RICserviceUpdateFailure, UnsuccessfulOutcome__value_PR_RICcontrolFailure, - UnsuccessfulOutcome__value_PR_E2setupFailure + UnsuccessfulOutcome__value_PR_E2setupFailure, + UnsuccessfulOutcome__value_PR_E2nodeConfigurationUpdateFailure, + UnsuccessfulOutcome__value_PR_E2connectionUpdateFailure } UnsuccessfulOutcome__value_PR; /* UnsuccessfulOutcome */ @@ -66,6 +75,8 @@ typedef struct UnsuccessfulOutcome { RICserviceUpdateFailure_t RICserviceUpdateFailure; RICcontrolFailure_t RICcontrolFailure; E2setupFailure_t E2setupFailure; + E2nodeConfigurationUpdateFailure_t E2nodeConfigurationUpdateFailure; + E2connectionUpdateFailure_t E2connectionUpdateFailure; } choice; /* Context for parsing across buffer boundaries */ @@ -86,4 +97,4 @@ extern asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[3]; #endif #endif /* _UnsuccessfulOutcome_H_ */ -#include +#include "asn_internal.h" diff --git a/e2ap/headers/aper_decoder.h b/e2ap/headers/aper_decoder.h new file mode 100644 index 0000000..10352c7 --- /dev/null +++ b/e2ap/headers/aper_decoder.h @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_DECODER_H_ +#define _APER_DECODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * 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 */ + ); + +#ifdef __cplusplus +} +#endif + +#endif /* _APER_DECODER_H_ */ diff --git a/e2ap/headers/aper_encoder.h b/e2ap/headers/aper_encoder.h new file mode 100644 index 0000000..957b0bd --- /dev/null +++ b/e2ap/headers/aper_encoder.h @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2006-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_ENCODER_H_ +#define _APER_ENCODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Aligned 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 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 aper_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 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 aper_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 aper_encode() and aper_encode_to_buffer(). + */ +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 +); + +#ifdef __cplusplus +} +#endif + +#endif /* _APER_ENCODER_H_ */ diff --git a/e2ap/headers/aper_opentype.h b/e2ap/headers/aper_opentype.h new file mode 100644 index 0000000..451b01c --- /dev/null +++ b/e2ap/headers/aper_opentype.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2007-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_OPENTYPE_H_ +#define _APER_OPENTYPE_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +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 /* _APER_OPENTYPE_H_ */ diff --git a/e2ap/headers/aper_support.h b/e2ap/headers/aper_support.h new file mode 100644 index 0000000..a372445 --- /dev/null +++ b/e2ap/headers/aper_support.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_SUPPORT_H_ +#define _APER_SUPPORT_H_ + +#include /* Platform-specific types */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Get the length "n" from the Aligned PER stream. + */ +ssize_t aper_get_length(asn_per_data_t *pd, ssize_t lb, ssize_t ub, + int effective_bound_bits, int *repeat); + +/* + * Get the normally small length "n". + */ +ssize_t aper_get_nslength(asn_per_data_t *pd); + +/* + * Get the normally small non-negative whole number. + */ +ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range); + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Put the length "n" to the Aligned PER stream. + * If (opt_need_eom) is given, it will be set to 1 if final 0-n is needed. + * In that case, invoke aper_put_length(po, -1, -1, 0, NULL) after encoding the + * last block. + * This function returns the number of units which may be flushed + * in the next units saving iteration. + */ +ssize_t aper_put_length(asn_per_outp_t *po, ssize_t lb, ssize_t ub, size_t n, + int *opt_need_eom); + +/* 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 aper_put_nslength(asn_per_outp_t *po, size_t length); + +/* + * Put the normally small non-negative whole number. + */ +int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number); + +#ifdef __cplusplus +} +#endif + +#endif /* _APER_SUPPORT_H_ */ diff --git a/e2ap/headers/asn_application.h b/e2ap/headers/asn_application.h index 034f646..bf10cd3 100644 --- a/e2ap/headers/asn_application.h +++ b/e2ap/headers/asn_application.h @@ -10,6 +10,7 @@ #include "asn_system.h" /* for platform-dependent types */ #include "asn_codecs.h" /* for ASN.1 codecs specifics */ +#include "asn_config.h" #ifdef __cplusplus extern "C" { @@ -59,7 +60,8 @@ enum asn_transfer_syntax { * CANONICAL-XER is a more strict variant of BASIC-XER. */ ATS_BASIC_XER, - ATS_CANONICAL_XER + ATS_CANONICAL_XER, + ATS_JER, }; /* diff --git a/e2ap/headers/asn_bit_data.h b/e2ap/headers/asn_bit_data.h index 59de7af..f14714b 100644 --- a/e2ap/headers/asn_bit_data.h +++ b/e2ap/headers/asn_bit_data.h @@ -36,7 +36,7 @@ asn_bit_data_t *asn_bit_data_new_contiguous(const void *data, size_t size_bits); */ int32_t asn_get_few_bits(asn_bit_data_t *, int get_nbits); -/* Undo the immediately preceeding "get_few_bits" operation */ +/* Undo the immediately preceding "get_few_bits" operation */ void asn_get_undo(asn_bit_data_t *, int get_nbits); /* diff --git a/e2ap/headers/asn_codecs_prim.h b/e2ap/headers/asn_codecs_prim.h index fbc5576..5bbd9cf 100644 --- a/e2ap/headers/asn_codecs_prim.h +++ b/e2ap/headers/asn_codecs_prim.h @@ -12,23 +12,27 @@ 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! */ + 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; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f ber_decode_primitive; der_type_encoder_f der_encode_primitive; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) /* * 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 */ + 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, @@ -43,6 +47,7 @@ asn_dec_rval_t xer_decode_primitive( 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); +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2ap/headers/asn_config.h b/e2ap/headers/asn_config.h new file mode 100644 index 0000000..551bcc7 --- /dev/null +++ b/e2ap/headers/asn_config.h @@ -0,0 +1,2 @@ +// Generated automatically. Don't edit manually! + diff --git a/e2ap/headers/asn_constant.h b/e2ap/headers/asn_constant.h index a6f348c..87f8474 100644 --- a/e2ap/headers/asn_constant.h +++ b/e2ap/headers/asn_constant.h @@ -9,10 +9,31 @@ extern "C" { #endif +#define min_val_ProcedureCode (0) +#define max_val_ProcedureCode (255) +#define min_val_ProtocolIE_ID (0) +#define max_val_ProtocolIE_ID (65535) #define maxProtocolIEs (65535) #define maxnoofErrors (256) +#define maxofE2nodeComponents (1024) #define maxofRANfunctionID (256) #define maxofRICactionID (16) +#define maxofTNLA (32) +#define maxofRICrequestID (4294967295) +#define min_val_GNB_CU_UP_ID (0) +#define max_val_GNB_CU_UP_ID (68719476735) +#define min_val_GNB_DU_ID (0) +#define max_val_GNB_DU_ID (68719476735) +#define min_val_NGENB_DU_ID (0) +#define max_val_NGENB_DU_ID (68719476735) +#define min_val_RANfunctionID (0) +#define max_val_RANfunctionID (4095) +#define min_val_RANfunctionRevision (0) +#define max_val_RANfunctionRevision (4095) +#define min_val_RICactionID (0) +#define max_val_RICactionID (255) +#define min_val_RICindicationSN (0) +#define max_val_RICindicationSN (65535) #ifdef __cplusplus diff --git a/e2ap/headers/asn_internal.h b/e2ap/headers/asn_internal.h index c4105ad..d6ce619 100644 --- a/e2ap/headers/asn_internal.h +++ b/e2ap/headers/asn_internal.h @@ -7,7 +7,9 @@ */ #ifndef ASN_INTERNAL_H #define ASN_INTERNAL_H +#ifndef __EXTENSIONS__ #define __EXTENSIONS__ /* for Sun */ +#endif #include "asn_application.h" /* Application-visible API */ @@ -19,6 +21,15 @@ extern "C" { #endif +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#include +#include +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#include +#include +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + /* 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 */ @@ -42,8 +53,7 @@ int get_asn1c_environment_version(void); /* Run-time version */ */ #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 +#if __STDC_VERSION__ >= 199901L #ifdef ASN_THREAD_SAFE /* Thread safety requires sacrifice in output indentation: * Retain empty definition of ASN_DEBUG_INDENT_ADD. */ @@ -53,12 +63,6 @@ int get_asn1c_environment_version(void); /* Run-time version */ 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, " "); \ @@ -66,7 +70,6 @@ extern int logAsn1c(const char *filename, int linenumber, const char *format, .. 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 @@ -133,7 +136,31 @@ asn__format_to_callback( /* * Check stack against overflow, if limit is set. */ + +/* Since GCC 13, AddressSanitizer started defaulting to +* ASAN_OPTIONS="detect_stack_use_after_return=1", which makes this check +* fail due to apparently jumping stack pointers. +* Hence, disable this check if building with ASan, as documented in: +* GCC: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html +* Clang: https://clang.llvm.org/docs/AddressSanitizer.html#conditional-compilation-with-has-feature-address-sanitizer +*/ +#if defined(__SANITIZE_ADDRESS__) + #define ASN__SANITIZE_ENABLED 1 +#elif defined(__has_feature) +#if __has_feature(address_sanitizer) + #define ASN__SANITIZE_ENABLED 1 +#endif +#endif + #define ASN__DEFAULT_STACK_MAX (30000) + +#if defined(ASN__SANITIZE_ENABLED) || defined(ASN_DISABLE_STACK_OVERFLOW_CHECK) +static int CC_NOTUSED +ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { + (void)ctx; + return 0; +} +#else static int CC_NOTUSED ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { if(ctx && ctx->max_stack_size) { @@ -151,6 +178,7 @@ ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { } return 0; } +#endif #ifdef __cplusplus } diff --git a/e2ap/headers/asn_system.h b/e2ap/headers/asn_system.h index fa8cf11..0f0d495 100644 --- a/e2ap/headers/asn_system.h +++ b/e2ap/headers/asn_system.h @@ -27,12 +27,15 @@ #include /* For LONG_MAX */ #include /* For va_start */ #include /* for offsetof and ptrdiff_t */ +#include /* for PRIdMAX */ #ifdef _WIN32 #include +#ifndef __MINGW32__ #define snprintf _snprintf #define vsnprintf _vsnprintf +#endif /* To avoid linking with ws2_32.lib, here's the definition of ntohl() */ #define sys_ntohl(l) ((((l) << 24) & 0xff000000) \ @@ -75,7 +78,9 @@ typedef unsigned int uint32_t; #else /* !defined(__vxworks) */ #include /* C99 specifies this file */ +#ifdef HAVE_NETINET_IN_H #include /* for ntohl() */ +#endif #define sys_ntohl(foo) ntohl(foo) #endif /* defined(__vxworks) */ @@ -86,11 +91,25 @@ typedef unsigned int uint32_t; #else #define CC_ATTRIBUTE(attr) #endif -#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(printf, fmt, var)) +#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__>= 4) || __GNUC__ > 4) +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(gnu_printf, fmt, var)) +#elif defined(__GNUC__) +#if defined(ANDROID) +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(__format__(__printf__, fmt, var)) +#else +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(printf, fmt, var)) +#endif +#else +#define CC_PRINTFLIKE(fmt, var) +#endif #define CC_NOTUSED CC_ATTRIBUTE(unused) #ifndef CC_ATTR_NO_SANITIZE +#if __GNUC__ < 8 +#define CC_ATTR_NO_SANITIZE(what) +#else #define CC_ATTR_NO_SANITIZE(what) CC_ATTRIBUTE(no_sanitize(what)) #endif +#endif /* Figure out if thread safety is requested */ #if !defined(ASN_THREAD_SAFE) && (defined(THREAD_SAFE) || defined(_REENTRANT)) diff --git a/e2ap/headers/constr_CHOICE.h b/e2ap/headers/constr_CHOICE.h index a1999ed..03d606c 100644 --- a/e2ap/headers/constr_CHOICE.h +++ b/e2ap/headers/constr_CHOICE.h @@ -40,23 +40,62 @@ typedef struct asn_CHOICE_specifics_s { * A set specialized functions dealing with the CHOICE type. */ asn_struct_free_f CHOICE_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f CHOICE_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f CHOICE_compare; + asn_constr_check_f CHOICE_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f CHOICE_decode_ber; der_type_encoder_f CHOICE_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f CHOICE_decode_xer; xer_type_encoder_f CHOICE_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f CHOICE_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f CHOICE_decode_oer; oer_type_encoder_f CHOICE_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f CHOICE_decode_uper; per_type_encoder_f CHOICE_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f CHOICE_decode_aper; per_type_encoder_f CHOICE_encode_aper; -asn_outmost_tag_f CHOICE_outmost_tag; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) asn_random_fill_f CHOICE_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +asn_outmost_tag_f CHOICE_outmost_tag; + extern asn_TYPE_operation_t asn_OP_CHOICE; +unsigned _fetch_present_idx( + const void *struct_ptr, + unsigned off, + unsigned size); + +void _set_present_idx( + void *sptr, + unsigned offset, + unsigned size, + unsigned present); + /* * Return the 1-based choice variant presence index. * Returns 0 in case of error. diff --git a/e2ap/headers/constr_SEQUENCE.h b/e2ap/headers/constr_SEQUENCE.h index a22ed3a..5ecfd8f 100644 --- a/e2ap/headers/constr_SEQUENCE.h +++ b/e2ap/headers/constr_SEQUENCE.h @@ -45,20 +45,47 @@ typedef struct asn_SEQUENCE_specifics_s { * A set specialized functions dealing with the SEQUENCE type. */ asn_struct_free_f SEQUENCE_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f SEQUENCE_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f SEQUENCE_compare; + asn_constr_check_f SEQUENCE_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f SEQUENCE_decode_ber; der_type_encoder_f SEQUENCE_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f SEQUENCE_decode_xer; xer_type_encoder_f SEQUENCE_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f SEQUENCE_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f SEQUENCE_decode_oer; oer_type_encoder_f SEQUENCE_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f SEQUENCE_decode_uper; per_type_encoder_f SEQUENCE_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f SEQUENCE_decode_aper; per_type_encoder_f SEQUENCE_encode_aper; -asn_random_fill_f SEQUENCE_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f SEQUENCE_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + extern asn_TYPE_operation_t asn_OP_SEQUENCE; #ifdef __cplusplus diff --git a/e2ap/headers/constr_SEQUENCE_OF.h b/e2ap/headers/constr_SEQUENCE_OF.h index 6857f0f..1768582 100644 --- a/e2ap/headers/constr_SEQUENCE_OF.h +++ b/e2ap/headers/constr_SEQUENCE_OF.h @@ -16,23 +16,49 @@ extern "C" { * A set specialized functions dealing with the SEQUENCE OF type. * Generally implemented using SET OF. */ +#define SEQUENCE_OF_free SET_OF_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define SEQUENCE_OF_print SET_OF_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f SEQUENCE_OF_compare; + +#define SEQUENCE_OF_constraint SET_OF_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define SEQUENCE_OF_decode_ber SET_OF_decode_ber der_type_encoder_f SEQUENCE_OF_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define SEQUENCE_OF_decode_xer SET_OF_decode_xer xer_type_encoder_f SEQUENCE_OF_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f SEQUENCE_OF_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) +#define SEQUENCE_OF_decode_oer SET_OF_decode_oer +#define SEQUENCE_OF_encode_oer SET_OF_encode_oer +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define SEQUENCE_OF_decode_uper SET_OF_decode_uper per_type_encoder_f SEQUENCE_OF_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define SEQUENCE_OF_decode_aper SET_OF_decode_aper per_type_encoder_f SEQUENCE_OF_encode_aper; -extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#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 +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +#define SEQUENCE_OF_random_fill SET_OF_random_fill +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF; #ifdef __cplusplus } diff --git a/e2ap/headers/constr_SET_OF.h b/e2ap/headers/constr_SET_OF.h index 7681062..0e9dd39 100644 --- a/e2ap/headers/constr_SET_OF.h +++ b/e2ap/headers/constr_SET_OF.h @@ -6,6 +6,7 @@ #define CONSTR_SET_OF_H #include +#include #ifdef __cplusplus extern "C" { @@ -26,22 +27,74 @@ typedef struct asn_SET_OF_specifics_s { * A set specialized functions dealing with the SET OF type. */ asn_struct_free_f SET_OF_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f SET_OF_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f SET_OF_compare; + asn_constr_check_f SET_OF_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f SET_OF_decode_ber; der_type_encoder_f SET_OF_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f SET_OF_decode_xer; xer_type_encoder_f SET_OF_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f SET_OF_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f SET_OF_decode_oer; oer_type_encoder_f SET_OF_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f SET_OF_decode_uper; per_type_encoder_f SET_OF_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f SET_OF_decode_aper; per_type_encoder_f SET_OF_encode_aper; -asn_random_fill_f SET_OF_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f SET_OF_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + extern asn_TYPE_operation_t asn_OP_SET_OF; +/* + * Internally visible buffer holding a single encoded element. + */ +struct _el_buffer { + uint8_t *buf; + size_t length; + size_t allocated_size; + unsigned bits_unused; +}; + +enum SET_OF__encode_method { + SOES_DER, /* Distinguished Encoding Rules */ + SOES_CUPER, /* Canonical Unaligned Packed Encoding Rules */ + SOES_CAPER /* Canonical Aligned Packed Encoding Rules */ +}; + +struct _el_buffer * SET_OF__encode_sorted( + const asn_TYPE_member_t *elm, + const asn_anonymous_set_ *list, + enum SET_OF__encode_method method); + +void SET_OF__encode_sorted_free( + struct _el_buffer *el_buf, + size_t count); + #ifdef __cplusplus } #endif diff --git a/e2ap/headers/constr_TYPE.h b/e2ap/headers/constr_TYPE.h index d80dea5..55c2574 100644 --- a/e2ap/headers/constr_TYPE.h +++ b/e2ap/headers/constr_TYPE.h @@ -34,23 +34,51 @@ typedef struct asn_struct_ctx_s { 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 +#if !defined(ASN_DISABLE_BER_SUPPORT) +#include /* Basic Encoding Rules decoder */ +#include /* Distinguished Encoding Rules encoder */ +#else +typedef void (ber_type_decoder_f)(void); +typedef void (der_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#include /* Decoder of XER (XML, text) */ +#include /* Encoder into XER (XML, text) */ +#else +typedef void (xer_type_decoder_f)(void); +typedef void (xer_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#include /* Encoder into JER (JSON, text) */ +#else +typedef void (jer_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +#include /* Packet Encoding Rules decoder */ +#include /* Packet Encoding Rules encoder */ +#else +typedef void (per_type_decoder_f)(void); +typedef void (per_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + +#include /* Subtype constraints support */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +#include /* Random structures support */ +#else +typedef void (asn_random_fill_f)(void); +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) +#include /* Octet Encoding Rules encoder */ +#include /* Octet Encoding Rules encoder */ +#else 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 +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ /* * Free the structure according to its specification. @@ -149,6 +177,7 @@ typedef struct asn_TYPE_operation_s { 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 */ + jer_type_encoder_f *jer_encoder; /* Generic JER 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 */ @@ -163,8 +192,12 @@ typedef struct asn_TYPE_operation_s { * A constraints tuple specifying both the OER and PER constraints. */ typedef struct asn_encoding_constraints_s { +#if !defined(ASN_DISABLE_OER_SUPPORT) const struct asn_oer_constraints_s *oer_constraints; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) const struct asn_per_constraints_s *per_constraints; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ asn_constr_check_f *general_constraints; } asn_encoding_constraints_t; @@ -239,8 +272,8 @@ typedef struct asn_TYPE_member_s { 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 */ + int toff_first; /* First occurrence of the el_tag, relative */ + int toff_last; /* Last occurrence of the el_tag, relative */ } asn_TYPE_tag2member_t; /* diff --git a/e2ap/headers/constraints.h b/e2ap/headers/constraints.h index 0bd86a9..0c093fa 100644 --- a/e2ap/headers/constraints.h +++ b/e2ap/headers/constraints.h @@ -6,6 +6,7 @@ #define ASN1_CONSTRAINTS_VALIDATOR_H #include /* Platform-dependent types */ +#include #ifdef __cplusplus extern "C" { diff --git a/e2ap/headers/jer_encoder.h b/e2ap/headers/jer_encoder.h new file mode 100644 index 0000000..672976d --- /dev/null +++ b/e2ap/headers/jer_encoder.h @@ -0,0 +1,86 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _JER_ENCODER_H_ +#define _JER_ENCODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* Flags used by the jer_encode() and (*jer_type_encoder_f), defined below + * + * This isn't actually used, it might be used in the future to support + * both normal JSON and prettified JSON output or removed. + * It came from XER + */ +enum jer_encoder_flags_e { + /* Mode of encoding */ + JER_F = 0x01, /* JER (pretty-printing) */ +}; + +/* + * The JER encoder of any type. May be invoked by the application. + * Produces JER output. + */ +asn_enc_rval_t jer_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 */ +); + +/* + * The variant of the above function which dumps the JER + * 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 jer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td, + const void *struct_ptr); + +/* + * A helper function that uses JER encoding/decoding to verify that: + * - Both structures encode into the same JER. + * - Both resulting JER byte streams can be decoded back. + * - Both decoded structures encode into the same JER (round-trip). + * All of this verifies equivalence between structures and a round-trip. + * ARGUMENTS: + * (opt_debug_stream) - If specified, prints ongoing details. + */ +enum jer_equivalence_e { + JEQ_SUCCESS, /* The only completely positive return value */ + JEQ_FAILURE, /* General failure */ + JEQ_ENCODE1_FAILED, /* First structure JER encoding failed */ + JEQ_ENCODE2_FAILED, /* Second structure JER encoding failed */ + JEQ_DIFFERENT, /* Structures encoded into different JER */ + JEQ_DECODE_FAILED, /* Decode of the JER data failed */ + JEQ_ROUND_TRIP_FAILED /* Bad round-trip */ +}; +enum jer_equivalence_e jer_equivalent( + const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct1, + const void *struct2, FILE *opt_debug_stream); + +/* + * Type of the generic JER encoder. + */ +typedef asn_enc_rval_t(jer_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 jer_encoder_flags_e jer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _JER_ENCODER_H_ */ diff --git a/e2ap/headers/per_decoder.h b/e2ap/headers/per_decoder.h index eea474a..3cc0c6b 100644 --- a/e2ap/headers/per_decoder.h +++ b/e2ap/headers/per_decoder.h @@ -14,58 +14,6 @@ extern "C" { 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. */ diff --git a/e2ap/headers/per_encoder.h b/e2ap/headers/per_encoder.h index b615ef0..8bb0771 100644 --- a/e2ap/headers/per_encoder.h +++ b/e2ap/headers/per_encoder.h @@ -14,70 +14,6 @@ extern "C" { 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. */ @@ -86,6 +22,15 @@ typedef asn_enc_rval_t(per_type_encoder_f)( const asn_per_constraints_t *constraints, const void *struct_ptr, asn_per_outp_t *per_output); +int ignore_output(const void *data, size_t size, void *app_key); + +typedef struct enc_dyn_arg { + void *buffer; + size_t length; + size_t allocated; +} enc_dyn_arg; +int encode_dyn_cb(const void *buffer, size_t size, void *key); + #ifdef __cplusplus } #endif diff --git a/e2ap/headers/per_opentype.h b/e2ap/headers/per_opentype.h index 1493b2d..fc37855 100644 --- a/e2ap/headers/per_opentype.h +++ b/e2ap/headers/per_opentype.h @@ -5,37 +5,17 @@ #ifndef _PER_OPENTYPE_H_ #define _PER_OPENTYPE_H_ +#include + #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); +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); #ifdef __cplusplus } diff --git a/e2ap/headers/per_support.h b/e2ap/headers/per_support.h index 23079c9..b3056a2 100644 --- a/e2ap/headers/per_support.h +++ b/e2ap/headers/per_support.h @@ -24,8 +24,8 @@ typedef struct asn_per_constraint_s { } 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 */ + intmax_t lower_bound; /* "lb" value */ + intmax_t upper_bound; /* "ub" value */ } asn_per_constraint_t; typedef struct asn_per_constraints_s { asn_per_constraint_t value; @@ -41,85 +41,12 @@ typedef struct asn_bit_data_s asn_per_data_t; #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 diff --git a/e2ap/headers/uper_decoder.h b/e2ap/headers/uper_decoder.h new file mode 100644 index 0000000..ded8515 --- /dev/null +++ b/e2ap/headers/uper_decoder.h @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_DECODER_H_ +#define _UPER_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 */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_DECODER_H_ */ diff --git a/e2ap/headers/uper_encoder.h b/e2ap/headers/uper_encoder.h new file mode 100644 index 0000000..8f73980 --- /dev/null +++ b/e2ap/headers/uper_encoder.h @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2006-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_ENCODER_H_ +#define _UPER_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 */ +); + +/* + * 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) */ +); + +/* + * 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 */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_ENCODER_H_ */ diff --git a/e2ap/headers/uper_opentype.h b/e2ap/headers/uper_opentype.h new file mode 100644 index 0000000..3a24822 --- /dev/null +++ b/e2ap/headers/uper_opentype.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2007-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_OPENTYPE_H_ +#define _UPER_OPENTYPE_H_ + +#include + +#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); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_OPENTYPE_H_ */ diff --git a/e2ap/headers/uper_support.h b/e2ap/headers/uper_support.h new file mode 100644 index 0000000..6c9d4ea --- /dev/null +++ b/e2ap/headers/uper_support.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_SUPPORT_H_ +#define _UPER_SUPPORT_H_ + +#include /* Platform-specific types */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * 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); + +/* + * Get the normally small length "n". + */ +ssize_t uper_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); + +/* X.691-2008/11, #11.5.6 */ +int uper_get_constrained_whole_number(asn_per_data_t *pd, uintmax_t *v, int nbits); + +/* + * 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, intmax_t lb, intmax_t ub, unsigned long *output); +int per_imax_range_rebase(intmax_t v, intmax_t lb, intmax_t ub, uintmax_t *output); +/* The inverse operation: restores the value by the offset and its bounds. */ +int per_long_range_unrebase(unsigned long inp, intmax_t lb, intmax_t ub, long *outp); +int per_imax_range_unrebase(uintmax_t inp, intmax_t lb, intmax_t ub, intmax_t *outp); + +/* X.691-2008/11, #11.5 */ +int uper_put_constrained_whole_number_u(asn_per_outp_t *po, uintmax_t 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); + +/* + * 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); + +/* + * Put the normally small non-negative whole number. + */ +int uper_put_nsnnwn(asn_per_outp_t *po, int n); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_SUPPORT_H_ */ diff --git a/e2ap/headers/xer_encoder.h b/e2ap/headers/xer_encoder.h index 9d75922..6cfc505 100644 --- a/e2ap/headers/xer_encoder.h +++ b/e2ap/headers/xer_encoder.h @@ -54,7 +54,7 @@ int xer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td, 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_ENCODE1_FAILED, /* First structure 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 */ diff --git a/e2ap/headers/xer_support.h b/e2ap/headers/xer_support.h index c3a36e7..2c3f369 100644 --- a/e2ap/headers/xer_support.h +++ b/e2ap/headers/xer_support.h @@ -40,8 +40,8 @@ typedef int (pxml_callback_f)(pxml_chunk_type_e _type, /* * 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. + * Invoke the specified callback each time the meaningful data is found. + * This function returns number of bytes consumed from the buffer. * It will always be lesser than or equal to the specified _size. * The next invocation of this function must account the difference. */ diff --git a/e2sm/lib/GNB-CU-CP-Name.c b/e2ap/lib/AMFName.c similarity index 61% rename from e2sm/lib/GNB-CU-CP-Name.c rename to e2ap/lib/AMFName.c index bfc4771..7750cc9 100644 --- a/e2sm/lib/GNB-CU-CP-Name.c +++ b/e2ap/lib/AMFName.c @@ -1,11 +1,11 @@ /* * 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` + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ -#include "GNB-CU-CP-Name.h" +#include "AMFName.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, /* */ @@ -40,7 +40,7 @@ static int check_permitted_alphabet_1(const void *sptr) { } int -GNB_CU_CP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, +AMFName_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; @@ -54,7 +54,7 @@ GNB_CU_CP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size >= 1 && size <= 150) + if((size >= 1UL && size <= 150UL) && !check_permitted_alphabet_1(st)) { /* Constraint check succeeded */ return 0; @@ -66,12 +66,12 @@ GNB_CU_CP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, } } -static int asn_PER_MAP_GNB_CU_CP_Name_1_v2c(unsigned int value) { +static int asn_PER_MAP_AMFName_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) { +static int asn_PER_MAP_AMFName_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]; @@ -80,29 +80,41 @@ static int asn_PER_MAP_GNB_CU_CP_Name_1_c2v(unsigned int 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 = { +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_AMFName_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 = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_AMFName_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 */ + asn_PER_MAP_AMFName_1_v2c, /* Value to PER code map */ + asn_PER_MAP_AMFName_1_c2v /* PER code to value map */ }; -static const ber_tlv_tag_t asn_DEF_GNB_CU_CP_Name_tags_1[] = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_AMFName_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_TYPE_descriptor_t asn_DEF_AMFName = { + "AMFName", + "AMFName", &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 }, + asn_DEF_AMFName_tags_1, + sizeof(asn_DEF_AMFName_tags_1) + /sizeof(asn_DEF_AMFName_tags_1[0]), /* 1 */ + asn_DEF_AMFName_tags_1, /* Same as above */ + sizeof(asn_DEF_AMFName_tags_1) + /sizeof(asn_DEF_AMFName_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_AMFName_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_AMFName_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + AMFName_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/ANY.c b/e2ap/lib/ANY.c index 0b81557..bf988db 100644 --- a/e2ap/lib/ANY.c +++ b/e2ap/lib/ANY.c @@ -4,447 +4,77 @@ */ #include #include -#include asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = { - sizeof(ANY_t), - offsetof(ANY_t, _asn_ctx), - ASN_OSUBV_ANY + 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, + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print, #else - 0, - 0, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, 0, 0, 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_hex, + ANY_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + ANY_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, + 0, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + ANY_decode_uper, + ANY_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + ANY_decode_aper, + ANY_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_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, + "ANY", + "ANY", + &asn_OP_ANY, + 0, 0, 0, 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2ap/lib/ANY_aper.c b/e2ap/lib/ANY_aper.c new file mode 100644 index 0000000..91d7277 --- /dev/null +++ b/e2ap/lib/ANY_aper.c @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(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_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_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; + } +} + +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, -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 = aper_put_length(po, -1, -1, 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 && aper_put_length(po, -1, -1, 0, NULL)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size); + + ASN__ENCODED_OK(er); +} diff --git a/e2ap/lib/ANY_ber.c b/e2ap/lib/ANY_ber.c new file mode 100644 index 0000000..2ebe45b --- /dev/null +++ b/e2ap/lib/ANY_ber.c @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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) { + 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; +} + +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; +} + +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; + } +} + +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; + } +} diff --git a/e2ap/lib/ANY_jer.c b/e2ap/lib/ANY_jer.c new file mode 100644 index 0000000..a86db9c --- /dev/null +++ b/e2ap/lib/ANY_jer.c @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +ANY_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + ASN__ENCODE_FAILED; + + /* Dump as binary */ + return OCTET_STRING_encode_jer(td, sptr, ilevel, flags, cb, app_key); +} diff --git a/e2ap/lib/ANY_uper.c b/e2ap/lib/ANY_uper.c new file mode 100644 index 0000000..65f1519 --- /dev/null +++ b/e2ap/lib/ANY_uper.c @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +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); +} diff --git a/e2ap/lib/ANY_xer.c b/e2ap/lib/ANY_xer.c new file mode 100644 index 0000000..112c213 --- /dev/null +++ b/e2ap/lib/ANY_xer.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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); +} diff --git a/e2ap/lib/BIT_STRING.c b/e2ap/lib/BIT_STRING.c index e8d7354..b5ba940 100644 --- a/e2ap/lib/BIT_STRING.c +++ b/e2ap/lib/BIT_STRING.c @@ -4,61 +4,94 @@ */ #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_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 + 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, + OCTET_STRING_free, /* Implemented in terms of OCTET STRING */ +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + BIT_STRING_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + BIT_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_binary, + BIT_STRING_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + BIT_STRING_encode_jer, #else - BIT_STRING_decode_oer, - BIT_STRING_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + BIT_STRING_decode_oer, + BIT_STRING_encode_oer, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + BIT_STRING_decode_uper, /* Unaligned PER decoder */ + BIT_STRING_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + BIT_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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", + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + BIT_STRING_constraint + }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs }; /* @@ -87,136 +120,10 @@ BIT_STRING_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, 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 * +const BIT_STRING_t * BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp) { const uint8_t *b; union { @@ -271,6 +178,7 @@ BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const BIT_STRING_t *b = BIT_STRING__compactify(bptr, &compact_b); const asn_OCTET_STRING_specifics_t *specs = td->specifics; + (void)specs; assert(specs && specs->subvariant == ASN_OSUBV_BIT); if(a && b) { @@ -303,354 +211,3 @@ BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2ap/lib/BIT_STRING_jer.c b/e2ap/lib/BIT_STRING_jer.c new file mode 100644 index 0000000..f66238d --- /dev/null +++ b/e2ap/lib/BIT_STRING_jer.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +BIT_STRING_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + const char * const h2c = "0123456789ABCDEF"; + char scratch[16 * 3 + 4]; + char *p = scratch; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + 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 */ + + /* + * Hex dump + */ + *p++ = '"'; + for(int i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + ASN__CALLBACK(scratch, p-scratch); + p = scratch; + } + *p++ = h2c[*buf >> 4]; + *p++ = h2c[*buf & 0x0F]; + } + + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + + if(buf == end) { + int ubits = st->bits_unused; + uint8_t v = *buf & (0xff << ubits); + *p++ = h2c[v >> 4]; + *p++ = h2c[v & 0x0F]; + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + } + *p++ = '"'; + ASN__CALLBACK(scratch, p - scratch); + ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} diff --git a/e2ap/lib/BIT_STRING_oer.c b/e2ap/lib/BIT_STRING_oer.c index aff5075..95c9558 100644 --- a/e2ap/lib/BIT_STRING_oer.c +++ b/e2ap/lib/BIT_STRING_oer.c @@ -3,11 +3,8 @@ * 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, @@ -169,6 +166,3 @@ BIT_STRING_encode_oer(const asn_TYPE_descriptor_t *td, return erval; } - - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/BIT_STRING_print.c b/e2ap/lib/BIT_STRING_print.c new file mode 100644 index 0000000..bab1ea5 --- /dev/null +++ b/e2ap/lib/BIT_STRING_print.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2ap/lib/BIT_STRING_rfill.c b/e2ap/lib/BIT_STRING_rfill.c new file mode 100644 index 0000000..a6e6a95 --- /dev/null +++ b/e2ap/lib/BIT_STRING_rfill.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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 { +#else + if(!constraints) constraints = &td->encoding_constraints; + { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2ap/lib/BIT_STRING_uper.c b/e2ap/lib/BIT_STRING_uper.c new file mode 100644 index 0000000..d82349e --- /dev/null +++ b/e2ap/lib/BIT_STRING_uper.c @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +#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); +} diff --git a/e2ap/lib/BIT_STRING_xer.c b/e2ap/lib/BIT_STRING_xer.c new file mode 100644 index 0000000..67d5cb8 --- /dev/null +++ b/e2ap/lib/BIT_STRING_xer.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2ap/lib/Cause.c b/e2ap/lib/Cause.c index bdb51be..62dfb0f 100644 --- a/e2ap/lib/Cause.c +++ b/e2ap/lib/Cause.c @@ -1,27 +1,39 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "Cause.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_Cause_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) asn_per_constraints_t asn_PER_type_Cause_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + &asn_DEF_CauseRICrequest, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricRequest" }, @@ -30,34 +42,83 @@ asn_TYPE_member_t asn_MBR_Cause_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_CauseRICservice, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricService" }, - { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.transport), + { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.e2Node), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ + &asn_DEF_CauseE2node, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2Node" + }, + { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.transport), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ &asn_DEF_CauseTransport, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "transport" }, { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.protocol), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_CauseProtocol, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocol" }, { ATF_NOFLAGS, 0, offsetof(struct Cause, choice.misc), - (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_CauseMisc, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "misc" }, @@ -65,9 +126,10 @@ asn_TYPE_member_t asn_MBR_Cause_1[] = { 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_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* misc */ }; asn_CHOICE_specifics_t asn_SPC_Cause_specs_1 = { sizeof(struct Cause), @@ -75,9 +137,9 @@ asn_CHOICE_specifics_t asn_SPC_Cause_specs_1 = { offsetof(struct Cause, present), sizeof(((struct Cause *)0)->present), asn_MAP_Cause_tag2el_1, - 5, /* Count of tags in the map */ + 6, /* Count of tags in the map */ 0, 0, - 5 /* Extensions start */ + 6 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_Cause = { "Cause", @@ -87,9 +149,17 @@ asn_TYPE_descriptor_t asn_DEF_Cause = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Cause_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Cause_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_Cause_1, - 5, /* Elements count */ + 6, /* Elements count */ &asn_SPC_Cause_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/CauseE2node.c b/e2ap/lib/CauseE2node.c new file mode 100644 index 0000000..0eaef40 --- /dev/null +++ b/e2ap/lib/CauseE2node.c @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "CauseE2node.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_CauseE2node_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_CauseE2node_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_CauseE2node_value2enum_1[] = { + { 0, 24, "e2node-component-unknown" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_CauseE2node_enum2value_1[] = { + 0 /* e2node-component-unknown(0) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_CauseE2node_specs_1 = { + asn_MAP_CauseE2node_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_CauseE2node_enum2value_1, /* 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_CauseE2node_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_CauseE2node = { + "CauseE2node", + "CauseE2node", + &asn_OP_NativeEnumerated, + asn_DEF_CauseE2node_tags_1, + sizeof(asn_DEF_CauseE2node_tags_1) + /sizeof(asn_DEF_CauseE2node_tags_1[0]), /* 1 */ + asn_DEF_CauseE2node_tags_1, /* Same as above */ + sizeof(asn_DEF_CauseE2node_tags_1) + /sizeof(asn_DEF_CauseE2node_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CauseE2node_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CauseE2node_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_CauseE2node_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/CauseMisc.c b/e2ap/lib/CauseMisc.c index e09c0b1..6d68a98 100644 --- a/e2ap/lib/CauseMisc.c +++ b/e2ap/lib/CauseMisc.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CauseMisc.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_CauseMisc_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_CauseMisc_value2enum_1[] = { { 0, 27, "control-processing-overload" }, { 1, 16, "hardware-failure" }, @@ -55,7 +59,15 @@ asn_TYPE_descriptor_t asn_DEF_CauseMisc = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CauseMisc_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CauseMisc_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_CauseMisc_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/CauseProtocol.c b/e2ap/lib/CauseProtocol.c index 66bb383..ad81d56 100644 --- a/e2ap/lib/CauseProtocol.c +++ b/e2ap/lib/CauseProtocol.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CauseProtocol.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_CauseProtocol_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_CauseProtocol_value2enum_1[] = { { 0, 21, "transfer-syntax-error" }, { 1, 28, "abstract-syntax-error-reject" }, @@ -61,7 +65,15 @@ asn_TYPE_descriptor_t asn_DEF_CauseProtocol = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CauseProtocol_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CauseProtocol_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_CauseProtocol_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/CauseRIC.c b/e2ap/lib/CauseRIC.c deleted file mode 100644 index 7d94696..0000000 --- a/e2ap/lib/CauseRIC.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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/e2ap/lib/CauseRICrequest.c b/e2ap/lib/CauseRICrequest.c new file mode 100644 index 0000000..43ab462 --- /dev/null +++ b/e2ap/lib/CauseRICrequest.c @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "CauseRICrequest.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_CauseRICrequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_CauseRICrequest_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 13 } /* (0..13,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_CauseRICrequest_value2enum_1[] = { + { 0, 23, "ran-function-id-invalid" }, + { 1, 20, "action-not-supported" }, + { 2, 17, "excessive-actions" }, + { 3, 16, "duplicate-action" }, + { 4, 23, "duplicate-event-trigger" }, + { 5, 23, "function-resource-limit" }, + { 6, 18, "request-id-unknown" }, + { 7, 46, "inconsistent-action-subsequent-action-sequence" }, + { 8, 23, "control-message-invalid" }, + { 9, 27, "ric-call-process-id-invalid" }, + { 10, 21, "control-timer-expired" }, + { 11, 25, "control-failed-to-execute" }, + { 12, 16, "system-not-ready" }, + { 13, 11, "unspecified" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_CauseRICrequest_enum2value_1[] = { + 1, /* action-not-supported(1) */ + 11, /* control-failed-to-execute(11) */ + 8, /* control-message-invalid(8) */ + 10, /* control-timer-expired(10) */ + 3, /* duplicate-action(3) */ + 4, /* duplicate-event-trigger(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) */ + 9, /* ric-call-process-id-invalid(9) */ + 12, /* system-not-ready(12) */ + 13 /* unspecified(13) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_CauseRICrequest_specs_1 = { + asn_MAP_CauseRICrequest_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_CauseRICrequest_enum2value_1, /* N => "tag"; sorted by N */ + 14, /* Number of elements in the maps */ + 15, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_CauseRICrequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_CauseRICrequest = { + "CauseRICrequest", + "CauseRICrequest", + &asn_OP_NativeEnumerated, + asn_DEF_CauseRICrequest_tags_1, + sizeof(asn_DEF_CauseRICrequest_tags_1) + /sizeof(asn_DEF_CauseRICrequest_tags_1[0]), /* 1 */ + asn_DEF_CauseRICrequest_tags_1, /* Same as above */ + sizeof(asn_DEF_CauseRICrequest_tags_1) + /sizeof(asn_DEF_CauseRICrequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CauseRICrequest_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CauseRICrequest_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_CauseRICrequest_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/CauseRICservice.c b/e2ap/lib/CauseRICservice.c index c2cbccb..e886229 100644 --- a/e2ap/lib/CauseRICservice.c +++ b/e2ap/lib/CauseRICservice.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CauseRICservice.h" @@ -11,23 +11,27 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_CauseRICservice_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_CauseRICservice_value2enum_1[] = { - { 0, 21, "function-not-required" }, + { 0, 26, "ran-function-not-supported" }, { 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) */ + 0, /* ran-function-not-supported(0) */ 2 /* ric-resource-limit(2) */ /* This list is extensible */ }; @@ -53,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_CauseRICservice = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CauseRICservice_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CauseRICservice_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_CauseRICservice_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/CauseTransport.c b/e2ap/lib/CauseTransport.c index a0a5f38..1f2070a 100644 --- a/e2ap/lib/CauseTransport.c +++ b/e2ap/lib/CauseTransport.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CauseTransport.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_CauseTransport_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_CauseTransport_value2enum_1[] = { { 0, 11, "unspecified" }, { 1, 30, "transport-resource-unavailable" } @@ -51,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_CauseTransport = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CauseTransport_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CauseTransport_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_CauseTransport_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/Criticality.c b/e2ap/lib/Criticality.c index 9bfe1ca..93b2c05 100644 --- a/e2ap/lib/Criticality.c +++ b/e2ap/lib/Criticality.c @@ -1,8 +1,8 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "Criticality.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_Criticality_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_Criticality_value2enum_1[] = { { 0, 6, "reject" }, { 1, 6, "ignore" }, @@ -51,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_Criticality = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Criticality_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Criticality_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_Criticality_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/CriticalityDiagnostics-IE-Item.c b/e2ap/lib/CriticalityDiagnostics-IE-Item.c index d950a0c..2fa613f 100644 --- a/e2ap/lib/CriticalityDiagnostics-IE-Item.c +++ b/e2ap/lib/CriticalityDiagnostics-IE-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CriticalityDiagnostics-IE-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_Criticality, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "iECriticality" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_ProtocolIE_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "iE-ID" }, @@ -31,7 +47,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_TypeOfError, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "typeOfError" }, @@ -62,7 +86,15 @@ asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_CriticalityDiagnostics_IE_Item_1, 3, /* Elements count */ &asn_SPC_CriticalityDiagnostics_IE_Item_specs_1 /* Additional specs */ diff --git a/e2ap/lib/CriticalityDiagnostics-IE-List.c b/e2ap/lib/CriticalityDiagnostics-IE-List.c index 29ae2dd..a190f77 100644 --- a/e2ap/lib/CriticalityDiagnostics-IE-List.c +++ b/e2ap/lib/CriticalityDiagnostics-IE-List.c @@ -1,28 +1,40 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CriticalityDiagnostics-IE-List.h" #include "CriticalityDiagnostics-IE-Item.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_CriticalityDiagnostics_IE_List_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -45,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CriticalityDiagnostics_IE_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CriticalityDiagnostics_IE_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_CriticalityDiagnostics_IE_List_1, 1, /* Single element */ &asn_SPC_CriticalityDiagnostics_IE_List_specs_1 /* Additional specs */ diff --git a/e2ap/lib/CriticalityDiagnostics.c b/e2ap/lib/CriticalityDiagnostics.c index c07926c..14b2b56 100644 --- a/e2ap/lib/CriticalityDiagnostics.c +++ b/e2ap/lib/CriticalityDiagnostics.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CriticalityDiagnostics.h" @@ -15,7 +15,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_ProcedureCode, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "procedureCode" }, @@ -24,7 +32,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_TriggeringMessage, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "triggeringMessage" }, @@ -33,7 +49,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_Criticality, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "procedureCriticality" }, @@ -42,7 +66,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricRequestorID" }, @@ -51,7 +83,15 @@ asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_CriticalityDiagnostics_IE_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "iEsCriticalityDiagnostics" }, @@ -86,7 +126,15 @@ asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_CriticalityDiagnostics_1, 5, /* Elements count */ &asn_SPC_CriticalityDiagnostics_specs_1 /* Additional specs */ diff --git a/e2ap/lib/E2AP-PDU.c b/e2ap/lib/E2AP-PDU.c index c8386c2..080442e 100644 --- a/e2ap/lib/E2AP-PDU.c +++ b/e2ap/lib/E2AP-PDU.c @@ -1,8 +1,8 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2AP-PDU.h" @@ -10,21 +10,33 @@ #include "InitiatingMessage.h" #include "SuccessfulOutcome.h" #include "UnsuccessfulOutcome.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_E2AP_PDU_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "initiatingMessage" }, @@ -33,7 +45,15 @@ static asn_TYPE_member_t asn_MBR_E2AP_PDU_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_SuccessfulOutcome, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "successfulOutcome" }, @@ -42,7 +62,15 @@ static asn_TYPE_member_t asn_MBR_E2AP_PDU_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UnsuccessfulOutcome, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "unsuccessfulOutcome" }, @@ -70,7 +98,15 @@ asn_TYPE_descriptor_t asn_DEF_E2AP_PDU = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2AP_PDU_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2AP_PDU_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_E2AP_PDU_1, 3, /* Elements count */ &asn_SPC_E2AP_PDU_specs_1 /* Additional specs */ diff --git a/e2ap/lib/E2connectionSetupFailed-Item.c b/e2ap/lib/E2connectionSetupFailed-Item.c new file mode 100644 index 0000000..501bec2 --- /dev/null +++ b/e2ap/lib/E2connectionSetupFailed-Item.c @@ -0,0 +1,84 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionSetupFailed-Item.h" + +asn_TYPE_member_t asn_MBR_E2connectionSetupFailed_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionSetupFailed_Item, tnlInformation), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TNLinformation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tnlInformation" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2connectionSetupFailed_Item, cause), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Cause, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cause" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionSetupFailed_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionSetupFailed_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tnlInformation */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cause */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2connectionSetupFailed_Item_specs_1 = { + sizeof(struct E2connectionSetupFailed_Item), + offsetof(struct E2connectionSetupFailed_Item, _asn_ctx), + asn_MAP_E2connectionSetupFailed_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_E2connectionSetupFailed_Item = { + "E2connectionSetupFailed-Item", + "E2connectionSetupFailed-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionSetupFailed_Item_tags_1, + sizeof(asn_DEF_E2connectionSetupFailed_Item_tags_1) + /sizeof(asn_DEF_E2connectionSetupFailed_Item_tags_1[0]), /* 1 */ + asn_DEF_E2connectionSetupFailed_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionSetupFailed_Item_tags_1) + /sizeof(asn_DEF_E2connectionSetupFailed_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionSetupFailed_Item_1, + 2, /* Elements count */ + &asn_SPC_E2connectionSetupFailed_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionSetupFailed-List.c b/e2ap/lib/E2connectionSetupFailed-List.c new file mode 100644 index 0000000..0b581bc --- /dev/null +++ b/e2ap/lib/E2connectionSetupFailed-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionSetupFailed-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2connectionSetupFailed_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2connectionSetupFailed_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2connectionSetupFailed_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P6, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionSetupFailed_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2connectionSetupFailed_List_specs_1 = { + sizeof(struct E2connectionSetupFailed_List), + offsetof(struct E2connectionSetupFailed_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2connectionSetupFailed_List = { + "E2connectionSetupFailed-List", + "E2connectionSetupFailed-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2connectionSetupFailed_List_tags_1, + sizeof(asn_DEF_E2connectionSetupFailed_List_tags_1) + /sizeof(asn_DEF_E2connectionSetupFailed_List_tags_1[0]), /* 1 */ + asn_DEF_E2connectionSetupFailed_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionSetupFailed_List_tags_1) + /sizeof(asn_DEF_E2connectionSetupFailed_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2connectionSetupFailed_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2connectionSetupFailed_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2connectionSetupFailed_List_1, + 1, /* Single element */ + &asn_SPC_E2connectionSetupFailed_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionUpdate-Item.c b/e2ap/lib/E2connectionUpdate-Item.c new file mode 100644 index 0000000..f7f22a6 --- /dev/null +++ b/e2ap/lib/E2connectionUpdate-Item.c @@ -0,0 +1,84 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionUpdate-Item.h" + +asn_TYPE_member_t asn_MBR_E2connectionUpdate_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_Item, tnlInformation), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TNLinformation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tnlInformation" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_Item, tnlUsage), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TNLusage, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tnlUsage" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdate_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdate_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tnlInformation */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* tnlUsage */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdate_Item_specs_1 = { + sizeof(struct E2connectionUpdate_Item), + offsetof(struct E2connectionUpdate_Item, _asn_ctx), + asn_MAP_E2connectionUpdate_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_E2connectionUpdate_Item = { + "E2connectionUpdate-Item", + "E2connectionUpdate-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionUpdate_Item_tags_1, + sizeof(asn_DEF_E2connectionUpdate_Item_tags_1) + /sizeof(asn_DEF_E2connectionUpdate_Item_tags_1[0]), /* 1 */ + asn_DEF_E2connectionUpdate_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdate_Item_tags_1) + /sizeof(asn_DEF_E2connectionUpdate_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdate_Item_1, + 2, /* Elements count */ + &asn_SPC_E2connectionUpdate_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionUpdate-List.c b/e2ap/lib/E2connectionUpdate-List.c new file mode 100644 index 0000000..37b0c7f --- /dev/null +++ b/e2ap/lib/E2connectionUpdate-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionUpdate-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2connectionUpdate_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2connectionUpdate_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2connectionUpdate_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P4, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdate_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2connectionUpdate_List_specs_1 = { + sizeof(struct E2connectionUpdate_List), + offsetof(struct E2connectionUpdate_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2connectionUpdate_List = { + "E2connectionUpdate-List", + "E2connectionUpdate-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2connectionUpdate_List_tags_1, + sizeof(asn_DEF_E2connectionUpdate_List_tags_1) + /sizeof(asn_DEF_E2connectionUpdate_List_tags_1[0]), /* 1 */ + asn_DEF_E2connectionUpdate_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdate_List_tags_1) + /sizeof(asn_DEF_E2connectionUpdate_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2connectionUpdate_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2connectionUpdate_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2connectionUpdate_List_1, + 1, /* Single element */ + &asn_SPC_E2connectionUpdate_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionUpdate.c b/e2ap/lib/E2connectionUpdate.c new file mode 100644 index 0000000..0a1b6fd --- /dev/null +++ b/e2ap/lib/E2connectionUpdate.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionUpdate.h" + +asn_TYPE_member_t asn_MBR_E2connectionUpdate_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_85P15, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdate_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdate_specs_1 = { + sizeof(struct E2connectionUpdate), + offsetof(struct E2connectionUpdate, _asn_ctx), + asn_MAP_E2connectionUpdate_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_E2connectionUpdate = { + "E2connectionUpdate", + "E2connectionUpdate", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionUpdate_tags_1, + sizeof(asn_DEF_E2connectionUpdate_tags_1) + /sizeof(asn_DEF_E2connectionUpdate_tags_1[0]), /* 1 */ + asn_DEF_E2connectionUpdate_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdate_tags_1) + /sizeof(asn_DEF_E2connectionUpdate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdate_1, + 1, /* Elements count */ + &asn_SPC_E2connectionUpdate_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionUpdateAcknowledge.c b/e2ap/lib/E2connectionUpdateAcknowledge.c new file mode 100644 index 0000000..0f90700 --- /dev/null +++ b/e2ap/lib/E2connectionUpdateAcknowledge.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionUpdateAcknowledge.h" + +asn_TYPE_member_t asn_MBR_E2connectionUpdateAcknowledge_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateAcknowledge, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_85P16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdateAcknowledge_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdateAcknowledge_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateAcknowledge_specs_1 = { + sizeof(struct E2connectionUpdateAcknowledge), + offsetof(struct E2connectionUpdateAcknowledge, _asn_ctx), + asn_MAP_E2connectionUpdateAcknowledge_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_E2connectionUpdateAcknowledge = { + "E2connectionUpdateAcknowledge", + "E2connectionUpdateAcknowledge", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionUpdateAcknowledge_tags_1, + sizeof(asn_DEF_E2connectionUpdateAcknowledge_tags_1) + /sizeof(asn_DEF_E2connectionUpdateAcknowledge_tags_1[0]), /* 1 */ + asn_DEF_E2connectionUpdateAcknowledge_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdateAcknowledge_tags_1) + /sizeof(asn_DEF_E2connectionUpdateAcknowledge_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdateAcknowledge_1, + 1, /* Elements count */ + &asn_SPC_E2connectionUpdateAcknowledge_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionUpdateFailure.c b/e2ap/lib/E2connectionUpdateFailure.c new file mode 100644 index 0000000..22665e0 --- /dev/null +++ b/e2ap/lib/E2connectionUpdateFailure.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionUpdateFailure.h" + +asn_TYPE_member_t asn_MBR_E2connectionUpdateFailure_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_85P17, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdateFailure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdateFailure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateFailure_specs_1 = { + sizeof(struct E2connectionUpdateFailure), + offsetof(struct E2connectionUpdateFailure, _asn_ctx), + asn_MAP_E2connectionUpdateFailure_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_E2connectionUpdateFailure = { + "E2connectionUpdateFailure", + "E2connectionUpdateFailure", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionUpdateFailure_tags_1, + sizeof(asn_DEF_E2connectionUpdateFailure_tags_1) + /sizeof(asn_DEF_E2connectionUpdateFailure_tags_1[0]), /* 1 */ + asn_DEF_E2connectionUpdateFailure_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdateFailure_tags_1) + /sizeof(asn_DEF_E2connectionUpdateFailure_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdateFailure_1, + 1, /* Elements count */ + &asn_SPC_E2connectionUpdateFailure_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionUpdateRemove-Item.c b/e2ap/lib/E2connectionUpdateRemove-Item.c new file mode 100644 index 0000000..584bdcc --- /dev/null +++ b/e2ap/lib/E2connectionUpdateRemove-Item.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionUpdateRemove-Item.h" + +asn_TYPE_member_t asn_MBR_E2connectionUpdateRemove_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateRemove_Item, tnlInformation), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TNLinformation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tnlInformation" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdateRemove_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdateRemove_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* tnlInformation */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateRemove_Item_specs_1 = { + sizeof(struct E2connectionUpdateRemove_Item), + offsetof(struct E2connectionUpdateRemove_Item, _asn_ctx), + asn_MAP_E2connectionUpdateRemove_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_E2connectionUpdateRemove_Item = { + "E2connectionUpdateRemove-Item", + "E2connectionUpdateRemove-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionUpdateRemove_Item_tags_1, + sizeof(asn_DEF_E2connectionUpdateRemove_Item_tags_1) + /sizeof(asn_DEF_E2connectionUpdateRemove_Item_tags_1[0]), /* 1 */ + asn_DEF_E2connectionUpdateRemove_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdateRemove_Item_tags_1) + /sizeof(asn_DEF_E2connectionUpdateRemove_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdateRemove_Item_1, + 1, /* Elements count */ + &asn_SPC_E2connectionUpdateRemove_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2connectionUpdateRemove-List.c b/e2ap/lib/E2connectionUpdateRemove-List.c new file mode 100644 index 0000000..dcea9a8 --- /dev/null +++ b/e2ap/lib/E2connectionUpdateRemove-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2connectionUpdateRemove-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2connectionUpdateRemove_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2connectionUpdateRemove_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2connectionUpdateRemove_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P5, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdateRemove_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2connectionUpdateRemove_List_specs_1 = { + sizeof(struct E2connectionUpdateRemove_List), + offsetof(struct E2connectionUpdateRemove_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2connectionUpdateRemove_List = { + "E2connectionUpdateRemove-List", + "E2connectionUpdateRemove-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2connectionUpdateRemove_List_tags_1, + sizeof(asn_DEF_E2connectionUpdateRemove_List_tags_1) + /sizeof(asn_DEF_E2connectionUpdateRemove_List_tags_1[0]), /* 1 */ + asn_DEF_E2connectionUpdateRemove_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdateRemove_List_tags_1) + /sizeof(asn_DEF_E2connectionUpdateRemove_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2connectionUpdateRemove_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2connectionUpdateRemove_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2connectionUpdateRemove_List_1, + 1, /* Single element */ + &asn_SPC_E2connectionUpdateRemove_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigAddition-Item.c b/e2ap/lib/E2nodeComponentConfigAddition-Item.c new file mode 100644 index 0000000..15fe45c --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigAddition-Item.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigAddition-Item.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAddition_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAddition_Item, e2nodeComponentInterfaceType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceType" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAddition_Item, e2nodeComponentID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_E2nodeComponentID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAddition_Item, e2nodeComponentConfiguration), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentConfiguration, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentConfiguration" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigAddition_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigAddition_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentInterfaceType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e2nodeComponentID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* e2nodeComponentConfiguration */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigAddition_Item_specs_1 = { + sizeof(struct E2nodeComponentConfigAddition_Item), + offsetof(struct E2nodeComponentConfigAddition_Item, _asn_ctx), + asn_MAP_E2nodeComponentConfigAddition_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_E2nodeComponentConfigAddition_Item = { + "E2nodeComponentConfigAddition-Item", + "E2nodeComponentConfigAddition-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigAddition_Item_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigAddition_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAddition_Item_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigAddition_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigAddition_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAddition_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigAddition_Item_1, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigAddition_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigAddition-List.c b/e2ap/lib/E2nodeComponentConfigAddition-List.c new file mode 100644 index 0000000..bfd1ff9 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigAddition-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigAddition-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentConfigAddition_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentConfigAddition_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAddition_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P7, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigAddition_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigAddition_List_specs_1 = { + sizeof(struct E2nodeComponentConfigAddition_List), + offsetof(struct E2nodeComponentConfigAddition_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAddition_List = { + "E2nodeComponentConfigAddition-List", + "E2nodeComponentConfigAddition-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2nodeComponentConfigAddition_List_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigAddition_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAddition_List_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigAddition_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigAddition_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAddition_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentConfigAddition_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentConfigAddition_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2nodeComponentConfigAddition_List_1, + 1, /* Single element */ + &asn_SPC_E2nodeComponentConfigAddition_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigAdditionAck-Item.c b/e2ap/lib/E2nodeComponentConfigAdditionAck-Item.c new file mode 100644 index 0000000..f017c34 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigAdditionAck-Item.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigAdditionAck-Item.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAdditionAck_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAdditionAck_Item, e2nodeComponentInterfaceType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceType" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAdditionAck_Item, e2nodeComponentID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_E2nodeComponentID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAdditionAck_Item, e2nodeComponentConfigurationAck), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentConfigurationAck, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentConfigurationAck" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigAdditionAck_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigAdditionAck_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentInterfaceType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e2nodeComponentID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* e2nodeComponentConfigurationAck */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigAdditionAck_Item_specs_1 = { + sizeof(struct E2nodeComponentConfigAdditionAck_Item), + offsetof(struct E2nodeComponentConfigAdditionAck_Item, _asn_ctx), + asn_MAP_E2nodeComponentConfigAdditionAck_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_E2nodeComponentConfigAdditionAck_Item = { + "E2nodeComponentConfigAdditionAck-Item", + "E2nodeComponentConfigAdditionAck-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigAdditionAck_Item_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_Item_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigAdditionAck_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigAdditionAck_Item_1, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigAdditionAck_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigAdditionAck-List.c b/e2ap/lib/E2nodeComponentConfigAdditionAck-List.c new file mode 100644 index 0000000..093858a --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigAdditionAck-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigAdditionAck-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentConfigAdditionAck_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentConfigAdditionAck_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAdditionAck_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P11, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigAdditionAck_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigAdditionAck_List_specs_1 = { + sizeof(struct E2nodeComponentConfigAdditionAck_List), + offsetof(struct E2nodeComponentConfigAdditionAck_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigAdditionAck_List = { + "E2nodeComponentConfigAdditionAck-List", + "E2nodeComponentConfigAdditionAck-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2nodeComponentConfigAdditionAck_List_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_List_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigAdditionAck_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentConfigAdditionAck_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentConfigAdditionAck_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2nodeComponentConfigAdditionAck_List_1, + 1, /* Single element */ + &asn_SPC_E2nodeComponentConfigAdditionAck_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigRemoval-Item.c b/e2ap/lib/E2nodeComponentConfigRemoval-Item.c new file mode 100644 index 0000000..05d6cb2 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigRemoval-Item.c @@ -0,0 +1,84 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigRemoval-Item.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemoval_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemoval_Item, e2nodeComponentInterfaceType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceType" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemoval_Item, e2nodeComponentID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_E2nodeComponentID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentID" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigRemoval_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigRemoval_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentInterfaceType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* e2nodeComponentID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemoval_Item_specs_1 = { + sizeof(struct E2nodeComponentConfigRemoval_Item), + offsetof(struct E2nodeComponentConfigRemoval_Item, _asn_ctx), + asn_MAP_E2nodeComponentConfigRemoval_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_E2nodeComponentConfigRemoval_Item = { + "E2nodeComponentConfigRemoval-Item", + "E2nodeComponentConfigRemoval-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigRemoval_Item_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigRemoval_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemoval_Item_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigRemoval_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigRemoval_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemoval_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigRemoval_Item_1, + 2, /* Elements count */ + &asn_SPC_E2nodeComponentConfigRemoval_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigRemoval-List.c b/e2ap/lib/E2nodeComponentConfigRemoval-List.c new file mode 100644 index 0000000..caed682 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigRemoval-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigRemoval-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentConfigRemoval_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentConfigRemoval_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemoval_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P9, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigRemoval_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigRemoval_List_specs_1 = { + sizeof(struct E2nodeComponentConfigRemoval_List), + offsetof(struct E2nodeComponentConfigRemoval_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemoval_List = { + "E2nodeComponentConfigRemoval-List", + "E2nodeComponentConfigRemoval-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2nodeComponentConfigRemoval_List_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigRemoval_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemoval_List_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigRemoval_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigRemoval_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemoval_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentConfigRemoval_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentConfigRemoval_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2nodeComponentConfigRemoval_List_1, + 1, /* Single element */ + &asn_SPC_E2nodeComponentConfigRemoval_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigRemovalAck-Item.c b/e2ap/lib/E2nodeComponentConfigRemovalAck-Item.c new file mode 100644 index 0000000..4e6b572 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigRemovalAck-Item.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigRemovalAck-Item.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemovalAck_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemovalAck_Item, e2nodeComponentInterfaceType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceType" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemovalAck_Item, e2nodeComponentID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_E2nodeComponentID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemovalAck_Item, e2nodeComponentConfigurationAck), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentConfigurationAck, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentConfigurationAck" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigRemovalAck_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigRemovalAck_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentInterfaceType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e2nodeComponentID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* e2nodeComponentConfigurationAck */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemovalAck_Item_specs_1 = { + sizeof(struct E2nodeComponentConfigRemovalAck_Item), + offsetof(struct E2nodeComponentConfigRemovalAck_Item, _asn_ctx), + asn_MAP_E2nodeComponentConfigRemovalAck_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_E2nodeComponentConfigRemovalAck_Item = { + "E2nodeComponentConfigRemovalAck-Item", + "E2nodeComponentConfigRemovalAck-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigRemovalAck_Item_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_Item_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigRemovalAck_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigRemovalAck_Item_1, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigRemovalAck_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigRemovalAck-List.c b/e2ap/lib/E2nodeComponentConfigRemovalAck-List.c new file mode 100644 index 0000000..e8da110 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigRemovalAck-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigRemovalAck-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentConfigRemovalAck_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentConfigRemovalAck_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemovalAck_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P13, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigRemovalAck_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigRemovalAck_List_specs_1 = { + sizeof(struct E2nodeComponentConfigRemovalAck_List), + offsetof(struct E2nodeComponentConfigRemovalAck_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemovalAck_List = { + "E2nodeComponentConfigRemovalAck-List", + "E2nodeComponentConfigRemovalAck-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2nodeComponentConfigRemovalAck_List_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_List_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigRemovalAck_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentConfigRemovalAck_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentConfigRemovalAck_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2nodeComponentConfigRemovalAck_List_1, + 1, /* Single element */ + &asn_SPC_E2nodeComponentConfigRemovalAck_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigUpdate-Item.c b/e2ap/lib/E2nodeComponentConfigUpdate-Item.c new file mode 100644 index 0000000..1f9325c --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigUpdate-Item.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigUpdate-Item.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdate_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdate_Item, e2nodeComponentInterfaceType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceType" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdate_Item, e2nodeComponentID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_E2nodeComponentID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdate_Item, e2nodeComponentConfiguration), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentConfiguration, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentConfiguration" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigUpdate_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigUpdate_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentInterfaceType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e2nodeComponentID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* e2nodeComponentConfiguration */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigUpdate_Item_specs_1 = { + sizeof(struct E2nodeComponentConfigUpdate_Item), + offsetof(struct E2nodeComponentConfigUpdate_Item, _asn_ctx), + asn_MAP_E2nodeComponentConfigUpdate_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_E2nodeComponentConfigUpdate_Item = { + "E2nodeComponentConfigUpdate-Item", + "E2nodeComponentConfigUpdate-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigUpdate_Item_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigUpdate_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdate_Item_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigUpdate_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigUpdate_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdate_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigUpdate_Item_1, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigUpdate_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigUpdate-List.c b/e2ap/lib/E2nodeComponentConfigUpdate-List.c new file mode 100644 index 0000000..56ecc09 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigUpdate-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigUpdate-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentConfigUpdate_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentConfigUpdate_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdate_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigUpdate_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigUpdate_List_specs_1 = { + sizeof(struct E2nodeComponentConfigUpdate_List), + offsetof(struct E2nodeComponentConfigUpdate_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdate_List = { + "E2nodeComponentConfigUpdate-List", + "E2nodeComponentConfigUpdate-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2nodeComponentConfigUpdate_List_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigUpdate_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdate_List_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigUpdate_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigUpdate_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdate_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentConfigUpdate_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentConfigUpdate_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2nodeComponentConfigUpdate_List_1, + 1, /* Single element */ + &asn_SPC_E2nodeComponentConfigUpdate_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigUpdateAck-Item.c b/e2ap/lib/E2nodeComponentConfigUpdateAck-Item.c new file mode 100644 index 0000000..a95bbea --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigUpdateAck-Item.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigUpdateAck-Item.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdateAck_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdateAck_Item, e2nodeComponentInterfaceType), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceType" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdateAck_Item, e2nodeComponentID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_E2nodeComponentID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdateAck_Item, e2nodeComponentConfigurationAck), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentConfigurationAck, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentConfigurationAck" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigUpdateAck_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigUpdateAck_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentInterfaceType */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e2nodeComponentID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* e2nodeComponentConfigurationAck */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigUpdateAck_Item_specs_1 = { + sizeof(struct E2nodeComponentConfigUpdateAck_Item), + offsetof(struct E2nodeComponentConfigUpdateAck_Item, _asn_ctx), + asn_MAP_E2nodeComponentConfigUpdateAck_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_E2nodeComponentConfigUpdateAck_Item = { + "E2nodeComponentConfigUpdateAck-Item", + "E2nodeComponentConfigUpdateAck-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigUpdateAck_Item_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_Item_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigUpdateAck_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_Item_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigUpdateAck_Item_1, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigUpdateAck_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigUpdateAck-List.c b/e2ap/lib/E2nodeComponentConfigUpdateAck-List.c new file mode 100644 index 0000000..34b2c26 --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigUpdateAck-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigUpdateAck-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentConfigUpdateAck_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..1024)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentConfigUpdateAck_List_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 10, 10, 1, 1024 } /* (SIZE(1..1024)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdateAck_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P12, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigUpdateAck_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2nodeComponentConfigUpdateAck_List_specs_1 = { + sizeof(struct E2nodeComponentConfigUpdateAck_List), + offsetof(struct E2nodeComponentConfigUpdateAck_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdateAck_List = { + "E2nodeComponentConfigUpdateAck-List", + "E2nodeComponentConfigUpdateAck-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2nodeComponentConfigUpdateAck_List_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_List_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigUpdateAck_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_List_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentConfigUpdateAck_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentConfigUpdateAck_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2nodeComponentConfigUpdateAck_List_1, + 1, /* Single element */ + &asn_SPC_E2nodeComponentConfigUpdateAck_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfiguration.c b/e2ap/lib/E2nodeComponentConfiguration.c new file mode 100644 index 0000000..9f0608c --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfiguration.c @@ -0,0 +1,84 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfiguration.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfiguration_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfiguration, e2nodeComponentRequestPart), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentRequestPart" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfiguration, e2nodeComponentResponsePart), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentResponsePart" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfiguration_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfiguration_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentRequestPart */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* e2nodeComponentResponsePart */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfiguration_specs_1 = { + sizeof(struct E2nodeComponentConfiguration), + offsetof(struct E2nodeComponentConfiguration, _asn_ctx), + asn_MAP_E2nodeComponentConfiguration_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_E2nodeComponentConfiguration = { + "E2nodeComponentConfiguration", + "E2nodeComponentConfiguration", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfiguration_tags_1, + sizeof(asn_DEF_E2nodeComponentConfiguration_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfiguration_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfiguration_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfiguration_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfiguration_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfiguration_1, + 2, /* Elements count */ + &asn_SPC_E2nodeComponentConfiguration_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentConfigurationAck.c b/e2ap/lib/E2nodeComponentConfigurationAck.c new file mode 100644 index 0000000..9dc259a --- /dev/null +++ b/e2ap/lib/E2nodeComponentConfigurationAck.c @@ -0,0 +1,150 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentConfigurationAck.h" + +#include "Cause.h" +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_updateOutcome_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_updateOutcome_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_updateOutcome_value2enum_2[] = { + { 0, 7, "success" }, + { 1, 7, "failure" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_updateOutcome_enum2value_2[] = { + 1, /* failure(1) */ + 0 /* success(0) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_updateOutcome_specs_2 = { + asn_MAP_updateOutcome_value2enum_2, /* "tag" => N; sorted by tag */ + asn_MAP_updateOutcome_enum2value_2, /* 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_updateOutcome_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_updateOutcome_2 = { + "updateOutcome", + "updateOutcome", + &asn_OP_NativeEnumerated, + asn_DEF_updateOutcome_tags_2, + sizeof(asn_DEF_updateOutcome_tags_2) + /sizeof(asn_DEF_updateOutcome_tags_2[0]) - 1, /* 1 */ + asn_DEF_updateOutcome_tags_2, /* Same as above */ + sizeof(asn_DEF_updateOutcome_tags_2) + /sizeof(asn_DEF_updateOutcome_tags_2[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_updateOutcome_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_updateOutcome_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_updateOutcome_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigurationAck_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigurationAck, updateOutcome), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_updateOutcome_2, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "updateOutcome" + }, + { ATF_POINTER, 1, offsetof(struct E2nodeComponentConfigurationAck, failureCause), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Cause, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "failureCause" + }, +}; +static const int asn_MAP_E2nodeComponentConfigurationAck_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigurationAck_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigurationAck_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* updateOutcome */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* failureCause */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigurationAck_specs_1 = { + sizeof(struct E2nodeComponentConfigurationAck), + offsetof(struct E2nodeComponentConfigurationAck, _asn_ctx), + asn_MAP_E2nodeComponentConfigurationAck_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2nodeComponentConfigurationAck_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigurationAck = { + "E2nodeComponentConfigurationAck", + "E2nodeComponentConfigurationAck", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigurationAck_tags_1, + sizeof(asn_DEF_E2nodeComponentConfigurationAck_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigurationAck_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigurationAck_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigurationAck_tags_1) + /sizeof(asn_DEF_E2nodeComponentConfigurationAck_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigurationAck_1, + 2, /* Elements count */ + &asn_SPC_E2nodeComponentConfigurationAck_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentID.c b/e2ap/lib/E2nodeComponentID.c new file mode 100644 index 0000000..0917899 --- /dev/null +++ b/e2ap/lib/E2nodeComponentID.c @@ -0,0 +1,190 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentID.h" + +#include "E2nodeComponentInterfaceNG.h" +#include "E2nodeComponentInterfaceXn.h" +#include "E2nodeComponentInterfaceE1.h" +#include "E2nodeComponentInterfaceF1.h" +#include "E2nodeComponentInterfaceW1.h" +#include "E2nodeComponentInterfaceS1.h" +#include "E2nodeComponentInterfaceX2.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentID_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeComponentID_1[] = { + { ATF_POINTER, 0, offsetof(struct E2nodeComponentID, choice.e2nodeComponentInterfaceTypeNG), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceNG, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceTypeNG" + }, + { ATF_POINTER, 0, offsetof(struct E2nodeComponentID, choice.e2nodeComponentInterfaceTypeXn), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceXn, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceTypeXn" + }, + { ATF_POINTER, 0, offsetof(struct E2nodeComponentID, choice.e2nodeComponentInterfaceTypeE1), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceE1, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceTypeE1" + }, + { ATF_POINTER, 0, offsetof(struct E2nodeComponentID, choice.e2nodeComponentInterfaceTypeF1), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceF1, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceTypeF1" + }, + { ATF_POINTER, 0, offsetof(struct E2nodeComponentID, choice.e2nodeComponentInterfaceTypeW1), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceW1, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceTypeW1" + }, + { ATF_POINTER, 0, offsetof(struct E2nodeComponentID, choice.e2nodeComponentInterfaceTypeS1), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceS1, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceTypeS1" + }, + { ATF_POINTER, 0, offsetof(struct E2nodeComponentID, choice.e2nodeComponentInterfaceTypeX2), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_E2nodeComponentInterfaceX2, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "e2nodeComponentInterfaceTypeX2" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e2nodeComponentInterfaceTypeNG */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e2nodeComponentInterfaceTypeXn */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* e2nodeComponentInterfaceTypeE1 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* e2nodeComponentInterfaceTypeF1 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* e2nodeComponentInterfaceTypeW1 */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* e2nodeComponentInterfaceTypeS1 */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* e2nodeComponentInterfaceTypeX2 */ +}; +asn_CHOICE_specifics_t asn_SPC_E2nodeComponentID_specs_1 = { + sizeof(struct E2nodeComponentID), + offsetof(struct E2nodeComponentID, _asn_ctx), + offsetof(struct E2nodeComponentID, present), + sizeof(((struct E2nodeComponentID *)0)->present), + asn_MAP_E2nodeComponentID_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, + 7 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentID = { + "E2nodeComponentID", + "E2nodeComponentID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_E2nodeComponentID_1, + 7, /* Elements count */ + &asn_SPC_E2nodeComponentID_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceE1.c b/e2ap/lib/E2nodeComponentInterfaceE1.c new file mode 100644 index 0000000..cbccaf2 --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceE1.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceE1.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceE1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentInterfaceE1, gNB_CU_CP_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "gNB-CU-CP-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentInterfaceE1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentInterfaceE1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-CU-CP-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceE1_specs_1 = { + sizeof(struct E2nodeComponentInterfaceE1), + offsetof(struct E2nodeComponentInterfaceE1, _asn_ctx), + asn_MAP_E2nodeComponentInterfaceE1_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_E2nodeComponentInterfaceE1 = { + "E2nodeComponentInterfaceE1", + "E2nodeComponentInterfaceE1", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentInterfaceE1_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceE1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceE1_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceE1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceE1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceE1_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentInterfaceE1_1, + 1, /* Elements count */ + &asn_SPC_E2nodeComponentInterfaceE1_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceF1.c b/e2ap/lib/E2nodeComponentInterfaceF1.c new file mode 100644 index 0000000..5246601 --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceF1.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceF1.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceF1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentInterfaceF1, gNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "gNB-DU-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentInterfaceF1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentInterfaceF1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceF1_specs_1 = { + sizeof(struct E2nodeComponentInterfaceF1), + offsetof(struct E2nodeComponentInterfaceF1, _asn_ctx), + asn_MAP_E2nodeComponentInterfaceF1_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_E2nodeComponentInterfaceF1 = { + "E2nodeComponentInterfaceF1", + "E2nodeComponentInterfaceF1", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentInterfaceF1_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceF1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceF1_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceF1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceF1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceF1_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentInterfaceF1_1, + 1, /* Elements count */ + &asn_SPC_E2nodeComponentInterfaceF1_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceNG.c b/e2ap/lib/E2nodeComponentInterfaceNG.c new file mode 100644 index 0000000..0c32b1e --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceNG.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceNG.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceNG_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentInterfaceNG, amf_name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AMFName, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "amf-name" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentInterfaceNG_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentInterfaceNG_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* amf-name */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceNG_specs_1 = { + sizeof(struct E2nodeComponentInterfaceNG), + offsetof(struct E2nodeComponentInterfaceNG, _asn_ctx), + asn_MAP_E2nodeComponentInterfaceNG_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_E2nodeComponentInterfaceNG = { + "E2nodeComponentInterfaceNG", + "E2nodeComponentInterfaceNG", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentInterfaceNG_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceNG_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceNG_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceNG_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceNG_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceNG_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentInterfaceNG_1, + 1, /* Elements count */ + &asn_SPC_E2nodeComponentInterfaceNG_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceS1.c b/e2ap/lib/E2nodeComponentInterfaceS1.c new file mode 100644 index 0000000..accaa9b --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceS1.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceS1.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceS1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentInterfaceS1, mme_name), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_MMEname, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "mme-name" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentInterfaceS1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentInterfaceS1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* mme-name */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceS1_specs_1 = { + sizeof(struct E2nodeComponentInterfaceS1), + offsetof(struct E2nodeComponentInterfaceS1, _asn_ctx), + asn_MAP_E2nodeComponentInterfaceS1_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_E2nodeComponentInterfaceS1 = { + "E2nodeComponentInterfaceS1", + "E2nodeComponentInterfaceS1", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentInterfaceS1_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceS1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceS1_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceS1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceS1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceS1_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentInterfaceS1_1, + 1, /* Elements count */ + &asn_SPC_E2nodeComponentInterfaceS1_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceType.c b/e2ap/lib/E2nodeComponentInterfaceType.c new file mode 100644 index 0000000..644a31f --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceType.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceType.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeComponentInterfaceType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeComponentInterfaceType_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_E2nodeComponentInterfaceType_value2enum_1[] = { + { 0, 2, "ng" }, + { 1, 2, "xn" }, + { 2, 2, "e1" }, + { 3, 2, "f1" }, + { 4, 2, "w1" }, + { 5, 2, "s1" }, + { 6, 2, "x2" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_E2nodeComponentInterfaceType_enum2value_1[] = { + 2, /* e1(2) */ + 3, /* f1(3) */ + 0, /* ng(0) */ + 5, /* s1(5) */ + 4, /* w1(4) */ + 6, /* x2(6) */ + 1 /* xn(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_E2nodeComponentInterfaceType_specs_1 = { + asn_MAP_E2nodeComponentInterfaceType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_E2nodeComponentInterfaceType_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_E2nodeComponentInterfaceType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceType = { + "E2nodeComponentInterfaceType", + "E2nodeComponentInterfaceType", + &asn_OP_NativeEnumerated, + asn_DEF_E2nodeComponentInterfaceType_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceType_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceType_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceType_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceType_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceType_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeComponentInterfaceType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeComponentInterfaceType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_E2nodeComponentInterfaceType_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceW1.c b/e2ap/lib/E2nodeComponentInterfaceW1.c new file mode 100644 index 0000000..252f9c2 --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceW1.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceW1.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceW1_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentInterfaceW1, ng_eNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_DU_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ng-eNB-DU-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentInterfaceW1_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentInterfaceW1_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ng-eNB-DU-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceW1_specs_1 = { + sizeof(struct E2nodeComponentInterfaceW1), + offsetof(struct E2nodeComponentInterfaceW1, _asn_ctx), + asn_MAP_E2nodeComponentInterfaceW1_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_E2nodeComponentInterfaceW1 = { + "E2nodeComponentInterfaceW1", + "E2nodeComponentInterfaceW1", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentInterfaceW1_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceW1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceW1_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceW1_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceW1_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceW1_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentInterfaceW1_1, + 1, /* Elements count */ + &asn_SPC_E2nodeComponentInterfaceW1_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceX2.c b/e2ap/lib/E2nodeComponentInterfaceX2.c new file mode 100644 index 0000000..2241f43 --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceX2.c @@ -0,0 +1,88 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceX2.h" + +#include "GlobalENB-ID.h" +#include "GlobalenGNB-ID.h" +asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceX2_1[] = { + { ATF_POINTER, 2, offsetof(struct E2nodeComponentInterfaceX2, global_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "global-eNB-ID" + }, + { ATF_POINTER, 1, offsetof(struct E2nodeComponentInterfaceX2, global_en_gNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalenGNB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "global-en-gNB-ID" + }, +}; +static const int asn_MAP_E2nodeComponentInterfaceX2_oms_1[] = { 0, 1 }; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentInterfaceX2_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentInterfaceX2_tag2el_1[] = { + { (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 */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceX2_specs_1 = { + sizeof(struct E2nodeComponentInterfaceX2), + offsetof(struct E2nodeComponentInterfaceX2, _asn_ctx), + asn_MAP_E2nodeComponentInterfaceX2_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_E2nodeComponentInterfaceX2_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentInterfaceX2 = { + "E2nodeComponentInterfaceX2", + "E2nodeComponentInterfaceX2", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentInterfaceX2_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceX2_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceX2_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceX2_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceX2_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceX2_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentInterfaceX2_1, + 2, /* Elements count */ + &asn_SPC_E2nodeComponentInterfaceX2_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeComponentInterfaceXn.c b/e2ap/lib/E2nodeComponentInterfaceXn.c new file mode 100644 index 0000000..9fbf467 --- /dev/null +++ b/e2ap/lib/E2nodeComponentInterfaceXn.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeComponentInterfaceXn.h" + +asn_TYPE_member_t asn_MBR_E2nodeComponentInterfaceXn_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentInterfaceXn, global_NG_RAN_Node_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalNG_RANNode_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "global-NG-RAN-Node-ID" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentInterfaceXn_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentInterfaceXn_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-NG-RAN-Node-ID */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentInterfaceXn_specs_1 = { + sizeof(struct E2nodeComponentInterfaceXn), + offsetof(struct E2nodeComponentInterfaceXn, _asn_ctx), + asn_MAP_E2nodeComponentInterfaceXn_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_E2nodeComponentInterfaceXn = { + "E2nodeComponentInterfaceXn", + "E2nodeComponentInterfaceXn", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentInterfaceXn_tags_1, + sizeof(asn_DEF_E2nodeComponentInterfaceXn_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceXn_tags_1[0]), /* 1 */ + asn_DEF_E2nodeComponentInterfaceXn_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentInterfaceXn_tags_1) + /sizeof(asn_DEF_E2nodeComponentInterfaceXn_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentInterfaceXn_1, + 1, /* Elements count */ + &asn_SPC_E2nodeComponentInterfaceXn_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeConfigurationUpdate.c b/e2ap/lib/E2nodeConfigurationUpdate.c new file mode 100644 index 0000000..908cd52 --- /dev/null +++ b/e2ap/lib/E2nodeConfigurationUpdate.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeConfigurationUpdate.h" + +asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdate_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_85P18, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeConfigurationUpdate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeConfigurationUpdate_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdate_specs_1 = { + sizeof(struct E2nodeConfigurationUpdate), + offsetof(struct E2nodeConfigurationUpdate, _asn_ctx), + asn_MAP_E2nodeConfigurationUpdate_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_E2nodeConfigurationUpdate = { + "E2nodeConfigurationUpdate", + "E2nodeConfigurationUpdate", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeConfigurationUpdate_tags_1, + sizeof(asn_DEF_E2nodeConfigurationUpdate_tags_1) + /sizeof(asn_DEF_E2nodeConfigurationUpdate_tags_1[0]), /* 1 */ + asn_DEF_E2nodeConfigurationUpdate_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeConfigurationUpdate_tags_1) + /sizeof(asn_DEF_E2nodeConfigurationUpdate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeConfigurationUpdate_1, + 1, /* Elements count */ + &asn_SPC_E2nodeConfigurationUpdate_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeConfigurationUpdateAcknowledge.c b/e2ap/lib/E2nodeConfigurationUpdateAcknowledge.c new file mode 100644 index 0000000..5a1b763 --- /dev/null +++ b/e2ap/lib/E2nodeConfigurationUpdateAcknowledge.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeConfigurationUpdateAcknowledge.h" + +asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateAcknowledge_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_85P19, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeConfigurationUpdateAcknowledge_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeConfigurationUpdateAcknowledge_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateAcknowledge_specs_1 = { + sizeof(struct E2nodeConfigurationUpdateAcknowledge), + offsetof(struct E2nodeConfigurationUpdateAcknowledge, _asn_ctx), + asn_MAP_E2nodeConfigurationUpdateAcknowledge_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_E2nodeConfigurationUpdateAcknowledge = { + "E2nodeConfigurationUpdateAcknowledge", + "E2nodeConfigurationUpdateAcknowledge", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeConfigurationUpdateAcknowledge_tags_1, + sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_tags_1) + /sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_tags_1[0]), /* 1 */ + asn_DEF_E2nodeConfigurationUpdateAcknowledge_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_tags_1) + /sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeConfigurationUpdateAcknowledge_1, + 1, /* Elements count */ + &asn_SPC_E2nodeConfigurationUpdateAcknowledge_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeConfigurationUpdateFailure.c b/e2ap/lib/E2nodeConfigurationUpdateFailure.c new file mode 100644 index 0000000..3ee1919 --- /dev/null +++ b/e2ap/lib/E2nodeConfigurationUpdateFailure.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeConfigurationUpdateFailure.h" + +asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateFailure_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_85P20, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeConfigurationUpdateFailure_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeConfigurationUpdateFailure_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateFailure_specs_1 = { + sizeof(struct E2nodeConfigurationUpdateFailure), + offsetof(struct E2nodeConfigurationUpdateFailure, _asn_ctx), + asn_MAP_E2nodeConfigurationUpdateFailure_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_E2nodeConfigurationUpdateFailure = { + "E2nodeConfigurationUpdateFailure", + "E2nodeConfigurationUpdateFailure", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeConfigurationUpdateFailure_tags_1, + sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_tags_1) + /sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_tags_1[0]), /* 1 */ + asn_DEF_E2nodeConfigurationUpdateFailure_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_tags_1) + /sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeConfigurationUpdateFailure_1, + 1, /* Elements count */ + &asn_SPC_E2nodeConfigurationUpdateFailure_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeTNLassociationRemoval-Item.c b/e2ap/lib/E2nodeTNLassociationRemoval-Item.c new file mode 100644 index 0000000..f050144 --- /dev/null +++ b/e2ap/lib/E2nodeTNLassociationRemoval-Item.c @@ -0,0 +1,84 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeTNLassociationRemoval-Item.h" + +asn_TYPE_member_t asn_MBR_E2nodeTNLassociationRemoval_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeTNLassociationRemoval_Item, tnlInformation), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TNLinformation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tnlInformation" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeTNLassociationRemoval_Item, tnlInformationRIC), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TNLinformation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tnlInformationRIC" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeTNLassociationRemoval_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeTNLassociationRemoval_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tnlInformation */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* tnlInformationRIC */ +}; +asn_SEQUENCE_specifics_t asn_SPC_E2nodeTNLassociationRemoval_Item_specs_1 = { + sizeof(struct E2nodeTNLassociationRemoval_Item), + offsetof(struct E2nodeTNLassociationRemoval_Item, _asn_ctx), + asn_MAP_E2nodeTNLassociationRemoval_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_E2nodeTNLassociationRemoval_Item = { + "E2nodeTNLassociationRemoval-Item", + "E2nodeTNLassociationRemoval-Item", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeTNLassociationRemoval_Item_tags_1, + sizeof(asn_DEF_E2nodeTNLassociationRemoval_Item_tags_1) + /sizeof(asn_DEF_E2nodeTNLassociationRemoval_Item_tags_1[0]), /* 1 */ + asn_DEF_E2nodeTNLassociationRemoval_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeTNLassociationRemoval_Item_tags_1) + /sizeof(asn_DEF_E2nodeTNLassociationRemoval_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeTNLassociationRemoval_Item_1, + 2, /* Elements count */ + &asn_SPC_E2nodeTNLassociationRemoval_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2nodeTNLassociationRemoval-List.c b/e2ap/lib/E2nodeTNLassociationRemoval-List.c new file mode 100644 index 0000000..f60b0a3 --- /dev/null +++ b/e2ap/lib/E2nodeTNLassociationRemoval-List.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "E2nodeTNLassociationRemoval-List.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E2nodeTNLassociationRemoval_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_E2nodeTNLassociationRemoval_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_E2nodeTNLassociationRemoval_List_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P10, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeTNLassociationRemoval_List_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_E2nodeTNLassociationRemoval_List_specs_1 = { + sizeof(struct E2nodeTNLassociationRemoval_List), + offsetof(struct E2nodeTNLassociationRemoval_List, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_E2nodeTNLassociationRemoval_List = { + "E2nodeTNLassociationRemoval-List", + "E2nodeTNLassociationRemoval-List", + &asn_OP_SEQUENCE_OF, + asn_DEF_E2nodeTNLassociationRemoval_List_tags_1, + sizeof(asn_DEF_E2nodeTNLassociationRemoval_List_tags_1) + /sizeof(asn_DEF_E2nodeTNLassociationRemoval_List_tags_1[0]), /* 1 */ + asn_DEF_E2nodeTNLassociationRemoval_List_tags_1, /* Same as above */ + sizeof(asn_DEF_E2nodeTNLassociationRemoval_List_tags_1) + /sizeof(asn_DEF_E2nodeTNLassociationRemoval_List_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E2nodeTNLassociationRemoval_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E2nodeTNLassociationRemoval_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_E2nodeTNLassociationRemoval_List_1, + 1, /* Single element */ + &asn_SPC_E2nodeTNLassociationRemoval_List_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/E2setupFailure.c b/e2ap/lib/E2setupFailure.c index 1b0bd35..b15426f 100644 --- a/e2ap/lib/E2setupFailure.c +++ b/e2ap/lib/E2setupFailure.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2setupFailure.h" -static asn_TYPE_member_t asn_MBR_E2setupFailure_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P14, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_E2setupFailure_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_E2setupFailure_specs_1 = { sizeof(struct E2setupFailure), offsetof(struct E2setupFailure, _asn_ctx), asn_MAP_E2setupFailure_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_E2setupFailure = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_E2setupFailure_1, 1, /* Elements count */ &asn_SPC_E2setupFailure_specs_1 /* Additional specs */ diff --git a/e2ap/lib/E2setupRequest.c b/e2ap/lib/E2setupRequest.c index 92fd09b..b0e14b3 100644 --- a/e2ap/lib/E2setupRequest.c +++ b/e2ap/lib/E2setupRequest.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2setupRequest.h" -static asn_TYPE_member_t asn_MBR_E2setupRequest_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P12, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_E2setupRequest_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_E2setupRequest_specs_1 = { sizeof(struct E2setupRequest), offsetof(struct E2setupRequest, _asn_ctx), asn_MAP_E2setupRequest_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_E2setupRequest = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_E2setupRequest_1, 1, /* Elements count */ &asn_SPC_E2setupRequest_specs_1 /* Additional specs */ diff --git a/e2ap/lib/E2setupResponse.c b/e2ap/lib/E2setupResponse.c index b08bc06..13e965d 100644 --- a/e2ap/lib/E2setupResponse.c +++ b/e2ap/lib/E2setupResponse.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2setupResponse.h" -static asn_TYPE_member_t asn_MBR_E2setupResponse_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P13, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_E2setupResponse_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_E2setupResponse_specs_1 = { sizeof(struct E2setupResponse), offsetof(struct E2setupResponse, _asn_ctx), asn_MAP_E2setupResponse_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_E2setupResponse = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_E2setupResponse_1, 1, /* Elements count */ &asn_SPC_E2setupResponse_specs_1 /* Additional specs */ diff --git a/e2ap/lib/ENB-ID-Choice.c b/e2ap/lib/ENB-ID-Choice.c index b95e5eb..ae0e8b9 100644 --- a/e2ap/lib/ENB-ID-Choice.c +++ b/e2ap/lib/ENB-ID-Choice.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ENB-ID-Choice.h" @@ -27,7 +27,7 @@ memb_enb_ID_macro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr size = 0; } - if((size == 20)) { + if((size == 20UL)) { /* Constraint check succeeded */ return 0; } else { @@ -58,7 +58,7 @@ memb_enb_ID_shortmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void size = 0; } - if((size == 18)) { + if((size == 18UL)) { /* Constraint check succeeded */ return 0; } else { @@ -89,7 +89,7 @@ memb_enb_ID_longmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void * size = 0; } - if((size == 21)) { + if((size == 21UL)) { /* Constraint check succeeded */ return 0; } else { @@ -100,45 +100,69 @@ memb_enb_ID_longmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void * } } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_enb_ID_macro_constr_2 CC_NOTUSED = { { 0, 0 }, 20 /* (SIZE(20..20)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = { { 0, 0 }, 18 /* (SIZE(18..18)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = { { 0, 0 }, 21 /* (SIZE(21..21)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_enb_ID_macro_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_enb_ID_macro_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_enb_ID_macro_constraint_1 + }, 0, 0, /* No default value */ "enb-ID-macro" }, @@ -147,7 +171,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_enb_ID_shortmacro_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_enb_ID_shortmacro_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_enb_ID_shortmacro_constraint_1 + }, 0, 0, /* No default value */ "enb-ID-shortmacro" }, @@ -156,7 +188,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_enb_ID_longmacro_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_enb_ID_longmacro_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_enb_ID_longmacro_constraint_1 + }, 0, 0, /* No default value */ "enb-ID-longmacro" }, @@ -184,7 +224,15 @@ asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ENB_ID_Choice_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ENB_ID_Choice_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_ENB_ID_Choice_1, 3, /* Elements count */ &asn_SPC_ENB_ID_Choice_specs_1 /* Additional specs */ diff --git a/e2ap/lib/ENB-ID.c b/e2ap/lib/ENB-ID.c index 96b8cb5..111836d 100644 --- a/e2ap/lib/ENB-ID.c +++ b/e2ap/lib/ENB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ENB-ID.h" @@ -27,7 +27,7 @@ memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr size = 0; } - if((size == 20)) { + if((size == 20UL)) { /* Constraint check succeeded */ return 0; } else { @@ -58,7 +58,7 @@ memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 28)) { + if((size == 28UL)) { /* Constraint check succeeded */ return 0; } else { @@ -89,7 +89,7 @@ memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void size = 0; } - if((size == 18)) { + if((size == 18UL)) { /* Constraint check succeeded */ return 0; } else { @@ -120,7 +120,7 @@ memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void size = 0; } - if((size == 21)) { + if((size == 21UL)) { /* Constraint check succeeded */ return 0; } else { @@ -131,53 +131,81 @@ memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void } } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { { 0, 0 }, 20 /* (SIZE(20..20)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { { 0, 0 }, 28 /* (SIZE(28..28)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { { 0, 0 }, 18 /* (SIZE(18..18)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { { 0, 0 }, 21 /* (SIZE(21..21)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_ENB_ID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_macro_eNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_macro_eNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_macro_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "macro-eNB-ID" }, @@ -186,7 +214,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_home_eNB_ID_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_home_eNB_ID_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_home_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "home-eNB-ID" }, @@ -195,7 +231,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_short_Macro_eNB_ID_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_short_Macro_eNB_ID_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_short_Macro_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "short-Macro-eNB-ID" }, @@ -204,7 +248,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_long_Macro_eNB_ID_constr_6, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_long_Macro_eNB_ID_constr_6, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_long_Macro_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "long-Macro-eNB-ID" }, @@ -233,7 +285,15 @@ asn_TYPE_descriptor_t asn_DEF_ENB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ENB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ENB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_ENB_ID_1, 4, /* Elements count */ &asn_SPC_ENB_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/ENGNB-ID.c b/e2ap/lib/ENGNB-ID.c index 4bfdbd8..be47ea2 100644 --- a/e2ap/lib/ENGNB-ID.c +++ b/e2ap/lib/ENGNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ENGNB-ID.h" @@ -27,7 +27,7 @@ memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size >= 22 && size <= 32)) { + if((size >= 22UL && size <= 32UL)) { /* Constraint check succeeded */ return 0; } else { @@ -38,29 +38,45 @@ memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, } } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_gNB_ID_constr_2 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(22..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_ENGNB_ID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_gNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_gNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_gNB_ID_constraint_1 + }, 0, 0, /* No default value */ "gNB-ID" }, @@ -86,7 +102,15 @@ asn_TYPE_descriptor_t asn_DEF_ENGNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ENGNB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ENGNB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_ENGNB_ID_1, 1, /* Elements count */ &asn_SPC_ENGNB_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/EXTERNAL.c b/e2ap/lib/EXTERNAL.c new file mode 100644 index 0000000..10fcf63 --- /dev/null +++ b/e2ap/lib/EXTERNAL.c @@ -0,0 +1,228 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "ASN1C-UsefulInformationObjectClasses" + * found in "/usr/local/share/asn1c/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "EXTERNAL.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_encoding_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_encoding_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_encoding_5[] = { + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL__encoding, choice.single_ASN1_type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ANY, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "single-ASN1-type" + }, + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL__encoding, choice.octet_aligned), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "octet-aligned" + }, + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL__encoding, choice.arbitrary), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "arbitrary" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_encoding_tag2el_5[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* single-ASN1-type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* octet-aligned */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* arbitrary */ +}; +static asn_CHOICE_specifics_t asn_SPC_encoding_specs_5 = { + sizeof(struct EXTERNAL__encoding), + offsetof(struct EXTERNAL__encoding, _asn_ctx), + offsetof(struct EXTERNAL__encoding, present), + sizeof(((struct EXTERNAL__encoding *)0)->present), + asn_MAP_encoding_tag2el_5, + 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_encoding_5 = { + "encoding", + "encoding", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_encoding_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_encoding_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_encoding_5, + 3, /* Elements count */ + &asn_SPC_encoding_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_EXTERNAL_1[] = { + { ATF_POINTER, 3, offsetof(struct EXTERNAL, direct_reference), + (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), + 0, + &asn_DEF_OBJECT_IDENTIFIER, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "direct-reference" + }, + { ATF_POINTER, 2, offsetof(struct EXTERNAL, indirect_reference), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "indirect-reference" + }, + { ATF_POINTER, 1, offsetof(struct EXTERNAL, data_value_descriptor), + (ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), + 0, + &asn_DEF_ObjectDescriptor, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "data-value-descriptor" + }, + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL, encoding), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_encoding_5, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encoding" + }, +}; +static const int asn_MAP_EXTERNAL_oms_1[] = { 0, 1, 2 }; +static const ber_tlv_tag_t asn_DEF_EXTERNAL_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EXTERNAL_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* indirect-reference */ + { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, 0, 0 }, /* direct-reference */ + { (ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), 2, 0, 0 }, /* data-value-descriptor */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* single-ASN1-type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* octet-aligned */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 } /* arbitrary */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EXTERNAL_specs_1 = { + sizeof(struct EXTERNAL), + offsetof(struct EXTERNAL, _asn_ctx), + asn_MAP_EXTERNAL_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_EXTERNAL_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EXTERNAL = { + "EXTERNAL", + "EXTERNAL", + &asn_OP_SEQUENCE, + asn_DEF_EXTERNAL_tags_1, + sizeof(asn_DEF_EXTERNAL_tags_1) + /sizeof(asn_DEF_EXTERNAL_tags_1[0]) - 1, /* 1 */ + asn_DEF_EXTERNAL_tags_1, /* Same as above */ + sizeof(asn_DEF_EXTERNAL_tags_1) + /sizeof(asn_DEF_EXTERNAL_tags_1[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_EXTERNAL_1, + 4, /* Elements count */ + &asn_SPC_EXTERNAL_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/ErrorIndication.c b/e2ap/lib/ErrorIndication.c index a47c6e0..492d55f 100644 --- a/e2ap/lib/ErrorIndication.c +++ b/e2ap/lib/ErrorIndication.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ErrorIndication.h" -static asn_TYPE_member_t asn_MBR_ErrorIndication_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P11, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_ErrorIndication_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_specs_1 = { sizeof(struct ErrorIndication), offsetof(struct ErrorIndication, _asn_ctx), asn_MAP_ErrorIndication_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_ErrorIndication = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_ErrorIndication_1, 1, /* Elements count */ &asn_SPC_ErrorIndication_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GNB-CU-UP-ID.c b/e2ap/lib/GNB-CU-UP-ID.c index 8f960e2..e957f8d 100644 --- a/e2ap/lib/GNB-CU-UP-ID.c +++ b/e2ap/lib/GNB-CU-UP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-CU-UP-ID.h" @@ -27,7 +27,7 @@ GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - if((value >= 0 && value <= 68719476735)) { + if((value >= 0L && value <= 68719476735L)) { /* Constraint check succeeded */ return 0; } else { @@ -42,14 +42,18 @@ GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using INTEGER, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { { 8, 1 } /* (0..68719476735) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -63,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_CU_UP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_CU_UP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + GNB_CU_UP_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/GNB-DU-ID.c b/e2ap/lib/GNB-DU-ID.c index 6c0940d..b85d2e0 100644 --- a/e2ap/lib/GNB-DU-ID.c +++ b/e2ap/lib/GNB-DU-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-DU-ID.h" @@ -27,7 +27,7 @@ GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - if((value >= 0 && value <= 68719476735)) { + if((value >= 0L && value <= 68719476735L)) { /* Constraint check succeeded */ return 0; } else { @@ -42,14 +42,18 @@ GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using INTEGER, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { { 8, 1 } /* (0..68719476735) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_GNB_DU_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -63,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + GNB_DU_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/GNB-ID-Choice.c b/e2ap/lib/GNB-ID-Choice.c index 085a942..13801db 100644 --- a/e2ap/lib/GNB-ID-Choice.c +++ b/e2ap/lib/GNB-ID-Choice.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-ID-Choice.h" @@ -27,7 +27,7 @@ memb_gnb_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size >= 22 && size <= 32)) { + if((size >= 22UL && size <= 32UL)) { /* Constraint check succeeded */ return 0; } else { @@ -38,29 +38,45 @@ memb_gnb_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, } } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_gnb_ID_constr_2 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(22..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_GNB_ID_Choice_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_gnb_ID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_gnb_ID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_gnb_ID_constraint_1 + }, 0, 0, /* No default value */ "gnb-ID" }, @@ -86,7 +102,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_ID_Choice_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_ID_Choice_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_GNB_ID_Choice_1, 1, /* Elements count */ &asn_SPC_GNB_ID_Choice_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GlobalE2node-ID.c b/e2ap/lib/GlobalE2node-ID.c index 13a8295..684ab53 100644 --- a/e2ap/lib/GlobalE2node-ID.c +++ b/e2ap/lib/GlobalE2node-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalE2node-ID.h" @@ -11,21 +11,33 @@ #include "GlobalE2node-en-gNB-ID.h" #include "GlobalE2node-ng-eNB-ID.h" #include "GlobalE2node-eNB-ID.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_GlobalE2node_ID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB" }, @@ -34,7 +46,15 @@ asn_TYPE_member_t asn_MBR_GlobalE2node_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalE2node_en_gNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "en-gNB" }, @@ -43,7 +63,15 @@ asn_TYPE_member_t asn_MBR_GlobalE2node_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalE2node_ng_eNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ng-eNB" }, @@ -52,7 +80,15 @@ asn_TYPE_member_t asn_MBR_GlobalE2node_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalE2node_eNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eNB" }, @@ -81,7 +117,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GlobalE2node_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GlobalE2node_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_GlobalE2node_ID_1, 4, /* Elements count */ &asn_SPC_GlobalE2node_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GlobalE2node-eNB-ID.c b/e2ap/lib/GlobalE2node-eNB-ID.c index 7cb93f1..6a9ae6b 100644 --- a/e2ap/lib/GlobalE2node-eNB-ID.c +++ b/e2ap/lib/GlobalE2node-eNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalE2node-eNB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalENB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "global-eNB-ID" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalE2node_eNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalE2node_eNB_ID_1, 1, /* Elements count */ &asn_SPC_GlobalE2node_eNB_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GlobalE2node-en-gNB-ID.c b/e2ap/lib/GlobalE2node-en-gNB-ID.c index 6444325..f86076d 100644 --- a/e2ap/lib/GlobalE2node-en-gNB-ID.c +++ b/e2ap/lib/GlobalE2node-en-gNB-ID.c @@ -1,36 +1,82 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #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), + { ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_en_gNB_ID, global_en_gNB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalenGNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "global-gNB-ID" + "global-en-gNB-ID" + }, + { ATF_POINTER, 2, offsetof(struct GlobalE2node_en_gNB_ID, en_gNB_CU_UP_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_CU_UP_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "en-gNB-CU-UP-ID" + }, + { ATF_POINTER, 1, offsetof(struct GlobalE2node_en_gNB_ID, en_gNB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GNB_DU_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "en-gNB-DU-ID" }, }; +static const int asn_MAP_GlobalE2node_en_gNB_ID_oms_1[] = { 1, 2 }; 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_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-en-gNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* en-gNB-CU-UP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* en-gNB-DU-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 */ + 3, /* Count of tags in the map */ + asn_MAP_GlobalE2node_en_gNB_ID_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID = { "GlobalE2node-en-gNB-ID", @@ -42,9 +88,17 @@ asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalE2node_en_gNB_ID_1, - 1, /* Elements count */ + 3, /* Elements count */ &asn_SPC_GlobalE2node_en_gNB_ID_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/GlobalE2node-gNB-ID.c b/e2ap/lib/GlobalE2node-gNB-ID.c index 31bf024..6254e26 100644 --- a/e2ap/lib/GlobalE2node-gNB-ID.c +++ b/e2ap/lib/GlobalE2node-gNB-ID.c @@ -1,58 +1,101 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalE2node-gNB-ID.h" +#include "GlobalenGNB-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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "global-gNB-ID" }, - { ATF_POINTER, 2, offsetof(struct GlobalE2node_gNB_ID, gNB_CU_UP_ID), + { ATF_POINTER, 3, offsetof(struct GlobalE2node_gNB_ID, global_en_gNB_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalenGNB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "global-en-gNB-ID" + }, + { ATF_POINTER, 2, offsetof(struct GlobalE2node_gNB_ID, gNB_CU_UP_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ &asn_DEF_GNB_CU_UP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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)), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_GNB_DU_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-DU-ID" }, }; -static const int asn_MAP_GlobalE2node_gNB_ID_oms_1[] = { 1, 2 }; +static const int asn_MAP_GlobalE2node_gNB_ID_oms_1[] = { 1, 2, 3 }; 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_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* global-en-gNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gNB-CU-UP-ID */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 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 */ + 4, /* Count of tags in the map */ asn_MAP_GlobalE2node_gNB_ID_oms_1, /* Optional members */ - 2, 0, /* Root/Additions */ - 3, /* First extension addition */ + 3, 0, /* Root/Additions */ + 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID = { "GlobalE2node-gNB-ID", @@ -64,9 +107,17 @@ asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalE2node_gNB_ID_1, - 3, /* Elements count */ + 4, /* Elements count */ &asn_SPC_GlobalE2node_gNB_ID_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/GlobalE2node-ng-eNB-ID.c b/e2ap/lib/GlobalE2node-ng-eNB-ID.c index b3bb491..62f51b5 100644 --- a/e2ap/lib/GlobalE2node-ng-eNB-ID.c +++ b/e2ap/lib/GlobalE2node-ng-eNB-ID.c @@ -1,36 +1,83 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalE2node-ng-eNB-ID.h" +#include "GlobalENB-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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "global-ng-eNB-ID" }, + { ATF_POINTER, 2, offsetof(struct GlobalE2node_ng_eNB_ID, global_eNB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalENB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "global-eNB-ID" + }, + { ATF_POINTER, 1, offsetof(struct GlobalE2node_ng_eNB_ID, ngENB_DU_ID), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NGENB_DU_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ngENB-DU-ID" + }, }; +static const int asn_MAP_GlobalE2node_ng_eNB_ID_oms_1[] = { 1, 2 }; 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_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-ng-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* global-eNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ngENB-DU-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 */ + 3, /* Count of tags in the map */ + asn_MAP_GlobalE2node_ng_eNB_ID_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID = { "GlobalE2node-ng-eNB-ID", @@ -42,9 +89,17 @@ asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalE2node_ng_eNB_ID_1, - 1, /* Elements count */ + 3, /* Elements count */ &asn_SPC_GlobalE2node_ng_eNB_ID_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/GlobalENB-ID.c b/e2ap/lib/GlobalENB-ID.c index 9c34820..8561e9e 100644 --- a/e2ap/lib/GlobalENB-ID.c +++ b/e2ap/lib/GlobalENB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalENB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMN_Identity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMN-Identity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_ENB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eNB-ID" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalENB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalENB_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GlobalNG-RANNode-ID.c b/e2ap/lib/GlobalNG-RANNode-ID.c new file mode 100644 index 0000000..a372885 --- /dev/null +++ b/e2ap/lib/GlobalNG-RANNode-ID.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "GlobalNG-RANNode-ID.h" + +#include "GlobalgNB-ID.h" +#include "GlobalngeNB-ID.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GlobalNG_RANNode_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_GlobalNG_RANNode_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_GlobalNG_RANNode_ID_1[] = { + { ATF_POINTER, 0, offsetof(struct GlobalNG_RANNode_ID, choice.gNB), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalgNB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "gNB" + }, + { ATF_POINTER, 0, offsetof(struct GlobalNG_RANNode_ID, choice.ng_eNB), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalngeNB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ng-eNB" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalNG_RANNode_ID_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_GlobalNG_RANNode_ID_specs_1 = { + sizeof(struct GlobalNG_RANNode_ID), + offsetof(struct GlobalNG_RANNode_ID, _asn_ctx), + offsetof(struct GlobalNG_RANNode_ID, present), + sizeof(((struct GlobalNG_RANNode_ID *)0)->present), + asn_MAP_GlobalNG_RANNode_ID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalNG_RANNode_ID = { + "GlobalNG-RANNode-ID", + "GlobalNG-RANNode-ID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GlobalNG_RANNode_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GlobalNG_RANNode_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_GlobalNG_RANNode_ID_1, + 2, /* Elements count */ + &asn_SPC_GlobalNG_RANNode_ID_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/GlobalRIC-ID.c b/e2ap/lib/GlobalRIC-ID.c index c027c79..7be36eb 100644 --- a/e2ap/lib/GlobalRIC-ID.c +++ b/e2ap/lib/GlobalRIC-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalRIC-ID.h" @@ -27,7 +27,7 @@ memb_ric_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 20)) { + if((size == 20UL)) { /* Constraint check succeeded */ return 0; } else { @@ -38,21 +38,33 @@ memb_ric_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, } } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_ric_ID_constr_3 CC_NOTUSED = { { 0, 0 }, 20 /* (SIZE(20..20)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMN-Identity" }, @@ -61,7 +73,15 @@ asn_TYPE_member_t asn_MBR_GlobalRIC_ID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ric_ID_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ric_ID_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ric_ID_constraint_1 + }, 0, 0, /* No default value */ "ric-ID" }, @@ -91,7 +111,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalRIC_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalRIC_ID_1, 2, /* Elements count */ &asn_SPC_GlobalRIC_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GlobalenGNB-ID.c b/e2ap/lib/GlobalenGNB-ID.c index 2599aae..2172dbc 100644 --- a/e2ap/lib/GlobalenGNB-ID.c +++ b/e2ap/lib/GlobalenGNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalenGNB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMN_Identity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMN-Identity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_ENGNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-ID" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalenGNB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalenGNB_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GlobalgNB-ID.c b/e2ap/lib/GlobalgNB-ID.c index 2150089..0e8702c 100644 --- a/e2ap/lib/GlobalgNB-ID.c +++ b/e2ap/lib/GlobalgNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalgNB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMN_Identity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "plmn-id" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalgNB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_GNB_ID_Choice, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gnb-id" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalgNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalgNB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalgNB_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GlobalngeNB-ID.c b/e2ap/lib/GlobalngeNB-ID.c index 97d1f41..b0092ba 100644 --- a/e2ap/lib/GlobalngeNB-ID.c +++ b/e2ap/lib/GlobalngeNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalngeNB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMN_Identity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "plmn-id" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalngeNB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_ENB_ID_Choice, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "enb-id" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalngeNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalngeNB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalngeNB_ID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/GraphicString.c b/e2ap/lib/GraphicString.c new file mode 100644 index 0000000..b761187 --- /dev/null +++ b/e2ap/lib/GraphicString.c @@ -0,0 +1,91 @@ +/*- + * 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, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print, /* non-ascii string */ +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, /* Can't expect it to be ASCII/UTF8 */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer, /* Can't expect it to be ASCII/UTF8 */ +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OCTET_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_unknown_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; diff --git a/e2ap/lib/INTEGER.c b/e2ap/lib/INTEGER.c index 2a2f4d7..095063f 100644 --- a/e2ap/lib/INTEGER.c +++ b/e2ap/lib/INTEGER.c @@ -1,134 +1,99 @@ -/*- - * Copyright (c) 2003-2014 Lev Walkin . +/* + * Copyright (c) 2003-2019 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 +#include /* * INTEGER basic type description. */ static const ber_tlv_tag_t asn_DEF_INTEGER_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) + (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, + INTEGER_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + INTEGER_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + INTEGER_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + ber_decode_primitive, + INTEGER_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + INTEGER_decode_xer, + INTEGER_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + INTEGER_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + INTEGER_decode_oer, /* OER decoder */ + INTEGER_encode_oer, /* Canonical OER encoder */ #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, + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + INTEGER_decode_uper, /* Unaligned PER decoder */ + INTEGER_encode_uper, /* Unaligned PER encoder */ #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + INTEGER_decode_aper, /* Aligned PER decoder */ + INTEGER_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + INTEGER_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ +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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 +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; @@ -202,89 +167,6 @@ INTEGER__dump(const asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_cons 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; @@ -304,816 +186,6 @@ INTEGER_map_value2enum(const asn_INTEGER_specifics_t *specs, long value) { 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; @@ -1428,64 +500,71 @@ asn_int642INTEGER(INTEGER_t *st, int64_t value) { */ enum asn_strtox_result_e asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) { - int sign = 1; - intmax_t value; + 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; - } - } + const intmax_t 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; - 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; - } - } + if(str >= *end) return ASN_STRTOX_ERROR_INVAL; - *end = str; - *intp = sign * value; - return ASN_STRTOX_OK; + 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++) { + if(*str >= 0x30 && *str <= 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; + } + str += 1; + if(str < *end) { + // If digits continue, we're guaranteed out of range. + *end = str; + if(*str >= 0x30 && *str <= 0x39) { + return ASN_STRTOX_ERROR_RANGE; + } else { + *intp = sign * value; + return ASN_STRTOX_EXTRA_DATA; + } + } + break; + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + *intp = sign * value; + return ASN_STRTOX_EXTRA_DATA; + } + } + + *end = str; + *intp = sign * value; + return ASN_STRTOX_OK; } /* @@ -1496,56 +575,63 @@ asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) { */ enum asn_strtox_result_e asn_strtoumax_lim(const char *str, const char **end, uintmax_t *uintp) { - uintmax_t value; + 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 + const uintmax_t asn1_uintmax_max = ((~(uintmax_t)0)); + const uintmax_t upper_boundary = asn1_uintmax_max / 10; + uintmax_t last_digit_max = asn1_uintmax_max % 10; if(str >= *end) return ASN_STRTOX_ERROR_INVAL; - switch(*str) { - case '-': + switch(*str) { + case '-': return ASN_STRTOX_ERROR_INVAL; - case '+': - str++; - if(str >= *end) { - *end = str; - return ASN_STRTOX_EXPECT_MORE; - } - } + 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) { + for(value = 0; str < (*end); str++) { + if(*str >= 0x30 && *str <= 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; + str += 1; + if(str < *end) { + // If digits continue, we're guaranteed out of range. + *end = str; + if(*str >= 0x30 && *str <= 0x39) { + return ASN_STRTOX_ERROR_RANGE; + } else { + *uintp = value; + return ASN_STRTOX_EXTRA_DATA; + } + } + break; } 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; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + *uintp = value; + return ASN_STRTOX_EXTRA_DATA; + } + } - *end = str; - *uintp = value; - return ASN_STRTOX_OK; + *end = str; + *uintp = value; + return ASN_STRTOX_OK; } enum asn_strtox_result_e @@ -1650,86 +736,3 @@ INTEGER_compare(const asn_TYPE_descriptor_t *td, const void *aptr, } } - -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/e2ap/lib/INTEGER_aper.c b/e2ap/lib/INTEGER_aper.c new file mode 100644 index 0000000..fc88268 --- /dev/null +++ b/e2ap/lib/INTEGER_aper.c @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 %lld", + value, (long long int)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 %lld", + value, (long long int)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, -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/%zu) lb %lld ub %lld %s", + uval, st->buf[0], st->size, + (long long int)ct->lower_bound, + (long long int)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/%zu) lb %lld ub %lld %s", + value, st->buf[0], st->size, + (long long int)ct->lower_bound, + (long long int)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 (%lld) with range %d bits", + value, (long long int)(value - ct->lower_bound), + ct->range_bits); + + v = value - ct->lower_bound; + + /* #12 <= 8 -> alignment ? */ + int range = ct->upper_bound - ct->lower_bound + 1; + if (ct->range_bits < 8 || (ct->range_bits == 8 && range < 256)) { + 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 %lld", (long long int)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 = aper_put_length(po, -1, -1, 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 && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; + } + + ASN__ENCODED_OK(er); +} diff --git a/e2ap/lib/INTEGER_ber.c b/e2ap/lib/INTEGER_ber.c new file mode 100644 index 0000000..57bfe1e --- /dev/null +++ b/e2ap/lib/INTEGER_ber.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2ap/lib/INTEGER_jer.c b/e2ap/lib/INTEGER_jer.c new file mode 100644 index 0000000..23d7c12 --- /dev/null +++ b/e2ap/lib/INTEGER_jer.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +INTEGER_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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); +} diff --git a/e2ap/lib/INTEGER_oer.c b/e2ap/lib/INTEGER_oer.c index 110689b..19f276d 100644 --- a/e2ap/lib/INTEGER_oer.c +++ b/e2ap/lib/INTEGER_oer.c @@ -3,11 +3,8 @@ * 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, @@ -175,5 +172,3 @@ INTEGER_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/INTEGER_print.c b/e2ap/lib/INTEGER_print.c new file mode 100644 index 0000000..2d37dee --- /dev/null +++ b/e2ap/lib/INTEGER_print.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2ap/lib/INTEGER_rfill.c b/e2ap/lib/INTEGER_rfill.c new file mode 100644 index 0000000..fab0023 --- /dev/null +++ b/e2ap/lib/INTEGER_rfill.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 { + 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; +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + const asn_per_constraints_t *ct; + + 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); + } + } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + } + + 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/e2ap/lib/INTEGER_uper.c b/e2ap/lib/INTEGER_uper.c new file mode 100644 index 0000000..ed65385 --- /dev/null +++ b/e2ap/lib/INTEGER_uper.c @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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(uintmax_t)) + ASN__DECODE_FAILED; + + if(specs && specs->field_unsigned) { + uintmax_t 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_umax2INTEGER(st, uvalue)) + ASN__DECODE_FAILED; + } else { + uintmax_t uvalue = 0; + intmax_t 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_imax_range_unrebase(uvalue, ct->lower_bound, + ct->upper_bound, &svalue) + || asn_imax2INTEGER(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 arithmetic. + */ + 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; + union { + intmax_t s; + uintmax_t u; + } value; + + 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) { + if(asn_INTEGER2umax(st, &value.u)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value.u < (uintmax_t)ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value.u < (uintmax_t)ct->lower_bound + || value.u > (uintmax_t)ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%" ASN_PRI_SIZE ") lb %lu ub %lu %s", + value.u, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + } else { + if(asn_INTEGER2imax(st, &value.s)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value.s < ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value.s < ct->lower_bound + || value.s > ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %ld (%02x/%" ASN_PRI_SIZE ") lb %ld ub %ld %s", + value.s, 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) { + uintmax_t v; + /* #11.5.6 -> #11.3 */ + if(specs && specs->field_unsigned) { + if(((uintmax_t)ct->lower_bound > (uintmax_t)(ct->upper_bound) + || (value.u < (uintmax_t)ct->lower_bound)) + || (value.u > (uintmax_t)ct->upper_bound)) { + ASN_DEBUG("Value %lu to-be-encoded is outside the bounds [%lu, %lu]!", + value.u, ct->lower_bound, ct->upper_bound); + ASN__ENCODE_FAILED; + } + v = value.u - (uintmax_t)ct->lower_bound; + } else { + if(per_imax_range_rebase(value.s, ct->lower_bound, ct->upper_bound, &v)) { + ASN__ENCODE_FAILED; + } + } + ASN_DEBUG("Encoding integer %lu with range %d bits", + v, ct->range_bits); + 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); +} diff --git a/e2ap/lib/INTEGER_xer.c b/e2ap/lib/INTEGER_xer.c new file mode 100644 index 0000000..4f21c86 --- /dev/null +++ b/e2ap/lib/INTEGER_xer.c @@ -0,0 +1,351 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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_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); +} diff --git a/e2ap/lib/InitiatingMessage.c b/e2ap/lib/InitiatingMessage.c index 6a6bfdb..9bd0c88 100644 --- a/e2ap/lib/InitiatingMessage.c +++ b/e2ap/lib/InitiatingMessage.c @@ -1,8 +1,8 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InitiatingMessage.h" @@ -17,14 +17,20 @@ 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_id_E2nodeConfigurationUpdate = 10; 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_7_id_E2connectionUpdate = 11; +static const long asn_VAL_7_reject = 0; +static const long asn_VAL_8_id_Reset = 3; +static const long asn_VAL_8_reject = 0; +static const long asn_VAL_9_id_RICindication = 5; static const long asn_VAL_9_ignore = 1; +static const long asn_VAL_10_id_RICserviceQuery = 6; +static const long asn_VAL_10_ignore = 1; +static const long asn_VAL_11_id_ErrorIndication = 2; +static const long asn_VAL_11_ignore = 1; +static const long asn_VAL_12_id_RICsubscriptionDeleteRequired = 12; +static const long asn_VAL_12_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 }, @@ -51,29 +57,44 @@ static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { { "&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_E2nodeConfigurationUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_E2nodeConfigurationUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_E2connectionUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_E2connectionUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_Reset }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_RICindication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_10_id_RICserviceQuery }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_10_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 } + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_11_id_ErrorIndication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_11_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequired }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_12_id_RICsubscriptionDeleteRequired }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_12_ignore } }; static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { - { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } + { 12, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } }; static int memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, @@ -89,7 +110,7 @@ memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt value = *(const long *)sptr; - if((value >= 0 && value <= 255)) { + if((value >= 0L && value <= 255L)) { /* Constraint check succeeded */ return 0; } else { @@ -192,37 +213,57 @@ memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_procedureCode_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICsubscriptionRequest" }, @@ -231,7 +272,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICsubscriptionDeleteRequest, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICsubscriptionDeleteRequest" }, @@ -240,7 +289,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICserviceUpdate, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICserviceUpdate" }, @@ -249,7 +306,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICcontrolRequest, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICcontrolRequest" }, @@ -258,16 +323,66 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_E2setupRequest, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "E2setupRequest" }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2nodeConfigurationUpdate), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeConfigurationUpdate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeConfigurationUpdate" + }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2connectionUpdate), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2connectionUpdate" + }, { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ResetRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ResetRequest, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ResetRequest" }, @@ -276,7 +391,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICindication, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICindication" }, @@ -285,7 +408,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICserviceQuery, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICserviceQuery" }, @@ -294,21 +425,49 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_ErrorIndication, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ErrorIndication" }, + { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionDeleteRequired), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteRequired, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RICsubscriptionDeleteRequired" + }, }; 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 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 11 }, /* RICsubscriptionRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 10 }, /* RICsubscriptionDeleteRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 9 }, /* RICserviceUpdate */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 8 }, /* RICcontrolRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 7 }, /* E2setupRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 6 }, /* E2nodeConfigurationUpdate */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 5 }, /* E2connectionUpdate */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 4 }, /* ResetRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 3 }, /* RICindication */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -9, 2 }, /* RICserviceQuery */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -10, 1 }, /* ErrorIndication */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -11, 0 } /* RICsubscriptionDeleteRequired */ }; static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { sizeof(struct InitiatingMessage__value), @@ -316,7 +475,7 @@ static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { offsetof(struct InitiatingMessage__value, present), sizeof(((struct InitiatingMessage__value *)0)->present), asn_MAP_value_tag2el_4, - 9, /* Count of tags in the map */ + 12, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; @@ -329,9 +488,17 @@ asn_TYPE_descriptor_t asn_DEF_value_4 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, asn_MBR_value_4, - 9, /* Elements count */ + 12, /* Elements count */ &asn_SPC_value_specs_4 /* Additional specs */ }; @@ -341,7 +508,15 @@ asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_procedureCode_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_procedureCode_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_procedureCode_constraint_1 + }, 0, 0, /* No default value */ "procedureCode" }, @@ -350,7 +525,15 @@ asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_1 + }, 0, 0, /* No default value */ "criticality" }, @@ -359,7 +542,15 @@ asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = { +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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_1 + }, 0, 0, /* No default value */ "value" }, @@ -390,7 +581,15 @@ asn_TYPE_descriptor_t asn_DEF_InitiatingMessage = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InitiatingMessage_1, 3, /* Elements count */ &asn_SPC_InitiatingMessage_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GNB-CU-UP-Name.c b/e2ap/lib/MMEname.c similarity index 61% rename from e2sm/lib/GNB-CU-UP-Name.c rename to e2ap/lib/MMEname.c index 59dd641..d5a8da7 100644 --- a/e2sm/lib/GNB-CU-UP-Name.c +++ b/e2ap/lib/MMEname.c @@ -1,11 +1,11 @@ /* * 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` + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ -#include "GNB-CU-UP-Name.h" +#include "MMEname.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, /* */ @@ -40,7 +40,7 @@ static int check_permitted_alphabet_1(const void *sptr) { } int -GNB_CU_UP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, +MMEname_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; @@ -54,7 +54,7 @@ GNB_CU_UP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size >= 1 && size <= 150) + if((size >= 1UL && size <= 150UL) && !check_permitted_alphabet_1(st)) { /* Constraint check succeeded */ return 0; @@ -66,12 +66,12 @@ GNB_CU_UP_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, } } -static int asn_PER_MAP_GNB_CU_UP_Name_1_v2c(unsigned int value) { +static int asn_PER_MAP_MMEname_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) { +static int asn_PER_MAP_MMEname_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]; @@ -80,29 +80,41 @@ static int asn_PER_MAP_GNB_CU_UP_Name_1_c2v(unsigned int 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 = { +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MMEname_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 = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_MMEname_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 */ + asn_PER_MAP_MMEname_1_v2c, /* Value to PER code map */ + asn_PER_MAP_MMEname_1_c2v /* PER code to value map */ }; -static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_Name_tags_1[] = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_MMEname_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_TYPE_descriptor_t asn_DEF_MMEname = { + "MMEname", + "MMEname", &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 }, + asn_DEF_MMEname_tags_1, + sizeof(asn_DEF_MMEname_tags_1) + /sizeof(asn_DEF_MMEname_tags_1[0]), /* 1 */ + asn_DEF_MMEname_tags_1, /* Same as above */ + sizeof(asn_DEF_MMEname_tags_1) + /sizeof(asn_DEF_MMEname_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MMEname_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MMEname_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + MMEname_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/NGENB-DU-ID.c b/e2ap/lib/NGENB-DU-ID.c new file mode 100644 index 0000000..549c14b --- /dev/null +++ b/e2ap/lib/NGENB-DU-ID.c @@ -0,0 +1,82 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#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 >= 0L && value <= 68719476735L)) { + /* 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. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_NGENB_DU_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_NGENB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_NGENB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NGENB_DU_ID_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/e2ap/lib/NativeEnumerated.c b/e2ap/lib/NativeEnumerated.c index 50ffb1d..aee450c 100644 --- a/e2ap/lib/NativeEnumerated.c +++ b/e2ap/lib/NativeEnumerated.c @@ -16,352 +16,93 @@ * NativeEnumerated basic type description. */ static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) + (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, + NativeInteger_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + NativeInteger_print, #else - NativeEnumerated_decode_oer, - NativeEnumerated_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + NativeInteger_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + NativeInteger_decode_ber, + NativeInteger_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + NativeInteger_decode_xer, + NativeEnumerated_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + NativeEnumerated_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + NativeEnumerated_decode_oer, + NativeEnumerated_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + NativeEnumerated_decode_uper, + NativeEnumerated_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + NativeEnumerated_decode_aper, + NativeEnumerated_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + NativeEnumerated_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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); + 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; } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ diff --git a/e2ap/lib/NativeEnumerated_aper.c b/e2ap/lib/NativeEnumerated_aper.c new file mode 100644 index 0000000..5c4c256 --- /dev/null +++ b/e2ap/lib/NativeEnumerated_aper.c @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 = %zu Padding bits = %d", + td->name, pd->moved, padding); + ASN_DEBUG("For NativeEnumerated %s, upper bound = %llu", + td->name, (unsigned long long)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; + */ + + /* XXX handle indefinite index length > 64k */ + value = aper_get_nsnnwn(pd, 65537); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + //if(value >= specs->map_count) + // ASN__DECODE_FAILED; + if(value >= specs->map_count) { + ASN_DEBUG("Decoded unknown index value %s = %ld", td->name, value); + /* unknown index. Workaround => set the first enumeration value */ + *native = specs->value2enum[0].nat_value; + return rval; + } + } + + *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, range_bits = 1; + 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) range_bits = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(range_bits && 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(aper_put_nsnnwn(po, + ct->upper_bound - ct->lower_bound + 1, + value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2ap/lib/NativeEnumerated_jer.c b/e2ap/lib/NativeEnumerated_jer.c new file mode 100644 index 0000000..046afe9 --- /dev/null +++ b/e2ap/lib/NativeEnumerated_jer.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +NativeEnumerated_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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; + } +} diff --git a/e2ap/lib/NativeEnumerated_oer.c b/e2ap/lib/NativeEnumerated_oer.c index ee3c189..52dbcb8 100644 --- a/e2ap/lib/NativeEnumerated_oer.c +++ b/e2ap/lib/NativeEnumerated_oer.c @@ -3,11 +3,8 @@ * 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) { @@ -145,5 +142,3 @@ NativeEnumerated_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/NativeEnumerated_uper.c b/e2ap/lib/NativeEnumerated_uper.c new file mode 100644 index 0000000..e2f932a --- /dev/null +++ b/e2ap/lib/NativeEnumerated_uper.c @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} + +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); +} diff --git a/e2ap/lib/NativeEnumerated_xer.c b/e2ap/lib/NativeEnumerated_xer.c new file mode 100644 index 0000000..e8d6d0d --- /dev/null +++ b/e2ap/lib/NativeEnumerated_xer.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; + } +} diff --git a/e2ap/lib/NativeInteger.c b/e2ap/lib/NativeInteger.c index 316e872..f0309b0 100644 --- a/e2ap/lib/NativeInteger.c +++ b/e2ap/lib/NativeInteger.c @@ -17,408 +17,84 @@ * NativeInteger basic type description. */ static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) + (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, + NativeInteger_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + NativeInteger_print, #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, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + NativeInteger_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + NativeInteger_decode_ber, + NativeInteger_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + NativeInteger_decode_xer, + NativeInteger_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + NativeInteger_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + NativeInteger_decode_oer, /* OER decoder */ + NativeInteger_encode_oer, /* Canonical OER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + NativeInteger_decode_uper, /* Unaligned PER decoder */ + NativeInteger_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + NativeInteger_decode_aper, /* Aligned PER decoder */ + NativeInteger_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + NativeInteger_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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) { @@ -474,77 +150,3 @@ NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const v 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/e2ap/lib/NativeInteger_aper.c b/e2ap/lib/NativeInteger_aper.c new file mode 100644 index 0000000..1d13070 --- /dev/null +++ b/e2ap/lib/NativeInteger_aper.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2ap/lib/NativeInteger_ber.c b/e2ap/lib/NativeInteger_ber.c new file mode 100644 index 0000000..ed68362 --- /dev/null +++ b/e2ap/lib/NativeInteger_ber.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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 occurred, 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; +} diff --git a/e2ap/lib/NativeInteger_jer.c b/e2ap/lib/NativeInteger_jer.c new file mode 100644 index 0000000..f48f8ec --- /dev/null +++ b/e2ap/lib/NativeInteger_jer.c @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +NativeInteger_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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); +} diff --git a/e2ap/lib/NativeInteger_oer.c b/e2ap/lib/NativeInteger_oer.c index 411413a..4e90046 100644 --- a/e2ap/lib/NativeInteger_oer.c +++ b/e2ap/lib/NativeInteger_oer.c @@ -3,11 +3,8 @@ * 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, @@ -95,5 +92,3 @@ NativeInteger_encode_oer(const asn_TYPE_descriptor_t *td, return er; } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/NativeInteger_print.c b/e2ap/lib/NativeInteger_print.c new file mode 100644 index 0000000..0602e0d --- /dev/null +++ b/e2ap/lib/NativeInteger_print.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; + } +} diff --git a/e2ap/lib/NativeInteger_rfill.c b/e2ap/lib/NativeInteger_rfill.c new file mode 100644 index 0000000..0e2cee8 --- /dev/null +++ b/e2ap/lib/NativeInteger_rfill.c @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 { + 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; +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + const asn_per_constraints_t *ct; + + 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); + } + } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + } + + *sptr = st; + *st = value; + return result_ok; +} diff --git a/e2ap/lib/NativeInteger_uper.c b/e2ap/lib/NativeInteger_uper.c new file mode 100644 index 0000000..4fc4ba1 --- /dev/null +++ b/e2ap/lib/NativeInteger_uper.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2ap/lib/NativeInteger_xer.c b/e2ap/lib/NativeInteger_xer.c new file mode 100644 index 0000000..18ec59a --- /dev/null +++ b/e2ap/lib/NativeInteger_xer.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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); +} diff --git a/e2ap/lib/OBJECT_IDENTIFIER.c b/e2ap/lib/OBJECT_IDENTIFIER.c new file mode 100644 index 0000000..5cf2d60 --- /dev/null +++ b/e2ap/lib/OBJECT_IDENTIFIER.c @@ -0,0 +1,532 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include +#include /* for CHAR_BIT */ +#include +#include + +/* + * OBJECT IDENTIFIER basic type description. + */ +static const ber_tlv_tag_t asn_DEF_OBJECT_IDENTIFIER_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)) +}; +asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = { + ASN__PRIMITIVE_TYPE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OBJECT_IDENTIFIER_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, /* Implemented in terms of a string comparison */ +#if !defined(ASN_DISABLE_BER_SUPPORT) + ber_decode_primitive, + der_encode_primitive, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OBJECT_IDENTIFIER_decode_xer, + OBJECT_IDENTIFIER_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OBJECT_IDENTIFIER_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OBJECT_IDENTIFIER_decode_oer, + OBJECT_IDENTIFIER_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OBJECT_IDENTIFIER_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ +}; +asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = { + "OBJECT IDENTIFIER", + "OBJECT_IDENTIFIER", + &asn_OP_OBJECT_IDENTIFIER, + asn_DEF_OBJECT_IDENTIFIER_tags, + sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) + / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), + asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */ + sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) + / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OBJECT_IDENTIFIER_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + +int +OBJECT_IDENTIFIER_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, + void *app_key) { + const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; + + if(st && st->buf) { + if(st->size < 1) { + ASN__CTFAIL(app_key, td, sptr, + "%s: at least one numerical value " + "expected (%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 ssize_t +OBJECT_IDENTIFIER_get_first_arcs(const uint8_t *arcbuf, size_t arcbuf_len, + asn_oid_arc_t *arc0, asn_oid_arc_t *arc1) { + asn_oid_arc_t value; + + ssize_t rd = OBJECT_IDENTIFIER_get_single_arc(arcbuf, arcbuf_len, &value); + if(rd <= 0) return rd; + + if(value >= 80) { + *arc0 = 2; + *arc1 = value - 80; + } else if(value >= 40) { + *arc0 = 1; + *arc1 = value - 40; + } else { + *arc0 = 0; + *arc1 = value; + } + + return rd; +} + +ssize_t +OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, size_t arcbuf_len, + asn_oid_arc_t *ret_value) { + const uint8_t *b = arcbuf; + const uint8_t *arcend = arcbuf + arcbuf_len; /* End of arc */ + + if(arcbuf == arcend) { + return 0; + } else { + asn_oid_arc_t accum; + asn_oid_arc_t upper_limit = (ASN_OID_ARC_MAX >> 7); + /* When the value reaches "upper_limit", it can take */ + /* at most one more digit. If it exceeds "upper_limit" */ + /* but there are more digits - it's an Overflow condition */ + /* Gather all bits into the accumulator */ + for(accum = 0; b < arcend; b++) { + accum = (accum << 7) | (*b & ~0x80); + if((*b & 0x80) == 0) { // no more digits + if(accum <= ASN_OID_ARC_MAX) { + *ret_value = accum; + return 1 + (b - arcbuf); + } else { + errno = ERANGE; /* Overflow */ + return -1; + } + } else { // to make sure we aren't wrapping around + if(accum > upper_limit) { + errno = ERANGE; /* Overflow */ + return -1; + } + } + } + errno = EINVAL; + return -1; + } + +} + +ssize_t +OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st, + asn_app_consume_bytes_f *cb, void *app_key) { + char scratch[32]; + asn_oid_arc_t arc0 = 0; + asn_oid_arc_t arc1 = 0; + size_t produced = 0; + size_t off = 0; + ssize_t rd; + int ret; + + rd = OBJECT_IDENTIFIER_get_first_arcs(st->buf, st->size, &arc0, &arc1); + if(rd <= 0) { + return -1; + } + + ret = snprintf(scratch, sizeof(scratch), "%"PRIu32".%"PRIu32, arc0, arc1); + if(ret >= (ssize_t)sizeof(scratch)) { + return -1; + } + produced += ret; + if(cb(scratch, ret, app_key) < 0) + return -1; + + for(off = rd; ; ) { + asn_oid_arc_t arc; + 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; + assert(off <= st->size); + ret = snprintf(scratch, sizeof(scratch), ".%" PRIu32, arc); + if(ret >= (ssize_t)sizeof(scratch)) { + return -1; + } + produced += ret; + 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; +} + +ssize_t +OBJECT_IDENTIFIER_get_arcs(const OBJECT_IDENTIFIER_t *st, asn_oid_arc_t *arcs, + size_t arc_slots) { + asn_oid_arc_t arc0 = 0; + asn_oid_arc_t arc1 = 0; + size_t num_arcs = 0; + size_t off; + ssize_t rd; + + if(!st || !st->buf) { + errno = EINVAL; + return -1; + } + + rd = OBJECT_IDENTIFIER_get_first_arcs(st->buf, st->size, &arc0, &arc1); + if(rd <= 0) { + return -1; + } + num_arcs = 2; + switch(arc_slots) { + default: + case 2: + arcs[1] = arc1; + /* Fall through */ + case 1: + arcs[0] = arc0; + /* Fall through */ + case 0: + break; + } + + for(off = rd; ; ) { + asn_oid_arc_t arc; + 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 < arc_slots) { + arcs[num_arcs] = arc; + } + num_arcs++; + } + } + + if(off != st->size) { + return -1; + } + + return num_arcs; +} + + +/* + * Save the single value as an object identifier arc. + */ +ssize_t +OBJECT_IDENTIFIER_set_single_arc(uint8_t *arcbuf, size_t arcbuf_len, + asn_oid_arc_t value) { + /* + * The following conditions must hold: + * assert(arcbuf); + */ + uint8_t scratch[((sizeof(value) * CHAR_BIT + 6) / 7)]; + uint8_t *scratch_end = &scratch[sizeof(scratch)-1]; + uint8_t *b; + size_t result_len; + uint8_t mask; + + for(b = scratch_end, mask = 0; ; mask = 0x80, b--) { + *b = mask | (value & 0x7f); + value >>= 7; + if(!value) { + break; + } + } + + result_len = (scratch_end - b) + 1; + + if(result_len > arcbuf_len) { + return -1; + } + + memcpy(arcbuf, b, result_len); + + return result_len; +} + +int +OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *st, const asn_oid_arc_t *arcs, + size_t arc_slots) { + uint8_t *buf; + uint8_t *bp; + ssize_t wrote; + asn_oid_arc_t arc0; + asn_oid_arc_t arc1; + size_t size; + size_t i; + + if(!st || !arcs || arc_slots < 2) { + errno = EINVAL; + return -1; + } + + arc0 = arcs[0]; + arc1 = arcs[1]; + + if(arc0 <= 1) { + if(arc1 >= 40) { + /* 8.19.4: At most 39 subsequent values (including 0) */ + errno = ERANGE; + return -1; + } + } else if(arc0 == 2) { + if(arc1 > ASN_OID_ARC_MAX - 80) { + errno = ERANGE; + return -1; + } + } else if(arc0 > 2) { + /* 8.19.4: Only three values are allocated from the root node */ + errno = ERANGE; + return -1; + } + + /* + * After above tests it is known that the value of arc0 is completely + * trustworthy (0..2). However, the arc1's value is still meaningless. + */ + + /* + * Roughly estimate the maximum size necessary to encode these arcs. + * This estimation implicitly takes in account the following facts, + * that cancel each other: + * * the first two arcs are encoded in a single value. + * * the first value may require more space (+1 byte) + * * the value of the first arc which is in range (0..2) + */ + size = ((sizeof(asn_oid_arc_t) * CHAR_BIT + 6) / 7) * arc_slots; + bp = buf = (uint8_t *)MALLOC(size + 1); + if(!buf) { + /* ENOMEM */ + return -1; + } + + wrote = OBJECT_IDENTIFIER_set_single_arc(bp, size, arc0 * 40 + arc1); + if(wrote <= 0) { + FREEMEM(buf); + return -1; + } + assert((size_t)wrote <= size); + bp += wrote; + size -= wrote; + + for(i = 2; i < arc_slots; i++) { + 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; +} + +ssize_t +OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length, + asn_oid_arc_t *arcs, size_t arcs_count, + const char **opt_oid_text_end) { + size_t num_arcs = 0; + const char *oid_end; + enum { + ST_LEADSPACE, + ST_TAILSPACE, + ST_AFTERVALUE, /* Next character ought to be '.' or a space */ + ST_WAITDIGITS /* Next character is expected to be a digit */ + } state = ST_LEADSPACE; + + if(!oid_text || oid_txt_length < -1 || (arcs_count && !arcs)) { + if(opt_oid_text_end) *opt_oid_text_end = oid_text; + errno = EINVAL; + return -1; + } + + if(oid_txt_length == -1) + oid_txt_length = strlen(oid_text); + +#define _OID_CAPTURE_ARC(oid_text, oid_end) \ + do { \ + const char *endp = oid_end; \ + unsigned long value; \ + switch(asn_strtoul_lim(oid_text, &endp, &value)) { \ + case ASN_STRTOX_EXTRA_DATA: \ + case ASN_STRTOX_OK: \ + if(value <= ASN_OID_ARC_MAX) { \ + if(num_arcs < arcs_count) arcs[num_arcs] = value; \ + num_arcs++; \ + oid_text = endp - 1; \ + break; \ + } \ + /* Fall through */ \ + case ASN_STRTOX_ERROR_RANGE: \ + if(opt_oid_text_end) *opt_oid_text_end = oid_text; \ + errno = ERANGE; \ + return -1; \ + case ASN_STRTOX_ERROR_INVAL: \ + case ASN_STRTOX_EXPECT_MORE: \ + if(opt_oid_text_end) *opt_oid_text_end = oid_text; \ + errno = EINVAL; \ + return -1; \ + } \ + } while(0) + + for(oid_end = oid_text + oid_txt_length; oid_text broken OID */ + return -1; + case ST_LEADSPACE: + case ST_WAITDIGITS: + _OID_CAPTURE_ARC(oid_text, oid_end); + state = ST_AFTERVALUE; + continue; + } + break; + default: + /* Unexpected symbols */ + state = ST_WAITDIGITS; + break; + } /* switch() */ + break; + } /* for() */ + + + if(opt_oid_text_end) *opt_oid_text_end = oid_text; + + /* Finalize last arc */ + switch(state) { + case ST_LEADSPACE: + return 0; /* No OID found in input data */ + case ST_WAITDIGITS: + errno = EINVAL; /* Broken OID */ + return -1; + case ST_AFTERVALUE: + case ST_TAILSPACE: + return num_arcs; + } + + errno = EINVAL; /* Broken OID */ + return -1; +} diff --git a/e2ap/lib/OBJECT_IDENTIFIER_jer.c b/e2ap/lib/OBJECT_IDENTIFIER_jer.c new file mode 100644 index 0000000..f105f03 --- /dev/null +++ b/e2ap/lib/OBJECT_IDENTIFIER_jer.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + + +asn_enc_rval_t +OBJECT_IDENTIFIER_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) { + ASN__ENCODE_FAILED; + } + + er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2ap/lib/OBJECT_IDENTIFIER_print.c b/e2ap/lib/OBJECT_IDENTIFIER_print.c new file mode 100644 index 0000000..b0c3a9e --- /dev/null +++ b/e2ap/lib/OBJECT_IDENTIFIER_print.c @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +int +OBJECT_IDENTIFIER_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, + void *app_key) { + const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_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(OBJECT_IDENTIFIER__dump_body(st, cb, app_key) < 0) { + return -1; + } + + return (cb(" }", 2, app_key) < 0) ? -1 : 0; +} diff --git a/e2ap/lib/OBJECT_IDENTIFIER_rfill.c b/e2ap/lib/OBJECT_IDENTIFIER_rfill.c new file mode 100644 index 0000000..55093c8 --- /dev/null +++ b/e2ap/lib/OBJECT_IDENTIFIER_rfill.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Generate values from the list of interesting values, or just a random + * value up to the upper limit. + */ +static asn_oid_arc_t +OBJECT_IDENTIFIER__biased_random_arc(asn_oid_arc_t upper_bound) { + const asn_oid_arc_t values[] = {0, 1, 127, 128, 129, 254, 255, 256}; + size_t idx; + + switch(asn_random_between(0, 2)) { + case 0: + idx = asn_random_between(0, sizeof(values) / sizeof(values[0]) - 1); + if(values[idx] < upper_bound) { + return values[idx]; + } + /* Fall through */ + case 1: + return asn_random_between(0, upper_bound); + case 2: + default: + return upper_bound; + } +} + +asn_random_fill_result_t +OBJECT_IDENTIFIER_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}; + OBJECT_IDENTIFIER_t *st; + asn_oid_arc_t arcs[5]; + size_t arcs_len = asn_random_between(2, 5); + size_t i; + + (void)constraints; + + if(max_length < arcs_len) return result_skipped; + + if(*sptr) { + st = *sptr; + } else { + st = CALLOC(1, sizeof(*st)); + } + + arcs[0] = asn_random_between(0, 2); + arcs[1] = OBJECT_IDENTIFIER__biased_random_arc( + arcs[0] <= 1 ? 39 : (ASN_OID_ARC_MAX - 80)); + for(i = 2; i < arcs_len; i++) { + arcs[i] = OBJECT_IDENTIFIER__biased_random_arc(ASN_OID_ARC_MAX); + } + + if(OBJECT_IDENTIFIER_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/e2ap/lib/OBJECT_IDENTIFIER_xer.c b/e2ap/lib/OBJECT_IDENTIFIER_xer.c new file mode 100644 index 0000000..706e51a --- /dev/null +++ b/e2ap/lib/OBJECT_IDENTIFIER_xer.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +static enum xer_pbd_rval +OBJECT_IDENTIFIER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + OBJECT_IDENTIFIER_t *st = (OBJECT_IDENTIFIER_t *)sptr; + const char *chunk_end = (const char *)chunk_buf + chunk_size; + const char *endptr; + asn_oid_arc_t s_arcs[10]; + asn_oid_arc_t *arcs = s_arcs; + ssize_t num_arcs; + ssize_t 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 more than zero arcs */ + return XPBD_BROKEN_ENCODING; + } else if(num_arcs == 0) { + return XPBD_NOT_BODY_IGNORE; + } + (void)chunk_end; + 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(asn_oid_arc_t)); + 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 = OBJECT_IDENTIFIER_set_arcs(st, arcs, num_arcs); + if(arcs != s_arcs) FREEMEM(arcs); + + return ret ? XPBD_SYSTEM_FAILURE : XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +OBJECT_IDENTIFIER_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(OBJECT_IDENTIFIER_t), opt_mname, + buf_ptr, size, OBJECT_IDENTIFIER__xer_body_decode); +} + +asn_enc_rval_t +OBJECT_IDENTIFIER_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 OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) { + ASN__ENCODE_FAILED; + } + + er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2ap/lib/OCTET_STRING.c b/e2ap/lib/OCTET_STRING.c index ae34c96..d0bdead 100644 --- a/e2ap/lib/OCTET_STRING.c +++ b/e2ap/lib/OCTET_STRING.c @@ -5,2088 +5,105 @@ */ #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_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 + 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, + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */ +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer, #else - OCTET_STRING_decode_oer, - OCTET_STRING_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, /* Unaligned PER decoder */ + OCTET_STRING_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OCTET_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_no_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs }; -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) { @@ -2094,18 +111,29 @@ OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, 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); - } +#if !defined(ASN_DISABLE_BER_SUPPORT) + const asn_OCTET_STRING_specifics_t *specs; + asn_struct_ctx_t *ctx; + + 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); + + /* + * Remove decode-time stack. + */ + struct _stack *stck; + stck = (struct _stack *)ctx->ptr; + if(stck) { + while(stck->tail) { + struct _stack_el *sel = stck->tail; + stck->tail = sel->prev; + FREEMEM(sel); + } + FREEMEM(stck); + } +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ switch(method) { case ASFM_FREE_EVERYTHING: @@ -2191,6 +219,7 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const OCTET_STRING_t *a = aptr; const OCTET_STRING_t *b = bptr; + (void)specs; assert(!specs || specs->subvariant != ASN_OSUBV_BIT); if(a && b) { @@ -2218,194 +247,137 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, } -/* - * 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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ } - 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); + 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; } - } else { - rnd_len = asn_random_between(0, max_length); } - } else if(rnd_len > max_length) { - rnd_len = asn_random_between(0, max_length); + return 0; } - 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; + /* 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); } - 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; + 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; } } - 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]; + return 0; +} - 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; +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; } - *(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; - } + /* 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); } - st->buf = buf; - st->size = unit_bytes * rnd_len; + 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; + } - result_ok.length = st->size; - return result_ok; + return 0; } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ diff --git a/e2ap/lib/OCTET_STRING_aper.c b/e2ap/lib/OCTET_STRING_aper.c new file mode 100644 index 0000000..0373fe6 --- /dev/null +++ b/e2ap/lib/OCTET_STRING_aper.c @@ -0,0 +1,414 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +#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_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_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 %lld .. %lld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + (long long int)csiz->lower_bound, (long long int)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; + /* X.691 #16 NOTE 1 for fixed length (<= 16 bits) strings */ + if (st->size > 2 || csiz->range_bits != 0) { + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + if(bpc) { + ASN_DEBUG("Decoding OCTET STRING size %lld", + (long long int)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 %lld", + (long long int)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; + + repeat = 0; + /* Get the PER length */ + if (csiz->upper_bound - csiz->lower_bound == 0) + /* Indefinite length case */ + raw_len = aper_get_length(pd, -1, -1, csiz->effective_bits, &repeat); + else + raw_len = aper_get_length(pd, csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, &repeat); + 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); + + /* X.691 #16 NOTE 1 for fixed length (<=16 bits) strings */ + if ((raw_len > 2) || (csiz->upper_bound > 2) || (csiz->range_bits != 0)) + { + 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" + " (%lld..%lld, effective %d)%s", + td->name, sizeinunits, unit_bits, + (long long int)csiz->lower_bound, + (long long int)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 %zu bytes (%lld), length in %d bits", + st->size, (long long int)(sizeinunits - csiz->lower_bound), + csiz->effective_bits); + if (csiz->effective_bits > 0) { + ret = aper_put_length(po, csiz->lower_bound, csiz->upper_bound, + sizeinunits - csiz->lower_bound, NULL); + if(ret < 0) ASN__ENCODE_FAILED; + } + if (csiz->effective_bits > 0 || (st->size > 2) + || (csiz->upper_bound > (2 * 8 / unit_bits)) + || (csiz->range_bits != 0)) + { /* X.691 #16 NOTE 1 for fixed length (<=16 bits) strings*/ + 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 %zu bytes", st->size); + + if(sizeinunits == 0) { + if(aper_put_length(po, -1, -1, 0, NULL) < 0) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + buf = st->buf; + while(sizeinunits) { + int need_eom = 0; + ssize_t maySave = aper_put_length(po, -1, -1, sizeinunits, &need_eom); + + 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); + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } + + ASN__ENCODED_OK(er); +} diff --git a/e2ap/lib/OCTET_STRING_ber.c b/e2ap/lib/OCTET_STRING_ber.c new file mode 100644 index 0000000..9530eae --- /dev/null +++ b/e2ap/lib/OCTET_STRING_ber.c @@ -0,0 +1,525 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +#undef _CH_PHASE +#define _CH_PHASE(ctx, inc) do {\ + if(ctx->phase == 0)\ + ctx->context = 0;\ + ctx->phase += inc;\ + } while(0) + +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1) +#undef PREV_PHASE +#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 acquired skill everywhere afterwards. + * No, I am not going to explain what the following stuff is. + */ +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; +} diff --git a/e2ap/lib/OCTET_STRING_jer.c b/e2ap/lib/OCTET_STRING_jer.c new file mode 100644 index 0000000..d744cc3 --- /dev/null +++ b/e2ap/lib/OCTET_STRING_jer.c @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +asn_enc_rval_t +OCTET_STRING_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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; + ASN__CALLBACK("\"", 1); + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + ASN__CALLBACK(scratch, p-scratch); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + } + if(p - scratch) { + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + } + ASN__CALLBACK("\"", 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +static const struct OCTET_STRING__jer_escape_table_s { + const char *string; + int size; +} OCTET_STRING__jer_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"), /* > */ +}; + +asn_enc_rval_t +OCTET_STRING_encode_jer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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__jer_escape_table) + / sizeof(OCTET_STRING__jer_escape_table[0]) + && (s_len = OCTET_STRING__jer_escape_table[ch].size)) { + if(((buf - ss) && cb(ss, buf - ss, app_key) < 0) + || cb(OCTET_STRING__jer_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); +} + diff --git a/e2ap/lib/OCTET_STRING_oer.c b/e2ap/lib/OCTET_STRING_oer.c index c16faea..e69d0a6 100644 --- a/e2ap/lib/OCTET_STRING_oer.c +++ b/e2ap/lib/OCTET_STRING_oer.c @@ -3,11 +3,8 @@ * 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, @@ -167,5 +164,3 @@ OCTET_STRING_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/OCTET_STRING_print.c b/e2ap/lib/OCTET_STRING_print.c new file mode 100644 index 0000000..6daa33e --- /dev/null +++ b/e2ap/lib/OCTET_STRING_print.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 == NULL)? NULL : 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; + } +} diff --git a/e2ap/lib/OCTET_STRING_rfill.c b/e2ap/lib/OCTET_STRING_rfill.c new file mode 100644 index 0000000..5c8b064 --- /dev/null +++ b/e2ap/lib/OCTET_STRING_rfill.c @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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); + } +} + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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; + } + } +#else + if(!constraints) constraints = &td->encoding_constraints; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + + 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; +} + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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 { +#else + if(!constraints) constraints = &td->encoding_constraints; + { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + if(rnd_len > max_length) { + rnd_len = asn_random_between(0, max_length); + } + } + + return rnd_len; +} diff --git a/e2ap/lib/OCTET_STRING_uper.c b/e2ap/lib/OCTET_STRING_uper.c new file mode 100644 index 0000000..80130ca --- /dev/null +++ b/e2ap/lib/OCTET_STRING_uper.c @@ -0,0 +1,319 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +#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_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); +} diff --git a/e2ap/lib/OCTET_STRING_xer.c b/e2ap/lib/OCTET_STRING_xer.c new file mode 100644 index 0000000..490f362 --- /dev/null +++ b/e2ap/lib/OCTET_STRING_xer.c @@ -0,0 +1,627 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +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 == NULL)? NULL : 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); +} diff --git a/e2ap/lib/OPEN_TYPE.c b/e2ap/lib/OPEN_TYPE.c index a54e99c..c9afecf 100644 --- a/e2ap/lib/OPEN_TYPE.c +++ b/e2ap/lib/OPEN_TYPE.c @@ -5,505 +5,59 @@ #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 */ + OPEN_TYPE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OPEN_TYPE_print, #else - OPEN_TYPE_decode_oer, - OPEN_TYPE_encode_oer, -#endif -#ifdef ASN_DISABLE_PER_SUPPORT - 0, 0, 0, 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OPEN_TYPE_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OPEN_TYPE_decode_ber, + OPEN_TYPE_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OPEN_TYPE_decode_xer, + OPEN_TYPE_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OPEN_TYPE_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OPEN_TYPE_decode_oer, + OPEN_TYPE_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OPEN_TYPE_decode_uper, + OPEN_TYPE_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OPEN_TYPE_decode_aper, + OPEN_TYPE_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + 0, /* Random fill is not supported for open type */ +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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/e2ap/lib/OPEN_TYPE_aper.c b/e2ap/lib/OPEN_TYPE_aper.c new file mode 100644 index 0000000..3e2ab18 --- /dev/null +++ b/e2ap/lib/OPEN_TYPE_aper.c @@ -0,0 +1,173 @@ +/* + * 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_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); +} + + +int OPEN_TYPE_aper_is_unknown_type(const asn_TYPE_descriptor_t *td, void *sptr, const asn_TYPE_member_t *elm) { + asn_type_selector_result_t selected; + + if(!elm->type_selector) { + return 1; + } + else { + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + return 1; + } + } + return 0; +} + +asn_dec_rval_t +OPEN_TYPE_aper_unknown_type_discard_bytes (asn_per_data_t *pd) { +#define ASN_DUMMY_BYTES 256 + unsigned char dummy[ASN_DUMMY_BYTES], *dummy_ptr = NULL; + ssize_t bytes; + int repeat; + asn_dec_rval_t rv; + + rv.consumed = 0; + rv.code = RC_FAIL; + + do { + bytes = aper_get_length(pd, -1, -1, -1, &repeat); + if (bytes > 10 * ASN_DUMMY_BYTES) + { + return rv; + } + else if (bytes > ASN_DUMMY_BYTES) + { + dummy_ptr = CALLOC(1, bytes); + if (!dummy_ptr) + return rv; + } + + per_get_many_bits(pd, (dummy_ptr ? dummy_ptr : dummy), 0, bytes << 3); + + if (dummy_ptr) + { + FREEMEM(dummy_ptr); + dummy_ptr = NULL; + } + } while (repeat); + + rv.code = RC_OK; + return rv; +#undef ASN_DUMMY_BYTES +} diff --git a/e2ap/lib/OPEN_TYPE_ber.c b/e2ap/lib/OPEN_TYPE_ber.c new file mode 100644 index 0000000..7d89480 --- /dev/null +++ b/e2ap/lib/OPEN_TYPE_ber.c @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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; +} diff --git a/e2ap/lib/OPEN_TYPE_oer.c b/e2ap/lib/OPEN_TYPE_oer.c index dd2f5c6..05a5eaa 100644 --- a/e2ap/lib/OPEN_TYPE_oer.c +++ b/e2ap/lib/OPEN_TYPE_oer.c @@ -5,7 +5,6 @@ #include #include #include -#include asn_dec_rval_t OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, diff --git a/e2ap/lib/OPEN_TYPE_uper.c b/e2ap/lib/OPEN_TYPE_uper.c new file mode 100644 index 0000000..2f27bb9 --- /dev/null +++ b/e2ap/lib/OPEN_TYPE_uper.c @@ -0,0 +1,119 @@ +/* + * 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_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); +} diff --git a/e2ap/lib/OPEN_TYPE_xer.c b/e2ap/lib/OPEN_TYPE_xer.c new file mode 100644 index 0000000..fc38562 --- /dev/null +++ b/e2ap/lib/OPEN_TYPE_xer.c @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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; +} diff --git a/e2ap/lib/ObjectDescriptor.c b/e2ap/lib/ObjectDescriptor.c new file mode 100644 index 0000000..c311a92 --- /dev/null +++ b/e2ap/lib/ObjectDescriptor.c @@ -0,0 +1,91 @@ +/*- + * 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, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print_utf8, /* Treat as ASCII subset (it's not) */ +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer_utf8, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, + 0, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + 0, /* Not supported for ObjectDescriptor */ +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_unknown_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; diff --git a/e2ap/lib/PLMN-Identity.c b/e2ap/lib/PLMN-Identity.c index 24f3043..9b4453e 100644 --- a/e2ap/lib/PLMN-Identity.c +++ b/e2ap/lib/PLMN-Identity.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "PLMN-Identity.h" @@ -22,7 +22,7 @@ PLMN_Identity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 3)) { + if((size == 3UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,14 +37,18 @@ PLMN_Identity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_PLMN_Identity_constr_1 CC_NOTUSED = { { 0, 0 }, 3 /* (SIZE(3..3)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_PLMN_Identity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -58,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_PLMN_Identity = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_PLMN_Identity_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_PLMN_Identity_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + PLMN_Identity_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/Presence.c b/e2ap/lib/Presence.c index c32f9e0..747f053 100644 --- a/e2ap/lib/Presence.c +++ b/e2ap/lib/Presence.c @@ -1,8 +1,8 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "Presence.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_Presence_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_Presence_value2enum_1[] = { { 0, 8, "optional" }, { 1, 11, "conditional" }, @@ -51,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_Presence = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Presence_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Presence_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_Presence_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/PrintableString.c b/e2ap/lib/PrintableString.c new file mode 100644 index 0000000..f046f12 --- /dev/null +++ b/e2ap/lib/PrintableString.c @@ -0,0 +1,165 @@ +/*- + * 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 */ +}; +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_operation_t asn_OP_PrintableString = { + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print_utf8, /* ASCII subset */ +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer_utf8, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OCTET_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_DEF_PrintableString_per_constraints, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2ap/lib/ProcedureCode.c b/e2ap/lib/ProcedureCode.c index 8678080..cf2d437 100644 --- a/e2ap/lib/ProcedureCode.c +++ b/e2ap/lib/ProcedureCode.c @@ -1,8 +1,8 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProcedureCode.h" @@ -21,7 +21,7 @@ ProcedureCode_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 255)) { + if((value >= 0L && value <= 255L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,14 +36,18 @@ ProcedureCode_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_ProcedureCode_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_ProcedureCode_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -57,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_ProcedureCode = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProcedureCode_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProcedureCode_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + ProcedureCode_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/ProtocolIE-Container.c b/e2ap/lib/ProtocolIE-Container.c index 05014c6..174d4da 100644 --- a/e2ap/lib/ProtocolIE-Container.c +++ b/e2ap/lib/ProtocolIE-Container.c @@ -1,870 +1,1711 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-Container.h" #include "ProtocolIE-Field.h" -static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_87P0_constr_1 CC_NOTUSED = { +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P0_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P0_constr_1 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P0_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P1_constr_3 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P1_constr_3 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P1_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P2_constr_5 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P2_constr_5 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P2_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P3_constr_7 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P3_constr_7 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P3_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P4_constr_9 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P4_constr_9 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P4_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P5_constr_11 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P5_constr_11 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P5_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P6_constr_13 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P6_constr_13 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P6_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P7_constr_15 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P7_constr_15 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P7_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P8_constr_17 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P8_constr_17 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P8_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P9_constr_19 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P9_constr_19 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P9_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P10_constr_21 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P10_constr_21 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P10_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P11_constr_23 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P11_constr_23 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P11_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P12_constr_25 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P12_constr_25 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P12_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P13_constr_27 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P13_constr_27 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P13_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P14_constr_29 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P14_constr_29 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P14_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P15_constr_31 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P15_constr_31 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P15_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P16_constr_33 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P16_constr_33 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P16_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P17_constr_35 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P17_constr_35 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P17_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P18_constr_37 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P18_constr_37 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P18_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 = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P19_constr_39 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; -asn_per_constraints_t asn_PER_type_ProtocolIE_Container_87P19_constr_39 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P19_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[] = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P20_constr_41 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P20_constr_41 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P21_constr_43 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P21_constr_43 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P22_constr_45 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P22_constr_45 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P23_constr_47 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P23_constr_47 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P24_constr_49 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P24_constr_49 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P25_constr_51 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P25_constr_51 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ProtocolIE_Container_85P26_constr_53 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_ProtocolIE_Container_85P26_constr_53 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P0_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICsubscriptionRequest_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P0_tags_1[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P0_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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P0_specs_1 = { + sizeof(struct ProtocolIE_Container_85P0), + offsetof(struct ProtocolIE_Container_85P0, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P0 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P0 = { "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, + asn_DEF_ProtocolIE_Container_85P0_tags_1, + sizeof(asn_DEF_ProtocolIE_Container_85P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_Container_85P0_tags_1[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P0_tags_1, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_Container_85P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P0_1, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P0_specs_1 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P0_specs_1 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P1_3[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P1_3[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICsubscriptionResponse_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P1_tags_3[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P1_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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P1_specs_3 = { + sizeof(struct ProtocolIE_Container_85P1), + offsetof(struct ProtocolIE_Container_85P1, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P1 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P1 = { "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, + asn_DEF_ProtocolIE_Container_85P1_tags_3, + sizeof(asn_DEF_ProtocolIE_Container_85P1_tags_3) + /sizeof(asn_DEF_ProtocolIE_Container_85P1_tags_3[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P1_tags_3, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P1_tags_3) + /sizeof(asn_DEF_ProtocolIE_Container_85P1_tags_3[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P1_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P1_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P1_3, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P1_specs_3 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P1_specs_3 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P2_5[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P2_5[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICsubscriptionFailure_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P2_tags_5[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P2_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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P2_specs_5 = { + sizeof(struct ProtocolIE_Container_85P2), + offsetof(struct ProtocolIE_Container_85P2, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P2 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P2 = { "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, + asn_DEF_ProtocolIE_Container_85P2_tags_5, + sizeof(asn_DEF_ProtocolIE_Container_85P2_tags_5) + /sizeof(asn_DEF_ProtocolIE_Container_85P2_tags_5[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P2_tags_5, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P2_tags_5) + /sizeof(asn_DEF_ProtocolIE_Container_85P2_tags_5[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P2_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P2_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P2_5, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P2_specs_5 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P2_specs_5 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P3_7[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P3_7[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICsubscriptionDeleteRequest_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P3_tags_7[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P3_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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P3_specs_7 = { + sizeof(struct ProtocolIE_Container_85P3), + offsetof(struct ProtocolIE_Container_85P3, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P3 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P3 = { "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, + asn_DEF_ProtocolIE_Container_85P3_tags_7, + sizeof(asn_DEF_ProtocolIE_Container_85P3_tags_7) + /sizeof(asn_DEF_ProtocolIE_Container_85P3_tags_7[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P3_tags_7, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P3_tags_7) + /sizeof(asn_DEF_ProtocolIE_Container_85P3_tags_7[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P3_constr_7, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P3_constr_7, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P3_7, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P3_specs_7 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P3_specs_7 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P4_9[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P4_9[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICsubscriptionDeleteResponse_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P4_tags_9[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P4_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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P4_specs_9 = { + sizeof(struct ProtocolIE_Container_85P4), + offsetof(struct ProtocolIE_Container_85P4, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P4 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P4 = { "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, + asn_DEF_ProtocolIE_Container_85P4_tags_9, + sizeof(asn_DEF_ProtocolIE_Container_85P4_tags_9) + /sizeof(asn_DEF_ProtocolIE_Container_85P4_tags_9[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P4_tags_9, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P4_tags_9) + /sizeof(asn_DEF_ProtocolIE_Container_85P4_tags_9[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P4_constr_9, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P4_constr_9, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P4_9, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P4_specs_9 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P4_specs_9 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P5_11[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P5_11[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICsubscriptionDeleteFailure_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P5_tags_11[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P5_specs_11 = { + sizeof(struct ProtocolIE_Container_85P5), + offsetof(struct ProtocolIE_Container_85P5, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P5 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_85P5_tags_11, + sizeof(asn_DEF_ProtocolIE_Container_85P5_tags_11) + /sizeof(asn_DEF_ProtocolIE_Container_85P5_tags_11[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P5_tags_11, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P5_tags_11) + /sizeof(asn_DEF_ProtocolIE_Container_85P5_tags_11[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P5_constr_11, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P5_constr_11, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P5_11, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_85P5_specs_11 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P6_13[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscriptionDeleteRequired_IEs, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P5_tags_11[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P6_tags_13[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P6_specs_13 = { + sizeof(struct ProtocolIE_Container_85P6), + offsetof(struct ProtocolIE_Container_85P6, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P5 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P6 = { "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, + asn_DEF_ProtocolIE_Container_85P6_tags_13, + sizeof(asn_DEF_ProtocolIE_Container_85P6_tags_13) + /sizeof(asn_DEF_ProtocolIE_Container_85P6_tags_13[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P6_tags_13, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P6_tags_13) + /sizeof(asn_DEF_ProtocolIE_Container_85P6_tags_13[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P6_constr_13, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P6_constr_13, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P6_13, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P5_specs_11 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P6_specs_13 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P6_13[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P7_15[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICindication_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P6_tags_13[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P7_tags_15[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P7_specs_15 = { + sizeof(struct ProtocolIE_Container_85P7), + offsetof(struct ProtocolIE_Container_85P7, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P6 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P7 = { "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, + asn_DEF_ProtocolIE_Container_85P7_tags_15, + sizeof(asn_DEF_ProtocolIE_Container_85P7_tags_15) + /sizeof(asn_DEF_ProtocolIE_Container_85P7_tags_15[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P7_tags_15, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P7_tags_15) + /sizeof(asn_DEF_ProtocolIE_Container_85P7_tags_15[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P7_constr_15, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P7_constr_15, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P7_15, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P6_specs_13 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P7_specs_15 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P7_15[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P8_17[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICcontrolRequest_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P7_tags_15[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P8_tags_17[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P8_specs_17 = { + sizeof(struct ProtocolIE_Container_85P8), + offsetof(struct ProtocolIE_Container_85P8, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P7 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P8 = { "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, + asn_DEF_ProtocolIE_Container_85P8_tags_17, + sizeof(asn_DEF_ProtocolIE_Container_85P8_tags_17) + /sizeof(asn_DEF_ProtocolIE_Container_85P8_tags_17[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P8_tags_17, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P8_tags_17) + /sizeof(asn_DEF_ProtocolIE_Container_85P8_tags_17[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P8_constr_17, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P8_constr_17, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P8_17, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P7_specs_15 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P8_specs_17 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P8_17[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P9_19[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICcontrolAcknowledge_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P8_tags_17[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P9_tags_19[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P9_specs_19 = { + sizeof(struct ProtocolIE_Container_85P9), + offsetof(struct ProtocolIE_Container_85P9, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P8 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P9 = { "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, + asn_DEF_ProtocolIE_Container_85P9_tags_19, + sizeof(asn_DEF_ProtocolIE_Container_85P9_tags_19) + /sizeof(asn_DEF_ProtocolIE_Container_85P9_tags_19[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P9_tags_19, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P9_tags_19) + /sizeof(asn_DEF_ProtocolIE_Container_85P9_tags_19[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P9_constr_19, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P9_constr_19, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P9_19, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P8_specs_17 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P9_specs_19 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P9_19[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P10_21[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICcontrolFailure_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P9_tags_19[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P10_tags_21[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P10_specs_21 = { + sizeof(struct ProtocolIE_Container_85P10), + offsetof(struct ProtocolIE_Container_85P10, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P9 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P10 = { "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, + asn_DEF_ProtocolIE_Container_85P10_tags_21, + sizeof(asn_DEF_ProtocolIE_Container_85P10_tags_21) + /sizeof(asn_DEF_ProtocolIE_Container_85P10_tags_21[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P10_tags_21, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P10_tags_21) + /sizeof(asn_DEF_ProtocolIE_Container_85P10_tags_21[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P10_constr_21, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P10_constr_21, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P10_21, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P9_specs_19 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P10_specs_21 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P10_21[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P11_23[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ErrorIndication_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P10_tags_21[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P11_tags_23[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P11_specs_23 = { + sizeof(struct ProtocolIE_Container_85P11), + offsetof(struct ProtocolIE_Container_85P11, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P10 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P11 = { "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, + asn_DEF_ProtocolIE_Container_85P11_tags_23, + sizeof(asn_DEF_ProtocolIE_Container_85P11_tags_23) + /sizeof(asn_DEF_ProtocolIE_Container_85P11_tags_23[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P11_tags_23, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P11_tags_23) + /sizeof(asn_DEF_ProtocolIE_Container_85P11_tags_23[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P11_constr_23, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P11_constr_23, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P11_23, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P10_specs_21 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P11_specs_23 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P11_23[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P12_25[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_E2setupRequestIEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P11_tags_23[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P12_tags_25[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P12_specs_25 = { + sizeof(struct ProtocolIE_Container_85P12), + offsetof(struct ProtocolIE_Container_85P12, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P11 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P12 = { "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, + asn_DEF_ProtocolIE_Container_85P12_tags_25, + sizeof(asn_DEF_ProtocolIE_Container_85P12_tags_25) + /sizeof(asn_DEF_ProtocolIE_Container_85P12_tags_25[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P12_tags_25, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P12_tags_25) + /sizeof(asn_DEF_ProtocolIE_Container_85P12_tags_25[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P12_constr_25, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P12_constr_25, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P12_25, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P11_specs_23 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P12_specs_25 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P12_25[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P13_27[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_E2setupResponseIEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P12_tags_25[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P13_tags_27[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P13_specs_27 = { + sizeof(struct ProtocolIE_Container_85P13), + offsetof(struct ProtocolIE_Container_85P13, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P12 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P13 = { "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, + asn_DEF_ProtocolIE_Container_85P13_tags_27, + sizeof(asn_DEF_ProtocolIE_Container_85P13_tags_27) + /sizeof(asn_DEF_ProtocolIE_Container_85P13_tags_27[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P13_tags_27, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P13_tags_27) + /sizeof(asn_DEF_ProtocolIE_Container_85P13_tags_27[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P13_constr_27, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P13_constr_27, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P13_27, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P12_specs_25 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P13_specs_27 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P13_27[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P14_29[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_E2setupFailureIEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P14_tags_29[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P14_specs_29 = { + sizeof(struct ProtocolIE_Container_85P14), + offsetof(struct ProtocolIE_Container_85P14, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P14 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_85P14_tags_29, + sizeof(asn_DEF_ProtocolIE_Container_85P14_tags_29) + /sizeof(asn_DEF_ProtocolIE_Container_85P14_tags_29[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P14_tags_29, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P14_tags_29) + /sizeof(asn_DEF_ProtocolIE_Container_85P14_tags_29[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P14_constr_29, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P14_constr_29, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P14_29, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_85P14_specs_29 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P15_31[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdate_IEs, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P13_tags_27[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P15_tags_31[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P15_specs_31 = { + sizeof(struct ProtocolIE_Container_85P15), + offsetof(struct ProtocolIE_Container_85P15, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P13 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P15 = { "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, + asn_DEF_ProtocolIE_Container_85P15_tags_31, + sizeof(asn_DEF_ProtocolIE_Container_85P15_tags_31) + /sizeof(asn_DEF_ProtocolIE_Container_85P15_tags_31[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P15_tags_31, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P15_tags_31) + /sizeof(asn_DEF_ProtocolIE_Container_85P15_tags_31[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P15_constr_31, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P15_constr_31, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P15_31, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P13_specs_27 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P15_specs_31 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P14_29[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P16_33[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdateAck_IEs, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P16_tags_33[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P16_specs_33 = { + sizeof(struct ProtocolIE_Container_85P16), + offsetof(struct ProtocolIE_Container_85P16, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P16 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_85P16_tags_33, + sizeof(asn_DEF_ProtocolIE_Container_85P16_tags_33) + /sizeof(asn_DEF_ProtocolIE_Container_85P16_tags_33[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P16_tags_33, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P16_tags_33) + /sizeof(asn_DEF_ProtocolIE_Container_85P16_tags_33[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P16_constr_33, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P16_constr_33, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P16_33, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_85P16_specs_33 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P17_35[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdateFailure_IEs, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P17_tags_35[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P17_specs_35 = { + sizeof(struct ProtocolIE_Container_85P17), + offsetof(struct ProtocolIE_Container_85P17, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P17 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_85P17_tags_35, + sizeof(asn_DEF_ProtocolIE_Container_85P17_tags_35) + /sizeof(asn_DEF_ProtocolIE_Container_85P17_tags_35[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P17_tags_35, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P17_tags_35) + /sizeof(asn_DEF_ProtocolIE_Container_85P17_tags_35[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P17_constr_35, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P17_constr_35, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P17_35, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_85P17_specs_35 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P18_37[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeConfigurationUpdate_IEs, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P18_tags_37[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P18_specs_37 = { + sizeof(struct ProtocolIE_Container_85P18), + offsetof(struct ProtocolIE_Container_85P18, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P18 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_85P18_tags_37, + sizeof(asn_DEF_ProtocolIE_Container_85P18_tags_37) + /sizeof(asn_DEF_ProtocolIE_Container_85P18_tags_37[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P18_tags_37, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P18_tags_37) + /sizeof(asn_DEF_ProtocolIE_Container_85P18_tags_37[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P18_constr_37, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P18_constr_37, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P18_37, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_85P18_specs_37 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P19_39[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P19_tags_39[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P19_specs_39 = { + sizeof(struct ProtocolIE_Container_85P19), + offsetof(struct ProtocolIE_Container_85P19, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P19 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_85P19_tags_39, + sizeof(asn_DEF_ProtocolIE_Container_85P19_tags_39) + /sizeof(asn_DEF_ProtocolIE_Container_85P19_tags_39[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P19_tags_39, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P19_tags_39) + /sizeof(asn_DEF_ProtocolIE_Container_85P19_tags_39[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P19_constr_39, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P19_constr_39, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P19_39, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_85P19_specs_39 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P20_41[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeConfigurationUpdateFailure_IEs, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P20_tags_41[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P20_specs_41 = { + sizeof(struct ProtocolIE_Container_85P20), + offsetof(struct ProtocolIE_Container_85P20, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P20 = { + "ProtocolIE-Container", + "ProtocolIE-Container", + &asn_OP_SEQUENCE_OF, + asn_DEF_ProtocolIE_Container_85P20_tags_41, + sizeof(asn_DEF_ProtocolIE_Container_85P20_tags_41) + /sizeof(asn_DEF_ProtocolIE_Container_85P20_tags_41[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P20_tags_41, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P20_tags_41) + /sizeof(asn_DEF_ProtocolIE_Container_85P20_tags_41[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P20_constr_41, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P20_constr_41, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P20_41, + 1, /* Single element */ + &asn_SPC_ProtocolIE_Container_85P20_specs_41 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P21_43[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ResetRequestIEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P14_tags_29[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P21_tags_43[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P21_specs_43 = { + sizeof(struct ProtocolIE_Container_85P21), + offsetof(struct ProtocolIE_Container_85P21, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P14 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P21 = { "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, + asn_DEF_ProtocolIE_Container_85P21_tags_43, + sizeof(asn_DEF_ProtocolIE_Container_85P21_tags_43) + /sizeof(asn_DEF_ProtocolIE_Container_85P21_tags_43[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P21_tags_43, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P21_tags_43) + /sizeof(asn_DEF_ProtocolIE_Container_85P21_tags_43[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P21_constr_43, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P21_constr_43, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P21_43, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P14_specs_29 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P21_specs_43 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P15_31[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P22_45[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ResetResponseIEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P15_tags_31[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P22_tags_45[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P22_specs_45 = { + sizeof(struct ProtocolIE_Container_85P22), + offsetof(struct ProtocolIE_Container_85P22, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P15 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P22 = { "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, + asn_DEF_ProtocolIE_Container_85P22_tags_45, + sizeof(asn_DEF_ProtocolIE_Container_85P22_tags_45) + /sizeof(asn_DEF_ProtocolIE_Container_85P22_tags_45[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P22_tags_45, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P22_tags_45) + /sizeof(asn_DEF_ProtocolIE_Container_85P22_tags_45[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P22_constr_45, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P22_constr_45, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P22_45, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P15_specs_31 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P22_specs_45 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P16_33[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P23_47[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICserviceUpdate_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P16_tags_33[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P23_tags_47[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P23_specs_47 = { + sizeof(struct ProtocolIE_Container_85P23), + offsetof(struct ProtocolIE_Container_85P23, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P16 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P23 = { "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, + asn_DEF_ProtocolIE_Container_85P23_tags_47, + sizeof(asn_DEF_ProtocolIE_Container_85P23_tags_47) + /sizeof(asn_DEF_ProtocolIE_Container_85P23_tags_47[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P23_tags_47, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P23_tags_47) + /sizeof(asn_DEF_ProtocolIE_Container_85P23_tags_47[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P23_constr_47, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P23_constr_47, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P23_47, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P16_specs_33 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P23_specs_47 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P17_35[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P24_49[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICserviceUpdateAcknowledge_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P17_tags_35[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P24_tags_49[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P24_specs_49 = { + sizeof(struct ProtocolIE_Container_85P24), + offsetof(struct ProtocolIE_Container_85P24, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P17 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P24 = { "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, + asn_DEF_ProtocolIE_Container_85P24_tags_49, + sizeof(asn_DEF_ProtocolIE_Container_85P24_tags_49) + /sizeof(asn_DEF_ProtocolIE_Container_85P24_tags_49[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P24_tags_49, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P24_tags_49) + /sizeof(asn_DEF_ProtocolIE_Container_85P24_tags_49[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P24_constr_49, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P24_constr_49, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P24_49, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P17_specs_35 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P24_specs_49 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P18_37[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P25_51[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICserviceUpdateFailure_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P18_tags_37[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P25_tags_51[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P25_specs_51 = { + sizeof(struct ProtocolIE_Container_85P25), + offsetof(struct ProtocolIE_Container_85P25, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P18 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P25 = { "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, + asn_DEF_ProtocolIE_Container_85P25_tags_51, + sizeof(asn_DEF_ProtocolIE_Container_85P25_tags_51) + /sizeof(asn_DEF_ProtocolIE_Container_85P25_tags_51[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P25_tags_51, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P25_tags_51) + /sizeof(asn_DEF_ProtocolIE_Container_85P25_tags_51[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P25_constr_51, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P25_constr_51, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P25_51, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P18_specs_37 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P25_specs_51 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ProtocolIE_Container_87P19_39[] = { +asn_TYPE_member_t asn_MBR_ProtocolIE_Container_85P26_53[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICserviceQuery_IEs, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_87P19_tags_39[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_85P26_tags_53[] = { (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), +asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_85P26_specs_53 = { + sizeof(struct ProtocolIE_Container_85P26), + offsetof(struct ProtocolIE_Container_85P26, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_87P19 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_85P26 = { "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, + asn_DEF_ProtocolIE_Container_85P26_tags_53, + sizeof(asn_DEF_ProtocolIE_Container_85P26_tags_53) + /sizeof(asn_DEF_ProtocolIE_Container_85P26_tags_53[0]), /* 1 */ + asn_DEF_ProtocolIE_Container_85P26_tags_53, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_Container_85P26_tags_53) + /sizeof(asn_DEF_ProtocolIE_Container_85P26_tags_53[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_Container_85P26_constr_53, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_Container_85P26_constr_53, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_ProtocolIE_Container_85P26_53, 1, /* Single element */ - &asn_SPC_ProtocolIE_Container_87P19_specs_39 /* Additional specs */ + &asn_SPC_ProtocolIE_Container_85P26_specs_53 /* Additional specs */ }; diff --git a/e2ap/lib/ProtocolIE-ContainerList.c b/e2ap/lib/ProtocolIE-ContainerList.c index b43b010..8a589a0 100644 --- a/e2ap/lib/ProtocolIE-ContainerList.c +++ b/e2ap/lib/ProtocolIE-ContainerList.c @@ -1,8 +1,8 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-ContainerList.h" diff --git a/e2ap/lib/ProtocolIE-ContainerPair.c b/e2ap/lib/ProtocolIE-ContainerPair.c index 0bf1a47..f5812cf 100644 --- a/e2ap/lib/ProtocolIE-ContainerPair.c +++ b/e2ap/lib/ProtocolIE-ContainerPair.c @@ -1,8 +1,8 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-ContainerPair.h" diff --git a/e2ap/lib/ProtocolIE-ContainerPairList.c b/e2ap/lib/ProtocolIE-ContainerPairList.c index dba4ec4..cbffc34 100644 --- a/e2ap/lib/ProtocolIE-ContainerPairList.c +++ b/e2ap/lib/ProtocolIE-ContainerPairList.c @@ -1,8 +1,8 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-ContainerPairList.h" diff --git a/e2ap/lib/ProtocolIE-Field.c b/e2ap/lib/ProtocolIE-Field.c index 80336e8..6b912ac 100644 --- a/e2ap/lib/ProtocolIE-Field.c +++ b/e2ap/lib/ProtocolIE-Field.c @@ -1,8 +1,8 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-Field.h" @@ -43,38 +43,170 @@ static const asn_ioc_cell_t asn_IOS_RICaction_NotAdmitted_ItemIEs_1_rows[] = { 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 long asn_VAL_24_id_RICsubscription_withCause_Item = 51; +static const long asn_VAL_24_ignore = 1; +static const long asn_VAL_24_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_RICsubscription_withCause_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_24_id_RICsubscription_withCause_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_24_ignore }, + { "&Value", aioc__type, &asn_DEF_RICsubscription_withCause_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_24_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICsubscription_withCause_ItemIEs_1[] = { + { 1, 4, asn_IOS_RICsubscription_withCause_ItemIEs_1_rows } +}; +static const long asn_VAL_71_id_E2connectionUpdate_Item = 43; +static const long asn_VAL_71_ignore = 1; +static const long asn_VAL_71_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2connectionUpdate_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_71_id_E2connectionUpdate_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_71_ignore }, + { "&Value", aioc__type, &asn_DEF_E2connectionUpdate_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_71_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2connectionUpdate_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2connectionUpdate_ItemIEs_1_rows } +}; +static const long asn_VAL_72_id_E2connectionUpdateRemove_Item = 47; +static const long asn_VAL_72_ignore = 1; +static const long asn_VAL_72_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2connectionUpdateRemove_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_72_id_E2connectionUpdateRemove_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_72_ignore }, + { "&Value", aioc__type, &asn_DEF_E2connectionUpdateRemove_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_72_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2connectionUpdateRemove_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2connectionUpdateRemove_ItemIEs_1_rows } +}; +static const long asn_VAL_76_id_E2connectionSetupFailed_Item = 41; +static const long asn_VAL_76_ignore = 1; +static const long asn_VAL_76_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2connectionSetupFailed_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_76_id_E2connectionSetupFailed_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_76_ignore }, + { "&Value", aioc__type, &asn_DEF_E2connectionSetupFailed_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_76_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2connectionSetupFailed_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2connectionSetupFailed_ItemIEs_1_rows } +}; +static const long asn_VAL_87_id_E2nodeComponentConfigAddition_Item = 51; +static const long asn_VAL_87_reject = 0; +static const long asn_VAL_87_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2nodeComponentConfigAddition_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_87_id_E2nodeComponentConfigAddition_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_87_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigAddition_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_87_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2nodeComponentConfigAddition_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2nodeComponentConfigAddition_ItemIEs_1_rows } +}; +static const long asn_VAL_88_id_E2nodeComponentConfigUpdate_Item = 34; +static const long asn_VAL_88_reject = 0; +static const long asn_VAL_88_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2nodeComponentConfigUpdate_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_88_id_E2nodeComponentConfigUpdate_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_88_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigUpdate_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_88_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2nodeComponentConfigUpdate_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2nodeComponentConfigUpdate_ItemIEs_1_rows } +}; +static const long asn_VAL_89_id_E2nodeComponentConfigRemoval_Item = 55; +static const long asn_VAL_89_reject = 0; +static const long asn_VAL_89_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2nodeComponentConfigRemoval_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_89_id_E2nodeComponentConfigRemoval_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_89_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigRemoval_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_89_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2nodeComponentConfigRemoval_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2nodeComponentConfigRemoval_ItemIEs_1_rows } +}; +static const long asn_VAL_90_id_E2nodeTNLassociationRemoval_Item = 59; +static const long asn_VAL_90_reject = 0; +static const long asn_VAL_90_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2nodeTNLassociationRemoval_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_90_id_E2nodeTNLassociationRemoval_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_90_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeTNLassociationRemoval_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_90_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2nodeTNLassociationRemoval_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2nodeTNLassociationRemoval_ItemIEs_1_rows } +}; +static const long asn_VAL_95_id_E2nodeComponentConfigAdditionAck_Item = 53; +static const long asn_VAL_95_reject = 0; +static const long asn_VAL_95_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2nodeComponentConfigAdditionAck_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_95_id_E2nodeComponentConfigAdditionAck_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_95_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigAdditionAck_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_95_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2nodeComponentConfigAdditionAck_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2nodeComponentConfigAdditionAck_ItemIEs_1_rows } +}; +static const long asn_VAL_96_id_E2nodeComponentConfigUpdateAck_Item = 36; +static const long asn_VAL_96_reject = 0; +static const long asn_VAL_96_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2nodeComponentConfigUpdateAck_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_96_id_E2nodeComponentConfigUpdateAck_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_96_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigUpdateAck_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_96_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2nodeComponentConfigUpdateAck_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2nodeComponentConfigUpdateAck_ItemIEs_1_rows } +}; +static const long asn_VAL_97_id_E2nodeComponentConfigRemovalAck_Item = 57; +static const long asn_VAL_97_reject = 0; +static const long asn_VAL_97_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2nodeComponentConfigRemovalAck_ItemIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_97_id_E2nodeComponentConfigRemovalAck_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_97_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigRemovalAck_Item }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_97_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2nodeComponentConfigRemovalAck_ItemIEs_1[] = { + { 1, 4, asn_IOS_E2nodeComponentConfigRemovalAck_ItemIEs_1_rows } +}; +static const long asn_VAL_110_id_RANfunction_Item = 8; +static const long asn_VAL_110_ignore = 1; +static const long asn_VAL_110_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_110_id_RANfunction_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_110_ignore }, { "&Value", aioc__type, &asn_DEF_RANfunction_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_64_mandatory } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_110_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 long asn_VAL_111_id_RANfunctionID_Item = 6; +static const long asn_VAL_111_ignore = 1; +static const long asn_VAL_111_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_111_id_RANfunctionID_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_111_ignore }, { "&Value", aioc__type, &asn_DEF_RANfunctionID_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_65_mandatory } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_111_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 long asn_VAL_115_id_RANfunctionIEcause_Item = 7; +static const long asn_VAL_115_ignore = 1; +static const long asn_VAL_115_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_115_id_RANfunctionIEcause_Item }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_115_ignore }, { "&Value", aioc__type, &asn_DEF_RANfunctionIDcause_Item }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_68_mandatory } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_115_mandatory } }; static const asn_ioc_set_t asn_IOS_RANfunctionIDcause_ItemIEs_1[] = { { 1, 4, asn_IOS_RANfunctionIDcause_ItemIEs_1_rows } @@ -144,7 +276,7 @@ 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_id_Cause = 1; 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; @@ -159,9 +291,9 @@ static const asn_ioc_cell_t asn_IOS_RICsubscriptionFailure_IEs_1_rows[] = { { "&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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_13_id_Cause }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_13_reject }, - { "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_List }, + { "&Value", aioc__type, &asn_DEF_Cause }, { "&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 }, @@ -242,404 +374,705 @@ static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteFailure_IEs_1_rows[] = 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_id_RICsubscriptionToBeRemoved = 50; +static const long asn_VAL_23_ignore = 1; 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 asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteRequired_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_23_id_RICsubscriptionToBeRemoved }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_23_ignore }, + { "&Value", aioc__type, &asn_DEF_RICsubscription_List_withCause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_23_mandatory } +}; +static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteRequired_IEs_1[] = { + { 1, 4, asn_IOS_RICsubscriptionDeleteRequired_IEs_1_rows } +}; +static const long asn_VAL_25_id_RICrequestID = 29; 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_id_RANfunctionID = 5; 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_26_mandatory = 2; +static const long asn_VAL_27_id_RICactionID = 15; 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_id_RICindicationSN = 27; 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_28_optional = 0; +static const long asn_VAL_29_id_RICindicationType = 28; 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_id_RICindicationHeader = 25; static const long asn_VAL_30_reject = 0; -static const long asn_VAL_30_optional = 0; +static const long asn_VAL_30_mandatory = 2; +static const long asn_VAL_31_id_RICindicationMessage = 26; +static const long asn_VAL_31_reject = 0; +static const long asn_VAL_31_mandatory = 2; +static const long asn_VAL_32_id_RICcallProcessID = 20; +static const long asn_VAL_32_reject = 0; +static const long asn_VAL_32_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_25_id_RICrequestID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_25_reject }, - { "&Value", aioc__type, &asn_DEF_RICactionID }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_25_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_26_id_RICindicationSN }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_26_id_RANfunctionID }, { "&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 }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_26_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_27_id_RICactionID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_27_reject }, - { "&Value", aioc__type, &asn_DEF_RICindicationType }, + { "&Value", aioc__type, &asn_DEF_RICactionID }, { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_27_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_28_id_RICindicationHeader }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_28_id_RICindicationSN }, { "&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 }, + { "&Value", aioc__type, &asn_DEF_RICindicationSN }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_28_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_29_id_RICindicationType }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_29_reject }, - { "&Value", aioc__type, &asn_DEF_RICindicationMessage }, + { "&Value", aioc__type, &asn_DEF_RICindicationType }, { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_29_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_30_id_RICcallProcessID }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_30_id_RICindicationHeader }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_30_reject }, + { "&Value", aioc__type, &asn_DEF_RICindicationHeader }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_30_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_31_id_RICindicationMessage }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_31_reject }, + { "&Value", aioc__type, &asn_DEF_RICindicationMessage }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_31_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_32_id_RICcallProcessID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_32_reject }, { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_30_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_32_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_id_RICrequestID = 29; 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_33_mandatory = 2; +static const long asn_VAL_34_id_RANfunctionID = 5; 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_id_RICcallProcessID = 20; 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_35_optional = 0; +static const long asn_VAL_36_id_RICcontrolHeader = 22; static const long asn_VAL_36_reject = 0; -static const long asn_VAL_36_optional = 0; +static const long asn_VAL_36_mandatory = 2; +static const long asn_VAL_37_id_RICcontrolMessage = 23; +static const long asn_VAL_37_reject = 0; +static const long asn_VAL_37_mandatory = 2; +static const long asn_VAL_38_id_RICcontrolAckRequest = 21; +static const long asn_VAL_38_reject = 0; +static const long asn_VAL_38_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_33_id_RICrequestID }, { "&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 }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_33_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_34_id_RANfunctionID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_34_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolHeader }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_34_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_35_id_RICcontrolMessage }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_35_id_RICcallProcessID }, { "&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 }, + { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_35_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_36_id_RICcontrolHeader }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_36_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolHeader }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_36_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_37_id_RICcontrolMessage }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_37_reject }, + { "&Value", aioc__type, &asn_DEF_RICcontrolMessage }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_37_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_38_id_RICcontrolAckRequest }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_38_reject }, { "&Value", aioc__type, &asn_DEF_RICcontrolAckRequest }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_36_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_38_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_id_RICrequestID = 29; 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_39_mandatory = 2; +static const long asn_VAL_40_id_RANfunctionID = 5; 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_id_RICcallProcessID = 20; static const long asn_VAL_41_reject = 0; static const long asn_VAL_41_optional = 0; +static const long asn_VAL_42_id_RICcontrolOutcome = 32; +static const long asn_VAL_42_reject = 0; +static const long asn_VAL_42_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_39_id_RICrequestID }, { "&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 }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_39_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_40_id_RANfunctionID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_40_reject }, - { "&Value", aioc__type, &asn_DEF_RICcontrolStatus }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_40_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_41_id_RICcontrolOutcome }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_41_id_RICcallProcessID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_41_reject }, + { "&Value", aioc__type, &asn_DEF_RICcallProcessID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_41_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_42_id_RICcontrolOutcome }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_42_reject }, { "&Value", aioc__type, &asn_DEF_RICcontrolOutcome }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_41_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_42_optional } }; static const asn_ioc_set_t asn_IOS_RICcontrolAcknowledge_IEs_1[] = { - { 5, 4, asn_IOS_RICcontrolAcknowledge_IEs_1_rows } + { 4, 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_id_RICrequestID = 29; 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_id_RANfunctionID = 5; 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 long asn_VAL_44_mandatory = 2; +static const long asn_VAL_45_id_RICcallProcessID = 20; +static const long asn_VAL_45_reject = 0; +static const long asn_VAL_45_optional = 0; +static const long asn_VAL_46_id_Cause = 1; +static const long asn_VAL_46_ignore = 1; +static const long asn_VAL_46_mandatory = 2; +static const long asn_VAL_47_id_RICcontrolOutcome = 32; +static const long asn_VAL_47_reject = 0; +static const long asn_VAL_47_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_43_id_RICrequestID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_43_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_43_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_44_id_RICcallProcessID }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_44_id_RANfunctionID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_44_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_44_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_45_id_RICcallProcessID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_45_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_45_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_46_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_46_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_46_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_47_id_RICcontrolOutcome }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_47_reject }, { "&Value", aioc__type, &asn_DEF_RICcontrolOutcome }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_46_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_47_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_id_TransactionID = 49; 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_id_RICrequestID = 29; +static const long asn_VAL_49_reject = 0; 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_id_RANfunctionID = 5; +static const long asn_VAL_50_reject = 0; static const long asn_VAL_50_optional = 0; +static const long asn_VAL_51_id_Cause = 1; +static const long asn_VAL_51_ignore = 1; +static const long asn_VAL_51_optional = 0; +static const long asn_VAL_52_id_CriticalityDiagnostics = 2; +static const long asn_VAL_52_ignore = 1; +static const long asn_VAL_52_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_48_id_TransactionID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_48_reject }, - { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, { "&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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_49_id_RICrequestID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_49_reject }, + { "&Value", aioc__type, &asn_DEF_RICrequestID }, { "&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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_50_id_RANfunctionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_50_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_50_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_51_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_51_ignore }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_51_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_52_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_52_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 asn_ioc_set_t asn_IOS_ErrorIndication_IEs_1[] = { + { 5, 4, asn_IOS_ErrorIndication_IEs_1_rows } }; -static const long asn_VAL_53_id_GlobalRIC_ID = 4; +static const long asn_VAL_53_id_TransactionID = 49; 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_id_GlobalE2node_ID = 3; 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_54_mandatory = 2; +static const long asn_VAL_55_id_RANfunctionsAdded = 10; 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 }, +static const long asn_VAL_55_mandatory = 2; +static const long asn_VAL_56_id_E2nodeComponentConfigAddition = 50; +static const long asn_VAL_56_reject = 0; +static const long asn_VAL_56_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2setupRequestIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_53_id_TransactionID }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_53_reject }, - { "&Value", aioc__type, &asn_DEF_GlobalRIC_ID }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_53_mandatory }, - { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_54_id_RANfunctionsAccepted }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_54_id_GlobalE2node_ID }, { "&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 }, + { "&Value", aioc__type, &asn_DEF_GlobalE2node_ID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_54_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_55_id_RANfunctionsAdded }, { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_55_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctions_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_55_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_56_id_E2nodeComponentConfigAddition }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_56_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigAddition_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_56_mandatory } +}; +static const asn_ioc_set_t asn_IOS_E2setupRequestIEs_1[] = { + { 4, 4, asn_IOS_E2setupRequestIEs_1_rows } +}; +static const long asn_VAL_57_id_TransactionID = 49; +static const long asn_VAL_57_reject = 0; +static const long asn_VAL_57_mandatory = 2; +static const long asn_VAL_58_id_GlobalRIC_ID = 4; +static const long asn_VAL_58_reject = 0; +static const long asn_VAL_58_mandatory = 2; +static const long asn_VAL_59_id_RANfunctionsAccepted = 9; +static const long asn_VAL_59_reject = 0; +static const long asn_VAL_59_optional = 0; +static const long asn_VAL_60_id_RANfunctionsRejected = 13; +static const long asn_VAL_60_reject = 0; +static const long asn_VAL_60_optional = 0; +static const long asn_VAL_61_id_E2nodeComponentConfigAdditionAck = 52; +static const long asn_VAL_61_reject = 0; +static const long asn_VAL_61_mandatory = 2; +static const asn_ioc_cell_t asn_IOS_E2setupResponseIEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_57_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_57_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_57_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_58_id_GlobalRIC_ID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_58_reject }, + { "&Value", aioc__type, &asn_DEF_GlobalRIC_ID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_58_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_59_id_RANfunctionsAccepted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_59_reject }, + { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_59_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_60_id_RANfunctionsRejected }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_60_reject }, { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_55_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_60_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_61_id_E2nodeComponentConfigAdditionAck }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_61_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigAdditionAck_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_61_mandatory } }; static const asn_ioc_set_t asn_IOS_E2setupResponseIEs_1[] = { - { 3, 4, asn_IOS_E2setupResponseIEs_1_rows } + { 5, 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 long asn_VAL_62_id_TransactionID = 49; +static const long asn_VAL_62_reject = 0; +static const long asn_VAL_62_mandatory = 2; +static const long asn_VAL_63_id_Cause = 1; +static const long asn_VAL_63_ignore = 1; +static const long asn_VAL_63_mandatory = 2; +static const long asn_VAL_64_id_TimeToWait = 31; +static const long asn_VAL_64_ignore = 1; +static const long asn_VAL_64_optional = 0; +static const long asn_VAL_65_id_CriticalityDiagnostics = 2; +static const long asn_VAL_65_ignore = 1; +static const long asn_VAL_65_optional = 0; +static const long asn_VAL_66_id_TNLinformation = 48; +static const long asn_VAL_66_ignore = 1; +static const long asn_VAL_66_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_62_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_62_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_62_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_63_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_63_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_63_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_64_id_TimeToWait }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_64_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_64_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_65_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_65_ignore }, { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_58_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_65_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_66_id_TNLinformation }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_66_ignore }, + { "&Value", aioc__type, &asn_DEF_TNLinformation }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_66_optional } }; static const asn_ioc_set_t asn_IOS_E2setupFailureIEs_1[] = { - { 3, 4, asn_IOS_E2setupFailureIEs_1_rows } + { 5, 4, asn_IOS_E2setupFailureIEs_1_rows } +}; +static const long asn_VAL_67_id_TransactionID = 49; +static const long asn_VAL_67_reject = 0; +static const long asn_VAL_67_mandatory = 2; +static const long asn_VAL_68_id_E2connectionUpdateAdd = 44; +static const long asn_VAL_68_reject = 0; +static const long asn_VAL_68_optional = 0; +static const long asn_VAL_69_id_E2connectionUpdateRemove = 46; +static const long asn_VAL_69_reject = 0; +static const long asn_VAL_69_optional = 0; +static const long asn_VAL_70_id_E2connectionUpdateModify = 45; +static const long asn_VAL_70_reject = 0; +static const long asn_VAL_70_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2connectionUpdate_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_67_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_67_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_67_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_68_id_E2connectionUpdateAdd }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_68_reject }, + { "&Value", aioc__type, &asn_DEF_E2connectionUpdate_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_68_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_69_id_E2connectionUpdateRemove }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_69_reject }, + { "&Value", aioc__type, &asn_DEF_E2connectionUpdateRemove_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_69_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_70_id_E2connectionUpdateModify }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_70_reject }, + { "&Value", aioc__type, &asn_DEF_E2connectionUpdate_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_70_optional } +}; +static const asn_ioc_set_t asn_IOS_E2connectionUpdate_IEs_1[] = { + { 4, 4, asn_IOS_E2connectionUpdate_IEs_1_rows } +}; +static const long asn_VAL_73_id_TransactionID = 49; +static const long asn_VAL_73_reject = 0; +static const long asn_VAL_73_mandatory = 2; +static const long asn_VAL_74_id_E2connectionSetup = 39; +static const long asn_VAL_74_reject = 0; +static const long asn_VAL_74_optional = 0; +static const long asn_VAL_75_id_E2connectionSetupFailed = 40; +static const long asn_VAL_75_reject = 0; +static const long asn_VAL_75_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2connectionUpdateAck_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_73_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_73_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_73_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_74_id_E2connectionSetup }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_74_reject }, + { "&Value", aioc__type, &asn_DEF_E2connectionUpdate_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_74_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_75_id_E2connectionSetupFailed }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_75_reject }, + { "&Value", aioc__type, &asn_DEF_E2connectionSetupFailed_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_75_optional } +}; +static const asn_ioc_set_t asn_IOS_E2connectionUpdateAck_IEs_1[] = { + { 3, 4, asn_IOS_E2connectionUpdateAck_IEs_1_rows } +}; +static const long asn_VAL_77_id_TransactionID = 49; +static const long asn_VAL_77_reject = 0; +static const long asn_VAL_77_mandatory = 2; +static const long asn_VAL_78_id_Cause = 1; +static const long asn_VAL_78_reject = 0; +static const long asn_VAL_78_optional = 0; +static const long asn_VAL_79_id_TimeToWait = 31; +static const long asn_VAL_79_ignore = 1; +static const long asn_VAL_79_optional = 0; +static const long asn_VAL_80_id_CriticalityDiagnostics = 2; +static const long asn_VAL_80_ignore = 1; +static const long asn_VAL_80_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2connectionUpdateFailure_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_77_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_77_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_77_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_78_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_78_reject }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_78_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_79_id_TimeToWait }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_79_ignore }, + { "&Value", aioc__type, &asn_DEF_TimeToWait }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_79_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_80_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_80_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_80_optional } +}; +static const asn_ioc_set_t asn_IOS_E2connectionUpdateFailure_IEs_1[] = { + { 4, 4, asn_IOS_E2connectionUpdateFailure_IEs_1_rows } +}; +static const long asn_VAL_81_id_TransactionID = 49; +static const long asn_VAL_81_reject = 0; +static const long asn_VAL_81_mandatory = 2; +static const long asn_VAL_82_id_GlobalE2node_ID = 3; +static const long asn_VAL_82_reject = 0; +static const long asn_VAL_82_optional = 0; +static const long asn_VAL_83_id_E2nodeComponentConfigAddition = 50; +static const long asn_VAL_83_reject = 0; +static const long asn_VAL_83_optional = 0; +static const long asn_VAL_84_id_E2nodeComponentConfigUpdate = 33; +static const long asn_VAL_84_reject = 0; +static const long asn_VAL_84_optional = 0; +static const long asn_VAL_85_id_E2nodeComponentConfigRemoval = 54; +static const long asn_VAL_85_reject = 0; +static const long asn_VAL_85_optional = 0; +static const long asn_VAL_86_id_E2nodeTNLassociationRemoval = 58; +static const long asn_VAL_86_reject = 0; +static const long asn_VAL_86_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2nodeConfigurationUpdate_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_81_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_81_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_81_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_82_id_GlobalE2node_ID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_82_reject }, + { "&Value", aioc__type, &asn_DEF_GlobalE2node_ID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_82_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_83_id_E2nodeComponentConfigAddition }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_83_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigAddition_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_83_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_84_id_E2nodeComponentConfigUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_84_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigUpdate_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_84_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_85_id_E2nodeComponentConfigRemoval }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_85_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigRemoval_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_85_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_86_id_E2nodeTNLassociationRemoval }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_86_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeTNLassociationRemoval_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_86_optional } +}; +static const asn_ioc_set_t asn_IOS_E2nodeConfigurationUpdate_IEs_1[] = { + { 6, 4, asn_IOS_E2nodeConfigurationUpdate_IEs_1_rows } +}; +static const long asn_VAL_91_id_TransactionID = 49; +static const long asn_VAL_91_reject = 0; +static const long asn_VAL_91_mandatory = 2; +static const long asn_VAL_92_id_E2nodeComponentConfigAdditionAck = 52; +static const long asn_VAL_92_reject = 0; +static const long asn_VAL_92_optional = 0; +static const long asn_VAL_93_id_E2nodeComponentConfigUpdateAck = 35; +static const long asn_VAL_93_reject = 0; +static const long asn_VAL_93_optional = 0; +static const long asn_VAL_94_id_E2nodeComponentConfigRemovalAck = 56; +static const long asn_VAL_94_reject = 0; +static const long asn_VAL_94_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2nodeConfigurationUpdateAcknowledge_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_91_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_91_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_91_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_92_id_E2nodeComponentConfigAdditionAck }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_92_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigAdditionAck_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_92_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_93_id_E2nodeComponentConfigUpdateAck }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_93_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigUpdateAck_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_93_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_94_id_E2nodeComponentConfigRemovalAck }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_94_reject }, + { "&Value", aioc__type, &asn_DEF_E2nodeComponentConfigRemovalAck_List }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_94_optional } +}; +static const asn_ioc_set_t asn_IOS_E2nodeConfigurationUpdateAcknowledge_IEs_1[] = { + { 4, 4, asn_IOS_E2nodeConfigurationUpdateAcknowledge_IEs_1_rows } +}; +static const long asn_VAL_98_id_TransactionID = 49; +static const long asn_VAL_98_reject = 0; +static const long asn_VAL_98_mandatory = 2; +static const long asn_VAL_99_id_Cause = 1; +static const long asn_VAL_99_ignore = 1; +static const long asn_VAL_99_mandatory = 2; +static const long asn_VAL_100_id_TimeToWait = 31; +static const long asn_VAL_100_ignore = 1; +static const long asn_VAL_100_optional = 0; +static const long asn_VAL_101_id_CriticalityDiagnostics = 2; +static const long asn_VAL_101_ignore = 1; +static const long asn_VAL_101_optional = 0; +static const asn_ioc_cell_t asn_IOS_E2nodeConfigurationUpdateFailure_IEs_1_rows[] = { + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_98_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_98_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_98_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_99_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_99_ignore }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_99_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_100_id_TimeToWait }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_100_ignore }, + { "&Value", aioc__type, &asn_DEF_TimeToWait }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_100_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_101_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_101_ignore }, + { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_101_optional } }; -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_set_t asn_IOS_E2nodeConfigurationUpdateFailure_IEs_1[] = { + { 4, 4, asn_IOS_E2nodeConfigurationUpdateFailure_IEs_1_rows } +}; +static const long asn_VAL_102_id_TransactionID = 49; +static const long asn_VAL_102_reject = 0; +static const long asn_VAL_102_mandatory = 2; +static const long asn_VAL_103_id_Cause = 1; +static const long asn_VAL_103_ignore = 1; +static const long asn_VAL_103_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_102_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_102_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_102_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_103_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_103_ignore }, { "&Value", aioc__type, &asn_DEF_Cause }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_59_mandatory } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_103_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; + { 2, 4, asn_IOS_ResetRequestIEs_1_rows } +}; +static const long asn_VAL_104_id_TransactionID = 49; +static const long asn_VAL_104_reject = 0; +static const long asn_VAL_104_mandatory = 2; +static const long asn_VAL_105_id_CriticalityDiagnostics = 2; +static const long asn_VAL_105_ignore = 1; +static const long asn_VAL_105_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_104_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_104_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_104_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_105_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_105_ignore }, { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_60_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_105_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; + { 2, 4, asn_IOS_ResetResponseIEs_1_rows } +}; +static const long asn_VAL_106_id_TransactionID = 49; +static const long asn_VAL_106_reject = 0; +static const long asn_VAL_106_mandatory = 2; +static const long asn_VAL_107_id_RANfunctionsAdded = 10; +static const long asn_VAL_107_reject = 0; +static const long asn_VAL_107_optional = 0; +static const long asn_VAL_108_id_RANfunctionsModified = 12; +static const long asn_VAL_108_reject = 0; +static const long asn_VAL_108_optional = 0; +static const long asn_VAL_109_id_RANfunctionsDeleted = 11; +static const long asn_VAL_109_reject = 0; +static const long asn_VAL_109_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_106_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_106_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_106_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_107_id_RANfunctionsAdded }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_107_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_107_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_108_id_RANfunctionsModified }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_108_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_108_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_109_id_RANfunctionsDeleted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_109_reject }, { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_63_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_109_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; + { 4, 4, asn_IOS_RICserviceUpdate_IEs_1_rows } +}; +static const long asn_VAL_112_id_TransactionID = 49; +static const long asn_VAL_112_reject = 0; +static const long asn_VAL_112_mandatory = 2; +static const long asn_VAL_113_id_RANfunctionsAccepted = 9; +static const long asn_VAL_113_reject = 0; +static const long asn_VAL_113_mandatory = 2; +static const long asn_VAL_114_id_RANfunctionsRejected = 13; +static const long asn_VAL_114_reject = 0; +static const long asn_VAL_114_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_112_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_112_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_112_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_113_id_RANfunctionsAccepted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_113_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_113_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_114_id_RANfunctionsRejected }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_114_reject }, { "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_67_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_114_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; + { 3, 4, asn_IOS_RICserviceUpdateAcknowledge_IEs_1_rows } +}; +static const long asn_VAL_116_id_TransactionID = 49; +static const long asn_VAL_116_reject = 0; +static const long asn_VAL_116_mandatory = 2; +static const long asn_VAL_117_id_Cause = 1; +static const long asn_VAL_117_reject = 0; +static const long asn_VAL_117_mandatory = 2; +static const long asn_VAL_118_id_TimeToWait = 31; +static const long asn_VAL_118_ignore = 1; +static const long asn_VAL_118_optional = 0; +static const long asn_VAL_119_id_CriticalityDiagnostics = 2; +static const long asn_VAL_119_ignore = 1; +static const long asn_VAL_119_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_116_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_116_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_116_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_117_id_Cause }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_117_reject }, + { "&Value", aioc__type, &asn_DEF_Cause }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_117_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_118_id_TimeToWait }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_118_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 }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_118_optional }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_119_id_CriticalityDiagnostics }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_119_ignore }, { "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_71_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_119_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; + { 4, 4, asn_IOS_RICserviceUpdateFailure_IEs_1_rows } +}; +static const long asn_VAL_120_id_TransactionID = 49; +static const long asn_VAL_120_reject = 0; +static const long asn_VAL_120_mandatory = 2; +static const long asn_VAL_121_id_RANfunctionsAccepted = 9; +static const long asn_VAL_121_reject = 0; +static const long asn_VAL_121_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 }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_120_id_TransactionID }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_120_reject }, + { "&Value", aioc__type, &asn_DEF_TransactionID }, + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_120_mandatory }, + { "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_121_id_RANfunctionsAccepted }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_121_reject }, { "&Value", aioc__type, &asn_DEF_RANfunctionsID_List }, - { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_72_optional } + { "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_121_optional } }; static const asn_ioc_set_t asn_IOS_RICserviceQuery_IEs_1[] = { - { 1, 4, asn_IOS_RICserviceQuery_IEs_1_rows } + { 2, 4, asn_IOS_RICserviceQuery_IEs_1_rows } }; static int memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, @@ -655,7 +1088,7 @@ memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -772,7 +1205,7 @@ memb_id_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -889,7 +1322,7 @@ memb_id_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1006,7 +1439,7 @@ memb_id_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1018,13 +1451,13 @@ memb_id_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RANfunction_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_RICsubscription_withCause_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; + const asn_ioc_set_t *itable = asn_IOS_RICsubscription_withCause_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscription_withCause_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]; @@ -1064,13 +1497,13 @@ memb_criticality_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RANfunction_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_RICsubscription_withCause_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; + const asn_ioc_set_t *itable = asn_IOS_RICsubscription_withCause_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscription_withCause_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]; @@ -1123,7 +1556,7 @@ memb_id_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1135,13 +1568,13 @@ memb_id_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RANfunctionID_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2connectionUpdate_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; + const asn_ioc_set_t *itable = asn_IOS_E2connectionUpdate_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2connectionUpdate_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]; @@ -1181,13 +1614,13 @@ memb_criticality_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RANfunctionID_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2connectionUpdate_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; + const asn_ioc_set_t *itable = asn_IOS_E2connectionUpdate_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2connectionUpdate_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]; @@ -1240,7 +1673,7 @@ memb_id_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1252,13 +1685,13 @@ memb_id_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RANfunctionIDcause_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2connectionUpdateRemove_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; + const asn_ioc_set_t *itable = asn_IOS_E2connectionUpdateRemove_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2connectionUpdateRemove_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]; @@ -1298,13 +1731,13 @@ memb_criticality_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RANfunctionIDcause_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2connectionUpdateRemove_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; + const asn_ioc_set_t *itable = asn_IOS_E2connectionUpdateRemove_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2connectionUpdateRemove_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]; @@ -1357,7 +1790,7 @@ memb_id_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1369,13 +1802,13 @@ memb_id_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICsubscriptionRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2connectionSetupFailed_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_RICsubscriptionRequest_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2connectionSetupFailed_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 RICsubscriptionRequest_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2connectionSetupFailed_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]; @@ -1415,13 +1848,13 @@ memb_criticality_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICsubscriptionRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2connectionSetupFailed_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_RICsubscriptionRequest_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2connectionSetupFailed_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 RICsubscriptionRequest_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2connectionSetupFailed_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]; @@ -1474,7 +1907,7 @@ memb_id_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1486,13 +1919,13 @@ memb_id_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICsubscriptionResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigAddition_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_RICsubscriptionResponse_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigAddition_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 RICsubscriptionResponse_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigAddition_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]; @@ -1532,13 +1965,13 @@ memb_criticality_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICsubscriptionResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigAddition_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_RICsubscriptionResponse_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigAddition_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 RICsubscriptionResponse_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigAddition_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]; @@ -1591,7 +2024,7 @@ memb_id_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1603,13 +2036,13 @@ memb_id_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICsubscriptionFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigUpdate_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_RICsubscriptionFailure_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigUpdate_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 RICsubscriptionFailure_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigUpdate_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]; @@ -1649,13 +2082,13 @@ memb_criticality_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICsubscriptionFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigUpdate_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_RICsubscriptionFailure_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigUpdate_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 RICsubscriptionFailure_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigUpdate_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]; @@ -1708,7 +2141,7 @@ memb_id_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1720,13 +2153,13 @@ memb_id_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICsubscriptionDeleteRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigRemoval_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_RICsubscriptionDeleteRequest_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigRemoval_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 RICsubscriptionDeleteRequest_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigRemoval_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]; @@ -1766,13 +2199,13 @@ memb_criticality_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICsubscriptionDeleteRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigRemoval_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_RICsubscriptionDeleteRequest_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigRemoval_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 RICsubscriptionDeleteRequest_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigRemoval_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]; @@ -1825,7 +2258,7 @@ memb_id_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1837,13 +2270,13 @@ memb_id_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICsubscriptionDeleteResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeTNLassociationRemoval_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_RICsubscriptionDeleteResponse_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeTNLassociationRemoval_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 RICsubscriptionDeleteResponse_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeTNLassociationRemoval_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]; @@ -1883,13 +2316,13 @@ memb_criticality_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICsubscriptionDeleteResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeTNLassociationRemoval_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_RICsubscriptionDeleteResponse_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeTNLassociationRemoval_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 RICsubscriptionDeleteResponse_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeTNLassociationRemoval_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]; @@ -1942,7 +2375,7 @@ memb_id_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -1954,13 +2387,13 @@ memb_id_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICsubscriptionDeleteFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigAdditionAck_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_RICsubscriptionDeleteFailure_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigAdditionAck_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 RICsubscriptionDeleteFailure_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigAdditionAck_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]; @@ -2000,13 +2433,13 @@ memb_criticality_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICsubscriptionDeleteFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigAdditionAck_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_RICsubscriptionDeleteFailure_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigAdditionAck_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 RICsubscriptionDeleteFailure_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigAdditionAck_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]; @@ -2059,7 +2492,7 @@ memb_id_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2071,13 +2504,13 @@ memb_id_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICindication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigUpdateAck_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_RICindication_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigUpdateAck_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 RICindication_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigUpdateAck_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]; @@ -2117,13 +2550,13 @@ memb_criticality_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICindication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigUpdateAck_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_RICindication_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigUpdateAck_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 RICindication_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigUpdateAck_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]; @@ -2176,7 +2609,7 @@ memb_id_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2188,13 +2621,13 @@ memb_id_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICcontrolRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigRemovalAck_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_RICcontrolRequest_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigRemovalAck_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 RICcontrolRequest_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigRemovalAck_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]; @@ -2234,13 +2667,13 @@ memb_criticality_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICcontrolRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_E2nodeComponentConfigRemovalAck_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_RICcontrolRequest_IEs_1; + const asn_ioc_set_t *itable = asn_IOS_E2nodeComponentConfigRemovalAck_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 RICcontrolRequest_IEs, id)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2nodeComponentConfigRemovalAck_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]; @@ -2293,7 +2726,7 @@ memb_id_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2305,13 +2738,13 @@ memb_id_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICcontrolAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICcontrolAcknowledge_IEs_1; + 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 RICcontrolAcknowledge_IEs, id)); + 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]; @@ -2351,13 +2784,13 @@ memb_criticality_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICcontrolAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICcontrolAcknowledge_IEs_1; + 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 RICcontrolAcknowledge_IEs, id)); + 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]; @@ -2410,7 +2843,7 @@ memb_id_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2422,13 +2855,13 @@ memb_id_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICcontrolFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICcontrolFailure_IEs_1; + 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 RICcontrolFailure_IEs, id)); + 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]; @@ -2468,13 +2901,13 @@ memb_criticality_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICcontrolFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICcontrolFailure_IEs_1; + 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 RICcontrolFailure_IEs, id)); + 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]; @@ -2527,7 +2960,7 @@ memb_id_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2539,13 +2972,13 @@ memb_id_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_ErrorIndication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_ErrorIndication_IEs_1; + 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 ErrorIndication_IEs, id)); + 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]; @@ -2585,13 +3018,13 @@ memb_criticality_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_ErrorIndication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_ErrorIndication_IEs_1; + 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 ErrorIndication_IEs, id)); + 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]; @@ -2644,7 +3077,7 @@ memb_id_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2656,13 +3089,13 @@ memb_id_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_E2setupRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_E2setupRequestIEs_1; + 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 E2setupRequestIEs, id)); + 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]; @@ -2702,13 +3135,13 @@ memb_criticality_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_E2setupRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_E2setupRequestIEs_1; + 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 E2setupRequestIEs, id)); + 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]; @@ -2761,7 +3194,7 @@ memb_id_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2773,13 +3206,13 @@ memb_id_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_E2setupResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_E2setupResponseIEs_1; + 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 E2setupResponseIEs, id)); + 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]; @@ -2819,13 +3252,13 @@ memb_criticality_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_E2setupResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_E2setupResponseIEs_1; + 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 E2setupResponseIEs, id)); + 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]; @@ -2878,7 +3311,7 @@ memb_id_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -2890,13 +3323,13 @@ memb_id_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_E2setupFailureIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_E2setupFailureIEs_1; + 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 E2setupFailureIEs, id)); + 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]; @@ -2936,13 +3369,13 @@ memb_criticality_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_E2setupFailureIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_E2setupFailureIEs_1; + 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 E2setupFailureIEs, id)); + 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]; @@ -2995,7 +3428,7 @@ memb_id_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -3007,13 +3440,13 @@ memb_id_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_ResetRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_ResetRequestIEs_1; + 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 ResetRequestIEs, id)); + 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]; @@ -3053,13 +3486,13 @@ memb_criticality_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_ResetRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_ResetRequestIEs_1; + 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 ResetRequestIEs, id)); + 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]; @@ -3112,7 +3545,7 @@ memb_id_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -3124,13 +3557,13 @@ memb_id_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_ResetResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_ResetResponseIEs_1; + 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 ResetResponseIEs, id)); + 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]; @@ -3170,13 +3603,13 @@ memb_criticality_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_ResetResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_ResetResponseIEs_1; + 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 ResetResponseIEs, id)); + 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]; @@ -3229,7 +3662,7 @@ memb_id_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -3241,13 +3674,13 @@ memb_id_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICserviceUpdate_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICserviceUpdate_IEs_1; + 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 RICserviceUpdate_IEs, id)); + 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]; @@ -3287,13 +3720,13 @@ memb_criticality_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICserviceUpdate_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICserviceUpdate_IEs_1; + 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 RICserviceUpdate_IEs, id)); + 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]; @@ -3346,7 +3779,7 @@ memb_id_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -3358,13 +3791,13 @@ memb_id_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICserviceUpdateAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_RICsubscriptionDeleteRequired_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; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequired_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequired_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]; @@ -3404,13 +3837,13 @@ memb_criticality_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICserviceUpdateAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +select_RICsubscriptionDeleteRequired_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; + const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequired_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)); + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequired_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]; @@ -3463,7 +3896,7 @@ memb_id_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -3475,13 +3908,13 @@ memb_id_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICserviceUpdateFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICserviceUpdateFailure_IEs_1; + 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 RICserviceUpdateFailure_IEs, id)); + 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]; @@ -3521,13 +3954,13 @@ memb_criticality_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr } static asn_type_selector_result_t -select_RICserviceUpdateFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICserviceUpdateFailure_IEs_1; + 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 RICserviceUpdateFailure_IEs, id)); + 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]; @@ -3580,7 +4013,7 @@ memb_id_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -3592,13 +4025,13 @@ memb_id_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, } static asn_type_selector_result_t -select_RICserviceQuery_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICserviceQuery_IEs_1; + 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 RICserviceQuery_IEs, id)); + 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]; @@ -3638,13 +4071,13 @@ memb_criticality_constraint_101(const asn_TYPE_descriptor_t *td, const void *spt } static asn_type_selector_result_t -select_RICserviceQuery_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { +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_RICserviceQuery_IEs_1; + 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 RICserviceQuery_IEs, id)); + 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]; @@ -3683,656 +4116,6472 @@ memb_value_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, 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 = { +static int +memb_id_constraint_105(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 >= 0L && value <= 65535L)) { + /* 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_105(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_105(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_109(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 >= 0L && value <= 65535L)) { + /* 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_109(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_109(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_113(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 >= 0L && value <= 65535L)) { + /* 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_113(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_113(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_117(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 >= 0L && value <= 65535L)) { + /* 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_117(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_117(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_121(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 >= 0L && value <= 65535L)) { + /* 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_121(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_121(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_125(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 >= 0L && value <= 65535L)) { + /* 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_125(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_125(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_129(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 >= 0L && value <= 65535L)) { + /* 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_E2connectionUpdate_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_E2connectionUpdate_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 E2connectionUpdate_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_129(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_E2connectionUpdate_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_E2connectionUpdate_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 E2connectionUpdate_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_129(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_133(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 >= 0L && value <= 65535L)) { + /* 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_E2connectionUpdateAck_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_E2connectionUpdateAck_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 E2connectionUpdateAck_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_133(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_E2connectionUpdateAck_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_E2connectionUpdateAck_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 E2connectionUpdateAck_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_133(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_137(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 >= 0L && value <= 65535L)) { + /* 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_E2connectionUpdateFailure_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_E2connectionUpdateFailure_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 E2connectionUpdateFailure_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_137(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_E2connectionUpdateFailure_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_E2connectionUpdateFailure_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 E2connectionUpdateFailure_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_137(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_141(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 >= 0L && value <= 65535L)) { + /* 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_E2nodeConfigurationUpdate_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_E2nodeConfigurationUpdate_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 E2nodeConfigurationUpdate_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_141(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_E2nodeConfigurationUpdate_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_E2nodeConfigurationUpdate_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 E2nodeConfigurationUpdate_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_141(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_145(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 >= 0L && value <= 65535L)) { + /* 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_E2nodeConfigurationUpdateAcknowledge_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_E2nodeConfigurationUpdateAcknowledge_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 E2nodeConfigurationUpdateAcknowledge_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_145(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_E2nodeConfigurationUpdateAcknowledge_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_E2nodeConfigurationUpdateAcknowledge_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 E2nodeConfigurationUpdateAcknowledge_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_145(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_149(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 >= 0L && value <= 65535L)) { + /* 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_E2nodeConfigurationUpdateFailure_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_E2nodeConfigurationUpdateFailure_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 E2nodeConfigurationUpdateFailure_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_149(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_E2nodeConfigurationUpdateFailure_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_E2nodeConfigurationUpdateFailure_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 E2nodeConfigurationUpdateFailure_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_149(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_153(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 >= 0L && value <= 65535L)) { + /* 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_153(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_153(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_157(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 >= 0L && value <= 65535L)) { + /* 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_157(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_157(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_161(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 >= 0L && value <= 65535L)) { + /* 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_161(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_161(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_165(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 >= 0L && value <= 65535L)) { + /* 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_165(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_165(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_169(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 >= 0L && value <= 65535L)) { + /* 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_169(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_169(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_173(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 >= 0L && value <= 65535L)) { + /* 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_173(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_173(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_2 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_6 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_7 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_10 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_11 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_12 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_14 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_15 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_16 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_18 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_19 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_20 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_22 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_23 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_24 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_26 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_27 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_28 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_30 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_31 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_32 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_34 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_35 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_36 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_38 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_39 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_40 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_42 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_43 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_44 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_46 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_47 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_48 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_50 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_51 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_52 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_54 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_55 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_56 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_58 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_59 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_60 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_62 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_63 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_64 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_66 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_67 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_68 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_70 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_71 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_72 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_74 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_75 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_76 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_78 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_79 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_80 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_82 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_83 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_84 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_86 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_87 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_88 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_90 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_91 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_92 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_94 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_95 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_96 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_98 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_99 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_100 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_102 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_103 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_104 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_106 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_106 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_107 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_107 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_108 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_108 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_110 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_110 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_111 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_111 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_112 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_112 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_114 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_114 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_115 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_115 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_116 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_116 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_118 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_118 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_119 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_119 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_120 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_120 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_122 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_122 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_123 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_123 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_124 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_124 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_126 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_126 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_127 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_127 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_128 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_128 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_130 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_130 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_131 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_131 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_132 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_132 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_134 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_134 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_135 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_135 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_136 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_136 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_138 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_138 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_139 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_139 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_140 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_140 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_142 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_142 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_143 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_143 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_144 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_144 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_146 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_146 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_147 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_147 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_148 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_148 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_150 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_150 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_151 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_151 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_152 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_152 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_154 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_154 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_155 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_155 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_156 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_156 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_158 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_158 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_159 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_159 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_160 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_160 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_162 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_162 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_163 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_163 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_164 CC_NOTUSED = { { 0, 0 }, -1}; -static asn_per_constraints_t asn_PER_memb_criticality_constr_27 CC_NOTUSED = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_164 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_166 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_166 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_167 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_167 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_168 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_168 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_170 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_170 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_171 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_171 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_172 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_172 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_id_constr_174 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_id_constr_174 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_criticality_constr_175 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_criticality_constr_175 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 */ +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_value_constr_176 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_value_constr_176 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_6, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_6, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_7, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_7, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_8, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_8, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_10, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_10, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_11, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_11, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_12, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_12, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 RICsubscription_withCause_ItemIEs__value, choice.RICsubscription_withCause_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICsubscription_withCause_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RICsubscription-withCause-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_16[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICsubscription-withCause-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_16 = { + sizeof(struct RICsubscription_withCause_ItemIEs__value), + offsetof(struct RICsubscription_withCause_ItemIEs__value, _asn_ctx), + offsetof(struct RICsubscription_withCause_ItemIEs__value, present), + sizeof(((struct RICsubscription_withCause_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_16, + 1, /* Elements count */ + &asn_SPC_value_specs_16 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_RICsubscription_withCause_ItemIEs_13[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscription_withCause_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_14, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_14, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_13 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscription_withCause_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_RICsubscription_withCause_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_15, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_15, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_13 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscription_withCause_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_16, + select_RICsubscription_withCause_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_16, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_16, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_13 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscription_withCause_ItemIEs_tags_13[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscription_withCause_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_RICsubscription_withCause_ItemIEs_specs_13 = { + sizeof(struct RICsubscription_withCause_ItemIEs), + offsetof(struct RICsubscription_withCause_ItemIEs, _asn_ctx), + asn_MAP_RICsubscription_withCause_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_RICsubscription_withCause_ItemIEs = { + "RICsubscription-withCause-ItemIEs", + "RICsubscription-withCause-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscription_withCause_ItemIEs_tags_13, + sizeof(asn_DEF_RICsubscription_withCause_ItemIEs_tags_13) + /sizeof(asn_DEF_RICsubscription_withCause_ItemIEs_tags_13[0]), /* 1 */ + asn_DEF_RICsubscription_withCause_ItemIEs_tags_13, /* Same as above */ + sizeof(asn_DEF_RICsubscription_withCause_ItemIEs_tags_13) + /sizeof(asn_DEF_RICsubscription_withCause_ItemIEs_tags_13[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscription_withCause_ItemIEs_13, + 3, /* Elements count */ + &asn_SPC_RICsubscription_withCause_ItemIEs_specs_13 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_20[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_ItemIEs__value, choice.E2connectionUpdate_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdate_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2connectionUpdate-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_20[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2connectionUpdate-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_20 = { + sizeof(struct E2connectionUpdate_ItemIEs__value), + offsetof(struct E2connectionUpdate_ItemIEs__value, _asn_ctx), + offsetof(struct E2connectionUpdate_ItemIEs__value, present), + sizeof(((struct E2connectionUpdate_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_20, + 1, /* Elements count */ + &asn_SPC_value_specs_20 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2connectionUpdate_ItemIEs_17[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_18, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_18, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_17 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2connectionUpdate_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_19, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_19, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_17 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_20, + select_E2connectionUpdate_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_20, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_20, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_17 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdate_ItemIEs_tags_17[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdate_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_E2connectionUpdate_ItemIEs_specs_17 = { + sizeof(struct E2connectionUpdate_ItemIEs), + offsetof(struct E2connectionUpdate_ItemIEs, _asn_ctx), + asn_MAP_E2connectionUpdate_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_E2connectionUpdate_ItemIEs = { + "E2connectionUpdate-ItemIEs", + "E2connectionUpdate-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionUpdate_ItemIEs_tags_17, + sizeof(asn_DEF_E2connectionUpdate_ItemIEs_tags_17) + /sizeof(asn_DEF_E2connectionUpdate_ItemIEs_tags_17[0]), /* 1 */ + asn_DEF_E2connectionUpdate_ItemIEs_tags_17, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdate_ItemIEs_tags_17) + /sizeof(asn_DEF_E2connectionUpdate_ItemIEs_tags_17[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdate_ItemIEs_17, + 3, /* Elements count */ + &asn_SPC_E2connectionUpdate_ItemIEs_specs_17 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_24[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateRemove_ItemIEs__value, choice.E2connectionUpdateRemove_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdateRemove_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2connectionUpdateRemove-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_24[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2connectionUpdateRemove-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_24 = { + sizeof(struct E2connectionUpdateRemove_ItemIEs__value), + offsetof(struct E2connectionUpdateRemove_ItemIEs__value, _asn_ctx), + offsetof(struct E2connectionUpdateRemove_ItemIEs__value, present), + sizeof(((struct E2connectionUpdateRemove_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_24, + 1, /* Elements count */ + &asn_SPC_value_specs_24 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2connectionUpdateRemove_ItemIEs_21[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateRemove_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_22, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_22, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_21 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateRemove_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2connectionUpdateRemove_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_23, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_23, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_21 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateRemove_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_24, + select_E2connectionUpdateRemove_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_24, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_24, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_21 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionUpdateRemove_ItemIEs_tags_21[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdateRemove_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_E2connectionUpdateRemove_ItemIEs_specs_21 = { + sizeof(struct E2connectionUpdateRemove_ItemIEs), + offsetof(struct E2connectionUpdateRemove_ItemIEs, _asn_ctx), + asn_MAP_E2connectionUpdateRemove_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_E2connectionUpdateRemove_ItemIEs = { + "E2connectionUpdateRemove-ItemIEs", + "E2connectionUpdateRemove-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionUpdateRemove_ItemIEs_tags_21, + sizeof(asn_DEF_E2connectionUpdateRemove_ItemIEs_tags_21) + /sizeof(asn_DEF_E2connectionUpdateRemove_ItemIEs_tags_21[0]), /* 1 */ + asn_DEF_E2connectionUpdateRemove_ItemIEs_tags_21, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdateRemove_ItemIEs_tags_21) + /sizeof(asn_DEF_E2connectionUpdateRemove_ItemIEs_tags_21[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdateRemove_ItemIEs_21, + 3, /* Elements count */ + &asn_SPC_E2connectionUpdateRemove_ItemIEs_specs_21 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_28[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionSetupFailed_ItemIEs__value, choice.E2connectionSetupFailed_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionSetupFailed_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2connectionSetupFailed-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_28[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2connectionSetupFailed-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_28 = { + sizeof(struct E2connectionSetupFailed_ItemIEs__value), + offsetof(struct E2connectionSetupFailed_ItemIEs__value, _asn_ctx), + offsetof(struct E2connectionSetupFailed_ItemIEs__value, present), + sizeof(((struct E2connectionSetupFailed_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_28, + 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_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_28, + 1, /* Elements count */ + &asn_SPC_value_specs_28 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2connectionSetupFailed_ItemIEs_25[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionSetupFailed_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_26, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_26, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_25 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2connectionSetupFailed_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2connectionSetupFailed_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_27, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_27, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_25 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2connectionSetupFailed_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_28, + select_E2connectionSetupFailed_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_28, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_28, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_25 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2connectionSetupFailed_ItemIEs_tags_25[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2connectionSetupFailed_ItemIEs_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_E2connectionSetupFailed_ItemIEs_specs_25 = { + sizeof(struct E2connectionSetupFailed_ItemIEs), + offsetof(struct E2connectionSetupFailed_ItemIEs, _asn_ctx), + asn_MAP_E2connectionSetupFailed_ItemIEs_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_E2connectionSetupFailed_ItemIEs = { + "E2connectionSetupFailed-ItemIEs", + "E2connectionSetupFailed-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2connectionSetupFailed_ItemIEs_tags_25, + sizeof(asn_DEF_E2connectionSetupFailed_ItemIEs_tags_25) + /sizeof(asn_DEF_E2connectionSetupFailed_ItemIEs_tags_25[0]), /* 1 */ + asn_DEF_E2connectionSetupFailed_ItemIEs_tags_25, /* Same as above */ + sizeof(asn_DEF_E2connectionSetupFailed_ItemIEs_tags_25) + /sizeof(asn_DEF_E2connectionSetupFailed_ItemIEs_tags_25[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionSetupFailed_ItemIEs_25, + 3, /* Elements count */ + &asn_SPC_E2connectionSetupFailed_ItemIEs_specs_25 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_32[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAddition_ItemIEs__value, choice.E2nodeComponentConfigAddition_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigAddition_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigAddition-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_32[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2nodeComponentConfigAddition-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_32 = { + sizeof(struct E2nodeComponentConfigAddition_ItemIEs__value), + offsetof(struct E2nodeComponentConfigAddition_ItemIEs__value, _asn_ctx), + offsetof(struct E2nodeComponentConfigAddition_ItemIEs__value, present), + sizeof(((struct E2nodeComponentConfigAddition_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_32, + 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_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_32, + 1, /* Elements count */ + &asn_SPC_value_specs_32 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAddition_ItemIEs_29[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAddition_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_30, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_30, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_29 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAddition_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2nodeComponentConfigAddition_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_31, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_31, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_29 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAddition_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_32, + select_E2nodeComponentConfigAddition_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_32, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_32, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_29 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigAddition_ItemIEs_tags_29[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigAddition_ItemIEs_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_E2nodeComponentConfigAddition_ItemIEs_specs_29 = { + sizeof(struct E2nodeComponentConfigAddition_ItemIEs), + offsetof(struct E2nodeComponentConfigAddition_ItemIEs, _asn_ctx), + asn_MAP_E2nodeComponentConfigAddition_ItemIEs_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_E2nodeComponentConfigAddition_ItemIEs = { + "E2nodeComponentConfigAddition-ItemIEs", + "E2nodeComponentConfigAddition-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigAddition_ItemIEs_tags_29, + sizeof(asn_DEF_E2nodeComponentConfigAddition_ItemIEs_tags_29) + /sizeof(asn_DEF_E2nodeComponentConfigAddition_ItemIEs_tags_29[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigAddition_ItemIEs_tags_29, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigAddition_ItemIEs_tags_29) + /sizeof(asn_DEF_E2nodeComponentConfigAddition_ItemIEs_tags_29[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigAddition_ItemIEs_29, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigAddition_ItemIEs_specs_29 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_36[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdate_ItemIEs__value, choice.E2nodeComponentConfigUpdate_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigUpdate_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigUpdate-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_36[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2nodeComponentConfigUpdate-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_36 = { + sizeof(struct E2nodeComponentConfigUpdate_ItemIEs__value), + offsetof(struct E2nodeComponentConfigUpdate_ItemIEs__value, _asn_ctx), + offsetof(struct E2nodeComponentConfigUpdate_ItemIEs__value, present), + sizeof(((struct E2nodeComponentConfigUpdate_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_36, + 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_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_36, + 1, /* Elements count */ + &asn_SPC_value_specs_36 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdate_ItemIEs_33[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdate_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_34, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_34, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_33 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdate_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2nodeComponentConfigUpdate_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_35, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_35, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_33 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdate_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_36, + select_E2nodeComponentConfigUpdate_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_36, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_36, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_33 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigUpdate_ItemIEs_tags_33[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigUpdate_ItemIEs_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_E2nodeComponentConfigUpdate_ItemIEs_specs_33 = { + sizeof(struct E2nodeComponentConfigUpdate_ItemIEs), + offsetof(struct E2nodeComponentConfigUpdate_ItemIEs, _asn_ctx), + asn_MAP_E2nodeComponentConfigUpdate_ItemIEs_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_E2nodeComponentConfigUpdate_ItemIEs = { + "E2nodeComponentConfigUpdate-ItemIEs", + "E2nodeComponentConfigUpdate-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigUpdate_ItemIEs_tags_33, + sizeof(asn_DEF_E2nodeComponentConfigUpdate_ItemIEs_tags_33) + /sizeof(asn_DEF_E2nodeComponentConfigUpdate_ItemIEs_tags_33[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigUpdate_ItemIEs_tags_33, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigUpdate_ItemIEs_tags_33) + /sizeof(asn_DEF_E2nodeComponentConfigUpdate_ItemIEs_tags_33[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigUpdate_ItemIEs_33, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigUpdate_ItemIEs_specs_33 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_40[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemoval_ItemIEs__value, choice.E2nodeComponentConfigRemoval_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigRemoval_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigRemoval-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_40[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2nodeComponentConfigRemoval-Item */ }; -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_CHOICE_specifics_t asn_SPC_value_specs_40 = { + sizeof(struct E2nodeComponentConfigRemoval_ItemIEs__value), + offsetof(struct E2nodeComponentConfigRemoval_ItemIEs__value, _asn_ctx), + offsetof(struct E2nodeComponentConfigRemoval_ItemIEs__value, present), + sizeof(((struct E2nodeComponentConfigRemoval_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_40, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ }; -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 /* 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_40, + 1, /* Elements count */ + &asn_SPC_value_specs_40 /* Additional specs */ }; -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 */ + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemoval_ItemIEs_37[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemoval_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_38, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_38, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_37 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemoval_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2nodeComponentConfigRemoval_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_39, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_39, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_37 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemoval_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_40, + select_E2nodeComponentConfigRemoval_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_40, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_40, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_37 + }, + 0, 0, /* No default value */ + "value" + }, }; -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 const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigRemoval_ItemIEs_tags_37[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -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 const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigRemoval_ItemIEs_tag2el_37[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; -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 */ +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemoval_ItemIEs_specs_37 = { + sizeof(struct E2nodeComponentConfigRemoval_ItemIEs), + offsetof(struct E2nodeComponentConfigRemoval_ItemIEs, _asn_ctx), + asn_MAP_E2nodeComponentConfigRemoval_ItemIEs_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_E2nodeComponentConfigRemoval_ItemIEs = { + "E2nodeComponentConfigRemoval-ItemIEs", + "E2nodeComponentConfigRemoval-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigRemoval_ItemIEs_tags_37, + sizeof(asn_DEF_E2nodeComponentConfigRemoval_ItemIEs_tags_37) + /sizeof(asn_DEF_E2nodeComponentConfigRemoval_ItemIEs_tags_37[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigRemoval_ItemIEs_tags_37, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigRemoval_ItemIEs_tags_37) + /sizeof(asn_DEF_E2nodeComponentConfigRemoval_ItemIEs_tags_37[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigRemoval_ItemIEs_37, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigRemoval_ItemIEs_specs_37 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_44[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeTNLassociationRemoval_ItemIEs__value, choice.E2nodeTNLassociationRemoval_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeTNLassociationRemoval_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeTNLassociationRemoval-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_44[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2nodeTNLassociationRemoval-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_44 = { + sizeof(struct E2nodeTNLassociationRemoval_ItemIEs__value), + offsetof(struct E2nodeTNLassociationRemoval_ItemIEs__value, _asn_ctx), + offsetof(struct E2nodeTNLassociationRemoval_ItemIEs__value, present), + sizeof(((struct E2nodeTNLassociationRemoval_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_44, + 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_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_44, + 1, /* Elements count */ + &asn_SPC_value_specs_44 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2nodeTNLassociationRemoval_ItemIEs_41[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeTNLassociationRemoval_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_42, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_42, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_41 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeTNLassociationRemoval_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2nodeTNLassociationRemoval_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_43, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_43, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_41 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeTNLassociationRemoval_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_44, + select_E2nodeTNLassociationRemoval_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_44, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_44, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_41 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeTNLassociationRemoval_ItemIEs_tags_41[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeTNLassociationRemoval_ItemIEs_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_E2nodeTNLassociationRemoval_ItemIEs_specs_41 = { + sizeof(struct E2nodeTNLassociationRemoval_ItemIEs), + offsetof(struct E2nodeTNLassociationRemoval_ItemIEs, _asn_ctx), + asn_MAP_E2nodeTNLassociationRemoval_ItemIEs_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_E2nodeTNLassociationRemoval_ItemIEs = { + "E2nodeTNLassociationRemoval-ItemIEs", + "E2nodeTNLassociationRemoval-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeTNLassociationRemoval_ItemIEs_tags_41, + sizeof(asn_DEF_E2nodeTNLassociationRemoval_ItemIEs_tags_41) + /sizeof(asn_DEF_E2nodeTNLassociationRemoval_ItemIEs_tags_41[0]), /* 1 */ + asn_DEF_E2nodeTNLassociationRemoval_ItemIEs_tags_41, /* Same as above */ + sizeof(asn_DEF_E2nodeTNLassociationRemoval_ItemIEs_tags_41) + /sizeof(asn_DEF_E2nodeTNLassociationRemoval_ItemIEs_tags_41[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeTNLassociationRemoval_ItemIEs_41, + 3, /* Elements count */ + &asn_SPC_E2nodeTNLassociationRemoval_ItemIEs_specs_41 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_48[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAdditionAck_ItemIEs__value, choice.E2nodeComponentConfigAdditionAck_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigAdditionAck_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigAdditionAck-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_48[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2nodeComponentConfigAdditionAck-Item */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_48 = { + sizeof(struct E2nodeComponentConfigAdditionAck_ItemIEs__value), + offsetof(struct E2nodeComponentConfigAdditionAck_ItemIEs__value, _asn_ctx), + offsetof(struct E2nodeComponentConfigAdditionAck_ItemIEs__value, present), + sizeof(((struct E2nodeComponentConfigAdditionAck_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_48, + 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_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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_48, + 1, /* Elements count */ + &asn_SPC_value_specs_48 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigAdditionAck_ItemIEs_45[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAdditionAck_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_46, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_46, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_45 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAdditionAck_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2nodeComponentConfigAdditionAck_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_47, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_47, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_45 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigAdditionAck_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_48, + select_E2nodeComponentConfigAdditionAck_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_48, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_48, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_45 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs_tags_45[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigAdditionAck_ItemIEs_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_E2nodeComponentConfigAdditionAck_ItemIEs_specs_45 = { + sizeof(struct E2nodeComponentConfigAdditionAck_ItemIEs), + offsetof(struct E2nodeComponentConfigAdditionAck_ItemIEs, _asn_ctx), + asn_MAP_E2nodeComponentConfigAdditionAck_ItemIEs_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_E2nodeComponentConfigAdditionAck_ItemIEs = { + "E2nodeComponentConfigAdditionAck-ItemIEs", + "E2nodeComponentConfigAdditionAck-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs_tags_45, + sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs_tags_45) + /sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs_tags_45[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs_tags_45, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs_tags_45) + /sizeof(asn_DEF_E2nodeComponentConfigAdditionAck_ItemIEs_tags_45[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigAdditionAck_ItemIEs_45, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigAdditionAck_ItemIEs_specs_45 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_52[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdateAck_ItemIEs__value, choice.E2nodeComponentConfigUpdateAck_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigUpdateAck_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigUpdateAck-Item" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_52[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2nodeComponentConfigUpdateAck-Item */ }; -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_CHOICE_specifics_t asn_SPC_value_specs_52 = { + sizeof(struct E2nodeComponentConfigUpdateAck_ItemIEs__value), + offsetof(struct E2nodeComponentConfigUpdateAck_ItemIEs__value, _asn_ctx), + offsetof(struct E2nodeComponentConfigUpdateAck_ItemIEs__value, present), + sizeof(((struct E2nodeComponentConfigUpdateAck_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_52, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ }; -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 /* 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_52, + 1, /* Elements count */ + &asn_SPC_value_specs_52 /* Additional specs */ }; -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 */ + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigUpdateAck_ItemIEs_49[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdateAck_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_50, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_50, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_49 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdateAck_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2nodeComponentConfigUpdateAck_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_51, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_51, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_49 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigUpdateAck_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_52, + select_E2nodeComponentConfigUpdateAck_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_52, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_52, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_49 + }, + 0, 0, /* No default value */ + "value" + }, }; -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 const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs_tags_49[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -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 const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigUpdateAck_ItemIEs_tag2el_49[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; -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 */ +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigUpdateAck_ItemIEs_specs_49 = { + sizeof(struct E2nodeComponentConfigUpdateAck_ItemIEs), + offsetof(struct E2nodeComponentConfigUpdateAck_ItemIEs, _asn_ctx), + asn_MAP_E2nodeComponentConfigUpdateAck_ItemIEs_tag2el_49, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ }; -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 */ +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs = { + "E2nodeComponentConfigUpdateAck-ItemIEs", + "E2nodeComponentConfigUpdateAck-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs_tags_49, + sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs_tags_49) + /sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs_tags_49[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs_tags_49, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs_tags_49) + /sizeof(asn_DEF_E2nodeComponentConfigUpdateAck_ItemIEs_tags_49[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigUpdateAck_ItemIEs_49, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigUpdateAck_ItemIEs_specs_49 /* Additional specs */ }; -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_TYPE_member_t asn_MBR_value_56[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemovalAck_ItemIEs__value, choice.E2nodeComponentConfigRemovalAck_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigRemovalAck_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigRemovalAck-Item" + }, }; -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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_56[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E2nodeComponentConfigRemovalAck-Item */ }; -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_CHOICE_specifics_t asn_SPC_value_specs_56 = { + sizeof(struct E2nodeComponentConfigRemovalAck_ItemIEs__value), + offsetof(struct E2nodeComponentConfigRemovalAck_ItemIEs__value, _asn_ctx), + offsetof(struct E2nodeComponentConfigRemovalAck_ItemIEs__value, present), + sizeof(((struct E2nodeComponentConfigRemovalAck_ItemIEs__value *)0)->present), + asn_MAP_value_tag2el_56, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ }; -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 /* 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_56, + 1, /* Elements count */ + &asn_SPC_value_specs_56 /* Additional specs */ }; -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 */ + +asn_TYPE_member_t asn_MBR_E2nodeComponentConfigRemovalAck_ItemIEs_53[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemovalAck_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_54, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_54, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_53 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemovalAck_ItemIEs, criticality), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_Criticality, + select_E2nodeComponentConfigRemovalAck_ItemIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_55, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_55, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_53 + }, + 0, 0, /* No default value */ + "criticality" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeComponentConfigRemovalAck_ItemIEs, value), + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_value_56, + select_E2nodeComponentConfigRemovalAck_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_56, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_56, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_53 + }, + 0, 0, /* No default value */ + "value" + }, }; -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 const ber_tlv_tag_t asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs_tags_53[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -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 const asn_TYPE_tag2member_t asn_MAP_E2nodeComponentConfigRemovalAck_ItemIEs_tag2el_53[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; -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 */ +asn_SEQUENCE_specifics_t asn_SPC_E2nodeComponentConfigRemovalAck_ItemIEs_specs_53 = { + sizeof(struct E2nodeComponentConfigRemovalAck_ItemIEs), + offsetof(struct E2nodeComponentConfigRemovalAck_ItemIEs, _asn_ctx), + asn_MAP_E2nodeComponentConfigRemovalAck_ItemIEs_tag2el_53, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ }; -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 */ +asn_TYPE_descriptor_t asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs = { + "E2nodeComponentConfigRemovalAck-ItemIEs", + "E2nodeComponentConfigRemovalAck-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs_tags_53, + sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs_tags_53) + /sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs_tags_53[0]), /* 1 */ + asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs_tags_53, /* Same as above */ + sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs_tags_53) + /sizeof(asn_DEF_E2nodeComponentConfigRemovalAck_ItemIEs_tags_53[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigRemovalAck_ItemIEs_53, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigRemovalAck_ItemIEs_specs_53 /* Additional specs */ }; -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_TYPE_member_t asn_MBR_value_60[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs__value, choice.RANfunction_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunction_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RANfunction-Item" + }, }; -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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_60[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunction-Item */ }; -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_CHOICE_specifics_t asn_SPC_value_specs_60 = { + 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_60, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ }; -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 /* 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_60, + 1, /* Elements count */ + &asn_SPC_value_specs_60 /* Additional specs */ }; -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 */ + +asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_57[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_58, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_58, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_57 + }, + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_59, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_59, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_57 + }, + 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_60, + select_RANfunction_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_60, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_60, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_57 + }, + 0, 0, /* No default value */ + "value" + }, }; -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 const ber_tlv_tag_t asn_DEF_RANfunction_ItemIEs_tags_57[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -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 const asn_TYPE_tag2member_t asn_MAP_RANfunction_ItemIEs_tag2el_57[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; -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 */ +asn_SEQUENCE_specifics_t asn_SPC_RANfunction_ItemIEs_specs_57 = { + sizeof(struct RANfunction_ItemIEs), + offsetof(struct RANfunction_ItemIEs, _asn_ctx), + asn_MAP_RANfunction_ItemIEs_tag2el_57, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ }; -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 */ +asn_TYPE_descriptor_t asn_DEF_RANfunction_ItemIEs = { + "RANfunction-ItemIEs", + "RANfunction-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RANfunction_ItemIEs_tags_57, + sizeof(asn_DEF_RANfunction_ItemIEs_tags_57) + /sizeof(asn_DEF_RANfunction_ItemIEs_tags_57[0]), /* 1 */ + asn_DEF_RANfunction_ItemIEs_tags_57, /* Same as above */ + sizeof(asn_DEF_RANfunction_ItemIEs_tags_57) + /sizeof(asn_DEF_RANfunction_ItemIEs_tags_57[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RANfunction_ItemIEs_57, + 3, /* Elements count */ + &asn_SPC_RANfunction_ItemIEs_specs_57 /* Additional specs */ }; -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_TYPE_member_t asn_MBR_value_64[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs__value, choice.RANfunctionID_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionID_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RANfunctionID-Item" + }, }; -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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_64[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionID-Item */ }; -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_CHOICE_specifics_t asn_SPC_value_specs_64 = { + 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_64, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ }; -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 /* 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_64, + 1, /* Elements count */ + &asn_SPC_value_specs_64 /* Additional specs */ }; -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 */ + +asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_61[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_62, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_62, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_61 + }, + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_63, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_63, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_61 + }, + 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_64, + select_RANfunctionID_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_64, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_64, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_61 + }, + 0, 0, /* No default value */ + "value" + }, }; -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 const ber_tlv_tag_t asn_DEF_RANfunctionID_ItemIEs_tags_61[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -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 const asn_TYPE_tag2member_t asn_MAP_RANfunctionID_ItemIEs_tag2el_61[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; -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 */ +asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_ItemIEs_specs_61 = { + sizeof(struct RANfunctionID_ItemIEs), + offsetof(struct RANfunctionID_ItemIEs, _asn_ctx), + asn_MAP_RANfunctionID_ItemIEs_tag2el_61, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ }; -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 */ +asn_TYPE_descriptor_t asn_DEF_RANfunctionID_ItemIEs = { + "RANfunctionID-ItemIEs", + "RANfunctionID-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RANfunctionID_ItemIEs_tags_61, + sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_61) + /sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_61[0]), /* 1 */ + asn_DEF_RANfunctionID_ItemIEs_tags_61, /* Same as above */ + sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_61) + /sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_61[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RANfunctionID_ItemIEs_61, + 3, /* Elements count */ + &asn_SPC_RANfunctionID_ItemIEs_specs_61 /* Additional specs */ }; -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_TYPE_member_t asn_MBR_value_68[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs__value, choice.RANfunctionIDcause_Item), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctionIDcause_Item, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RANfunctionIDcause-Item" + }, }; -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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_68[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionIDcause-Item */ }; -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_CHOICE_specifics_t asn_SPC_value_specs_68 = { + 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_68, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ }; -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 /* 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_68, + 1, /* Elements count */ + &asn_SPC_value_specs_68 /* Additional specs */ }; -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 */ + +asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_65[] = { + { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_66, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_66, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_65 + }, + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_67, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_67, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_65 + }, + 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_68, + select_RANfunctionIDcause_ItemIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_68, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_68, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_65 + }, + 0, 0, /* No default value */ + "value" + }, }; -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 const ber_tlv_tag_t asn_DEF_RANfunctionIDcause_ItemIEs_tags_65[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -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 const asn_TYPE_tag2member_t asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_65[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; -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 */ +asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_ItemIEs_specs_65 = { + sizeof(struct RANfunctionIDcause_ItemIEs), + offsetof(struct RANfunctionIDcause_ItemIEs, _asn_ctx), + asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_65, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ }; -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 */ +asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_ItemIEs = { + "RANfunctionIDcause-ItemIEs", + "RANfunctionIDcause-ItemIEs", + &asn_OP_SEQUENCE, + asn_DEF_RANfunctionIDcause_ItemIEs_tags_65, + sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_65) + /sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_65[0]), /* 1 */ + asn_DEF_RANfunctionIDcause_ItemIEs_tags_65, /* Same as above */ + sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_65) + /sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_65[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RANfunctionIDcause_ItemIEs_65, + 3, /* Elements count */ + &asn_SPC_RANfunctionIDcause_ItemIEs_specs_65 /* Additional specs */ }; -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_TYPE_member_t asn_MBR_value_72[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICrequestID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RICrequestID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RICsubscriptionDetails" + }, }; -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 const unsigned asn_MAP_value_to_canonical_72[] = { 1, 0, 2 }; +static const unsigned asn_MAP_value_from_canonical_72[] = { 1, 0, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_72[] = { + { (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_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_CHOICE_specifics_t asn_SPC_value_specs_72 = { + 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_72, + 3, /* Count of tags in the map */ + asn_MAP_value_to_canonical_72, + asn_MAP_value_from_canonical_72, + -1 /* Extensions start */ }; -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 /* 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) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_72, + 3, /* Elements count */ + &asn_SPC_value_specs_72 /* Additional specs */ }; -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 */ + +asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_69[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, id), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_ProtocolIE_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_70, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_70, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_69 + }, + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_71, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_71, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_69 + }, + 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_72, + select_RICsubscriptionRequest_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_72, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_72, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_69 + }, + 0, 0, /* No default value */ + "value" + }, }; -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 const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_IEs_tags_69[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -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 const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionRequest_IEs_tag2el_69[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; -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 */ +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_IEs_specs_69 = { + sizeof(struct RICsubscriptionRequest_IEs), + offsetof(struct RICsubscriptionRequest_IEs, _asn_ctx), + asn_MAP_RICsubscriptionRequest_IEs_tag2el_69, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ }; -static asn_TYPE_member_t asn_MBR_value_4[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs__value, choice.RICaction_ToBeSetup_Item), +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest_IEs = { + "RICsubscriptionRequest-IEs", + "RICsubscriptionRequest-IEs", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionRequest_IEs_tags_69, + sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_69) + /sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_69[0]), /* 1 */ + asn_DEF_RICsubscriptionRequest_IEs_tags_69, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_69) + /sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_69[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionRequest_IEs_69, + 3, /* Elements count */ + &asn_SPC_RICsubscriptionRequest_IEs_specs_69 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_value_76[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICaction_ToBeSetup_Item, + &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICaction-ToBeSetup-Item" + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RICaction-NotAdmitted-List" }, }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-ToBeSetup-Item */ +static const unsigned asn_MAP_value_to_canonical_76[] = { 1, 0, 2, 3 }; +static const unsigned asn_MAP_value_from_canonical_76[] = { 1, 0, 2, 3 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_76[] = { + { (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_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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_76 = { + 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_76, + 4, /* Count of tags in the map */ + asn_MAP_value_to_canonical_76, + asn_MAP_value_from_canonical_76, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_4 = { +asn_TYPE_descriptor_t asn_DEF_value_76 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -4340,98 +10589,208 @@ asn_TYPE_descriptor_t asn_DEF_value_4 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_76, + 4, /* Elements count */ + &asn_SPC_value_specs_76 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_ItemIEs_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, id), +asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_73[] = { + { 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_2, &asn_PER_memb_id_constr_2, memb_id_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_74, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_74, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_73 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, 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 }, + select_RICsubscriptionResponse_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_75, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_75, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_73 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, 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 }, + &asn_DEF_value_76, + select_RICsubscriptionResponse_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_76, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_76, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_73 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[] = { +static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_IEs_tags_73[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_IEs_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_RICaction_ToBeSetup_ItemIEs_specs_1 = { - sizeof(struct RICaction_ToBeSetup_ItemIEs), - offsetof(struct RICaction_ToBeSetup_ItemIEs, _asn_ctx), - asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1, +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_IEs_specs_73 = { + sizeof(struct RICsubscriptionResponse_IEs), + offsetof(struct RICsubscriptionResponse_IEs, _asn_ctx), + asn_MAP_RICsubscriptionResponse_IEs_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_RICaction_ToBeSetup_ItemIEs = { - "RICaction-ToBeSetup-ItemIEs", - "RICaction-ToBeSetup-ItemIEs", +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse_IEs = { + "RICsubscriptionResponse-IEs", + "RICsubscriptionResponse-IEs", &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, + asn_DEF_RICsubscriptionResponse_IEs_tags_73, + sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_73) + /sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_73[0]), /* 1 */ + asn_DEF_RICsubscriptionResponse_IEs_tags_73, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_73) + /sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_73[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionResponse_IEs_73, 3, /* Elements count */ - &asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 /* Additional specs */ + &asn_SPC_RICsubscriptionResponse_IEs_specs_73 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_8[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs__value, choice.RICaction_Admitted_Item), +static asn_TYPE_member_t asn_MBR_value_80[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICaction_Admitted_Item, + &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICaction-Admitted-Item" + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RANfunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Cause, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "Cause" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_CriticalityDiagnostics, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" }, }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_8[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-Admitted-Item */ +static const unsigned asn_MAP_value_to_canonical_80[] = { 1, 0, 3, 2 }; +static const unsigned asn_MAP_value_from_canonical_80[] = { 1, 0, 3, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_80[] = { + { (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 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 2, 0, 0 } /* misc */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_80 = { + 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_80, + 9, /* 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_8 = { +asn_TYPE_descriptor_t asn_DEF_value_80 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -4439,98 +10798,167 @@ asn_TYPE_descriptor_t asn_DEF_value_8 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_80, + 4, /* Elements count */ + &asn_SPC_value_specs_80 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICaction_Admitted_ItemIEs_5[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, id), +asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_77[] = { + { 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_6, &asn_PER_memb_id_constr_6, memb_id_constraint_5 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_78, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_78, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_77 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, 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 }, + select_RICsubscriptionFailure_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_79, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_79, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_77 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, 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 }, + &asn_DEF_value_80, + select_RICsubscriptionFailure_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_80, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_80, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_77 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_ItemIEs_tags_5[] = { +static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_IEs_tags_77[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionFailure_IEs_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_RICaction_Admitted_ItemIEs_specs_5 = { - sizeof(struct RICaction_Admitted_ItemIEs), - offsetof(struct RICaction_Admitted_ItemIEs, _asn_ctx), - asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5, +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_IEs_specs_77 = { + sizeof(struct RICsubscriptionFailure_IEs), + offsetof(struct RICsubscriptionFailure_IEs, _asn_ctx), + asn_MAP_RICsubscriptionFailure_IEs_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_RICaction_Admitted_ItemIEs = { - "RICaction-Admitted-ItemIEs", - "RICaction-Admitted-ItemIEs", +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure_IEs = { + "RICsubscriptionFailure-IEs", + "RICsubscriptionFailure-IEs", &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, + asn_DEF_RICsubscriptionFailure_IEs_tags_77, + sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_77) + /sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_77[0]), /* 1 */ + asn_DEF_RICsubscriptionFailure_IEs_tags_77, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_77) + /sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_77[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionFailure_IEs_77, 3, /* Elements count */ - &asn_SPC_RICaction_Admitted_ItemIEs_specs_5 /* Additional specs */ + &asn_SPC_RICsubscriptionFailure_IEs_specs_77 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_12[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs__value, choice.RICaction_NotAdmitted_Item), +static asn_TYPE_member_t asn_MBR_value_84[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICaction_NotAdmitted_Item, + &asn_DEF_RICrequestID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICaction-NotAdmitted-Item" + "RANfunctionID" }, }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_12[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-NotAdmitted-Item */ +static const unsigned asn_MAP_value_to_canonical_84[] = { 1, 0 }; +static const unsigned asn_MAP_value_from_canonical_84[] = { 1, 0 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_84[] = { + { (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_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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_84 = { + 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_84, + 2, /* Count of tags in the map */ + asn_MAP_value_to_canonical_84, + asn_MAP_value_from_canonical_84, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_12 = { +asn_TYPE_descriptor_t asn_DEF_value_84 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -4538,98 +10966,167 @@ asn_TYPE_descriptor_t asn_DEF_value_12 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_84, + 2, /* Elements count */ + &asn_SPC_value_specs_84 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_ItemIEs_9[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, id), +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_81[] = { + { 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_10, &asn_PER_memb_id_constr_10, memb_id_constraint_9 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_82, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_82, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_81 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, 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 }, + select_RICsubscriptionDeleteRequest_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_83, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_83, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_81 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, 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 }, + &asn_DEF_value_84, + select_RICsubscriptionDeleteRequest_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_84, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_84, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_81 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[] = { +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_81[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_IEs_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_RICaction_NotAdmitted_ItemIEs_specs_9 = { - sizeof(struct RICaction_NotAdmitted_ItemIEs), - offsetof(struct RICaction_NotAdmitted_ItemIEs, _asn_ctx), - asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9, +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_81 = { + sizeof(struct RICsubscriptionDeleteRequest_IEs), + offsetof(struct RICsubscriptionDeleteRequest_IEs, _asn_ctx), + asn_MAP_RICsubscriptionDeleteRequest_IEs_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_RICaction_NotAdmitted_ItemIEs = { - "RICaction-NotAdmitted-ItemIEs", - "RICaction-NotAdmitted-ItemIEs", +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest_IEs = { + "RICsubscriptionDeleteRequest-IEs", + "RICsubscriptionDeleteRequest-IEs", &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, + asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_81, + sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_81) + /sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_81[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_81, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_81) + /sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_81[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionDeleteRequest_IEs_81, 3, /* Elements count */ - &asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 /* Additional specs */ + &asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_81 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_16[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs__value, choice.RANfunction_Item), +static asn_TYPE_member_t asn_MBR_value_88[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RANfunction_Item, + &asn_DEF_RICrequestID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunction-Item" + "RANfunctionID" }, }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_16[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunction-Item */ +static const unsigned asn_MAP_value_to_canonical_88[] = { 1, 0 }; +static const unsigned asn_MAP_value_from_canonical_88[] = { 1, 0 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_88[] = { + { (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_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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_88 = { + 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_88, + 2, /* Count of tags in the map */ + asn_MAP_value_to_canonical_88, + asn_MAP_value_from_canonical_88, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_16 = { +asn_TYPE_descriptor_t asn_DEF_value_88 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -4637,98 +11134,208 @@ asn_TYPE_descriptor_t asn_DEF_value_16 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_88, + 2, /* Elements count */ + &asn_SPC_value_specs_88 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_13[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, id), +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_85[] = { + { 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_14, &asn_PER_memb_id_constr_14, memb_id_constraint_13 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_86, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_86, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_85 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, 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 }, + select_RICsubscriptionDeleteResponse_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_87, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_87, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_85 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, 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 }, + &asn_DEF_value_88, + select_RICsubscriptionDeleteResponse_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_88, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_88, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_85 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RANfunction_ItemIEs_tags_13[] = { +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_85[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RANfunction_ItemIEs_tag2el_13[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteResponse_IEs_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_RANfunction_ItemIEs_specs_13 = { - sizeof(struct RANfunction_ItemIEs), - offsetof(struct RANfunction_ItemIEs, _asn_ctx), - asn_MAP_RANfunction_ItemIEs_tag2el_13, +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_85 = { + sizeof(struct RICsubscriptionDeleteResponse_IEs), + offsetof(struct RICsubscriptionDeleteResponse_IEs, _asn_ctx), + asn_MAP_RICsubscriptionDeleteResponse_IEs_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_RANfunction_ItemIEs = { - "RANfunction-ItemIEs", - "RANfunction-ItemIEs", +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse_IEs = { + "RICsubscriptionDeleteResponse-IEs", + "RICsubscriptionDeleteResponse-IEs", &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, + asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_85, + sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_85) + /sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_85[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_85, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_85) + /sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_85[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionDeleteResponse_IEs_85, 3, /* Elements count */ - &asn_SPC_RANfunction_ItemIEs_specs_13 /* Additional specs */ + &asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_85 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_20[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs__value, choice.RANfunctionID_Item), +static asn_TYPE_member_t asn_MBR_value_92[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RANfunctionID_Item, + &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionID-Item" + "RICrequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RANfunctionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RANfunctionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" }, }; -static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_20[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionID-Item */ +static const unsigned asn_MAP_value_to_canonical_92[] = { 1, 0, 3, 2 }; +static const unsigned asn_MAP_value_from_canonical_92[] = { 1, 0, 3, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_92[] = { + { (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 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 2, 0, 0 } /* misc */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_92 = { + 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_92, + 9, /* Count of tags in the map */ + asn_MAP_value_to_canonical_92, + asn_MAP_value_from_canonical_92, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_20 = { +asn_TYPE_descriptor_t asn_DEF_value_92 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -4736,98 +11343,146 @@ asn_TYPE_descriptor_t asn_DEF_value_20 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_92, + 4, /* Elements count */ + &asn_SPC_value_specs_92 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_17[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, id), +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_89[] = { + { 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_18, &asn_PER_memb_id_constr_18, memb_id_constraint_17 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_90, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_90, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_89 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, 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 }, + select_RICsubscriptionDeleteFailure_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_91, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_91, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_89 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, 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 }, + &asn_DEF_value_92, + select_RICsubscriptionDeleteFailure_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_92, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_92, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_89 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RANfunctionID_ItemIEs_tags_17[] = { +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_89[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RANfunctionID_ItemIEs_tag2el_17[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteFailure_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_RANfunctionID_ItemIEs_specs_17 = { - sizeof(struct RANfunctionID_ItemIEs), - offsetof(struct RANfunctionID_ItemIEs, _asn_ctx), - asn_MAP_RANfunctionID_ItemIEs_tag2el_17, +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_89 = { + sizeof(struct RICsubscriptionDeleteFailure_IEs), + offsetof(struct RICsubscriptionDeleteFailure_IEs, _asn_ctx), + asn_MAP_RICsubscriptionDeleteFailure_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_RANfunctionID_ItemIEs = { - "RANfunctionID-ItemIEs", - "RANfunctionID-ItemIEs", +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure_IEs = { + "RICsubscriptionDeleteFailure-IEs", + "RICsubscriptionDeleteFailure-IEs", &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, + asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_89, + sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_89) + /sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_89[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_89, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_89) + /sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_89[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionDeleteFailure_IEs_89, 3, /* Elements count */ - &asn_SPC_RANfunctionID_ItemIEs_specs_17 /* Additional specs */ + &asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_89 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_24[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs__value, choice.RANfunctionIDcause_Item), +static asn_TYPE_member_t asn_MBR_value_96[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequired_IEs__value, choice.RICsubscription_List_withCause), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RANfunctionIDcause_Item, + &asn_DEF_RICsubscription_List_withCause, 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionIDcause-Item" + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 }, -}; -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, + 0, 0, /* No default value */ + "RICsubscription-List-withCause" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_96[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICsubscription-List-withCause */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_96 = { + sizeof(struct RICsubscriptionDeleteRequired_IEs__value), + offsetof(struct RICsubscriptionDeleteRequired_IEs__value, _asn_ctx), + offsetof(struct RICsubscriptionDeleteRequired_IEs__value, present), + sizeof(((struct RICsubscriptionDeleteRequired_IEs__value *)0)->present), + asn_MAP_value_tag2el_96, 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 = { +asn_TYPE_descriptor_t asn_DEF_value_96 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -4835,121 +11490,275 @@ asn_TYPE_descriptor_t asn_DEF_value_24 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_24, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_96, 1, /* Elements count */ - &asn_SPC_value_specs_24 /* Additional specs */ + &asn_SPC_value_specs_96 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_21[] = { - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, id), +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequired_IEs_93[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequired_IEs, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_94, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_94, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_93 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequired_IEs, 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 }, + select_RICsubscriptionDeleteRequired_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_95, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_95, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_93 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequired_IEs, 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 }, + &asn_DEF_value_96, + select_RICsubscriptionDeleteRequired_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_96, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_96, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_93 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[] = { +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequired_IEs_tags_93[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequired_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_RANfunctionIDcause_ItemIEs_specs_21 = { - sizeof(struct RANfunctionIDcause_ItemIEs), - offsetof(struct RANfunctionIDcause_ItemIEs, _asn_ctx), - asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21, +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequired_IEs_specs_93 = { + sizeof(struct RICsubscriptionDeleteRequired_IEs), + offsetof(struct RICsubscriptionDeleteRequired_IEs, _asn_ctx), + asn_MAP_RICsubscriptionDeleteRequired_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_RANfunctionIDcause_ItemIEs = { - "RANfunctionIDcause-ItemIEs", - "RANfunctionIDcause-ItemIEs", +asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequired_IEs = { + "RICsubscriptionDeleteRequired-IEs", + "RICsubscriptionDeleteRequired-IEs", &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, + asn_DEF_RICsubscriptionDeleteRequired_IEs_tags_93, + sizeof(asn_DEF_RICsubscriptionDeleteRequired_IEs_tags_93) + /sizeof(asn_DEF_RICsubscriptionDeleteRequired_IEs_tags_93[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteRequired_IEs_tags_93, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteRequired_IEs_tags_93) + /sizeof(asn_DEF_RICsubscriptionDeleteRequired_IEs_tags_93[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionDeleteRequired_IEs_93, 3, /* Elements count */ - &asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 /* Additional specs */ + &asn_SPC_RICsubscriptionDeleteRequired_IEs_specs_93 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_28[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICrequestID), +static asn_TYPE_member_t asn_MBR_value_100[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICrequestID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RANfunctionID), + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RANfunctionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RANfunctionID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICsubscriptionDetails), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RICsubscriptionDetails, + &asn_DEF_RICactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICsubscriptionDetails" + "RICactionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationSN), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_RICindicationSN, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RICcallProcessID" }, }; -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 const unsigned asn_MAP_value_to_canonical_100[] = { 1, 2, 3, 5, 6, 7, 4, 0 }; +static const unsigned asn_MAP_value_from_canonical_100[] = { 7, 0, 1, 2, 6, 3, 4, 5 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_100[] = { + { (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_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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_100 = { + 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_100, + 8, /* 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_28 = { +asn_TYPE_descriptor_t asn_DEF_value_100 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -4957,131 +11766,239 @@ asn_TYPE_descriptor_t asn_DEF_value_28 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_100, + 8, /* Elements count */ + &asn_SPC_value_specs_100 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_25[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, id), +asn_TYPE_member_t asn_MBR_RICindication_IEs_97[] = { + { 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_26, &asn_PER_memb_id_constr_26, memb_id_constraint_25 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_98, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_98, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_97 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICindication_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 }, + select_RICindication_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_99, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_99, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_97 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICindication_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 }, + &asn_DEF_value_100, + select_RICindication_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_100, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_100, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_97 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_IEs_tags_25[] = { +static const ber_tlv_tag_t asn_DEF_RICindication_IEs_tags_97[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionRequest_IEs_tag2el_25[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICindication_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_RICsubscriptionRequest_IEs_specs_25 = { - sizeof(struct RICsubscriptionRequest_IEs), - offsetof(struct RICsubscriptionRequest_IEs, _asn_ctx), - asn_MAP_RICsubscriptionRequest_IEs_tag2el_25, +asn_SEQUENCE_specifics_t asn_SPC_RICindication_IEs_specs_97 = { + sizeof(struct RICindication_IEs), + offsetof(struct RICindication_IEs, _asn_ctx), + asn_MAP_RICindication_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_RICsubscriptionRequest_IEs = { - "RICsubscriptionRequest-IEs", - "RICsubscriptionRequest-IEs", +asn_TYPE_descriptor_t asn_DEF_RICindication_IEs = { + "RICindication-IEs", + "RICindication-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, + asn_DEF_RICindication_IEs_tags_97, + sizeof(asn_DEF_RICindication_IEs_tags_97) + /sizeof(asn_DEF_RICindication_IEs_tags_97[0]), /* 1 */ + asn_DEF_RICindication_IEs_tags_97, /* Same as above */ + sizeof(asn_DEF_RICindication_IEs_tags_97) + /sizeof(asn_DEF_RICindication_IEs_tags_97[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICindication_IEs_97, 3, /* Elements count */ - &asn_SPC_RICsubscriptionRequest_IEs_specs_25 /* Additional specs */ + &asn_SPC_RICindication_IEs_specs_97 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_32[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICrequestID), +static asn_TYPE_member_t asn_MBR_value_104[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICrequestID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RANfunctionID), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RANfunctionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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)), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcallProcessID), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, - &asn_DEF_RICaction_Admitted_List, + &asn_DEF_RICcallProcessID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICaction-Admitted-List" + "RICcallProcessID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICaction_NotAdmitted_List), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolHeader), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, - &asn_DEF_RICaction_NotAdmitted_List, + &asn_DEF_RICcontrolHeader, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICaction-NotAdmitted-List" + "RICcontrolHeader" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolMessage), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_RICcontrolMessage, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RICcontrolAckRequest" }, }; -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[] = { +static const unsigned asn_MAP_value_to_canonical_104[] = { 1, 2, 3, 4, 5, 0 }; +static const unsigned asn_MAP_value_from_canonical_104[] = { 5, 0, 1, 2, 3, 4 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_104[] = { { (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 */ + { (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_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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_104 = { + 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_104, + 6, /* Count of tags in the map */ + asn_MAP_value_to_canonical_104, + asn_MAP_value_from_canonical_104, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_32 = { +asn_TYPE_descriptor_t asn_DEF_value_104 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -5089,131 +12006,203 @@ asn_TYPE_descriptor_t asn_DEF_value_32 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_104, + 6, /* Elements count */ + &asn_SPC_value_specs_104 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_29[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, id), +asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_101[] = { + { 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_30, &asn_PER_memb_id_constr_30, memb_id_constraint_29 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_102, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_102, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_101 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_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 }, + select_RICcontrolRequest_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_103, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_103, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_101 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_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 }, + &asn_DEF_value_104, + select_RICcontrolRequest_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_104, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_104, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_101 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_IEs_tags_29[] = { +static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_IEs_tags_101[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_IEs_tag2el_29[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_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_RICsubscriptionResponse_IEs_specs_29 = { - sizeof(struct RICsubscriptionResponse_IEs), - offsetof(struct RICsubscriptionResponse_IEs, _asn_ctx), - asn_MAP_RICsubscriptionResponse_IEs_tag2el_29, +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_IEs_specs_101 = { + sizeof(struct RICcontrolRequest_IEs), + offsetof(struct RICcontrolRequest_IEs, _asn_ctx), + asn_MAP_RICcontrolRequest_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_RICsubscriptionResponse_IEs = { - "RICsubscriptionResponse-IEs", - "RICsubscriptionResponse-IEs", +asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest_IEs = { + "RICcontrolRequest-IEs", + "RICcontrolRequest-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, + asn_DEF_RICcontrolRequest_IEs_tags_101, + sizeof(asn_DEF_RICcontrolRequest_IEs_tags_101) + /sizeof(asn_DEF_RICcontrolRequest_IEs_tags_101[0]), /* 1 */ + asn_DEF_RICcontrolRequest_IEs_tags_101, /* Same as above */ + sizeof(asn_DEF_RICcontrolRequest_IEs_tags_101) + /sizeof(asn_DEF_RICcontrolRequest_IEs_tags_101[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICcontrolRequest_IEs_101, 3, /* Elements count */ - &asn_SPC_RICsubscriptionResponse_IEs_specs_29 /* Additional specs */ + &asn_SPC_RICcontrolRequest_IEs_specs_101 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_36[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICrequestID), +static asn_TYPE_member_t asn_MBR_value_108[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICrequestID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RANfunctionID), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RANfunctionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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)), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcallProcessID), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, - &asn_DEF_RICaction_NotAdmitted_List, + &asn_DEF_RICcallProcessID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICaction-NotAdmitted-List" + "RICcallProcessID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.CriticalityDiagnostics), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolOutcome), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, - &asn_DEF_CriticalityDiagnostics, + &asn_DEF_RICcontrolOutcome, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "CriticalityDiagnostics" + "RICcontrolOutcome" }, }; -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[] = { +static const unsigned asn_MAP_value_to_canonical_108[] = { 1, 2, 3, 0 }; +static const unsigned asn_MAP_value_from_canonical_108[] = { 3, 0, 1, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_108[] = { { (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 */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* RICcallProcessID */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -1, 0 }, /* RICcontrolOutcome */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_108 = { + 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_108, 4, /* Count of tags in the map */ - asn_MAP_value_to_canonical_36, - asn_MAP_value_from_canonical_36, + asn_MAP_value_to_canonical_108, + asn_MAP_value_from_canonical_108, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_36 = { +asn_TYPE_descriptor_t asn_DEF_value_108 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -5221,111 +12210,226 @@ asn_TYPE_descriptor_t asn_DEF_value_36 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_36, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_108, 4, /* Elements count */ - &asn_SPC_value_specs_36 /* Additional specs */ + &asn_SPC_value_specs_108 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_33[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, id), +asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_105[] = { + { 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_34, &asn_PER_memb_id_constr_34, memb_id_constraint_33 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_106, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_106, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_105 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_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 }, + select_RICcontrolAcknowledge_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_107, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_107, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_105 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_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 }, + &asn_DEF_value_108, + select_RICcontrolAcknowledge_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_108, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_108, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_105 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_IEs_tags_33[] = { +static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_IEs_tags_105[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionFailure_IEs_tag2el_33[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolAcknowledge_IEs_tag2el_105[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_IEs_specs_105 = { + sizeof(struct RICcontrolAcknowledge_IEs), + offsetof(struct RICcontrolAcknowledge_IEs, _asn_ctx), + asn_MAP_RICcontrolAcknowledge_IEs_tag2el_105, 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_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge_IEs = { + "RICcontrolAcknowledge-IEs", + "RICcontrolAcknowledge-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, + asn_DEF_RICcontrolAcknowledge_IEs_tags_105, + sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_105) + /sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_105[0]), /* 1 */ + asn_DEF_RICcontrolAcknowledge_IEs_tags_105, /* Same as above */ + sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_105) + /sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_105[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICcontrolAcknowledge_IEs_105, 3, /* Elements count */ - &asn_SPC_RICsubscriptionFailure_IEs_specs_33 /* Additional specs */ + &asn_SPC_RICcontrolAcknowledge_IEs_specs_105 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_40[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RICrequestID), +static asn_TYPE_member_t asn_MBR_value_112[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICrequestID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RANfunctionID), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RANfunctionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RICcontrolOutcome" + }, }; -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[] = { +static const unsigned asn_MAP_value_to_canonical_112[] = { 1, 2, 4, 0, 3 }; +static const unsigned asn_MAP_value_from_canonical_112[] = { 3, 0, 1, 4, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_112[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */ - { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */ + { (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 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 3, 0, 0 } /* misc */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_112 = { + 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_112, + 10, /* Count of tags in the map */ + asn_MAP_value_to_canonical_112, + asn_MAP_value_from_canonical_112, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_40 = { +asn_TYPE_descriptor_t asn_DEF_value_112 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -5333,111 +12437,226 @@ asn_TYPE_descriptor_t asn_DEF_value_40 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_112, + 5, /* Elements count */ + &asn_SPC_value_specs_112 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_37[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, id), +asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_109[] = { + { 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_38, &asn_PER_memb_id_constr_38, memb_id_constraint_37 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_110, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_110, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_109 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_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 }, + select_RICcontrolFailure_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_111, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_111, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_109 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_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 }, + &asn_DEF_value_112, + select_RICcontrolFailure_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_112, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_112, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_109 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[] = { +static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_IEs_tags_109[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_IEs_tag2el_37[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICcontrolFailure_IEs_tag2el_109[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_IEs_specs_109 = { + sizeof(struct RICcontrolFailure_IEs), + offsetof(struct RICcontrolFailure_IEs, _asn_ctx), + asn_MAP_RICcontrolFailure_IEs_tag2el_109, 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_TYPE_descriptor_t asn_DEF_RICcontrolFailure_IEs = { + "RICcontrolFailure-IEs", + "RICcontrolFailure-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, + asn_DEF_RICcontrolFailure_IEs_tags_109, + sizeof(asn_DEF_RICcontrolFailure_IEs_tags_109) + /sizeof(asn_DEF_RICcontrolFailure_IEs_tags_109[0]), /* 1 */ + asn_DEF_RICcontrolFailure_IEs_tags_109, /* Same as above */ + sizeof(asn_DEF_RICcontrolFailure_IEs_tags_109) + /sizeof(asn_DEF_RICcontrolFailure_IEs_tags_109[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICcontrolFailure_IEs_109, 3, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37 /* Additional specs */ + &asn_SPC_RICcontrolFailure_IEs_specs_109 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_44[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RICrequestID), +static asn_TYPE_member_t asn_MBR_value_116[] = { + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RICrequestID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RICrequestID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICrequestID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RANfunctionID), + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RANfunctionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "CriticalityDiagnostics" + }, }; -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 const unsigned asn_MAP_value_to_canonical_116[] = { 0, 2, 1, 4, 3 }; +static const unsigned asn_MAP_value_from_canonical_116[] = { 0, 2, 1, 4, 3 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_116[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 0 }, /* RANfunctionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* RICrequestID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 0 }, /* CriticalityDiagnostics */ + { (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 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 3, 0, 0 } /* misc */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_116 = { + 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_116, + 10, /* Count of tags in the map */ + asn_MAP_value_to_canonical_116, + asn_MAP_value_from_canonical_116, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_44 = { +asn_TYPE_descriptor_t asn_DEF_value_116 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -5445,135 +12664,206 @@ asn_TYPE_descriptor_t asn_DEF_value_44 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_116, + 5, /* Elements count */ + &asn_SPC_value_specs_116 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_41[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, id), +asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_113[] = { + { 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_42, &asn_PER_memb_id_constr_42, memb_id_constraint_41 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_114, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_114, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_113 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_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 }, + select_ErrorIndication_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_115, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_115, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_113 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_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 }, + &asn_DEF_value_116, + select_ErrorIndication_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_116, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_116, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_113 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[] = { +static const ber_tlv_tag_t asn_DEF_ErrorIndication_IEs_tags_113[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteResponse_IEs_tag2el_41[] = { +static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_IEs_tag2el_113[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_IEs_specs_113 = { + sizeof(struct ErrorIndication_IEs), + offsetof(struct ErrorIndication_IEs, _asn_ctx), + asn_MAP_ErrorIndication_IEs_tag2el_113, 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_TYPE_descriptor_t asn_DEF_ErrorIndication_IEs = { + "ErrorIndication-IEs", + "ErrorIndication-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, + asn_DEF_ErrorIndication_IEs_tags_113, + sizeof(asn_DEF_ErrorIndication_IEs_tags_113) + /sizeof(asn_DEF_ErrorIndication_IEs_tags_113[0]), /* 1 */ + asn_DEF_ErrorIndication_IEs_tags_113, /* Same as above */ + sizeof(asn_DEF_ErrorIndication_IEs_tags_113) + /sizeof(asn_DEF_ErrorIndication_IEs_tags_113[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_ErrorIndication_IEs_113, 3, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41 /* Additional specs */ + &asn_SPC_ErrorIndication_IEs_specs_113 /* 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)), +static asn_TYPE_member_t asn_MBR_value_120[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RICrequestID, + &asn_DEF_TransactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICrequestID" + "TransactionID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RANfunctionID), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.GlobalE2node_ID), + -1 /* Ambiguous tag (CHOICE?) */, 0, - &asn_DEF_RANfunctionID, + &asn_DEF_GlobalE2node_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionID" + "GlobalE2node-ID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.Cause), - -1 /* Ambiguous tag (CHOICE?) */, + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.RANfunctions_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_Cause, + &asn_DEF_RANfunctions_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "Cause" + "RANfunctions-List" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.CriticalityDiagnostics), + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.E2nodeComponentConfigAddition_List), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_CriticalityDiagnostics, + &asn_DEF_E2nodeComponentConfigAddition_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "CriticalityDiagnostics" + "E2nodeComponentConfigAddition-List" }, }; -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 const unsigned asn_MAP_value_to_canonical_120[] = { 0, 2, 3, 1 }; +static const unsigned asn_MAP_value_from_canonical_120[] = { 0, 3, 1, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_120[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* RANfunctions-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* E2nodeComponentConfigAddition-List */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gNB */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* en-gNB */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* ng-eNB */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* eNB */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_120 = { + 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_120, + 7, /* Count of tags in the map */ + asn_MAP_value_to_canonical_120, + asn_MAP_value_from_canonical_120, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_48 = { +asn_TYPE_descriptor_t asn_DEF_value_120 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -5581,171 +12871,218 @@ asn_TYPE_descriptor_t asn_DEF_value_48 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_48, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_120, 4, /* Elements count */ - &asn_SPC_value_specs_48 /* Additional specs */ + &asn_SPC_value_specs_120 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_45[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, id), +asn_TYPE_member_t asn_MBR_E2setupRequestIEs_117[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_118, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_118, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_117 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, 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 }, + select_E2setupRequestIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_119, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_119, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_117 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, 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 }, + &asn_DEF_value_120, + select_E2setupRequestIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_120, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_120, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_117 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[] = { +static const ber_tlv_tag_t asn_DEF_E2setupRequestIEs_tags_117[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteFailure_IEs_tag2el_45[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2setupRequestIEs_tag2el_117[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2setupRequestIEs_specs_117 = { + sizeof(struct E2setupRequestIEs), + offsetof(struct E2setupRequestIEs, _asn_ctx), + asn_MAP_E2setupRequestIEs_tag2el_117, 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_TYPE_descriptor_t asn_DEF_E2setupRequestIEs = { + "E2setupRequestIEs", + "E2setupRequestIEs", &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, + asn_DEF_E2setupRequestIEs_tags_117, + sizeof(asn_DEF_E2setupRequestIEs_tags_117) + /sizeof(asn_DEF_E2setupRequestIEs_tags_117[0]), /* 1 */ + asn_DEF_E2setupRequestIEs_tags_117, /* Same as above */ + sizeof(asn_DEF_E2setupRequestIEs_tags_117) + /sizeof(asn_DEF_E2setupRequestIEs_tags_117[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2setupRequestIEs_117, 3, /* Elements count */ - &asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45 /* Additional specs */ + &asn_SPC_E2setupRequestIEs_specs_117 /* 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), +static asn_TYPE_member_t asn_MBR_value_124[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.TransactionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RANfunctionID, + &asn_DEF_TransactionID, 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 }, - { 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" + "TransactionID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationSN), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.GlobalRIC_ID), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICindicationSN, + &asn_DEF_GlobalRIC_ID, 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RICindicationSN" + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 }, - { 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" + "GlobalRIC-ID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationHeader), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsID_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICindicationHeader, + &asn_DEF_RANfunctionsID_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICindicationHeader" + "RANfunctionsID-List" }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationMessage), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsIDcause_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICindicationMessage, + &asn_DEF_RANfunctionsIDcause_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICindicationMessage" + "RANfunctionsIDcause-List" }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICcallProcessID), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.E2nodeComponentConfigAdditionAck_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICcallProcessID, + &asn_DEF_E2nodeComponentConfigAdditionAck_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcallProcessID" + "E2nodeComponentConfigAdditionAck-List" }, }; -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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_124[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 3 }, /* GlobalRIC-ID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 2 }, /* RANfunctionsID-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 1 }, /* RANfunctionsIDcause-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -3, 0 } /* E2nodeComponentConfigAdditionAck-List */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_124 = { + 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_124, + 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_52 = { +asn_TYPE_descriptor_t asn_DEF_value_124 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -5753,151 +13090,226 @@ asn_TYPE_descriptor_t asn_DEF_value_52 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_124, + 5, /* Elements count */ + &asn_SPC_value_specs_124 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICindication_IEs_49[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, id), +asn_TYPE_member_t asn_MBR_E2setupResponseIEs_121[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_122, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_122, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_121 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, 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 }, + select_E2setupResponseIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_123, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_123, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_121 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, 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 }, + &asn_DEF_value_124, + select_E2setupResponseIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_124, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_124, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_121 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICindication_IEs_tags_49[] = { +static const ber_tlv_tag_t asn_DEF_E2setupResponseIEs_tags_121[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICindication_IEs_tag2el_49[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2setupResponseIEs_tag2el_121[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2setupResponseIEs_specs_121 = { + sizeof(struct E2setupResponseIEs), + offsetof(struct E2setupResponseIEs, _asn_ctx), + asn_MAP_E2setupResponseIEs_tag2el_121, 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_TYPE_descriptor_t asn_DEF_E2setupResponseIEs = { + "E2setupResponseIEs", + "E2setupResponseIEs", &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, + asn_DEF_E2setupResponseIEs_tags_121, + sizeof(asn_DEF_E2setupResponseIEs_tags_121) + /sizeof(asn_DEF_E2setupResponseIEs_tags_121[0]), /* 1 */ + asn_DEF_E2setupResponseIEs_tags_121, /* Same as above */ + sizeof(asn_DEF_E2setupResponseIEs_tags_121) + /sizeof(asn_DEF_E2setupResponseIEs_tags_121[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2setupResponseIEs_121, 3, /* Elements count */ - &asn_SPC_RICindication_IEs_specs_49 /* Additional specs */ + &asn_SPC_E2setupResponseIEs_specs_121 /* 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), +static asn_TYPE_member_t asn_MBR_value_128[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.TransactionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RANfunctionID, + &asn_DEF_TransactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionID" + "TransactionID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcallProcessID), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, 0, - &asn_DEF_RICcallProcessID, + &asn_DEF_Cause, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcallProcessID" + "Cause" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolHeader), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.TimeToWait), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, - &asn_DEF_RICcontrolHeader, + &asn_DEF_TimeToWait, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcontrolHeader" + "TimeToWait" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolMessage), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.CriticalityDiagnostics), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICcontrolMessage, + &asn_DEF_CriticalityDiagnostics, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcontrolMessage" + "CriticalityDiagnostics" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolAckRequest), - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.TNLinformation), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICcontrolAckRequest, + &asn_DEF_TNLinformation, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcontrolAckRequest" + "TNLinformation" }, }; -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 const unsigned asn_MAP_value_to_canonical_128[] = { 0, 2, 3, 4, 1 }; +static const unsigned asn_MAP_value_from_canonical_128[] = { 0, 4, 1, 2, 3 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_128[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 }, /* TimeToWait */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 1 }, /* CriticalityDiagnostics */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 0 }, /* TNLinformation */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 1, 0, 0 } /* misc */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_128 = { + 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_128, + 10, /* Count of tags in the map */ + asn_MAP_value_to_canonical_128, + asn_MAP_value_from_canonical_128, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_56 = { +asn_TYPE_descriptor_t asn_DEF_value_128 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -5905,141 +13317,200 @@ asn_TYPE_descriptor_t asn_DEF_value_56 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_128, + 5, /* Elements count */ + &asn_SPC_value_specs_128 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_53[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, id), +asn_TYPE_member_t asn_MBR_E2setupFailureIEs_125[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_126, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_126, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_125 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, 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 }, + select_E2setupFailureIEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_127, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_127, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_125 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, 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 }, + &asn_DEF_value_128, + select_E2setupFailureIEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_128, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_128, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_125 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_IEs_tags_53[] = { +static const ber_tlv_tag_t asn_DEF_E2setupFailureIEs_tags_125[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_IEs_tag2el_53[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2setupFailureIEs_tag2el_125[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2setupFailureIEs_specs_125 = { + sizeof(struct E2setupFailureIEs), + offsetof(struct E2setupFailureIEs, _asn_ctx), + asn_MAP_E2setupFailureIEs_tag2el_125, 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_TYPE_descriptor_t asn_DEF_E2setupFailureIEs = { + "E2setupFailureIEs", + "E2setupFailureIEs", &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, + asn_DEF_E2setupFailureIEs_tags_125, + sizeof(asn_DEF_E2setupFailureIEs_tags_125) + /sizeof(asn_DEF_E2setupFailureIEs_tags_125[0]), /* 1 */ + asn_DEF_E2setupFailureIEs_tags_125, /* Same as above */ + sizeof(asn_DEF_E2setupFailureIEs_tags_125) + /sizeof(asn_DEF_E2setupFailureIEs_tags_125[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2setupFailureIEs_125, 3, /* Elements count */ - &asn_SPC_RICcontrolRequest_IEs_specs_53 /* Additional specs */ + &asn_SPC_E2setupFailureIEs_specs_125 /* 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), +static asn_TYPE_member_t asn_MBR_value_132[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_IEs__value, choice.TransactionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RANfunctionID, + &asn_DEF_TransactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionID" + "TransactionID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcallProcessID), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_IEs__value, choice.E2connectionUpdate_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICcallProcessID, + &asn_DEF_E2connectionUpdate_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcallProcessID" + "E2connectionUpdate-List" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolStatus), - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_IEs__value, choice.E2connectionUpdateRemove_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICcontrolStatus, + &asn_DEF_E2connectionUpdateRemove_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcontrolStatus" + "E2connectionUpdateRemove-List" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolOutcome), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_IEs__value, choice.E2connectionUpdate_List_1), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICcontrolOutcome, + &asn_DEF_E2connectionUpdate_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcontrolOutcome" + "E2connectionUpdate-List" }, }; -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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_132[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 2 }, /* E2connectionUpdate-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* E2connectionUpdateRemove-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* E2connectionUpdate-List */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_132 = { + sizeof(struct E2connectionUpdate_IEs__value), + offsetof(struct E2connectionUpdate_IEs__value, _asn_ctx), + offsetof(struct E2connectionUpdate_IEs__value, present), + sizeof(((struct E2connectionUpdate_IEs__value *)0)->present), + asn_MAP_value_tag2el_132, + 4, /* 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_60 = { +asn_TYPE_descriptor_t asn_DEF_value_132 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6047,145 +13518,182 @@ asn_TYPE_descriptor_t asn_DEF_value_60 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_132, + 4, /* Elements count */ + &asn_SPC_value_specs_132 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_57[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, id), +asn_TYPE_member_t asn_MBR_E2connectionUpdate_IEs_129[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_130, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_130, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_129 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_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 }, + select_E2connectionUpdate_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_131, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_131, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_129 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdate_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 }, + &asn_DEF_value_132, + select_E2connectionUpdate_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_132, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_132, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_129 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_IEs_tags_57[] = { +static const ber_tlv_tag_t asn_DEF_E2connectionUpdate_IEs_tags_129[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolAcknowledge_IEs_tag2el_57[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdate_IEs_tag2el_129[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdate_IEs_specs_129 = { + sizeof(struct E2connectionUpdate_IEs), + offsetof(struct E2connectionUpdate_IEs, _asn_ctx), + asn_MAP_E2connectionUpdate_IEs_tag2el_129, 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_TYPE_descriptor_t asn_DEF_E2connectionUpdate_IEs = { + "E2connectionUpdate-IEs", + "E2connectionUpdate-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, + asn_DEF_E2connectionUpdate_IEs_tags_129, + sizeof(asn_DEF_E2connectionUpdate_IEs_tags_129) + /sizeof(asn_DEF_E2connectionUpdate_IEs_tags_129[0]), /* 1 */ + asn_DEF_E2connectionUpdate_IEs_tags_129, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdate_IEs_tags_129) + /sizeof(asn_DEF_E2connectionUpdate_IEs_tags_129[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdate_IEs_129, 3, /* Elements count */ - &asn_SPC_RICcontrolAcknowledge_IEs_specs_57 /* Additional specs */ + &asn_SPC_E2connectionUpdate_IEs_specs_129 /* 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), +static asn_TYPE_member_t asn_MBR_value_136[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateAck_IEs__value, choice.TransactionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RANfunctionID, + &asn_DEF_TransactionID, 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "RANfunctionID" + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 }, - { 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" + "TransactionID" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.Cause), - -1 /* Ambiguous tag (CHOICE?) */, + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateAck_IEs__value, choice.E2connectionUpdate_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_Cause, + &asn_DEF_E2connectionUpdate_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "Cause" + "E2connectionUpdate-List" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICcontrolOutcome), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateAck_IEs__value, choice.E2connectionSetupFailed_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RICcontrolOutcome, + &asn_DEF_E2connectionSetupFailed_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RICcontrolOutcome" + "E2connectionSetupFailed-List" }, }; -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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_136[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* E2connectionUpdate-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* E2connectionSetupFailed-List */ }; -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, +static asn_CHOICE_specifics_t asn_SPC_value_specs_136 = { + sizeof(struct E2connectionUpdateAck_IEs__value), + offsetof(struct E2connectionUpdateAck_IEs__value, _asn_ctx), + offsetof(struct E2connectionUpdateAck_IEs__value, present), + sizeof(((struct E2connectionUpdateAck_IEs__value *)0)->present), + asn_MAP_value_tag2el_136, + 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_64 = { +asn_TYPE_descriptor_t asn_DEF_value_136 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6193,135 +13701,208 @@ asn_TYPE_descriptor_t asn_DEF_value_64 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_136, + 3, /* Elements count */ + &asn_SPC_value_specs_136 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_61[] = { - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, id), +asn_TYPE_member_t asn_MBR_E2connectionUpdateAck_IEs_133[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateAck_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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_134, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_134, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_133 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateAck_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 }, + select_E2connectionUpdateAck_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_135, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_135, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_133 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateAck_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 }, + &asn_DEF_value_136, + select_E2connectionUpdateAck_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_136, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_136, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_133 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_IEs_tags_61[] = { +static const ber_tlv_tag_t asn_DEF_E2connectionUpdateAck_IEs_tags_133[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICcontrolFailure_IEs_tag2el_61[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdateAck_IEs_tag2el_133[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateAck_IEs_specs_133 = { + sizeof(struct E2connectionUpdateAck_IEs), + offsetof(struct E2connectionUpdateAck_IEs, _asn_ctx), + asn_MAP_E2connectionUpdateAck_IEs_tag2el_133, 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_TYPE_descriptor_t asn_DEF_E2connectionUpdateAck_IEs = { + "E2connectionUpdateAck-IEs", + "E2connectionUpdateAck-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, + asn_DEF_E2connectionUpdateAck_IEs_tags_133, + sizeof(asn_DEF_E2connectionUpdateAck_IEs_tags_133) + /sizeof(asn_DEF_E2connectionUpdateAck_IEs_tags_133[0]), /* 1 */ + asn_DEF_E2connectionUpdateAck_IEs_tags_133, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdateAck_IEs_tags_133) + /sizeof(asn_DEF_E2connectionUpdateAck_IEs_tags_133[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdateAck_IEs_133, 3, /* Elements count */ - &asn_SPC_RICcontrolFailure_IEs_specs_61 /* Additional specs */ + &asn_SPC_E2connectionUpdateAck_IEs_specs_133 /* 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), +static asn_TYPE_member_t asn_MBR_value_140[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure_IEs__value, choice.TransactionID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RANfunctionID, + &asn_DEF_TransactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionID" + "TransactionID" }, - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.Cause), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure_IEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Cause, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "Cause" }, - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.CriticalityDiagnostics), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure_IEs__value, choice.TimeToWait), + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), + 0, + &asn_DEF_TimeToWait, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TimeToWait" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure_IEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_CriticalityDiagnostics, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, +static const unsigned asn_MAP_value_to_canonical_140[] = { 0, 2, 3, 1 }; +static const unsigned asn_MAP_value_from_canonical_140[] = { 0, 3, 1, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_140[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 }, /* TimeToWait */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 1, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_140 = { + sizeof(struct E2connectionUpdateFailure_IEs__value), + offsetof(struct E2connectionUpdateFailure_IEs__value, _asn_ctx), + offsetof(struct E2connectionUpdateFailure_IEs__value, present), + sizeof(((struct E2connectionUpdateFailure_IEs__value *)0)->present), + asn_MAP_value_tag2el_140, + 9, /* Count of tags in the map */ + asn_MAP_value_to_canonical_140, + asn_MAP_value_from_canonical_140, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_68 = { +asn_TYPE_descriptor_t asn_DEF_value_140 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6329,114 +13910,242 @@ asn_TYPE_descriptor_t asn_DEF_value_68 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, - asn_MBR_value_68, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_140, 4, /* Elements count */ - &asn_SPC_value_specs_68 /* Additional specs */ + &asn_SPC_value_specs_140 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_65[] = { - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, id), +asn_TYPE_member_t asn_MBR_E2connectionUpdateFailure_IEs_137[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure_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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_138, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_138, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_137 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure_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 }, + select_E2connectionUpdateFailure_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_139, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_139, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_137 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2connectionUpdateFailure_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 }, + &asn_DEF_value_140, + select_E2connectionUpdateFailure_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_140, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_140, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_137 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_ErrorIndication_IEs_tags_65[] = { +static const ber_tlv_tag_t asn_DEF_E2connectionUpdateFailure_IEs_tags_137[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_IEs_tag2el_65[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2connectionUpdateFailure_IEs_tag2el_137[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2connectionUpdateFailure_IEs_specs_137 = { + sizeof(struct E2connectionUpdateFailure_IEs), + offsetof(struct E2connectionUpdateFailure_IEs, _asn_ctx), + asn_MAP_E2connectionUpdateFailure_IEs_tag2el_137, 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_TYPE_descriptor_t asn_DEF_E2connectionUpdateFailure_IEs = { + "E2connectionUpdateFailure-IEs", + "E2connectionUpdateFailure-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, + asn_DEF_E2connectionUpdateFailure_IEs_tags_137, + sizeof(asn_DEF_E2connectionUpdateFailure_IEs_tags_137) + /sizeof(asn_DEF_E2connectionUpdateFailure_IEs_tags_137[0]), /* 1 */ + asn_DEF_E2connectionUpdateFailure_IEs_tags_137, /* Same as above */ + sizeof(asn_DEF_E2connectionUpdateFailure_IEs_tags_137) + /sizeof(asn_DEF_E2connectionUpdateFailure_IEs_tags_137[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdateFailure_IEs_137, 3, /* Elements count */ - &asn_SPC_ErrorIndication_IEs_specs_65 /* Additional specs */ + &asn_SPC_E2connectionUpdateFailure_IEs_specs_137 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_72[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.GlobalE2node_ID), +static asn_TYPE_member_t asn_MBR_value_144[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs__value, choice.GlobalE2node_ID), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_GlobalE2node_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "GlobalE2node-ID" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.RANfunctions_List), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs__value, choice.E2nodeComponentConfigAddition_List), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RANfunctions_List, + &asn_DEF_E2nodeComponentConfigAddition_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctions-List" + "E2nodeComponentConfigAddition-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, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs__value, choice.E2nodeComponentConfigUpdate_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigUpdate_List, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigUpdate-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs__value, choice.E2nodeComponentConfigRemoval_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeComponentConfigRemoval_List, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeComponentConfigRemoval-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs__value, choice.E2nodeTNLassociationRemoval_List), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeTNLassociationRemoval_List, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeTNLassociationRemoval-List" + }, +}; +static const unsigned asn_MAP_value_to_canonical_144[] = { 0, 2, 3, 4, 5, 1 }; +static const unsigned asn_MAP_value_from_canonical_144[] = { 0, 5, 1, 2, 3, 4 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_144[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 3 }, /* E2nodeComponentConfigAddition-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 2 }, /* E2nodeComponentConfigUpdate-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 1 }, /* E2nodeComponentConfigRemoval-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -3, 0 }, /* E2nodeTNLassociationRemoval-List */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* gNB */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* en-gNB */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* ng-eNB */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* eNB */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_144 = { + sizeof(struct E2nodeConfigurationUpdate_IEs__value), + offsetof(struct E2nodeConfigurationUpdate_IEs__value, _asn_ctx), + offsetof(struct E2nodeConfigurationUpdate_IEs__value, present), + sizeof(((struct E2nodeConfigurationUpdate_IEs__value *)0)->present), + asn_MAP_value_tag2el_144, + 9, /* Count of tags in the map */ + asn_MAP_value_to_canonical_144, + asn_MAP_value_from_canonical_144, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_72 = { +asn_TYPE_descriptor_t asn_DEF_value_144 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6444,118 +14153,200 @@ asn_TYPE_descriptor_t asn_DEF_value_72 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_144, + 6, /* Elements count */ + &asn_SPC_value_specs_144 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_E2setupRequestIEs_69[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, id), +asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdate_IEs_141[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_142, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_142, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_141 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs, 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 }, + select_E2nodeConfigurationUpdate_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_143, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_143, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_141 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdate_IEs, 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 }, + &asn_DEF_value_144, + select_E2nodeConfigurationUpdate_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_144, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_144, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_141 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_E2setupRequestIEs_tags_69[] = { +static const ber_tlv_tag_t asn_DEF_E2nodeConfigurationUpdate_IEs_tags_141[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_E2setupRequestIEs_tag2el_69[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2nodeConfigurationUpdate_IEs_tag2el_141[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdate_IEs_specs_141 = { + sizeof(struct E2nodeConfigurationUpdate_IEs), + offsetof(struct E2nodeConfigurationUpdate_IEs, _asn_ctx), + asn_MAP_E2nodeConfigurationUpdate_IEs_tag2el_141, 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_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdate_IEs = { + "E2nodeConfigurationUpdate-IEs", + "E2nodeConfigurationUpdate-IEs", &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, + asn_DEF_E2nodeConfigurationUpdate_IEs_tags_141, + sizeof(asn_DEF_E2nodeConfigurationUpdate_IEs_tags_141) + /sizeof(asn_DEF_E2nodeConfigurationUpdate_IEs_tags_141[0]), /* 1 */ + asn_DEF_E2nodeConfigurationUpdate_IEs_tags_141, /* Same as above */ + sizeof(asn_DEF_E2nodeConfigurationUpdate_IEs_tags_141) + /sizeof(asn_DEF_E2nodeConfigurationUpdate_IEs_tags_141[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeConfigurationUpdate_IEs_141, 3, /* Elements count */ - &asn_SPC_E2setupRequestIEs_specs_69 /* Additional specs */ + &asn_SPC_E2nodeConfigurationUpdate_IEs_specs_141 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_76[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.GlobalRIC_ID), +static asn_TYPE_member_t asn_MBR_value_148[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs__value, choice.E2nodeComponentConfigAdditionAck_List), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_GlobalRIC_ID, + &asn_DEF_E2nodeComponentConfigAdditionAck_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "GlobalRIC-ID" + "E2nodeComponentConfigAdditionAck-List" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsID_List), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs__value, choice.E2nodeComponentConfigUpdateAck_List), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RANfunctionsID_List, + &asn_DEF_E2nodeComponentConfigUpdateAck_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionsID-List" + "E2nodeComponentConfigUpdateAck-List" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsIDcause_List), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs__value, choice.E2nodeComponentConfigRemovalAck_List), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_RANfunctionsIDcause_List, + &asn_DEF_E2nodeComponentConfigRemovalAck_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionsIDcause-List" + "E2nodeComponentConfigRemovalAck-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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_148[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 2 }, /* E2nodeComponentConfigAdditionAck-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* E2nodeComponentConfigUpdateAck-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* E2nodeComponentConfigRemovalAck-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 */ +static asn_CHOICE_specifics_t asn_SPC_value_specs_148 = { + sizeof(struct E2nodeConfigurationUpdateAcknowledge_IEs__value), + offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs__value, _asn_ctx), + offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs__value, present), + sizeof(((struct E2nodeConfigurationUpdateAcknowledge_IEs__value *)0)->present), + asn_MAP_value_tag2el_148, + 4, /* 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 = { +asn_TYPE_descriptor_t asn_DEF_value_148 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6563,125 +14354,208 @@ asn_TYPE_descriptor_t asn_DEF_value_76 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_148, + 4, /* Elements count */ + &asn_SPC_value_specs_148 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_E2setupResponseIEs_73[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, id), +asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateAcknowledge_IEs_145[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_146, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_146, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_145 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs, 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 }, + select_E2nodeConfigurationUpdateAcknowledge_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_147, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_147, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_145 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs, 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 }, + &asn_DEF_value_148, + select_E2nodeConfigurationUpdateAcknowledge_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_148, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_148, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_145 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_E2setupResponseIEs_tags_73[] = { +static const ber_tlv_tag_t asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs_tags_145[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_E2setupResponseIEs_tag2el_73[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2nodeConfigurationUpdateAcknowledge_IEs_tag2el_145[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateAcknowledge_IEs_specs_145 = { + sizeof(struct E2nodeConfigurationUpdateAcknowledge_IEs), + offsetof(struct E2nodeConfigurationUpdateAcknowledge_IEs, _asn_ctx), + asn_MAP_E2nodeConfigurationUpdateAcknowledge_IEs_tag2el_145, 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_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs = { + "E2nodeConfigurationUpdateAcknowledge-IEs", + "E2nodeConfigurationUpdateAcknowledge-IEs", &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, + asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs_tags_145, + sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs_tags_145) + /sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs_tags_145[0]), /* 1 */ + asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs_tags_145, /* Same as above */ + sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs_tags_145) + /sizeof(asn_DEF_E2nodeConfigurationUpdateAcknowledge_IEs_tags_145[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeConfigurationUpdateAcknowledge_IEs_145, 3, /* Elements count */ - &asn_SPC_E2setupResponseIEs_specs_73 /* Additional specs */ + &asn_SPC_E2nodeConfigurationUpdateAcknowledge_IEs_specs_145 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_80[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.Cause), +static asn_TYPE_member_t asn_MBR_value_152[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure_IEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Cause, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "Cause" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.TimeToWait), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure_IEs__value, choice.TimeToWait), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_TimeToWait, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "TimeToWait" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.CriticalityDiagnostics), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure_IEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_CriticalityDiagnostics, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, +static const unsigned asn_MAP_value_to_canonical_152[] = { 0, 2, 3, 1 }; +static const unsigned asn_MAP_value_from_canonical_152[] = { 0, 3, 1, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_152[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 }, /* TimeToWait */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 1, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_152 = { + sizeof(struct E2nodeConfigurationUpdateFailure_IEs__value), + offsetof(struct E2nodeConfigurationUpdateFailure_IEs__value, _asn_ctx), + offsetof(struct E2nodeConfigurationUpdateFailure_IEs__value, present), + sizeof(((struct E2nodeConfigurationUpdateFailure_IEs__value *)0)->present), + asn_MAP_value_tag2el_152, + 9, /* Count of tags in the map */ + asn_MAP_value_to_canonical_152, + asn_MAP_value_from_canonical_152, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_80 = { +asn_TYPE_descriptor_t asn_DEF_value_152 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6689,102 +14563,169 @@ asn_TYPE_descriptor_t asn_DEF_value_80 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_152, + 4, /* Elements count */ + &asn_SPC_value_specs_152 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_E2setupFailureIEs_77[] = { - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, id), +asn_TYPE_member_t asn_MBR_E2nodeConfigurationUpdateFailure_IEs_149[] = { + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure_IEs, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_150, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_150, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_149 + }, 0, 0, /* No default value */ "id" }, - { ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, criticality), + { ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure_IEs, 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 }, + select_E2nodeConfigurationUpdateFailure_IEs_criticality_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_151, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_151, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_149 + }, 0, 0, /* No default value */ "criticality" }, - { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, value), + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2nodeConfigurationUpdateFailure_IEs, 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 }, + &asn_DEF_value_152, + select_E2nodeConfigurationUpdateFailure_IEs_value_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_152, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_152, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_149 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_E2setupFailureIEs_tags_77[] = { +static const ber_tlv_tag_t asn_DEF_E2nodeConfigurationUpdateFailure_IEs_tags_149[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_E2setupFailureIEs_tag2el_77[] = { +static const asn_TYPE_tag2member_t asn_MAP_E2nodeConfigurationUpdateFailure_IEs_tag2el_149[] = { { (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, +asn_SEQUENCE_specifics_t asn_SPC_E2nodeConfigurationUpdateFailure_IEs_specs_149 = { + sizeof(struct E2nodeConfigurationUpdateFailure_IEs), + offsetof(struct E2nodeConfigurationUpdateFailure_IEs, _asn_ctx), + asn_MAP_E2nodeConfigurationUpdateFailure_IEs_tag2el_149, 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_TYPE_descriptor_t asn_DEF_E2nodeConfigurationUpdateFailure_IEs = { + "E2nodeConfigurationUpdateFailure-IEs", + "E2nodeConfigurationUpdateFailure-IEs", &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, + asn_DEF_E2nodeConfigurationUpdateFailure_IEs_tags_149, + sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_IEs_tags_149) + /sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_IEs_tags_149[0]), /* 1 */ + asn_DEF_E2nodeConfigurationUpdateFailure_IEs_tags_149, /* Same as above */ + sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_IEs_tags_149) + /sizeof(asn_DEF_E2nodeConfigurationUpdateFailure_IEs_tags_149[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeConfigurationUpdateFailure_IEs_149, 3, /* Elements count */ - &asn_SPC_E2setupFailureIEs_specs_77 /* Additional specs */ + &asn_SPC_E2nodeConfigurationUpdateFailure_IEs_specs_149 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_84[] = { +static asn_TYPE_member_t asn_MBR_value_156[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, { ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Cause, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_156[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 1, 0, 0 } /* misc */ }; -static asn_CHOICE_specifics_t asn_SPC_value_specs_84 = { +static asn_CHOICE_specifics_t asn_SPC_value_specs_156 = { 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 */ + asn_MAP_value_tag2el_156, + 7, /* 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 = { +asn_TYPE_descriptor_t asn_DEF_value_156 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6792,19 +14733,35 @@ asn_TYPE_descriptor_t asn_DEF_value_84 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_156, + 2, /* Elements count */ + &asn_SPC_value_specs_156 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ResetRequestIEs_81[] = { +asn_TYPE_member_t asn_MBR_ResetRequestIEs_153[] = { { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_154, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_154, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_153 + }, 0, 0, /* No default value */ "id" }, @@ -6813,31 +14770,47 @@ asn_TYPE_member_t asn_MBR_ResetRequestIEs_81[] = { 0, &asn_DEF_Criticality, select_ResetRequestIEs_criticality_type, - { &asn_OER_memb_criticality_constr_83, &asn_PER_memb_criticality_constr_83, memb_criticality_constraint_81 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_155, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_155, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_153 + }, 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, + &asn_DEF_value_156, select_ResetRequestIEs_value_type, - { &asn_OER_memb_value_constr_84, &asn_PER_memb_value_constr_84, memb_value_constraint_81 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_156, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_156, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_153 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_ResetRequestIEs_tags_81[] = { +static const ber_tlv_tag_t asn_DEF_ResetRequestIEs_tags_153[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_ResetRequestIEs_tag2el_81[] = { +static const asn_TYPE_tag2member_t asn_MAP_ResetRequestIEs_tag2el_153[] = { { (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 = { +asn_SEQUENCE_specifics_t asn_SPC_ResetRequestIEs_specs_153 = { sizeof(struct ResetRequestIEs), offsetof(struct ResetRequestIEs, _asn_ctx), - asn_MAP_ResetRequestIEs_tag2el_81, + asn_MAP_ResetRequestIEs_tag2el_153, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ @@ -6846,44 +14819,78 @@ 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, + asn_DEF_ResetRequestIEs_tags_153, + sizeof(asn_DEF_ResetRequestIEs_tags_153) + /sizeof(asn_DEF_ResetRequestIEs_tags_153[0]), /* 1 */ + asn_DEF_ResetRequestIEs_tags_153, /* Same as above */ + sizeof(asn_DEF_ResetRequestIEs_tags_153) + /sizeof(asn_DEF_ResetRequestIEs_tags_153[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_ResetRequestIEs_153, 3, /* Elements count */ - &asn_SPC_ResetRequestIEs_specs_81 /* Additional specs */ + &asn_SPC_ResetRequestIEs_specs_153 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_88[] = { +static asn_TYPE_member_t asn_MBR_value_160[] = { + { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, { ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_CriticalityDiagnostics, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_160[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* CriticalityDiagnostics */ }; -static asn_CHOICE_specifics_t asn_SPC_value_specs_88 = { +static asn_CHOICE_specifics_t asn_SPC_value_specs_160 = { 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 */ + asn_MAP_value_tag2el_160, + 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_88 = { +asn_TYPE_descriptor_t asn_DEF_value_160 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -6891,19 +14898,35 @@ asn_TYPE_descriptor_t asn_DEF_value_88 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_160, + 2, /* Elements count */ + &asn_SPC_value_specs_160 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_ResetResponseIEs_85[] = { +asn_TYPE_member_t asn_MBR_ResetResponseIEs_157[] = { { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_158, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_158, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_157 + }, 0, 0, /* No default value */ "id" }, @@ -6912,31 +14935,47 @@ asn_TYPE_member_t asn_MBR_ResetResponseIEs_85[] = { 0, &asn_DEF_Criticality, select_ResetResponseIEs_criticality_type, - { &asn_OER_memb_criticality_constr_87, &asn_PER_memb_criticality_constr_87, memb_criticality_constraint_85 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_159, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_159, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_157 + }, 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, + &asn_DEF_value_160, select_ResetResponseIEs_value_type, - { &asn_OER_memb_value_constr_88, &asn_PER_memb_value_constr_88, memb_value_constraint_85 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_160, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_160, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_157 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_ResetResponseIEs_tags_85[] = { +static const ber_tlv_tag_t asn_DEF_ResetResponseIEs_tags_157[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_ResetResponseIEs_tag2el_85[] = { +static const asn_TYPE_tag2member_t asn_MAP_ResetResponseIEs_tag2el_157[] = { { (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 = { +asn_SEQUENCE_specifics_t asn_SPC_ResetResponseIEs_specs_157 = { sizeof(struct ResetResponseIEs), offsetof(struct ResetResponseIEs, _asn_ctx), - asn_MAP_ResetResponseIEs_tag2el_85, + asn_MAP_ResetResponseIEs_tag2el_157, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ @@ -6945,25 +14984,75 @@ 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, + asn_DEF_ResetResponseIEs_tags_157, + sizeof(asn_DEF_ResetResponseIEs_tags_157) + /sizeof(asn_DEF_ResetResponseIEs_tags_157[0]), /* 1 */ + asn_DEF_ResetResponseIEs_tags_157, /* Same as above */ + sizeof(asn_DEF_ResetResponseIEs_tags_157) + /sizeof(asn_DEF_ResetResponseIEs_tags_157[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_ResetResponseIEs_157, 3, /* Elements count */ - &asn_SPC_ResetResponseIEs_specs_85 /* Additional specs */ + &asn_SPC_ResetResponseIEs_specs_157 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_92[] = { +static asn_TYPE_member_t asn_MBR_value_164[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "RANfunctions-List" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.RANfunctions_List_1), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_RANfunctions_List, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RANfunctions-List" }, @@ -6972,27 +15061,37 @@ static asn_TYPE_member_t asn_MBR_value_92[] = { 0, &asn_DEF_RANfunctionsID_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_164[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 2 }, /* RANfunctions-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* RANfunctions-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* RANfunctionsID-List */ }; -static asn_CHOICE_specifics_t asn_SPC_value_specs_92 = { +static asn_CHOICE_specifics_t asn_SPC_value_specs_164 = { 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 */ + asn_MAP_value_tag2el_164, + 4, /* 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 = { +asn_TYPE_descriptor_t asn_DEF_value_164 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -7000,19 +15099,35 @@ asn_TYPE_descriptor_t asn_DEF_value_92 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_164, + 4, /* Elements count */ + &asn_SPC_value_specs_164 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_89[] = { +asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_161[] = { { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_162, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_162, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_161 + }, 0, 0, /* No default value */ "id" }, @@ -7021,31 +15136,47 @@ asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_89[] = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_163, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_163, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_161 + }, 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, + &asn_DEF_value_164, select_RICserviceUpdate_IEs_value_type, - { &asn_OER_memb_value_constr_92, &asn_PER_memb_value_constr_92, memb_value_constraint_89 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_164, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_164, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_161 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_IEs_tags_89[] = { +static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_IEs_tags_161[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdate_IEs_tag2el_89[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdate_IEs_tag2el_161[] = { { (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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_IEs_specs_161 = { sizeof(struct RICserviceUpdate_IEs), offsetof(struct RICserviceUpdate_IEs, _asn_ctx), - asn_MAP_RICserviceUpdate_IEs_tag2el_89, + asn_MAP_RICserviceUpdate_IEs_tag2el_161, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ @@ -7054,25 +15185,58 @@ 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, + asn_DEF_RICserviceUpdate_IEs_tags_161, + sizeof(asn_DEF_RICserviceUpdate_IEs_tags_161) + /sizeof(asn_DEF_RICserviceUpdate_IEs_tags_161[0]), /* 1 */ + asn_DEF_RICserviceUpdate_IEs_tags_161, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdate_IEs_tags_161) + /sizeof(asn_DEF_RICserviceUpdate_IEs_tags_161[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICserviceUpdate_IEs_161, 3, /* Elements count */ - &asn_SPC_RICserviceUpdate_IEs_specs_89 /* Additional specs */ + &asn_SPC_RICserviceUpdate_IEs_specs_161 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_96[] = { +static asn_TYPE_member_t asn_MBR_value_168[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RANfunctionsID-List" }, @@ -7081,27 +15245,36 @@ static asn_TYPE_member_t asn_MBR_value_96[] = { 0, &asn_DEF_RANfunctionsIDcause_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_168[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* RANfunctionsID-List */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* RANfunctionsIDcause-List */ }; -static asn_CHOICE_specifics_t asn_SPC_value_specs_96 = { +static asn_CHOICE_specifics_t asn_SPC_value_specs_168 = { 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 */ + asn_MAP_value_tag2el_168, + 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_96 = { +asn_TYPE_descriptor_t asn_DEF_value_168 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -7109,19 +15282,35 @@ asn_TYPE_descriptor_t asn_DEF_value_96 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_168, + 3, /* Elements count */ + &asn_SPC_value_specs_168 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_93[] = { +asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_165[] = { { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_166, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_166, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_165 + }, 0, 0, /* No default value */ "id" }, @@ -7130,31 +15319,47 @@ asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_93[] = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_167, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_167, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_165 + }, 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, + &asn_DEF_value_168, select_RICserviceUpdateAcknowledge_IEs_value_type, - { &asn_OER_memb_value_constr_96, &asn_PER_memb_value_constr_96, memb_value_constraint_93 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_168, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_168, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_165 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[] = { +static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_165[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_165[] = { { (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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_165 = { sizeof(struct RICserviceUpdateAcknowledge_IEs), offsetof(struct RICserviceUpdateAcknowledge_IEs, _asn_ctx), - asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93, + asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_165, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ @@ -7163,34 +15368,75 @@ 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, + asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_165, + sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_165) + /sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_165[0]), /* 1 */ + asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_165, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_165) + /sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_165[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICserviceUpdateAcknowledge_IEs_165, 3, /* Elements count */ - &asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93 /* Additional specs */ + &asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_165 /* 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)), +static asn_TYPE_member_t asn_MBR_value_172[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, - &asn_DEF_RANfunctionsIDcause_List, + &asn_DEF_TransactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "RANfunctionsIDcause-List" + "TransactionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.Cause), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Cause, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.TimeToWait), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_TimeToWait, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "TimeToWait" }, @@ -7199,31 +15445,45 @@ static asn_TYPE_member_t asn_MBR_value_100[] = { 0, &asn_DEF_CriticalityDiagnostics, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 = { +static const unsigned asn_MAP_value_to_canonical_172[] = { 0, 2, 3, 1 }; +static const unsigned asn_MAP_value_from_canonical_172[] = { 0, 3, 1, 2 }; +static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_172[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 }, /* TimeToWait */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* ricRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* e2Node */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* transport */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* protocol */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 1, 0, 0 } /* misc */ +}; +static asn_CHOICE_specifics_t asn_SPC_value_specs_172 = { 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, + asn_MAP_value_tag2el_172, + 9, /* Count of tags in the map */ + asn_MAP_value_to_canonical_172, + asn_MAP_value_from_canonical_172, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_value_100 = { +asn_TYPE_descriptor_t asn_DEF_value_172 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -7231,19 +15491,35 @@ asn_TYPE_descriptor_t asn_DEF_value_100 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_172, + 4, /* Elements count */ + &asn_SPC_value_specs_172 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_97[] = { +asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_169[] = { { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_170, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_170, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_169 + }, 0, 0, /* No default value */ "id" }, @@ -7252,31 +15528,47 @@ asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_97[] = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_171, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_171, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_169 + }, 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, + &asn_DEF_value_172, select_RICserviceUpdateFailure_IEs_value_type, - { &asn_OER_memb_value_constr_100, &asn_PER_memb_value_constr_100, memb_value_constraint_97 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_172, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_172, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_169 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_IEs_tags_97[] = { +static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_IEs_tags_169[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateFailure_IEs_tag2el_169[] = { { (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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_IEs_specs_169 = { sizeof(struct RICserviceUpdateFailure_IEs), offsetof(struct RICserviceUpdateFailure_IEs, _asn_ctx), - asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97, + asn_MAP_RICserviceUpdateFailure_IEs_tag2el_169, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ @@ -7285,44 +15577,78 @@ 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, + asn_DEF_RICserviceUpdateFailure_IEs_tags_169, + sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_169) + /sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_169[0]), /* 1 */ + asn_DEF_RICserviceUpdateFailure_IEs_tags_169, /* Same as above */ + sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_169) + /sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_169[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICserviceUpdateFailure_IEs_169, 3, /* Elements count */ - &asn_SPC_RICserviceUpdateFailure_IEs_specs_97 /* Additional specs */ + &asn_SPC_RICserviceUpdateFailure_IEs_specs_169 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_value_104[] = { +static asn_TYPE_member_t asn_MBR_value_176[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs__value, choice.TransactionID), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_TransactionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "TransactionID" + }, { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 const asn_TYPE_tag2member_t asn_MAP_value_tag2el_176[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* TransactionID */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* RANfunctionsID-List */ }; -static asn_CHOICE_specifics_t asn_SPC_value_specs_104 = { +static asn_CHOICE_specifics_t asn_SPC_value_specs_176 = { 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 */ + asn_MAP_value_tag2el_176, + 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_104 = { +asn_TYPE_descriptor_t asn_DEF_value_176 = { "value", "value", &asn_OP_OPEN_TYPE, @@ -7330,19 +15656,35 @@ asn_TYPE_descriptor_t asn_DEF_value_104 = { 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 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_value_176, + 2, /* Elements count */ + &asn_SPC_value_specs_176 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_101[] = { +asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_173[] = { { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_id_constr_174, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_id_constr_174, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_id_constraint_173 + }, 0, 0, /* No default value */ "id" }, @@ -7351,31 +15693,47 @@ asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_101[] = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_175, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_175, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_173 + }, 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, + &asn_DEF_value_176, select_RICserviceQuery_IEs_value_type, - { &asn_OER_memb_value_constr_104, &asn_PER_memb_value_constr_104, memb_value_constraint_101 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_176, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_176, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_173 + }, 0, 0, /* No default value */ "value" }, }; -static const ber_tlv_tag_t asn_DEF_RICserviceQuery_IEs_tags_101[] = { +static const ber_tlv_tag_t asn_DEF_RICserviceQuery_IEs_tags_173[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_RICserviceQuery_IEs_tag2el_101[] = { +static const asn_TYPE_tag2member_t asn_MAP_RICserviceQuery_IEs_tag2el_173[] = { { (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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_IEs_specs_173 = { sizeof(struct RICserviceQuery_IEs), offsetof(struct RICserviceQuery_IEs, _asn_ctx), - asn_MAP_RICserviceQuery_IEs_tag2el_101, + asn_MAP_RICserviceQuery_IEs_tag2el_173, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ @@ -7384,15 +15742,23 @@ 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, + asn_DEF_RICserviceQuery_IEs_tags_173, + sizeof(asn_DEF_RICserviceQuery_IEs_tags_173) + /sizeof(asn_DEF_RICserviceQuery_IEs_tags_173[0]), /* 1 */ + asn_DEF_RICserviceQuery_IEs_tags_173, /* Same as above */ + sizeof(asn_DEF_RICserviceQuery_IEs_tags_173) + /sizeof(asn_DEF_RICserviceQuery_IEs_tags_173[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICserviceQuery_IEs_173, 3, /* Elements count */ - &asn_SPC_RICserviceQuery_IEs_specs_101 /* Additional specs */ + &asn_SPC_RICserviceQuery_IEs_specs_173 /* Additional specs */ }; diff --git a/e2ap/lib/ProtocolIE-FieldPair.c b/e2ap/lib/ProtocolIE-FieldPair.c index fa909ca..87a45dc 100644 --- a/e2ap/lib/ProtocolIE-FieldPair.c +++ b/e2ap/lib/ProtocolIE-FieldPair.c @@ -1,8 +1,8 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-FieldPair.h" diff --git a/e2ap/lib/ProtocolIE-ID.c b/e2ap/lib/ProtocolIE-ID.c index b0e56de..4865d75 100644 --- a/e2ap/lib/ProtocolIE-ID.c +++ b/e2ap/lib/ProtocolIE-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-ID.h" @@ -21,7 +21,7 @@ ProtocolIE_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,14 +36,18 @@ ProtocolIE_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_ProtocolIE_ID_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_ProtocolIE_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -57,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_ProtocolIE_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ProtocolIE_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ProtocolIE_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + ProtocolIE_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/ProtocolIE-SingleContainer.c b/e2ap/lib/ProtocolIE-SingleContainer.c index 5b06b80..4c69f96 100644 --- a/e2ap/lib/ProtocolIE-SingleContainer.c +++ b/e2ap/lib/ProtocolIE-SingleContainer.c @@ -1,8 +1,8 @@ /* * 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` + * found in "containerDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ProtocolIE-SingleContainer.h" @@ -19,6 +19,50 @@ * This type is implemented using RICaction_NotAdmitted_ItemIEs, * so here we adjust the DEF accordingly. */ +/* + * This type is implemented using RICsubscription_withCause_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2connectionUpdate_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2connectionUpdateRemove_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2connectionSetupFailed_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2nodeComponentConfigAddition_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2nodeComponentConfigUpdate_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2nodeComponentConfigRemoval_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2nodeTNLassociationRemoval_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2nodeComponentConfigAdditionAck_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2nodeComponentConfigUpdateAck_ItemIEs, + * so here we adjust the DEF accordingly. + */ +/* + * This type is implemented using E2nodeComponentConfigRemovalAck_ItemIEs, + * so here we adjust the DEF accordingly. + */ /* * This type is implemented using RANfunction_ItemIEs, * so here we adjust the DEF accordingly. @@ -31,117 +75,462 @@ * 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[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P0_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P0 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P0 = { "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_DEF_ProtocolIE_SingleContainer_88P0_tags_1, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P0_tags_1[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P0_tags_1, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P0_tags_1) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P1_tags_2[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P1 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P1 = { "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_DEF_ProtocolIE_SingleContainer_88P1_tags_2, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P1_tags_2) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P1_tags_2[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P1_tags_2, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P1_tags_2) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P2_tags_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P2 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P2 = { "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_DEF_ProtocolIE_SingleContainer_88P2_tags_3, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P2_tags_3) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P2_tags_3[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P2_tags_3, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P2_tags_3) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P2_tags_3[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P3_tags_4[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P3 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P3_tags_4, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P3_tags_4) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P3_tags_4[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P3_tags_4, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P3_tags_4) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P3_tags_4[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscription_withCause_ItemIEs_13, + 3, /* Elements count */ + &asn_SPC_RICsubscription_withCause_ItemIEs_specs_13 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P4_tags_5[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P4 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P4_tags_5, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P4_tags_5) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P4_tags_5[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P4_tags_5, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P4_tags_5) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P4_tags_5[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdate_ItemIEs_17, + 3, /* Elements count */ + &asn_SPC_E2connectionUpdate_ItemIEs_specs_17 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P5_tags_6[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P5 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P5_tags_6, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P5_tags_6) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P5_tags_6[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P5_tags_6, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P5_tags_6) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P5_tags_6[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionUpdateRemove_ItemIEs_21, + 3, /* Elements count */ + &asn_SPC_E2connectionUpdateRemove_ItemIEs_specs_21 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P6_tags_7[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P6 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P6_tags_7, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P6_tags_7) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P6_tags_7[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P6_tags_7, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P6_tags_7) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P6_tags_7[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2connectionSetupFailed_ItemIEs_25, + 3, /* Elements count */ + &asn_SPC_E2connectionSetupFailed_ItemIEs_specs_25 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P7_tags_8[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P7 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P7_tags_8, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P7_tags_8) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P7_tags_8[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P7_tags_8, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P7_tags_8) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P7_tags_8[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigAddition_ItemIEs_29, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigAddition_ItemIEs_specs_29 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P8_tags_9[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P8 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P8_tags_9, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P8_tags_9) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P8_tags_9[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P8_tags_9, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P8_tags_9) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P8_tags_9[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigUpdate_ItemIEs_33, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigUpdate_ItemIEs_specs_33 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P9_tags_10[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P9 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P9_tags_10, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P9_tags_10) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P9_tags_10[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P9_tags_10, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P9_tags_10) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P9_tags_10[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigRemoval_ItemIEs_37, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigRemoval_ItemIEs_specs_37 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P10_tags_11[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P10 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P10_tags_11, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P10_tags_11) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P10_tags_11[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P10_tags_11, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P10_tags_11) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P10_tags_11[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeTNLassociationRemoval_ItemIEs_41, + 3, /* Elements count */ + &asn_SPC_E2nodeTNLassociationRemoval_ItemIEs_specs_41 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P11_tags_12[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P11 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P11_tags_12, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P11_tags_12) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P11_tags_12[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P11_tags_12, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P11_tags_12) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P11_tags_12[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigAdditionAck_ItemIEs_45, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigAdditionAck_ItemIEs_specs_45 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P12_tags_13[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P12 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P12_tags_13, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P12_tags_13) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P12_tags_13[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P12_tags_13, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P12_tags_13) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P12_tags_13[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigUpdateAck_ItemIEs_49, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigUpdateAck_ItemIEs_specs_49 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P13_tags_14[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P13 = { + "ProtocolIE-SingleContainer", + "ProtocolIE-SingleContainer", + &asn_OP_SEQUENCE, + asn_DEF_ProtocolIE_SingleContainer_88P13_tags_14, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P13_tags_14) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P13_tags_14[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P13_tags_14, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P13_tags_14) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P13_tags_14[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_E2nodeComponentConfigRemovalAck_ItemIEs_53, + 3, /* Elements count */ + &asn_SPC_E2nodeComponentConfigRemovalAck_ItemIEs_specs_53 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P14_tags_15[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P3 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P14 = { "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, + asn_DEF_ProtocolIE_SingleContainer_88P14_tags_15, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P14_tags_15) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P14_tags_15[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P14_tags_15, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P14_tags_15) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P14_tags_15[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RANfunction_ItemIEs_57, 3, /* Elements count */ - &asn_SPC_RANfunction_ItemIEs_specs_13 /* Additional specs */ + &asn_SPC_RANfunction_ItemIEs_specs_57 /* Additional specs */ }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P4_tags_5[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P15_tags_16[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P4 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P15 = { "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, + asn_DEF_ProtocolIE_SingleContainer_88P15_tags_16, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P15_tags_16) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P15_tags_16[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P15_tags_16, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P15_tags_16) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P15_tags_16[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RANfunctionID_ItemIEs_61, 3, /* Elements count */ - &asn_SPC_RANfunctionID_ItemIEs_specs_17 /* Additional specs */ + &asn_SPC_RANfunctionID_ItemIEs_specs_61 /* Additional specs */ }; -static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_90P5_tags_6[] = { +static const ber_tlv_tag_t asn_DEF_ProtocolIE_SingleContainer_88P16_tags_17[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_90P5 = { +asn_TYPE_descriptor_t asn_DEF_ProtocolIE_SingleContainer_88P16 = { "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, + asn_DEF_ProtocolIE_SingleContainer_88P16_tags_17, + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P16_tags_17) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P16_tags_17[0]), /* 1 */ + asn_DEF_ProtocolIE_SingleContainer_88P16_tags_17, /* Same as above */ + sizeof(asn_DEF_ProtocolIE_SingleContainer_88P16_tags_17) + /sizeof(asn_DEF_ProtocolIE_SingleContainer_88P16_tags_17[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RANfunctionIDcause_ItemIEs_65, 3, /* Elements count */ - &asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 /* Additional specs */ + &asn_SPC_RANfunctionIDcause_ItemIEs_specs_65 /* Additional specs */ }; diff --git a/e2ap/lib/RANfunction-Item.c b/e2ap/lib/RANfunction-Item.c index f80753b..0c8ea28 100644 --- a/e2ap/lib/RANfunction-Item.c +++ b/e2ap/lib/RANfunction-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunction-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RANfunction_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunctionID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RANfunction_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANfunctionDefinition, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunctionDefinition" }, @@ -31,10 +47,35 @@ asn_TYPE_member_t asn_MBR_RANfunction_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANfunctionRevision, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunctionRevision" }, + { ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionOID), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionOID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ranFunctionOID" + }, }; static const ber_tlv_tag_t asn_DEF_RANfunction_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) @@ -42,15 +83,16 @@ static const ber_tlv_tag_t asn_DEF_RANfunction_Item_tags_1[] = { 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_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranFunctionRevision */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ranFunctionOID */ }; 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 */ + 4, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ - 3, /* First extension addition */ + 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_RANfunction_Item = { "RANfunction-Item", @@ -62,9 +104,17 @@ asn_TYPE_descriptor_t asn_DEF_RANfunction_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RANfunction_Item_1, - 3, /* Elements count */ + 4, /* Elements count */ &asn_SPC_RANfunction_Item_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/RANfunctionDefinition.c b/e2ap/lib/RANfunctionDefinition.c index 49c090f..3a626fb 100644 --- a/e2ap/lib/RANfunctionDefinition.c +++ b/e2ap/lib/RANfunctionDefinition.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctionDefinition.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctionDefinition = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RANfunctionID-Item.c b/e2ap/lib/RANfunctionID-Item.c index fb2b6fc..a359e1c 100644 --- a/e2ap/lib/RANfunctionID-Item.c +++ b/e2ap/lib/RANfunctionID-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctionID-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RANfunctionID_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunctionID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RANfunctionID_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANfunctionRevision, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunctionRevision" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctionID_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RANfunctionID_Item_1, 2, /* Elements count */ &asn_SPC_RANfunctionID_Item_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RANfunctionID.c b/e2ap/lib/RANfunctionID.c index d79a9d6..08295bd 100644 --- a/e2ap/lib/RANfunctionID.c +++ b/e2ap/lib/RANfunctionID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctionID.h" @@ -21,7 +21,7 @@ RANfunctionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 4095)) { + if((value >= 0L && value <= 4095L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,14 +36,18 @@ RANfunctionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RANfunctionID_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..4095) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_RANfunctionID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -57,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctionID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RANfunctionID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RANfunctionID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + RANfunctionID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/RANfunctionIDcause-Item.c b/e2ap/lib/RANfunctionIDcause-Item.c index b74eb64..dae1954 100644 --- a/e2ap/lib/RANfunctionIDcause-Item.c +++ b/e2ap/lib/RANfunctionIDcause-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctionIDcause-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RANfunctionIDcause_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANfunctionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunctionID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RANfunctionIDcause_Item_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_Cause, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "cause" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RANfunctionIDcause_Item_1, 2, /* Elements count */ &asn_SPC_RANfunctionIDcause_Item_specs_1 /* Additional specs */ diff --git a/e2sm/lib/RANcallProcess-ID-string.c b/e2ap/lib/RANfunctionOID.c similarity index 57% rename from e2sm/lib/RANcallProcess-ID-string.c rename to e2ap/lib/RANfunctionOID.c index b49b812..2cacab4 100644 --- a/e2sm/lib/RANcallProcess-ID-string.c +++ b/e2ap/lib/RANfunctionOID.c @@ -1,11 +1,11 @@ /* * 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` + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ -#include "RANcallProcess-ID-string.h" +#include "RANfunctionOID.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, /* */ @@ -40,7 +40,7 @@ static int check_permitted_alphabet_1(const void *sptr) { } int -RANcallProcess_ID_string_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, +RANfunctionOID_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; @@ -54,7 +54,7 @@ RANcallProcess_ID_string_constraint(const asn_TYPE_descriptor_t *td, const void size = st->size; - if((size >= 1 && size <= 150) + if((size >= 1UL && size <= 1000UL) && !check_permitted_alphabet_1(st)) { /* Constraint check succeeded */ return 0; @@ -66,12 +66,12 @@ RANcallProcess_ID_string_constraint(const asn_TYPE_descriptor_t *td, const void } } -static int asn_PER_MAP_RANcallProcess_ID_string_1_v2c(unsigned int value) { +static int asn_PER_MAP_RANfunctionOID_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) { +static int asn_PER_MAP_RANfunctionOID_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]; @@ -80,29 +80,41 @@ static int asn_PER_MAP_RANcallProcess_ID_string_1_c2v(unsigned int 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 = { +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_RANfunctionOID_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 = { +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_RANfunctionOID_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 */ + { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1000 } /* (SIZE(1..1000,...)) */, + asn_PER_MAP_RANfunctionOID_1_v2c, /* Value to PER code map */ + asn_PER_MAP_RANfunctionOID_1_c2v /* PER code to value map */ }; -static const ber_tlv_tag_t asn_DEF_RANcallProcess_ID_string_tags_1[] = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_RANfunctionOID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) }; -asn_TYPE_descriptor_t asn_DEF_RANcallProcess_ID_string = { - "RANcallProcess-ID-string", - "RANcallProcess-ID-string", +asn_TYPE_descriptor_t asn_DEF_RANfunctionOID = { + "RANfunctionOID", + "RANfunctionOID", &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 }, + asn_DEF_RANfunctionOID_tags_1, + sizeof(asn_DEF_RANfunctionOID_tags_1) + /sizeof(asn_DEF_RANfunctionOID_tags_1[0]), /* 1 */ + asn_DEF_RANfunctionOID_tags_1, /* Same as above */ + sizeof(asn_DEF_RANfunctionOID_tags_1) + /sizeof(asn_DEF_RANfunctionOID_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RANfunctionOID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RANfunctionOID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + RANfunctionOID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/RANfunctionRevision.c b/e2ap/lib/RANfunctionRevision.c index 32cc4a5..390cd0f 100644 --- a/e2ap/lib/RANfunctionRevision.c +++ b/e2ap/lib/RANfunctionRevision.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctionRevision.h" @@ -21,7 +21,7 @@ RANfunctionRevision_constraint(const asn_TYPE_descriptor_t *td, const void *sptr value = *(const long *)sptr; - if((value >= 0 && value <= 4095)) { + if((value >= 0L && value <= 4095L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,14 +36,18 @@ RANfunctionRevision_constraint(const asn_TYPE_descriptor_t *td, const void *sptr * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RANfunctionRevision_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..4095) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_RANfunctionRevision_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -57,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctionRevision = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RANfunctionRevision_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RANfunctionRevision_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + RANfunctionRevision_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/RANfunctions-List.c b/e2ap/lib/RANfunctions-List.c index cf01054..d4f0f92 100644 --- a/e2ap/lib/RANfunctions-List.c +++ b/e2ap/lib/RANfunctions-List.c @@ -1,28 +1,40 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctions-List.h" #include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RANfunctions_List_constr_1 CC_NOTUSED = { { 0, 0 }, - -1 /* (SIZE(0..256)) */}; + -1 /* (SIZE(1..256)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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)) */, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + &asn_DEF_ProtocolIE_SingleContainer_88P14, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -45,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctions_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RANfunctions_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RANfunctions_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_RANfunctions_List_1, 1, /* Single element */ &asn_SPC_RANfunctions_List_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RANfunctionsID-List.c b/e2ap/lib/RANfunctionsID-List.c index b888995..00a70d8 100644 --- a/e2ap/lib/RANfunctionsID-List.c +++ b/e2ap/lib/RANfunctionsID-List.c @@ -1,28 +1,40 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctionsID-List.h" #include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RANfunctionsID_List_constr_1 CC_NOTUSED = { { 0, 0 }, - -1 /* (SIZE(0..256)) */}; + -1 /* (SIZE(1..256)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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)) */, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + &asn_DEF_ProtocolIE_SingleContainer_88P15, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -45,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctionsID_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RANfunctionsID_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RANfunctionsID_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_RANfunctionsID_List_1, 1, /* Single element */ &asn_SPC_RANfunctionsID_List_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RANfunctionsIDcause-List.c b/e2ap/lib/RANfunctionsIDcause-List.c index e1ae0d2..16100ba 100644 --- a/e2ap/lib/RANfunctionsIDcause-List.c +++ b/e2ap/lib/RANfunctionsIDcause-List.c @@ -1,28 +1,40 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunctionsIDcause-List.h" #include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RANfunctionsIDcause_List_constr_1 CC_NOTUSED = { { 0, 0 }, - -1 /* (SIZE(0..256)) */}; + -1 /* (SIZE(1..256)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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)) */, + { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + &asn_DEF_ProtocolIE_SingleContainer_88P16, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -45,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunctionsIDcause_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RANfunctionsIDcause_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RANfunctionsIDcause_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_RANfunctionsIDcause_List_1, 1, /* Single element */ &asn_SPC_RANfunctionsIDcause_List_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICaction-Admitted-Item.c b/e2ap/lib/RICaction-Admitted-Item.c index 27e741d..e7d3296 100644 --- a/e2ap/lib/RICaction-Admitted-Item.c +++ b/e2ap/lib/RICaction-Admitted-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICaction-Admitted-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RICaction_Admitted_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricActionID" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICaction_Admitted_Item_1, 1, /* Elements count */ &asn_SPC_RICaction_Admitted_Item_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICaction-Admitted-List.c b/e2ap/lib/RICaction-Admitted-List.c index e9e8a5b..8e5f99c 100644 --- a/e2ap/lib/RICaction-Admitted-List.c +++ b/e2ap/lib/RICaction-Admitted-List.c @@ -1,28 +1,40 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICaction-Admitted-List.h" #include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICaction_Admitted_List_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + &asn_DEF_ProtocolIE_SingleContainer_88P1, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -45,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICaction_Admitted_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICaction_Admitted_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_RICaction_Admitted_List_1, 1, /* Single element */ &asn_SPC_RICaction_Admitted_List_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICaction-NotAdmitted-Item.c b/e2ap/lib/RICaction-NotAdmitted-Item.c index 86212ed..2291aa7 100644 --- a/e2ap/lib/RICaction-NotAdmitted-Item.c +++ b/e2ap/lib/RICaction-NotAdmitted-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICaction-NotAdmitted-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricActionID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_Item_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_Cause, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "cause" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICaction_NotAdmitted_Item_1, 2, /* Elements count */ &asn_SPC_RICaction_NotAdmitted_Item_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICaction-NotAdmitted-List.c b/e2ap/lib/RICaction-NotAdmitted-List.c index 7c7f6e2..3f9e045 100644 --- a/e2ap/lib/RICaction-NotAdmitted-List.c +++ b/e2ap/lib/RICaction-NotAdmitted-List.c @@ -1,28 +1,40 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICaction-NotAdmitted-List.h" #include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICaction_NotAdmitted_List_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + &asn_DEF_ProtocolIE_SingleContainer_88P2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -45,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICaction_NotAdmitted_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICaction_NotAdmitted_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_RICaction_NotAdmitted_List_1, 1, /* Single element */ &asn_SPC_RICaction_NotAdmitted_List_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICaction-ToBeSetup-Item.c b/e2ap/lib/RICaction-ToBeSetup-Item.c index 1e78073..7e71d34 100644 --- a/e2ap/lib/RICaction-ToBeSetup-Item.c +++ b/e2ap/lib/RICaction-ToBeSetup-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICaction-ToBeSetup-Item.h" @@ -14,7 +14,15 @@ asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICactionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricActionID" }, @@ -23,7 +31,15 @@ asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICactionType, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricActionType" }, @@ -32,7 +48,15 @@ asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICactionDefinition, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricActionDefinition" }, @@ -41,7 +65,15 @@ asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICsubsequentAction, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricSubsequentAction" }, @@ -75,7 +107,15 @@ asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICaction_ToBeSetup_Item_1, 4, /* Elements count */ &asn_SPC_RICaction_ToBeSetup_Item_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICactionDefinition.c b/e2ap/lib/RICactionDefinition.c index 3f157ba..04c5489 100644 --- a/e2ap/lib/RICactionDefinition.c +++ b/e2ap/lib/RICactionDefinition.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICactionDefinition.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICactionDefinition = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICactionID.c b/e2ap/lib/RICactionID.c index 73658f5..6ad19f7 100644 --- a/e2ap/lib/RICactionID.c +++ b/e2ap/lib/RICactionID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICactionID.h" @@ -21,7 +21,7 @@ RICactionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 255)) { + if((value >= 0L && value <= 255L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,14 +36,18 @@ RICactionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICactionID_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_RICactionID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -57,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_RICactionID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICactionID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICactionID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + RICactionID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/RICactionType.c b/e2ap/lib/RICactionType.c index bfd33d5..b3cf10f 100644 --- a/e2ap/lib/RICactionType.c +++ b/e2ap/lib/RICactionType.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICactionType.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICactionType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_RICactionType_value2enum_1[] = { { 0, 6, "report" }, { 1, 6, "insert" }, @@ -53,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_RICactionType = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICactionType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICactionType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_RICactionType_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/RICactions-ToBeSetup-List.c b/e2ap/lib/RICactions-ToBeSetup-List.c index 93905c3..d1a5c9f 100644 --- a/e2ap/lib/RICactions-ToBeSetup-List.c +++ b/e2ap/lib/RICactions-ToBeSetup-List.c @@ -1,28 +1,40 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICactions-ToBeSetup-List.h" #include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICactions_ToBeSetup_List_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + &asn_DEF_ProtocolIE_SingleContainer_88P0, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -45,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_RICactions_ToBeSetup_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICactions_ToBeSetup_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICactions_ToBeSetup_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_RICactions_ToBeSetup_List_1, 1, /* Single element */ &asn_SPC_RICactions_ToBeSetup_List_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICcallProcessID.c b/e2ap/lib/RICcallProcessID.c index fd2d0eb..8194d04 100644 --- a/e2ap/lib/RICcallProcessID.c +++ b/e2ap/lib/RICcallProcessID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcallProcessID.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcallProcessID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICcontrolAckRequest.c b/e2ap/lib/RICcontrolAckRequest.c index 1db6bee..0f1bfe2 100644 --- a/e2ap/lib/RICcontrolAckRequest.c +++ b/e2ap/lib/RICcontrolAckRequest.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcontrolAckRequest.h" @@ -11,31 +11,33 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICcontrolAckRequest_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) asn_per_constraints_t asn_PER_type_RICcontrolAckRequest_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_RICcontrolAckRequest_value2enum_1[] = { { 0, 5, "noAck" }, - { 1, 3, "ack" }, - { 2, 4, "nAck" } + { 1, 3, "ack" } /* 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 */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 @@ -53,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcontrolAckRequest = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICcontrolAckRequest_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICcontrolAckRequest_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_RICcontrolAckRequest_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/RICcontrolAcknowledge.c b/e2ap/lib/RICcontrolAcknowledge.c index 85011b6..b890fc1 100644 --- a/e2ap/lib/RICcontrolAcknowledge.c +++ b/e2ap/lib/RICcontrolAcknowledge.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcontrolAcknowledge.h" -static asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P9, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_specs_1 = { sizeof(struct RICcontrolAcknowledge), offsetof(struct RICcontrolAcknowledge, _asn_ctx), asn_MAP_RICcontrolAcknowledge_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICcontrolAcknowledge_1, 1, /* Elements count */ &asn_SPC_RICcontrolAcknowledge_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICcontrolFailure.c b/e2ap/lib/RICcontrolFailure.c index a847f9f..fadeedd 100644 --- a/e2ap/lib/RICcontrolFailure.c +++ b/e2ap/lib/RICcontrolFailure.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcontrolFailure.h" -static asn_TYPE_member_t asn_MBR_RICcontrolFailure_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P10, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_specs_1 = { sizeof(struct RICcontrolFailure), offsetof(struct RICcontrolFailure, _asn_ctx), asn_MAP_RICcontrolFailure_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICcontrolFailure_1, 1, /* Elements count */ &asn_SPC_RICcontrolFailure_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICcontrolHeader.c b/e2ap/lib/RICcontrolHeader.c index 3accabb..cadba18 100644 --- a/e2ap/lib/RICcontrolHeader.c +++ b/e2ap/lib/RICcontrolHeader.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcontrolHeader.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcontrolHeader = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICcontrolMessage.c b/e2ap/lib/RICcontrolMessage.c index d865706..c29f126 100644 --- a/e2ap/lib/RICcontrolMessage.c +++ b/e2ap/lib/RICcontrolMessage.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcontrolMessage.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcontrolMessage = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICcontrolOutcome.c b/e2ap/lib/RICcontrolOutcome.c index 806038d..e4a704c 100644 --- a/e2ap/lib/RICcontrolOutcome.c +++ b/e2ap/lib/RICcontrolOutcome.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcontrolOutcome.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcontrolOutcome = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICcontrolRequest.c b/e2ap/lib/RICcontrolRequest.c index 43a04e2..8a25f16 100644 --- a/e2ap/lib/RICcontrolRequest.c +++ b/e2ap/lib/RICcontrolRequest.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICcontrolRequest.h" -static asn_TYPE_member_t asn_MBR_RICcontrolRequest_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P8, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_specs_1 = { sizeof(struct RICcontrolRequest), offsetof(struct RICcontrolRequest, _asn_ctx), asn_MAP_RICcontrolRequest_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICcontrolRequest_1, 1, /* Elements count */ &asn_SPC_RICcontrolRequest_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICcontrolStatus.c b/e2ap/lib/RICcontrolStatus.c deleted file mode 100644 index d2873fc..0000000 --- a/e2ap/lib/RICcontrolStatus.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 "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/e2ap/lib/RICeventTriggerDefinition.c b/e2ap/lib/RICeventTriggerDefinition.c index a13ddbd..f51fab9 100644 --- a/e2ap/lib/RICeventTriggerDefinition.c +++ b/e2ap/lib/RICeventTriggerDefinition.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICeventTriggerDefinition.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICeventTriggerDefinition = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICindication.c b/e2ap/lib/RICindication.c index 5c40aa5..501c11d 100644 --- a/e2ap/lib/RICindication.c +++ b/e2ap/lib/RICindication.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICindication.h" -static asn_TYPE_member_t asn_MBR_RICindication_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P7, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICindication_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICindication_specs_1 = { sizeof(struct RICindication), offsetof(struct RICindication, _asn_ctx), asn_MAP_RICindication_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICindication = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICindication_1, 1, /* Elements count */ &asn_SPC_RICindication_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICindicationHeader.c b/e2ap/lib/RICindicationHeader.c index d252382..eefde8f 100644 --- a/e2ap/lib/RICindicationHeader.c +++ b/e2ap/lib/RICindicationHeader.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICindicationHeader.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICindicationHeader = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICindicationMessage.c b/e2ap/lib/RICindicationMessage.c index bd0ac0f..9d0289c 100644 --- a/e2ap/lib/RICindicationMessage.c +++ b/e2ap/lib/RICindicationMessage.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICindicationMessage.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RICindicationMessage = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OCTET_STRING_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2ap/lib/RICindicationSN.c b/e2ap/lib/RICindicationSN.c index efd2d48..ddb8aa5 100644 --- a/e2ap/lib/RICindicationSN.c +++ b/e2ap/lib/RICindicationSN.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICindicationSN.h" @@ -21,7 +21,7 @@ RICindicationSN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,14 +36,18 @@ RICindicationSN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICindicationSN_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_RICindicationSN_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -57,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_RICindicationSN = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICindicationSN_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICindicationSN_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + RICindicationSN_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2ap/lib/RICindicationType.c b/e2ap/lib/RICindicationType.c index 58935bb..e96be98 100644 --- a/e2ap/lib/RICindicationType.c +++ b/e2ap/lib/RICindicationType.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICindicationType.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICindicationType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_RICindicationType_value2enum_1[] = { { 0, 6, "report" }, { 1, 6, "insert" } @@ -51,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_RICindicationType = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICindicationType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICindicationType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_RICindicationType_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/RICrequestID.c b/e2ap/lib/RICrequestID.c index 1422a31..ffc34f0 100644 --- a/e2ap/lib/RICrequestID.c +++ b/e2ap/lib/RICrequestID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICrequestID.h" @@ -21,7 +21,7 @@ memb_ricRequestorID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sp value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -46,7 +46,7 @@ memb_ricInstanceID_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -57,29 +57,45 @@ memb_ricInstanceID_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt } } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_ricRequestorID_constr_2 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_ricInstanceID_constr_3 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ricRequestorID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ricRequestorID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ricRequestorID_constraint_1 + }, 0, 0, /* No default value */ "ricRequestorID" }, @@ -88,7 +104,15 @@ asn_TYPE_member_t asn_MBR_RICrequestID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ricInstanceID_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ricInstanceID_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ricInstanceID_constraint_1 + }, 0, 0, /* No default value */ "ricInstanceID" }, @@ -118,7 +142,15 @@ asn_TYPE_descriptor_t asn_DEF_RICrequestID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICrequestID_1, 2, /* Elements count */ &asn_SPC_RICrequestID_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICserviceQuery.c b/e2ap/lib/RICserviceQuery.c index a7d452e..3f80693 100644 --- a/e2ap/lib/RICserviceQuery.c +++ b/e2ap/lib/RICserviceQuery.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICserviceQuery.h" -static asn_TYPE_member_t asn_MBR_RICserviceQuery_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P26, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICserviceQuery_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_specs_1 = { sizeof(struct RICserviceQuery), offsetof(struct RICserviceQuery, _asn_ctx), asn_MAP_RICserviceQuery_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICserviceQuery = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICserviceQuery_1, 1, /* Elements count */ &asn_SPC_RICserviceQuery_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICserviceUpdate.c b/e2ap/lib/RICserviceUpdate.c index a562e2f..72b8cb9 100644 --- a/e2ap/lib/RICserviceUpdate.c +++ b/e2ap/lib/RICserviceUpdate.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICserviceUpdate.h" -static asn_TYPE_member_t asn_MBR_RICserviceUpdate_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P23, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_specs_1 = { sizeof(struct RICserviceUpdate), offsetof(struct RICserviceUpdate, _asn_ctx), asn_MAP_RICserviceUpdate_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICserviceUpdate_1, 1, /* Elements count */ &asn_SPC_RICserviceUpdate_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICserviceUpdateAcknowledge.c b/e2ap/lib/RICserviceUpdateAcknowledge.c index 845acb2..969c78b 100644 --- a/e2ap/lib/RICserviceUpdateAcknowledge.c +++ b/e2ap/lib/RICserviceUpdateAcknowledge.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICserviceUpdateAcknowledge.h" -static asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P24, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_specs_1 = { sizeof(struct RICserviceUpdateAcknowledge), offsetof(struct RICserviceUpdateAcknowledge, _asn_ctx), asn_MAP_RICserviceUpdateAcknowledge_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICserviceUpdateAcknowledge_1, 1, /* Elements count */ &asn_SPC_RICserviceUpdateAcknowledge_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICserviceUpdateFailure.c b/e2ap/lib/RICserviceUpdateFailure.c index f54da69..bdfbd22 100644 --- a/e2ap/lib/RICserviceUpdateFailure.c +++ b/e2ap/lib/RICserviceUpdateFailure.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICserviceUpdateFailure.h" -static asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P25, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_specs_1 = { sizeof(struct RICserviceUpdateFailure), offsetof(struct RICserviceUpdateFailure, _asn_ctx), asn_MAP_RICserviceUpdateFailure_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICserviceUpdateFailure_1, 1, /* Elements count */ &asn_SPC_RICserviceUpdateFailure_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubscription-List-withCause.c b/e2ap/lib/RICsubscription-List-withCause.c new file mode 100644 index 0000000..cd07ee9 --- /dev/null +++ b/e2ap/lib/RICsubscription-List-withCause.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "RICsubscription-List-withCause.h" + +#include "ProtocolIE-SingleContainer.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_RICsubscription_List_withCause_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..4294967295)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_RICsubscription_List_withCause_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 32, -1, 1, 4294967295 } /* (SIZE(1..4294967295)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_RICsubscription_List_withCause_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ProtocolIE_SingleContainer_88P3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscription_List_withCause_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_RICsubscription_List_withCause_specs_1 = { + sizeof(struct RICsubscription_List_withCause), + offsetof(struct RICsubscription_List_withCause, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_RICsubscription_List_withCause = { + "RICsubscription-List-withCause", + "RICsubscription-List-withCause", + &asn_OP_SEQUENCE_OF, + asn_DEF_RICsubscription_List_withCause_tags_1, + sizeof(asn_DEF_RICsubscription_List_withCause_tags_1) + /sizeof(asn_DEF_RICsubscription_List_withCause_tags_1[0]), /* 1 */ + asn_DEF_RICsubscription_List_withCause_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscription_List_withCause_tags_1) + /sizeof(asn_DEF_RICsubscription_List_withCause_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICsubscription_List_withCause_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICsubscription_List_withCause_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_RICsubscription_List_withCause_1, + 1, /* Single element */ + &asn_SPC_RICsubscription_List_withCause_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/RICsubscription-withCause-Item.c b/e2ap/lib/RICsubscription-withCause-Item.c new file mode 100644 index 0000000..44a57f3 --- /dev/null +++ b/e2ap/lib/RICsubscription-withCause-Item.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "RICsubscription-withCause-Item.h" + +asn_TYPE_member_t asn_MBR_RICsubscription_withCause_Item_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscription_withCause_Item, ricRequestID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RICrequestID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ricRequestID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscription_withCause_Item, ranFunctionID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANfunctionID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ranFunctionID" + }, + { ATF_NOFLAGS, 0, offsetof(struct RICsubscription_withCause_Item, cause), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Cause, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cause" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscription_withCause_Item_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscription_withCause_Item_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequestID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ranFunctionID */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cause */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscription_withCause_Item_specs_1 = { + sizeof(struct RICsubscription_withCause_Item), + offsetof(struct RICsubscription_withCause_Item, _asn_ctx), + asn_MAP_RICsubscription_withCause_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_RICsubscription_withCause_Item = { + "RICsubscription-withCause-Item", + "RICsubscription-withCause-Item", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscription_withCause_Item_tags_1, + sizeof(asn_DEF_RICsubscription_withCause_Item_tags_1) + /sizeof(asn_DEF_RICsubscription_withCause_Item_tags_1[0]), /* 1 */ + asn_DEF_RICsubscription_withCause_Item_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscription_withCause_Item_tags_1) + /sizeof(asn_DEF_RICsubscription_withCause_Item_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscription_withCause_Item_1, + 3, /* Elements count */ + &asn_SPC_RICsubscription_withCause_Item_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/RICsubscriptionDeleteFailure.c b/e2ap/lib/RICsubscriptionDeleteFailure.c index 88a9836..18c2143 100644 --- a/e2ap/lib/RICsubscriptionDeleteFailure.c +++ b/e2ap/lib/RICsubscriptionDeleteFailure.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubscriptionDeleteFailure.h" -static asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P5, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_specs_1 = { sizeof(struct RICsubscriptionDeleteFailure), offsetof(struct RICsubscriptionDeleteFailure, _asn_ctx), asn_MAP_RICsubscriptionDeleteFailure_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubscriptionDeleteFailure_1, 1, /* Elements count */ &asn_SPC_RICsubscriptionDeleteFailure_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubscriptionDeleteRequest.c b/e2ap/lib/RICsubscriptionDeleteRequest.c index 627f516..a9bf320 100644 --- a/e2ap/lib/RICsubscriptionDeleteRequest.c +++ b/e2ap/lib/RICsubscriptionDeleteRequest.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubscriptionDeleteRequest.h" -static asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P3, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_specs_1 = { sizeof(struct RICsubscriptionDeleteRequest), offsetof(struct RICsubscriptionDeleteRequest, _asn_ctx), asn_MAP_RICsubscriptionDeleteRequest_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubscriptionDeleteRequest_1, 1, /* Elements count */ &asn_SPC_RICsubscriptionDeleteRequest_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubscriptionDeleteRequired.c b/e2ap/lib/RICsubscriptionDeleteRequired.c new file mode 100644 index 0000000..e659f4c --- /dev/null +++ b/e2ap/lib/RICsubscriptionDeleteRequired.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-PDU-Contents" + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "RICsubscriptionDeleteRequired.h" + +asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequired_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequired, protocolIEs), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProtocolIE_Container_85P6, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "protocolIEs" + }, +}; +static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequired_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequired_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ +}; +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequired_specs_1 = { + sizeof(struct RICsubscriptionDeleteRequired), + offsetof(struct RICsubscriptionDeleteRequired, _asn_ctx), + asn_MAP_RICsubscriptionDeleteRequired_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_RICsubscriptionDeleteRequired = { + "RICsubscriptionDeleteRequired", + "RICsubscriptionDeleteRequired", + &asn_OP_SEQUENCE, + asn_DEF_RICsubscriptionDeleteRequired_tags_1, + sizeof(asn_DEF_RICsubscriptionDeleteRequired_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteRequired_tags_1[0]), /* 1 */ + asn_DEF_RICsubscriptionDeleteRequired_tags_1, /* Same as above */ + sizeof(asn_DEF_RICsubscriptionDeleteRequired_tags_1) + /sizeof(asn_DEF_RICsubscriptionDeleteRequired_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_RICsubscriptionDeleteRequired_1, + 1, /* Elements count */ + &asn_SPC_RICsubscriptionDeleteRequired_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/RICsubscriptionDeleteResponse.c b/e2ap/lib/RICsubscriptionDeleteResponse.c index fc0f72d..9fcf7e2 100644 --- a/e2ap/lib/RICsubscriptionDeleteResponse.c +++ b/e2ap/lib/RICsubscriptionDeleteResponse.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubscriptionDeleteResponse.h" -static asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P4, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_specs_1 = { sizeof(struct RICsubscriptionDeleteResponse), offsetof(struct RICsubscriptionDeleteResponse, _asn_ctx), asn_MAP_RICsubscriptionDeleteResponse_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubscriptionDeleteResponse_1, 1, /* Elements count */ &asn_SPC_RICsubscriptionDeleteResponse_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubscriptionDetails.c b/e2ap/lib/RICsubscriptionDetails.c index 9033dc2..727cbb9 100644 --- a/e2ap/lib/RICsubscriptionDetails.c +++ b/e2ap/lib/RICsubscriptionDetails.c @@ -1,8 +1,8 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubscriptionDetails.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RICsubscriptionDetails_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICeventTriggerDefinition, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricEventTriggerDefinition" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RICsubscriptionDetails_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICactions_ToBeSetup_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricAction-ToBeSetup-List" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDetails = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubscriptionDetails_1, 2, /* Elements count */ &asn_SPC_RICsubscriptionDetails_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubscriptionFailure.c b/e2ap/lib/RICsubscriptionFailure.c index f765319..90defbf 100644 --- a/e2ap/lib/RICsubscriptionFailure.c +++ b/e2ap/lib/RICsubscriptionFailure.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubscriptionFailure.h" -static asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_specs_1 = { sizeof(struct RICsubscriptionFailure), offsetof(struct RICsubscriptionFailure, _asn_ctx), asn_MAP_RICsubscriptionFailure_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubscriptionFailure_1, 1, /* Elements count */ &asn_SPC_RICsubscriptionFailure_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubscriptionRequest.c b/e2ap/lib/RICsubscriptionRequest.c index 46c4fe8..dfa30f4 100644 --- a/e2ap/lib/RICsubscriptionRequest.c +++ b/e2ap/lib/RICsubscriptionRequest.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubscriptionRequest.h" -static asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P0, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_specs_1 = { sizeof(struct RICsubscriptionRequest), offsetof(struct RICsubscriptionRequest, _asn_ctx), asn_MAP_RICsubscriptionRequest_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubscriptionRequest_1, 1, /* Elements count */ &asn_SPC_RICsubscriptionRequest_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubscriptionResponse.c b/e2ap/lib/RICsubscriptionResponse.c index 56c92ae..cc39812 100644 --- a/e2ap/lib/RICsubscriptionResponse.c +++ b/e2ap/lib/RICsubscriptionResponse.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubscriptionResponse.h" -static asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P1, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_specs_1 = { sizeof(struct RICsubscriptionResponse), offsetof(struct RICsubscriptionResponse, _asn_ctx), asn_MAP_RICsubscriptionResponse_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubscriptionResponse_1, 1, /* Elements count */ &asn_SPC_RICsubscriptionResponse_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubsequentAction.c b/e2ap/lib/RICsubsequentAction.c index 8b3248c..6d7ba14 100644 --- a/e2ap/lib/RICsubsequentAction.c +++ b/e2ap/lib/RICsubsequentAction.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubsequentAction.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICsubsequentActionType, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricSubsequentActionType" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RICtimeToWait, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ricTimeToWait" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubsequentAction = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RICsubsequentAction_1, 2, /* Elements count */ &asn_SPC_RICsubsequentAction_specs_1 /* Additional specs */ diff --git a/e2ap/lib/RICsubsequentActionType.c b/e2ap/lib/RICsubsequentActionType.c index f88a331..270d676 100644 --- a/e2ap/lib/RICsubsequentActionType.c +++ b/e2ap/lib/RICsubsequentActionType.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICsubsequentActionType.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICsubsequentActionType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_RICsubsequentActionType_value2enum_1[] = { { 0, 8, "continue" }, { 1, 4, "wait" } @@ -51,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_RICsubsequentActionType = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICsubsequentActionType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICsubsequentActionType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_RICsubsequentActionType_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/RICtimeToWait.c b/e2ap/lib/RICtimeToWait.c index 94fc184..c5e5e57 100644 --- a/e2ap/lib/RICtimeToWait.c +++ b/e2ap/lib/RICtimeToWait.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RICtimeToWait.h" @@ -11,61 +11,63 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_RICtimeToWait_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) asn_per_constraints_t asn_PER_type_RICtimeToWait_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 5, 5, 0, 17 } /* (0..17,...) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 5, 5, 0, 16 } /* (0..16,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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" } + { 0, 4, "w1ms" }, + { 1, 4, "w2ms" }, + { 2, 4, "w5ms" }, + { 3, 5, "w10ms" }, + { 4, 5, "w20ms" }, + { 5, 5, "w30ms" }, + { 6, 5, "w40ms" }, + { 7, 5, "w50ms" }, + { 8, 6, "w100ms" }, + { 9, 6, "w200ms" }, + { 10, 6, "w500ms" }, + { 11, 3, "w1s" }, + { 12, 3, "w2s" }, + { 13, 3, "w5s" }, + { 14, 4, "w10s" }, + { 15, 4, "w20s" }, + { 16, 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) */ + 8, /* w100ms(8) */ + 3, /* w10ms(3) */ + 14, /* w10s(14) */ + 0, /* w1ms(0) */ + 11, /* w1s(11) */ + 9, /* w200ms(9) */ + 4, /* w20ms(4) */ + 15, /* w20s(15) */ + 1, /* w2ms(1) */ + 12, /* w2s(12) */ + 5, /* w30ms(5) */ + 6, /* w40ms(6) */ + 10, /* w500ms(10) */ + 7, /* w50ms(7) */ + 2, /* w5ms(2) */ + 13, /* w5s(13) */ + 16 /* w60s(16) */ /* 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 */ + 17, /* Number of elements in the maps */ + 18, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 @@ -83,7 +85,15 @@ asn_TYPE_descriptor_t asn_DEF_RICtimeToWait = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RICtimeToWait_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RICtimeToWait_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_RICtimeToWait_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/ResetRequest.c b/e2ap/lib/ResetRequest.c index f40779f..1c91cae 100644 --- a/e2ap/lib/ResetRequest.c +++ b/e2ap/lib/ResetRequest.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ResetRequest.h" -static asn_TYPE_member_t asn_MBR_ResetRequest_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P21, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_ResetRequest_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_ResetRequest_specs_1 = { sizeof(struct ResetRequest), offsetof(struct ResetRequest, _asn_ctx), asn_MAP_ResetRequest_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_ResetRequest = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_ResetRequest_1, 1, /* Elements count */ &asn_SPC_ResetRequest_specs_1 /* Additional specs */ diff --git a/e2ap/lib/ResetResponse.c b/e2ap/lib/ResetResponse.c index 47c433a..6e8f4ed 100644 --- a/e2ap/lib/ResetResponse.c +++ b/e2ap/lib/ResetResponse.c @@ -1,19 +1,27 @@ /* * 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` + * found in "pduDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ResetResponse.h" -static asn_TYPE_member_t asn_MBR_ResetResponse_1[] = { +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, + &asn_DEF_ProtocolIE_Container_85P22, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "protocolIEs" }, @@ -24,7 +32,7 @@ static const ber_tlv_tag_t asn_DEF_ResetResponse_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_ResetResponse_specs_1 = { sizeof(struct ResetResponse), offsetof(struct ResetResponse, _asn_ctx), asn_MAP_ResetResponse_tag2el_1, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_ResetResponse = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_ResetResponse_1, 1, /* Elements count */ &asn_SPC_ResetResponse_specs_1 /* Additional specs */ diff --git a/e2ap/lib/SuccessfulOutcome.c b/e2ap/lib/SuccessfulOutcome.c index 7328b32..ba99ed6 100644 --- a/e2ap/lib/SuccessfulOutcome.c +++ b/e2ap/lib/SuccessfulOutcome.c @@ -1,8 +1,8 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "SuccessfulOutcome.h" @@ -17,14 +17,20 @@ 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_id_E2nodeConfigurationUpdate = 10; 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_7_id_E2connectionUpdate = 11; +static const long asn_VAL_7_reject = 0; +static const long asn_VAL_8_id_Reset = 3; +static const long asn_VAL_8_reject = 0; +static const long asn_VAL_9_id_RICindication = 5; static const long asn_VAL_9_ignore = 1; +static const long asn_VAL_10_id_RICserviceQuery = 6; +static const long asn_VAL_10_ignore = 1; +static const long asn_VAL_11_id_ErrorIndication = 2; +static const long asn_VAL_11_ignore = 1; +static const long asn_VAL_12_id_RICsubscriptionDeleteRequired = 12; +static const long asn_VAL_12_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 }, @@ -51,29 +57,44 @@ static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { { "&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_E2nodeConfigurationUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_E2nodeConfigurationUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_E2connectionUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_E2connectionUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_Reset }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_RICindication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_10_id_RICserviceQuery }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_10_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 } + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_11_id_ErrorIndication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_11_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequired }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_12_id_RICsubscriptionDeleteRequired }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_12_ignore } }; static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { - { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } + { 12, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } }; static int memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, @@ -89,7 +110,7 @@ memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt value = *(const long *)sptr; - if((value >= 0 && value <= 255)) { + if((value >= 0L && value <= 255L)) { /* Constraint check succeeded */ return 0; } else { @@ -192,37 +213,57 @@ memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_procedureCode_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICsubscriptionResponse" }, @@ -231,7 +272,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICsubscriptionDeleteResponse, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICsubscriptionDeleteResponse" }, @@ -240,7 +289,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICserviceUpdateAcknowledge, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICserviceUpdateAcknowledge" }, @@ -249,7 +306,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICcontrolAcknowledge, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICcontrolAcknowledge" }, @@ -258,27 +323,79 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_E2setupResponse, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "E2setupResponse" }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.E2nodeConfigurationUpdateAcknowledge), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeConfigurationUpdateAcknowledge, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeConfigurationUpdateAcknowledge" + }, + { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.E2connectionUpdateAcknowledge), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdateAcknowledge, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2connectionUpdateAcknowledge" + }, { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.ResetResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ResetResponse, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 7 }, /* RICsubscriptionResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 6 }, /* RICsubscriptionDeleteResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 5 }, /* RICserviceUpdateAcknowledge */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 4 }, /* RICcontrolAcknowledge */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 3 }, /* E2setupResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 2 }, /* E2nodeConfigurationUpdateAcknowledge */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 1 }, /* E2connectionUpdateAcknowledge */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 0 } /* ResetResponse */ }; static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { sizeof(struct SuccessfulOutcome__value), @@ -286,7 +403,7 @@ static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { offsetof(struct SuccessfulOutcome__value, present), sizeof(((struct SuccessfulOutcome__value *)0)->present), asn_MAP_value_tag2el_4, - 6, /* Count of tags in the map */ + 8, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; @@ -299,9 +416,17 @@ asn_TYPE_descriptor_t asn_DEF_value_4 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, asn_MBR_value_4, - 6, /* Elements count */ + 8, /* Elements count */ &asn_SPC_value_specs_4 /* Additional specs */ }; @@ -311,7 +436,15 @@ asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_procedureCode_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_procedureCode_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_procedureCode_constraint_1 + }, 0, 0, /* No default value */ "procedureCode" }, @@ -320,7 +453,15 @@ asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_1 + }, 0, 0, /* No default value */ "criticality" }, @@ -329,7 +470,15 @@ asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[] = { +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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_1 + }, 0, 0, /* No default value */ "value" }, @@ -360,7 +509,15 @@ asn_TYPE_descriptor_t asn_DEF_SuccessfulOutcome = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_SuccessfulOutcome_1, 3, /* Elements count */ &asn_SPC_SuccessfulOutcome_specs_1 /* Additional specs */ diff --git a/e2ap/lib/TNLinformation.c b/e2ap/lib/TNLinformation.c new file mode 100644 index 0000000..e99b94c --- /dev/null +++ b/e2ap/lib/TNLinformation.c @@ -0,0 +1,172 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "TNLinformation.h" + +static int +memb_tnlAddress_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 >= 1UL && size <= 160UL)) { + /* 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_tnlPort_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_tnlAddress_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_tnlAddress_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 160 } /* (SIZE(1..160,...)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_tnlPort_constr_3 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_tnlPort_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_TNLinformation_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct TNLinformation, tnlAddress), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_tnlAddress_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_tnlAddress_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_tnlAddress_constraint_1 + }, + 0, 0, /* No default value */ + "tnlAddress" + }, + { ATF_POINTER, 1, offsetof(struct TNLinformation, tnlPort), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_tnlPort_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_tnlPort_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_tnlPort_constraint_1 + }, + 0, 0, /* No default value */ + "tnlPort" + }, +}; +static const int asn_MAP_TNLinformation_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_TNLinformation_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_TNLinformation_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tnlAddress */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* tnlPort */ +}; +asn_SEQUENCE_specifics_t asn_SPC_TNLinformation_specs_1 = { + sizeof(struct TNLinformation), + offsetof(struct TNLinformation, _asn_ctx), + asn_MAP_TNLinformation_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_TNLinformation_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_TNLinformation = { + "TNLinformation", + "TNLinformation", + &asn_OP_SEQUENCE, + asn_DEF_TNLinformation_tags_1, + sizeof(asn_DEF_TNLinformation_tags_1) + /sizeof(asn_DEF_TNLinformation_tags_1[0]), /* 1 */ + asn_DEF_TNLinformation_tags_1, /* Same as above */ + sizeof(asn_DEF_TNLinformation_tags_1) + /sizeof(asn_DEF_TNLinformation_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_TNLinformation_1, + 2, /* Elements count */ + &asn_SPC_TNLinformation_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/TNLusage.c b/e2ap/lib/TNLusage.c new file mode 100644 index 0000000..8bdb3a8 --- /dev/null +++ b/e2ap/lib/TNLusage.c @@ -0,0 +1,72 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "TNLusage.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_TNLusage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_TNLusage_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_TNLusage_value2enum_1[] = { + { 0, 11, "ric-service" }, + { 1, 16, "support-function" }, + { 2, 4, "both" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_TNLusage_enum2value_1[] = { + 2, /* both(2) */ + 0, /* ric-service(0) */ + 1 /* support-function(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_TNLusage_specs_1 = { + asn_MAP_TNLusage_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_TNLusage_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_TNLusage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_TNLusage = { + "TNLusage", + "TNLusage", + &asn_OP_NativeEnumerated, + asn_DEF_TNLusage_tags_1, + sizeof(asn_DEF_TNLusage_tags_1) + /sizeof(asn_DEF_TNLusage_tags_1[0]), /* 1 */ + asn_DEF_TNLusage_tags_1, /* Same as above */ + sizeof(asn_DEF_TNLusage_tags_1) + /sizeof(asn_DEF_TNLusage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TNLusage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TNLusage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_TNLusage_specs_1 /* Additional specs */ +}; + diff --git a/e2ap/lib/TimeToWait.c b/e2ap/lib/TimeToWait.c index a969d55..baa69bc 100644 --- a/e2ap/lib/TimeToWait.c +++ b/e2ap/lib/TimeToWait.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TimeToWait.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_TimeToWait_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_TimeToWait_value2enum_1[] = { { 0, 3, "v1s" }, { 1, 3, "v2s" }, @@ -59,7 +63,15 @@ asn_TYPE_descriptor_t asn_DEF_TimeToWait = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TimeToWait_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TimeToWait_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_TimeToWait_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/TransactionID.c b/e2ap/lib/TransactionID.c new file mode 100644 index 0000000..46a3ae6 --- /dev/null +++ b/e2ap/lib/TransactionID.c @@ -0,0 +1,76 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2AP-IEs" + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "TransactionID.h" + +int +TransactionID_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 >= 0L && value <= 255L)) { + /* 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. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_TransactionID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_TransactionID_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_TransactionID_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_TransactionID = { + "TransactionID", + "TransactionID", + &asn_OP_NativeInteger, + asn_DEF_TransactionID_tags_1, + sizeof(asn_DEF_TransactionID_tags_1) + /sizeof(asn_DEF_TransactionID_tags_1[0]), /* 1 */ + asn_DEF_TransactionID_tags_1, /* Same as above */ + sizeof(asn_DEF_TransactionID_tags_1) + /sizeof(asn_DEF_TransactionID_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TransactionID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TransactionID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + TransactionID_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/e2ap/lib/TriggeringMessage.c b/e2ap/lib/TriggeringMessage.c index 7d1dbe8..68c01b3 100644 --- a/e2ap/lib/TriggeringMessage.c +++ b/e2ap/lib/TriggeringMessage.c @@ -1,8 +1,8 @@ /* * 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` + * found in "commonDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TriggeringMessage.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_TriggeringMessage_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_TriggeringMessage_value2enum_1[] = { { 0, 18, "initiating-message" }, { 1, 18, "successful-outcome" }, @@ -51,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_TriggeringMessage = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TriggeringMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TriggeringMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_TriggeringMessage_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/TypeOfError.c b/e2ap/lib/TypeOfError.c index e37ab6b..60d0a7f 100644 --- a/e2ap/lib/TypeOfError.c +++ b/e2ap/lib/TypeOfError.c @@ -1,8 +1,8 @@ /* * 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` + * found in "informationElementDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TypeOfError.h" @@ -11,14 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_type_TypeOfError_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_TypeOfError_value2enum_1[] = { { 0, 14, "not-understood" }, { 1, 7, "missing" } @@ -51,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_TypeOfError = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TypeOfError_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TypeOfError_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_TypeOfError_specs_1 /* Additional specs */ }; diff --git a/e2ap/lib/UnsuccessfulOutcome.c b/e2ap/lib/UnsuccessfulOutcome.c index 5c85aa8..660017c 100644 --- a/e2ap/lib/UnsuccessfulOutcome.c +++ b/e2ap/lib/UnsuccessfulOutcome.c @@ -1,8 +1,8 @@ /* * 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` + * found in "elementryProcedureDefinition.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UnsuccessfulOutcome.h" @@ -17,14 +17,20 @@ 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_id_E2nodeConfigurationUpdate = 10; 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_7_id_E2connectionUpdate = 11; +static const long asn_VAL_7_reject = 0; +static const long asn_VAL_8_id_Reset = 3; +static const long asn_VAL_8_reject = 0; +static const long asn_VAL_9_id_RICindication = 5; static const long asn_VAL_9_ignore = 1; +static const long asn_VAL_10_id_RICserviceQuery = 6; +static const long asn_VAL_10_ignore = 1; +static const long asn_VAL_11_id_ErrorIndication = 2; +static const long asn_VAL_11_ignore = 1; +static const long asn_VAL_12_id_RICsubscriptionDeleteRequired = 12; +static const long asn_VAL_12_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 }, @@ -51,29 +57,44 @@ static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = { { "&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_E2nodeConfigurationUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_E2nodeConfigurationUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject }, + { "&InitiatingMessage", aioc__type, &asn_DEF_E2connectionUpdate }, + { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateAcknowledge }, + { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateFailure }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_E2connectionUpdate }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_Reset }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_RICindication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_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 }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_10_id_RICserviceQuery }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_10_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 } + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_11_id_ErrorIndication }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_11_ignore }, + { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequired }, + { "&SuccessfulOutcome", }, + { "&UnsuccessfulOutcome", }, + { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_12_id_RICsubscriptionDeleteRequired }, + { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_12_ignore } }; static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = { - { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } + { 12, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows } }; static int memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, @@ -89,7 +110,7 @@ memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt value = *(const long *)sptr; - if((value >= 0 && value <= 255)) { + if((value >= 0L && value <= 255L)) { /* Constraint check succeeded */ return 0; } else { @@ -192,37 +213,57 @@ memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_procedureCode_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) static asn_oer_constraints_t asn_OER_memb_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICsubscriptionFailure" }, @@ -231,7 +272,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICsubscriptionDeleteFailure, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICsubscriptionDeleteFailure" }, @@ -240,7 +289,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICserviceUpdateFailure, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICserviceUpdateFailure" }, @@ -249,7 +306,15 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_RICcontrolFailure, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "RICcontrolFailure" }, @@ -258,17 +323,61 @@ static asn_TYPE_member_t asn_MBR_value_4[] = { 0, &asn_DEF_E2setupFailure, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "E2setupFailure" }, + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2nodeConfigurationUpdateFailure), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2nodeConfigurationUpdateFailure, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2nodeConfigurationUpdateFailure" + }, + { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2connectionUpdateFailure), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_E2connectionUpdateFailure, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "E2connectionUpdateFailure" + }, }; 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 */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 6 }, /* RICsubscriptionFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 5 }, /* RICsubscriptionDeleteFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 4 }, /* RICserviceUpdateFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 3 }, /* RICcontrolFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 2 }, /* E2setupFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 1 }, /* E2nodeConfigurationUpdateFailure */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 0 } /* E2connectionUpdateFailure */ }; static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { sizeof(struct UnsuccessfulOutcome__value), @@ -276,7 +385,7 @@ static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = { offsetof(struct UnsuccessfulOutcome__value, present), sizeof(((struct UnsuccessfulOutcome__value *)0)->present), asn_MAP_value_tag2el_4, - 5, /* Count of tags in the map */ + 7, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; @@ -289,9 +398,17 @@ asn_TYPE_descriptor_t asn_DEF_value_4 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, OPEN_TYPE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OPEN_TYPE_constraint + }, asn_MBR_value_4, - 5, /* Elements count */ + 7, /* Elements count */ &asn_SPC_value_specs_4 /* Additional specs */ }; @@ -301,7 +418,15 @@ asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_procedureCode_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_procedureCode_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_procedureCode_constraint_1 + }, 0, 0, /* No default value */ "procedureCode" }, @@ -310,7 +435,15 @@ asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_criticality_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_criticality_constraint_1 + }, 0, 0, /* No default value */ "criticality" }, @@ -319,7 +452,15 @@ asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[] = { +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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_value_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_value_constraint_1 + }, 0, 0, /* No default value */ "value" }, @@ -350,7 +491,15 @@ asn_TYPE_descriptor_t asn_DEF_UnsuccessfulOutcome = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_UnsuccessfulOutcome_1, 3, /* Elements count */ &asn_SPC_UnsuccessfulOutcome_specs_1 /* Additional specs */ diff --git a/e2ap/lib/aper_decoder.c b/e2ap/lib/aper_decoder.c new file mode 100644 index 0000000..0637b6a --- /dev/null +++ b/e2ap/lib/aper_decoder.c @@ -0,0 +1,91 @@ +#include +#include +#include + +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/e2ap/lib/aper_encoder.c b/e2ap/lib/aper_encoder.c new file mode 100644 index 0000000..d9b1c1d --- /dev/null +++ b/e2ap/lib/aper_encoder.c @@ -0,0 +1,129 @@ +#include +#include +#include + +/* + * Argument type and callback necessary for aper_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 +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); + } +} + +/* + * Internally useful functions. + */ + +/* Flush partially filled buffer */ +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 ? cb : ignore_output; + 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/e2ap/lib/aper_opentype.c b/e2ap/lib/aper_opentype.c new file mode 100644 index 0000000..cdd5999 --- /dev/null +++ b/e2ap/lib/aper_opentype.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2007 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +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, -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;) { + int need_eom = 0; + ssize_t maySave = aper_put_length(po, -1, -1, toGo, &need_eom); + if(maySave < 0) break; + if(per_put_many_bits(po, bptr, maySave * 8)) break; + bptr = (char *)bptr + maySave; + toGo -= maySave; + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) { + FREEMEM(buf); + return -1; + } + } + + FREEMEM(buf); + if(toGo) return -1; + + ASN_DEBUG("Open type put %s of length %zd + 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/e2ap/lib/aper_support.c b/e2ap/lib/aper_support.c new file mode 100644 index 0000000..1f34c60 --- /dev/null +++ b/e2ap/lib/aper_support.c @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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, ssize_t lb, ssize_t ub, + int ebits, int *repeat) { + int constrained = (lb >= 0) && (ub >= 0); + ssize_t value; + + *repeat = 0; + + if (constrained && ub < 65536) { + int range = ub - lb + 1; + 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) /* #11.9.3.6 */ + return (value & 0x7F); + if((value & 64) == 0) { /* #11.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, #11.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=%zd", length); + return length; + } else { + int repeat; + length = aper_get_length(pd, -1, -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; + int length; + + /* handle indefinite range */ + length = per_get_few_bits(pd, 1); + if (length == 0) + return per_get_few_bits(pd, 6); + + if (aper_get_align(pd) < 0) + return -1; + + length = per_get_few_bits(pd, 8); + /* the length is not likely to be that big */ + if (length > 4) + return -1; + value = 0; + if (per_get_many_bits(pd, (uint8_t *)&value, 0, length * 8) < 0) + return -1; + return value; + } + 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, ssize_t lb, ssize_t ub, size_t n, int *need_eom) { + int constrained = (lb >= 0) && (ub >= 0); + int dummy = 0; + if(!need_eom) need_eom = &dummy; + + *need_eom = 0; + + + ASN_DEBUG("APER put length %zu with range (%zd..%zd)", n, lb, ub); + + /* 11.9 X.691 Note 2 */ + if (constrained && ub < 65536) { + int range = ub - lb + 1; + return aper_put_nsnnwn(po, range, n) ? -1 : (ssize_t)n; + } + + if (aper_put_align(po) < 0) + return -1; + + if(n <= 127) { /* #11.9.3.6 */ + return per_put_few_bits(po, n, 8) + ? -1 : (ssize_t)n; + } + else if(n < 16384) /* #11.9.3.7 */ + return per_put_few_bits(po, n|0x8000, 16) + ? -1 : (ssize_t)n; + + *need_eom = 0 == (n & 16383); + n >>= 14; + if(n > 4) { + *need_eom = 0; + n = 4; + } + + return per_put_few_bits(po, 0xC0 | n, 8) + ? -1 : (ssize_t)(n << 14); +} + + +int +aper_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 { + if(aper_put_length(po, -1, -1, length, NULL) != (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) { + if (number >= range) + return -1; + bytes = 1; + } else if(range <= 65536) { + if (number >= range) + return -1; + 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/e2ap/lib/asn_application.c b/e2ap/lib/asn_application.c index 2bff460..7992185 100644 --- a/e2ap/lib/asn_application.c +++ b/e2ap/lib/asn_application.c @@ -226,7 +226,9 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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}; +#if !defined(ASN_DISABLE_XER_SUPPORT) enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ (void)opt_codec_ctx; /* Parameters are not checked on encode yet. */ @@ -265,6 +267,7 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, errno = ENOENT; /* Randomization doesn't make sense on output. */ ASN__ENCODE_FAILED; +#if !defined(ASN_DISABLE_BER_SUPPORT) case ATS_BER: /* BER is a superset of DER. */ /* Fall through. */ @@ -273,27 +276,29 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* DER is not defined for this type. */ + errno = ENOENT; /* DER is not defined for this type. */ } } } else { - errno = ENOENT; /* Transfer syntax is not defined for this type. */ + 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. */ + 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. */ +#else + case ATS_BER: + case ATS_DER: + case ATS_CER: + errno = ENOENT; /* BER is not defined. */ ASN__ENCODE_FAILED; - break; -#else /* ASN_DISABLE_OER_SUPPORT */ + +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) case ATS_BASIC_OER: /* CANONICAL-OER is a superset of BASIC-OER. */ /* Fall through. */ @@ -302,27 +307,25 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* OER is not defined for this type. */ + errno = ENOENT; /* OER is not defined for this type. */ } } } else { - errno = ENOENT; /* Transfer syntax is not defined for this type. */ + 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. */ +#else + case ATS_BASIC_OER: + case ATS_CANONICAL_OER: + errno = ENOENT; /* OER is not defined. */ ASN__ENCODE_FAILED; break; -#else /* ASN_DISABLE_PER_SUPPORT */ +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) case ATS_UNALIGNED_BASIC_PER: /* CANONICAL-UPER is a superset of BASIC-UPER. */ /* Fall through. */ @@ -331,9 +334,9 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* UPER is not defined for this type. */ + errno = ENOENT; /* UPER is not defined for this type. */ } } else { ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); @@ -343,16 +346,24 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, errno = EBADF; ASN__ENCODE_FAILED; } - er.encoded = 8; /* Exactly 8 zero bits is added. */ + 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. */ + errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; +#else + case ATS_UNALIGNED_BASIC_PER: + case ATS_UNALIGNED_CANONICAL_PER: + errno = ENOENT; /* UPER is not defined. */ + ASN__ENCODE_FAILED; + break; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) case ATS_ALIGNED_BASIC_PER: /* CANONICAL-APER is a superset of BASIC-APER. */ /* Fall through. */ @@ -361,9 +372,9 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* APER is not defined for this type. */ + errno = ENOENT; /* APER is not defined for this type. */ } } else { ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); @@ -373,18 +384,25 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, errno = EBADF; ASN__ENCODE_FAILED; } - er.encoded = 8; /* Exactly 8 zero bits is added. */ + 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. */ + errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; -#endif /* ASN_DISABLE_PER_SUPPORT */ +#else + case ATS_ALIGNED_BASIC_PER: + case ATS_ALIGNED_CANONICAL_PER: + errno = ENOENT; /* APER is not defined. */ + ASN__ENCODE_FAILED; + break; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) case ATS_BASIC_XER: /* CANONICAL-XER is a superset of BASIC-XER. */ xer_flags &= ~XER_F_CANONICAL; @@ -395,17 +413,41 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* XER is not defined for this type. */ + errno = ENOENT; /* XER is not defined for this type. */ } } } else { - errno = ENOENT; /* Transfer syntax is not defined for this type. */ + errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; +#else + case ATS_BASIC_XER: + case ATS_CANONICAL_XER: + errno = ENOENT; /* XER is not defined. */ + ASN__ENCODE_FAILED; + break; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + case ATS_JER: + if(td->op->jer_encoder) { + er = jer_encode(td, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->jer_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* JER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ default: errno = ENOENT; ASN__ENCODE_FAILED; @@ -430,6 +472,7 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx, ASN__DECODE_FAILED; case ATS_RANDOM: +#if !defined(ASN_DISABLE_RFILL_SUPPORT) if(!td->op->random_fill) { ASN__DECODE_FAILED; } else { @@ -441,41 +484,55 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx, } } break; +#else + errno = ENOENT; + ASN__DECODE_FAILED; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ case ATS_DER: case ATS_BER: +#if !defined(ASN_DISABLE_BER_SUPPORT) return ber_decode(opt_codec_ctx, td, sptr, buffer, size); +#else + errno = ENOENT; + ASN__DECODE_FAILED; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ case ATS_BASIC_OER: case ATS_CANONICAL_OER: -#ifdef ASN_DISABLE_OER_SUPPORT +#if !defined(ASN_DISABLE_OER_SUPPORT) + return oer_decode(opt_codec_ctx, td, sptr, buffer, size); +#else errno = ENOENT; ASN__DECODE_FAILED; -#else - return oer_decode(opt_codec_ctx, td, sptr, buffer, size); -#endif +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ case ATS_UNALIGNED_BASIC_PER: case ATS_UNALIGNED_CANONICAL_PER: -#ifdef ASN_DISABLE_PER_SUPPORT +#if !defined(ASN_DISABLE_UPER_SUPPORT) + return uper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#else errno = ENOENT; ASN__DECODE_FAILED; -#else - return uper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); -#endif +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ case ATS_ALIGNED_BASIC_PER: case ATS_ALIGNED_CANONICAL_PER: -#ifdef ASN_DISABLE_PER_SUPPORT +#if !defined(ASN_DISABLE_APER_SUPPORT) + return aper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#else errno = ENOENT; ASN__DECODE_FAILED; -#else - return aper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); -#endif +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ case ATS_BASIC_XER: case ATS_CANONICAL_XER: +#if !defined(ASN_DISABLE_XER_SUPPORT) return xer_decode(opt_codec_ctx, td, sptr, buffer, size); +#else + errno = ENOENT; + ASN__DECODE_FAILED; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ } } diff --git a/e2ap/lib/asn_codecs_prim.c b/e2ap/lib/asn_codecs_prim.c index fc24247..f3fdbfd 100644 --- a/e2ap/lib/asn_codecs_prim.c +++ b/e2ap/lib/asn_codecs_prim.c @@ -4,115 +4,6 @@ */ #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, @@ -138,180 +29,3 @@ ASN__PRIMITIVE_TYPE_free(const asn_TYPE_descriptor_t *td, void *sptr, 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/e2ap/lib/asn_codecs_prim_ber.c b/e2ap/lib/asn_codecs_prim_ber.c new file mode 100644 index 0000000..c5c2cef --- /dev/null +++ b/e2ap/lib/asn_codecs_prim_ber.c @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#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); +} diff --git a/e2ap/lib/asn_codecs_prim_xer.c b/e2ap/lib/asn_codecs_prim_xer.c new file mode 100644 index 0000000..70c91bc --- /dev/null +++ b/e2ap/lib/asn_codecs_prim_xer.c @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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 = (chunk_buf == NULL)? NULL : ((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/e2ap/lib/asn_internal.c b/e2ap/lib/asn_internal.c index 1aff95f..c2a8108 100644 --- a/e2ap/lib/asn_internal.c +++ b/e2ap/lib/asn_internal.c @@ -14,10 +14,10 @@ asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key, va_start(args, fmt); wrote = vsnprintf(buf, buf_size, fmt, args); + va_end(args); if(wrote < (ssize_t)buf_size) { if(wrote < 0) { if(buf != scratch) FREEMEM(buf); - va_end(args); return -1; } break; diff --git a/e2ap/lib/asn_random_fill.c b/e2ap/lib/asn_random_fill.c index 819cf70..15771b6 100644 --- a/e2ap/lib/asn_random_fill.c +++ b/e2ap/lib/asn_random_fill.c @@ -42,13 +42,23 @@ asn_random_between(intmax_t lb, intmax_t rb) { uintmax_t range = asn__intmax_range(lb, rb); uintmax_t value = 0; uintmax_t got_entropy = 0; + (void)intmax_max; + int max = 0xffffff; - assert(RAND_MAX > 0xffffff); /* Seen 7ffffffd! */ +#ifdef __WIN32__ + max = RAND_MAX-1; +#endif + + assert(RAND_MAX > max); /* Seen 7ffffffd! */ assert(range < intmax_max); for(; got_entropy < range;) { - got_entropy = (got_entropy << 24) | 0xffffff; - value = (value << 24) | (random() % 0xffffff); + got_entropy = (got_entropy << 24) | max; +#ifdef HAVE_RANDOM + value = (value << 24) | (random() % max); +#else + value = (value << 24) | (rand() % max); +#endif } return lb + (intmax_t)(value % (range + 1)); diff --git a/e2ap/lib/ber_tlv_tag.c b/e2ap/lib/ber_tlv_tag.c index 4a7d732..64ec14f 100644 --- a/e2ap/lib/ber_tlv_tag.c +++ b/e2ap/lib/ber_tlv_tag.c @@ -42,7 +42,7 @@ ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { */ if(val >> ((8 * sizeof(val)) - 9)) { /* - * We would not be able to accomodate + * We would not be able to accommodate * any more tag bits. */ return -1; diff --git a/e2ap/lib/constr_CHOICE.c b/e2ap/lib/constr_CHOICE.c index 86dcbb0..5f52e3d 100644 --- a/e2ap/lib/constr_CHOICE.c +++ b/e2ap/lib/constr_CHOICE.c @@ -4,485 +4,102 @@ */ #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) +asn_TYPE_operation_t asn_OP_CHOICE = { + CHOICE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + CHOICE_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + CHOICE_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + CHOICE_decode_ber, + CHOICE_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + CHOICE_decode_xer, + CHOICE_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + CHOICE_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + CHOICE_decode_oer, + CHOICE_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + CHOICE_decode_uper, + CHOICE_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + CHOICE_decode_aper, + CHOICE_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + CHOICE_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + CHOICE_outmost_tag +}; -/* - * 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) +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; -/* - * 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) + assert(tag_mode == 0); (void)tag_mode; + assert(tag == 0); (void)tag; -/* - * Switch to the next phase of parsing. - */ -#undef NEXT_PHASE -#define NEXT_PHASE(ctx) do { \ - ctx->phase++; \ - ctx->step = 0; \ - } while(0) + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); -/* - * Return a standardized complex structure. - */ -#undef RETURN -#define RETURN(_code) do { \ - rval.code = _code; \ - rval.consumed = consumed_myself;\ - return rval; \ - } while(0) + 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; + } +} /* * 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) { @@ -534,713 +151,6 @@ CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, } } -#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) { @@ -1297,7 +207,7 @@ CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr, * is guaranteed to be aligned properly. ASN.1 compiler itself does not * produce packed code. */ -static unsigned +unsigned _fetch_present_idx(const void *struct_ptr, unsigned pres_offset, unsigned pres_size) { const void *present_ptr; @@ -1318,7 +228,7 @@ _fetch_present_idx(const void *struct_ptr, unsigned pres_offset, return present; } -static void +void _set_present_idx(void *struct_ptr, unsigned pres_offset, unsigned pres_size, unsigned present) { void *present_ptr; @@ -1446,88 +356,3 @@ CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, 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/e2ap/lib/constr_CHOICE_aper.c b/e2ap/lib/constr_CHOICE_aper.c new file mode 100644 index 0000000..41040aa --- /dev/null +++ b/e2ap/lib/constr_CHOICE_aper.c @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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 = NULL; + asn_TYPE_member_t *elm = NULL; /* CHOICE's element */ + void *memb_ptr = NULL; + void **memb_ptr2 = NULL; + void *st = *sptr; + int value = 0; + + 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; + + if(specs && specs->tag2el_count > specs->ext_start) { + value = aper_get_nsnnwn(pd, specs->tag2el_count - specs->ext_start); /* extension elements range */ + 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; + 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; + int n = present - specs->ext_start; + if(n <= 63) { + if(n < 0) ASN__ENCODE_FAILED; + if(per_put_few_bits(po, n, 7)) ASN__ENCODE_FAILED; + } else + 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); + } +} diff --git a/e2ap/lib/constr_CHOICE_ber.c b/e2ap/lib/constr_CHOICE_ber.c new file mode 100644 index 0000000..7ad42c7 --- /dev/null +++ b/e2ap/lib/constr_CHOICE_ber.c @@ -0,0 +1,447 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#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) + +/* + * 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) { + /* ?Subtracted 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; +} diff --git a/e2ap/lib/constr_CHOICE_jer.c b/e2ap/lib/constr_CHOICE_jer.c new file mode 100644 index 0000000..22d5090 --- /dev/null +++ b/e2ap/lib/constr_CHOICE_jer.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#undef JER_ADVANCE +#define JER_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) + +asn_enc_rval_t +CHOICE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_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; + + ASN__CALLBACK3("{\n\"", 3, mname, mlen, "\": ", 2); + + tmper = elm->type->op->jer_encoder(elm->type, memb_ptr, + ilevel + 1, flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK("}", 1); + // ASN__CALLBACK3("", 1); + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} diff --git a/e2ap/lib/constr_CHOICE_oer.c b/e2ap/lib/constr_CHOICE_oer.c index a4c591c..bc71a01 100644 --- a/e2ap/lib/constr_CHOICE_oer.c +++ b/e2ap/lib/constr_CHOICE_oer.c @@ -3,11 +3,8 @@ * 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. @@ -109,7 +106,7 @@ oer_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { */ if(val >> ((8 * sizeof(val)) - 9)) { /* - * We would not be able to accomodate + * We would not be able to accommodate * any more tag bits. */ return -1; @@ -376,5 +373,3 @@ CHOICE_encode_oer(const asn_TYPE_descriptor_t *td, return er; } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/constr_CHOICE_print.c b/e2ap/lib/constr_CHOICE_print.c new file mode 100644 index 0000000..a97202f --- /dev/null +++ b/e2ap/lib/constr_CHOICE_print.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; + } +} diff --git a/e2ap/lib/constr_CHOICE_rfill.c b/e2ap/lib/constr_CHOICE_rfill.c new file mode 100644 index 0000000..fd0a101 --- /dev/null +++ b/e2ap/lib/constr_CHOICE_rfill.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2ap/lib/constr_CHOICE_uper.c b/e2ap/lib/constr_CHOICE_uper.c new file mode 100644 index 0000000..77aab6d --- /dev/null +++ b/e2ap/lib/constr_CHOICE_uper.c @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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); + } +} diff --git a/e2ap/lib/constr_CHOICE_xer.c b/e2ap/lib/constr_CHOICE_xer.c new file mode 100644 index 0000000..45b4290 --- /dev/null +++ b/e2ap/lib/constr_CHOICE_xer.c @@ -0,0 +1,316 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#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; +} diff --git a/e2ap/lib/constr_SEQUENCE.c b/e2ap/lib/constr_SEQUENCE.c index 43dcac7..8397d0c 100644 --- a/e2ap/lib/constr_SEQUENCE.c +++ b/e2ap/lib/constr_SEQUENCE.c @@ -5,980 +5,62 @@ */ #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; -} +asn_TYPE_operation_t asn_OP_SEQUENCE = { + SEQUENCE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + SEQUENCE_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + SEQUENCE_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + SEQUENCE_decode_ber, + SEQUENCE_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + SEQUENCE_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + SEQUENCE_decode_oer, + SEQUENCE_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + SEQUENCE_decode_uper, + SEQUENCE_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + SEQUENCE_decode_aper, + SEQUENCE_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + SEQUENCE_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ +}; void SEQUENCE_free(const asn_TYPE_descriptor_t *td, void *sptr, @@ -1042,6 +124,8 @@ SEQUENCE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; + asn_constr_check_f *constr; + int ret; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); @@ -1057,864 +141,17 @@ SEQUENCE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, 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; + constr = elm->encoding_constraints.general_constraints; + if(!constr) + constr = elm->type->encoding_constraints.general_constraints; - 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; + ret = constr(elm->type, memb_ptr, ctfailcb, app_key); + if(ret) return ret; } - /* 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); + return 0; } -#endif /* ASN_DISABLE_PER_SUPPORT */ - int SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { @@ -1958,102 +195,3 @@ SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2ap/lib/constr_SEQUENCE_OF.c b/e2ap/lib/constr_SEQUENCE_OF.c index 10f18cf..9c5d6cd 100644 --- a/e2ap/lib/constr_SEQUENCE_OF.c +++ b/e2ap/lib/constr_SEQUENCE_OF.c @@ -7,295 +7,61 @@ #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 */ +asn_TYPE_operation_t asn_OP_SEQUENCE_OF = { + SEQUENCE_OF_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + SEQUENCE_OF_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + SEQUENCE_OF_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + SEQUENCE_OF_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + SEQUENCE_OF_decode_oer, /* Same as SET OF decoder. */ + SEQUENCE_OF_encode_oer, /* Same as SET OF encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + SEQUENCE_OF_decode_uper, /* Same as SET OF decoder */ + SEQUENCE_OF_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + SEQUENCE_OF_decode_aper, + SEQUENCE_OF_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + SEQUENCE_OF_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ +}; int SEQUENCE_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, @@ -324,35 +90,3 @@ SEQUENCE_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2ap/lib/constr_SEQUENCE_OF_aper.c b/e2ap/lib/constr_SEQUENCE_OF_aper.c new file mode 100644 index 0000000..ff3ae8b --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_OF_aper.c @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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 %lld ub %lld %s", + (long long int)ct->lower_bound, + (long long int)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 (ct->lower_bound == ct->upper_bound && ct->upper_bound < 65536) { + /* No length determinant */ + } else if (aper_put_length(po, ct->lower_bound, ct->upper_bound, list->count - ct->lower_bound, 0) < 0) + ASN__ENCODE_FAILED; + } + + for(seq = -1; seq < list->count;) { + ssize_t mayEncode; + int need_eom = 0; + if(seq < 0) seq = 0; + if(ct && ct->effective_bits >= 0) { + mayEncode = list->count; + } else { + mayEncode = aper_put_length(po, -1, -1, list->count - seq, &need_eom); + 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; + } + + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } + + ASN__ENCODED_OK(er); +} diff --git a/e2ap/lib/constr_SEQUENCE_OF_ber.c b/e2ap/lib/constr_SEQUENCE_OF_ber.c new file mode 100644 index 0000000..178f865 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_OF_ber.c @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2017 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; +} diff --git a/e2ap/lib/constr_SEQUENCE_OF_jer.c b/e2ap/lib/constr_SEQUENCE_OF_jer.c new file mode 100644 index 0000000..4c366a6 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_OF_jer.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_enc_rval_t +SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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 = 0; + int i; + + if(!sptr) ASN__ENCODE_FAILED; + + er.encoded = 0; + ASN__CALLBACK("[", 1); + + 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("{\"", 2, mname, mlen, "\":", 2); + } + + tmper = elm->type->op->jer_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, "\"", 1); + } + + if(mname) { + ASN__CALLBACK("}", 1); + } + if (i != list->count - 1) { + ASN__CALLBACK(",", 1); + } + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + ASN__CALLBACK("]", 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} diff --git a/e2ap/lib/constr_SEQUENCE_OF_uper.c b/e2ap/lib/constr_SEQUENCE_OF_uper.c new file mode 100644 index 0000000..eb20a07 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_OF_uper.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 + +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); +} diff --git a/e2ap/lib/constr_SEQUENCE_OF_xer.c b/e2ap/lib/constr_SEQUENCE_OF_xer.c new file mode 100644 index 0000000..7bd3236 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_OF_xer.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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; +} diff --git a/e2ap/lib/constr_SEQUENCE_aper.c b/e2ap/lib/constr_SEQUENCE_aper.c new file mode 100644 index 0000000..895b6da --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_aper.c @@ -0,0 +1,457 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * 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)) + +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) { + if (OPEN_TYPE_aper_is_unknown_type(td, st, elm)) { + rv = OPEN_TYPE_aper_unknown_type_discard_bytes(pd); + FREEMEM(opres); + return rv; + } + 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 %zd bits (%x..)", + td->name, bmlength, *epres); + + /* Deal with padding */ + if (aper_get_align(pd) < 0) + ASN__DECODE_STARVED; + + /* 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("%zu 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 (@%zu) 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 (@%zu) 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) == 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 */ + + 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 %zu 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", 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); +} diff --git a/e2ap/lib/constr_SEQUENCE_ber.c b/e2ap/lib/constr_SEQUENCE_ber.c new file mode 100644 index 0000000..e982172 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_ber.c @@ -0,0 +1,612 @@ +/* + * Copyright (c) 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) +#undef PHASE_OUT +#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; /* ?Subtracted 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); +} diff --git a/e2ap/lib/constr_SEQUENCE_jer.c b/e2ap/lib/constr_SEQUENCE_jer.c new file mode 100644 index 0000000..6451f0c --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_jer.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0,0,0}; + int xcan = 0; + 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; + + int bAddComma = 0; + ASN__CALLBACK("{\n", 2); + 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 (bAddComma == 1) { + ASN__CALLBACK(",", 1); + bAddComma = 0; + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("\"", 1, mname, mlen, "\": ", 3); + + /* Print the member itself */ + tmper = elm->type->op->jer_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; + if (edx != td->elements_count - 1) { + bAddComma = 1; + } + } + ASN__CALLBACK("}", 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; +} diff --git a/e2ap/lib/constr_SEQUENCE_oer.c b/e2ap/lib/constr_SEQUENCE_oer.c index ecb589c..a3bdb7b 100644 --- a/e2ap/lib/constr_SEQUENCE_oer.c +++ b/e2ap/lib/constr_SEQUENCE_oer.c @@ -3,12 +3,10 @@ * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ -#ifndef ASN_DISABLE_OER_SUPPORT - #include #include +#include #include -#include /* * This macro "eats" the part of the buffer which is definitely "consumed", @@ -486,7 +484,7 @@ SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, } /* - * Before encode extensions, encode extensions additions presense bitmap + * Before encode extensions, encode extensions additions presence bitmap # X.696 (08/2015) #16.4. */ if(has_extensions) { @@ -557,5 +555,3 @@ SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/constr_SEQUENCE_print.c b/e2ap/lib/constr_SEQUENCE_print.c new file mode 100644 index 0000000..7f9e231 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_print.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2ap/lib/constr_SEQUENCE_rfill.c b/e2ap/lib/constr_SEQUENCE_rfill.c new file mode 100644 index 0000000..b464f57 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_rfill.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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/e2ap/lib/constr_SEQUENCE_uper.c b/e2ap/lib/constr_SEQUENCE_uper.c new file mode 100644 index 0000000..b235f4d --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_uper.c @@ -0,0 +1,429 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * 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)) + +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); +} diff --git a/e2ap/lib/constr_SEQUENCE_xer.c b/e2ap/lib/constr_SEQUENCE_xer.c new file mode 100644 index 0000000..c6475f7 --- /dev/null +++ b/e2ap/lib/constr_SEQUENCE_xer.c @@ -0,0 +1,348 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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)) + +#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; +} diff --git a/e2ap/lib/constr_SET_OF.c b/e2ap/lib/constr_SET_OF.c index bf1dc27..97a7cac 100644 --- a/e2ap/lib/constr_SET_OF.c +++ b/e2ap/lib/constr_SET_OF.c @@ -5,275 +5,63 @@ */ #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; +asn_TYPE_operation_t asn_OP_SET_OF = { + SET_OF_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + SET_OF_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + SET_OF_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + SET_OF_decode_ber, + SET_OF_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + SET_OF_decode_xer, + SET_OF_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + SET_OF_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + SET_OF_decode_oer, + SET_OF_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + SET_OF_decode_uper, + SET_OF_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + SET_OF_decode_aper, + SET_OF_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + SET_OF_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ }; + /* 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; @@ -336,7 +124,7 @@ static int _el_buf_cmp(const void *ap, const void *bp) { return ret; } -static void +void SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count) { size_t i; @@ -347,12 +135,7 @@ SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count) { FREEMEM(el_buf); } -enum SET_OF__encode_method { - SOES_DER, /* Distinguished Encoding Rules */ - SOES_CUPER /* Canonical Unaligned Packed Encoding Rules */ -}; - -static struct _el_buffer * +struct _el_buffer * SET_OF__encode_sorted(const asn_TYPE_member_t *elm, const asn_anonymous_set_ *list, enum SET_OF__encode_method method) { @@ -379,10 +162,13 @@ SET_OF__encode_sorted(const asn_TYPE_member_t *elm, * Encode the member into the prepared space. */ switch(method) { +#if !defined(ASN_DISABLE_BER_SUPPORT) case SOES_DER: erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, _el_addbytes, encoding_el); break; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) case SOES_CUPER: erval = uper_encode(elm->type, elm->encoding_constraints.per_constraints, @@ -393,6 +179,20 @@ SET_OF__encode_sorted(const asn_TYPE_member_t *elm, encoding_el->bits_unused = (8 - extra_bits) & 0x7; } break; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + case SOES_CAPER: + erval = aper_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; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + default: assert(!"Unreachable"); break; @@ -413,417 +213,6 @@ SET_OF__encode_sorted(const asn_TYPE_member_t *elm, } } - -/* - * 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) { @@ -902,293 +291,6 @@ SET_OF_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, 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; @@ -1267,175 +369,3 @@ SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2ap/lib/constr_SET_OF_aper.c b/e2ap/lib/constr_SET_OF_aper.c new file mode 100644 index 0000000..87c341e --- /dev/null +++ b/e2ap/lib/constr_SET_OF_aper.c @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +SET_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_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}; + int seq; + + if(!sptr) ASN__ENCODE_FAILED; + + list = _A_CSET_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SET 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 %lld ub %lld %s", + (long long int)ct->lower_bound, + (long long int)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->lower_bound, ct->upper_bound, list->count - ct->lower_bound, 0) < 0) { + ASN__ENCODE_FAILED; + } + } + + /* + * Canonical PER #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_CAPER); + + for(seq = 0; seq < list->count;) { + ssize_t may_encode; + int need_eom = 0; + if(ct && ct->effective_bits >= 0) { + may_encode = list->count; + } else { + may_encode = + aper_put_length(po, -1, -1, list->count - seq, &need_eom); + if(may_encode < 0) ASN__ENCODE_FAILED; + } + + while(may_encode--) { + const struct _el_buffer *el = &encoded_els[seq++]; + if(asn_put_many_bits(po, el->buf, + (8 * el->length) - el->bits_unused) < 0) { + break; + } + } + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } + + SET_OF__encode_sorted_free(encoded_els, list->count); + + ASN__ENCODED_OK(er); +} + +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+%lld elements from %s", + (long)nelems, (long long int)ct->lower_bound, td->name); + if(nelems < 0) ASN__DECODE_STARVED; + nelems += ct->lower_bound; + } else { + nelems = -1; + } + + do { + int i; + if(nelems < 0) { + if (ct) + nelems = aper_get_length(pd, ct->lower_bound, ct->upper_bound, + ct->effective_bits, &repeat); + else + nelems = aper_get_length(pd, -1, -1, -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; +} diff --git a/e2ap/lib/constr_SET_OF_ber.c b/e2ap/lib/constr_SET_OF_ber.c new file mode 100644 index 0000000..4187e29 --- /dev/null +++ b/e2ap/lib/constr_SET_OF_ber.c @@ -0,0 +1,355 @@ +/* + * Copyright (c) 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) +#undef PHASE_OUT +#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; /* ?Subtracted 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); +} + +/* + * 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; + } +} diff --git a/e2ap/lib/constr_SET_OF_jer.c b/e2ap/lib/constr_SET_OF_jer.c new file mode 100644 index 0000000..a0c2adc --- /dev/null +++ b/e2ap/lib/constr_SET_OF_jer.c @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +typedef struct jer_tmp_enc_s { + void *buffer; + size_t offset; + size_t size; +} jer_tmp_enc_t; + +static int +SET_OF_encode_jer_callback(const void *buffer, size_t size, void *key) { + jer_tmp_enc_t *t = (jer_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_jer_order(const void *aptr, const void *bptr) { + const jer_tmp_enc_t *a = (const jer_tmp_enc_t *)aptr; + const jer_tmp_enc_t *b = (const jer_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_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_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 = 0; + jer_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 = (jer_tmp_enc_t *)MALLOC(list->count * sizeof(encs[0])); + if(!encs) ASN__ENCODE_FAILED; + cb = SET_OF_encode_jer_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, "\": ", 3); + } + + if(!xcan && specs->as_XMLValueList == 1) + ASN__TEXT_INDENT(1, ilevel + 1); + tmper = elm->type->op->jer_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) { + jer_tmp_enc_t *enc = encs; + jer_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_jer_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); +} diff --git a/e2ap/lib/constr_SET_OF_oer.c b/e2ap/lib/constr_SET_OF_oer.c index 5200518..a0f0140 100644 --- a/e2ap/lib/constr_SET_OF_oer.c +++ b/e2ap/lib/constr_SET_OF_oer.c @@ -3,8 +3,6 @@ * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ -#ifndef ASN_DISABLE_OER_SUPPORT - #include #include #include @@ -43,12 +41,12 @@ * 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; \ +#define RETURN(_code) \ + do { \ + asn_dec_rval_t _rval; \ + _rval.code = _code; \ + _rval.consumed = consumed_myself; \ + return _rval; \ } while(0) /* @@ -281,5 +279,3 @@ SET_OF_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(erval); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2ap/lib/constr_SET_OF_print.c b/e2ap/lib/constr_SET_OF_print.c new file mode 100644 index 0000000..748dba7 --- /dev/null +++ b/e2ap/lib/constr_SET_OF_print.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2ap/lib/constr_SET_OF_rfill.c b/e2ap/lib/constr_SET_OF_rfill.c new file mode 100644 index 0000000..9b2ac5e --- /dev/null +++ b/e2ap/lib/constr_SET_OF_rfill.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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; + } + } +#else + if(!constraints) constraints = &td->encoding_constraints; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + + /* Bias towards edges of allowed space */ + switch(asn_random_between(-1, 4)) { + default: + case -1: +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + /* 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; + } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + /* 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/e2ap/lib/constr_SET_OF_uper.c b/e2ap/lib/constr_SET_OF_uper.c new file mode 100644 index 0000000..b99a244 --- /dev/null +++ b/e2ap/lib/constr_SET_OF_uper.c @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; + } +} diff --git a/e2ap/lib/constr_SET_OF_xer.c b/e2ap/lib/constr_SET_OF_xer.c new file mode 100644 index 0000000..1d97e5b --- /dev/null +++ b/e2ap/lib/constr_SET_OF_xer.c @@ -0,0 +1,314 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#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); +} diff --git a/e2ap/lib/constr_TYPE.c b/e2ap/lib/constr_TYPE.c index aefaefd..e634e75 100644 --- a/e2ap/lib/constr_TYPE.c +++ b/e2ap/lib/constr_TYPE.c @@ -70,7 +70,7 @@ _print2fp(const void *buffer, size_t size, void *app_key) { * 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 CC_PRINTFLIKE(1, 2) ASN_DEBUG_f(const char *fmt, ...); void ASN_DEBUG_f(const char *fmt, ...) { va_list ap; va_start(ap, fmt); diff --git a/e2ap/lib/constraints.c b/e2ap/lib/constraints.c index df3c6c1..72137cc 100644 --- a/e2ap/lib/constraints.c +++ b/e2ap/lib/constraints.c @@ -35,6 +35,7 @@ struct errbufDesc { }; static void +CC_PRINTFLIKE(4, 5) _asn_i_ctfailcb(void *key, const asn_TYPE_descriptor_t *td, const void *sptr, const char *fmt, ...) { struct errbufDesc *arg = key; diff --git a/e2ap/lib/jer_encoder.c b/e2ap/lib/jer_encoder.c new file mode 100644 index 0000000..4fe5ce3 --- /dev/null +++ b/e2ap/lib/jer_encoder.c @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * The JER encoder of any type. May be invoked by the application. + */ +asn_enc_rval_t +jer_encode(const asn_TYPE_descriptor_t *td, const void *sptr, + 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; + + if(!td || !sptr) goto cb_failed; + + mname = td->xml_tag; + mlen = strlen(mname); + + ASN__CALLBACK3("{\n\"", 3, mname, mlen, "\":", 2); + + int xFlag = 0; + tmper = td->op->jer_encoder(td, sptr, 1, xFlag, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK("}", 1); + // ASN__CALLBACK3("\n", xcan); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +/* + * This is a helper function for jer_fprint, which directs all incoming data + * into the provided file descriptor. + */ +static int +jer__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 +jer_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 = jer_encode(td, sptr, jer__print2fp, stream); + if(er.encoded == -1) + return -1; + + return fflush(stream); +} + diff --git a/e2ap/lib/per_decoder.c b/e2ap/lib/per_decoder.c index 8a3e39d..42b92ca 100644 --- a/e2ap/lib/per_decoder.c +++ b/e2ap/lib/per_decoder.c @@ -2,184 +2,4 @@ #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; -} - +// Absolutely nothing diff --git a/e2ap/lib/per_encoder.c b/e2ap/lib/per_encoder.c index a35e1f0..01ab70b 100644 --- a/e2ap/lib/per_encoder.c +++ b/e2ap/lib/per_encoder.c @@ -1,10 +1,7 @@ -#include #include #include -static int _uper_encode_flush_outp(asn_per_outp_t *po); - -static int +int ignore_output(const void *data, size_t size, void *app_key) { (void)data; (void)size; @@ -12,81 +9,7 @@ ignore_output(const void *data, size_t 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 +int encode_dyn_cb(const void *buffer, size_t size, void *key) { enc_dyn_arg *arg = key; if(arg->length + size >= arg->allocated) { @@ -110,156 +33,3 @@ encode_dyn_cb(const void *buffer, size_t size, void *key) { 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/e2ap/lib/per_opentype.c b/e2ap/lib/per_opentype.c index 28f3cb6..5620c5b 100644 --- a/e2ap/lib/per_opentype.c +++ b/e2ap/lib/per_opentype.c @@ -2,288 +2,13 @@ * 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 +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) { @@ -301,233 +26,3 @@ uper_sot_suck(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, 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/e2ap/lib/per_support.c b/e2ap/lib/per_support.c index 2285677..62d343c 100644 --- a/e2ap/lib/per_support.c +++ b/e2ap/lib/per_support.c @@ -6,484 +6,4 @@ #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; - - 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); -} +// Absolutely nothing diff --git a/e2ap/lib/uper_decoder.c b/e2ap/lib/uper_decoder.c new file mode 100644 index 0000000..a88e95c --- /dev/null +++ b/e2ap/lib/uper_decoder.c @@ -0,0 +1,96 @@ +#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; +} diff --git a/e2ap/lib/uper_encoder.c b/e2ap/lib/uper_encoder.c new file mode 100644 index 0000000..4c1d24a --- /dev/null +++ b/e2ap/lib/uper_encoder.c @@ -0,0 +1,127 @@ +#include +#include +#include + +static int _uper_encode_flush_outp(asn_per_outp_t *po); + +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); +} + +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); +} diff --git a/e2ap/lib/uper_opentype.c b/e2ap/lib/uper_opentype.c new file mode 100644 index 0000000..17ee064 --- /dev/null +++ b/e2ap/lib/uper_opentype.c @@ -0,0 +1,372 @@ +/* + * 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); + +/* + * 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 == NULL)? NULL : 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; /* No one 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 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; +} diff --git a/e2ap/lib/uper_support.c b/e2ap/lib/uper_support.c new file mode 100644 index 0000000..ce8adc5 --- /dev/null +++ b/e2ap/lib/uper_support.c @@ -0,0 +1,311 @@ +/* + * 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, uintmax_t *out_value, int nbits) { + uintmax_t lhalf; /* Lower half of the number*/ + intmax_t 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 = ((uintmax_t)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, uintmax_t 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__imax_range(intmax_t lb, intmax_t ub, uintmax_t *range_r) { + uintmax_t bounds_range; + if((ub < 0) == (lb < 0)) { + bounds_range = ub - lb; + } else if(lb < 0) { + assert(ub >= 0); + bounds_range = 1 + ((uintmax_t)ub + (uintmax_t)-(lb + 1)); + } else { + assert(!"Unreachable"); + return -1; + } + *range_r = bounds_range; + return 0; +} + +int +per_imax_range_rebase(intmax_t v, intmax_t lb, intmax_t ub, uintmax_t *output) { + uintmax_t range; + + assert(lb <= ub); + + if(v < lb || v > ub || per__imax_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) { + uintmax_t rebased = 1 + (uintmax_t)-(v+1) + (uintmax_t)lb; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else if(lb < 0) { + uintmax_t rebased = 1 + (uintmax_t)-(lb+1) + (uintmax_t)v; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else { + assert(!"Unreachable"); + return -1; + } +} + +int +per_long_range_rebase(long v, intmax_t lb, intmax_t ub, unsigned long *output) { + uintmax_t tmp = *output; + int rc = per_imax_range_rebase((intmax_t)v, lb, ub, &tmp); + *output = tmp; + return rc; +} + +int +per_imax_range_unrebase(uintmax_t inp, intmax_t lb, intmax_t ub, intmax_t *outp) { + uintmax_t range; + + if(per__imax_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 <= INTMAX_MAX) { + *outp = (intmax_t)inp + lb; + } else { + *outp = (lb + INTMAX_MAX + 1) + (intmax_t)((inp - INTMAX_MAX) - 1); + } + + return 0; +} + +int +per_long_range_unrebase(unsigned long inp, intmax_t lb, intmax_t ub, long *outp) { + intmax_t tmp = *outp; + int rc = per_imax_range_unrebase((uintmax_t)inp, lb, ub, &tmp); + *outp = tmp; + return rc; +} diff --git a/e2ap/lib/xer_decoder.c b/e2ap/lib/xer_decoder.c index 5b87703..2a14557 100644 --- a/e2ap/lib/xer_decoder.c +++ b/e2ap/lib/xer_decoder.c @@ -323,7 +323,7 @@ xer_decode_general(const asn_codec_ctx_t *opt_codec_ctx, 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; + const char *pend = (p == NULL)? NULL : p + chunk_size; for(; p < pend; p++) { switch(*p) { diff --git a/e2ap/wrapper.h b/e2ap/wrapper.h index 44d3e85..bacc5a4 100644 --- a/e2ap/wrapper.h +++ b/e2ap/wrapper.h @@ -1,5 +1,5 @@ -#ifndef _WRAPPER_H_ -#define _WRAPPER_H_ +#ifndef _WRAPPER_E2AP_H_ +#define _WRAPPER_E2AP_H_ #include #include #include "RICsubscriptionRequest.h" @@ -16,7 +16,17 @@ #include "ProtocolIE-Field.h" #include "RICactionDefinition.h" #include "RICsubsequentAction.h" -#include "CauseRIC.h" +#include "CauseE2node.h" +#include "Cause.h" +#include "CauseMisc.h" +#include "CauseProtocol.h" +#include "CauseRICrequest.h" +#include "CauseRICservice.h" +#include "CauseTransport.h" +#include "RICsubscription-List-withCause.h" +#include "RICsubscription-withCause-Item.h" + +//#include "CauseRIC.h" typedef struct RICindicationMessage { long requestorID; @@ -101,4 +111,4 @@ RICindicationMsg* e2ap_decode_ric_indication_message(void *buffer, size_t buf_si RICindicationMsg* e2ap_decode_ric_indication_m(); void e2ap_free_decoded_ric_indication_message(RICindicationMsg* msg); -#endif /* _WRAPPER_H_ */ +#endif /* _WRAPPER_E2AP_H_ */ diff --git a/e2sm/asn1/Makefile.am.libasncodec b/e2sm/asn1/Makefile.am.libasncodec new file mode 100644 index 0000000..70946d3 --- /dev/null +++ b/e2sm/asn1/Makefile.am.libasncodec @@ -0,0 +1,480 @@ +ASN_MODULE_SRCS= \ + CGI.c \ + CoreCPID.c \ + InterfaceIdentifier.c \ + InterfaceID-NG.c \ + InterfaceID-Xn.c \ + InterfaceID-F1.c \ + InterfaceID-E1.c \ + InterfaceID-S1.c \ + InterfaceID-X2.c \ + InterfaceID-W1.c \ + Interface-MessageID.c \ + InterfaceType.c \ + GroupID.c \ + QoSID.c \ + RANfunction-Name.c \ + RIC-Format-Type.c \ + RIC-Style-Type.c \ + RIC-Style-Name.c \ + RRC-MessageID.c \ + RRCclass-LTE.c \ + RRCclass-NR.c \ + ServingCell-ARFCN.c \ + ServingCell-PCI.c \ + UEID.c \ + UEID-GNB.c \ + UEID-GNB-CU-CP-E1AP-ID-List.c \ + UEID-GNB-CU-CP-E1AP-ID-Item.c \ + UEID-GNB-CU-F1AP-ID-List.c \ + UEID-GNB-CU-CP-F1AP-ID-Item.c \ + UEID-GNB-DU.c \ + UEID-GNB-CU-UP.c \ + UEID-NG-ENB.c \ + UEID-NG-ENB-DU.c \ + UEID-EN-GNB.c \ + UEID-ENB.c \ + ENB-ID.c \ + GlobalENB-ID.c \ + GUMMEI.c \ + MME-Group-ID.c \ + MME-Code.c \ + MME-UE-S1AP-ID.c \ + QCI.c \ + SubscriberProfileIDforRFP.c \ + EN-GNB-ID.c \ + ENB-UE-X2AP-ID.c \ + ENB-UE-X2AP-ID-Extension.c \ + E-UTRA-ARFCN.c \ + E-UTRA-PCI.c \ + E-UTRA-TAC.c \ + GlobalenGNB-ID.c \ + NGENB-CU-UE-W1AP-ID.c \ + NGENB-DU-ID.c \ + AMFPointer.c \ + AMFRegionID.c \ + AMFSetID.c \ + AMF-UE-NGAP-ID.c \ + EUTRACellIdentity.c \ + EUTRA-CGI.c \ + FiveQI.c \ + GlobalGNB-ID.c \ + GlobalNgENB-ID.c \ + GlobalRANNodeID.c \ + GNB-ID.c \ + GUAMI.c \ + IndexToRFSP.c \ + NgENB-ID.c \ + NRCellIdentity.c \ + NR-CGI.c \ + PLMNIdentity.c \ + QosFlowIdentifier.c \ + SD.c \ + S-NSSAI.c \ + SST.c \ + NG-RANnodeUEXnAPID.c \ + GNB-CU-CP-UE-E1AP-ID.c \ + GNB-CU-UP-ID.c \ + FiveGS-TAC.c \ + GNB-CU-UE-F1AP-ID.c \ + GNB-DU-ID.c \ + NR-PCI.c \ + NR-ARFCN.c \ + FreqBandNrItem.c \ + RANUEID.c \ + TimeStamp.c \ + GranularityPeriod.c \ + MeasurementType.c \ + MeasurementTypeName.c \ + MeasurementTypeID.c \ + MeasurementLabel.c \ + TestCondInfo.c \ + TestCond-Type.c \ + TestCond-Expression.c \ + TestCond-Value.c \ + MeasurementInfoList.c \ + MeasurementInfoItem.c \ + LabelInfoList.c \ + LabelInfoItem.c \ + MeasurementData.c \ + MeasurementDataItem.c \ + MeasurementRecord.c \ + MeasurementRecordItem.c \ + MeasurementInfo-Action-List.c \ + MeasurementInfo-Action-Item.c \ + MeasurementCondList.c \ + MeasurementCondItem.c \ + MeasurementCondUEidList.c \ + MeasurementCondUEidItem.c \ + MatchingCondList.c \ + MatchingCondItem.c \ + MatchingUEidList.c \ + MatchingUEidItem.c \ + E2SM-KPM-EventTriggerDefinition.c \ + E2SM-KPM-EventTriggerDefinition-Format1.c \ + E2SM-KPM-ActionDefinition.c \ + E2SM-KPM-ActionDefinition-Format1.c \ + E2SM-KPM-ActionDefinition-Format2.c \ + E2SM-KPM-ActionDefinition-Format3.c \ + E2SM-KPM-IndicationHeader.c \ + E2SM-KPM-IndicationHeader-Format1.c \ + E2SM-KPM-IndicationMessage.c \ + E2SM-KPM-IndicationMessage-Format1.c \ + E2SM-KPM-IndicationMessage-Format2.c \ + E2SM-KPM-RANfunction-Description.c \ + RIC-EventTriggerStyle-Item.c \ + RIC-ReportStyle-Item.c \ + EXTERNAL.c + +ASN_MODULE_HDRS= \ + CGI.h \ + CoreCPID.h \ + InterfaceIdentifier.h \ + InterfaceID-NG.h \ + InterfaceID-Xn.h \ + InterfaceID-F1.h \ + InterfaceID-E1.h \ + InterfaceID-S1.h \ + InterfaceID-X2.h \ + InterfaceID-W1.h \ + Interface-MessageID.h \ + InterfaceType.h \ + GroupID.h \ + QoSID.h \ + RANfunction-Name.h \ + RIC-Format-Type.h \ + RIC-Style-Type.h \ + RIC-Style-Name.h \ + RRC-MessageID.h \ + RRCclass-LTE.h \ + RRCclass-NR.h \ + ServingCell-ARFCN.h \ + ServingCell-PCI.h \ + UEID.h \ + UEID-GNB.h \ + UEID-GNB-CU-CP-E1AP-ID-List.h \ + UEID-GNB-CU-CP-E1AP-ID-Item.h \ + UEID-GNB-CU-F1AP-ID-List.h \ + UEID-GNB-CU-CP-F1AP-ID-Item.h \ + UEID-GNB-DU.h \ + UEID-GNB-CU-UP.h \ + UEID-NG-ENB.h \ + UEID-NG-ENB-DU.h \ + UEID-EN-GNB.h \ + UEID-ENB.h \ + ENB-ID.h \ + GlobalENB-ID.h \ + GUMMEI.h \ + MME-Group-ID.h \ + MME-Code.h \ + MME-UE-S1AP-ID.h \ + QCI.h \ + SubscriberProfileIDforRFP.h \ + EN-GNB-ID.h \ + ENB-UE-X2AP-ID.h \ + ENB-UE-X2AP-ID-Extension.h \ + E-UTRA-ARFCN.h \ + E-UTRA-PCI.h \ + E-UTRA-TAC.h \ + GlobalenGNB-ID.h \ + NGENB-CU-UE-W1AP-ID.h \ + NGENB-DU-ID.h \ + AMFPointer.h \ + AMFRegionID.h \ + AMFSetID.h \ + AMF-UE-NGAP-ID.h \ + EUTRACellIdentity.h \ + EUTRA-CGI.h \ + FiveQI.h \ + GlobalGNB-ID.h \ + GlobalNgENB-ID.h \ + GlobalRANNodeID.h \ + GNB-ID.h \ + GUAMI.h \ + IndexToRFSP.h \ + NgENB-ID.h \ + NRCellIdentity.h \ + NR-CGI.h \ + PLMNIdentity.h \ + QosFlowIdentifier.h \ + SD.h \ + S-NSSAI.h \ + SST.h \ + NG-RANnodeUEXnAPID.h \ + GNB-CU-CP-UE-E1AP-ID.h \ + GNB-CU-UP-ID.h \ + FiveGS-TAC.h \ + GNB-CU-UE-F1AP-ID.h \ + GNB-DU-ID.h \ + NR-PCI.h \ + NR-ARFCN.h \ + FreqBandNrItem.h \ + RANUEID.h \ + TimeStamp.h \ + GranularityPeriod.h \ + MeasurementType.h \ + MeasurementTypeName.h \ + MeasurementTypeID.h \ + MeasurementLabel.h \ + TestCondInfo.h \ + TestCond-Type.h \ + TestCond-Expression.h \ + TestCond-Value.h \ + MeasurementInfoList.h \ + MeasurementInfoItem.h \ + LabelInfoList.h \ + LabelInfoItem.h \ + MeasurementData.h \ + MeasurementDataItem.h \ + MeasurementRecord.h \ + MeasurementRecordItem.h \ + MeasurementInfo-Action-List.h \ + MeasurementInfo-Action-Item.h \ + MeasurementCondList.h \ + MeasurementCondItem.h \ + MeasurementCondUEidList.h \ + MeasurementCondUEidItem.h \ + MatchingCondList.h \ + MatchingCondItem.h \ + MatchingUEidList.h \ + MatchingUEidItem.h \ + E2SM-KPM-EventTriggerDefinition.h \ + E2SM-KPM-EventTriggerDefinition-Format1.h \ + E2SM-KPM-ActionDefinition.h \ + E2SM-KPM-ActionDefinition-Format1.h \ + E2SM-KPM-ActionDefinition-Format2.h \ + E2SM-KPM-ActionDefinition-Format3.h \ + E2SM-KPM-IndicationHeader.h \ + E2SM-KPM-IndicationHeader-Format1.h \ + E2SM-KPM-IndicationMessage.h \ + E2SM-KPM-IndicationMessage-Format1.h \ + E2SM-KPM-IndicationMessage-Format2.h \ + E2SM-KPM-RANfunction-Description.h \ + RIC-EventTriggerStyle-Item.h \ + RIC-ReportStyle-Item.h \ + EXTERNAL.h + +ASN_MODULE_HDRS+=ANY.h +ASN_MODULE_SRCS+=ANY.c +ASN_MODULE_HDRS+=OCTET_STRING.h +ASN_MODULE_HDRS+=OPEN_TYPE.h +ASN_MODULE_SRCS+=OPEN_TYPE.c +ASN_MODULE_HDRS+=constr_CHOICE.h +ASN_MODULE_HDRS+=BOOLEAN.h +ASN_MODULE_SRCS+=BOOLEAN.c +ASN_MODULE_HDRS+=GraphicString.h +ASN_MODULE_SRCS+=GraphicString.c +ASN_MODULE_HDRS+=INTEGER.h +ASN_MODULE_SRCS+=INTEGER.c +ASN_MODULE_HDRS+=NULL.h +ASN_MODULE_SRCS+=NULL.c +ASN_MODULE_HDRS+=NativeEnumerated.h +ASN_MODULE_SRCS+=NativeEnumerated.c +ASN_MODULE_HDRS+=NativeInteger.h +ASN_MODULE_SRCS+=NativeInteger.c +ASN_MODULE_HDRS+=NativeReal.h +ASN_MODULE_SRCS+=NativeReal.c +ASN_MODULE_HDRS+=REAL.h +ASN_MODULE_HDRS+=OBJECT_IDENTIFIER.h +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER.c +ASN_MODULE_HDRS+=asn_codecs_prim.h +ASN_MODULE_HDRS+=ObjectDescriptor.h +ASN_MODULE_SRCS+=ObjectDescriptor.c +ASN_MODULE_HDRS+=PrintableString.h +ASN_MODULE_SRCS+=PrintableString.c +ASN_MODULE_SRCS+=REAL.c +ASN_MODULE_HDRS+=asn_SEQUENCE_OF.h +ASN_MODULE_SRCS+=asn_SEQUENCE_OF.c +ASN_MODULE_HDRS+=asn_SET_OF.h +ASN_MODULE_SRCS+=asn_SET_OF.c +ASN_MODULE_SRCS+=constr_CHOICE.c +ASN_MODULE_HDRS+=constr_SEQUENCE.h +ASN_MODULE_SRCS+=constr_SEQUENCE.c +ASN_MODULE_HDRS+=constr_SEQUENCE_OF.h +ASN_MODULE_SRCS+=constr_SEQUENCE_OF.c +ASN_MODULE_HDRS+=constr_SET_OF.h +ASN_MODULE_SRCS+=constr_SET_OF.c +ASN_MODULE_HDRS+=asn_application.h +ASN_MODULE_SRCS+=asn_application.c +ASN_MODULE_HDRS+=asn_ioc.h +ASN_MODULE_HDRS+=asn_system.h +ASN_MODULE_HDRS+=asn_codecs.h +ASN_MODULE_HDRS+=asn_internal.h +ASN_MODULE_SRCS+=asn_internal.c +ASN_MODULE_HDRS+=asn_bit_data.h +ASN_MODULE_SRCS+=asn_bit_data.c +ASN_MODULE_SRCS+=OCTET_STRING.c +ASN_MODULE_HDRS+=BIT_STRING.h +ASN_MODULE_SRCS+=BIT_STRING.c +ASN_MODULE_SRCS+=asn_codecs_prim.c +ASN_MODULE_HDRS+=ber_tlv_length.h +ASN_MODULE_SRCS+=ber_tlv_length.c +ASN_MODULE_HDRS+=ber_tlv_tag.h +ASN_MODULE_SRCS+=ber_tlv_tag.c +ASN_MODULE_HDRS+=constr_TYPE.h +ASN_MODULE_SRCS+=constr_TYPE.c +ASN_MODULE_HDRS+=constraints.h +ASN_MODULE_SRCS+=constraints.c +ASN_MODULE_HDRS+=ber_decoder.h +ASN_MODULE_HDRS+=der_encoder.h +ASN_MODULE_SRCS+=ber_decoder.c +ASN_MODULE_SRCS+=der_encoder.c +ASN_MODULE_SRCS+=ANY_ber.c +ASN_MODULE_SRCS+=BOOLEAN_ber.c +ASN_MODULE_SRCS+=INTEGER_ber.c +ASN_MODULE_SRCS+=NULL_ber.c +ASN_MODULE_SRCS+=NativeInteger_ber.c +ASN_MODULE_SRCS+=NativeReal_ber.c +ASN_MODULE_SRCS+=OCTET_STRING_ber.c +ASN_MODULE_SRCS+=OPEN_TYPE_ber.c +ASN_MODULE_SRCS+=asn_codecs_prim_ber.c +ASN_MODULE_SRCS+=constr_CHOICE_ber.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_ber.c +ASN_MODULE_SRCS+=constr_SEQUENCE_ber.c +ASN_MODULE_SRCS+=constr_SET_OF_ber.c +ASN_MODULE_HDRS+=xer_support.h +ASN_MODULE_HDRS+=xer_decoder.h +ASN_MODULE_HDRS+=xer_encoder.h +ASN_MODULE_SRCS+=xer_support.c +ASN_MODULE_SRCS+=xer_decoder.c +ASN_MODULE_SRCS+=xer_encoder.c +ASN_MODULE_SRCS+=ANY_xer.c +ASN_MODULE_SRCS+=BIT_STRING_xer.c +ASN_MODULE_SRCS+=BOOLEAN_xer.c +ASN_MODULE_SRCS+=INTEGER_xer.c +ASN_MODULE_SRCS+=NULL_xer.c +ASN_MODULE_SRCS+=NativeEnumerated_xer.c +ASN_MODULE_SRCS+=NativeInteger_xer.c +ASN_MODULE_SRCS+=NativeReal_xer.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_xer.c +ASN_MODULE_SRCS+=OCTET_STRING_xer.c +ASN_MODULE_SRCS+=OPEN_TYPE_xer.c +ASN_MODULE_SRCS+=REAL_xer.c +ASN_MODULE_SRCS+=asn_codecs_prim_xer.c +ASN_MODULE_SRCS+=constr_CHOICE_xer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_xer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_xer.c +ASN_MODULE_SRCS+=constr_SET_OF_xer.c +ASN_MODULE_HDRS+=oer_decoder.h +ASN_MODULE_HDRS+=oer_encoder.h +ASN_MODULE_HDRS+=oer_support.h +ASN_MODULE_SRCS+=oer_decoder.c +ASN_MODULE_SRCS+=oer_encoder.c +ASN_MODULE_SRCS+=oer_support.c +ASN_MODULE_SRCS+=OPEN_TYPE_oer.c +ASN_MODULE_SRCS+=INTEGER_oer.c +ASN_MODULE_SRCS+=BIT_STRING_oer.c +ASN_MODULE_SRCS+=OCTET_STRING_oer.c +ASN_MODULE_SRCS+=NativeInteger_oer.c +ASN_MODULE_SRCS+=NativeEnumerated_oer.c +ASN_MODULE_SRCS+=constr_CHOICE_oer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_oer.c +ASN_MODULE_SRCS+=constr_SET_OF_oer.c +ASN_MODULE_SRCS+=BOOLEAN_oer.c +ASN_MODULE_SRCS+=NULL_oer.c +ASN_MODULE_SRCS+=NativeReal_oer.c +ASN_MODULE_SRCS+=REAL_oer.c +ASN_MODULE_HDRS+=per_decoder.h +ASN_MODULE_HDRS+=per_encoder.h +ASN_MODULE_HDRS+=per_support.h +ASN_MODULE_HDRS+=per_opentype.h +ASN_MODULE_SRCS+=per_decoder.c +ASN_MODULE_SRCS+=per_encoder.c +ASN_MODULE_SRCS+=per_support.c +ASN_MODULE_SRCS+=per_opentype.c +ASN_MODULE_HDRS+=uper_decoder.h +ASN_MODULE_HDRS+=uper_encoder.h +ASN_MODULE_HDRS+=uper_support.h +ASN_MODULE_HDRS+=uper_opentype.h +ASN_MODULE_SRCS+=uper_decoder.c +ASN_MODULE_SRCS+=uper_encoder.c +ASN_MODULE_SRCS+=uper_support.c +ASN_MODULE_SRCS+=uper_opentype.c +ASN_MODULE_SRCS+=ANY_uper.c +ASN_MODULE_SRCS+=BIT_STRING_uper.c +ASN_MODULE_SRCS+=BOOLEAN_uper.c +ASN_MODULE_SRCS+=INTEGER_uper.c +ASN_MODULE_SRCS+=NULL_uper.c +ASN_MODULE_SRCS+=NativeEnumerated_uper.c +ASN_MODULE_SRCS+=NativeInteger_uper.c +ASN_MODULE_SRCS+=NativeReal_uper.c +ASN_MODULE_SRCS+=OCTET_STRING_uper.c +ASN_MODULE_SRCS+=OPEN_TYPE_uper.c +ASN_MODULE_SRCS+=REAL_uper.c +ASN_MODULE_SRCS+=constr_CHOICE_uper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_uper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_uper.c +ASN_MODULE_SRCS+=constr_SET_OF_uper.c +ASN_MODULE_HDRS+=aper_decoder.h +ASN_MODULE_HDRS+=aper_encoder.h +ASN_MODULE_HDRS+=aper_support.h +ASN_MODULE_HDRS+=aper_opentype.h +ASN_MODULE_SRCS+=aper_decoder.c +ASN_MODULE_SRCS+=aper_encoder.c +ASN_MODULE_SRCS+=aper_support.c +ASN_MODULE_SRCS+=aper_opentype.c +ASN_MODULE_SRCS+=ANY_aper.c +ASN_MODULE_SRCS+=BOOLEAN_aper.c +ASN_MODULE_SRCS+=INTEGER_aper.c +ASN_MODULE_SRCS+=NULL_aper.c +ASN_MODULE_SRCS+=NativeEnumerated_aper.c +ASN_MODULE_SRCS+=NativeInteger_aper.c +ASN_MODULE_SRCS+=NativeReal_aper.c +ASN_MODULE_SRCS+=OCTET_STRING_aper.c +ASN_MODULE_SRCS+=OPEN_TYPE_aper.c +ASN_MODULE_SRCS+=REAL_aper.c +ASN_MODULE_SRCS+=constr_CHOICE_aper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_aper.c +ASN_MODULE_SRCS+=constr_SEQUENCE_aper.c +ASN_MODULE_SRCS+=constr_SET_OF_aper.c +ASN_MODULE_SRCS+=BIT_STRING_print.c +ASN_MODULE_SRCS+=BOOLEAN_print.c +ASN_MODULE_SRCS+=INTEGER_print.c +ASN_MODULE_SRCS+=NULL_print.c +ASN_MODULE_SRCS+=NativeInteger_print.c +ASN_MODULE_SRCS+=NativeReal_print.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_print.c +ASN_MODULE_SRCS+=OCTET_STRING_print.c +ASN_MODULE_SRCS+=REAL_print.c +ASN_MODULE_SRCS+=constr_CHOICE_print.c +ASN_MODULE_SRCS+=constr_SEQUENCE_print.c +ASN_MODULE_SRCS+=constr_SET_OF_print.c +ASN_MODULE_HDRS+=asn_random_fill.h +ASN_MODULE_SRCS+=asn_random_fill.c +ASN_MODULE_SRCS+=BIT_STRING_rfill.c +ASN_MODULE_SRCS+=BOOLEAN_rfill.c +ASN_MODULE_SRCS+=INTEGER_rfill.c +ASN_MODULE_SRCS+=NULL_rfill.c +ASN_MODULE_SRCS+=NativeInteger_rfill.c +ASN_MODULE_SRCS+=NativeReal_rfill.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_rfill.c +ASN_MODULE_SRCS+=OCTET_STRING_rfill.c +ASN_MODULE_SRCS+=REAL_rfill.c +ASN_MODULE_SRCS+=constr_CHOICE_rfill.c +ASN_MODULE_SRCS+=constr_SEQUENCE_rfill.c +ASN_MODULE_SRCS+=constr_SET_OF_rfill.c +ASN_MODULE_HDRS+=jer_encoder.h +ASN_MODULE_SRCS+=jer_encoder.c +ASN_MODULE_SRCS+=ANY_jer.c +ASN_MODULE_SRCS+=BIT_STRING_jer.c +ASN_MODULE_SRCS+=BOOLEAN_jer.c +ASN_MODULE_SRCS+=INTEGER_jer.c +ASN_MODULE_SRCS+=NULL_jer.c +ASN_MODULE_SRCS+=NativeEnumerated_jer.c +ASN_MODULE_SRCS+=NativeInteger_jer.c +ASN_MODULE_SRCS+=NativeReal_jer.c +ASN_MODULE_SRCS+=OBJECT_IDENTIFIER_jer.c +ASN_MODULE_SRCS+=OCTET_STRING_jer.c +ASN_MODULE_SRCS+=REAL_jer.c +ASN_MODULE_SRCS+=constr_CHOICE_jer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_OF_jer.c +ASN_MODULE_SRCS+=constr_SEQUENCE_jer.c +ASN_MODULE_SRCS+=constr_SET_OF_jer.c + +ASN_MODULE_CFLAGS= + +lib_LTLIBRARIES+=libasncodec.la +libasncodec_la_SOURCES=$(ASN_MODULE_SRCS) $(ASN_MODULE_HDRS) +libasncodec_la_CPPFLAGS=-I$(top_srcdir)/ +libasncodec_la_CFLAGS=$(ASN_MODULE_CFLAGS) +libasncodec_la_LDFLAGS=-lm diff --git a/e2sm/asn1/e2sm2_0.asn b/e2sm/asn1/e2sm2_0.asn new file mode 100644 index 0000000..0bb2e7e --- /dev/null +++ b/e2sm/asn1/e2sm2_0.asn @@ -0,0 +1,541 @@ +-- ASN1START +-- ************************************************************** +-- E2SM +-- Information Element Definitions +-- +-- ************************************************************** + +E2SM-COMMON-IEs { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53148 e2(1) version1 (1) e2sm(2) e2sm-COMMON-IEs (0)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- -------------------------------------------------- +-- Constants +-- -------------------------------------------------- + +maxE1APid INTEGER ::= 65535 +maxF1APid INTEGER ::= 4 + +-- IEs derived from 3GPP 36.423 (X2AP) +maxEARFCN INTEGER ::= 65535 + +-- IEs derived from 3GPP 38.473 (F1AP) +maxNRARFCN INTEGER ::= 3279165 +maxnoofNrCellBands INTEGER ::= 32 + + +-- -------------------------------------------------- +-- E2SM Commmon IEs +-- -------------------------------------------------- + +CGI ::= CHOICE { + nR-CGI NR-CGI, + eUTRA-CGI EUTRA-CGI, + ... +} + +CoreCPID ::= CHOICE { + fiveGC GUAMI, + ePC GUMMEI, + ... +} + +InterfaceIdentifier ::= CHOICE { + nG InterfaceID-NG, + xN InterfaceID-Xn, + f1 InterfaceID-F1, + e1 InterfaceID-E1, + s1 InterfaceID-S1, + x2 InterfaceID-X2, + w1 InterfaceID-W1, + ... +} + +InterfaceID-NG ::= SEQUENCE { + guami GUAMI, + ... +} + +InterfaceID-Xn ::= SEQUENCE { + global-NG-RAN-ID GlobalRANNodeID, + ... +} + +InterfaceID-F1 ::= SEQUENCE { + global-NG-RAN-ID GlobalRANNodeID, + gNB-DU-ID GNB-DU-ID, + ... +} + +InterfaceID-E1 ::= SEQUENCE { + global-NG-RAN-ID GlobalRANNodeID, + gNB-CU-UP-ID GNB-CU-UP-ID, + ... +} + +InterfaceID-S1 ::= SEQUENCE { + gUMMEI GUMMEI, + ... +} + +InterfaceID-X2 ::= SEQUENCE { + nodeType CHOICE { + global-eNB-ID GlobalENB-ID, + global-en-gNB-ID GlobalenGNB-ID, + ... + }, + ... +} + +InterfaceID-W1 ::= SEQUENCE { + global-ng-eNB-ID GlobalNgENB-ID, + ng-eNB-DU-ID NGENB-DU-ID, + ... +} + +Interface-MessageID ::= SEQUENCE { + interfaceProcedureID INTEGER, + messageType ENUMERATED {initiatingMessage, successfulOutcome, unsuccessfulOutcome, ...}, + ... +} + +InterfaceType ::= ENUMERATED {nG, xn, f1, e1, s1, x2, w1, ...} + +GroupID ::= CHOICE { + fiveGC FiveQI, + ePC QCI, + ... +} + +QoSID ::= CHOICE { + fiveGC FiveQI, + ePC QCI, + ... +} + +RANfunction-Name ::= SEQUENCE{ + ranFunction-ShortName PrintableString(SIZE(1..150,...)), + ranFunction-E2SM-OID PrintableString(SIZE(1..1000,...)), + ranFunction-Description PrintableString(SIZE(1..150,...)), + ranFunction-Instance INTEGER OPTIONAL, + ... +} + +RIC-Format-Type ::= INTEGER + +RIC-Style-Type ::= INTEGER + +RIC-Style-Name ::= PrintableString(SIZE(1..150,...)) + + +RRC-MessageID ::= SEQUENCE { + rrcType CHOICE { + lTE RRCclass-LTE, + nR RRCclass-NR, + ... + }, + messageID INTEGER, + ... +} + +RRCclass-LTE ::= ENUMERATED {bCCH-BCH, bCCH-BCH-MBMS, bCCH-DL-SCH, bCCH-DL-SCH-BR, bCCH-DL-SCH-MBMS, mCCH, pCCH, dL-CCCH, dL-DCCH, uL-CCCH, uL-DCCH, sC-MCCH, ...} + +RRCclass-NR ::= ENUMERATED {bCCH-BCH, bCCH-DL-SCH, dL-CCCH, dL-DCCH, pCCH, uL-CCCH, uL-CCCH1, uL-DCCH, ...} + +ServingCell-ARFCN ::= CHOICE { + nR NR-ARFCN, + eUTRA E-UTRA-ARFCN, + ... +} + +ServingCell-PCI ::= CHOICE { + nR NR-PCI, + eUTRA E-UTRA-PCI, + ... +} + + +UEID ::= CHOICE{ + gNB-UEID UEID-GNB, + gNB-DU-UEID UEID-GNB-DU, + gNB-CU-UP-UEID UEID-GNB-CU-UP, + ng-eNB-UEID UEID-NG-ENB, + ng-eNB-DU-UEID UEID-NG-ENB-DU, + en-gNB-UEID UEID-EN-GNB, + eNB-UEID UEID-ENB, + ... +} + +UEID-GNB ::= SEQUENCE{ + amf-UE-NGAP-ID AMF-UE-NGAP-ID, + guami GUAMI, + gNB-CU-UE-F1AP-ID-List UEID-GNB-CU-F1AP-ID-List OPTIONAL, +-- C-ifCUDUseparated: This IE shall be present only for a CU-DU separated gNB. More than 1 F1AP ID shall be reported only when NR-DC is established. + gNB-CU-CP-UE-E1AP-ID-List UEID-GNB-CU-CP-E1AP-ID-List OPTIONAL, +-- C-ifCPUPseparated: This IE shall be present only for a CP-UP separated gNB. + ran-UEID RANUEID OPTIONAL, + m-NG-RAN-UE-XnAP-ID NG-RANnodeUEXnAPID OPTIONAL, +-- C-ifDCSetup: This IE shall be present only if DC is established. To be reported by both MN and SN. + globalGNB-ID GlobalGNB-ID OPTIONAL, +-- C-ifDCSetup: This IE shall be present only if DC is established. To be reported only by SN. + ... +} + +UEID-GNB-CU-CP-E1AP-ID-List ::= SEQUENCE (SIZE(1..maxE1APid)) OF UEID-GNB-CU-CP-E1AP-ID-Item + +UEID-GNB-CU-CP-E1AP-ID-Item ::= SEQUENCE{ + gNB-CU-CP-UE-E1AP-ID GNB-CU-CP-UE-E1AP-ID, + ... +} + +UEID-GNB-CU-F1AP-ID-List ::= SEQUENCE (SIZE(1..maxF1APid)) OF UEID-GNB-CU-CP-F1AP-ID-Item + +UEID-GNB-CU-CP-F1AP-ID-Item ::= SEQUENCE{ + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID, + ... +} + +UEID-GNB-DU ::= SEQUENCE{ + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID, + ran-UEID RANUEID OPTIONAL, + ... +} + +UEID-GNB-CU-UP ::= SEQUENCE{ + gNB-CU-CP-UE-E1AP-ID GNB-CU-CP-UE-E1AP-ID, + ran-UEID RANUEID OPTIONAL, + ... +} + +UEID-NG-ENB ::= SEQUENCE{ + amf-UE-NGAP-ID AMF-UE-NGAP-ID, + guami GUAMI, + ng-eNB-CU-UE-W1AP-ID NGENB-CU-UE-W1AP-ID OPTIONAL, +-- C-ifCUDUseperated: This IE shall be present only for a CU-DU seperated ng-eNB. + m-NG-RAN-UE-XnAP-ID NG-RANnodeUEXnAPID OPTIONAL, +-- C-ifDCSetup: This IE shall be present only if DC is established. To be reported by both MN and SN. + globalNgENB-ID GlobalNgENB-ID OPTIONAL, +-- C-ifDCSetup: This IE shall be present only if DC is established. To be reported only by SN. + ... +} + + +UEID-NG-ENB-DU ::= SEQUENCE{ + ng-eNB-CU-UE-W1AP-ID NGENB-CU-UE-W1AP-ID, + ... +} + +UEID-EN-GNB ::= SEQUENCE{ + m-eNB-UE-X2AP-ID ENB-UE-X2AP-ID, + m-eNB-UE-X2AP-ID-Extension ENB-UE-X2AP-ID-Extension OPTIONAL, + globalENB-ID GlobalENB-ID, + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID OPTIONAL, +-- C-ifCUDUseperated: This IE shall be present only for a CU-DU seperated en-gNB. + gNB-CU-CP-UE-E1AP-ID-List UEID-GNB-CU-CP-E1AP-ID-List OPTIONAL, +-- C-ifCPUPseparated: This IE shall be present only for a CP-UP separated en-gNB. + ran-UEID RANUEID OPTIONAL, + ... +} + +UEID-ENB ::= SEQUENCE{ + mME-UE-S1AP-ID MME-UE-S1AP-ID, + gUMMEI GUMMEI, + m-eNB-UE-X2AP-ID ENB-UE-X2AP-ID OPTIONAL, +-- This IE shall be present only if DC is established. To be reported by MeNB and SeNB. + m-eNB-UE-X2AP-ID-Extension ENB-UE-X2AP-ID-Extension OPTIONAL, + globalENB-ID GlobalENB-ID OPTIONAL, +-- This IE shall be present only if DC is established. To be reported only by SeNB. + ... +} + +-- ************************************************************** +-- 3GPP derived IEs +-- ************************************************************** +-- NOTE: +-- - Extension fields removed and replaced with "..." +-- - IE names modified across all extracts to use "PLMNIdentity" + +-- ************************************************************** +-- IEs derived from 3GPP 36.413 (S1AP) +-- ************************************************************** +-- ************************************************************** + +-- copied from v16.5.0 +ENB-ID ::= CHOICE { + macro-eNB-ID BIT STRING (SIZE (20)), + home-eNB-ID BIT STRING (SIZE (28)), + ... , + short-Macro-eNB-ID BIT STRING (SIZE(18)), + long-Macro-eNB-ID BIT STRING (SIZE(21)) +} + +-- copied from v16.5.0 +GlobalENB-ID ::= SEQUENCE { + pLMNIdentity PLMNIdentity, + eNB-ID ENB-ID, + ... +} + + +-- copied from v16.5.0 +GUMMEI ::= SEQUENCE { + pLMN-Identity PLMNIdentity, + mME-Group-ID MME-Group-ID, + mME-Code MME-Code, + ... +} + +-- copied from v16.5.0 +MME-Group-ID ::= OCTET STRING (SIZE (2)) + +-- copied from v16.5.0 +MME-Code ::= OCTET STRING (SIZE (1)) + +-- copied from v16.5.0 +MME-UE-S1AP-ID ::= INTEGER (0..4294967295) + +-- copied from v16.5.0 +QCI ::= INTEGER (0..255) + +-- copied from v16.5.0 +SubscriberProfileIDforRFP ::= INTEGER (1..256) + + + + +-- ************************************************************** +-- IEs derived from 3GPP 36.423 (X2AP) +-- ************************************************************** +-- Extension fields removed. +-- Note: to avoid duplicate names with NGAP, XnAP, etc.: +-- GNB-ID renamed ENGNB-ID, +-- GlobalGNB-ID renamed GlobalenGNB-ID, +-- UE-X2AP-ID renamed ENB-UE-X2AP-ID +-- UE-X2AP-ID-Extension renamed ENB-UE-X2AP-ID-Extension +-- ************************************************************** + +-- copied from v16.5.0 +EN-GNB-ID ::= CHOICE { + en-gNB-ID BIT STRING (SIZE (22..32)), + ... +} + +-- copied from v16.5.0 +ENB-UE-X2AP-ID ::= INTEGER (0..4095) + +-- copied from v16.5.0 +ENB-UE-X2AP-ID-Extension ::= INTEGER (0..4095, ...) + +-- copied from v16.5.0 +E-UTRA-ARFCN ::= INTEGER (0..maxEARFCN) + +-- copied from v16.5.0 +E-UTRA-PCI ::= INTEGER (0..503, ...) + +-- copied from v16.5.0 +E-UTRA-TAC ::= OCTET STRING (SIZE(2)) + +-- copied from v16.5.0 +GlobalenGNB-ID ::= SEQUENCE { + pLMN-Identity PLMNIdentity, + en-gNB-ID EN-GNB-ID, + ... +} + + + + + +-- ************************************************************** +-- IEs derived from 3GPP 37.473 (W1AP) +-- ************************************************************** + +-- copied from v16.3.0 +NGENB-CU-UE-W1AP-ID ::= INTEGER (0..4294967295) + +-- copied from v16.3.0 +NGENB-DU-ID ::= INTEGER (0..68719476735) + + + + + +-- ************************************************************** +-- IEs derived from 3GPP 38.413 (NGAP) +-- Extension fields removed and replaced with ... +-- ************************************************************** + +-- copied from v16.2.0 +AMFPointer ::= BIT STRING (SIZE(6)) + +-- copied from v16.2.0 +AMFRegionID ::= BIT STRING (SIZE(8)) + +-- copied from v16.2.0 +AMFSetID ::= BIT STRING (SIZE(10)) + +-- copied from v16.2.0 +AMF-UE-NGAP-ID ::= INTEGER (0..1099511627775) + +-- copied from v16.2.0 +EUTRACellIdentity ::= BIT STRING (SIZE(28)) + +-- copied from v16.2.0 +EUTRA-CGI ::= SEQUENCE { + pLMNIdentity PLMNIdentity, + eUTRACellIdentity EUTRACellIdentity, + ... +} + +-- copied from v16.2.0 +FiveQI ::= INTEGER (0..255, ...) + +-- copied from v16.2.0 +GlobalGNB-ID ::= SEQUENCE { + pLMNIdentity PLMNIdentity, + gNB-ID GNB-ID, + ... +} + +-- copied from v16.2.0 +GlobalNgENB-ID ::= SEQUENCE { + pLMNIdentity PLMNIdentity, + ngENB-ID NgENB-ID, + ... +} + +-- copied from v16.2.0 +GlobalRANNodeID ::= CHOICE { + globalGNB-ID GlobalGNB-ID, + globalNgENB-ID GlobalNgENB-ID, + ... +} + +-- copied from v16.2.0 +GNB-ID ::= CHOICE { + gNB-ID BIT STRING (SIZE(22..32)), + ... +} + +-- copied from v16.2.0 +GUAMI ::= SEQUENCE { + pLMNIdentity PLMNIdentity, + aMFRegionID AMFRegionID, + aMFSetID AMFSetID, + aMFPointer AMFPointer, + ... +} + +-- copied from v16.2.0 +IndexToRFSP ::= INTEGER (1..256, ...) + +-- copied from v16.2.0 +NgENB-ID ::= CHOICE { + macroNgENB-ID BIT STRING (SIZE(20)), + shortMacroNgENB-ID BIT STRING (SIZE(18)), + longMacroNgENB-ID BIT STRING (SIZE(21)), + ... +} + +-- copied from v16.2.0 +NRCellIdentity ::= BIT STRING (SIZE(36)) + +-- copied from v16.2.0 +NR-CGI ::= SEQUENCE { + pLMNIdentity PLMNIdentity, + nRCellIdentity NRCellIdentity, + ... +} + +-- copied from v16.2.0 +PLMNIdentity ::= OCTET STRING (SIZE(3)) + +-- copied from v16.2.0 +QosFlowIdentifier ::= INTEGER (0..63, ...) + +-- copied from v16.2.0 +SD ::= OCTET STRING (SIZE(3)) + +-- copied from v16.2.0 +S-NSSAI ::= SEQUENCE { + sST SST, + sD SD OPTIONAL, + ... +} + +-- copied from v16.2.0 +SST ::= OCTET STRING (SIZE(1)) + + + + + +-- ************************************************************** +-- IEs derived from 3GPP 38.423 (XnAP) +-- ************************************************************** + +-- copied from v16.2.0 +NG-RANnodeUEXnAPID ::= INTEGER (0.. 4294967295) + + + + + +-- ************************************************************** +-- IEs derived from 3GPP 38.463 (E1AP) +-- ************************************************************** + +-- copied from v16.5.0 +GNB-CU-CP-UE-E1AP-ID ::= INTEGER (0..4294967295) + +-- copied from v16.5.0 +GNB-CU-UP-ID ::= INTEGER (0..68719476735) + + + + + + +-- ************************************************************** +-- IEs derived from 3GPP 38.473 (F1AP) +-- ************************************************************** + +-- copied from v16.5.0 +FiveGS-TAC ::= OCTET STRING (SIZE(3)) + +-- copied from v16.5.0 +GNB-CU-UE-F1AP-ID ::= INTEGER (0..4294967295) + +-- copied from v16.5.0 +GNB-DU-ID ::= INTEGER (0..68719476735) + +-- copied from v16.5.0 +NR-PCI ::= INTEGER (0..1007) + +-- copied from v16.5.0 +NR-ARFCN ::= SEQUENCE { + nRARFCN INTEGER (0..maxNRARFCN), + freqBandListNr SEQUENCE (SIZE(1..maxnoofNrCellBands)) OF FreqBandNrItem, + ... +} + +-- copied from v16.5.0 +FreqBandNrItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024, ...), + ... +} + +-- copied from v16.5.0 +RANUEID ::= OCTET STRING (SIZE (8)) + + + + + + +END +-- ASN1STOP + diff --git a/e2sm/asn1/kpm2_0.asn b/e2sm/asn1/kpm2_0.asn new file mode 100644 index 0000000..f9d812d --- /dev/null +++ b/e2sm/asn1/kpm2_0.asn @@ -0,0 +1,327 @@ +-- ASN1START +-- ************************************************************** +-- E2SM-KPM Information Element Definitions +-- ************************************************************** + +E2SM-KPM-IEs { +iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) oran(53148) e2(1) version2(2) e2sm(2) e2sm-KPMMON-IEs (2)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- IEs +-- ************************************************************** + +IMPORTS + CGI, + FiveQI, + PLMNIdentity, + QCI, + QosFlowIdentifier, + RANfunction-Name, + RIC-Format-Type, + RIC-Style-Name, + RIC-Style-Type, + S-NSSAI, + UEID +FROM E2SM-COMMON-IEs; + +TimeStamp ::= OCTET STRING (SIZE(4)) + +GranularityPeriod ::= INTEGER (1.. 4294967295) + +MeasurementType ::= CHOICE { + measName MeasurementTypeName, + measID MeasurementTypeID, + ... +} + +MeasurementTypeName ::= PrintableString(SIZE(1.. 150, ...)) + +MeasurementTypeID ::= INTEGER (1.. 65536, ...) + +MeasurementLabel ::= SEQUENCE { + noLabel ENUMERATED {true, ...} OPTIONAL, + plmnID PLMNIdentity OPTIONAL, + sliceID S-NSSAI OPTIONAL, + fiveQI FiveQI OPTIONAL, + qFI QosFlowIdentifier OPTIONAL, + qCI QCI OPTIONAL, + qCImax QCI OPTIONAL, + qCImin QCI OPTIONAL, + aRPmax INTEGER (1.. 15, ...) OPTIONAL, + aRPmin INTEGER (1.. 15, ...) OPTIONAL, + bitrateRange INTEGER (1.. 65535, ...) OPTIONAL, + layerMU-MIMO INTEGER (1.. 65535, ...) OPTIONAL, + sUM ENUMERATED {true, ...} OPTIONAL, + distBinX INTEGER (1.. 65535, ...) OPTIONAL, + distBinY INTEGER (1.. 65535, ...) OPTIONAL, + distBinZ INTEGER (1.. 65535, ...) OPTIONAL, + preLabelOverride ENUMERATED {true, ...} OPTIONAL, + startEndInd ENUMERATED {start, end, ...} OPTIONAL, + min ENUMERATED {true, ...} OPTIONAL, + max ENUMERATED {true, ...} OPTIONAL, + avg ENUMERATED {true, ...} OPTIONAL, + ... +} + +TestCondInfo ::= SEQUENCE{ + testType TestCond-Type, + testExpr TestCond-Expression, + testValue TestCond-Value, + ... +} + +TestCond-Type ::= CHOICE{ + gBR ENUMERATED {true, ...}, + aMBR ENUMERATED {true, ...}, + isStat ENUMERATED {true, ...}, + isCatM ENUMERATED {true, ...}, + rSRP ENUMERATED {true, ...}, + rSRQ ENUMERATED {true, ...}, + ... +} + +TestCond-Expression ::= ENUMERATED { +equal, +greaterthan, +lessthan, +contains, +present, +... +} + +TestCond-Value ::= CHOICE{ + valueInt INTEGER, + valueEnum INTEGER, + valueBool BOOLEAN, + valueBitS BIT STRING, + valueOctS OCTET STRING, + valuePrtS PrintableString, + ... +} + +-- ************************************************************** +-- Lists +-- ************************************************************** + +maxnoofCells INTEGER ::= 16384 +maxnoofRICStyles INTEGER ::= 63 +maxnoofMeasurementInfo INTEGER ::= 65535 +maxnoofLabelInfo INTEGER ::= 2147483647 +maxnoofMeasurementRecord INTEGER ::= 65535 +maxnoofMeasurementValue INTEGER ::= 2147483647 +maxnoofConditionInfo INTEGER ::= 32768 +maxnoofUEID INTEGER ::= 65535 + + +MeasurementInfoList ::= SEQUENCE (SIZE(1..maxnoofMeasurementInfo)) OF MeasurementInfoItem + +MeasurementInfoItem ::= SEQUENCE { + measType MeasurementType, + labelInfoList LabelInfoList, + ... +} + +LabelInfoList ::= SEQUENCE (SIZE(1..maxnoofLabelInfo)) OF LabelInfoItem + +LabelInfoItem ::= SEQUENCE { + measLabel MeasurementLabel, + ... +} + +MeasurementData ::= SEQUENCE (SIZE(1..maxnoofMeasurementRecord)) OF MeasurementDataItem + +MeasurementDataItem ::= SEQUENCE { +measRecord MeasurementRecord, +incompleteFlag ENUMERATED {true, ...} OPTIONAL, +... +} + +MeasurementRecord ::= SEQUENCE (SIZE(1..maxnoofMeasurementValue)) OF MeasurementRecordItem + +MeasurementRecordItem ::= CHOICE { + integer INTEGER (0.. 4294967295), + real REAL, + noValue NULL, + ... +} + +MeasurementInfo-Action-List ::= SEQUENCE (SIZE(1..maxnoofMeasurementInfo)) OF MeasurementInfo-Action-Item + +MeasurementInfo-Action-Item ::= SEQUENCE { + measName MeasurementTypeName, + measID MeasurementTypeID OPTIONAL, + ... +} + +MeasurementCondList ::= SEQUENCE (SIZE(1..maxnoofMeasurementInfo)) OF MeasurementCondItem + +MeasurementCondItem ::= SEQUENCE { + measType MeasurementType, + matchingCond MatchingCondList, + ... +} + +MeasurementCondUEidList ::= SEQUENCE (SIZE(1..maxnoofMeasurementInfo)) OF MeasurementCondUEidItem + +MeasurementCondUEidItem ::= SEQUENCE { + measType MeasurementType, + matchingCond MatchingCondList, + matchingUEidList MatchingUEidList OPTIONAL, + ... +} + +MatchingCondList ::= SEQUENCE (SIZE(1..maxnoofConditionInfo)) OF MatchingCondItem + +MatchingCondItem ::= CHOICE{ + measLabel MeasurementLabel, + testCondInfo TestCondInfo, + ... +} + +MatchingUEidList ::= SEQUENCE (SIZE(1..maxnoofUEID)) OF MatchingUEidItem + +MatchingUEidItem ::= SEQUENCE{ + ueID UEID, + ... +} + +-- ************************************************************** +-- E2SM-KPM Service Model IEs +-- ************************************************************** + +-- ************************************************************** +-- Event Trigger Definition OCTET STRING contents +-- ************************************************************** + +E2SM-KPM-EventTriggerDefinition ::= SEQUENCE{ + eventDefinition-formats CHOICE{ + eventDefinition-Format1 E2SM-KPM-EventTriggerDefinition-Format1, + ... + }, + ... +} + +E2SM-KPM-EventTriggerDefinition-Format1 ::= SEQUENCE{ + reportingPeriod INTEGER (1.. 4294967295), + ... +} + +-- ************************************************************** +-- Action Definition OCTET STRING contents +-- ************************************************************** + +E2SM-KPM-ActionDefinition ::= SEQUENCE{ + ric-Style-Type RIC-Style-Type, + actionDefinition-formats CHOICE{ + actionDefinition-Format1 E2SM-KPM-ActionDefinition-Format1, + actionDefinition-Format2 E2SM-KPM-ActionDefinition-Format2, + actionDefinition-Format3 E2SM-KPM-ActionDefinition-Format3, + ... + }, + ... +} + +E2SM-KPM-ActionDefinition-Format1 ::= SEQUENCE { + measInfoList MeasurementInfoList, + granulPeriod GranularityPeriod, + cellGlobalID CGI OPTIONAL, + ... +} + +E2SM-KPM-ActionDefinition-Format2 ::= SEQUENCE { + ueID UEID, + subscriptInfo E2SM-KPM-ActionDefinition-Format1, + ... +} + +E2SM-KPM-ActionDefinition-Format3 ::= SEQUENCE { + measCondList MeasurementCondList, + granulPeriod GranularityPeriod, + cellGlobalID CGI OPTIONAL, + ... +} + +-- ************************************************************** +-- Indication Header OCTET STRING contents +-- ************************************************************** + +E2SM-KPM-IndicationHeader ::= SEQUENCE{ + indicationHeader-formats CHOICE{ + indicationHeader-Format1 E2SM-KPM-IndicationHeader-Format1, + ... + }, + ... +} + +E2SM-KPM-IndicationHeader-Format1 ::= SEQUENCE{ + colletStartTime TimeStamp, + fileFormatversion PrintableString (SIZE (0..15), ...) OPTIONAL, + senderName PrintableString (SIZE (0..400), ...) OPTIONAL, + senderType PrintableString (SIZE (0..8), ...) OPTIONAL, + vendorName PrintableString (SIZE (0..32), ...) OPTIONAL, + ... +} + +-- ************************************************************** +-- Indication Message OCTET STRING contents +-- ************************************************************** + +E2SM-KPM-IndicationMessage ::= SEQUENCE{ + indicationMessage-formats CHOICE{ + indicationMessage-Format1 E2SM-KPM-IndicationMessage-Format1, + indicationMessage-Format2 E2SM-KPM-IndicationMessage-Format2, + ... + }, + ... +} + +E2SM-KPM-IndicationMessage-Format1 ::= SEQUENCE { + measData MeasurementData, + measInfoList MeasurementInfoList OPTIONAL, + granulPeriod GranularityPeriod OPTIONAL, + ... +} + +E2SM-KPM-IndicationMessage-Format2 ::= SEQUENCE { + measData MeasurementData, + measCondUEidList MeasurementCondUEidList, + granulPeriod GranularityPeriod OPTIONAL, + ... +} + +-- *************************************************************** +-- RAN Function Definition OCTET STRING contents +-- *************************************************************** + +E2SM-KPM-RANfunction-Description ::= SEQUENCE{ + ranFunction-Name RANfunction-Name, + ric-EventTriggerStyle-List SEQUENCE (SIZE(1..maxnoofRICStyles)) OF RIC-EventTriggerStyle-Item OPTIONAL, + ric-ReportStyle-List SEQUENCE (SIZE(1..maxnoofRICStyles)) OF RIC-ReportStyle-Item OPTIONAL, + ... +} + +RIC-EventTriggerStyle-Item ::= SEQUENCE{ + ric-EventTriggerStyle-Type RIC-Style-Type, + ric-EventTriggerStyle-Name RIC-Style-Name, + ric-EventTriggerFormat-Type RIC-Format-Type, + ... +} + +RIC-ReportStyle-Item ::= SEQUENCE{ + ric-ReportStyle-Type RIC-Style-Type, + ric-ReportStyle-Name RIC-Style-Name, + ric-ActionFormat-Type RIC-Format-Type, + measInfo-Action-List MeasurementInfo-Action-List, + ric-IndicationHeaderFormat-Type RIC-Format-Type, + ric-IndicationMessageFormat-Type RIC-Format-Type, + ... +} + +END + +-- ASN1STOP + diff --git a/e2sm/headers/AMF-UE-NGAP-ID.h b/e2sm/headers/AMF-UE-NGAP-ID.h index f7c3430..0d7a390 100644 --- a/e2sm/headers/AMF-UE-NGAP-ID.h +++ b/e2sm/headers/AMF-UE-NGAP-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _AMF_UE_NGAP_ID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f AMF_UE_NGAP_ID_encode_jer; +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; diff --git a/e2sm/headers/AMFPointer.h b/e2sm/headers/AMFPointer.h index 18c18e2..08ebefa 100644 --- a/e2sm/headers/AMFPointer.h +++ b/e2sm/headers/AMFPointer.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _AMFPointer_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f AMFPointer_encode_jer; +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; diff --git a/e2sm/headers/AMFRegionID.h b/e2sm/headers/AMFRegionID.h index eb94a4b..252eb11 100644 --- a/e2sm/headers/AMFRegionID.h +++ b/e2sm/headers/AMFRegionID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _AMFRegionID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f AMFRegionID_encode_jer; +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; diff --git a/e2sm/headers/AMFSetID.h b/e2sm/headers/AMFSetID.h index 6d8c6aa..ce3f2e6 100644 --- a/e2sm/headers/AMFSetID.h +++ b/e2sm/headers/AMFSetID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _AMFSetID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f AMFSetID_encode_jer; +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; diff --git a/e2sm/headers/ANY.h b/e2sm/headers/ANY.h index b30381f..871ed5e 100644 --- a/e2sm/headers/ANY.h +++ b/e2sm/headers/ANY.h @@ -22,23 +22,38 @@ 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; +#define ANY_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define ANY_print OCTET_STRING_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define ANY_compare OCTET_STRING_compare + +#define ANY_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define ANY_decode_ber OCTET_STRING_decode_ber +#define ANY_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define ANY_decode_xer OCTET_STRING_decode_xer_hex xer_type_encoder_f ANY_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f ANY_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f ANY_decode_uper; per_type_encoder_f ANY_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) 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 +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ /****************************** * Handy conversion routines. * @@ -46,13 +61,17 @@ per_type_encoder_f ANY_encode_aper; /* 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); +#if !defined(ASN_DISABLE_APER_SUPPORT) +int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr); ANY_t *ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr); +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ /* 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); +#if !defined(ASN_DISABLE_APER_SUPPORT) int ANY_to_type_aper(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr); +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ #define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size)) #define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf( \ diff --git a/e2sm/headers/BIT_STRING.h b/e2sm/headers/BIT_STRING.h index c1bdbbc..e755fe9 100644 --- a/e2sm/headers/BIT_STRING.h +++ b/e2sm/headers/BIT_STRING.h @@ -24,22 +24,49 @@ 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 */ +#define BIT_STRING_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +asn_struct_print_f BIT_STRING_print; /* Human-readable output */ +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f BIT_STRING_compare; + asn_constr_check_f BIT_STRING_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define BIT_STRING_decode_ber OCTET_STRING_decode_ber +#define BIT_STRING_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary xer_type_encoder_f BIT_STRING_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f BIT_STRING_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f BIT_STRING_decode_oer; oer_type_encoder_f BIT_STRING_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) 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 +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define BIT_STRING_decode_aper OCTET_STRING_decode_aper +#define BIT_STRING_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f BIT_STRING_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +const BIT_STRING_t *BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp); #ifdef __cplusplus } diff --git a/e2sm/headers/BMPString.h b/e2sm/headers/BMPString.h deleted file mode 100644 index af14588..0000000 --- a/e2sm/headers/BMPString.h +++ /dev/null @@ -1,39 +0,0 @@ -/*- - * 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/e2sm/headers/BOOLEAN.h b/e2sm/headers/BOOLEAN.h index 620acf7..2cbbe71 100644 --- a/e2sm/headers/BOOLEAN.h +++ b/e2sm/headers/BOOLEAN.h @@ -16,27 +16,52 @@ extern "C" { * 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; +typedef unsigned BOOLEAN_t; extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; extern asn_TYPE_operation_t asn_OP_BOOLEAN; asn_struct_free_f BOOLEAN_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f BOOLEAN_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f BOOLEAN_compare; + +#define BOOLEAN_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f BOOLEAN_decode_ber; der_type_encoder_f BOOLEAN_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +xer_type_decoder_f BOOLEAN_decode_xer; +xer_type_encoder_f BOOLEAN_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f BOOLEAN_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f BOOLEAN_decode_oer; oer_type_encoder_f BOOLEAN_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f BOOLEAN_decode_uper; per_type_encoder_f BOOLEAN_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) 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; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#define BOOLEAN_constraint asn_generic_no_constraint +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f BOOLEAN_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/C-RNTI.h b/e2sm/headers/C-RNTI.h deleted file mode 100644 index 55f2595..0000000 --- a/e2sm/headers/C-RNTI.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/CGI.h b/e2sm/headers/CGI.h index 521428d..85e4a3b 100644 --- a/e2sm/headers/CGI.h +++ b/e2sm/headers/CGI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CGI_H_ diff --git a/e2sm/headers/CU-CP-Usage-Report-CellResourceReportItem.h b/e2sm/headers/CU-CP-Usage-Report-CellResourceReportItem.h deleted file mode 100644 index c0e619e..0000000 --- a/e2sm/headers/CU-CP-Usage-Report-CellResourceReportItem.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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/e2sm/headers/CU-CP-Usage-Report-Per-UE.h b/e2sm/headers/CU-CP-Usage-Report-Per-UE.h deleted file mode 100644 index d32aab2..0000000 --- a/e2sm/headers/CU-CP-Usage-Report-Per-UE.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/CU-CP-Usage-Report-UeResourceReportItem.h b/e2sm/headers/CU-CP-Usage-Report-UeResourceReportItem.h deleted file mode 100644 index 2b018da..0000000 --- a/e2sm/headers/CU-CP-Usage-Report-UeResourceReportItem.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/e2sm/headers/CU-UP-Usage-Report-CellResourceReportItem.h b/e2sm/headers/CU-UP-Usage-Report-CellResourceReportItem.h deleted file mode 100644 index ab4b7b8..0000000 --- a/e2sm/headers/CU-UP-Usage-Report-CellResourceReportItem.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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/e2sm/headers/CU-UP-Usage-Report-Per-UE.h b/e2sm/headers/CU-UP-Usage-Report-Per-UE.h deleted file mode 100644 index f944abf..0000000 --- a/e2sm/headers/CU-UP-Usage-Report-Per-UE.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/CU-UP-Usage-Report-UeResourceReportItem.h b/e2sm/headers/CU-UP-Usage-Report-UeResourceReportItem.h deleted file mode 100644 index 07b5348..0000000 --- a/e2sm/headers/CU-UP-Usage-Report-UeResourceReportItem.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/e2sm/headers/CUUPMeasurement-Container.h b/e2sm/headers/CUUPMeasurement-Container.h deleted file mode 100644 index 32d51b0..0000000 --- a/e2sm/headers/CUUPMeasurement-Container.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/CellResourceReportListItem.h b/e2sm/headers/CellResourceReportListItem.h deleted file mode 100644 index 8fa5613..0000000 --- a/e2sm/headers/CellResourceReportListItem.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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/e2sm/headers/CoreCPID.h b/e2sm/headers/CoreCPID.h index 64ff363..d41f85b 100644 --- a/e2sm/headers/CoreCPID.h +++ b/e2sm/headers/CoreCPID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _CoreCPID_H_ diff --git a/e2sm/headers/DU-Usage-Report-CellResourceReportItem.h b/e2sm/headers/DU-Usage-Report-CellResourceReportItem.h deleted file mode 100644 index bbf14c4..0000000 --- a/e2sm/headers/DU-Usage-Report-CellResourceReportItem.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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/e2sm/headers/DU-Usage-Report-Per-UE.h b/e2sm/headers/DU-Usage-Report-Per-UE.h deleted file mode 100644 index 01de53b..0000000 --- a/e2sm/headers/DU-Usage-Report-Per-UE.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/DU-Usage-Report-UeResourceReportItem.h b/e2sm/headers/DU-Usage-Report-UeResourceReportItem.h deleted file mode 100644 index 6f0be01..0000000 --- a/e2sm/headers/DU-Usage-Report-UeResourceReportItem.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/e2sm/headers/E-UTRA-ARFCN.h b/e2sm/headers/E-UTRA-ARFCN.h index 2f281e9..dd7707b 100644 --- a/e2sm/headers/E-UTRA-ARFCN.h +++ b/e2sm/headers/E-UTRA-ARFCN.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E_UTRA_ARFCN_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f E_UTRA_ARFCN_encode_jer; +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; diff --git a/e2sm/headers/E-UTRA-PCI.h b/e2sm/headers/E-UTRA-PCI.h index 5d09203..dfd7bbc 100644 --- a/e2sm/headers/E-UTRA-PCI.h +++ b/e2sm/headers/E-UTRA-PCI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E_UTRA_PCI_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f E_UTRA_PCI_encode_jer; +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; diff --git a/e2sm/headers/E-UTRA-TAC.h b/e2sm/headers/E-UTRA-TAC.h index d337742..aece256 100644 --- a/e2sm/headers/E-UTRA-TAC.h +++ b/e2sm/headers/E-UTRA-TAC.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E_UTRA_TAC_H_ @@ -30,6 +30,9 @@ 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; +jer_type_encoder_f E_UTRA_TAC_encode_jer; +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; diff --git a/e2sm/headers/E2SM-KPM-ActionDefinition-Format1.h b/e2sm/headers/E2SM-KPM-ActionDefinition-Format1.h index c4b7690..00ab1a4 100644 --- a/e2sm/headers/E2SM-KPM-ActionDefinition-Format1.h +++ b/e2sm/headers/E2SM-KPM-ActionDefinition-Format1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_ActionDefinition_Format1_H_ diff --git a/e2sm/headers/E2SM-KPM-ActionDefinition-Format2.h b/e2sm/headers/E2SM-KPM-ActionDefinition-Format2.h index e145db5..8b2d9ce 100644 --- a/e2sm/headers/E2SM-KPM-ActionDefinition-Format2.h +++ b/e2sm/headers/E2SM-KPM-ActionDefinition-Format2.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_ActionDefinition_Format2_H_ diff --git a/e2sm/headers/E2SM-KPM-ActionDefinition-Format3.h b/e2sm/headers/E2SM-KPM-ActionDefinition-Format3.h index 13b928c..ffce09f 100644 --- a/e2sm/headers/E2SM-KPM-ActionDefinition-Format3.h +++ b/e2sm/headers/E2SM-KPM-ActionDefinition-Format3.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_ActionDefinition_Format3_H_ diff --git a/e2sm/headers/E2SM-KPM-ActionDefinition.h b/e2sm/headers/E2SM-KPM-ActionDefinition.h index 0aaa3a8..6f9f3ee 100644 --- a/e2sm/headers/E2SM-KPM-ActionDefinition.h +++ b/e2sm/headers/E2SM-KPM-ActionDefinition.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_ActionDefinition_H_ @@ -22,7 +22,7 @@ extern "C" { /* 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_NOTHING, /* 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 diff --git a/e2sm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h b/e2sm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h index b778335..c34383b 100644 --- a/e2sm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h +++ b/e2sm/headers/E2SM-KPM-EventTriggerDefinition-Format1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_EventTriggerDefinition_Format1_H_ diff --git a/e2sm/headers/E2SM-KPM-EventTriggerDefinition.h b/e2sm/headers/E2SM-KPM-EventTriggerDefinition.h index 0ed6d68..4befd32 100644 --- a/e2sm/headers/E2SM-KPM-EventTriggerDefinition.h +++ b/e2sm/headers/E2SM-KPM-EventTriggerDefinition.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_EventTriggerDefinition_H_ diff --git a/e2sm/headers/E2SM-KPM-IndicationHeader-Format1.h b/e2sm/headers/E2SM-KPM-IndicationHeader-Format1.h index f2de5ef..10e8441 100644 --- a/e2sm/headers/E2SM-KPM-IndicationHeader-Format1.h +++ b/e2sm/headers/E2SM-KPM-IndicationHeader-Format1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_IndicationHeader_Format1_H_ diff --git a/e2sm/headers/E2SM-KPM-IndicationHeader.h b/e2sm/headers/E2SM-KPM-IndicationHeader.h index 80e5094..fb543b6 100644 --- a/e2sm/headers/E2SM-KPM-IndicationHeader.h +++ b/e2sm/headers/E2SM-KPM-IndicationHeader.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_IndicationHeader_H_ diff --git a/e2sm/headers/E2SM-KPM-IndicationMessage-Format1.h b/e2sm/headers/E2SM-KPM-IndicationMessage-Format1.h index e909d8c..dc757b1 100644 --- a/e2sm/headers/E2SM-KPM-IndicationMessage-Format1.h +++ b/e2sm/headers/E2SM-KPM-IndicationMessage-Format1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_IndicationMessage_Format1_H_ diff --git a/e2sm/headers/E2SM-KPM-IndicationMessage-Format2.h b/e2sm/headers/E2SM-KPM-IndicationMessage-Format2.h index 0f96d3a..cf08aaa 100644 --- a/e2sm/headers/E2SM-KPM-IndicationMessage-Format2.h +++ b/e2sm/headers/E2SM-KPM-IndicationMessage-Format2.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_IndicationMessage_Format2_H_ diff --git a/e2sm/headers/E2SM-KPM-IndicationMessage.h b/e2sm/headers/E2SM-KPM-IndicationMessage.h index d54d24b..b676a98 100644 --- a/e2sm/headers/E2SM-KPM-IndicationMessage.h +++ b/e2sm/headers/E2SM-KPM-IndicationMessage.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_IndicationMessage_H_ diff --git a/e2sm/headers/E2SM-KPM-RANfunction-Description.h b/e2sm/headers/E2SM-KPM-RANfunction-Description.h index afd378e..896a72f 100644 --- a/e2sm/headers/E2SM-KPM-RANfunction-Description.h +++ b/e2sm/headers/E2SM-KPM-RANfunction-Description.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _E2SM_KPM_RANfunction_Description_H_ diff --git a/e2sm/headers/EN-GNB-ID.h b/e2sm/headers/EN-GNB-ID.h index 34aff92..dec8dd1 100644 --- a/e2sm/headers/EN-GNB-ID.h +++ b/e2sm/headers/EN-GNB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _EN_GNB_ID_H_ diff --git a/e2sm/headers/ENB-ID-Choice.h b/e2sm/headers/ENB-ID-Choice.h deleted file mode 100644 index f1743a5..0000000 --- a/e2sm/headers/ENB-ID-Choice.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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/e2sm/headers/ENB-ID.h b/e2sm/headers/ENB-ID.h index 4d96e8e..ecac855 100644 --- a/e2sm/headers/ENB-ID.h +++ b/e2sm/headers/ENB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ENB_ID_H_ diff --git a/e2sm/headers/ENB-UE-X2AP-ID-Extension.h b/e2sm/headers/ENB-UE-X2AP-ID-Extension.h index aa64c4c..611bc8f 100644 --- a/e2sm/headers/ENB-UE-X2AP-ID-Extension.h +++ b/e2sm/headers/ENB-UE-X2AP-ID-Extension.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ENB_UE_X2AP_ID_Extension_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f ENB_UE_X2AP_ID_Extension_encode_jer; +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; diff --git a/e2sm/headers/ENB-UE-X2AP-ID.h b/e2sm/headers/ENB-UE-X2AP-ID.h index 7e5796b..0e1162d 100644 --- a/e2sm/headers/ENB-UE-X2AP-ID.h +++ b/e2sm/headers/ENB-UE-X2AP-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ENB_UE_X2AP_ID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f ENB_UE_X2AP_ID_encode_jer; +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; diff --git a/e2sm/headers/ENGNB-ID.h b/e2sm/headers/ENGNB-ID.h deleted file mode 100644 index 12fd929..0000000 --- a/e2sm/headers/ENGNB-ID.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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/e2sm/headers/ENUMERATED.h b/e2sm/headers/ENUMERATED.h deleted file mode 100644 index 8fd04de..0000000 --- a/e2sm/headers/ENUMERATED.h +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * 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/e2sm/headers/EPC-CUUP-PM-Format.h b/e2sm/headers/EPC-CUUP-PM-Format.h deleted file mode 100644 index 0c3d299..0000000 --- a/e2sm/headers/EPC-CUUP-PM-Format.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/EPC-DU-PM-Container.h b/e2sm/headers/EPC-DU-PM-Container.h deleted file mode 100644 index e0aeda2..0000000 --- a/e2sm/headers/EPC-DU-PM-Container.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/EUTRA-CGI.h b/e2sm/headers/EUTRA-CGI.h index 7e89c31..9f0d7fa 100644 --- a/e2sm/headers/EUTRA-CGI.h +++ b/e2sm/headers/EUTRA-CGI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _EUTRA_CGI_H_ diff --git a/e2sm/headers/EUTRACellIdentity.h b/e2sm/headers/EUTRACellIdentity.h index fbdc8f5..94bd9cc 100644 --- a/e2sm/headers/EUTRACellIdentity.h +++ b/e2sm/headers/EUTRACellIdentity.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _EUTRACellIdentity_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f EUTRACellIdentity_encode_jer; +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; diff --git a/e2sm/headers/EXTERNAL.h b/e2sm/headers/EXTERNAL.h new file mode 100644 index 0000000..fdb5fec --- /dev/null +++ b/e2sm/headers/EXTERNAL.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "ASN1C-UsefulInformationObjectClasses" + * found in "/usr/local/share/asn1c/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _EXTERNAL_H_ +#define _EXTERNAL_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OBJECT_IDENTIFIER.h" +#include "NativeInteger.h" +#include "ObjectDescriptor.h" +#include "ANY.h" +#include "OCTET_STRING.h" +#include "BIT_STRING.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EXTERNAL__encoding_PR { + EXTERNAL__encoding_PR_NOTHING, /* No components present */ + EXTERNAL__encoding_PR_single_ASN1_type, + EXTERNAL__encoding_PR_octet_aligned, + EXTERNAL__encoding_PR_arbitrary +} EXTERNAL__encoding_PR; + +/* EXTERNAL */ +typedef struct EXTERNAL { + OBJECT_IDENTIFIER_t *direct_reference; /* OPTIONAL */ + long *indirect_reference; /* OPTIONAL */ + ObjectDescriptor_t *data_value_descriptor; /* OPTIONAL */ + struct EXTERNAL__encoding { + EXTERNAL__encoding_PR present; + union EXTERNAL__encoding_u { + ANY_t single_ASN1_type; + OCTET_STRING_t octet_aligned; + BIT_STRING_t arbitrary; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } encoding; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EXTERNAL_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EXTERNAL; + +#ifdef __cplusplus +} +#endif + +#endif /* _EXTERNAL_H_ */ +#include "asn_internal.h" diff --git a/e2sm/headers/FGC-CUUP-PM-Format.h b/e2sm/headers/FGC-CUUP-PM-Format.h deleted file mode 100644 index b152e74..0000000 --- a/e2sm/headers/FGC-CUUP-PM-Format.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/FGC-DU-PM-Container.h b/e2sm/headers/FGC-DU-PM-Container.h deleted file mode 100644 index 4af771f..0000000 --- a/e2sm/headers/FGC-DU-PM-Container.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/FQIPERSlicesPerPlmnListItem.h b/e2sm/headers/FQIPERSlicesPerPlmnListItem.h deleted file mode 100644 index e7960aa..0000000 --- a/e2sm/headers/FQIPERSlicesPerPlmnListItem.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/e2sm/headers/FQIPERSlicesPerPlmnPerCellListItem.h b/e2sm/headers/FQIPERSlicesPerPlmnPerCellListItem.h deleted file mode 100644 index 147ecfe..0000000 --- a/e2sm/headers/FQIPERSlicesPerPlmnPerCellListItem.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/FiveGS-TAC.h b/e2sm/headers/FiveGS-TAC.h index 80829ad..95c5f09 100644 --- a/e2sm/headers/FiveGS-TAC.h +++ b/e2sm/headers/FiveGS-TAC.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _FiveGS_TAC_H_ @@ -30,6 +30,9 @@ 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; +jer_type_encoder_f FiveGS_TAC_encode_jer; +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; diff --git a/e2sm/headers/FiveQI.h b/e2sm/headers/FiveQI.h index 3f878c2..6af2f9b 100644 --- a/e2sm/headers/FiveQI.h +++ b/e2sm/headers/FiveQI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _FiveQI_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f FiveQI_encode_jer; +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; diff --git a/e2sm/headers/FreqBandNrItem.h b/e2sm/headers/FreqBandNrItem.h index 662b272..10e4fff 100644 --- a/e2sm/headers/FreqBandNrItem.h +++ b/e2sm/headers/FreqBandNrItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _FreqBandNrItem_H_ @@ -33,6 +33,8 @@ typedef struct FreqBandNrItem { /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_FreqBandNrItem; +extern asn_SEQUENCE_specifics_t asn_SPC_FreqBandNrItem_specs_1; +extern asn_TYPE_member_t asn_MBR_FreqBandNrItem_1[1]; #ifdef __cplusplus } diff --git a/e2sm/headers/GNB-CU-CP-Name.h b/e2sm/headers/GNB-CU-CP-Name.h deleted file mode 100644 index 3458335..0000000 --- a/e2sm/headers/GNB-CU-CP-Name.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/GNB-CU-CP-UE-E1AP-ID.h b/e2sm/headers/GNB-CU-CP-UE-E1AP-ID.h index 1f6ae68..13b0e60 100644 --- a/e2sm/headers/GNB-CU-CP-UE-E1AP-ID.h +++ b/e2sm/headers/GNB-CU-CP-UE-E1AP-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_CU_CP_UE_E1AP_ID_H_ @@ -32,6 +32,9 @@ 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; +jer_type_encoder_f GNB_CU_CP_UE_E1AP_ID_encode_jer; +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; diff --git a/e2sm/headers/GNB-CU-UE-F1AP-ID.h b/e2sm/headers/GNB-CU-UE-F1AP-ID.h index 0f92da8..7560280 100644 --- a/e2sm/headers/GNB-CU-UE-F1AP-ID.h +++ b/e2sm/headers/GNB-CU-UE-F1AP-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_CU_UE_F1AP_ID_H_ @@ -32,6 +32,9 @@ 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; +jer_type_encoder_f GNB_CU_UE_F1AP_ID_encode_jer; +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; diff --git a/e2sm/headers/GNB-CU-UP-ID.h b/e2sm/headers/GNB-CU-UP-ID.h index 2ed4c33..01ff4f4 100644 --- a/e2sm/headers/GNB-CU-UP-ID.h +++ b/e2sm/headers/GNB-CU-UP-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_CU_UP_ID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f GNB_CU_UP_ID_encode_jer; +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; diff --git a/e2sm/headers/GNB-CU-UP-Name.h b/e2sm/headers/GNB-CU-UP-Name.h deleted file mode 100644 index a408dec..0000000 --- a/e2sm/headers/GNB-CU-UP-Name.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/GNB-DU-ID.h b/e2sm/headers/GNB-DU-ID.h index 4901345..eb9ac2d 100644 --- a/e2sm/headers/GNB-DU-ID.h +++ b/e2sm/headers/GNB-DU-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_DU_ID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f GNB_DU_ID_encode_jer; +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; diff --git a/e2sm/headers/GNB-DU-Name.h b/e2sm/headers/GNB-DU-Name.h deleted file mode 100644 index e898011..0000000 --- a/e2sm/headers/GNB-DU-Name.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/GNB-ID-Choice.h b/e2sm/headers/GNB-ID-Choice.h deleted file mode 100644 index 353d1b4..0000000 --- a/e2sm/headers/GNB-ID-Choice.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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/e2sm/headers/GNB-ID.h b/e2sm/headers/GNB-ID.h index 9ae9ee9..07b41c1 100644 --- a/e2sm/headers/GNB-ID.h +++ b/e2sm/headers/GNB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GNB_ID_H_ diff --git a/e2sm/headers/GNB-Name.h b/e2sm/headers/GNB-Name.h deleted file mode 100644 index 51a2030..0000000 --- a/e2sm/headers/GNB-Name.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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/e2sm/headers/GUAMI.h b/e2sm/headers/GUAMI.h index 2c96d62..110473f 100644 --- a/e2sm/headers/GUAMI.h +++ b/e2sm/headers/GUAMI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GUAMI_H_ diff --git a/e2sm/headers/GUMMEI.h b/e2sm/headers/GUMMEI.h index 827a8c7..c3da985 100644 --- a/e2sm/headers/GUMMEI.h +++ b/e2sm/headers/GUMMEI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GUMMEI_H_ diff --git a/e2sm/headers/GeneralString.h b/e2sm/headers/GeneralString.h deleted file mode 100644 index fb5de1c..0000000 --- a/e2sm/headers/GeneralString.h +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * 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/e2sm/headers/GeneralizedTime.h b/e2sm/headers/GeneralizedTime.h deleted file mode 100644 index 02bffe0..0000000 --- a/e2sm/headers/GeneralizedTime.h +++ /dev/null @@ -1,80 +0,0 @@ -/*- - * 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/e2sm/headers/GlobalENB-ID.h b/e2sm/headers/GlobalENB-ID.h index 01f6117..86ee46f 100644 --- a/e2sm/headers/GlobalENB-ID.h +++ b/e2sm/headers/GlobalENB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalENB_ID_H_ diff --git a/e2sm/headers/GlobalGNB-ID.h b/e2sm/headers/GlobalGNB-ID.h index 9b14f3a..e261794 100644 --- a/e2sm/headers/GlobalGNB-ID.h +++ b/e2sm/headers/GlobalGNB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalGNB_ID_H_ diff --git a/e2sm/headers/GlobalKPMnode-ID.h b/e2sm/headers/GlobalKPMnode-ID.h deleted file mode 100644 index 3661fd3..0000000 --- a/e2sm/headers/GlobalKPMnode-ID.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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/e2sm/headers/GlobalKPMnode-eNB-ID.h b/e2sm/headers/GlobalKPMnode-eNB-ID.h deleted file mode 100644 index 51a17cd..0000000 --- a/e2sm/headers/GlobalKPMnode-eNB-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/e2sm/headers/GlobalKPMnode-en-gNB-ID.h b/e2sm/headers/GlobalKPMnode-en-gNB-ID.h deleted file mode 100644 index 4c10fc3..0000000 --- a/e2sm/headers/GlobalKPMnode-en-gNB-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/e2sm/headers/GlobalKPMnode-gNB-ID.h b/e2sm/headers/GlobalKPMnode-gNB-ID.h deleted file mode 100644 index 70e5f06..0000000 --- a/e2sm/headers/GlobalKPMnode-gNB-ID.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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/e2sm/headers/GlobalKPMnode-ng-eNB-ID.h b/e2sm/headers/GlobalKPMnode-ng-eNB-ID.h deleted file mode 100644 index bf2582a..0000000 --- a/e2sm/headers/GlobalKPMnode-ng-eNB-ID.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/e2sm/headers/GlobalNGRANNodeID.h b/e2sm/headers/GlobalNGRANNodeID.h deleted file mode 100644 index bb34765..0000000 --- a/e2sm/headers/GlobalNGRANNodeID.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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/e2sm/headers/GlobalNgENB-ID.h b/e2sm/headers/GlobalNgENB-ID.h index db01dd0..5c38c3a 100644 --- a/e2sm/headers/GlobalNgENB-ID.h +++ b/e2sm/headers/GlobalNgENB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalNgENB_ID_H_ diff --git a/e2sm/headers/GlobalRANNodeID.h b/e2sm/headers/GlobalRANNodeID.h new file mode 100644 index 0000000..cab3e1c --- /dev/null +++ b/e2sm/headers/GlobalRANNodeID.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#ifndef _GlobalRANNodeID_H_ +#define _GlobalRANNodeID_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GlobalRANNodeID_PR { + GlobalRANNodeID_PR_NOTHING, /* No components present */ + GlobalRANNodeID_PR_globalGNB_ID, + GlobalRANNodeID_PR_globalNgENB_ID + /* Extensions may appear below */ + +} GlobalRANNodeID_PR; + +/* Forward declarations */ +struct GlobalGNB_ID; +struct GlobalNgENB_ID; + +/* GlobalRANNodeID */ +typedef struct GlobalRANNodeID { + GlobalRANNodeID_PR present; + union GlobalRANNodeID_u { + struct GlobalGNB_ID *globalGNB_ID; + struct GlobalNgENB_ID *globalNgENB_ID; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GlobalRANNodeID_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GlobalRANNodeID; +extern asn_CHOICE_specifics_t asn_SPC_GlobalRANNodeID_specs_1; +extern asn_TYPE_member_t asn_MBR_GlobalRANNodeID_1[2]; +extern asn_per_constraints_t asn_PER_type_GlobalRANNodeID_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _GlobalRANNodeID_H_ */ +#include "asn_internal.h" diff --git a/e2sm/headers/GlobalenGNB-ID.h b/e2sm/headers/GlobalenGNB-ID.h index 61e4d4c..286ba1c 100644 --- a/e2sm/headers/GlobalenGNB-ID.h +++ b/e2sm/headers/GlobalenGNB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GlobalenGNB_ID_H_ diff --git a/e2sm/headers/GlobalgNB-ID.h b/e2sm/headers/GlobalgNB-ID.h deleted file mode 100644 index d2f8e6f..0000000 --- a/e2sm/headers/GlobalgNB-ID.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/GlobalngeNB-ID.h b/e2sm/headers/GlobalngeNB-ID.h deleted file mode 100644 index 1cc69c8..0000000 --- a/e2sm/headers/GlobalngeNB-ID.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/GranularityPeriod.h b/e2sm/headers/GranularityPeriod.h index 0c3b090..5fc01f4 100644 --- a/e2sm/headers/GranularityPeriod.h +++ b/e2sm/headers/GranularityPeriod.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GranularityPeriod_H_ @@ -32,6 +32,9 @@ 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; +jer_type_encoder_f GranularityPeriod_encode_jer; +oer_type_decoder_f GranularityPeriod_decode_oer; +oer_type_encoder_f GranularityPeriod_encode_oer; per_type_decoder_f GranularityPeriod_decode_uper; per_type_encoder_f GranularityPeriod_encode_uper; per_type_decoder_f GranularityPeriod_decode_aper; diff --git a/e2sm/headers/GraphicString.h b/e2sm/headers/GraphicString.h index 19cac68..807e9d6 100644 --- a/e2sm/headers/GraphicString.h +++ b/e2sm/headers/GraphicString.h @@ -16,18 +16,38 @@ 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 +#define GraphicString_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define GraphicString_print OCTET_STRING_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define GraphicString_compare OCTET_STRING_compare + +#define GraphicString_constraint asn_generic_unknown_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define GraphicString_decode_ber OCTET_STRING_decode_ber +#define GraphicString_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define GraphicString_decode_xer OCTET_STRING_decode_xer_hex +#define GraphicString_encode_xer OCTET_STRING_encode_xer +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define GraphicString_encode_jer OCTET_STRING_encode_jer +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define GraphicString_decode_uper OCTET_STRING_decode_uper +#define GraphicString_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define GraphicString_decode_aper OCTET_STRING_decode_aper +#define GraphicString_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/GroupID.h b/e2sm/headers/GroupID.h index 259d9cd..97ae462 100644 --- a/e2sm/headers/GroupID.h +++ b/e2sm/headers/GroupID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _GroupID_H_ diff --git a/e2sm/headers/IA5String.h b/e2sm/headers/IA5String.h deleted file mode 100644 index 321f0c7..0000000 --- a/e2sm/headers/IA5String.h +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * 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/e2sm/headers/INTEGER.h b/e2sm/headers/INTEGER.h index f776c07..1666e0b 100644 --- a/e2sm/headers/INTEGER.h +++ b/e2sm/headers/INTEGER.h @@ -35,21 +35,52 @@ typedef struct asn_INTEGER_specifics_s { 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 +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); + +#define INTEGER_free ASN__PRIMITIVE_TYPE_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f INTEGER_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f INTEGER_compare; + +#define INTEGER_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define INTEGER_decode_ber ber_decode_primitive der_type_encoder_f INTEGER_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f INTEGER_decode_xer; xer_type_encoder_f INTEGER_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f INTEGER_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f INTEGER_decode_oer; oer_type_encoder_f INTEGER_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f INTEGER_decode_uper; per_type_encoder_f INTEGER_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f INTEGER_decode_aper; per_type_encoder_f INTEGER_encode_aper; -asn_random_fill_f INTEGER_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f INTEGER_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ /*********************************** * Some handy conversion routines. * @@ -83,8 +114,8 @@ 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 */ + ASN_STRTOX_OK = 0, /* Conversion succeeded, number ends at (*end) */ + ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeeded, but the string has extra stuff */ }; enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end, long *l); diff --git a/e2sm/headers/ISO646String.h b/e2sm/headers/ISO646String.h deleted file mode 100644 index cd24a68..0000000 --- a/e2sm/headers/ISO646String.h +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * 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/e2sm/headers/IndexToRFSP.h b/e2sm/headers/IndexToRFSP.h index 574825c..d897712 100644 --- a/e2sm/headers/IndexToRFSP.h +++ b/e2sm/headers/IndexToRFSP.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _IndexToRFSP_H_ @@ -30,6 +30,9 @@ 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; +jer_type_encoder_f IndexToRFSP_encode_jer; +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; diff --git a/e2sm/headers/Interface-MessageID.h b/e2sm/headers/Interface-MessageID.h index 2a31202..a0a80db 100644 --- a/e2sm/headers/Interface-MessageID.h +++ b/e2sm/headers/Interface-MessageID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _Interface_MessageID_H_ diff --git a/e2sm/headers/InterfaceID-E1.h b/e2sm/headers/InterfaceID-E1.h index 07e2dbd..5f737eb 100644 --- a/e2sm/headers/InterfaceID-E1.h +++ b/e2sm/headers/InterfaceID-E1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceID_E1_H_ @@ -12,7 +12,7 @@ #include "asn_application.h" /* Including external dependencies */ -#include "GlobalGNB-ID.h" +#include "GlobalRANNodeID.h" #include "GNB-CU-UP-ID.h" #include "constr_SEQUENCE.h" @@ -22,7 +22,7 @@ extern "C" { /* InterfaceID-E1 */ typedef struct InterfaceID_E1 { - GlobalGNB_ID_t globalGNB_ID; + GlobalRANNodeID_t global_NG_RAN_ID; GNB_CU_UP_ID_t gNB_CU_UP_ID; /* * This type is extensible, diff --git a/e2sm/headers/InterfaceID-F1.h b/e2sm/headers/InterfaceID-F1.h index 3c751a9..c46e834 100644 --- a/e2sm/headers/InterfaceID-F1.h +++ b/e2sm/headers/InterfaceID-F1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceID_F1_H_ @@ -12,7 +12,7 @@ #include "asn_application.h" /* Including external dependencies */ -#include "GlobalGNB-ID.h" +#include "GlobalRANNodeID.h" #include "GNB-DU-ID.h" #include "constr_SEQUENCE.h" @@ -22,7 +22,7 @@ extern "C" { /* InterfaceID-F1 */ typedef struct InterfaceID_F1 { - GlobalGNB_ID_t globalGNB_ID; + GlobalRANNodeID_t global_NG_RAN_ID; GNB_DU_ID_t gNB_DU_ID; /* * This type is extensible, diff --git a/e2sm/headers/InterfaceID-NG.h b/e2sm/headers/InterfaceID-NG.h index 714961e..213e45f 100644 --- a/e2sm/headers/InterfaceID-NG.h +++ b/e2sm/headers/InterfaceID-NG.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceID_NG_H_ diff --git a/e2sm/headers/InterfaceID-S1.h b/e2sm/headers/InterfaceID-S1.h index 75e8463..81a76ce 100644 --- a/e2sm/headers/InterfaceID-S1.h +++ b/e2sm/headers/InterfaceID-S1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceID_S1_H_ diff --git a/e2sm/headers/InterfaceID-W1.h b/e2sm/headers/InterfaceID-W1.h index 7309df3..28d2828 100644 --- a/e2sm/headers/InterfaceID-W1.h +++ b/e2sm/headers/InterfaceID-W1.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceID_W1_H_ diff --git a/e2sm/headers/InterfaceID-X2.h b/e2sm/headers/InterfaceID-X2.h index 8c86ef4..7cb3007 100644 --- a/e2sm/headers/InterfaceID-X2.h +++ b/e2sm/headers/InterfaceID-X2.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceID_X2_H_ diff --git a/e2sm/headers/InterfaceID-Xn.h b/e2sm/headers/InterfaceID-Xn.h index 976e504..5f7c3f0 100644 --- a/e2sm/headers/InterfaceID-Xn.h +++ b/e2sm/headers/InterfaceID-Xn.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceID_Xn_H_ @@ -12,7 +12,7 @@ #include "asn_application.h" /* Including external dependencies */ -#include "GlobalNGRANNodeID.h" +#include "GlobalRANNodeID.h" #include "constr_SEQUENCE.h" #ifdef __cplusplus @@ -21,7 +21,7 @@ extern "C" { /* InterfaceID-Xn */ typedef struct InterfaceID_Xn { - GlobalNGRANNodeID_t global_NG_RAN_ID; + GlobalRANNodeID_t global_NG_RAN_ID; /* * This type is extensible, * possible extensions are below. diff --git a/e2sm/headers/InterfaceIdentifier.h b/e2sm/headers/InterfaceIdentifier.h index 5bcf1e4..a8f788c 100644 --- a/e2sm/headers/InterfaceIdentifier.h +++ b/e2sm/headers/InterfaceIdentifier.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceIdentifier_H_ diff --git a/e2sm/headers/InterfaceType.h b/e2sm/headers/InterfaceType.h index 2c3679d..03a8f9d 100644 --- a/e2sm/headers/InterfaceType.h +++ b/e2sm/headers/InterfaceType.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _InterfaceType_H_ @@ -44,6 +44,9 @@ 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; +jer_type_encoder_f InterfaceType_encode_jer; +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; diff --git a/e2sm/headers/LabelInfoItem.h b/e2sm/headers/LabelInfoItem.h index 3761f10..df5d5d0 100644 --- a/e2sm/headers/LabelInfoItem.h +++ b/e2sm/headers/LabelInfoItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _LabelInfoItem_H_ diff --git a/e2sm/headers/LabelInfoList.h b/e2sm/headers/LabelInfoList.h index 5473fbd..0aa8132 100644 --- a/e2sm/headers/LabelInfoList.h +++ b/e2sm/headers/LabelInfoList.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _LabelInfoList_H_ diff --git a/e2sm/headers/MME-Code.h b/e2sm/headers/MME-Code.h index 7a1c912..d7e6e66 100644 --- a/e2sm/headers/MME-Code.h +++ b/e2sm/headers/MME-Code.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MME_Code_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f MME_Code_encode_jer; +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; diff --git a/e2sm/headers/MME-Group-ID.h b/e2sm/headers/MME-Group-ID.h index 84eb3bf..51057d2 100644 --- a/e2sm/headers/MME-Group-ID.h +++ b/e2sm/headers/MME-Group-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MME_Group_ID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f MME_Group_ID_encode_jer; +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; diff --git a/e2sm/headers/MME-UE-S1AP-ID.h b/e2sm/headers/MME-UE-S1AP-ID.h index 4b18e19..0ee7a9b 100644 --- a/e2sm/headers/MME-UE-S1AP-ID.h +++ b/e2sm/headers/MME-UE-S1AP-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MME_UE_S1AP_ID_H_ @@ -32,6 +32,9 @@ 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; +jer_type_encoder_f MME_UE_S1AP_ID_encode_jer; +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; diff --git a/e2sm/headers/MatchingCondItem.h b/e2sm/headers/MatchingCondItem.h index 2391f42..ec702e0 100644 --- a/e2sm/headers/MatchingCondItem.h +++ b/e2sm/headers/MatchingCondItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MatchingCondItem_H_ diff --git a/e2sm/headers/MatchingCondList.h b/e2sm/headers/MatchingCondList.h index 4f42cc2..422a1f0 100644 --- a/e2sm/headers/MatchingCondList.h +++ b/e2sm/headers/MatchingCondList.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MatchingCondList_H_ diff --git a/e2sm/headers/MatchingUEidItem.h b/e2sm/headers/MatchingUEidItem.h index b3e304c..0ff8792 100644 --- a/e2sm/headers/MatchingUEidItem.h +++ b/e2sm/headers/MatchingUEidItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MatchingUEidItem_H_ diff --git a/e2sm/headers/MatchingUEidList.h b/e2sm/headers/MatchingUEidList.h index 4965f7d..478b51a 100644 --- a/e2sm/headers/MatchingUEidList.h +++ b/e2sm/headers/MatchingUEidList.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MatchingUEidList_H_ diff --git a/e2sm/headers/MeasurementCondItem.h b/e2sm/headers/MeasurementCondItem.h index 8f664aa..295ff9f 100644 --- a/e2sm/headers/MeasurementCondItem.h +++ b/e2sm/headers/MeasurementCondItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementCondItem_H_ diff --git a/e2sm/headers/MeasurementCondList.h b/e2sm/headers/MeasurementCondList.h index cccc4b8..5660bb3 100644 --- a/e2sm/headers/MeasurementCondList.h +++ b/e2sm/headers/MeasurementCondList.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementCondList_H_ diff --git a/e2sm/headers/MeasurementCondUEidItem.h b/e2sm/headers/MeasurementCondUEidItem.h index 2ea31d3..f3bc117 100644 --- a/e2sm/headers/MeasurementCondUEidItem.h +++ b/e2sm/headers/MeasurementCondUEidItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementCondUEidItem_H_ diff --git a/e2sm/headers/MeasurementCondUEidList.h b/e2sm/headers/MeasurementCondUEidList.h index 0480f92..d576767 100644 --- a/e2sm/headers/MeasurementCondUEidList.h +++ b/e2sm/headers/MeasurementCondUEidList.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementCondUEidList_H_ diff --git a/e2sm/headers/MeasurementData.h b/e2sm/headers/MeasurementData.h index e6c050d..a596009 100644 --- a/e2sm/headers/MeasurementData.h +++ b/e2sm/headers/MeasurementData.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementData_H_ diff --git a/e2sm/headers/MeasurementDataItem.h b/e2sm/headers/MeasurementDataItem.h index b9d1b21..2a70393 100644 --- a/e2sm/headers/MeasurementDataItem.h +++ b/e2sm/headers/MeasurementDataItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementDataItem_H_ diff --git a/e2sm/headers/MeasurementInfo-Action-Item.h b/e2sm/headers/MeasurementInfo-Action-Item.h index ef69a19..b869380 100644 --- a/e2sm/headers/MeasurementInfo-Action-Item.h +++ b/e2sm/headers/MeasurementInfo-Action-Item.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementInfo_Action_Item_H_ diff --git a/e2sm/headers/MeasurementInfo-Action-List.h b/e2sm/headers/MeasurementInfo-Action-List.h index 3faba93..499f17b 100644 --- a/e2sm/headers/MeasurementInfo-Action-List.h +++ b/e2sm/headers/MeasurementInfo-Action-List.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementInfo_Action_List_H_ diff --git a/e2sm/headers/MeasurementInfoItem.h b/e2sm/headers/MeasurementInfoItem.h index a9afa60..f25ef03 100644 --- a/e2sm/headers/MeasurementInfoItem.h +++ b/e2sm/headers/MeasurementInfoItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementInfoItem_H_ diff --git a/e2sm/headers/MeasurementInfoList.h b/e2sm/headers/MeasurementInfoList.h index a7adc44..2d0d424 100644 --- a/e2sm/headers/MeasurementInfoList.h +++ b/e2sm/headers/MeasurementInfoList.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementInfoList_H_ diff --git a/e2sm/headers/MeasurementLabel.h b/e2sm/headers/MeasurementLabel.h index 7fc3e5a..e24465b 100644 --- a/e2sm/headers/MeasurementLabel.h +++ b/e2sm/headers/MeasurementLabel.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementLabel_H_ diff --git a/e2sm/headers/MeasurementRecord.h b/e2sm/headers/MeasurementRecord.h index 59505c6..7410d9c 100644 --- a/e2sm/headers/MeasurementRecord.h +++ b/e2sm/headers/MeasurementRecord.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementRecord_H_ diff --git a/e2sm/headers/MeasurementRecordItem.h b/e2sm/headers/MeasurementRecordItem.h index cb06392..0ed48c6 100644 --- a/e2sm/headers/MeasurementRecordItem.h +++ b/e2sm/headers/MeasurementRecordItem.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementRecordItem_H_ diff --git a/e2sm/headers/MeasurementType.h b/e2sm/headers/MeasurementType.h index 9220004..0647137 100644 --- a/e2sm/headers/MeasurementType.h +++ b/e2sm/headers/MeasurementType.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementType_H_ diff --git a/e2sm/headers/MeasurementTypeID.h b/e2sm/headers/MeasurementTypeID.h index ed3384a..efc5105 100644 --- a/e2sm/headers/MeasurementTypeID.h +++ b/e2sm/headers/MeasurementTypeID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementTypeID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f MeasurementTypeID_encode_jer; +oer_type_decoder_f MeasurementTypeID_decode_oer; +oer_type_encoder_f MeasurementTypeID_encode_oer; per_type_decoder_f MeasurementTypeID_decode_uper; per_type_encoder_f MeasurementTypeID_encode_uper; per_type_decoder_f MeasurementTypeID_decode_aper; diff --git a/e2sm/headers/MeasurementTypeName.h b/e2sm/headers/MeasurementTypeName.h index 4f3b826..ae2de36 100644 --- a/e2sm/headers/MeasurementTypeName.h +++ b/e2sm/headers/MeasurementTypeName.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _MeasurementTypeName_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f MeasurementTypeName_encode_jer; +oer_type_decoder_f MeasurementTypeName_decode_oer; +oer_type_encoder_f MeasurementTypeName_encode_oer; per_type_decoder_f MeasurementTypeName_decode_uper; per_type_encoder_f MeasurementTypeName_encode_uper; per_type_decoder_f MeasurementTypeName_decode_aper; diff --git a/e2sm/headers/NG-RANnodeUEXnAPID.h b/e2sm/headers/NG-RANnodeUEXnAPID.h index aedd06e..9b68099 100644 --- a/e2sm/headers/NG-RANnodeUEXnAPID.h +++ b/e2sm/headers/NG-RANnodeUEXnAPID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NG_RANnodeUEXnAPID_H_ @@ -32,6 +32,9 @@ 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; +jer_type_encoder_f NG_RANnodeUEXnAPID_encode_jer; +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; diff --git a/e2sm/headers/NGENB-CU-UE-W1AP-ID.h b/e2sm/headers/NGENB-CU-UE-W1AP-ID.h index d8f0110..1076b04 100644 --- a/e2sm/headers/NGENB-CU-UE-W1AP-ID.h +++ b/e2sm/headers/NGENB-CU-UE-W1AP-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NGENB_CU_UE_W1AP_ID_H_ @@ -32,6 +32,9 @@ 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; +jer_type_encoder_f NGENB_CU_UE_W1AP_ID_encode_jer; +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; diff --git a/e2sm/headers/NGENB-DU-ID.h b/e2sm/headers/NGENB-DU-ID.h index 8620e6a..4f44f59 100644 --- a/e2sm/headers/NGENB-DU-ID.h +++ b/e2sm/headers/NGENB-DU-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NGENB_DU_ID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f NGENB_DU_ID_encode_jer; +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; diff --git a/e2sm/headers/NI-Type.h b/e2sm/headers/NI-Type.h deleted file mode 100644 index c9df7da..0000000 --- a/e2sm/headers/NI-Type.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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/e2sm/headers/NR-ARFCN.h b/e2sm/headers/NR-ARFCN.h index 53b6e94..330c188 100644 --- a/e2sm/headers/NR-ARFCN.h +++ b/e2sm/headers/NR-ARFCN.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NR_ARFCN_H_ @@ -13,15 +13,26 @@ /* Including external dependencies */ #include "NativeInteger.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" #include "constr_SEQUENCE.h" #ifdef __cplusplus extern "C" { #endif +/* Forward declarations */ +struct FreqBandNrItem; + /* NR-ARFCN */ typedef struct NR_ARFCN { long nRARFCN; + struct NR_ARFCN__freqBandListNr { + A_SEQUENCE_OF(struct FreqBandNrItem) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } freqBandListNr; /* * This type is extensible, * possible extensions are below. @@ -34,7 +45,7 @@ typedef struct NR_ARFCN { /* 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]; +extern asn_TYPE_member_t asn_MBR_NR_ARFCN_1[2]; #ifdef __cplusplus } diff --git a/e2sm/headers/NR-CGI.h b/e2sm/headers/NR-CGI.h index 79dac62..1d72cee 100644 --- a/e2sm/headers/NR-CGI.h +++ b/e2sm/headers/NR-CGI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NR_CGI_H_ diff --git a/e2sm/headers/NR-PCI.h b/e2sm/headers/NR-PCI.h index 14da2df..aeb89cb 100644 --- a/e2sm/headers/NR-PCI.h +++ b/e2sm/headers/NR-PCI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NR_PCI_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f NR_PCI_encode_jer; +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; diff --git a/e2sm/headers/NRCGI.h b/e2sm/headers/NRCGI.h deleted file mode 100644 index 2f80a5a..0000000 --- a/e2sm/headers/NRCGI.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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/e2sm/headers/NRCellIdentity.h b/e2sm/headers/NRCellIdentity.h index 5e140d5..c23355a 100644 --- a/e2sm/headers/NRCellIdentity.h +++ b/e2sm/headers/NRCellIdentity.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NRCellIdentity_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f NRCellIdentity_encode_jer; +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; diff --git a/e2sm/headers/NRFrequencyBand-List.h b/e2sm/headers/NRFrequencyBand-List.h deleted file mode 100644 index 9bee34d..0000000 --- a/e2sm/headers/NRFrequencyBand-List.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/e2sm/headers/NRFrequencyBandItem.h b/e2sm/headers/NRFrequencyBandItem.h deleted file mode 100644 index 0970b9b..0000000 --- a/e2sm/headers/NRFrequencyBandItem.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/NRFrequencyInfo.h b/e2sm/headers/NRFrequencyInfo.h deleted file mode 100644 index 80a8af5..0000000 --- a/e2sm/headers/NRFrequencyInfo.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/NRFrequencyShift7p5khz.h b/e2sm/headers/NRFrequencyShift7p5khz.h deleted file mode 100644 index a881515..0000000 --- a/e2sm/headers/NRFrequencyShift7p5khz.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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/e2sm/headers/NULL.h b/e2sm/headers/NULL.h index 802d12c..7264475 100644 --- a/e2sm/headers/NULL.h +++ b/e2sm/headers/NULL.h @@ -6,37 +6,61 @@ #define ASN_TYPE_NULL_H #include -#include #ifdef __cplusplus extern "C" { #endif /* - * The value of the NULL type is meaningless: see BOOLEAN if you want to - * carry true/false semantics. + * The value of the NULL type is meaningless. + * Use the BOOLEAN type if you need to carry true/false semantics. */ typedef int NULL_t; extern asn_TYPE_descriptor_t asn_DEF_NULL; extern asn_TYPE_operation_t asn_OP_NULL; +asn_struct_free_f NULL_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f NULL_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f NULL_compare; + +#define NULL_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +ber_type_decoder_f NULL_decode_ber; der_type_encoder_f NULL_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f NULL_decode_xer; xer_type_encoder_f NULL_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f NULL_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f NULL_decode_oer; oer_type_encoder_f NULL_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f NULL_decode_uper; per_type_encoder_f NULL_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f NULL_decode_aper; per_type_encoder_f NULL_encode_aper; -asn_random_fill_f NULL_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#define NULL_free BOOLEAN_free -#define NULL_decode_ber BOOLEAN_decode_ber -#define NULL_constraint asn_generic_no_constraint +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f NULL_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/NativeEnumerated.h b/e2sm/headers/NativeEnumerated.h index 459f0e6..0c711e3 100644 --- a/e2sm/headers/NativeEnumerated.h +++ b/e2sm/headers/NativeEnumerated.h @@ -21,22 +21,53 @@ extern "C" { extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; extern asn_TYPE_operation_t asn_OP_NativeEnumerated; +#define NativeEnumerated_free NativeInteger_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define NativeEnumerated_print NativeInteger_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define NativeEnumerated_compare NativeInteger_compare + +#define NativeEnumerated_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define NativeEnumerated_decode_ber NativeInteger_decode_ber +#define NativeEnumerated_encode_der NativeInteger_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define NativeEnumerated_decode_xer NativeInteger_decode_xer xer_type_encoder_f NativeEnumerated_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f NativeEnumerated_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f NativeEnumerated_decode_oer; oer_type_encoder_f NativeEnumerated_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f NativeEnumerated_decode_uper; per_type_encoder_f NativeEnumerated_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f NativeEnumerated_decode_aper; per_type_encoder_f NativeEnumerated_encode_aper; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#define NativeEnumerated_free NativeInteger_free -#define NativeEnumerated_print NativeInteger_print -#define NativeEnumerated_compare NativeInteger_compare +#if !defined(ASN_DISABLE_RFILL_SUPPORT) #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 +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +int NativeEnumerated__compar_value2enum( + const void *ap, + const void *bp); +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/NativeInteger.h b/e2sm/headers/NativeInteger.h index c74406a..3a47c11 100644 --- a/e2sm/headers/NativeInteger.h +++ b/e2sm/headers/NativeInteger.h @@ -22,22 +22,47 @@ extern "C" { extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; extern asn_TYPE_operation_t asn_OP_NativeInteger; -asn_struct_free_f NativeInteger_free; +asn_struct_free_f NativeInteger_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f NativeInteger_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f NativeInteger_compare; + +#define NativeInteger_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f NativeInteger_decode_ber; der_type_encoder_f NativeInteger_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f NativeInteger_decode_xer; xer_type_encoder_f NativeInteger_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f NativeInteger_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f NativeInteger_decode_oer; oer_type_encoder_f NativeInteger_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f NativeInteger_decode_uper; per_type_encoder_f NativeInteger_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f NativeInteger_decode_aper; per_type_encoder_f NativeInteger_encode_aper; -asn_random_fill_f NativeInteger_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#define NativeInteger_constraint asn_generic_no_constraint +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f NativeInteger_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/NativeReal.h b/e2sm/headers/NativeReal.h index 1bfdc96..513876e 100644 --- a/e2sm/headers/NativeReal.h +++ b/e2sm/headers/NativeReal.h @@ -24,22 +24,53 @@ typedef struct asn_NativeReal_specifics_s { extern asn_TYPE_descriptor_t asn_DEF_NativeReal; extern asn_TYPE_operation_t asn_OP_NativeReal; +size_t NativeReal__float_size(const asn_TYPE_descriptor_t *td); +double NativeReal__get_double(const asn_TYPE_descriptor_t *td, + const void *ptr); +ssize_t NativeReal__set(const asn_TYPE_descriptor_t *td, void **sptr, + double d); + asn_struct_free_f NativeReal_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f NativeReal_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f NativeReal_compare; + +#define NativeReal_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f NativeReal_decode_ber; der_type_encoder_f NativeReal_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +xer_type_decoder_f NativeReal_decode_xer; +xer_type_encoder_f NativeReal_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f NativeReal_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) +oer_type_decoder_f NativeReal_decode_oer; +oer_type_encoder_f NativeReal_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f NativeReal_decode_uper; per_type_encoder_f NativeReal_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) 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; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#define NativeReal_constraint asn_generic_no_constraint +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f NativeReal_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/NgENB-ID.h b/e2sm/headers/NgENB-ID.h index 5c9af18..8dce647 100644 --- a/e2sm/headers/NgENB-ID.h +++ b/e2sm/headers/NgENB-ID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _NgENB_ID_H_ diff --git a/e2sm/headers/NumericString.h b/e2sm/headers/NumericString.h deleted file mode 100644 index 5f33484..0000000 --- a/e2sm/headers/NumericString.h +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * 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/e2sm/headers/OBJECT_IDENTIFIER.h b/e2sm/headers/OBJECT_IDENTIFIER.h index 087c6fd..f878055 100644 --- a/e2sm/headers/OBJECT_IDENTIFIER.h +++ b/e2sm/headers/OBJECT_IDENTIFIER.h @@ -21,23 +21,51 @@ typedef ASN__PRIMITIVE_TYPE_t OBJECT_IDENTIFIER_t; extern asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER; extern asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER; +ssize_t OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st, + asn_app_consume_bytes_f *cb, + void *app_key); + +#define OBJECT_IDENTIFIER_free ASN__PRIMITIVE_TYPE_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f OBJECT_IDENTIFIER_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define OBJECT_IDENTIFIER_compare OCTET_STRING_compare + asn_constr_check_f OBJECT_IDENTIFIER_constraint; -der_type_encoder_f OBJECT_IDENTIFIER_encode_der; + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_ber ber_decode_primitive +#define OBJECT_IDENTIFIER_encode_der der_encode_primitive +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f OBJECT_IDENTIFIER_decode_xer; xer_type_encoder_f OBJECT_IDENTIFIER_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f OBJECT_IDENTIFIER_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_oer oer_decode_primitive +#define OBJECT_IDENTIFIER_encode_oer oer_encode_primitive +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_uper OCTET_STRING_decode_uper +#define OBJECT_IDENTIFIER_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define OBJECT_IDENTIFIER_decode_aper OCTET_STRING_decode_aper +#define OBJECT_IDENTIFIER_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) asn_random_fill_f OBJECT_IDENTIFIER_random_fill; - -#define OBJECT_IDENTIFIER_free ASN__PRIMITIVE_TYPE_free -#define OBJECT_IDENTIFIER_compare OCTET_STRING_compare -#define OBJECT_IDENTIFIER_decode_ber ber_decode_primitive -#define OBJECT_IDENTIFIER_encode_der der_encode_primitive -#define OBJECT_IDENTIFIER_decode_oer oer_decode_primitive -#define OBJECT_IDENTIFIER_encode_oer oer_encode_primitive -#define OBJECT_IDENTIFIER_decode_uper OCTET_STRING_decode_uper -#define OBJECT_IDENTIFIER_encode_uper OCTET_STRING_encode_uper -#define OBJECT_IDENTIFIER_decode_aper OCTET_STRING_decode_aper -#define OBJECT_IDENTIFIER_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ /********************************** * Some handy conversion routines * diff --git a/e2sm/headers/OCTET_STRING.h b/e2sm/headers/OCTET_STRING.h index c2f8bae..b1ace14 100644 --- a/e2sm/headers/OCTET_STRING.h +++ b/e2sm/headers/OCTET_STRING.h @@ -22,27 +22,73 @@ 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; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f OCTET_STRING_print; asn_struct_print_f OCTET_STRING_print_utf8; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f OCTET_STRING_compare; + +#define OCTET_STRING_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) 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 */ +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +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; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f OCTET_STRING_encode_jer; +jer_type_encoder_f OCTET_STRING_encode_jer_utf8; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f OCTET_STRING_decode_oer; oer_type_encoder_f OCTET_STRING_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f OCTET_STRING_decode_uper; per_type_encoder_f OCTET_STRING_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) 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 +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f OCTET_STRING_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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); + +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); +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ /****************************** * Handy conversion routines. * ******************************/ @@ -95,6 +141,23 @@ size_t OCTET_STRING_random_length_constrained( const asn_TYPE_descriptor_t *, const asn_encoding_constraints_t *, size_t max_length); +#if !defined(ASN_DISABLE_BER_SUPPORT) +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; +}; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + #ifdef __cplusplus } #endif diff --git a/e2sm/headers/OCUCP-PF-Container.h b/e2sm/headers/OCUCP-PF-Container.h deleted file mode 100644 index d292be8..0000000 --- a/e2sm/headers/OCUCP-PF-Container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/e2sm/headers/OCUUP-PF-Container.h b/e2sm/headers/OCUUP-PF-Container.h deleted file mode 100644 index 8c4ee06..0000000 --- a/e2sm/headers/OCUUP-PF-Container.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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/e2sm/headers/ODU-PF-Container.h b/e2sm/headers/ODU-PF-Container.h deleted file mode 100644 index f6c1529..0000000 --- a/e2sm/headers/ODU-PF-Container.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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/e2sm/headers/OPEN_TYPE.h b/e2sm/headers/OPEN_TYPE.h index b0d023c..5e97977 100644 --- a/e2sm/headers/OPEN_TYPE.h +++ b/e2sm/headers/OPEN_TYPE.h @@ -6,70 +6,110 @@ #define ASN_OPEN_TYPE_H #include +///////////#include #ifdef __cplusplus extern "C" { #endif +/* + * Decode an Open Type which is potentially constraiend + * by the other members of the parent structure. + */ + +#undef ADVANCE +#define ADVANCE(num_bytes) \ + do { \ + size_t num = num_bytes; \ + ptr = ((const char *)ptr) + num; \ + size -= num; \ + consumed_myself += num; \ + } while(0) + #define OPEN_TYPE_free CHOICE_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) #define OPEN_TYPE_print CHOICE_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + #define OPEN_TYPE_compare CHOICE_compare + #define OPEN_TYPE_constraint CHOICE_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +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); #define OPEN_TYPE_decode_ber NULL #define OPEN_TYPE_encode_der CHOICE_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +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); #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 +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ -extern asn_TYPE_operation_t asn_OP_OPEN_TYPE; +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define OPEN_TYPE_encode_jer CHOICE_encode_jer +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ -/* - * 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); +#if !defined(ASN_DISABLE_OER_SUPPORT) +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); +#define OPEN_TYPE_decode_oer NULL +#define OPEN_TYPE_encode_oer CHOICE_encode_oer +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) +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); +#define OPEN_TYPE_decode_uper NULL 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); - +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +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); +#define OPEN_TYPE_decode_aper NULL 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); +int OPEN_TYPE_aper_is_unknown_type( + const asn_TYPE_descriptor_t *td, + void *sptr, + const asn_TYPE_member_t *elm); + +asn_dec_rval_t OPEN_TYPE_aper_unknown_type_discard_bytes( + asn_per_data_t *pd); +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +extern asn_TYPE_operation_t asn_OP_OPEN_TYPE; + #ifdef __cplusplus } #endif diff --git a/e2sm/headers/ObjectDescriptor.h b/e2sm/headers/ObjectDescriptor.h index fa1c1fc..852c45d 100644 --- a/e2sm/headers/ObjectDescriptor.h +++ b/e2sm/headers/ObjectDescriptor.h @@ -16,17 +16,36 @@ 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 +#define ObjectDescriptor_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define ObjectDescriptor_print OCTET_STRING_print_utf8 +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define ObjectDescriptor_constraint asn_generic_unknown_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define ObjectDescriptor_decode_ber OCTET_STRING_decode_ber +#define ObjectDescriptor_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define ObjectDescriptor_decode_xer OCTET_STRING_decode_xer_utf8 +#define ObjectDescriptor_encode_xer OCTET_STRING_encode_xer_utf8 +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define ObjectDescriptor_encode_jer OCTET_STRING_encode_jer_utf8 +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define ObjectDescriptor_decode_uper OCTET_STRING_decode_uper +#define ObjectDescriptor_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define ObjectDescriptor_decode_aper OCTET_STRING_decode_aper +#define ObjectDescriptor_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/PF-Container.h b/e2sm/headers/PF-Container.h deleted file mode 100644 index aa59c71..0000000 --- a/e2sm/headers/PF-Container.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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/e2sm/headers/PF-ContainerListItem.h b/e2sm/headers/PF-ContainerListItem.h deleted file mode 100644 index b22eac2..0000000 --- a/e2sm/headers/PF-ContainerListItem.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/PLMN-Identity.h b/e2sm/headers/PLMN-Identity.h deleted file mode 100644 index cca2d19..0000000 --- a/e2sm/headers/PLMN-Identity.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/PLMNIdentity.h b/e2sm/headers/PLMNIdentity.h index b1950c6..5b8f141 100644 --- a/e2sm/headers/PLMNIdentity.h +++ b/e2sm/headers/PLMNIdentity.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _PLMNIdentity_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f PLMNIdentity_encode_jer; +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; diff --git a/e2sm/headers/PM-Containers-List.h b/e2sm/headers/PM-Containers-List.h deleted file mode 100644 index 9b392a5..0000000 --- a/e2sm/headers/PM-Containers-List.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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/e2sm/headers/PerQCIReportListItem.h b/e2sm/headers/PerQCIReportListItem.h deleted file mode 100644 index 3d135ca..0000000 --- a/e2sm/headers/PerQCIReportListItem.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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/e2sm/headers/PerQCIReportListItemFormat.h b/e2sm/headers/PerQCIReportListItemFormat.h deleted file mode 100644 index b5c3481..0000000 --- a/e2sm/headers/PerQCIReportListItemFormat.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/e2sm/headers/PlmnID-List.h b/e2sm/headers/PlmnID-List.h deleted file mode 100644 index cba26f7..0000000 --- a/e2sm/headers/PlmnID-List.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/headers/PrintableString.h b/e2sm/headers/PrintableString.h index 8c2b61a..c24861d 100644 --- a/e2sm/headers/PrintableString.h +++ b/e2sm/headers/PrintableString.h @@ -16,19 +16,38 @@ 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; +#define PrintableString_free OCTET_STRING_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define PrintableString_print OCTET_STRING_print_utf8 +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + +#define PrintableString_compare OCTET_STRING_compare + 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 +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define PrintableString_decode_ber OCTET_STRING_decode_ber +#define PrintableString_encode_der OCTET_STRING_encode_der +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define PrintableString_decode_xer OCTET_STRING_decode_xer_utf8 +#define PrintableString_encode_xer OCTET_STRING_encode_xer_utf8 +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#define PrintableString_encode_jer OCTET_STRING_encode_jer_utf8 +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define PrintableString_decode_uper OCTET_STRING_decode_uper +#define PrintableString_encode_uper OCTET_STRING_encode_uper +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define PrintableString_decode_aper OCTET_STRING_decode_aper +#define PrintableString_encode_aper OCTET_STRING_encode_aper +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/QCI.h b/e2sm/headers/QCI.h index 4738a97..6e07e6b 100644 --- a/e2sm/headers/QCI.h +++ b/e2sm/headers/QCI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _QCI_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f QCI_encode_jer; +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; diff --git a/e2sm/headers/QoSID.h b/e2sm/headers/QoSID.h index 4ec28a4..e1eacf8 100644 --- a/e2sm/headers/QoSID.h +++ b/e2sm/headers/QoSID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _QoSID_H_ diff --git a/e2sm/headers/QosFlowIdentifier.h b/e2sm/headers/QosFlowIdentifier.h index 8e8c709..560e39e 100644 --- a/e2sm/headers/QosFlowIdentifier.h +++ b/e2sm/headers/QosFlowIdentifier.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _QosFlowIdentifier_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f QosFlowIdentifier_encode_jer; +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; diff --git a/e2sm/headers/RAN-Container.h b/e2sm/headers/RAN-Container.h deleted file mode 100644 index 259c2d5..0000000 --- a/e2sm/headers/RAN-Container.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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/e2sm/headers/RANUEID.h b/e2sm/headers/RANUEID.h index 1ef8b24..76c517d 100644 --- a/e2sm/headers/RANUEID.h +++ b/e2sm/headers/RANUEID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANUEID_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f RANUEID_encode_jer; +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; diff --git a/e2sm/headers/RANcallProcess-ID-string.h b/e2sm/headers/RANcallProcess-ID-string.h deleted file mode 100644 index 1a8aad0..0000000 --- a/e2sm/headers/RANcallProcess-ID-string.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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/e2sm/headers/RANfunction-Name.h b/e2sm/headers/RANfunction-Name.h index 970d4fb..24a895d 100644 --- a/e2sm/headers/RANfunction-Name.h +++ b/e2sm/headers/RANfunction-Name.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RANfunction_Name_H_ diff --git a/e2sm/headers/REAL.h b/e2sm/headers/REAL.h index fce6714..2f8bf47 100644 --- a/e2sm/headers/REAL.h +++ b/e2sm/headers/REAL.h @@ -8,31 +8,86 @@ #include #include +#define _ISOC99_SOURCE /* For ilogb() and quiet NAN */ +#ifndef _BSD_SOURCE +#define _BSD_SOURCE /* To reintroduce finite(3) */ +#endif +#if defined(__alpha) +#include /* For INFINITY */ +#endif +#include + +#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 + #ifdef __cplusplus extern "C" { #endif +typedef enum specialRealValue { + SRV__NOT_A_NUMBER, + SRV__MINUS_INFINITY, + SRV__PLUS_INFINITY +} specialRealValue_e; +extern struct specialRealValue_s { + char *string; + size_t length; + long dv; +} specialRealValue[3]; + typedef ASN__PRIMITIVE_TYPE_t REAL_t; extern asn_TYPE_descriptor_t asn_DEF_REAL; extern asn_TYPE_operation_t asn_OP_REAL; +#define REAL_free ASN__PRIMITIVE_TYPE_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f REAL_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f REAL_compare; + +#define REAL_constraint asn_generic_no_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define REAL_decode_ber ber_decode_primitive +#define REAL_encode_der der_encode_primitive +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +xer_type_decoder_f REAL_decode_xer; +xer_type_encoder_f REAL_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f REAL_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f REAL_decode_oer; oer_type_encoder_f REAL_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f REAL_decode_uper; per_type_encoder_f REAL_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) 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; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#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 +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f REAL_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ /*********************************** * Some handy conversion routines. * @@ -44,7 +99,7 @@ ssize_t REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *a * 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. + * -1: An error occurred 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); diff --git a/e2sm/headers/RELATIVE-OID.h b/e2sm/headers/RELATIVE-OID.h deleted file mode 100644 index a51bf51..0000000 --- a/e2sm/headers/RELATIVE-OID.h +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * 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/e2sm/headers/RIC-EventTriggerStyle-Item.h b/e2sm/headers/RIC-EventTriggerStyle-Item.h index 25b20cd..ff8c370 100644 --- a/e2sm/headers/RIC-EventTriggerStyle-Item.h +++ b/e2sm/headers/RIC-EventTriggerStyle-Item.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RIC_EventTriggerStyle_Item_H_ diff --git a/e2sm/headers/RIC-EventTriggerStyle-List.h b/e2sm/headers/RIC-EventTriggerStyle-List.h deleted file mode 100644 index 543edfb..0000000 --- a/e2sm/headers/RIC-EventTriggerStyle-List.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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/e2sm/headers/RIC-Format-Type.h b/e2sm/headers/RIC-Format-Type.h index d145ebf..9d8db7a 100644 --- a/e2sm/headers/RIC-Format-Type.h +++ b/e2sm/headers/RIC-Format-Type.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RIC_Format_Type_H_ @@ -30,6 +30,9 @@ 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; +jer_type_encoder_f RIC_Format_Type_encode_jer; +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; diff --git a/e2sm/headers/RIC-ReportStyle-Item.h b/e2sm/headers/RIC-ReportStyle-Item.h index 80194fb..f2ff012 100644 --- a/e2sm/headers/RIC-ReportStyle-Item.h +++ b/e2sm/headers/RIC-ReportStyle-Item.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RIC_ReportStyle_Item_H_ diff --git a/e2sm/headers/RIC-ReportStyle-List.h b/e2sm/headers/RIC-ReportStyle-List.h deleted file mode 100644 index accc531..0000000 --- a/e2sm/headers/RIC-ReportStyle-List.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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/e2sm/headers/RIC-Style-Name.h b/e2sm/headers/RIC-Style-Name.h index 351a9db..252b043 100644 --- a/e2sm/headers/RIC-Style-Name.h +++ b/e2sm/headers/RIC-Style-Name.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RIC_Style_Name_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f RIC_Style_Name_encode_jer; +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; diff --git a/e2sm/headers/RIC-Style-Type.h b/e2sm/headers/RIC-Style-Type.h index 66835d5..386dde7 100644 --- a/e2sm/headers/RIC-Style-Type.h +++ b/e2sm/headers/RIC-Style-Type.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RIC_Style_Type_H_ @@ -30,6 +30,9 @@ 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; +jer_type_encoder_f RIC_Style_Type_encode_jer; +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; diff --git a/e2sm/headers/RRC-MessageID.h b/e2sm/headers/RRC-MessageID.h index ca236a1..a306396 100644 --- a/e2sm/headers/RRC-MessageID.h +++ b/e2sm/headers/RRC-MessageID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RRC_MessageID_H_ diff --git a/e2sm/headers/RRCclass-LTE.h b/e2sm/headers/RRCclass-LTE.h index bad6ee7..485f1d0 100644 --- a/e2sm/headers/RRCclass-LTE.h +++ b/e2sm/headers/RRCclass-LTE.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RRCclass_LTE_H_ @@ -51,6 +51,9 @@ 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; +jer_type_encoder_f RRCclass_LTE_encode_jer; +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; diff --git a/e2sm/headers/RRCclass-NR.h b/e2sm/headers/RRCclass-NR.h index 5af8e62..22f730a 100644 --- a/e2sm/headers/RRCclass-NR.h +++ b/e2sm/headers/RRCclass-NR.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _RRCclass_NR_H_ @@ -47,6 +47,9 @@ 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; +jer_type_encoder_f RRCclass_NR_encode_jer; +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; diff --git a/e2sm/headers/RT-Period-IE.h b/e2sm/headers/RT-Period-IE.h deleted file mode 100644 index a52a304..0000000 --- a/e2sm/headers/RT-Period-IE.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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/e2sm/headers/S-NSSAI.h b/e2sm/headers/S-NSSAI.h index 70caa55..a3ee7e4 100644 --- a/e2sm/headers/S-NSSAI.h +++ b/e2sm/headers/S-NSSAI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _S_NSSAI_H_ diff --git a/e2sm/headers/SD.h b/e2sm/headers/SD.h index 93603db..5921094 100644 --- a/e2sm/headers/SD.h +++ b/e2sm/headers/SD.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _SD_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f SD_encode_jer; +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; diff --git a/e2sm/headers/SNSSAI.h b/e2sm/headers/SNSSAI.h deleted file mode 100644 index 7a99e03..0000000 --- a/e2sm/headers/SNSSAI.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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/e2sm/headers/SST.h b/e2sm/headers/SST.h index 28ee41d..d710837 100644 --- a/e2sm/headers/SST.h +++ b/e2sm/headers/SST.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _SST_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f SST_encode_jer; +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; diff --git a/e2sm/headers/ServedPlmnPerCellListItem.h b/e2sm/headers/ServedPlmnPerCellListItem.h deleted file mode 100644 index a435cc8..0000000 --- a/e2sm/headers/ServedPlmnPerCellListItem.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/headers/ServingCell-ARFCN.h b/e2sm/headers/ServingCell-ARFCN.h index 7071ddb..4306e47 100644 --- a/e2sm/headers/ServingCell-ARFCN.h +++ b/e2sm/headers/ServingCell-ARFCN.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ServingCell_ARFCN_H_ diff --git a/e2sm/headers/ServingCell-PCI.h b/e2sm/headers/ServingCell-PCI.h index 46ef093..df26d0e 100644 --- a/e2sm/headers/ServingCell-PCI.h +++ b/e2sm/headers/ServingCell-PCI.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _ServingCell_PCI_H_ diff --git a/e2sm/headers/SlicePerPlmnPerCellListItem.h b/e2sm/headers/SlicePerPlmnPerCellListItem.h deleted file mode 100644 index abe34bb..0000000 --- a/e2sm/headers/SlicePerPlmnPerCellListItem.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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/e2sm/headers/SliceToReportListItem.h b/e2sm/headers/SliceToReportListItem.h deleted file mode 100644 index 74a2a1d..0000000 --- a/e2sm/headers/SliceToReportListItem.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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/e2sm/headers/SubscriberProfileIDforRFP.h b/e2sm/headers/SubscriberProfileIDforRFP.h index edc5595..742b98b 100644 --- a/e2sm/headers/SubscriberProfileIDforRFP.h +++ b/e2sm/headers/SubscriberProfileIDforRFP.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _SubscriberProfileIDforRFP_H_ @@ -30,6 +30,9 @@ 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; +jer_type_encoder_f SubscriberProfileIDforRFP_encode_jer; +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; diff --git a/e2sm/headers/SupportedSULBandList.h b/e2sm/headers/SupportedSULBandList.h deleted file mode 100644 index df4763d..0000000 --- a/e2sm/headers/SupportedSULBandList.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/e2sm/headers/SupportedSULFreqBandItem.h b/e2sm/headers/SupportedSULFreqBandItem.h deleted file mode 100644 index e550541..0000000 --- a/e2sm/headers/SupportedSULFreqBandItem.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/e2sm/headers/T61String.h b/e2sm/headers/T61String.h deleted file mode 100644 index 9e9e380..0000000 --- a/e2sm/headers/T61String.h +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * 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/e2sm/headers/TeletexString.h b/e2sm/headers/TeletexString.h deleted file mode 100644 index 9f04aef..0000000 --- a/e2sm/headers/TeletexString.h +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * 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/e2sm/headers/TestCond-Expression.h b/e2sm/headers/TestCond-Expression.h index fa4d2e5..11fc807 100644 --- a/e2sm/headers/TestCond-Expression.h +++ b/e2sm/headers/TestCond-Expression.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TestCond_Expression_H_ @@ -44,6 +44,9 @@ 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; +jer_type_encoder_f TestCond_Expression_encode_jer; +oer_type_decoder_f TestCond_Expression_decode_oer; +oer_type_encoder_f TestCond_Expression_encode_oer; per_type_decoder_f TestCond_Expression_decode_uper; per_type_encoder_f TestCond_Expression_encode_uper; per_type_decoder_f TestCond_Expression_decode_aper; diff --git a/e2sm/headers/TestCond-Type.h b/e2sm/headers/TestCond-Type.h index 028d211..30eaa54 100644 --- a/e2sm/headers/TestCond-Type.h +++ b/e2sm/headers/TestCond-Type.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TestCond_Type_H_ diff --git a/e2sm/headers/TestCond-Value.h b/e2sm/headers/TestCond-Value.h index 8c41320..d0f91a3 100644 --- a/e2sm/headers/TestCond-Value.h +++ b/e2sm/headers/TestCond-Value.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TestCond_Value_H_ diff --git a/e2sm/headers/TestCondInfo.h b/e2sm/headers/TestCondInfo.h index 0262e20..07d4f90 100644 --- a/e2sm/headers/TestCondInfo.h +++ b/e2sm/headers/TestCondInfo.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TestCondInfo_H_ diff --git a/e2sm/headers/TimeStamp.h b/e2sm/headers/TimeStamp.h index e2d3c57..6e58643 100644 --- a/e2sm/headers/TimeStamp.h +++ b/e2sm/headers/TimeStamp.h @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _TimeStamp_H_ @@ -31,6 +31,9 @@ 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; +jer_type_encoder_f TimeStamp_encode_jer; +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; diff --git a/e2sm/headers/Timestamp.h b/e2sm/headers/Timestamp.h deleted file mode 100644 index dafc566..0000000 --- a/e2sm/headers/Timestamp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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/e2sm/headers/Trigger-ConditionIE-Item.h b/e2sm/headers/Trigger-ConditionIE-Item.h deleted file mode 100644 index fc43153..0000000 --- a/e2sm/headers/Trigger-ConditionIE-Item.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/e2sm/headers/UE-Report-Type.h b/e2sm/headers/UE-Report-Type.h deleted file mode 100644 index 25a76d5..0000000 --- a/e2sm/headers/UE-Report-Type.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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/e2sm/headers/UEID-EN-GNB.h b/e2sm/headers/UEID-EN-GNB.h index c0c4760..6890b62 100644 --- a/e2sm/headers/UEID-EN-GNB.h +++ b/e2sm/headers/UEID-EN-GNB.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_EN_GNB_H_ diff --git a/e2sm/headers/UEID-ENB.h b/e2sm/headers/UEID-ENB.h index ac06374..21332fc 100644 --- a/e2sm/headers/UEID-ENB.h +++ b/e2sm/headers/UEID-ENB.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_ENB_H_ diff --git a/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h b/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h index 2e7abac..538869e 100644 --- a/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h +++ b/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-Item.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_GNB_CU_CP_E1AP_ID_Item_H_ diff --git a/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h b/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h index 234a586..8975e95 100644 --- a/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h +++ b/e2sm/headers/UEID-GNB-CU-CP-E1AP-ID-List.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_GNB_CU_CP_E1AP_ID_List_H_ diff --git a/e2sm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h b/e2sm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h index d5760cd..c2ea8b6 100644 --- a/e2sm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h +++ b/e2sm/headers/UEID-GNB-CU-CP-F1AP-ID-Item.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_GNB_CU_CP_F1AP_ID_Item_H_ diff --git a/e2sm/headers/UEID-GNB-CU-F1AP-ID-List.h b/e2sm/headers/UEID-GNB-CU-F1AP-ID-List.h index 7c1da53..6ae84e0 100644 --- a/e2sm/headers/UEID-GNB-CU-F1AP-ID-List.h +++ b/e2sm/headers/UEID-GNB-CU-F1AP-ID-List.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_GNB_CU_F1AP_ID_List_H_ diff --git a/e2sm/headers/UEID-GNB-CU-UP.h b/e2sm/headers/UEID-GNB-CU-UP.h index 8d7ee50..b629301 100644 --- a/e2sm/headers/UEID-GNB-CU-UP.h +++ b/e2sm/headers/UEID-GNB-CU-UP.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_GNB_CU_UP_H_ diff --git a/e2sm/headers/UEID-GNB-DU.h b/e2sm/headers/UEID-GNB-DU.h index e82d119..da3fa03 100644 --- a/e2sm/headers/UEID-GNB-DU.h +++ b/e2sm/headers/UEID-GNB-DU.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_GNB_DU_H_ diff --git a/e2sm/headers/UEID-GNB.h b/e2sm/headers/UEID-GNB.h index e2bfcf1..906b3af 100644 --- a/e2sm/headers/UEID-GNB.h +++ b/e2sm/headers/UEID-GNB.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_GNB_H_ @@ -26,7 +26,6 @@ extern "C" { 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 { @@ -41,7 +40,6 @@ typedef struct UEID_GNB { * 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; @@ -50,7 +48,7 @@ typedef struct UEID_GNB { /* 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]; +extern asn_TYPE_member_t asn_MBR_UEID_GNB_1[7]; #ifdef __cplusplus } diff --git a/e2sm/headers/UEID-NG-ENB-DU.h b/e2sm/headers/UEID-NG-ENB-DU.h index 549513d..ecdf1b3 100644 --- a/e2sm/headers/UEID-NG-ENB-DU.h +++ b/e2sm/headers/UEID-NG-ENB-DU.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_NG_ENB_DU_H_ diff --git a/e2sm/headers/UEID-NG-ENB.h b/e2sm/headers/UEID-NG-ENB.h index fda548b..387639c 100644 --- a/e2sm/headers/UEID-NG-ENB.h +++ b/e2sm/headers/UEID-NG-ENB.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_NG_ENB_H_ @@ -24,7 +24,6 @@ extern "C" { /* Forward declarations */ struct GlobalNgENB_ID; -struct GlobalNGRANNodeID; /* UEID-NG-ENB */ typedef struct UEID_NG_ENB { @@ -37,7 +36,6 @@ typedef struct UEID_NG_ENB { * 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; @@ -46,7 +44,7 @@ typedef struct UEID_NG_ENB { /* 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]; +extern asn_TYPE_member_t asn_MBR_UEID_NG_ENB_1[5]; #ifdef __cplusplus } diff --git a/e2sm/headers/UEID.h b/e2sm/headers/UEID.h index 8e4714c..18914c6 100644 --- a/e2sm/headers/UEID.h +++ b/e2sm/headers/UEID.h @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #ifndef _UEID_H_ diff --git a/e2sm/headers/UTCTime.h b/e2sm/headers/UTCTime.h deleted file mode 100644 index 295f156..0000000 --- a/e2sm/headers/UTCTime.h +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * 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/e2sm/headers/UTF8String.h b/e2sm/headers/UTF8String.h deleted file mode 100644 index 7ad9c82..0000000 --- a/e2sm/headers/UTF8String.h +++ /dev/null @@ -1,63 +0,0 @@ -/*- - * 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/e2sm/headers/UniversalString.h b/e2sm/headers/UniversalString.h deleted file mode 100644 index 510807a..0000000 --- a/e2sm/headers/UniversalString.h +++ /dev/null @@ -1,38 +0,0 @@ -/*- - * 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/e2sm/headers/VideotexString.h b/e2sm/headers/VideotexString.h deleted file mode 100644 index b535389..0000000 --- a/e2sm/headers/VideotexString.h +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * 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/e2sm/headers/VisibleString.h b/e2sm/headers/VisibleString.h deleted file mode 100644 index ad5f713..0000000 --- a/e2sm/headers/VisibleString.h +++ /dev/null @@ -1,38 +0,0 @@ -/*- - * 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/e2sm/headers/aper_decoder.h b/e2sm/headers/aper_decoder.h new file mode 100644 index 0000000..10352c7 --- /dev/null +++ b/e2sm/headers/aper_decoder.h @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_DECODER_H_ +#define _APER_DECODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * 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 */ + ); + +#ifdef __cplusplus +} +#endif + +#endif /* _APER_DECODER_H_ */ diff --git a/e2sm/headers/aper_encoder.h b/e2sm/headers/aper_encoder.h new file mode 100644 index 0000000..957b0bd --- /dev/null +++ b/e2sm/headers/aper_encoder.h @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2006-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_ENCODER_H_ +#define _APER_ENCODER_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* + * Aligned 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 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 aper_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 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 aper_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 aper_encode() and aper_encode_to_buffer(). + */ +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 +); + +#ifdef __cplusplus +} +#endif + +#endif /* _APER_ENCODER_H_ */ diff --git a/e2sm/headers/aper_opentype.h b/e2sm/headers/aper_opentype.h new file mode 100644 index 0000000..451b01c --- /dev/null +++ b/e2sm/headers/aper_opentype.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2007-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_OPENTYPE_H_ +#define _APER_OPENTYPE_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +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 /* _APER_OPENTYPE_H_ */ diff --git a/e2sm/headers/aper_support.h b/e2sm/headers/aper_support.h new file mode 100644 index 0000000..a372445 --- /dev/null +++ b/e2sm/headers/aper_support.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _APER_SUPPORT_H_ +#define _APER_SUPPORT_H_ + +#include /* Platform-specific types */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Get the length "n" from the Aligned PER stream. + */ +ssize_t aper_get_length(asn_per_data_t *pd, ssize_t lb, ssize_t ub, + int effective_bound_bits, int *repeat); + +/* + * Get the normally small length "n". + */ +ssize_t aper_get_nslength(asn_per_data_t *pd); + +/* + * Get the normally small non-negative whole number. + */ +ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range); + +/* + * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" + * Put the length "n" to the Aligned PER stream. + * If (opt_need_eom) is given, it will be set to 1 if final 0-n is needed. + * In that case, invoke aper_put_length(po, -1, -1, 0, NULL) after encoding the + * last block. + * This function returns the number of units which may be flushed + * in the next units saving iteration. + */ +ssize_t aper_put_length(asn_per_outp_t *po, ssize_t lb, ssize_t ub, size_t n, + int *opt_need_eom); + +/* 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 aper_put_nslength(asn_per_outp_t *po, size_t length); + +/* + * Put the normally small non-negative whole number. + */ +int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number); + +#ifdef __cplusplus +} +#endif + +#endif /* _APER_SUPPORT_H_ */ diff --git a/e2sm/headers/asn_application.h b/e2sm/headers/asn_application.h index 034f646..bf10cd3 100644 --- a/e2sm/headers/asn_application.h +++ b/e2sm/headers/asn_application.h @@ -10,6 +10,7 @@ #include "asn_system.h" /* for platform-dependent types */ #include "asn_codecs.h" /* for ASN.1 codecs specifics */ +#include "asn_config.h" #ifdef __cplusplus extern "C" { @@ -59,7 +60,8 @@ enum asn_transfer_syntax { * CANONICAL-XER is a more strict variant of BASIC-XER. */ ATS_BASIC_XER, - ATS_CANONICAL_XER + ATS_CANONICAL_XER, + ATS_JER, }; /* diff --git a/e2sm/headers/asn_bit_data.h b/e2sm/headers/asn_bit_data.h index 59de7af..f14714b 100644 --- a/e2sm/headers/asn_bit_data.h +++ b/e2sm/headers/asn_bit_data.h @@ -36,7 +36,7 @@ asn_bit_data_t *asn_bit_data_new_contiguous(const void *data, size_t size_bits); */ int32_t asn_get_few_bits(asn_bit_data_t *, int get_nbits); -/* Undo the immediately preceeding "get_few_bits" operation */ +/* Undo the immediately preceding "get_few_bits" operation */ void asn_get_undo(asn_bit_data_t *, int get_nbits); /* diff --git a/e2sm/headers/asn_codecs_prim.h b/e2sm/headers/asn_codecs_prim.h index fbc5576..5bbd9cf 100644 --- a/e2sm/headers/asn_codecs_prim.h +++ b/e2sm/headers/asn_codecs_prim.h @@ -12,23 +12,27 @@ 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! */ + 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; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f ber_decode_primitive; der_type_encoder_f der_encode_primitive; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) /* * 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 */ + 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, @@ -43,6 +47,7 @@ asn_dec_rval_t xer_decode_primitive( 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); +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ #ifdef __cplusplus } diff --git a/e2sm/headers/asn_config.h b/e2sm/headers/asn_config.h new file mode 100644 index 0000000..551bcc7 --- /dev/null +++ b/e2sm/headers/asn_config.h @@ -0,0 +1,2 @@ +// Generated automatically. Don't edit manually! + diff --git a/e2sm/headers/asn_constant.h b/e2sm/headers/asn_constant.h index 1a26b7a..a95657f 100644 --- a/e2sm/headers/asn_constant.h +++ b/e2sm/headers/asn_constant.h @@ -14,6 +14,36 @@ extern "C" { #define maxEARFCN (65535) #define maxNRARFCN (3279165) #define maxnoofNrCellBands (32) +#define min_val_MME_UE_S1AP_ID (0) +#define max_val_MME_UE_S1AP_ID (4294967295) +#define min_val_QCI (0) +#define max_val_QCI (255) +#define min_val_SubscriberProfileIDforRFP (1) +#define max_val_SubscriberProfileIDforRFP (256) +#define min_val_ENB_UE_X2AP_ID (0) +#define max_val_ENB_UE_X2AP_ID (4095) +#define min_val_E_UTRA_ARFCN (0) +#define max_val_E_UTRA_ARFCN (65535) +#define min_val_NGENB_CU_UE_W1AP_ID (0) +#define max_val_NGENB_CU_UE_W1AP_ID (4294967295) +#define min_val_NGENB_DU_ID (0) +#define max_val_NGENB_DU_ID (68719476735) +#define min_val_AMF_UE_NGAP_ID (0) +#define max_val_AMF_UE_NGAP_ID (1099511627775) +#define min_val_NG_RANnodeUEXnAPID (0) +#define max_val_NG_RANnodeUEXnAPID (4294967295) +#define min_val_GNB_CU_CP_UE_E1AP_ID (0) +#define max_val_GNB_CU_CP_UE_E1AP_ID (4294967295) +#define min_val_GNB_CU_UP_ID (0) +#define max_val_GNB_CU_UP_ID (68719476735) +#define min_val_GNB_CU_UE_F1AP_ID (0) +#define max_val_GNB_CU_UE_F1AP_ID (4294967295) +#define min_val_GNB_DU_ID (0) +#define max_val_GNB_DU_ID (68719476735) +#define min_val_NR_PCI (0) +#define max_val_NR_PCI (1007) +#define min_val_GranularityPeriod (1) +#define max_val_GranularityPeriod (4294967295) #define maxnoofCells (16384) #define maxnoofRICStyles (63) #define maxnoofMeasurementInfo (65535) diff --git a/e2sm/headers/asn_internal.h b/e2sm/headers/asn_internal.h index c4105ad..d6ce619 100644 --- a/e2sm/headers/asn_internal.h +++ b/e2sm/headers/asn_internal.h @@ -7,7 +7,9 @@ */ #ifndef ASN_INTERNAL_H #define ASN_INTERNAL_H +#ifndef __EXTENSIONS__ #define __EXTENSIONS__ /* for Sun */ +#endif #include "asn_application.h" /* Application-visible API */ @@ -19,6 +21,15 @@ extern "C" { #endif +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#include +#include +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#include +#include +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + /* 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 */ @@ -42,8 +53,7 @@ int get_asn1c_environment_version(void); /* Run-time version */ */ #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 +#if __STDC_VERSION__ >= 199901L #ifdef ASN_THREAD_SAFE /* Thread safety requires sacrifice in output indentation: * Retain empty definition of ASN_DEBUG_INDENT_ADD. */ @@ -53,12 +63,6 @@ int get_asn1c_environment_version(void); /* Run-time version */ 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, " "); \ @@ -66,7 +70,6 @@ extern int logAsn1c(const char *filename, int linenumber, const char *format, .. 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 @@ -133,7 +136,31 @@ asn__format_to_callback( /* * Check stack against overflow, if limit is set. */ + +/* Since GCC 13, AddressSanitizer started defaulting to +* ASAN_OPTIONS="detect_stack_use_after_return=1", which makes this check +* fail due to apparently jumping stack pointers. +* Hence, disable this check if building with ASan, as documented in: +* GCC: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html +* Clang: https://clang.llvm.org/docs/AddressSanitizer.html#conditional-compilation-with-has-feature-address-sanitizer +*/ +#if defined(__SANITIZE_ADDRESS__) + #define ASN__SANITIZE_ENABLED 1 +#elif defined(__has_feature) +#if __has_feature(address_sanitizer) + #define ASN__SANITIZE_ENABLED 1 +#endif +#endif + #define ASN__DEFAULT_STACK_MAX (30000) + +#if defined(ASN__SANITIZE_ENABLED) || defined(ASN_DISABLE_STACK_OVERFLOW_CHECK) +static int CC_NOTUSED +ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { + (void)ctx; + return 0; +} +#else static int CC_NOTUSED ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { if(ctx && ctx->max_stack_size) { @@ -151,6 +178,7 @@ ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { } return 0; } +#endif #ifdef __cplusplus } diff --git a/e2sm/headers/asn_system.h b/e2sm/headers/asn_system.h index fa8cf11..0f0d495 100644 --- a/e2sm/headers/asn_system.h +++ b/e2sm/headers/asn_system.h @@ -27,12 +27,15 @@ #include /* For LONG_MAX */ #include /* For va_start */ #include /* for offsetof and ptrdiff_t */ +#include /* for PRIdMAX */ #ifdef _WIN32 #include +#ifndef __MINGW32__ #define snprintf _snprintf #define vsnprintf _vsnprintf +#endif /* To avoid linking with ws2_32.lib, here's the definition of ntohl() */ #define sys_ntohl(l) ((((l) << 24) & 0xff000000) \ @@ -75,7 +78,9 @@ typedef unsigned int uint32_t; #else /* !defined(__vxworks) */ #include /* C99 specifies this file */ +#ifdef HAVE_NETINET_IN_H #include /* for ntohl() */ +#endif #define sys_ntohl(foo) ntohl(foo) #endif /* defined(__vxworks) */ @@ -86,11 +91,25 @@ typedef unsigned int uint32_t; #else #define CC_ATTRIBUTE(attr) #endif -#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(printf, fmt, var)) +#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__>= 4) || __GNUC__ > 4) +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(gnu_printf, fmt, var)) +#elif defined(__GNUC__) +#if defined(ANDROID) +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(__format__(__printf__, fmt, var)) +#else +#define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(printf, fmt, var)) +#endif +#else +#define CC_PRINTFLIKE(fmt, var) +#endif #define CC_NOTUSED CC_ATTRIBUTE(unused) #ifndef CC_ATTR_NO_SANITIZE +#if __GNUC__ < 8 +#define CC_ATTR_NO_SANITIZE(what) +#else #define CC_ATTR_NO_SANITIZE(what) CC_ATTRIBUTE(no_sanitize(what)) #endif +#endif /* Figure out if thread safety is requested */ #if !defined(ASN_THREAD_SAFE) && (defined(THREAD_SAFE) || defined(_REENTRANT)) diff --git a/e2sm/headers/constr_CHOICE.h b/e2sm/headers/constr_CHOICE.h index a1999ed..03d606c 100644 --- a/e2sm/headers/constr_CHOICE.h +++ b/e2sm/headers/constr_CHOICE.h @@ -40,23 +40,62 @@ typedef struct asn_CHOICE_specifics_s { * A set specialized functions dealing with the CHOICE type. */ asn_struct_free_f CHOICE_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f CHOICE_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f CHOICE_compare; + asn_constr_check_f CHOICE_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f CHOICE_decode_ber; der_type_encoder_f CHOICE_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f CHOICE_decode_xer; xer_type_encoder_f CHOICE_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f CHOICE_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f CHOICE_decode_oer; oer_type_encoder_f CHOICE_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f CHOICE_decode_uper; per_type_encoder_f CHOICE_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f CHOICE_decode_aper; per_type_encoder_f CHOICE_encode_aper; -asn_outmost_tag_f CHOICE_outmost_tag; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) asn_random_fill_f CHOICE_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +asn_outmost_tag_f CHOICE_outmost_tag; + extern asn_TYPE_operation_t asn_OP_CHOICE; +unsigned _fetch_present_idx( + const void *struct_ptr, + unsigned off, + unsigned size); + +void _set_present_idx( + void *sptr, + unsigned offset, + unsigned size, + unsigned present); + /* * Return the 1-based choice variant presence index. * Returns 0 in case of error. diff --git a/e2sm/headers/constr_SEQUENCE.h b/e2sm/headers/constr_SEQUENCE.h index a22ed3a..5ecfd8f 100644 --- a/e2sm/headers/constr_SEQUENCE.h +++ b/e2sm/headers/constr_SEQUENCE.h @@ -45,20 +45,47 @@ typedef struct asn_SEQUENCE_specifics_s { * A set specialized functions dealing with the SEQUENCE type. */ asn_struct_free_f SEQUENCE_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f SEQUENCE_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f SEQUENCE_compare; + asn_constr_check_f SEQUENCE_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f SEQUENCE_decode_ber; der_type_encoder_f SEQUENCE_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f SEQUENCE_decode_xer; xer_type_encoder_f SEQUENCE_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f SEQUENCE_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f SEQUENCE_decode_oer; oer_type_encoder_f SEQUENCE_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f SEQUENCE_decode_uper; per_type_encoder_f SEQUENCE_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f SEQUENCE_decode_aper; per_type_encoder_f SEQUENCE_encode_aper; -asn_random_fill_f SEQUENCE_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f SEQUENCE_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + extern asn_TYPE_operation_t asn_OP_SEQUENCE; #ifdef __cplusplus diff --git a/e2sm/headers/constr_SEQUENCE_OF.h b/e2sm/headers/constr_SEQUENCE_OF.h index 6857f0f..1768582 100644 --- a/e2sm/headers/constr_SEQUENCE_OF.h +++ b/e2sm/headers/constr_SEQUENCE_OF.h @@ -16,23 +16,49 @@ extern "C" { * A set specialized functions dealing with the SEQUENCE OF type. * Generally implemented using SET OF. */ +#define SEQUENCE_OF_free SET_OF_free + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) +#define SEQUENCE_OF_print SET_OF_print +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f SEQUENCE_OF_compare; + +#define SEQUENCE_OF_constraint SET_OF_constraint + +#if !defined(ASN_DISABLE_BER_SUPPORT) +#define SEQUENCE_OF_decode_ber SET_OF_decode_ber der_type_encoder_f SEQUENCE_OF_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#define SEQUENCE_OF_decode_xer SET_OF_decode_xer xer_type_encoder_f SEQUENCE_OF_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f SEQUENCE_OF_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) +#define SEQUENCE_OF_decode_oer SET_OF_decode_oer +#define SEQUENCE_OF_encode_oer SET_OF_encode_oer +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) +#define SEQUENCE_OF_decode_uper SET_OF_decode_uper per_type_encoder_f SEQUENCE_OF_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) +#define SEQUENCE_OF_decode_aper SET_OF_decode_aper per_type_encoder_f SEQUENCE_OF_encode_aper; -extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ -#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 +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +#define SEQUENCE_OF_random_fill SET_OF_random_fill +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF; #ifdef __cplusplus } diff --git a/e2sm/headers/constr_SET.h b/e2sm/headers/constr_SET.h deleted file mode 100644 index d64a00f..0000000 --- a/e2sm/headers/constr_SET.h +++ /dev/null @@ -1,87 +0,0 @@ -/*- - * 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/e2sm/headers/constr_SET_OF.h b/e2sm/headers/constr_SET_OF.h index 7681062..0e9dd39 100644 --- a/e2sm/headers/constr_SET_OF.h +++ b/e2sm/headers/constr_SET_OF.h @@ -6,6 +6,7 @@ #define CONSTR_SET_OF_H #include +#include #ifdef __cplusplus extern "C" { @@ -26,22 +27,74 @@ typedef struct asn_SET_OF_specifics_s { * A set specialized functions dealing with the SET OF type. */ asn_struct_free_f SET_OF_free; + +#if !defined(ASN_DISABLE_PRINT_SUPPORT) asn_struct_print_f SET_OF_print; +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + asn_struct_compare_f SET_OF_compare; + asn_constr_check_f SET_OF_constraint; + +#if !defined(ASN_DISABLE_BER_SUPPORT) ber_type_decoder_f SET_OF_decode_ber; der_type_encoder_f SET_OF_encode_der; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) xer_type_decoder_f SET_OF_decode_xer; xer_type_encoder_f SET_OF_encode_xer; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +jer_type_encoder_f SET_OF_encode_jer; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) oer_type_decoder_f SET_OF_decode_oer; oer_type_encoder_f SET_OF_encode_oer; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) per_type_decoder_f SET_OF_decode_uper; per_type_encoder_f SET_OF_encode_uper; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) per_type_decoder_f SET_OF_decode_aper; per_type_encoder_f SET_OF_encode_aper; -asn_random_fill_f SET_OF_random_fill; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +asn_random_fill_f SET_OF_random_fill; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + extern asn_TYPE_operation_t asn_OP_SET_OF; +/* + * Internally visible buffer holding a single encoded element. + */ +struct _el_buffer { + uint8_t *buf; + size_t length; + size_t allocated_size; + unsigned bits_unused; +}; + +enum SET_OF__encode_method { + SOES_DER, /* Distinguished Encoding Rules */ + SOES_CUPER, /* Canonical Unaligned Packed Encoding Rules */ + SOES_CAPER /* Canonical Aligned Packed Encoding Rules */ +}; + +struct _el_buffer * SET_OF__encode_sorted( + const asn_TYPE_member_t *elm, + const asn_anonymous_set_ *list, + enum SET_OF__encode_method method); + +void SET_OF__encode_sorted_free( + struct _el_buffer *el_buf, + size_t count); + #ifdef __cplusplus } #endif diff --git a/e2sm/headers/constr_TYPE.h b/e2sm/headers/constr_TYPE.h index d80dea5..55c2574 100644 --- a/e2sm/headers/constr_TYPE.h +++ b/e2sm/headers/constr_TYPE.h @@ -34,23 +34,51 @@ typedef struct asn_struct_ctx_s { 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 +#if !defined(ASN_DISABLE_BER_SUPPORT) +#include /* Basic Encoding Rules decoder */ +#include /* Distinguished Encoding Rules encoder */ +#else +typedef void (ber_type_decoder_f)(void); +typedef void (der_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_XER_SUPPORT) +#include /* Decoder of XER (XML, text) */ +#include /* Encoder into XER (XML, text) */ +#else +typedef void (xer_type_decoder_f)(void); +typedef void (xer_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ + +#if !defined(ASN_DISABLE_JER_SUPPORT) +#include /* Encoder into JER (JSON, text) */ +#else +typedef void (jer_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +#include /* Packet Encoding Rules decoder */ +#include /* Packet Encoding Rules encoder */ +#else +typedef void (per_type_decoder_f)(void); +typedef void (per_type_encoder_f)(void); +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + +#include /* Subtype constraints support */ + +#if !defined(ASN_DISABLE_RFILL_SUPPORT) +#include /* Random structures support */ +#else +typedef void (asn_random_fill_f)(void); +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) +#include /* Octet Encoding Rules encoder */ +#include /* Octet Encoding Rules encoder */ +#else 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 +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ /* * Free the structure according to its specification. @@ -149,6 +177,7 @@ typedef struct asn_TYPE_operation_s { 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 */ + jer_type_encoder_f *jer_encoder; /* Generic JER 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 */ @@ -163,8 +192,12 @@ typedef struct asn_TYPE_operation_s { * A constraints tuple specifying both the OER and PER constraints. */ typedef struct asn_encoding_constraints_s { +#if !defined(ASN_DISABLE_OER_SUPPORT) const struct asn_oer_constraints_s *oer_constraints; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) const struct asn_per_constraints_s *per_constraints; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ asn_constr_check_f *general_constraints; } asn_encoding_constraints_t; @@ -239,8 +272,8 @@ typedef struct asn_TYPE_member_s { 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 */ + int toff_first; /* First occurrence of the el_tag, relative */ + int toff_last; /* Last occurrence of the el_tag, relative */ } asn_TYPE_tag2member_t; /* diff --git a/e2sm/headers/constraints.h b/e2sm/headers/constraints.h index 0bd86a9..0c093fa 100644 --- a/e2sm/headers/constraints.h +++ b/e2sm/headers/constraints.h @@ -6,6 +6,7 @@ #define ASN1_CONSTRAINTS_VALIDATOR_H #include /* Platform-dependent types */ +#include #ifdef __cplusplus extern "C" { diff --git a/e2sm/headers/jer_encoder.h b/e2sm/headers/jer_encoder.h new file mode 100644 index 0000000..672976d --- /dev/null +++ b/e2sm/headers/jer_encoder.h @@ -0,0 +1,86 @@ +/*- + * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _JER_ENCODER_H_ +#define _JER_ENCODER_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct asn_TYPE_descriptor_s; /* Forward declaration */ + +/* Flags used by the jer_encode() and (*jer_type_encoder_f), defined below + * + * This isn't actually used, it might be used in the future to support + * both normal JSON and prettified JSON output or removed. + * It came from XER + */ +enum jer_encoder_flags_e { + /* Mode of encoding */ + JER_F = 0x01, /* JER (pretty-printing) */ +}; + +/* + * The JER encoder of any type. May be invoked by the application. + * Produces JER output. + */ +asn_enc_rval_t jer_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 */ +); + +/* + * The variant of the above function which dumps the JER + * 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 jer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td, + const void *struct_ptr); + +/* + * A helper function that uses JER encoding/decoding to verify that: + * - Both structures encode into the same JER. + * - Both resulting JER byte streams can be decoded back. + * - Both decoded structures encode into the same JER (round-trip). + * All of this verifies equivalence between structures and a round-trip. + * ARGUMENTS: + * (opt_debug_stream) - If specified, prints ongoing details. + */ +enum jer_equivalence_e { + JEQ_SUCCESS, /* The only completely positive return value */ + JEQ_FAILURE, /* General failure */ + JEQ_ENCODE1_FAILED, /* First structure JER encoding failed */ + JEQ_ENCODE2_FAILED, /* Second structure JER encoding failed */ + JEQ_DIFFERENT, /* Structures encoded into different JER */ + JEQ_DECODE_FAILED, /* Decode of the JER data failed */ + JEQ_ROUND_TRIP_FAILED /* Bad round-trip */ +}; +enum jer_equivalence_e jer_equivalent( + const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct1, + const void *struct2, FILE *opt_debug_stream); + +/* + * Type of the generic JER encoder. + */ +typedef asn_enc_rval_t(jer_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 jer_encoder_flags_e jer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _JER_ENCODER_H_ */ diff --git a/e2sm/headers/per_decoder.h b/e2sm/headers/per_decoder.h index eea474a..3cc0c6b 100644 --- a/e2sm/headers/per_decoder.h +++ b/e2sm/headers/per_decoder.h @@ -14,58 +14,6 @@ extern "C" { 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. */ diff --git a/e2sm/headers/per_encoder.h b/e2sm/headers/per_encoder.h index b615ef0..8bb0771 100644 --- a/e2sm/headers/per_encoder.h +++ b/e2sm/headers/per_encoder.h @@ -14,70 +14,6 @@ extern "C" { 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. */ @@ -86,6 +22,15 @@ typedef asn_enc_rval_t(per_type_encoder_f)( const asn_per_constraints_t *constraints, const void *struct_ptr, asn_per_outp_t *per_output); +int ignore_output(const void *data, size_t size, void *app_key); + +typedef struct enc_dyn_arg { + void *buffer; + size_t length; + size_t allocated; +} enc_dyn_arg; +int encode_dyn_cb(const void *buffer, size_t size, void *key); + #ifdef __cplusplus } #endif diff --git a/e2sm/headers/per_opentype.h b/e2sm/headers/per_opentype.h index 1493b2d..fc37855 100644 --- a/e2sm/headers/per_opentype.h +++ b/e2sm/headers/per_opentype.h @@ -5,37 +5,17 @@ #ifndef _PER_OPENTYPE_H_ #define _PER_OPENTYPE_H_ +#include + #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); +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); #ifdef __cplusplus } diff --git a/e2sm/headers/per_support.h b/e2sm/headers/per_support.h index 23079c9..b3056a2 100644 --- a/e2sm/headers/per_support.h +++ b/e2sm/headers/per_support.h @@ -24,8 +24,8 @@ typedef struct asn_per_constraint_s { } 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 */ + intmax_t lower_bound; /* "lb" value */ + intmax_t upper_bound; /* "ub" value */ } asn_per_constraint_t; typedef struct asn_per_constraints_s { asn_per_constraint_t value; @@ -41,85 +41,12 @@ typedef struct asn_bit_data_s asn_per_data_t; #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 diff --git a/e2sm/headers/uper_decoder.h b/e2sm/headers/uper_decoder.h new file mode 100644 index 0000000..ded8515 --- /dev/null +++ b/e2sm/headers/uper_decoder.h @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_DECODER_H_ +#define _UPER_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 */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_DECODER_H_ */ diff --git a/e2sm/headers/uper_encoder.h b/e2sm/headers/uper_encoder.h new file mode 100644 index 0000000..8f73980 --- /dev/null +++ b/e2sm/headers/uper_encoder.h @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2006-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_ENCODER_H_ +#define _UPER_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 */ +); + +/* + * 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) */ +); + +/* + * 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 */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_ENCODER_H_ */ diff --git a/e2sm/headers/uper_opentype.h b/e2sm/headers/uper_opentype.h new file mode 100644 index 0000000..3a24822 --- /dev/null +++ b/e2sm/headers/uper_opentype.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2007-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_OPENTYPE_H_ +#define _UPER_OPENTYPE_H_ + +#include + +#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); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_OPENTYPE_H_ */ diff --git a/e2sm/headers/uper_support.h b/e2sm/headers/uper_support.h new file mode 100644 index 0000000..6c9d4ea --- /dev/null +++ b/e2sm/headers/uper_support.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#ifndef _UPER_SUPPORT_H_ +#define _UPER_SUPPORT_H_ + +#include /* Platform-specific types */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * 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); + +/* + * Get the normally small length "n". + */ +ssize_t uper_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); + +/* X.691-2008/11, #11.5.6 */ +int uper_get_constrained_whole_number(asn_per_data_t *pd, uintmax_t *v, int nbits); + +/* + * 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, intmax_t lb, intmax_t ub, unsigned long *output); +int per_imax_range_rebase(intmax_t v, intmax_t lb, intmax_t ub, uintmax_t *output); +/* The inverse operation: restores the value by the offset and its bounds. */ +int per_long_range_unrebase(unsigned long inp, intmax_t lb, intmax_t ub, long *outp); +int per_imax_range_unrebase(uintmax_t inp, intmax_t lb, intmax_t ub, intmax_t *outp); + +/* X.691-2008/11, #11.5 */ +int uper_put_constrained_whole_number_u(asn_per_outp_t *po, uintmax_t 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); + +/* + * 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); + +/* + * Put the normally small non-negative whole number. + */ +int uper_put_nsnnwn(asn_per_outp_t *po, int n); + +#ifdef __cplusplus +} +#endif + +#endif /* _UPER_SUPPORT_H_ */ diff --git a/e2sm/headers/xer_encoder.h b/e2sm/headers/xer_encoder.h index 9d75922..6cfc505 100644 --- a/e2sm/headers/xer_encoder.h +++ b/e2sm/headers/xer_encoder.h @@ -54,7 +54,7 @@ int xer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td, 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_ENCODE1_FAILED, /* First structure 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 */ diff --git a/e2sm/headers/xer_support.h b/e2sm/headers/xer_support.h index c3a36e7..2c3f369 100644 --- a/e2sm/headers/xer_support.h +++ b/e2sm/headers/xer_support.h @@ -40,8 +40,8 @@ typedef int (pxml_callback_f)(pxml_chunk_type_e _type, /* * 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. + * Invoke the specified callback each time the meaningful data is found. + * This function returns number of bytes consumed from the buffer. * It will always be lesser than or equal to the specified _size. * The next invocation of this function must account the difference. */ diff --git a/e2sm/lib/AMF-UE-NGAP-ID.c b/e2sm/lib/AMF-UE-NGAP-ID.c index 13fe8aa..f12a33c 100644 --- a/e2sm/lib/AMF-UE-NGAP-ID.c +++ b/e2sm/lib/AMF-UE-NGAP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "AMF-UE-NGAP-ID.h" @@ -27,7 +27,7 @@ AMF_UE_NGAP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - if((value >= 0 && value <= 1099511627775)) { + if((value >= 0L && value <= 1099511627775L)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ AMF_UE_NGAP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using INTEGER, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_AMF_UE_NGAP_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..1099511627775) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_AMF_UE_NGAP_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_AMF_UE_NGAP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_AMF_UE_NGAP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_AMF_UE_NGAP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + AMF_UE_NGAP_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/AMFPointer.c b/e2sm/lib/AMFPointer.c index 99212c4..605d1cb 100644 --- a/e2sm/lib/AMFPointer.c +++ b/e2sm/lib/AMFPointer.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "AMFPointer.h" @@ -27,7 +27,7 @@ AMFPointer_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 6)) { + if((size == 6UL)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ AMFPointer_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_AMFPointer_constr_1 CC_NOTUSED = { + { 0, 0 }, + 6 /* (SIZE(6..6)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_AMFPointer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_AMFPointer = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_AMFPointer_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_AMFPointer_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + AMFPointer_constraint + }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/AMFRegionID.c b/e2sm/lib/AMFRegionID.c index 94e19ba..6205a4b 100644 --- a/e2sm/lib/AMFRegionID.c +++ b/e2sm/lib/AMFRegionID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "AMFRegionID.h" @@ -27,7 +27,7 @@ AMFRegionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 8)) { + if((size == 8UL)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ AMFRegionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_AMFRegionID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_AMFRegionID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_AMFRegionID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_AMFRegionID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_AMFRegionID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + AMFRegionID_constraint + }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/AMFSetID.c b/e2sm/lib/AMFSetID.c index f56a4c5..6680460 100644 --- a/e2sm/lib/AMFSetID.c +++ b/e2sm/lib/AMFSetID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "AMFSetID.h" @@ -27,7 +27,7 @@ AMFSetID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 10)) { + if((size == 10UL)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ AMFSetID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_AMFSetID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 10 /* (SIZE(10..10)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_AMFSetID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_AMFSetID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_AMFSetID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_AMFSetID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + AMFSetID_constraint + }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/ANY.c b/e2sm/lib/ANY.c index 0b81557..bf988db 100644 --- a/e2sm/lib/ANY.c +++ b/e2sm/lib/ANY.c @@ -4,447 +4,77 @@ */ #include #include -#include asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = { - sizeof(ANY_t), - offsetof(ANY_t, _asn_ctx), - ASN_OSUBV_ANY + 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, + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print, #else - 0, - 0, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, 0, 0, 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_hex, + ANY_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + ANY_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, + 0, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + ANY_decode_uper, + ANY_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + ANY_decode_aper, + ANY_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_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, + "ANY", + "ANY", + &asn_OP_ANY, + 0, 0, 0, 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/ANY_aper.c b/e2sm/lib/ANY_aper.c new file mode 100644 index 0000000..91d7277 --- /dev/null +++ b/e2sm/lib/ANY_aper.c @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(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_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_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; + } +} + +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, -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 = aper_put_length(po, -1, -1, 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 && aper_put_length(po, -1, -1, 0, NULL)) + ASN__ENCODE_FAILED; /* End of Message length */ + } while(size); + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/ANY_ber.c b/e2sm/lib/ANY_ber.c new file mode 100644 index 0000000..2ebe45b --- /dev/null +++ b/e2sm/lib/ANY_ber.c @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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) { + 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; +} + +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; +} + +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; + } +} + +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; + } +} diff --git a/e2sm/lib/ANY_jer.c b/e2sm/lib/ANY_jer.c new file mode 100644 index 0000000..a86db9c --- /dev/null +++ b/e2sm/lib/ANY_jer.c @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +ANY_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + ASN__ENCODE_FAILED; + + /* Dump as binary */ + return OCTET_STRING_encode_jer(td, sptr, ilevel, flags, cb, app_key); +} diff --git a/e2sm/lib/ANY_uper.c b/e2sm/lib/ANY_uper.c new file mode 100644 index 0000000..65f1519 --- /dev/null +++ b/e2sm/lib/ANY_uper.c @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +#undef RETURN +#define RETURN(_code) \ + do { \ + asn_dec_rval_t tmprval; \ + tmprval.code = _code; \ + tmprval.consumed = consumed_myself; \ + return tmprval; \ + } while(0) + +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); +} diff --git a/e2sm/lib/ANY_xer.c b/e2sm/lib/ANY_xer.c new file mode 100644 index 0000000..112c213 --- /dev/null +++ b/e2sm/lib/ANY_xer.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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); +} diff --git a/e2sm/lib/BIT_STRING.c b/e2sm/lib/BIT_STRING.c index e8d7354..b5ba940 100644 --- a/e2sm/lib/BIT_STRING.c +++ b/e2sm/lib/BIT_STRING.c @@ -4,61 +4,94 @@ */ #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_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 + 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, + OCTET_STRING_free, /* Implemented in terms of OCTET STRING */ +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + BIT_STRING_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + BIT_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_binary, + BIT_STRING_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + BIT_STRING_encode_jer, #else - BIT_STRING_decode_oer, - BIT_STRING_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + BIT_STRING_decode_oer, + BIT_STRING_encode_oer, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + BIT_STRING_decode_uper, /* Unaligned PER decoder */ + BIT_STRING_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + BIT_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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", + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + BIT_STRING_constraint + }, + 0, 0, /* No members */ + &asn_SPC_BIT_STRING_specs }; /* @@ -87,136 +120,10 @@ BIT_STRING_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, 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 * +const BIT_STRING_t * BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp) { const uint8_t *b; union { @@ -271,6 +178,7 @@ BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const BIT_STRING_t *b = BIT_STRING__compactify(bptr, &compact_b); const asn_OCTET_STRING_specifics_t *specs = td->specifics; + (void)specs; assert(specs && specs->subvariant == ASN_OSUBV_BIT); if(a && b) { @@ -303,354 +211,3 @@ BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2sm/lib/BIT_STRING_jer.c b/e2sm/lib/BIT_STRING_jer.c new file mode 100644 index 0000000..f66238d --- /dev/null +++ b/e2sm/lib/BIT_STRING_jer.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +BIT_STRING_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0, 0, 0}; + const char * const h2c = "0123456789ABCDEF"; + char scratch[16 * 3 + 4]; + char *p = scratch; + const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; + 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 */ + + /* + * Hex dump + */ + *p++ = '"'; + for(int i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + ASN__CALLBACK(scratch, p-scratch); + p = scratch; + } + *p++ = h2c[*buf >> 4]; + *p++ = h2c[*buf & 0x0F]; + } + + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + + if(buf == end) { + int ubits = st->bits_unused; + uint8_t v = *buf & (0xff << ubits); + *p++ = h2c[v >> 4]; + *p++ = h2c[v & 0x0F]; + ASN__CALLBACK(scratch, p - scratch); + p = scratch; + } + *p++ = '"'; + ASN__CALLBACK(scratch, p - scratch); + ASN__TEXT_INDENT(1, ilevel - 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} diff --git a/e2sm/lib/BIT_STRING_oer.c b/e2sm/lib/BIT_STRING_oer.c index aff5075..95c9558 100644 --- a/e2sm/lib/BIT_STRING_oer.c +++ b/e2sm/lib/BIT_STRING_oer.c @@ -3,11 +3,8 @@ * 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, @@ -169,6 +166,3 @@ BIT_STRING_encode_oer(const asn_TYPE_descriptor_t *td, return erval; } - - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/BIT_STRING_print.c b/e2sm/lib/BIT_STRING_print.c new file mode 100644 index 0000000..bab1ea5 --- /dev/null +++ b/e2sm/lib/BIT_STRING_print.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/BIT_STRING_rfill.c b/e2sm/lib/BIT_STRING_rfill.c new file mode 100644 index 0000000..a6e6a95 --- /dev/null +++ b/e2sm/lib/BIT_STRING_rfill.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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 { +#else + if(!constraints) constraints = &td->encoding_constraints; + { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/BIT_STRING_uper.c b/e2sm/lib/BIT_STRING_uper.c new file mode 100644 index 0000000..d82349e --- /dev/null +++ b/e2sm/lib/BIT_STRING_uper.c @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +#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); +} diff --git a/e2sm/lib/BIT_STRING_xer.c b/e2sm/lib/BIT_STRING_xer.c new file mode 100644 index 0000000..67d5cb8 --- /dev/null +++ b/e2sm/lib/BIT_STRING_xer.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/BMPString.c b/e2sm/lib/BMPString.c deleted file mode 100644 index 6b80ae7..0000000 --- a/e2sm/lib/BMPString.c +++ /dev/null @@ -1,233 +0,0 @@ -/*- - * 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/e2sm/lib/BOOLEAN.c b/e2sm/lib/BOOLEAN.c index 25831e2..1373a6f 100644 --- a/e2sm/lib/BOOLEAN.c +++ b/e2sm/lib/BOOLEAN.c @@ -3,247 +3,90 @@ * 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_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, + BOOLEAN_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + BOOLEAN_print, #else - BOOLEAN_decode_oer, - BOOLEAN_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + BOOLEAN_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + BOOLEAN_decode_ber, + BOOLEAN_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + BOOLEAN_decode_xer, + BOOLEAN_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + BOOLEAN_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + BOOLEAN_decode_oer, + BOOLEAN_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + BOOLEAN_decode_uper, /* Unaligned PER decoder */ + BOOLEAN_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + BOOLEAN_decode_aper, /* Aligned PER decoder */ + BOOLEAN_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + BOOLEAN_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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) { @@ -261,168 +104,6 @@ BOOLEAN_free(const asn_TYPE_descriptor_t *td, void *ptr, } } -#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) { @@ -445,48 +126,3 @@ BOOLEAN_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2sm/lib/BOOLEAN_aper.c b/e2sm/lib/BOOLEAN_aper.c new file mode 100644 index 0000000..d697cf5 --- /dev/null +++ b/e2sm/lib/BOOLEAN_aper.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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); +} diff --git a/e2sm/lib/BOOLEAN_ber.c b/e2sm/lib/BOOLEAN_ber.c new file mode 100644 index 0000000..176a4a4 --- /dev/null +++ b/e2sm/lib/BOOLEAN_ber.c @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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); +} diff --git a/e2sm/lib/BOOLEAN_jer.c b/e2sm/lib/BOOLEAN_jer.c new file mode 100644 index 0000000..6f4b093 --- /dev/null +++ b/e2sm/lib/BOOLEAN_jer.c @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +asn_enc_rval_t +BOOLEAN_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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("true", 4); + } else { + ASN__CALLBACK("false", 5); + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} diff --git a/e2sm/lib/BOOLEAN_oer.c b/e2sm/lib/BOOLEAN_oer.c new file mode 100644 index 0000000..0e92e60 --- /dev/null +++ b/e2sm/lib/BOOLEAN_oer.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/BOOLEAN_print.c b/e2sm/lib/BOOLEAN_print.c new file mode 100644 index 0000000..23aaade --- /dev/null +++ b/e2sm/lib/BOOLEAN_print.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/BOOLEAN_rfill.c b/e2sm/lib/BOOLEAN_rfill.c new file mode 100644 index 0000000..5ec628b --- /dev/null +++ b/e2sm/lib/BOOLEAN_rfill.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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; + } + } +#else + if(!constraints) constraints = &td->encoding_constraints; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + + /* 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/e2sm/lib/BOOLEAN_uper.c b/e2sm/lib/BOOLEAN_uper.c new file mode 100644 index 0000000..8181ec9 --- /dev/null +++ b/e2sm/lib/BOOLEAN_uper.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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); +} diff --git a/e2sm/lib/BOOLEAN_xer.c b/e2sm/lib/BOOLEAN_xer.c new file mode 100644 index 0000000..7e9d8f8 --- /dev/null +++ b/e2sm/lib/BOOLEAN_xer.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/C-RNTI.c b/e2sm/lib/C-RNTI.c deleted file mode 100644 index f56a789..0000000 --- a/e2sm/lib/C-RNTI.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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/e2sm/lib/CGI.c b/e2sm/lib/CGI.c index 06e7420..73dfe18 100644 --- a/e2sm/lib/CGI.c +++ b/e2sm/lib/CGI.c @@ -1,26 +1,41 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CGI.h" #include "NR-CGI.h" #include "EUTRA-CGI.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_CGI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "nR-CGI" }, @@ -29,7 +44,15 @@ asn_TYPE_member_t asn_MBR_CGI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_EUTRA_CGI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eUTRA-CGI" }, @@ -56,7 +79,15 @@ asn_TYPE_descriptor_t asn_DEF_CGI = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_CGI_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CGI_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CGI_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_CGI_1, 2, /* Elements count */ &asn_SPC_CGI_specs_1 /* Additional specs */ diff --git a/e2sm/lib/CU-CP-Usage-Report-CellResourceReportItem.c b/e2sm/lib/CU-CP-Usage-Report-CellResourceReportItem.c deleted file mode 100644 index 99bee0a..0000000 --- a/e2sm/lib/CU-CP-Usage-Report-CellResourceReportItem.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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/e2sm/lib/CU-CP-Usage-Report-Per-UE.c b/e2sm/lib/CU-CP-Usage-Report-Per-UE.c deleted file mode 100644 index 54ef1d6..0000000 --- a/e2sm/lib/CU-CP-Usage-Report-Per-UE.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/CU-CP-Usage-Report-UeResourceReportItem.c b/e2sm/lib/CU-CP-Usage-Report-UeResourceReportItem.c deleted file mode 100644 index c78f44a..0000000 --- a/e2sm/lib/CU-CP-Usage-Report-UeResourceReportItem.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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/e2sm/lib/CU-UP-Usage-Report-CellResourceReportItem.c b/e2sm/lib/CU-UP-Usage-Report-CellResourceReportItem.c deleted file mode 100644 index c5175c7..0000000 --- a/e2sm/lib/CU-UP-Usage-Report-CellResourceReportItem.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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/e2sm/lib/CU-UP-Usage-Report-Per-UE.c b/e2sm/lib/CU-UP-Usage-Report-Per-UE.c deleted file mode 100644 index 9a6b24b..0000000 --- a/e2sm/lib/CU-UP-Usage-Report-Per-UE.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/CU-UP-Usage-Report-UeResourceReportItem.c b/e2sm/lib/CU-UP-Usage-Report-UeResourceReportItem.c deleted file mode 100644 index f03bddf..0000000 --- a/e2sm/lib/CU-UP-Usage-Report-UeResourceReportItem.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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/e2sm/lib/CUUPMeasurement-Container.c b/e2sm/lib/CUUPMeasurement-Container.c deleted file mode 100644 index 116631e..0000000 --- a/e2sm/lib/CUUPMeasurement-Container.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/CellResourceReportListItem.c b/e2sm/lib/CellResourceReportListItem.c deleted file mode 100644 index ce16175..0000000 --- a/e2sm/lib/CellResourceReportListItem.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 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/e2sm/lib/CoreCPID.c b/e2sm/lib/CoreCPID.c index b1ff013..1777e18 100644 --- a/e2sm/lib/CoreCPID.c +++ b/e2sm/lib/CoreCPID.c @@ -1,26 +1,41 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "CoreCPID.h" #include "GUAMI.h" #include "GUMMEI.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_CoreCPID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "fiveGC" }, @@ -29,7 +44,15 @@ static asn_TYPE_member_t asn_MBR_CoreCPID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GUMMEI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ePC" }, @@ -56,7 +79,15 @@ asn_TYPE_descriptor_t asn_DEF_CoreCPID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_CoreCPID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_CoreCPID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_CoreCPID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_CoreCPID_1, 2, /* Elements count */ &asn_SPC_CoreCPID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/DU-Usage-Report-CellResourceReportItem.c b/e2sm/lib/DU-Usage-Report-CellResourceReportItem.c deleted file mode 100644 index fec3873..0000000 --- a/e2sm/lib/DU-Usage-Report-CellResourceReportItem.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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/e2sm/lib/DU-Usage-Report-Per-UE.c b/e2sm/lib/DU-Usage-Report-Per-UE.c deleted file mode 100644 index 550592a..0000000 --- a/e2sm/lib/DU-Usage-Report-Per-UE.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/DU-Usage-Report-UeResourceReportItem.c b/e2sm/lib/DU-Usage-Report-UeResourceReportItem.c deleted file mode 100644 index 8809094..0000000 --- a/e2sm/lib/DU-Usage-Report-UeResourceReportItem.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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/e2sm/lib/E-UTRA-ARFCN.c b/e2sm/lib/E-UTRA-ARFCN.c index d1c0711..d5ffbc4 100644 --- a/e2sm/lib/E-UTRA-ARFCN.c +++ b/e2sm/lib/E-UTRA-ARFCN.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E-UTRA-ARFCN.h" @@ -21,7 +21,7 @@ E_UTRA_ARFCN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 65535)) { + if((value >= 0L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ E_UTRA_ARFCN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E_UTRA_ARFCN_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_E_UTRA_ARFCN_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_E_UTRA_ARFCN = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E_UTRA_ARFCN_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E_UTRA_ARFCN_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + E_UTRA_ARFCN_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/E-UTRA-PCI.c b/e2sm/lib/E-UTRA-PCI.c index e84f147..5da8340 100644 --- a/e2sm/lib/E-UTRA-PCI.c +++ b/e2sm/lib/E-UTRA-PCI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E-UTRA-PCI.h" @@ -21,7 +21,7 @@ E_UTRA_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 503)) { + if((value >= 0L && value <= 503L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ E_UTRA_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E_UTRA_PCI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_E_UTRA_PCI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_E_UTRA_PCI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E_UTRA_PCI_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E_UTRA_PCI_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + E_UTRA_PCI_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/E-UTRA-TAC.c b/e2sm/lib/E-UTRA-TAC.c index 2c90250..999654e 100644 --- a/e2sm/lib/E-UTRA-TAC.c +++ b/e2sm/lib/E-UTRA-TAC.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E-UTRA-TAC.h" @@ -22,7 +22,7 @@ E_UTRA_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 2)) { + if((size == 2UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ E_UTRA_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_E_UTRA_TAC_constr_1 CC_NOTUSED = { + { 0, 0 }, + 2 /* (SIZE(2..2)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_E_UTRA_TAC_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_E_UTRA_TAC = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_E_UTRA_TAC_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_E_UTRA_TAC_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + E_UTRA_TAC_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/E2SM-KPM-ActionDefinition-Format1.c b/e2sm/lib/E2SM-KPM-ActionDefinition-Format1.c index 4975a24..dee4c12 100644 --- a/e2sm/lib/E2SM-KPM-ActionDefinition-Format1.c +++ b/e2sm/lib/E2SM-KPM-ActionDefinition-Format1.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-ActionDefinition-Format1.h" @@ -14,7 +14,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementInfoList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measInfoList" }, @@ -23,7 +31,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GranularityPeriod, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "granulPeriod" }, @@ -32,7 +48,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format1_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_CGI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "cellGlobalID" }, @@ -65,7 +89,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/E2SM-KPM-ActionDefinition-Format2.c b/e2sm/lib/E2SM-KPM-ActionDefinition-Format2.c index 3768a39..86e66c1 100644 --- a/e2sm/lib/E2SM-KPM-ActionDefinition-Format2.c +++ b/e2sm/lib/E2SM-KPM-ActionDefinition-Format2.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-ActionDefinition-Format2.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format2_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_UEID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ueID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format2_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_E2SM_KPM_ActionDefinition_Format1, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "subscriptInfo" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format2 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/E2SM-KPM-ActionDefinition-Format3.c b/e2sm/lib/E2SM-KPM-ActionDefinition-Format3.c index 3851720..aefaa46 100644 --- a/e2sm/lib/E2SM-KPM-ActionDefinition-Format3.c +++ b/e2sm/lib/E2SM-KPM-ActionDefinition-Format3.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-ActionDefinition-Format3.h" @@ -14,7 +14,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format3_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementCondList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measCondList" }, @@ -23,7 +31,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format3_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GranularityPeriod, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "granulPeriod" }, @@ -32,7 +48,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_Format3_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_CGI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "cellGlobalID" }, @@ -65,7 +89,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition_Format3 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/E2SM-KPM-ActionDefinition.c b/e2sm/lib/E2SM-KPM-ActionDefinition.c index 4b22a6c..dfcbe58 100644 --- a/e2sm/lib/E2SM-KPM-ActionDefinition.c +++ b/e2sm/lib/E2SM-KPM-ActionDefinition.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-ActionDefinition.h" @@ -10,18 +10,33 @@ #include "E2SM-KPM-ActionDefinition-Format1.h" #include "E2SM-KPM-ActionDefinition-Format2.h" #include "E2SM-KPM-ActionDefinition-Format3.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_actionDefinition_formats_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "actionDefinition-Format1" }, @@ -30,7 +45,15 @@ static asn_TYPE_member_t asn_MBR_actionDefinition_formats_3[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_E2SM_KPM_ActionDefinition_Format2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "actionDefinition-Format2" }, @@ -39,7 +62,15 @@ static asn_TYPE_member_t asn_MBR_actionDefinition_formats_3[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_E2SM_KPM_ActionDefinition_Format3, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "actionDefinition-Format3" }, @@ -68,7 +99,15 @@ asn_TYPE_descriptor_t asn_DEF_actionDefinition_formats_3 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_actionDefinition_formats_constr_3, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_actionDefinition_formats_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_actionDefinition_formats_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_actionDefinition_formats_3, 3, /* Elements count */ &asn_SPC_actionDefinition_formats_specs_3 /* Additional specs */ @@ -80,7 +119,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Style_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-Style-Type" }, @@ -89,7 +136,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_ActionDefinition_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_actionDefinition_formats_3, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "actionDefinition-formats" }, @@ -119,7 +174,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_ActionDefinition = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_E2SM_KPM_ActionDefinition_1, 2, /* Elements count */ &asn_SPC_E2SM_KPM_ActionDefinition_specs_1 /* Additional specs */ diff --git a/e2sm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c b/e2sm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c index 27ea6c1..f41a6df 100644 --- a/e2sm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c +++ b/e2sm/lib/E2SM-KPM-EventTriggerDefinition-Format1.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-EventTriggerDefinition-Format1.h" @@ -21,7 +21,7 @@ reportingPeriod_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const unsigned long *)sptr; - if((value >= 1 && value <= 4294967295)) { + if((value >= 1UL && value <= 4294967295UL)) { /* Constraint check succeeded */ return 0; } else { @@ -50,7 +50,7 @@ memb_reportingPeriod_constraint_1(const asn_TYPE_descriptor_t *td, const void *s value = *(const unsigned long *)sptr; - if((value >= 1 && value <= 4294967295)) { + if((value >= 1UL && value <= 4294967295UL)) { /* Constraint check succeeded */ return 0; } else { @@ -61,16 +61,30 @@ memb_reportingPeriod_constraint_1(const asn_TYPE_descriptor_t *td, const void *s } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_reportingPeriod_constr_2 CC_NOTUSED = { + { 4, 1 } /* (1..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_reportingPeriod_constr_2 CC_NOTUSED = { + { 4, 1 } /* (1..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_specifics_t asn_SPC_reportingPeriod_specs_2 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -91,7 +105,15 @@ asn_TYPE_descriptor_t asn_DEF_reportingPeriod_2 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_reportingPeriod_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_reportingPeriod_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + reportingPeriod_2_constraint + }, 0, 0, /* No members */ &asn_SPC_reportingPeriod_specs_2 /* Additional specs */ }; @@ -102,7 +124,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_EventTriggerDefinition_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_reportingPeriod_2, 0, - { 0, &asn_PER_memb_reportingPeriod_constr_2, memb_reportingPeriod_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_reportingPeriod_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_reportingPeriod_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_reportingPeriod_constraint_1 + }, 0, 0, /* No default value */ "reportingPeriod" }, @@ -131,7 +161,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/E2SM-KPM-EventTriggerDefinition.c b/e2sm/lib/E2SM-KPM-EventTriggerDefinition.c index 0b12ca9..b81b0f3 100644 --- a/e2sm/lib/E2SM-KPM-EventTriggerDefinition.c +++ b/e2sm/lib/E2SM-KPM-EventTriggerDefinition.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-EventTriggerDefinition.h" #include "E2SM-KPM-EventTriggerDefinition-Format1.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_eventDefinition_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eventDefinition-Format1" }, @@ -46,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_eventDefinition_formats_2 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_eventDefinition_formats_constr_2, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_eventDefinition_formats_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_eventDefinition_formats_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_eventDefinition_formats_2, 1, /* Elements count */ &asn_SPC_eventDefinition_formats_specs_2 /* Additional specs */ @@ -58,7 +81,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_EventTriggerDefinition_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_eventDefinition_formats_2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eventDefinition-formats" }, @@ -87,7 +118,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_EventTriggerDefinition = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_E2SM_KPM_EventTriggerDefinition_1, 1, /* Elements count */ &asn_SPC_E2SM_KPM_EventTriggerDefinition_specs_1 /* Additional specs */ diff --git a/e2sm/lib/E2SM-KPM-IndicationHeader-Format1.c b/e2sm/lib/E2SM-KPM-IndicationHeader-Format1.c index 21e5ae3..f773e1c 100644 --- a/e2sm/lib/E2SM-KPM-IndicationHeader-Format1.c +++ b/e2sm/lib/E2SM-KPM-IndicationHeader-Format1.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-IndicationHeader-Format1.h" @@ -150,7 +150,7 @@ memb_fileFormatversion_constraint_1(const asn_TYPE_descriptor_t *td, const void size = st->size; - if((size <= 15) + if((size <= 15UL) && !check_permitted_alphabet_3(st)) { /* Constraint check succeeded */ return 0; @@ -187,7 +187,7 @@ memb_senderName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size <= 400) + if((size <= 400UL) && !check_permitted_alphabet_4(st)) { /* Constraint check succeeded */ return 0; @@ -224,7 +224,7 @@ memb_senderType_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size <= 8) + if((size <= 8UL) && !check_permitted_alphabet_5(st)) { /* Constraint check succeeded */ return 0; @@ -261,7 +261,7 @@ memb_vendorName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size <= 32) + if((size <= 32UL) && !check_permitted_alphabet_6(st)) { /* Constraint check succeeded */ return 0; @@ -283,37 +283,73 @@ static int asn_PER_MAP_vendorName_6_c2v(unsigned int code) { return -1; return permitted_alphabet_code2value_6[code]; } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_fileFormatversion_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_senderName_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_senderType_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_vendorName_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "colletStartTime" }, @@ -322,7 +358,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PrintableString, 0, - { 0, &asn_PER_memb_fileFormatversion_constr_3, memb_fileFormatversion_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_fileFormatversion_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_fileFormatversion_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_fileFormatversion_constraint_1 + }, 0, 0, /* No default value */ "fileFormatversion" }, @@ -331,7 +375,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PrintableString, 0, - { 0, &asn_PER_memb_senderName_constr_4, memb_senderName_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_senderName_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_senderName_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_senderName_constraint_1 + }, 0, 0, /* No default value */ "senderName" }, @@ -340,7 +392,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PrintableString, 0, - { 0, &asn_PER_memb_senderType_constr_5, memb_senderType_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_senderType_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_senderType_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_senderType_constraint_1 + }, 0, 0, /* No default value */ "senderType" }, @@ -349,7 +409,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PrintableString, 0, - { 0, &asn_PER_memb_vendorName_constr_6, memb_vendorName_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_vendorName_constr_6, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_vendorName_constr_6, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_vendorName_constraint_1 + }, 0, 0, /* No default value */ "vendorName" }, @@ -384,7 +452,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/E2SM-KPM-IndicationHeader.c b/e2sm/lib/E2SM-KPM-IndicationHeader.c index b2999ad..e88e1de 100644 --- a/e2sm/lib/E2SM-KPM-IndicationHeader.c +++ b/e2sm/lib/E2SM-KPM-IndicationHeader.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-IndicationHeader.h" #include "E2SM-KPM-IndicationHeader-Format1.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_indicationHeader_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "indicationHeader-Format1" }, @@ -46,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_indicationHeader_formats_2 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_indicationHeader_formats_constr_2, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_indicationHeader_formats_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_indicationHeader_formats_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_indicationHeader_formats_2, 1, /* Elements count */ &asn_SPC_indicationHeader_formats_specs_2 /* Additional specs */ @@ -58,7 +81,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_indicationHeader_formats_2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "indicationHeader-formats" }, @@ -87,7 +118,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_E2SM_KPM_IndicationHeader_1, 1, /* Elements count */ &asn_SPC_E2SM_KPM_IndicationHeader_specs_1 /* Additional specs */ diff --git a/e2sm/lib/E2SM-KPM-IndicationMessage-Format1.c b/e2sm/lib/E2SM-KPM-IndicationMessage-Format1.c index c20ffca..4c421b0 100644 --- a/e2sm/lib/E2SM-KPM-IndicationMessage-Format1.c +++ b/e2sm/lib/E2SM-KPM-IndicationMessage-Format1.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-IndicationMessage-Format1.h" @@ -14,7 +14,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementData, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measData" }, @@ -23,7 +31,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementInfoList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measInfoList" }, @@ -32,7 +48,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GranularityPeriod, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "granulPeriod" }, @@ -65,7 +89,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage_Format1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/E2SM-KPM-IndicationMessage-Format2.c b/e2sm/lib/E2SM-KPM-IndicationMessage-Format2.c index 8e00e8c..2a078a6 100644 --- a/e2sm/lib/E2SM-KPM-IndicationMessage-Format2.c +++ b/e2sm/lib/E2SM-KPM-IndicationMessage-Format2.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-IndicationMessage-Format2.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format2_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementData, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measData" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format2_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementCondUEidList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measCondUEidList" }, @@ -31,7 +47,15 @@ asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_Format2_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GranularityPeriod, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "granulPeriod" }, @@ -64,7 +88,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage_Format2 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/E2SM-KPM-IndicationMessage.c b/e2sm/lib/E2SM-KPM-IndicationMessage.c index 120c1db..9c06349 100644 --- a/e2sm/lib/E2SM-KPM-IndicationMessage.c +++ b/e2sm/lib/E2SM-KPM-IndicationMessage.c @@ -1,26 +1,41 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-IndicationMessage.h" #include "E2SM-KPM-IndicationMessage-Format1.h" #include "E2SM-KPM-IndicationMessage-Format2.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_indicationMessage_formats_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "indicationMessage-Format1" }, @@ -29,7 +44,15 @@ static asn_TYPE_member_t asn_MBR_indicationMessage_formats_2[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_E2SM_KPM_IndicationMessage_Format2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "indicationMessage-Format2" }, @@ -57,7 +80,15 @@ asn_TYPE_descriptor_t asn_DEF_indicationMessage_formats_2 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_indicationMessage_formats_constr_2, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_indicationMessage_formats_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_indicationMessage_formats_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_indicationMessage_formats_2, 2, /* Elements count */ &asn_SPC_indicationMessage_formats_specs_2 /* Additional specs */ @@ -69,7 +100,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationMessage_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_indicationMessage_formats_2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "indicationMessage-formats" }, @@ -98,7 +137,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationMessage = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_E2SM_KPM_IndicationMessage_1, 1, /* Elements count */ &asn_SPC_E2SM_KPM_IndicationMessage_specs_1 /* Additional specs */ diff --git a/e2sm/lib/E2SM-KPM-RANfunction-Description.c b/e2sm/lib/E2SM-KPM-RANfunction-Description.c index 005840b..8854b30 100644 --- a/e2sm/lib/E2SM-KPM-RANfunction-Description.c +++ b/e2sm/lib/E2SM-KPM-RANfunction-Description.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "E2SM-KPM-RANfunction-Description.h" @@ -24,9 +24,9 @@ memb_ric_EventTriggerStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, co /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; - if((size >= 1 && size <= 63)) { + if((size >= 1UL && size <= 63UL)) { /* Perform validation of the inner elements */ - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", @@ -50,9 +50,9 @@ memb_ric_ReportStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const vo /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; - if((size >= 1 && size <= 63)) { + if((size >= 1UL && size <= 63UL)) { /* Perform validation of the inner elements */ - return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); + return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", @@ -61,33 +61,69 @@ memb_ric_ReportStyle_List_constraint_1(const asn_TYPE_descriptor_t *td, const vo } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ric_EventTriggerStyle_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ric_ReportStyle_List_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_ric_EventTriggerStyle_List_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_ric_ReportStyle_List_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..63)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -112,7 +148,15 @@ asn_TYPE_descriptor_t asn_DEF_ric_EventTriggerStyle_List_3 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ric_EventTriggerStyle_List_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ric_EventTriggerStyle_List_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_ric_EventTriggerStyle_List_3, 1, /* Single element */ &asn_SPC_ric_EventTriggerStyle_List_specs_3 /* Additional specs */ @@ -124,7 +168,15 @@ static asn_TYPE_member_t asn_MBR_ric_ReportStyle_List_5[] = { 0, &asn_DEF_RIC_ReportStyle_Item, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -149,7 +201,15 @@ asn_TYPE_descriptor_t asn_DEF_ric_ReportStyle_List_5 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ric_ReportStyle_List_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ric_ReportStyle_List_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_ric_ReportStyle_List_5, 1, /* Single element */ &asn_SPC_ric_ReportStyle_List_specs_5 /* Additional specs */ @@ -161,7 +221,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_RANfunction_Description_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANfunction_Name, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunction-Name" }, @@ -170,7 +238,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_RANfunction_Description_1[] = { 0, &asn_DEF_ric_EventTriggerStyle_List_3, 0, - { 0, &asn_PER_memb_ric_EventTriggerStyle_List_constr_3, memb_ric_EventTriggerStyle_List_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ric_EventTriggerStyle_List_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ric_EventTriggerStyle_List_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ric_EventTriggerStyle_List_constraint_1 + }, 0, 0, /* No default value */ "ric-EventTriggerStyle-List" }, @@ -179,7 +255,15 @@ static asn_TYPE_member_t asn_MBR_E2SM_KPM_RANfunction_Description_1[] = { 0, &asn_DEF_ric_ReportStyle_List_5, 0, - { 0, &asn_PER_memb_ric_ReportStyle_List_constr_5, memb_ric_ReportStyle_List_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ric_ReportStyle_List_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ric_ReportStyle_List_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ric_ReportStyle_List_constraint_1 + }, 0, 0, /* No default value */ "ric-ReportStyle-List" }, @@ -212,7 +296,15 @@ asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_RANfunction_Description = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/EN-GNB-ID.c b/e2sm/lib/EN-GNB-ID.c index 1b2986b..ee355a5 100644 --- a/e2sm/lib/EN-GNB-ID.c +++ b/e2sm/lib/EN-GNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "EN-GNB-ID.h" @@ -27,7 +27,7 @@ memb_en_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size >= 22 && size <= 32)) { + if((size >= 22UL && size <= 32UL)) { /* Constraint check succeeded */ return 0; } else { @@ -38,23 +38,45 @@ memb_en_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_en_gNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_EN_GNB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_en_gNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_en_gNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_en_gNB_ID_constraint_1 + }, 0, 0, /* No default value */ "en-gNB-ID" }, @@ -80,7 +102,15 @@ asn_TYPE_descriptor_t asn_DEF_EN_GNB_ID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_EN_GNB_ID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_EN_GNB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_EN_GNB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_EN_GNB_ID_1, 1, /* Elements count */ &asn_SPC_EN_GNB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/ENB-ID-Choice.c b/e2sm/lib/ENB-ID-Choice.c deleted file mode 100644 index 1f60450..0000000 --- a/e2sm/lib/ENB-ID-Choice.c +++ /dev/null @@ -1,192 +0,0 @@ -/* - * 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/e2sm/lib/ENB-ID.c b/e2sm/lib/ENB-ID.c index 8f6aeb0..143cbb5 100644 --- a/e2sm/lib/ENB-ID.c +++ b/e2sm/lib/ENB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ENB-ID.h" @@ -27,7 +27,7 @@ memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr size = 0; } - if((size == 20)) { + if((size == 20UL)) { /* Constraint check succeeded */ return 0; } else { @@ -58,7 +58,7 @@ memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 28)) { + if((size == 28UL)) { /* Constraint check succeeded */ return 0; } else { @@ -89,7 +89,7 @@ memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void size = 0; } - if((size == 18)) { + if((size == 18UL)) { /* Constraint check succeeded */ return 0; } else { @@ -120,7 +120,7 @@ memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void size = 0; } - if((size == 21)) { + if((size == 21UL)) { /* Constraint check succeeded */ return 0; } else { @@ -131,38 +131,81 @@ memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_home_eNB_ID_constr_3 CC_NOTUSED = { + { 0, 0 }, + 28 /* (SIZE(28..28)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = { + { 0, 0 }, + 18 /* (SIZE(18..18)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = { + { 0, 0 }, + 21 /* (SIZE(21..21)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ENB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_macro_eNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_macro_eNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_macro_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "macro-eNB-ID" }, @@ -171,7 +214,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_home_eNB_ID_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_home_eNB_ID_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_home_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "home-eNB-ID" }, @@ -180,7 +231,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_short_Macro_eNB_ID_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_short_Macro_eNB_ID_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_short_Macro_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "short-Macro-eNB-ID" }, @@ -189,7 +248,15 @@ asn_TYPE_member_t asn_MBR_ENB_ID_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_long_Macro_eNB_ID_constr_6, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_long_Macro_eNB_ID_constr_6, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_long_Macro_eNB_ID_constraint_1 + }, 0, 0, /* No default value */ "long-Macro-eNB-ID" }, @@ -218,7 +285,15 @@ asn_TYPE_descriptor_t asn_DEF_ENB_ID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_ENB_ID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ENB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ENB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_ENB_ID_1, 4, /* Elements count */ &asn_SPC_ENB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/ENB-UE-X2AP-ID-Extension.c b/e2sm/lib/ENB-UE-X2AP-ID-Extension.c index 2509d5e..f28fa2e 100644 --- a/e2sm/lib/ENB-UE-X2AP-ID-Extension.c +++ b/e2sm/lib/ENB-UE-X2AP-ID-Extension.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ENB-UE-X2AP-ID-Extension.h" @@ -21,7 +21,7 @@ ENB_UE_X2AP_ID_Extension_constraint(const asn_TYPE_descriptor_t *td, const void value = *(const long *)sptr; - if((value >= 0 && value <= 4095)) { + if((value >= 0L && value <= 4095L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ ENB_UE_X2AP_ID_Extension_constraint(const asn_TYPE_descriptor_t *td, const void * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ENB_UE_X2AP_ID_Extension_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_ENB_UE_X2AP_ID_Extension_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID_Extension = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ENB_UE_X2AP_ID_Extension_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ENB_UE_X2AP_ID_Extension_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + ENB_UE_X2AP_ID_Extension_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/ENB-UE-X2AP-ID.c b/e2sm/lib/ENB-UE-X2AP-ID.c index 81446fe..90d3108 100644 --- a/e2sm/lib/ENB-UE-X2AP-ID.c +++ b/e2sm/lib/ENB-UE-X2AP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ENB-UE-X2AP-ID.h" @@ -21,7 +21,7 @@ ENB_UE_X2AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 4095)) { + if((value >= 0L && value <= 4095L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ ENB_UE_X2AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ENB_UE_X2AP_ID_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..4095) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_ENB_UE_X2AP_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_ENB_UE_X2AP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ENB_UE_X2AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ENB_UE_X2AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + ENB_UE_X2AP_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/ENGNB-ID.c b/e2sm/lib/ENGNB-ID.c deleted file mode 100644 index 09371ad..0000000 --- a/e2sm/lib/ENGNB-ID.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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/e2sm/lib/ENUMERATED.c b/e2sm/lib/ENUMERATED.c deleted file mode 100644 index e16cdd9..0000000 --- a/e2sm/lib/ENUMERATED.c +++ /dev/null @@ -1,180 +0,0 @@ -/*- - * 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/e2sm/lib/EPC-CUUP-PM-Format.c b/e2sm/lib/EPC-CUUP-PM-Format.c deleted file mode 100644 index 5576886..0000000 --- a/e2sm/lib/EPC-CUUP-PM-Format.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/EPC-DU-PM-Container.c b/e2sm/lib/EPC-DU-PM-Container.c deleted file mode 100644 index db3f093..0000000 --- a/e2sm/lib/EPC-DU-PM-Container.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/EUTRA-CGI.c b/e2sm/lib/EUTRA-CGI.c index 4b28cac..8114e7c 100644 --- a/e2sm/lib/EUTRA-CGI.c +++ b/e2sm/lib/EUTRA-CGI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "EUTRA-CGI.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_EUTRA_CGI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMNIdentity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_EUTRA_CGI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_EUTRACellIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eUTRACellIdentity" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_EUTRA_CGI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_EUTRA_CGI_1, 2, /* Elements count */ &asn_SPC_EUTRA_CGI_specs_1 /* Additional specs */ diff --git a/e2sm/lib/EUTRACellIdentity.c b/e2sm/lib/EUTRACellIdentity.c index 570f5fd..7b90b91 100644 --- a/e2sm/lib/EUTRACellIdentity.c +++ b/e2sm/lib/EUTRACellIdentity.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "EUTRACellIdentity.h" @@ -27,7 +27,7 @@ EUTRACellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 28)) { + if((size == 28UL)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ EUTRACellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_EUTRACellIdentity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 28 /* (SIZE(28..28)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_EUTRACellIdentity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_EUTRACellIdentity = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_EUTRACellIdentity_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_EUTRACellIdentity_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + EUTRACellIdentity_constraint + }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/EXTERNAL.c b/e2sm/lib/EXTERNAL.c new file mode 100644 index 0000000..10fcf63 --- /dev/null +++ b/e2sm/lib/EXTERNAL.c @@ -0,0 +1,228 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "ASN1C-UsefulInformationObjectClasses" + * found in "/usr/local/share/asn1c/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "EXTERNAL.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_encoding_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_encoding_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_encoding_5[] = { + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL__encoding, choice.single_ASN1_type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ANY, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "single-ASN1-type" + }, + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL__encoding, choice.octet_aligned), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "octet-aligned" + }, + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL__encoding, choice.arbitrary), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "arbitrary" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_encoding_tag2el_5[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* single-ASN1-type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* octet-aligned */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* arbitrary */ +}; +static asn_CHOICE_specifics_t asn_SPC_encoding_specs_5 = { + sizeof(struct EXTERNAL__encoding), + offsetof(struct EXTERNAL__encoding, _asn_ctx), + offsetof(struct EXTERNAL__encoding, present), + sizeof(((struct EXTERNAL__encoding *)0)->present), + asn_MAP_encoding_tag2el_5, + 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_encoding_5 = { + "encoding", + "encoding", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_encoding_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_encoding_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_encoding_5, + 3, /* Elements count */ + &asn_SPC_encoding_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_EXTERNAL_1[] = { + { ATF_POINTER, 3, offsetof(struct EXTERNAL, direct_reference), + (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), + 0, + &asn_DEF_OBJECT_IDENTIFIER, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "direct-reference" + }, + { ATF_POINTER, 2, offsetof(struct EXTERNAL, indirect_reference), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "indirect-reference" + }, + { ATF_POINTER, 1, offsetof(struct EXTERNAL, data_value_descriptor), + (ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), + 0, + &asn_DEF_ObjectDescriptor, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "data-value-descriptor" + }, + { ATF_NOFLAGS, 0, offsetof(struct EXTERNAL, encoding), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_encoding_5, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encoding" + }, +}; +static const int asn_MAP_EXTERNAL_oms_1[] = { 0, 1, 2 }; +static const ber_tlv_tag_t asn_DEF_EXTERNAL_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EXTERNAL_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* indirect-reference */ + { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, 0, 0 }, /* direct-reference */ + { (ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), 2, 0, 0 }, /* data-value-descriptor */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* single-ASN1-type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* octet-aligned */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 } /* arbitrary */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EXTERNAL_specs_1 = { + sizeof(struct EXTERNAL), + offsetof(struct EXTERNAL, _asn_ctx), + asn_MAP_EXTERNAL_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_EXTERNAL_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EXTERNAL = { + "EXTERNAL", + "EXTERNAL", + &asn_OP_SEQUENCE, + asn_DEF_EXTERNAL_tags_1, + sizeof(asn_DEF_EXTERNAL_tags_1) + /sizeof(asn_DEF_EXTERNAL_tags_1[0]) - 1, /* 1 */ + asn_DEF_EXTERNAL_tags_1, /* Same as above */ + sizeof(asn_DEF_EXTERNAL_tags_1) + /sizeof(asn_DEF_EXTERNAL_tags_1[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_EXTERNAL_1, + 4, /* Elements count */ + &asn_SPC_EXTERNAL_specs_1 /* Additional specs */ +}; + diff --git a/e2sm/lib/FGC-CUUP-PM-Format.c b/e2sm/lib/FGC-CUUP-PM-Format.c deleted file mode 100644 index 7482379..0000000 --- a/e2sm/lib/FGC-CUUP-PM-Format.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/FGC-DU-PM-Container.c b/e2sm/lib/FGC-DU-PM-Container.c deleted file mode 100644 index e81a6d5..0000000 --- a/e2sm/lib/FGC-DU-PM-Container.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/FQIPERSlicesPerPlmnListItem.c b/e2sm/lib/FQIPERSlicesPerPlmnListItem.c deleted file mode 100644 index 13958bd..0000000 --- a/e2sm/lib/FQIPERSlicesPerPlmnListItem.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * 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/e2sm/lib/FQIPERSlicesPerPlmnPerCellListItem.c b/e2sm/lib/FQIPERSlicesPerPlmnPerCellListItem.c deleted file mode 100644 index 8a070c8..0000000 --- a/e2sm/lib/FQIPERSlicesPerPlmnPerCellListItem.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * 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/e2sm/lib/FiveGS-TAC.c b/e2sm/lib/FiveGS-TAC.c index 5388efe..571b903 100644 --- a/e2sm/lib/FiveGS-TAC.c +++ b/e2sm/lib/FiveGS-TAC.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "FiveGS-TAC.h" @@ -22,7 +22,7 @@ FiveGS_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 3)) { + if((size == 3UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ FiveGS_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_FiveGS_TAC_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_FiveGS_TAC_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_FiveGS_TAC = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_FiveGS_TAC_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_FiveGS_TAC_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + FiveGS_TAC_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/FiveQI.c b/e2sm/lib/FiveQI.c index 498f1e5..f6db193 100644 --- a/e2sm/lib/FiveQI.c +++ b/e2sm/lib/FiveQI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "FiveQI.h" @@ -21,7 +21,7 @@ FiveQI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 255)) { + if((value >= 0L && value <= 255L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ FiveQI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_FiveQI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_FiveQI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_FiveQI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_FiveQI_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_FiveQI_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + FiveQI_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/FreqBandNrItem.c b/e2sm/lib/FreqBandNrItem.c index 6f0d675..1fd6143 100644 --- a/e2sm/lib/FreqBandNrItem.c +++ b/e2sm/lib/FreqBandNrItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "FreqBandNrItem.h" @@ -21,7 +21,7 @@ memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const voi value = *(const long *)sptr; - if((value >= 1 && value <= 1024)) { + if((value >= 1L && value <= 1024L)) { /* Constraint check succeeded */ return 0; } else { @@ -32,18 +32,33 @@ memb_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const voi } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_freqBandIndicatorNr_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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[] = { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_freqBandIndicatorNr_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_freqBandIndicatorNr_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_freqBandIndicatorNr_constraint_1 + }, 0, 0, /* No default value */ "freqBandIndicatorNr" }, @@ -54,7 +69,7 @@ static const ber_tlv_tag_t asn_DEF_FreqBandNrItem_tags_1[] = { 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 = { +asn_SEQUENCE_specifics_t asn_SPC_FreqBandNrItem_specs_1 = { sizeof(struct FreqBandNrItem), offsetof(struct FreqBandNrItem, _asn_ctx), asn_MAP_FreqBandNrItem_tag2el_1, @@ -72,7 +87,15 @@ asn_TYPE_descriptor_t asn_DEF_FreqBandNrItem = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_FreqBandNrItem_1, 1, /* Elements count */ &asn_SPC_FreqBandNrItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GNB-CU-CP-UE-E1AP-ID.c b/e2sm/lib/GNB-CU-CP-UE-E1AP-ID.c index 613b901..3423fad 100644 --- a/e2sm/lib/GNB-CU-CP-UE-E1AP-ID.c +++ b/e2sm/lib/GNB-CU-CP-UE-E1AP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-CU-CP-UE-E1AP-ID.h" @@ -27,11 +27,18 @@ GNB_CU_CP_UE_E1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *spt * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GNB_CU_CP_UE_E1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ const asn_INTEGER_specifics_t asn_SPC_GNB_CU_CP_UE_E1AP_ID_specs_1 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -50,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_CU_CP_UE_E1AP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_CU_CP_UE_E1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_CU_CP_UE_E1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/GNB-CU-UE-F1AP-ID.c b/e2sm/lib/GNB-CU-UE-F1AP-ID.c index df994e9..65604f0 100644 --- a/e2sm/lib/GNB-CU-UE-F1AP-ID.c +++ b/e2sm/lib/GNB-CU-UE-F1AP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-CU-UE-F1AP-ID.h" @@ -27,11 +27,18 @@ GNB_CU_UE_F1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GNB_CU_UE_F1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ const asn_INTEGER_specifics_t asn_SPC_GNB_CU_UE_F1AP_ID_specs_1 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -50,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_CU_UE_F1AP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_CU_UE_F1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_CU_UE_F1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + GNB_CU_UE_F1AP_ID_constraint + }, 0, 0, /* No members */ &asn_SPC_GNB_CU_UE_F1AP_ID_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/GNB-CU-UP-ID.c b/e2sm/lib/GNB-CU-UP-ID.c index 648f822..3b80791 100644 --- a/e2sm/lib/GNB-CU-UP-ID.c +++ b/e2sm/lib/GNB-CU-UP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-CU-UP-ID.h" @@ -27,7 +27,7 @@ GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - if((value >= 0 && value <= 68719476735)) { + if((value >= 0L && value <= 68719476735L)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using INTEGER, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_CU_UP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_CU_UP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + GNB_CU_UP_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/GNB-DU-ID.c b/e2sm/lib/GNB-DU-ID.c index 820ae0b..3213473 100644 --- a/e2sm/lib/GNB-DU-ID.c +++ b/e2sm/lib/GNB-DU-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-DU-ID.h" @@ -27,7 +27,7 @@ GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - if((value >= 0 && value <= 68719476735)) { + if((value >= 0L && value <= 68719476735L)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using INTEGER, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GNB_DU_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_GNB_DU_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + GNB_DU_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/GNB-DU-Name.c b/e2sm/lib/GNB-DU-Name.c deleted file mode 100644 index a84d899..0000000 --- a/e2sm/lib/GNB-DU-Name.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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/e2sm/lib/GNB-ID-Choice.c b/e2sm/lib/GNB-ID-Choice.c deleted file mode 100644 index 42c0272..0000000 --- a/e2sm/lib/GNB-ID-Choice.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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/e2sm/lib/GNB-ID.c b/e2sm/lib/GNB-ID.c index 3e67e92..c904760 100644 --- a/e2sm/lib/GNB-ID.c +++ b/e2sm/lib/GNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GNB-ID.h" @@ -27,7 +27,7 @@ memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size >= 22 && size <= 32)) { + if((size >= 22UL && size <= 32UL)) { /* Constraint check succeeded */ return 0; } else { @@ -38,23 +38,45 @@ memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_gNB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(22..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GNB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_gNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_gNB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_gNB_ID_constraint_1 + }, 0, 0, /* No default value */ "gNB-ID" }, @@ -80,7 +102,15 @@ asn_TYPE_descriptor_t asn_DEF_GNB_ID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_GNB_ID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GNB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GNB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_GNB_ID_1, 1, /* Elements count */ &asn_SPC_GNB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GNB-Name.c b/e2sm/lib/GNB-Name.c deleted file mode 100644 index f80dae1..0000000 --- a/e2sm/lib/GNB-Name.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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/e2sm/lib/GUAMI.c b/e2sm/lib/GUAMI.c index ccfe50f..3826fca 100644 --- a/e2sm/lib/GUAMI.c +++ b/e2sm/lib/GUAMI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GUAMI.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GUAMI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMNIdentity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GUAMI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_AMFRegionID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "aMFRegionID" }, @@ -31,7 +47,15 @@ asn_TYPE_member_t asn_MBR_GUAMI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_AMFSetID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "aMFSetID" }, @@ -40,7 +64,15 @@ asn_TYPE_member_t asn_MBR_GUAMI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_AMFPointer, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "aMFPointer" }, @@ -72,7 +104,15 @@ asn_TYPE_descriptor_t asn_DEF_GUAMI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GUAMI_1, 4, /* Elements count */ &asn_SPC_GUAMI_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GUMMEI.c b/e2sm/lib/GUMMEI.c index 82d507b..308cb17 100644 --- a/e2sm/lib/GUMMEI.c +++ b/e2sm/lib/GUMMEI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GUMMEI.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GUMMEI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMN-Identity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GUMMEI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MME_Group_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "mME-Group-ID" }, @@ -31,7 +47,15 @@ asn_TYPE_member_t asn_MBR_GUMMEI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MME_Code, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "mME-Code" }, @@ -62,7 +86,15 @@ asn_TYPE_descriptor_t asn_DEF_GUMMEI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GUMMEI_1, 3, /* Elements count */ &asn_SPC_GUMMEI_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GeneralString.c b/e2sm/lib/GeneralString.c deleted file mode 100644 index cc35a3a..0000000 --- a/e2sm/lib/GeneralString.c +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * 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/e2sm/lib/GeneralizedTime.c b/e2sm/lib/GeneralizedTime.c deleted file mode 100644 index f1095a2..0000000 --- a/e2sm/lib/GeneralizedTime.c +++ /dev/null @@ -1,833 +0,0 @@ -/*- - * 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/e2sm/lib/GlobalENB-ID.c b/e2sm/lib/GlobalENB-ID.c index db6e497..863eaf8 100644 --- a/e2sm/lib/GlobalENB-ID.c +++ b/e2sm/lib/GlobalENB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalENB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMNIdentity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_ENB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eNB-ID" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalENB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalENB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GlobalGNB-ID.c b/e2sm/lib/GlobalGNB-ID.c index 8576ec7..83fdc1a 100644 --- a/e2sm/lib/GlobalGNB-ID.c +++ b/e2sm/lib/GlobalGNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalGNB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalGNB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMNIdentity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalGNB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_GNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-ID" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalGNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalGNB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalGNB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GlobalKPMnode-ID.c b/e2sm/lib/GlobalKPMnode-ID.c deleted file mode 100644 index b16ba1d..0000000 --- a/e2sm/lib/GlobalKPMnode-ID.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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/e2sm/lib/GlobalKPMnode-eNB-ID.c b/e2sm/lib/GlobalKPMnode-eNB-ID.c deleted file mode 100644 index ae65253..0000000 --- a/e2sm/lib/GlobalKPMnode-eNB-ID.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/lib/GlobalKPMnode-en-gNB-ID.c b/e2sm/lib/GlobalKPMnode-en-gNB-ID.c deleted file mode 100644 index 0ad39cb..0000000 --- a/e2sm/lib/GlobalKPMnode-en-gNB-ID.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/lib/GlobalKPMnode-gNB-ID.c b/e2sm/lib/GlobalKPMnode-gNB-ID.c deleted file mode 100644 index 1765922..0000000 --- a/e2sm/lib/GlobalKPMnode-gNB-ID.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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/e2sm/lib/GlobalKPMnode-ng-eNB-ID.c b/e2sm/lib/GlobalKPMnode-ng-eNB-ID.c deleted file mode 100644 index aeaf7ab..0000000 --- a/e2sm/lib/GlobalKPMnode-ng-eNB-ID.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/lib/GlobalNGRANNodeID.c b/e2sm/lib/GlobalNGRANNodeID.c deleted file mode 100644 index 53fc9fe..0000000 --- a/e2sm/lib/GlobalNGRANNodeID.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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/e2sm/lib/GlobalNgENB-ID.c b/e2sm/lib/GlobalNgENB-ID.c index e0c693d..ff37ca3 100644 --- a/e2sm/lib/GlobalNgENB-ID.c +++ b/e2sm/lib/GlobalNgENB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalNgENB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalNgENB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMNIdentity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalNgENB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_NgENB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ngENB-ID" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalNgENB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalNgENB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalNgENB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GlobalRANNodeID.c b/e2sm/lib/GlobalRANNodeID.c new file mode 100644 index 0000000..42318a0 --- /dev/null +++ b/e2sm/lib/GlobalRANNodeID.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "E2SM-COMMON-IEs" + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` + */ + +#include "GlobalRANNodeID.h" + +#include "GlobalGNB-ID.h" +#include "GlobalNgENB-ID.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GlobalRANNodeID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_GlobalRANNodeID_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_GlobalRANNodeID_1[] = { + { ATF_POINTER, 0, offsetof(struct GlobalRANNodeID, choice.globalGNB_ID), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalGNB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "globalGNB-ID" + }, + { ATF_POINTER, 0, offsetof(struct GlobalRANNodeID, choice.globalNgENB_ID), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GlobalNgENB_ID, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "globalNgENB-ID" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_GlobalRANNodeID_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* globalGNB-ID */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* globalNgENB-ID */ +}; +asn_CHOICE_specifics_t asn_SPC_GlobalRANNodeID_specs_1 = { + sizeof(struct GlobalRANNodeID), + offsetof(struct GlobalRANNodeID, _asn_ctx), + offsetof(struct GlobalRANNodeID, present), + sizeof(((struct GlobalRANNodeID *)0)->present), + asn_MAP_GlobalRANNodeID_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GlobalRANNodeID = { + "GlobalRANNodeID", + "GlobalRANNodeID", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GlobalRANNodeID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GlobalRANNodeID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_GlobalRANNodeID_1, + 2, /* Elements count */ + &asn_SPC_GlobalRANNodeID_specs_1 /* Additional specs */ +}; + diff --git a/e2sm/lib/GlobalenGNB-ID.c b/e2sm/lib/GlobalenGNB-ID.c index aca7a85..c1c8417 100644 --- a/e2sm/lib/GlobalenGNB-ID.c +++ b/e2sm/lib/GlobalenGNB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GlobalenGNB-ID.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMN-Identity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_EN_GNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "en-gNB-ID" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_GlobalenGNB_ID_1, 2, /* Elements count */ &asn_SPC_GlobalenGNB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/GlobalgNB-ID.c b/e2sm/lib/GlobalgNB-ID.c deleted file mode 100644 index 746fb2c..0000000 --- a/e2sm/lib/GlobalgNB-ID.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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/e2sm/lib/GlobalngeNB-ID.c b/e2sm/lib/GlobalngeNB-ID.c deleted file mode 100644 index 878484a..0000000 --- a/e2sm/lib/GlobalngeNB-ID.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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/e2sm/lib/GranularityPeriod.c b/e2sm/lib/GranularityPeriod.c index 1cf3c62..a74dc75 100644 --- a/e2sm/lib/GranularityPeriod.c +++ b/e2sm/lib/GranularityPeriod.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GranularityPeriod.h" @@ -21,7 +21,7 @@ GranularityPeriod_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const unsigned long *)sptr; - if((value >= 1 && value <= 4294967295)) { + if((value >= 1UL && value <= 4294967295UL)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ GranularityPeriod_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GranularityPeriod_constr_1 CC_NOTUSED = { + { 4, 1 } /* (1..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ const asn_INTEGER_specifics_t asn_SPC_GranularityPeriod_specs_1 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -59,7 +66,15 @@ asn_TYPE_descriptor_t asn_DEF_GranularityPeriod = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GranularityPeriod_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GranularityPeriod_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + GranularityPeriod_constraint + }, 0, 0, /* No members */ &asn_SPC_GranularityPeriod_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/GraphicString.c b/e2sm/lib/GraphicString.c index e6642c9..b761187 100644 --- a/e2sm/lib/GraphicString.c +++ b/e2sm/lib/GraphicString.c @@ -9,50 +9,83 @@ * 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_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 */ + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print, /* non-ascii string */ +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, /* Can't expect it to be ASCII/UTF8 */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer, /* Can't expect it to be ASCII/UTF8 */ +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OCTET_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_unknown_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ }; - diff --git a/e2sm/lib/GroupID.c b/e2sm/lib/GroupID.c index 8eaff0e..4c52f6d 100644 --- a/e2sm/lib/GroupID.c +++ b/e2sm/lib/GroupID.c @@ -1,24 +1,39 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "GroupID.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_GroupID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "fiveGC" }, @@ -27,7 +42,15 @@ static asn_TYPE_member_t asn_MBR_GroupID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_QCI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ePC" }, @@ -54,7 +77,15 @@ asn_TYPE_descriptor_t asn_DEF_GroupID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_GroupID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_GroupID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_GroupID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_GroupID_1, 2, /* Elements count */ &asn_SPC_GroupID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/IA5String.c b/e2sm/lib/IA5String.c deleted file mode 100644 index 1aeebf4..0000000 --- a/e2sm/lib/IA5String.c +++ /dev/null @@ -1,97 +0,0 @@ -/*- - * 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/e2sm/lib/INTEGER.c b/e2sm/lib/INTEGER.c index 2a2f4d7..095063f 100644 --- a/e2sm/lib/INTEGER.c +++ b/e2sm/lib/INTEGER.c @@ -1,134 +1,99 @@ -/*- - * Copyright (c) 2003-2014 Lev Walkin . +/* + * Copyright (c) 2003-2019 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 +#include /* * INTEGER basic type description. */ static const ber_tlv_tag_t asn_DEF_INTEGER_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) + (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, + INTEGER_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + INTEGER_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + INTEGER_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + ber_decode_primitive, + INTEGER_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + INTEGER_decode_xer, + INTEGER_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + INTEGER_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + INTEGER_decode_oer, /* OER decoder */ + INTEGER_encode_oer, /* Canonical OER encoder */ #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, + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + INTEGER_decode_uper, /* Unaligned PER decoder */ + INTEGER_encode_uper, /* Unaligned PER encoder */ #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + INTEGER_decode_aper, /* Aligned PER decoder */ + INTEGER_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + INTEGER_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ +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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 +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; @@ -202,89 +167,6 @@ INTEGER__dump(const asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_cons 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; @@ -304,816 +186,6 @@ INTEGER_map_value2enum(const asn_INTEGER_specifics_t *specs, long value) { 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; @@ -1428,64 +500,71 @@ asn_int642INTEGER(INTEGER_t *st, int64_t value) { */ enum asn_strtox_result_e asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) { - int sign = 1; - intmax_t value; + 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; - } - } + const intmax_t 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; - 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; - } - } + if(str >= *end) return ASN_STRTOX_ERROR_INVAL; - *end = str; - *intp = sign * value; - return ASN_STRTOX_OK; + 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++) { + if(*str >= 0x30 && *str <= 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; + } + str += 1; + if(str < *end) { + // If digits continue, we're guaranteed out of range. + *end = str; + if(*str >= 0x30 && *str <= 0x39) { + return ASN_STRTOX_ERROR_RANGE; + } else { + *intp = sign * value; + return ASN_STRTOX_EXTRA_DATA; + } + } + break; + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + *intp = sign * value; + return ASN_STRTOX_EXTRA_DATA; + } + } + + *end = str; + *intp = sign * value; + return ASN_STRTOX_OK; } /* @@ -1496,56 +575,63 @@ asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) { */ enum asn_strtox_result_e asn_strtoumax_lim(const char *str, const char **end, uintmax_t *uintp) { - uintmax_t value; + 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 + const uintmax_t asn1_uintmax_max = ((~(uintmax_t)0)); + const uintmax_t upper_boundary = asn1_uintmax_max / 10; + uintmax_t last_digit_max = asn1_uintmax_max % 10; if(str >= *end) return ASN_STRTOX_ERROR_INVAL; - switch(*str) { - case '-': + switch(*str) { + case '-': return ASN_STRTOX_ERROR_INVAL; - case '+': - str++; - if(str >= *end) { - *end = str; - return ASN_STRTOX_EXPECT_MORE; - } - } + 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) { + for(value = 0; str < (*end); str++) { + if(*str >= 0x30 && *str <= 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; + str += 1; + if(str < *end) { + // If digits continue, we're guaranteed out of range. + *end = str; + if(*str >= 0x30 && *str <= 0x39) { + return ASN_STRTOX_ERROR_RANGE; + } else { + *uintp = value; + return ASN_STRTOX_EXTRA_DATA; + } + } + break; } 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; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + return ASN_STRTOX_ERROR_RANGE; + } + } else { + *end = str; + *uintp = value; + return ASN_STRTOX_EXTRA_DATA; + } + } - *end = str; - *uintp = value; - return ASN_STRTOX_OK; + *end = str; + *uintp = value; + return ASN_STRTOX_OK; } enum asn_strtox_result_e @@ -1650,86 +736,3 @@ INTEGER_compare(const asn_TYPE_descriptor_t *td, const void *aptr, } } - -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/e2sm/lib/INTEGER_aper.c b/e2sm/lib/INTEGER_aper.c new file mode 100644 index 0000000..fc88268 --- /dev/null +++ b/e2sm/lib/INTEGER_aper.c @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 %lld", + value, (long long int)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 %lld", + value, (long long int)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, -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/%zu) lb %lld ub %lld %s", + uval, st->buf[0], st->size, + (long long int)ct->lower_bound, + (long long int)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/%zu) lb %lld ub %lld %s", + value, st->buf[0], st->size, + (long long int)ct->lower_bound, + (long long int)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 (%lld) with range %d bits", + value, (long long int)(value - ct->lower_bound), + ct->range_bits); + + v = value - ct->lower_bound; + + /* #12 <= 8 -> alignment ? */ + int range = ct->upper_bound - ct->lower_bound + 1; + if (ct->range_bits < 8 || (ct->range_bits == 8 && range < 256)) { + 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 %lld", (long long int)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 = aper_put_length(po, -1, -1, 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 && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; + } + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/INTEGER_ber.c b/e2sm/lib/INTEGER_ber.c new file mode 100644 index 0000000..57bfe1e --- /dev/null +++ b/e2sm/lib/INTEGER_ber.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/INTEGER_jer.c b/e2sm/lib/INTEGER_jer.c new file mode 100644 index 0000000..23d7c12 --- /dev/null +++ b/e2sm/lib/INTEGER_jer.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +INTEGER_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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); +} diff --git a/e2sm/lib/INTEGER_oer.c b/e2sm/lib/INTEGER_oer.c index 110689b..19f276d 100644 --- a/e2sm/lib/INTEGER_oer.c +++ b/e2sm/lib/INTEGER_oer.c @@ -3,11 +3,8 @@ * 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, @@ -175,5 +172,3 @@ INTEGER_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/INTEGER_print.c b/e2sm/lib/INTEGER_print.c new file mode 100644 index 0000000..2d37dee --- /dev/null +++ b/e2sm/lib/INTEGER_print.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/INTEGER_rfill.c b/e2sm/lib/INTEGER_rfill.c new file mode 100644 index 0000000..fab0023 --- /dev/null +++ b/e2sm/lib/INTEGER_rfill.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 { + 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; +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + const asn_per_constraints_t *ct; + + 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); + } + } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + } + + 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/e2sm/lib/INTEGER_uper.c b/e2sm/lib/INTEGER_uper.c new file mode 100644 index 0000000..ed65385 --- /dev/null +++ b/e2sm/lib/INTEGER_uper.c @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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(uintmax_t)) + ASN__DECODE_FAILED; + + if(specs && specs->field_unsigned) { + uintmax_t 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_umax2INTEGER(st, uvalue)) + ASN__DECODE_FAILED; + } else { + uintmax_t uvalue = 0; + intmax_t 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_imax_range_unrebase(uvalue, ct->lower_bound, + ct->upper_bound, &svalue) + || asn_imax2INTEGER(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 arithmetic. + */ + 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; + union { + intmax_t s; + uintmax_t u; + } value; + + 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) { + if(asn_INTEGER2umax(st, &value.u)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value.u < (uintmax_t)ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value.u < (uintmax_t)ct->lower_bound + || value.u > (uintmax_t)ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %lu (%02x/%" ASN_PRI_SIZE ") lb %lu ub %lu %s", + value.u, st->buf[0], st->size, + ct->lower_bound, ct->upper_bound, + inext ? "ext" : "fix"); + } else { + if(asn_INTEGER2imax(st, &value.s)) + ASN__ENCODE_FAILED; + /* Check proper range */ + if(ct->flags & APC_SEMI_CONSTRAINED) { + if(value.s < ct->lower_bound) + inext = 1; + } else if(ct->range_bits >= 0) { + if(value.s < ct->lower_bound + || value.s > ct->upper_bound) + inext = 1; + } + ASN_DEBUG("Value %ld (%02x/%" ASN_PRI_SIZE ") lb %ld ub %ld %s", + value.s, 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) { + uintmax_t v; + /* #11.5.6 -> #11.3 */ + if(specs && specs->field_unsigned) { + if(((uintmax_t)ct->lower_bound > (uintmax_t)(ct->upper_bound) + || (value.u < (uintmax_t)ct->lower_bound)) + || (value.u > (uintmax_t)ct->upper_bound)) { + ASN_DEBUG("Value %lu to-be-encoded is outside the bounds [%lu, %lu]!", + value.u, ct->lower_bound, ct->upper_bound); + ASN__ENCODE_FAILED; + } + v = value.u - (uintmax_t)ct->lower_bound; + } else { + if(per_imax_range_rebase(value.s, ct->lower_bound, ct->upper_bound, &v)) { + ASN__ENCODE_FAILED; + } + } + ASN_DEBUG("Encoding integer %lu with range %d bits", + v, ct->range_bits); + 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); +} diff --git a/e2sm/lib/INTEGER_xer.c b/e2sm/lib/INTEGER_xer.c new file mode 100644 index 0000000..4f21c86 --- /dev/null +++ b/e2sm/lib/INTEGER_xer.c @@ -0,0 +1,351 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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_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); +} diff --git a/e2sm/lib/ISO646String.c b/e2sm/lib/ISO646String.c deleted file mode 100644 index f5fc69e..0000000 --- a/e2sm/lib/ISO646String.c +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * 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/e2sm/lib/IndexToRFSP.c b/e2sm/lib/IndexToRFSP.c index 36829da..fa82e0d 100644 --- a/e2sm/lib/IndexToRFSP.c +++ b/e2sm/lib/IndexToRFSP.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "IndexToRFSP.h" @@ -21,7 +21,7 @@ IndexToRFSP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 1 && value <= 256)) { + if((value >= 1L && value <= 256L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ IndexToRFSP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_IndexToRFSP_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_IndexToRFSP_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_IndexToRFSP = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_IndexToRFSP_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_IndexToRFSP_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + IndexToRFSP_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/Interface-MessageID.c b/e2sm/lib/Interface-MessageID.c index da967de..bd836ef 100644 --- a/e2sm/lib/Interface-MessageID.c +++ b/e2sm/lib/Interface-MessageID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "Interface-MessageID.h" @@ -11,11 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_messageType_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_messageType_value2enum_3[] = { { 0, 17, "initiatingMessage" }, { 1, 17, "successfulOutcome" }, @@ -52,7 +59,15 @@ asn_TYPE_descriptor_t asn_DEF_messageType_3 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_messageType_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_messageType_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_messageType_specs_3 /* Additional specs */ }; @@ -63,7 +78,15 @@ static asn_TYPE_member_t asn_MBR_Interface_MessageID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "interfaceProcedureID" }, @@ -72,7 +95,15 @@ static asn_TYPE_member_t asn_MBR_Interface_MessageID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_messageType_3, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "messageType" }, @@ -102,7 +133,15 @@ asn_TYPE_descriptor_t asn_DEF_Interface_MessageID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_Interface_MessageID_1, 2, /* Elements count */ &asn_SPC_Interface_MessageID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceID-E1.c b/e2sm/lib/InterfaceID-E1.c index a98f85b..c282c5a 100644 --- a/e2sm/lib/InterfaceID-E1.c +++ b/e2sm/lib/InterfaceID-E1.c @@ -1,28 +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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceID-E1.h" asn_TYPE_member_t asn_MBR_InterfaceID_E1_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_E1, globalGNB_ID), + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_E1, global_NG_RAN_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalGNB_ID, + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalRANNodeID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "globalGNB-ID" + "global-NG-RAN-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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-UP-ID" }, @@ -31,7 +47,7 @@ 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 | (0 << 2)), 0, 0, 0 }, /* global-NG-RAN-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-CU-UP-ID */ }; asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_E1_specs_1 = { @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceID_E1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InterfaceID_E1_1, 2, /* Elements count */ &asn_SPC_InterfaceID_E1_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceID-F1.c b/e2sm/lib/InterfaceID-F1.c index 4900cb7..9bcb054 100644 --- a/e2sm/lib/InterfaceID-F1.c +++ b/e2sm/lib/InterfaceID-F1.c @@ -1,28 +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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceID-F1.h" asn_TYPE_member_t asn_MBR_InterfaceID_F1_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_F1, globalGNB_ID), + { ATF_NOFLAGS, 0, offsetof(struct InterfaceID_F1, global_NG_RAN_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_GlobalGNB_ID, + +1, /* EXPLICIT tag at current level */ + &asn_DEF_GlobalRANNodeID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ - "globalGNB-ID" + "global-NG-RAN-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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-DU-ID" }, @@ -31,7 +47,7 @@ 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 | (0 << 2)), 0, 0, 0 }, /* global-NG-RAN-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-DU-ID */ }; asn_SEQUENCE_specifics_t asn_SPC_InterfaceID_F1_specs_1 = { @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceID_F1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InterfaceID_F1_1, 2, /* Elements count */ &asn_SPC_InterfaceID_F1_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceID-NG.c b/e2sm/lib/InterfaceID-NG.c index 2083c0f..cd176bb 100644 --- a/e2sm/lib/InterfaceID-NG.c +++ b/e2sm/lib/InterfaceID-NG.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceID-NG.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_InterfaceID_NG_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GUAMI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "guami" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceID_NG = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InterfaceID_NG_1, 1, /* Elements count */ &asn_SPC_InterfaceID_NG_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceID-S1.c b/e2sm/lib/InterfaceID-S1.c index e8e728f..d483c5d 100644 --- a/e2sm/lib/InterfaceID-S1.c +++ b/e2sm/lib/InterfaceID-S1.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceID-S1.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_InterfaceID_S1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GUMMEI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gUMMEI" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceID_S1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InterfaceID_S1_1, 1, /* Elements count */ &asn_SPC_InterfaceID_S1_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceID-W1.c b/e2sm/lib/InterfaceID-W1.c index 37033aa..da9fecc 100644 --- a/e2sm/lib/InterfaceID-W1.c +++ b/e2sm/lib/InterfaceID-W1.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceID-W1.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_InterfaceID_W1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalNgENB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "global-ng-eNB-ID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_InterfaceID_W1_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NGENB_DU_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ng-eNB-DU-ID" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceID_W1 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InterfaceID_W1_1, 2, /* Elements count */ &asn_SPC_InterfaceID_W1_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceID-X2.c b/e2sm/lib/InterfaceID-X2.c index d191871..461f3a6 100644 --- a/e2sm/lib/InterfaceID-X2.c +++ b/e2sm/lib/InterfaceID-X2.c @@ -1,26 +1,41 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceID-X2.h" #include "GlobalENB-ID.h" #include "GlobalenGNB-ID.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_nodeType_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "global-eNB-ID" }, @@ -29,7 +44,15 @@ static asn_TYPE_member_t asn_MBR_nodeType_2[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalenGNB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "global-en-gNB-ID" }, @@ -57,7 +80,15 @@ asn_TYPE_descriptor_t asn_DEF_nodeType_2 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_nodeType_constr_2, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_nodeType_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_nodeType_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_nodeType_2, 2, /* Elements count */ &asn_SPC_nodeType_specs_2 /* Additional specs */ @@ -69,7 +100,15 @@ asn_TYPE_member_t asn_MBR_InterfaceID_X2_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_nodeType_2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "nodeType" }, @@ -98,7 +137,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceID_X2 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InterfaceID_X2_1, 1, /* Elements count */ &asn_SPC_InterfaceID_X2_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceID-Xn.c b/e2sm/lib/InterfaceID-Xn.c index a78a67e..d4ceda6 100644 --- a/e2sm/lib/InterfaceID-Xn.c +++ b/e2sm/lib/InterfaceID-Xn.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceID-Xn.h" @@ -11,9 +11,17 @@ 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, + &asn_DEF_GlobalRANNodeID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "global-NG-RAN-ID" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceID_Xn = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_InterfaceID_Xn_1, 1, /* Elements count */ &asn_SPC_InterfaceID_Xn_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceIdentifier.c b/e2sm/lib/InterfaceIdentifier.c index bc596a5..059ec26 100644 --- a/e2sm/lib/InterfaceIdentifier.c +++ b/e2sm/lib/InterfaceIdentifier.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceIdentifier.h" @@ -14,18 +14,33 @@ #include "InterfaceID-S1.h" #include "InterfaceID-X2.h" #include "InterfaceID-W1.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_InterfaceIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "nG" }, @@ -34,7 +49,15 @@ static asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_InterfaceID_Xn, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "xN" }, @@ -43,7 +66,15 @@ static asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_InterfaceID_F1, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "f1" }, @@ -52,7 +83,15 @@ static asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_InterfaceID_E1, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "e1" }, @@ -61,7 +100,15 @@ static asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_InterfaceID_S1, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "s1" }, @@ -70,7 +117,15 @@ static asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_InterfaceID_X2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "x2" }, @@ -79,7 +134,15 @@ static asn_TYPE_member_t asn_MBR_InterfaceIdentifier_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_InterfaceID_W1, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "w1" }, @@ -111,7 +174,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceIdentifier = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_InterfaceIdentifier_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_InterfaceIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_InterfaceIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_InterfaceIdentifier_1, 7, /* Elements count */ &asn_SPC_InterfaceIdentifier_specs_1 /* Additional specs */ diff --git a/e2sm/lib/InterfaceType.c b/e2sm/lib/InterfaceType.c index 17f3635..cd72ad7 100644 --- a/e2sm/lib/InterfaceType.c +++ b/e2sm/lib/InterfaceType.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "InterfaceType.h" @@ -11,11 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_InterfaceType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_InterfaceType_value2enum_1[] = { { 0, 2, "nG" }, { 1, 2, "xn" }, @@ -58,7 +65,15 @@ asn_TYPE_descriptor_t asn_DEF_InterfaceType = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_InterfaceType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_InterfaceType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_InterfaceType_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/LabelInfoItem.c b/e2sm/lib/LabelInfoItem.c index dafa081..5c5ec3a 100644 --- a/e2sm/lib/LabelInfoItem.c +++ b/e2sm/lib/LabelInfoItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "LabelInfoItem.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_LabelInfoItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementLabel, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measLabel" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_LabelInfoItem = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_LabelInfoItem_1, 1, /* Elements count */ &asn_SPC_LabelInfoItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/LabelInfoList.c b/e2sm/lib/LabelInfoList.c index 9d7e620..7b3355a 100644 --- a/e2sm/lib/LabelInfoList.c +++ b/e2sm/lib/LabelInfoList.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "LabelInfoList.h" #include "LabelInfoItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_LabelInfoList_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..2147483647)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_LabelInfoList = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_LabelInfoList_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_LabelInfoList_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_LabelInfoList_1, 1, /* Single element */ &asn_SPC_LabelInfoList_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MME-Code.c b/e2sm/lib/MME-Code.c index d110616..3046b25 100644 --- a/e2sm/lib/MME-Code.c +++ b/e2sm/lib/MME-Code.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MME-Code.h" @@ -22,7 +22,7 @@ MME_Code_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 1)) { + if((size == 1UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ MME_Code_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MME_Code_constr_1 CC_NOTUSED = { + { 0, 0 }, + 1 /* (SIZE(1..1)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_MME_Code_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_MME_Code = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MME_Code_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MME_Code_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + MME_Code_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/MME-Group-ID.c b/e2sm/lib/MME-Group-ID.c index 1136961..5bf992c 100644 --- a/e2sm/lib/MME-Group-ID.c +++ b/e2sm/lib/MME-Group-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MME-Group-ID.h" @@ -22,7 +22,7 @@ MME_Group_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 2)) { + if((size == 2UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ MME_Group_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MME_Group_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 2 /* (SIZE(2..2)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_MME_Group_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_MME_Group_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MME_Group_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MME_Group_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + MME_Group_ID_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/MME-UE-S1AP-ID.c b/e2sm/lib/MME-UE-S1AP-ID.c index 7677024..f24873c 100644 --- a/e2sm/lib/MME-UE-S1AP-ID.c +++ b/e2sm/lib/MME-UE-S1AP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MME-UE-S1AP-ID.h" @@ -27,11 +27,18 @@ MME_UE_S1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MME_UE_S1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ const asn_INTEGER_specifics_t asn_SPC_MME_UE_S1AP_ID_specs_1 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -50,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MME_UE_S1AP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MME_UE_S1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MME_UE_S1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + MME_UE_S1AP_ID_constraint + }, 0, 0, /* No members */ &asn_SPC_MME_UE_S1AP_ID_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/MatchingCondItem.c b/e2sm/lib/MatchingCondItem.c index 89f4378..3dfe53c 100644 --- a/e2sm/lib/MatchingCondItem.c +++ b/e2sm/lib/MatchingCondItem.c @@ -1,26 +1,41 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MatchingCondItem.h" #include "MeasurementLabel.h" #include "TestCondInfo.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MatchingCondItem_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measLabel" }, @@ -29,7 +44,15 @@ asn_TYPE_member_t asn_MBR_MatchingCondItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_TestCondInfo, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "testCondInfo" }, @@ -56,7 +79,15 @@ asn_TYPE_descriptor_t asn_DEF_MatchingCondItem = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_MatchingCondItem_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MatchingCondItem_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MatchingCondItem_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_MatchingCondItem_1, 2, /* Elements count */ &asn_SPC_MatchingCondItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MatchingCondList.c b/e2sm/lib/MatchingCondList.c index 7ccd78f..5292d9b 100644 --- a/e2sm/lib/MatchingCondList.c +++ b/e2sm/lib/MatchingCondList.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MatchingCondList.h" #include "MatchingCondItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MatchingCondList_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32768)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ asn_TYPE_member_t asn_MBR_MatchingCondList_1[] = { { ATF_POINTER, 0, 0, -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_MatchingCondItem, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MatchingCondList = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MatchingCondList_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MatchingCondList_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MatchingCondList_1, 1, /* Single element */ &asn_SPC_MatchingCondList_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MatchingUEidItem.c b/e2sm/lib/MatchingUEidItem.c index 361848c..cc9245b 100644 --- a/e2sm/lib/MatchingUEidItem.c +++ b/e2sm/lib/MatchingUEidItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MatchingUEidItem.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_MatchingUEidItem_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_UEID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ueID" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_MatchingUEidItem = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_MatchingUEidItem_1, 1, /* Elements count */ &asn_SPC_MatchingUEidItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MatchingUEidList.c b/e2sm/lib/MatchingUEidList.c index d01eaa2..1647f3f 100644 --- a/e2sm/lib/MatchingUEidList.c +++ b/e2sm/lib/MatchingUEidList.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MatchingUEidList.h" #include "MatchingUEidItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MatchingUEidList_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MatchingUEidList = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MatchingUEidList_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MatchingUEidList_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MatchingUEidList_1, 1, /* Single element */ &asn_SPC_MatchingUEidList_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementCondItem.c b/e2sm/lib/MeasurementCondItem.c index 3d63e9d..18546a9 100644 --- a/e2sm/lib/MeasurementCondItem.c +++ b/e2sm/lib/MeasurementCondItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementCondItem.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_MeasurementCondItem_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_MeasurementType, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measType" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_MeasurementCondItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MatchingCondList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "matchingCond" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementCondItem = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_MeasurementCondItem_1, 2, /* Elements count */ &asn_SPC_MeasurementCondItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementCondList.c b/e2sm/lib/MeasurementCondList.c index 981bc8f..aa38feb 100644 --- a/e2sm/lib/MeasurementCondList.c +++ b/e2sm/lib/MeasurementCondList.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementCondList.h" #include "MeasurementCondItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementCondList_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementCondList = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementCondList_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementCondList_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MeasurementCondList_1, 1, /* Single element */ &asn_SPC_MeasurementCondList_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementCondUEidItem.c b/e2sm/lib/MeasurementCondUEidItem.c index e3a6fca..5763413 100644 --- a/e2sm/lib/MeasurementCondUEidItem.c +++ b/e2sm/lib/MeasurementCondUEidItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementCondUEidItem.h" @@ -14,7 +14,15 @@ asn_TYPE_member_t asn_MBR_MeasurementCondUEidItem_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_MeasurementType, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measType" }, @@ -23,7 +31,15 @@ asn_TYPE_member_t asn_MBR_MeasurementCondUEidItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MatchingCondList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "matchingCond" }, @@ -32,7 +48,15 @@ asn_TYPE_member_t asn_MBR_MeasurementCondUEidItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MatchingUEidList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "matchingUEidList" }, @@ -65,7 +89,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementCondUEidItem = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_MeasurementCondUEidItem_1, 3, /* Elements count */ &asn_SPC_MeasurementCondUEidItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementCondUEidList.c b/e2sm/lib/MeasurementCondUEidList.c index 8f9c71c..7a953fe 100644 --- a/e2sm/lib/MeasurementCondUEidList.c +++ b/e2sm/lib/MeasurementCondUEidList.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementCondUEidList.h" #include "MeasurementCondUEidItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementCondUEidList_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementCondUEidList = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementCondUEidList_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementCondUEidList_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MeasurementCondUEidList_1, 1, /* Single element */ &asn_SPC_MeasurementCondUEidList_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementData.c b/e2sm/lib/MeasurementData.c index 0a6cb94..b6e3cbe 100644 --- a/e2sm/lib/MeasurementData.c +++ b/e2sm/lib/MeasurementData.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementData.h" #include "MeasurementDataItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementData_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementData = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementData_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementData_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MeasurementData_1, 1, /* Single element */ &asn_SPC_MeasurementData_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementDataItem.c b/e2sm/lib/MeasurementDataItem.c index 4c3ad22..063c3b1 100644 --- a/e2sm/lib/MeasurementDataItem.c +++ b/e2sm/lib/MeasurementDataItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementDataItem.h" @@ -11,11 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_incompleteFlag_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_incompleteFlag_value2enum_3[] = { { 0, 4, "true" } /* This list is extensible */ @@ -48,7 +55,15 @@ asn_TYPE_descriptor_t asn_DEF_incompleteFlag_3 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_incompleteFlag_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_incompleteFlag_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_incompleteFlag_specs_3 /* Additional specs */ }; @@ -59,7 +74,15 @@ asn_TYPE_member_t asn_MBR_MeasurementDataItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementRecord, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measRecord" }, @@ -68,7 +91,15 @@ asn_TYPE_member_t asn_MBR_MeasurementDataItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_incompleteFlag_3, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "incompleteFlag" }, @@ -100,7 +131,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementDataItem = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_MeasurementDataItem_1, 2, /* Elements count */ &asn_SPC_MeasurementDataItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementInfo-Action-Item.c b/e2sm/lib/MeasurementInfo-Action-Item.c index 76f69bd..7dc6d2c 100644 --- a/e2sm/lib/MeasurementInfo-Action-Item.c +++ b/e2sm/lib/MeasurementInfo-Action-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementInfo-Action-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_MeasurementInfo_Action_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementTypeName, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measName" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_MeasurementInfo_Action_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementTypeID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measID" }, @@ -54,7 +70,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementInfo_Action_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_MeasurementInfo_Action_Item_1, 2, /* Elements count */ &asn_SPC_MeasurementInfo_Action_Item_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementInfo-Action-List.c b/e2sm/lib/MeasurementInfo-Action-List.c index 19eb2cb..65611d1 100644 --- a/e2sm/lib/MeasurementInfo-Action-List.c +++ b/e2sm/lib/MeasurementInfo-Action-List.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementInfo-Action-List.h" #include "MeasurementInfo-Action-Item.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementInfo_Action_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementInfo_Action_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementInfo_Action_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementInfo_Action_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MeasurementInfo_Action_List_1, 1, /* Single element */ &asn_SPC_MeasurementInfo_Action_List_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementInfoItem.c b/e2sm/lib/MeasurementInfoItem.c index a3f9433..3d770f7 100644 --- a/e2sm/lib/MeasurementInfoItem.c +++ b/e2sm/lib/MeasurementInfoItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementInfoItem.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_MeasurementInfoItem_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_MeasurementType, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measType" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_MeasurementInfoItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_LabelInfoList, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "labelInfoList" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementInfoItem = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_MeasurementInfoItem_1, 2, /* Elements count */ &asn_SPC_MeasurementInfoItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementInfoList.c b/e2sm/lib/MeasurementInfoList.c index c3861f2..22a1324 100644 --- a/e2sm/lib/MeasurementInfoList.c +++ b/e2sm/lib/MeasurementInfoList.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementInfoList.h" #include "MeasurementInfoItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementInfoList_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..65535)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementInfoList = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementInfoList_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementInfoList_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MeasurementInfoList_1, 1, /* Single element */ &asn_SPC_MeasurementInfoList_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementLabel.c b/e2sm/lib/MeasurementLabel.c index 6283b1c..6b12042 100644 --- a/e2sm/lib/MeasurementLabel.c +++ b/e2sm/lib/MeasurementLabel.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementLabel.h" @@ -50,7 +50,7 @@ memb_aRPmax_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 1 && value <= 15)) { + if((value >= 1L && value <= 15L)) { /* Constraint check succeeded */ return 0; } else { @@ -75,7 +75,7 @@ memb_aRPmin_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 1 && value <= 15)) { + if((value >= 1L && value <= 15L)) { /* Constraint check succeeded */ return 0; } else { @@ -100,7 +100,7 @@ memb_bitrateRange_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr value = *(const long *)sptr; - if((value >= 1 && value <= 65535)) { + if((value >= 1L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -125,7 +125,7 @@ memb_layerMU_MIMO_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr value = *(const long *)sptr; - if((value >= 1 && value <= 65535)) { + if((value >= 1L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -150,7 +150,7 @@ memb_distBinX_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 1 && value <= 65535)) { + if((value >= 1L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -175,7 +175,7 @@ memb_distBinY_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 1 && value <= 65535)) { + if((value >= 1L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -200,7 +200,7 @@ memb_distBinZ_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 1 && value <= 65535)) { + if((value >= 1L && value <= 65535L)) { /* Constraint check succeeded */ return 0; } else { @@ -211,76 +211,174 @@ memb_distBinZ_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_noLabel_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_sUM_constr_16 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_preLabelOverride_constr_22 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_startEndInd_constr_25 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_min_constr_29 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_max_constr_32 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_avg_constr_35 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_aRPmax_constr_12 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_aRPmin_constr_13 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_bitrateRange_constr_14 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_layerMU_MIMO_constr_15 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_distBinX_constr_19 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_distBinY_constr_20 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_distBinZ_constr_21 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_noLabel_value2enum_2[] = { { 0, 4, "true" } /* This list is extensible */ @@ -313,7 +411,15 @@ asn_TYPE_descriptor_t asn_DEF_noLabel_2 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_noLabel_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_noLabel_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_noLabel_specs_2 /* Additional specs */ }; @@ -350,7 +456,15 @@ asn_TYPE_descriptor_t asn_DEF_sUM_16 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_sUM_constr_16, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_sUM_constr_16, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_sUM_specs_16 /* Additional specs */ }; @@ -387,7 +501,15 @@ asn_TYPE_descriptor_t asn_DEF_preLabelOverride_22 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_preLabelOverride_constr_22, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_preLabelOverride_constr_22, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_preLabelOverride_specs_22 /* Additional specs */ }; @@ -426,7 +548,15 @@ asn_TYPE_descriptor_t asn_DEF_startEndInd_25 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_startEndInd_constr_25, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_startEndInd_constr_25, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_startEndInd_specs_25 /* Additional specs */ }; @@ -463,7 +593,15 @@ asn_TYPE_descriptor_t asn_DEF_min_29 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_min_constr_29, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_min_constr_29, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_min_specs_29 /* Additional specs */ }; @@ -500,7 +638,15 @@ asn_TYPE_descriptor_t asn_DEF_max_32 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_max_constr_32, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_max_constr_32, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_max_specs_32 /* Additional specs */ }; @@ -537,7 +683,15 @@ asn_TYPE_descriptor_t asn_DEF_avg_35 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_avg_constr_35, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_avg_constr_35, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_avg_specs_35 /* Additional specs */ }; @@ -548,7 +702,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_noLabel_2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "noLabel" }, @@ -557,7 +719,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "plmnID" }, @@ -566,7 +736,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_S_NSSAI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "sliceID" }, @@ -575,7 +753,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_FiveQI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "fiveQI" }, @@ -584,7 +770,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_QosFlowIdentifier, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "qFI" }, @@ -593,7 +787,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_QCI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "qCI" }, @@ -602,7 +804,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_QCI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "qCImax" }, @@ -611,7 +821,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_QCI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "qCImin" }, @@ -620,7 +838,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, &asn_PER_memb_aRPmax_constr_12, memb_aRPmax_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_aRPmax_constr_12, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_aRPmax_constr_12, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_aRPmax_constraint_1 + }, 0, 0, /* No default value */ "aRPmax" }, @@ -629,7 +855,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, &asn_PER_memb_aRPmin_constr_13, memb_aRPmin_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_aRPmin_constr_13, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_aRPmin_constr_13, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_aRPmin_constraint_1 + }, 0, 0, /* No default value */ "aRPmin" }, @@ -638,7 +872,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, &asn_PER_memb_bitrateRange_constr_14, memb_bitrateRange_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_bitrateRange_constr_14, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_bitrateRange_constr_14, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_bitrateRange_constraint_1 + }, 0, 0, /* No default value */ "bitrateRange" }, @@ -647,7 +889,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, &asn_PER_memb_layerMU_MIMO_constr_15, memb_layerMU_MIMO_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_layerMU_MIMO_constr_15, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_layerMU_MIMO_constr_15, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_layerMU_MIMO_constraint_1 + }, 0, 0, /* No default value */ "layerMU-MIMO" }, @@ -656,7 +906,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_sUM_16, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "sUM" }, @@ -665,7 +923,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, &asn_PER_memb_distBinX_constr_19, memb_distBinX_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_distBinX_constr_19, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_distBinX_constr_19, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_distBinX_constraint_1 + }, 0, 0, /* No default value */ "distBinX" }, @@ -674,7 +940,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, &asn_PER_memb_distBinY_constr_20, memb_distBinY_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_distBinY_constr_20, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_distBinY_constr_20, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_distBinY_constraint_1 + }, 0, 0, /* No default value */ "distBinY" }, @@ -683,7 +957,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, &asn_PER_memb_distBinZ_constr_21, memb_distBinZ_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_distBinZ_constr_21, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_distBinZ_constr_21, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_distBinZ_constraint_1 + }, 0, 0, /* No default value */ "distBinZ" }, @@ -692,7 +974,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_preLabelOverride_22, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "preLabelOverride" }, @@ -701,7 +991,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_startEndInd_25, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "startEndInd" }, @@ -710,7 +1008,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_min_29, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "min" }, @@ -719,7 +1025,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_max_32, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "max" }, @@ -728,7 +1042,15 @@ asn_TYPE_member_t asn_MBR_MeasurementLabel_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_avg_35, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "avg" }, @@ -779,7 +1101,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementLabel = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_MeasurementLabel_1, 21, /* Elements count */ &asn_SPC_MeasurementLabel_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementRecord.c b/e2sm/lib/MeasurementRecord.c index e8bdb53..8885f9e 100644 --- a/e2sm/lib/MeasurementRecord.c +++ b/e2sm/lib/MeasurementRecord.c @@ -1,25 +1,40 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementRecord.h" #include "MeasurementRecordItem.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementRecord_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..2147483647)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ asn_TYPE_member_t asn_MBR_MeasurementRecord_1[] = { { ATF_POINTER, 0, 0, -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_MeasurementRecordItem, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementRecord = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementRecord_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementRecord_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, asn_MBR_MeasurementRecord_1, 1, /* Single element */ &asn_SPC_MeasurementRecord_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementRecordItem.c b/e2sm/lib/MeasurementRecordItem.c index d415c59..487ead6 100644 --- a/e2sm/lib/MeasurementRecordItem.c +++ b/e2sm/lib/MeasurementRecordItem.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementRecordItem.h" @@ -43,21 +43,42 @@ memb_integer_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, return 0; } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_integer_constr_2 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_integer_constr_2 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementRecordItem_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_specifics_t asn_SPC_integer_specs_2 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -78,7 +99,15 @@ asn_TYPE_descriptor_t asn_DEF_integer_2 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_integer_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_integer_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + integer_2_constraint + }, 0, 0, /* No members */ &asn_SPC_integer_specs_2 /* Additional specs */ }; @@ -89,7 +118,15 @@ asn_TYPE_member_t asn_MBR_MeasurementRecordItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_integer_2, 0, - { 0, &asn_PER_memb_integer_constr_2, memb_integer_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_integer_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_integer_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_integer_constraint_1 + }, 0, 0, /* No default value */ "integer" }, @@ -98,7 +135,15 @@ asn_TYPE_member_t asn_MBR_MeasurementRecordItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeReal, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "real" }, @@ -107,7 +152,15 @@ asn_TYPE_member_t asn_MBR_MeasurementRecordItem_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NULL, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "noValue" }, @@ -135,7 +188,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementRecordItem = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_MeasurementRecordItem_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementRecordItem_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementRecordItem_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_MeasurementRecordItem_1, 3, /* Elements count */ &asn_SPC_MeasurementRecordItem_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementType.c b/e2sm/lib/MeasurementType.c index e3f65c9..2392989 100644 --- a/e2sm/lib/MeasurementType.c +++ b/e2sm/lib/MeasurementType.c @@ -1,24 +1,39 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementType.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measName" }, @@ -27,7 +42,15 @@ asn_TYPE_member_t asn_MBR_MeasurementType_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementTypeID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measID" }, @@ -54,7 +77,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementType = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_MeasurementType_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_MeasurementType_1, 2, /* Elements count */ &asn_SPC_MeasurementType_specs_1 /* Additional specs */ diff --git a/e2sm/lib/MeasurementTypeID.c b/e2sm/lib/MeasurementTypeID.c index 9efb8ec..308db3a 100644 --- a/e2sm/lib/MeasurementTypeID.c +++ b/e2sm/lib/MeasurementTypeID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementTypeID.h" @@ -21,7 +21,7 @@ MeasurementTypeID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 1 && value <= 65536)) { + if((value >= 1L && value <= 65536L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ MeasurementTypeID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementTypeID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_MeasurementTypeID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementTypeID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementTypeID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementTypeID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + MeasurementTypeID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/MeasurementTypeName.c b/e2sm/lib/MeasurementTypeName.c index 978f59c..961108b 100644 --- a/e2sm/lib/MeasurementTypeName.c +++ b/e2sm/lib/MeasurementTypeName.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "MeasurementTypeName.h" @@ -54,7 +54,7 @@ MeasurementTypeName_constraint(const asn_TYPE_descriptor_t *td, const void *sptr size = st->size; - if((size >= 1 && size <= 150) + if((size >= 1UL && size <= 150UL) && !check_permitted_alphabet_1(st)) { /* Constraint check succeeded */ return 0; @@ -80,12 +80,19 @@ static int asn_PER_MAP_MeasurementTypeName_1_c2v(unsigned int code) { * This type is implemented using PrintableString, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_MeasurementTypeName_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_MeasurementTypeName_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) }; @@ -99,7 +106,15 @@ asn_TYPE_descriptor_t asn_DEF_MeasurementTypeName = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_MeasurementTypeName_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_MeasurementTypeName_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + MeasurementTypeName_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/NG-RANnodeUEXnAPID.c b/e2sm/lib/NG-RANnodeUEXnAPID.c index 1541b4e..bb21b01 100644 --- a/e2sm/lib/NG-RANnodeUEXnAPID.c +++ b/e2sm/lib/NG-RANnodeUEXnAPID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NG-RANnodeUEXnAPID.h" @@ -27,11 +27,18 @@ NG_RANnodeUEXnAPID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_NG_RANnodeUEXnAPID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ const asn_INTEGER_specifics_t asn_SPC_NG_RANnodeUEXnAPID_specs_1 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -50,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_NG_RANnodeUEXnAPID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_NG_RANnodeUEXnAPID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_NG_RANnodeUEXnAPID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NG_RANnodeUEXnAPID_constraint + }, 0, 0, /* No members */ &asn_SPC_NG_RANnodeUEXnAPID_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/NGENB-CU-UE-W1AP-ID.c b/e2sm/lib/NGENB-CU-UE-W1AP-ID.c index 2859907..7526f9b 100644 --- a/e2sm/lib/NGENB-CU-UE-W1AP-ID.c +++ b/e2sm/lib/NGENB-CU-UE-W1AP-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NGENB-CU-UE-W1AP-ID.h" @@ -27,11 +27,18 @@ NGENB_CU_UE_W1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_NGENB_CU_UE_W1AP_ID_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ const asn_INTEGER_specifics_t asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1 = { 0, 0, 0, 0, 0, 0, /* Native long size */ @@ -50,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_NGENB_CU_UE_W1AP_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_NGENB_CU_UE_W1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_NGENB_CU_UE_W1AP_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NGENB_CU_UE_W1AP_ID_constraint + }, 0, 0, /* No members */ &asn_SPC_NGENB_CU_UE_W1AP_ID_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/NGENB-DU-ID.c b/e2sm/lib/NGENB-DU-ID.c index 5bfea48..c1e9f04 100644 --- a/e2sm/lib/NGENB-DU-ID.c +++ b/e2sm/lib/NGENB-DU-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NGENB-DU-ID.h" @@ -27,7 +27,7 @@ NGENB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - if((value >= 0 && value <= 68719476735)) { + if((value >= 0L && value <= 68719476735L)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ NGENB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using INTEGER, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_NGENB_DU_ID_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..68719476735) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_NGENB_DU_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_NGENB_DU_ID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_NGENB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_NGENB_DU_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NGENB_DU_ID_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/NI-Type.c b/e2sm/lib/NI-Type.c deleted file mode 100644 index 7045c05..0000000 --- a/e2sm/lib/NI-Type.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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/e2sm/lib/NR-ARFCN.c b/e2sm/lib/NR-ARFCN.c index 166f4f6..9d34d5b 100644 --- a/e2sm/lib/NR-ARFCN.c +++ b/e2sm/lib/NR-ARFCN.c @@ -1,12 +1,13 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NR-ARFCN.h" +#include "FreqBandNrItem.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) { @@ -21,7 +22,7 @@ memb_nRARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 3279165)) { + if((value >= 0L && value <= 3279165L)) { /* Constraint check succeeded */ return 0; } else { @@ -32,35 +33,171 @@ memb_nRARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, } } +static int +memb_freqBandListNr_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 >= 1UL && size <= 32UL)) { + /* Perform validation of the inner elements */ + return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_freqBandListNr_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_freqBandListNr_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_nRARFCN_constr_2 CC_NOTUSED = { + { 4, 1 } /* (0..3279165) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_freqBandListNr_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_freqBandListNr_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 */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_freqBandListNr_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_FreqBandNrItem, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_freqBandListNr_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_freqBandListNr_specs_3 = { + sizeof(struct NR_ARFCN__freqBandListNr), + offsetof(struct NR_ARFCN__freqBandListNr, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_freqBandListNr_3 = { + "freqBandListNr", + "freqBandListNr", + &asn_OP_SEQUENCE_OF, + asn_DEF_freqBandListNr_tags_3, + sizeof(asn_DEF_freqBandListNr_tags_3) + /sizeof(asn_DEF_freqBandListNr_tags_3[0]) - 1, /* 1 */ + asn_DEF_freqBandListNr_tags_3, /* Same as above */ + sizeof(asn_DEF_freqBandListNr_tags_3) + /sizeof(asn_DEF_freqBandListNr_tags_3[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_freqBandListNr_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_freqBandListNr_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_freqBandListNr_3, + 1, /* Single element */ + &asn_SPC_freqBandListNr_specs_3 /* Additional specs */ +}; + 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_nRARFCN_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_nRARFCN_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_nRARFCN_constraint_1 + }, 0, 0, /* No default value */ "nRARFCN" }, + { ATF_NOFLAGS, 0, offsetof(struct NR_ARFCN, freqBandListNr), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_freqBandListNr_3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_freqBandListNr_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_freqBandListNr_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_freqBandListNr_constraint_1 + }, + 0, 0, /* No default value */ + "freqBandListNr" + }, }; 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_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRARFCN */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* freqBandListNr */ }; 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 */ + 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ + 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_NR_ARFCN = { "NR-ARFCN", @@ -72,9 +209,17 @@ asn_TYPE_descriptor_t asn_DEF_NR_ARFCN = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_NR_ARFCN_1, - 1, /* Elements count */ + 2, /* Elements count */ &asn_SPC_NR_ARFCN_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/NR-CGI.c b/e2sm/lib/NR-CGI.c index d5cb1c4..7306f48 100644 --- a/e2sm/lib/NR-CGI.c +++ b/e2sm/lib/NR-CGI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NR-CGI.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_NR_CGI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PLMNIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "pLMNIdentity" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_NR_CGI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NRCellIdentity, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "nRCellIdentity" }, @@ -52,7 +68,15 @@ asn_TYPE_descriptor_t asn_DEF_NR_CGI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_NR_CGI_1, 2, /* Elements count */ &asn_SPC_NR_CGI_specs_1 /* Additional specs */ diff --git a/e2sm/lib/NR-PCI.c b/e2sm/lib/NR-PCI.c index 8a0f74a..a7c8d05 100644 --- a/e2sm/lib/NR-PCI.c +++ b/e2sm/lib/NR-PCI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NR-PCI.h" @@ -21,7 +21,7 @@ NR_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 1007)) { + if((value >= 0L && value <= 1007L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ NR_PCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_NR_PCI_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..1007) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_NR_PCI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_NR_PCI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_NR_PCI_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_NR_PCI_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NR_PCI_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/NRCGI.c b/e2sm/lib/NRCGI.c deleted file mode 100644 index 74780d4..0000000 --- a/e2sm/lib/NRCGI.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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/e2sm/lib/NRCellIdentity.c b/e2sm/lib/NRCellIdentity.c index 601fd16..7356d89 100644 --- a/e2sm/lib/NRCellIdentity.c +++ b/e2sm/lib/NRCellIdentity.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NRCellIdentity.h" @@ -27,7 +27,7 @@ NRCellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = 0; } - if((size == 36)) { + if((size == 36UL)) { /* Constraint check succeeded */ return 0; } else { @@ -42,11 +42,18 @@ NRCellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_NRCellIdentity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 36 /* (SIZE(36..36)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_NRCellIdentity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_NRCellIdentity = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_NRCellIdentity_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_NRCellIdentity_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NRCellIdentity_constraint + }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/NRFrequencyBand-List.c b/e2sm/lib/NRFrequencyBand-List.c deleted file mode 100644 index 3245541..0000000 --- a/e2sm/lib/NRFrequencyBand-List.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/lib/NRFrequencyBandItem.c b/e2sm/lib/NRFrequencyBandItem.c deleted file mode 100644 index 1d2f2bc..0000000 --- a/e2sm/lib/NRFrequencyBandItem.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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/e2sm/lib/NRFrequencyInfo.c b/e2sm/lib/NRFrequencyInfo.c deleted file mode 100644 index dfc4dbb..0000000 --- a/e2sm/lib/NRFrequencyInfo.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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/e2sm/lib/NRFrequencyShift7p5khz.c b/e2sm/lib/NRFrequencyShift7p5khz.c deleted file mode 100644 index d79fbfd..0000000 --- a/e2sm/lib/NRFrequencyShift7p5khz.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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/e2sm/lib/NULL.c b/e2sm/lib/NULL.c index 4a2914f..d160e69 100644 --- a/e2sm/lib/NULL.c +++ b/e2sm/lib/NULL.c @@ -3,114 +3,105 @@ * Redistribution and modifications are permitted subject to BSD license. */ #include -#include #include -#include /* Implemented in terms of BOOLEAN type */ /* * NULL basic type description. */ static const ber_tlv_tag_t asn_DEF_NULL_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) }; asn_TYPE_operation_t asn_OP_NULL = { - BOOLEAN_free, - NULL_print, - NULL_compare, - BOOLEAN_decode_ber, /* Implemented in terms of BOOLEAN */ - NULL_encode_der, /* Special handling of DER encoding */ - NULL_decode_xer, - NULL_encode_xer, -#ifdef ASN_DISABLE_OER_SUPPORT - 0, - 0, + NULL_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + NULL_print, #else - NULL_decode_oer, - NULL_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + NULL_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + NULL_decode_ber, + NULL_encode_der, /* Special handling of DER encoding */ #else - NULL_decode_uper, /* Unaligned PER decoder */ - NULL_encode_uper, /* Unaligned PER encoder */ - NULL_decode_aper, /* Aligned PER decoder */ - NULL_encode_aper, /* Aligned PER encoder */ -#endif /* ASN_DISABLE_PER_SUPPORT */ - NULL_random_fill, - 0 /* Use generic outmost tag fetcher */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + NULL_decode_xer, + NULL_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + NULL_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + NULL_decode_oer, + NULL_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + NULL_decode_uper, /* Unaligned PER decoder */ + NULL_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + NULL_decode_aper, /* Aligned PER decoder */ + NULL_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + NULL_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_NULL = { - "NULL", - "NULL", - &asn_OP_NULL, - asn_DEF_NULL_tags, - sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), - asn_DEF_NULL_tags, /* Same as above */ - sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), - { 0, 0, asn_generic_no_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + "NULL", + "NULL", + &asn_OP_NULL, + asn_DEF_NULL_tags, + sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), + asn_DEF_NULL_tags, /* Same as above */ + sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_no_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ }; -asn_enc_rval_t -NULL_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_enc_rval_t erval = {0,0,0}; - - erval.encoded = der_write_tags(td, 0, tag_mode, 0, tag, cb, app_key); - if(erval.encoded == -1) { - erval.failed_type = td; - erval.structure_ptr = ptr; - } - - ASN__ENCODED_OK(erval); -} - -asn_enc_rval_t -NULL_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}; - - (void)td; - (void)sptr; - (void)ilevel; - (void)flags; - (void)cb; - (void)app_key; - - /* XMLNullValue is empty */ - er.encoded = 0; - ASN__ENCODED_OK(er); -} - - -static enum xer_pbd_rval -NULL__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, - const void *chunk_buf, size_t chunk_size) { - (void)td; - (void)sptr; - (void)chunk_buf; /* Going to be empty according to the rules below. */ - - /* - * There must be no content in self-terminating tag. - */ - if(chunk_size) - return XPBD_BROKEN_ENCODING; - else - return XPBD_BODY_CONSUMED; -} - -asn_dec_rval_t -NULL_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(NULL_t), opt_mname, buf_ptr, size, - NULL__xer_body_decode); +void +NULL_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(NULL_t)); + break; + } + } } int @@ -120,180 +111,3 @@ NULL_compare(const asn_TYPE_descriptor_t *td, const void *a, const void *b) { (void)b; return 0; } - -int -NULL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, - asn_app_consume_bytes_f *cb, void *app_key) { - (void)td; /* Unused argument */ - (void)ilevel; /* Unused argument */ - - if(sptr) { - return (cb("", 9, app_key) < 0) ? -1 : 0; - } else { - return (cb("", 8, app_key) < 0) ? -1 : 0; - } -} - -#ifndef ASN_DISABLE_OER_SUPPORT - -asn_dec_rval_t -NULL_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 rv = {RC_OK, 0}; - (void)opt_codec_ctx; - (void)td; - (void)constraints; - (void)ptr; - (void)size; - - if(!*sptr) { - *sptr = MALLOC(sizeof(NULL_t)); - if(*sptr) { - *(NULL_t *)*sptr = 0; - } else { - ASN__DECODE_FAILED; - } - } - - return rv; -} - -asn_enc_rval_t -NULL_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}; - - (void)td; - (void)sptr; - (void)constraints; - (void)cb; - (void)app_key; - - er.encoded = 0; /* Encoding in 0 bytes. */ - - ASN__ENCODED_OK(er); -} - -#endif /* ASN_DISABLE_OER_SUPPORT */ - -#ifndef ASN_DISABLE_PER_SUPPORT - -asn_dec_rval_t -NULL_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; - - (void)opt_codec_ctx; - (void)td; - (void)constraints; - (void)pd; - - if(!*sptr) { - *sptr = MALLOC(sizeof(NULL_t)); - if(*sptr) { - *(NULL_t *)*sptr = 0; - } else { - ASN__DECODE_FAILED; - } - } - - /* - * NULL type does not have content octets. - */ - - rv.code = RC_OK; - rv.consumed = 0; - return rv; -} - -asn_enc_rval_t -NULL_encode_uper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, const void *sptr, - asn_per_outp_t *po) { - asn_enc_rval_t er = {0,0,0}; - - (void)td; - (void)constraints; - (void)sptr; - (void)po; - - er.encoded = 0; - ASN__ENCODED_OK(er); -} - -asn_dec_rval_t -NULL_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}; - - (void)opt_codec_ctx; - (void)td; - (void)constraints; - (void)pd; - - if(!*sptr) { - *sptr = MALLOC(sizeof(NULL_t)); - if(*sptr) { - *(NULL_t *)*sptr = 0; - } else { - ASN__DECODE_FAILED; - } - } - - /* - * NULL type does not have content octets. - */ - - rv.code = RC_OK; - rv.consumed = 0; - return rv; -} - - -asn_enc_rval_t -NULL_encode_aper(const asn_TYPE_descriptor_t *td, - const asn_per_constraints_t *constraints, - const void *sptr, asn_per_outp_t *po) { - asn_enc_rval_t er = {0,0,0}; - - (void)td; - (void)constraints; - (void)sptr; - (void)po; - - er.encoded = 0; - ASN__ENCODED_OK(er); -} - -#endif /* ASN_DISABLE_PER_SUPPORT */ - -asn_random_fill_result_t -NULL_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, - const asn_encoding_constraints_t *constr, - 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}; - NULL_t *st = *sptr; - - (void)td; - (void)constr; - - if(max_length == 0) return result_skipped; - - if(st == NULL) { - st = (NULL_t *)(*sptr = CALLOC(1, sizeof(*st))); - if(st == NULL) { - return result_failed; - } - } - - return result_ok; -} - diff --git a/e2sm/lib/NULL_aper.c b/e2sm/lib/NULL_aper.c new file mode 100644 index 0000000..5176880 --- /dev/null +++ b/e2sm/lib/NULL_aper.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_dec_rval_t +NULL_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}; + + (void)opt_codec_ctx; + (void)td; + (void)constraints; + (void)pd; + + if(!*sptr) { + *sptr = MALLOC(sizeof(NULL_t)); + if(*sptr) { + *(NULL_t *)*sptr = 0; + } else { + ASN__DECODE_FAILED; + } + } + + /* + * NULL type does not have content octets. + */ + + rv.code = RC_OK; + rv.consumed = 0; + return rv; +} + + +asn_enc_rval_t +NULL_encode_aper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, + const void *sptr, asn_per_outp_t *po) { + asn_enc_rval_t er = {0,0,0}; + + (void)td; + (void)constraints; + (void)sptr; + (void)po; + + er.encoded = 0; + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/NULL_ber.c b/e2sm/lib/NULL_ber.c new file mode 100644 index 0000000..38c85c9 --- /dev/null +++ b/e2sm/lib/NULL_ber.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Decode NULL type. + */ +asn_dec_rval_t +NULL_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) { + NULL_t *st = (NULL_t *)*bool_value; + asn_dec_rval_t rval; + ber_tlv_len_t length; + + if(st == NULL) { + st = (NULL_t *)(*bool_value = CALLOC(1, sizeof(*st))); + if(st == NULL) { + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + } + + ASN_DEBUG("Decoding %s as NULL (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; + } + + // X.690-201508, #8.8.2, length shall be zero. + if(length != 0) { + ASN_DEBUG("Decoding %s as NULL failed: too much data", td->name); + rval.code = RC_FAIL; + rval.consumed = 0; + return rval; + } + + return rval; +} + +asn_enc_rval_t +NULL_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_enc_rval_t erval = {0,0,0}; + + erval.encoded = der_write_tags(td, 0, tag_mode, 0, tag, cb, app_key); + if(erval.encoded == -1) { + erval.failed_type = td; + erval.structure_ptr = ptr; + } + + ASN__ENCODED_OK(erval); +} diff --git a/e2sm/lib/NULL_jer.c b/e2sm/lib/NULL_jer.c new file mode 100644 index 0000000..f69c64e --- /dev/null +++ b/e2sm/lib/NULL_jer.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_enc_rval_t +NULL_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, + void *app_key) { + asn_enc_rval_t er = {0,0,0}; + + (void)td; + (void)sptr; + (void)ilevel; + (void)flags; + (void)cb; + (void)app_key; + + /* XMLNullValue is empty */ + er.encoded = 0; + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/NULL_oer.c b/e2sm/lib/NULL_oer.c new file mode 100644 index 0000000..29abaa2 --- /dev/null +++ b/e2sm/lib/NULL_oer.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_dec_rval_t +NULL_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 rv = {RC_OK, 0}; + (void)opt_codec_ctx; + (void)td; + (void)constraints; + (void)ptr; + (void)size; + + if(!*sptr) { + *sptr = MALLOC(sizeof(NULL_t)); + if(*sptr) { + *(NULL_t *)*sptr = 0; + } else { + ASN__DECODE_FAILED; + } + } + + return rv; +} + +asn_enc_rval_t +NULL_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}; + + (void)td; + (void)sptr; + (void)constraints; + (void)cb; + (void)app_key; + + er.encoded = 0; /* Encoding in 0 bytes. */ + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/NULL_print.c b/e2sm/lib/NULL_print.c new file mode 100644 index 0000000..52fcc0e --- /dev/null +++ b/e2sm/lib/NULL_print.c @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +int +NULL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + asn_app_consume_bytes_f *cb, void *app_key) { + (void)td; /* Unused argument */ + (void)ilevel; /* Unused argument */ + + if(sptr) { + return (cb("", 9, app_key) < 0) ? -1 : 0; + } else { + return (cb("", 8, app_key) < 0) ? -1 : 0; + } +} diff --git a/e2sm/lib/NULL_rfill.c b/e2sm/lib/NULL_rfill.c new file mode 100644 index 0000000..f1b60ce --- /dev/null +++ b/e2sm/lib/NULL_rfill.c @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_random_fill_result_t +NULL_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, + const asn_encoding_constraints_t *constr, + 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}; + NULL_t *st = *sptr; + + (void)td; + (void)constr; + + if(max_length == 0) return result_skipped; + + if(st == NULL) { + st = (NULL_t *)(*sptr = CALLOC(1, sizeof(*st))); + if(st == NULL) { + return result_failed; + } + } + + return result_ok; +} diff --git a/e2sm/lib/NULL_uper.c b/e2sm/lib/NULL_uper.c new file mode 100644 index 0000000..c871a48 --- /dev/null +++ b/e2sm/lib/NULL_uper.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_dec_rval_t +NULL_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; + + (void)opt_codec_ctx; + (void)td; + (void)constraints; + (void)pd; + + if(!*sptr) { + *sptr = MALLOC(sizeof(NULL_t)); + if(*sptr) { + *(NULL_t *)*sptr = 0; + } else { + ASN__DECODE_FAILED; + } + } + + /* + * NULL type does not have content octets. + */ + + rv.code = RC_OK; + rv.consumed = 0; + return rv; +} + +asn_enc_rval_t +NULL_encode_uper(const asn_TYPE_descriptor_t *td, + const asn_per_constraints_t *constraints, const void *sptr, + asn_per_outp_t *po) { + asn_enc_rval_t er = {0,0,0}; + + (void)td; + (void)constraints; + (void)sptr; + (void)po; + + er.encoded = 0; + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/NULL_xer.c b/e2sm/lib/NULL_xer.c new file mode 100644 index 0000000..5a6e4b9 --- /dev/null +++ b/e2sm/lib/NULL_xer.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_enc_rval_t +NULL_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}; + + (void)td; + (void)sptr; + (void)ilevel; + (void)flags; + (void)cb; + (void)app_key; + + /* XMLNullValue is empty */ + er.encoded = 0; + ASN__ENCODED_OK(er); +} + + +static enum xer_pbd_rval +NULL__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + (void)td; + (void)sptr; + (void)chunk_buf; /* Going to be empty according to the rules below. */ + + /* + * There must be no content in self-terminating tag. + */ + if(chunk_size) + return XPBD_BROKEN_ENCODING; + else + return XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +NULL_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(NULL_t), opt_mname, buf_ptr, size, + NULL__xer_body_decode); +} diff --git a/e2sm/lib/NativeEnumerated.c b/e2sm/lib/NativeEnumerated.c index 50ffb1d..aee450c 100644 --- a/e2sm/lib/NativeEnumerated.c +++ b/e2sm/lib/NativeEnumerated.c @@ -16,352 +16,93 @@ * NativeEnumerated basic type description. */ static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) + (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, + NativeInteger_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + NativeInteger_print, #else - NativeEnumerated_decode_oer, - NativeEnumerated_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + NativeInteger_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + NativeInteger_decode_ber, + NativeInteger_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + NativeInteger_decode_xer, + NativeEnumerated_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + NativeEnumerated_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + NativeEnumerated_decode_oer, + NativeEnumerated_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + NativeEnumerated_decode_uper, + NativeEnumerated_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + NativeEnumerated_decode_aper, + NativeEnumerated_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + NativeEnumerated_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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 +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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); + 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; } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ diff --git a/e2sm/lib/NativeEnumerated_aper.c b/e2sm/lib/NativeEnumerated_aper.c new file mode 100644 index 0000000..5c4c256 --- /dev/null +++ b/e2sm/lib/NativeEnumerated_aper.c @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 = %zu Padding bits = %d", + td->name, pd->moved, padding); + ASN_DEBUG("For NativeEnumerated %s, upper bound = %llu", + td->name, (unsigned long long)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; + */ + + /* XXX handle indefinite index length > 64k */ + value = aper_get_nsnnwn(pd, 65537); + if(value < 0) ASN__DECODE_STARVED; + value += specs->extension - 1; + //if(value >= specs->map_count) + // ASN__DECODE_FAILED; + if(value >= specs->map_count) { + ASN_DEBUG("Decoded unknown index value %s = %ld", td->name, value); + /* unknown index. Workaround => set the first enumeration value */ + *native = specs->value2enum[0].nat_value; + return rval; + } + } + + *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, range_bits = 1; + 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) range_bits = 0; + } else if(inext) { + ASN__ENCODE_FAILED; + } + + if(range_bits && 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(aper_put_nsnnwn(po, + ct->upper_bound - ct->lower_bound + 1, + value - (inext ? (specs->extension - 1) : 0))) + ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/NativeEnumerated_jer.c b/e2sm/lib/NativeEnumerated_jer.c new file mode 100644 index 0000000..046afe9 --- /dev/null +++ b/e2sm/lib/NativeEnumerated_jer.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +NativeEnumerated_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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; + } +} diff --git a/e2sm/lib/NativeEnumerated_oer.c b/e2sm/lib/NativeEnumerated_oer.c index ee3c189..52dbcb8 100644 --- a/e2sm/lib/NativeEnumerated_oer.c +++ b/e2sm/lib/NativeEnumerated_oer.c @@ -3,11 +3,8 @@ * 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) { @@ -145,5 +142,3 @@ NativeEnumerated_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/NativeEnumerated_uper.c b/e2sm/lib/NativeEnumerated_uper.c new file mode 100644 index 0000000..e2f932a --- /dev/null +++ b/e2sm/lib/NativeEnumerated_uper.c @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} + +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); +} diff --git a/e2sm/lib/NativeEnumerated_xer.c b/e2sm/lib/NativeEnumerated_xer.c new file mode 100644 index 0000000..e8d6d0d --- /dev/null +++ b/e2sm/lib/NativeEnumerated_xer.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; + } +} diff --git a/e2sm/lib/NativeInteger.c b/e2sm/lib/NativeInteger.c index 316e872..f0309b0 100644 --- a/e2sm/lib/NativeInteger.c +++ b/e2sm/lib/NativeInteger.c @@ -17,408 +17,84 @@ * NativeInteger basic type description. */ static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) + (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, + NativeInteger_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + NativeInteger_print, #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, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + NativeInteger_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + NativeInteger_decode_ber, + NativeInteger_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + NativeInteger_decode_xer, + NativeInteger_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + NativeInteger_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + NativeInteger_decode_oer, /* OER decoder */ + NativeInteger_encode_oer, /* Canonical OER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + NativeInteger_decode_uper, /* Unaligned PER decoder */ + NativeInteger_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + NativeInteger_decode_aper, /* Aligned PER decoder */ + NativeInteger_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + NativeInteger_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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) { @@ -474,77 +150,3 @@ NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const v 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/e2sm/lib/NativeInteger_aper.c b/e2sm/lib/NativeInteger_aper.c new file mode 100644 index 0000000..1d13070 --- /dev/null +++ b/e2sm/lib/NativeInteger_aper.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/NativeInteger_ber.c b/e2sm/lib/NativeInteger_ber.c new file mode 100644 index 0000000..ed68362 --- /dev/null +++ b/e2sm/lib/NativeInteger_ber.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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 occurred, 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; +} diff --git a/e2sm/lib/NativeInteger_jer.c b/e2sm/lib/NativeInteger_jer.c new file mode 100644 index 0000000..f48f8ec --- /dev/null +++ b/e2sm/lib/NativeInteger_jer.c @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +NativeInteger_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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); +} diff --git a/e2sm/lib/NativeInteger_oer.c b/e2sm/lib/NativeInteger_oer.c index 411413a..4e90046 100644 --- a/e2sm/lib/NativeInteger_oer.c +++ b/e2sm/lib/NativeInteger_oer.c @@ -3,11 +3,8 @@ * 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, @@ -95,5 +92,3 @@ NativeInteger_encode_oer(const asn_TYPE_descriptor_t *td, return er; } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/NativeInteger_print.c b/e2sm/lib/NativeInteger_print.c new file mode 100644 index 0000000..0602e0d --- /dev/null +++ b/e2sm/lib/NativeInteger_print.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; + } +} diff --git a/e2sm/lib/NativeInteger_rfill.c b/e2sm/lib/NativeInteger_rfill.c new file mode 100644 index 0000000..0e2cee8 --- /dev/null +++ b/e2sm/lib/NativeInteger_rfill.c @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 { + 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; +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + const asn_per_constraints_t *ct; + + 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); + } + } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + } + + *sptr = st; + *st = value; + return result_ok; +} diff --git a/e2sm/lib/NativeInteger_uper.c b/e2sm/lib/NativeInteger_uper.c new file mode 100644 index 0000000..4fc4ba1 --- /dev/null +++ b/e2sm/lib/NativeInteger_uper.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/NativeInteger_xer.c b/e2sm/lib/NativeInteger_xer.c new file mode 100644 index 0000000..18ec59a --- /dev/null +++ b/e2sm/lib/NativeInteger_xer.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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); +} diff --git a/e2sm/lib/NativeReal.c b/e2sm/lib/NativeReal.c index 160a471..f6c37e1 100644 --- a/e2sm/lib/NativeReal.c +++ b/e2sm/lib/NativeReal.c @@ -12,9 +12,7 @@ #include #include #include -#include #include -#include #if defined(__clang__) /* @@ -38,583 +36,83 @@ static int asn_isnan(double d) { * NativeReal basic type description. */ static const ber_tlv_tag_t asn_DEF_NativeReal_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) + (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, + NativeReal_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + NativeReal_print, #else - NativeReal_decode_oer, - NativeReal_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + NativeReal_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + NativeReal_decode_ber, + NativeReal_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + NativeReal_decode_xer, + NativeReal_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + NativeReal_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + NativeReal_decode_oer, + NativeReal_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + NativeReal_decode_uper, + NativeReal_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + NativeReal_decode_aper, + NativeReal_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + NativeReal_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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. - */ + "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]), { - 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; - } -} +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_no_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; int NativeReal_compare(const asn_TYPE_descriptor_t *td, const void *aptr, @@ -674,79 +172,18 @@ NativeReal_free(const asn_TYPE_descriptor_t *td, void *ptr, } } -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 +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 +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)) { @@ -756,7 +193,7 @@ NativeReal__get_double(const asn_TYPE_descriptor_t *td, const void *ptr) { } } -static ssize_t /* Returns -1 or float size. */ +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; diff --git a/e2sm/lib/NativeReal_aper.c b/e2sm/lib/NativeReal_aper.c new file mode 100644 index 0000000..27f0f1d --- /dev/null +++ b/e2sm/lib/NativeReal_aper.c @@ -0,0 +1,74 @@ +/* + * 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 +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; +} diff --git a/e2sm/lib/NativeReal_ber.c b/e2sm/lib/NativeReal_ber.c new file mode 100644 index 0000000..923c3df --- /dev/null +++ b/e2sm/lib/NativeReal_ber.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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 occurred, 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; +} diff --git a/e2sm/lib/NativeReal_jer.c b/e2sm/lib/NativeReal_jer.c new file mode 100644 index 0000000..9c62208 --- /dev/null +++ b/e2sm/lib/NativeReal_jer.c @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_enc_rval_t + NativeReal_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/NativeReal_oer.c b/e2sm/lib/NativeReal_oer.c new file mode 100644 index 0000000..66c3319 --- /dev/null +++ b/e2sm/lib/NativeReal_oer.c @@ -0,0 +1,228 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/NativeReal_print.c b/e2sm/lib/NativeReal_print.c new file mode 100644 index 0000000..1914696 --- /dev/null +++ b/e2sm/lib/NativeReal_print.c @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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; + } +} diff --git a/e2sm/lib/NativeReal_rfill.c b/e2sm/lib/NativeReal_rfill.c new file mode 100644 index 0000000..04153ea --- /dev/null +++ b/e2sm/lib/NativeReal_rfill.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +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; +} diff --git a/e2sm/lib/NativeReal_uper.c b/e2sm/lib/NativeReal_uper.c new file mode 100644 index 0000000..78fc242 --- /dev/null +++ b/e2sm/lib/NativeReal_uper.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/NativeReal_xer.c b/e2sm/lib/NativeReal_xer.c new file mode 100644 index 0000000..21cbe66 --- /dev/null +++ b/e2sm/lib/NativeReal_xer.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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); +} diff --git a/e2sm/lib/NgENB-ID.c b/e2sm/lib/NgENB-ID.c index 9c538bd..805d0c2 100644 --- a/e2sm/lib/NgENB-ID.c +++ b/e2sm/lib/NgENB-ID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "NgENB-ID.h" @@ -27,7 +27,7 @@ memb_macroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *spt size = 0; } - if((size == 20)) { + if((size == 20UL)) { /* Constraint check succeeded */ return 0; } else { @@ -58,7 +58,7 @@ memb_shortMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void size = 0; } - if((size == 18)) { + if((size == 18UL)) { /* Constraint check succeeded */ return 0; } else { @@ -89,7 +89,7 @@ memb_longMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void size = 0; } - if((size == 21)) { + if((size == 21UL)) { /* Constraint check succeeded */ return 0; } else { @@ -100,33 +100,69 @@ memb_longMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void } } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_macroNgENB_ID_constr_2 CC_NOTUSED = { + { 0, 0 }, + 20 /* (SIZE(20..20)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_shortMacroNgENB_ID_constr_3 CC_NOTUSED = { + { 0, 0 }, + 18 /* (SIZE(18..18)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_longMacroNgENB_ID_constr_4 CC_NOTUSED = { + { 0, 0 }, + 21 /* (SIZE(21..21)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_NgENB_ID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_macroNgENB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_macroNgENB_ID_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_macroNgENB_ID_constraint_1 + }, 0, 0, /* No default value */ "macroNgENB-ID" }, @@ -135,7 +171,15 @@ asn_TYPE_member_t asn_MBR_NgENB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, 0, - { 0, &asn_PER_memb_shortMacroNgENB_ID_constr_3, memb_shortMacroNgENB_ID_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_shortMacroNgENB_ID_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_shortMacroNgENB_ID_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_shortMacroNgENB_ID_constraint_1 + }, 0, 0, /* No default value */ "shortMacroNgENB-ID" }, @@ -144,7 +188,15 @@ asn_TYPE_member_t asn_MBR_NgENB_ID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, 0, - { 0, &asn_PER_memb_longMacroNgENB_ID_constr_4, memb_longMacroNgENB_ID_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_longMacroNgENB_ID_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_longMacroNgENB_ID_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_longMacroNgENB_ID_constraint_1 + }, 0, 0, /* No default value */ "longMacroNgENB-ID" }, @@ -172,7 +224,15 @@ asn_TYPE_descriptor_t asn_DEF_NgENB_ID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_NgENB_ID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_NgENB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_NgENB_ID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_NgENB_ID_1, 3, /* Elements count */ &asn_SPC_NgENB_ID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/NumericString.c b/e2sm/lib/NumericString.c deleted file mode 100644 index ec98ba5..0000000 --- a/e2sm/lib/NumericString.c +++ /dev/null @@ -1,121 +0,0 @@ -/*- - * 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/e2sm/lib/OBJECT_IDENTIFIER.c b/e2sm/lib/OBJECT_IDENTIFIER.c index 8dccf01..5cf2d60 100644 --- a/e2sm/lib/OBJECT_IDENTIFIER.c +++ b/e2sm/lib/OBJECT_IDENTIFIER.c @@ -5,58 +5,93 @@ #include #include #include -#include +#include #include /* for CHAR_BIT */ #include +#include /* * OBJECT IDENTIFIER basic type description. */ static const ber_tlv_tag_t asn_DEF_OBJECT_IDENTIFIER_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)) }; asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = { - ASN__PRIMITIVE_TYPE_free, - OBJECT_IDENTIFIER_print, - OCTET_STRING_compare, /* Implemented in terms of a string comparison */ - ber_decode_primitive, - der_encode_primitive, - OBJECT_IDENTIFIER_decode_xer, - OBJECT_IDENTIFIER_encode_xer, -#ifdef ASN_DISABLE_OER_SUPPORT - 0, - 0, + ASN__PRIMITIVE_TYPE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OBJECT_IDENTIFIER_print, #else - OBJECT_IDENTIFIER_decode_oer, - OBJECT_IDENTIFIER_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, /* Implemented in terms of a string comparison */ +#if !defined(ASN_DISABLE_BER_SUPPORT) + ber_decode_primitive, + der_encode_primitive, #else - OCTET_STRING_decode_uper, - OCTET_STRING_encode_uper, - OCTET_STRING_decode_aper, - OCTET_STRING_encode_aper, -#endif /* ASN_DISABLE_PER_SUPPORT */ - OBJECT_IDENTIFIER_random_fill, - 0 /* Use generic outmost tag fetcher */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OBJECT_IDENTIFIER_decode_xer, + OBJECT_IDENTIFIER_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OBJECT_IDENTIFIER_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OBJECT_IDENTIFIER_decode_oer, + OBJECT_IDENTIFIER_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OBJECT_IDENTIFIER_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = { - "OBJECT IDENTIFIER", - "OBJECT_IDENTIFIER", - &asn_OP_OBJECT_IDENTIFIER, - asn_DEF_OBJECT_IDENTIFIER_tags, - sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) - / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), - asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */ - sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) - / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), - { 0, 0, OBJECT_IDENTIFIER_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + "OBJECT IDENTIFIER", + "OBJECT_IDENTIFIER", + &asn_OP_OBJECT_IDENTIFIER, + asn_DEF_OBJECT_IDENTIFIER_tags, + sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) + / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), + asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */ + sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) + / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + OBJECT_IDENTIFIER_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ }; int @@ -143,11 +178,12 @@ OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, size_t arcbuf_len, } -static ssize_t +ssize_t OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st, asn_app_consume_bytes_f *cb, void *app_key) { char scratch[32]; - asn_oid_arc_t arc0, arc1; + asn_oid_arc_t arc0 = 0; + asn_oid_arc_t arc1 = 0; size_t produced = 0; size_t off = 0; ssize_t rd; @@ -195,105 +231,11 @@ OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st, return produced; } -static enum xer_pbd_rval -OBJECT_IDENTIFIER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, - const void *chunk_buf, size_t chunk_size) { - OBJECT_IDENTIFIER_t *st = (OBJECT_IDENTIFIER_t *)sptr; - const char *chunk_end = (const char *)chunk_buf + chunk_size; - const char *endptr; - asn_oid_arc_t s_arcs[10]; - asn_oid_arc_t *arcs = s_arcs; - ssize_t num_arcs; - ssize_t 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 more than zero 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(asn_oid_arc_t)); - 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 = OBJECT_IDENTIFIER_set_arcs(st, arcs, num_arcs); - if(arcs != s_arcs) FREEMEM(arcs); - - return ret ? XPBD_SYSTEM_FAILURE : XPBD_BODY_CONSUMED; -} - -asn_dec_rval_t -OBJECT_IDENTIFIER_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(OBJECT_IDENTIFIER_t), opt_mname, - buf_ptr, size, OBJECT_IDENTIFIER__xer_body_decode); -} - -asn_enc_rval_t -OBJECT_IDENTIFIER_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 OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; - asn_enc_rval_t er = {0,0,0}; - - (void)ilevel; - (void)flags; - - if(!st || !st->buf) { - ASN__ENCODE_FAILED; - } - - er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key); - if(er.encoded < 0) ASN__ENCODE_FAILED; - - ASN__ENCODED_OK(er); -} - -int -OBJECT_IDENTIFIER_print(const asn_TYPE_descriptor_t *td, const void *sptr, - int ilevel, asn_app_consume_bytes_f *cb, - void *app_key) { - const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_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(OBJECT_IDENTIFIER__dump_body(st, cb, app_key) < 0) { - return -1; - } - - return (cb(" }", 2, app_key) < 0) ? -1 : 0; -} - ssize_t OBJECT_IDENTIFIER_get_arcs(const OBJECT_IDENTIFIER_t *st, asn_oid_arc_t *arcs, size_t arc_slots) { - asn_oid_arc_t arc0, arc1; + asn_oid_arc_t arc0 = 0; + asn_oid_arc_t arc1 = 0; size_t num_arcs = 0; size_t off; ssize_t rd; @@ -588,69 +530,3 @@ OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length, errno = EINVAL; /* Broken OID */ return -1; } - -/* - * Generate values from the list of interesting values, or just a random - * value up to the upper limit. - */ -static asn_oid_arc_t -OBJECT_IDENTIFIER__biased_random_arc(asn_oid_arc_t upper_bound) { - const asn_oid_arc_t values[] = {0, 1, 127, 128, 129, 254, 255, 256}; - size_t idx; - - switch(asn_random_between(0, 2)) { - case 0: - idx = asn_random_between(0, sizeof(values) / sizeof(values[0]) - 1); - if(values[idx] < upper_bound) { - return values[idx]; - } - /* Fall through */ - case 1: - return asn_random_between(0, upper_bound); - case 2: - default: - return upper_bound; - } -} - -asn_random_fill_result_t -OBJECT_IDENTIFIER_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}; - OBJECT_IDENTIFIER_t *st; - asn_oid_arc_t arcs[5]; - size_t arcs_len = asn_random_between(2, 5); - size_t i; - - (void)constraints; - - if(max_length < arcs_len) return result_skipped; - - if(*sptr) { - st = *sptr; - } else { - st = CALLOC(1, sizeof(*st)); - } - - arcs[0] = asn_random_between(0, 2); - arcs[1] = OBJECT_IDENTIFIER__biased_random_arc( - arcs[0] <= 1 ? 39 : (ASN_OID_ARC_MAX - 80)); - for(i = 2; i < arcs_len; i++) { - arcs[i] = OBJECT_IDENTIFIER__biased_random_arc(ASN_OID_ARC_MAX); - } - - if(OBJECT_IDENTIFIER_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/e2sm/lib/OBJECT_IDENTIFIER_jer.c b/e2sm/lib/OBJECT_IDENTIFIER_jer.c new file mode 100644 index 0000000..f105f03 --- /dev/null +++ b/e2sm/lib/OBJECT_IDENTIFIER_jer.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + + +asn_enc_rval_t +OBJECT_IDENTIFIER_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) { + ASN__ENCODE_FAILED; + } + + er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/OBJECT_IDENTIFIER_print.c b/e2sm/lib/OBJECT_IDENTIFIER_print.c new file mode 100644 index 0000000..b0c3a9e --- /dev/null +++ b/e2sm/lib/OBJECT_IDENTIFIER_print.c @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +int +OBJECT_IDENTIFIER_print(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, asn_app_consume_bytes_f *cb, + void *app_key) { + const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_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(OBJECT_IDENTIFIER__dump_body(st, cb, app_key) < 0) { + return -1; + } + + return (cb(" }", 2, app_key) < 0) ? -1 : 0; +} diff --git a/e2sm/lib/OBJECT_IDENTIFIER_rfill.c b/e2sm/lib/OBJECT_IDENTIFIER_rfill.c new file mode 100644 index 0000000..55093c8 --- /dev/null +++ b/e2sm/lib/OBJECT_IDENTIFIER_rfill.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Generate values from the list of interesting values, or just a random + * value up to the upper limit. + */ +static asn_oid_arc_t +OBJECT_IDENTIFIER__biased_random_arc(asn_oid_arc_t upper_bound) { + const asn_oid_arc_t values[] = {0, 1, 127, 128, 129, 254, 255, 256}; + size_t idx; + + switch(asn_random_between(0, 2)) { + case 0: + idx = asn_random_between(0, sizeof(values) / sizeof(values[0]) - 1); + if(values[idx] < upper_bound) { + return values[idx]; + } + /* Fall through */ + case 1: + return asn_random_between(0, upper_bound); + case 2: + default: + return upper_bound; + } +} + +asn_random_fill_result_t +OBJECT_IDENTIFIER_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}; + OBJECT_IDENTIFIER_t *st; + asn_oid_arc_t arcs[5]; + size_t arcs_len = asn_random_between(2, 5); + size_t i; + + (void)constraints; + + if(max_length < arcs_len) return result_skipped; + + if(*sptr) { + st = *sptr; + } else { + st = CALLOC(1, sizeof(*st)); + } + + arcs[0] = asn_random_between(0, 2); + arcs[1] = OBJECT_IDENTIFIER__biased_random_arc( + arcs[0] <= 1 ? 39 : (ASN_OID_ARC_MAX - 80)); + for(i = 2; i < arcs_len; i++) { + arcs[i] = OBJECT_IDENTIFIER__biased_random_arc(ASN_OID_ARC_MAX); + } + + if(OBJECT_IDENTIFIER_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/e2sm/lib/OBJECT_IDENTIFIER_xer.c b/e2sm/lib/OBJECT_IDENTIFIER_xer.c new file mode 100644 index 0000000..706e51a --- /dev/null +++ b/e2sm/lib/OBJECT_IDENTIFIER_xer.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +static enum xer_pbd_rval +OBJECT_IDENTIFIER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, + const void *chunk_buf, size_t chunk_size) { + OBJECT_IDENTIFIER_t *st = (OBJECT_IDENTIFIER_t *)sptr; + const char *chunk_end = (const char *)chunk_buf + chunk_size; + const char *endptr; + asn_oid_arc_t s_arcs[10]; + asn_oid_arc_t *arcs = s_arcs; + ssize_t num_arcs; + ssize_t 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 more than zero arcs */ + return XPBD_BROKEN_ENCODING; + } else if(num_arcs == 0) { + return XPBD_NOT_BODY_IGNORE; + } + (void)chunk_end; + 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(asn_oid_arc_t)); + 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 = OBJECT_IDENTIFIER_set_arcs(st, arcs, num_arcs); + if(arcs != s_arcs) FREEMEM(arcs); + + return ret ? XPBD_SYSTEM_FAILURE : XPBD_BODY_CONSUMED; +} + +asn_dec_rval_t +OBJECT_IDENTIFIER_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(OBJECT_IDENTIFIER_t), opt_mname, + buf_ptr, size, OBJECT_IDENTIFIER__xer_body_decode); +} + +asn_enc_rval_t +OBJECT_IDENTIFIER_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 OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; + asn_enc_rval_t er = {0,0,0}; + + (void)ilevel; + (void)flags; + + if(!st || !st->buf) { + ASN__ENCODE_FAILED; + } + + er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/OCTET_STRING.c b/e2sm/lib/OCTET_STRING.c index ae34c96..d0bdead 100644 --- a/e2sm/lib/OCTET_STRING.c +++ b/e2sm/lib/OCTET_STRING.c @@ -5,2088 +5,105 @@ */ #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_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 + 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, + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */ +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, + OCTET_STRING_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_hex, + OCTET_STRING_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer, #else - OCTET_STRING_decode_oer, - OCTET_STRING_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, /* Unaligned PER decoder */ + OCTET_STRING_encode_uper, /* Unaligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, /* Aligned PER decoder */ + OCTET_STRING_encode_aper, /* Aligned PER encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OCTET_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_no_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs }; -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) { @@ -2094,18 +111,29 @@ OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, 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); - } +#if !defined(ASN_DISABLE_BER_SUPPORT) + const asn_OCTET_STRING_specifics_t *specs; + asn_struct_ctx_t *ctx; + + 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); + + /* + * Remove decode-time stack. + */ + struct _stack *stck; + stck = (struct _stack *)ctx->ptr; + if(stck) { + while(stck->tail) { + struct _stack_el *sel = stck->tail; + stck->tail = sel->prev; + FREEMEM(sel); + } + FREEMEM(stck); + } +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ switch(method) { case ASFM_FREE_EVERYTHING: @@ -2191,6 +219,7 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const OCTET_STRING_t *a = aptr; const OCTET_STRING_t *b = bptr; + (void)specs; assert(!specs || specs->subvariant != ASN_OSUBV_BIT); if(a && b) { @@ -2218,194 +247,137 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, } -/* - * 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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +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 */ } - 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); + 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; } - } else { - rnd_len = asn_random_between(0, max_length); } - } else if(rnd_len > max_length) { - rnd_len = asn_random_between(0, max_length); + return 0; } - 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; + /* 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); } - 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; + 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; } } - 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]; + return 0; +} - 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; +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; } - *(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; - } + /* 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); } - st->buf = buf; - st->size = unit_bytes * rnd_len; + 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; + } - result_ok.length = st->size; - return result_ok; + return 0; } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ diff --git a/e2sm/lib/OCTET_STRING_aper.c b/e2sm/lib/OCTET_STRING_aper.c new file mode 100644 index 0000000..0373fe6 --- /dev/null +++ b/e2sm/lib/OCTET_STRING_aper.c @@ -0,0 +1,414 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +#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_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_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 %lld .. %lld bits %d", + csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", + (long long int)csiz->lower_bound, (long long int)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; + /* X.691 #16 NOTE 1 for fixed length (<= 16 bits) strings */ + if (st->size > 2 || csiz->range_bits != 0) { + if (aper_get_align(pd) < 0) + RETURN(RC_FAIL); + } + if(bpc) { + ASN_DEBUG("Decoding OCTET STRING size %lld", + (long long int)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 %lld", + (long long int)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; + + repeat = 0; + /* Get the PER length */ + if (csiz->upper_bound - csiz->lower_bound == 0) + /* Indefinite length case */ + raw_len = aper_get_length(pd, -1, -1, csiz->effective_bits, &repeat); + else + raw_len = aper_get_length(pd, csiz->lower_bound, csiz->upper_bound, + csiz->effective_bits, &repeat); + 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); + + /* X.691 #16 NOTE 1 for fixed length (<=16 bits) strings */ + if ((raw_len > 2) || (csiz->upper_bound > 2) || (csiz->range_bits != 0)) + { + 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" + " (%lld..%lld, effective %d)%s", + td->name, sizeinunits, unit_bits, + (long long int)csiz->lower_bound, + (long long int)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 %zu bytes (%lld), length in %d bits", + st->size, (long long int)(sizeinunits - csiz->lower_bound), + csiz->effective_bits); + if (csiz->effective_bits > 0) { + ret = aper_put_length(po, csiz->lower_bound, csiz->upper_bound, + sizeinunits - csiz->lower_bound, NULL); + if(ret < 0) ASN__ENCODE_FAILED; + } + if (csiz->effective_bits > 0 || (st->size > 2) + || (csiz->upper_bound > (2 * 8 / unit_bits)) + || (csiz->range_bits != 0)) + { /* X.691 #16 NOTE 1 for fixed length (<=16 bits) strings*/ + 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 %zu bytes", st->size); + + if(sizeinunits == 0) { + if(aper_put_length(po, -1, -1, 0, NULL) < 0) + ASN__ENCODE_FAILED; + ASN__ENCODED_OK(er); + } + + buf = st->buf; + while(sizeinunits) { + int need_eom = 0; + ssize_t maySave = aper_put_length(po, -1, -1, sizeinunits, &need_eom); + + 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); + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/OCTET_STRING_ber.c b/e2sm/lib/OCTET_STRING_ber.c new file mode 100644 index 0000000..9530eae --- /dev/null +++ b/e2sm/lib/OCTET_STRING_ber.c @@ -0,0 +1,525 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +#undef _CH_PHASE +#define _CH_PHASE(ctx, inc) do {\ + if(ctx->phase == 0)\ + ctx->context = 0;\ + ctx->phase += inc;\ + } while(0) + +#undef NEXT_PHASE +#define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1) +#undef PREV_PHASE +#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 acquired skill everywhere afterwards. + * No, I am not going to explain what the following stuff is. + */ +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; +} diff --git a/e2sm/lib/OCTET_STRING_jer.c b/e2sm/lib/OCTET_STRING_jer.c new file mode 100644 index 0000000..d744cc3 --- /dev/null +++ b/e2sm/lib/OCTET_STRING_jer.c @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +asn_enc_rval_t +OCTET_STRING_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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; + ASN__CALLBACK("\"", 1); + for(i = 0; buf < end; buf++, i++) { + if(!(i % 16) && (i || st->size > 16)) { + ASN__CALLBACK(scratch, p-scratch); + p = scratch; + } + *p++ = h2c[(*buf >> 4) & 0x0F]; + *p++ = h2c[*buf & 0x0F]; + } + if(p - scratch) { + ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ + } + ASN__CALLBACK("\"", 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +static const struct OCTET_STRING__jer_escape_table_s { + const char *string; + int size; +} OCTET_STRING__jer_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"), /* > */ +}; + +asn_enc_rval_t +OCTET_STRING_encode_jer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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__jer_escape_table) + / sizeof(OCTET_STRING__jer_escape_table[0]) + && (s_len = OCTET_STRING__jer_escape_table[ch].size)) { + if(((buf - ss) && cb(ss, buf - ss, app_key) < 0) + || cb(OCTET_STRING__jer_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); +} + diff --git a/e2sm/lib/OCTET_STRING_oer.c b/e2sm/lib/OCTET_STRING_oer.c index c16faea..e69d0a6 100644 --- a/e2sm/lib/OCTET_STRING_oer.c +++ b/e2sm/lib/OCTET_STRING_oer.c @@ -3,11 +3,8 @@ * 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, @@ -167,5 +164,3 @@ OCTET_STRING_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/OCTET_STRING_print.c b/e2sm/lib/OCTET_STRING_print.c new file mode 100644 index 0000000..6daa33e --- /dev/null +++ b/e2sm/lib/OCTET_STRING_print.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 == NULL)? NULL : 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; + } +} diff --git a/e2sm/lib/OCTET_STRING_rfill.c b/e2sm/lib/OCTET_STRING_rfill.c new file mode 100644 index 0000000..5c8b064 --- /dev/null +++ b/e2sm/lib/OCTET_STRING_rfill.c @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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); + } +} + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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; + } + } +#else + if(!constraints) constraints = &td->encoding_constraints; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + + 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; +} + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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 { +#else + if(!constraints) constraints = &td->encoding_constraints; + { +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + if(rnd_len > max_length) { + rnd_len = asn_random_between(0, max_length); + } + } + + return rnd_len; +} diff --git a/e2sm/lib/OCTET_STRING_uper.c b/e2sm/lib/OCTET_STRING_uper.c new file mode 100644 index 0000000..80130ca --- /dev/null +++ b/e2sm/lib/OCTET_STRING_uper.c @@ -0,0 +1,319 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +#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_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); +} diff --git a/e2sm/lib/OCTET_STRING_xer.c b/e2sm/lib/OCTET_STRING_xer.c new file mode 100644 index 0000000..490f362 --- /dev/null +++ b/e2sm/lib/OCTET_STRING_xer.c @@ -0,0 +1,627 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include /* for .bits_unused member */ + +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 == NULL)? NULL : 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); +} diff --git a/e2sm/lib/OCUCP-PF-Container.c b/e2sm/lib/OCUCP-PF-Container.c deleted file mode 100644 index e71aefd..0000000 --- a/e2sm/lib/OCUCP-PF-Container.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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/e2sm/lib/OCUUP-PF-Container.c b/e2sm/lib/OCUUP-PF-Container.c deleted file mode 100644 index ea7d6bc..0000000 --- a/e2sm/lib/OCUUP-PF-Container.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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/e2sm/lib/ODU-PF-Container.c b/e2sm/lib/ODU-PF-Container.c deleted file mode 100644 index fde90d1..0000000 --- a/e2sm/lib/ODU-PF-Container.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/OPEN_TYPE.c b/e2sm/lib/OPEN_TYPE.c index a54e99c..c9afecf 100644 --- a/e2sm/lib/OPEN_TYPE.c +++ b/e2sm/lib/OPEN_TYPE.c @@ -5,505 +5,59 @@ #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 */ + OPEN_TYPE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OPEN_TYPE_print, #else - OPEN_TYPE_decode_oer, - OPEN_TYPE_encode_oer, -#endif -#ifdef ASN_DISABLE_PER_SUPPORT - 0, 0, 0, 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OPEN_TYPE_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OPEN_TYPE_decode_ber, + OPEN_TYPE_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OPEN_TYPE_decode_xer, + OPEN_TYPE_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OPEN_TYPE_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OPEN_TYPE_decode_oer, + OPEN_TYPE_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OPEN_TYPE_decode_uper, + OPEN_TYPE_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OPEN_TYPE_decode_aper, + OPEN_TYPE_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + 0, /* Random fill is not supported for open type */ +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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/e2sm/lib/OPEN_TYPE_aper.c b/e2sm/lib/OPEN_TYPE_aper.c new file mode 100644 index 0000000..3e2ab18 --- /dev/null +++ b/e2sm/lib/OPEN_TYPE_aper.c @@ -0,0 +1,173 @@ +/* + * 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_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); +} + + +int OPEN_TYPE_aper_is_unknown_type(const asn_TYPE_descriptor_t *td, void *sptr, const asn_TYPE_member_t *elm) { + asn_type_selector_result_t selected; + + if(!elm->type_selector) { + return 1; + } + else { + selected = elm->type_selector(td, sptr); + if(!selected.presence_index) { + return 1; + } + } + return 0; +} + +asn_dec_rval_t +OPEN_TYPE_aper_unknown_type_discard_bytes (asn_per_data_t *pd) { +#define ASN_DUMMY_BYTES 256 + unsigned char dummy[ASN_DUMMY_BYTES], *dummy_ptr = NULL; + ssize_t bytes; + int repeat; + asn_dec_rval_t rv; + + rv.consumed = 0; + rv.code = RC_FAIL; + + do { + bytes = aper_get_length(pd, -1, -1, -1, &repeat); + if (bytes > 10 * ASN_DUMMY_BYTES) + { + return rv; + } + else if (bytes > ASN_DUMMY_BYTES) + { + dummy_ptr = CALLOC(1, bytes); + if (!dummy_ptr) + return rv; + } + + per_get_many_bits(pd, (dummy_ptr ? dummy_ptr : dummy), 0, bytes << 3); + + if (dummy_ptr) + { + FREEMEM(dummy_ptr); + dummy_ptr = NULL; + } + } while (repeat); + + rv.code = RC_OK; + return rv; +#undef ASN_DUMMY_BYTES +} diff --git a/e2sm/lib/OPEN_TYPE_ber.c b/e2sm/lib/OPEN_TYPE_ber.c new file mode 100644 index 0000000..7d89480 --- /dev/null +++ b/e2sm/lib/OPEN_TYPE_ber.c @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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; +} diff --git a/e2sm/lib/OPEN_TYPE_oer.c b/e2sm/lib/OPEN_TYPE_oer.c index dd2f5c6..05a5eaa 100644 --- a/e2sm/lib/OPEN_TYPE_oer.c +++ b/e2sm/lib/OPEN_TYPE_oer.c @@ -5,7 +5,6 @@ #include #include #include -#include asn_dec_rval_t OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, diff --git a/e2sm/lib/OPEN_TYPE_uper.c b/e2sm/lib/OPEN_TYPE_uper.c new file mode 100644 index 0000000..2f27bb9 --- /dev/null +++ b/e2sm/lib/OPEN_TYPE_uper.c @@ -0,0 +1,119 @@ +/* + * 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_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); +} diff --git a/e2sm/lib/OPEN_TYPE_xer.c b/e2sm/lib/OPEN_TYPE_xer.c new file mode 100644 index 0000000..fc38562 --- /dev/null +++ b/e2sm/lib/OPEN_TYPE_xer.c @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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; +} diff --git a/e2sm/lib/ObjectDescriptor.c b/e2sm/lib/ObjectDescriptor.c index 5d8bfb2..c311a92 100644 --- a/e2sm/lib/ObjectDescriptor.c +++ b/e2sm/lib/ObjectDescriptor.c @@ -9,50 +9,83 @@ * 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_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 */ + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print_utf8, /* Treat as ASCII subset (it's not) */ +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer_utf8, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, + 0, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + 0, /* Not supported for ObjectDescriptor */ +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_unknown_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ }; - diff --git a/e2sm/lib/PF-Container.c b/e2sm/lib/PF-Container.c deleted file mode 100644 index b380786..0000000 --- a/e2sm/lib/PF-Container.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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/e2sm/lib/PF-ContainerListItem.c b/e2sm/lib/PF-ContainerListItem.c deleted file mode 100644 index 3c3df6f..0000000 --- a/e2sm/lib/PF-ContainerListItem.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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/e2sm/lib/PLMN-Identity.c b/e2sm/lib/PLMN-Identity.c deleted file mode 100644 index 5ebacad..0000000 --- a/e2sm/lib/PLMN-Identity.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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/e2sm/lib/PLMNIdentity.c b/e2sm/lib/PLMNIdentity.c index d375735..0997f3b 100644 --- a/e2sm/lib/PLMNIdentity.c +++ b/e2sm/lib/PLMNIdentity.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "PLMNIdentity.h" @@ -22,7 +22,7 @@ PLMNIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 3)) { + if((size == 3UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ PLMNIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_PLMNIdentity_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_PLMNIdentity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_PLMNIdentity = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_PLMNIdentity_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_PLMNIdentity_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + PLMNIdentity_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/PM-Containers-List.c b/e2sm/lib/PM-Containers-List.c deleted file mode 100644 index 2a4b953..0000000 --- a/e2sm/lib/PM-Containers-List.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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/e2sm/lib/PerQCIReportListItem.c b/e2sm/lib/PerQCIReportListItem.c deleted file mode 100644 index b420e15..0000000 --- a/e2sm/lib/PerQCIReportListItem.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * 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/e2sm/lib/PerQCIReportListItemFormat.c b/e2sm/lib/PerQCIReportListItemFormat.c deleted file mode 100644 index d95ad56..0000000 --- a/e2sm/lib/PerQCIReportListItemFormat.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * 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/e2sm/lib/PlmnID-List.c b/e2sm/lib/PlmnID-List.c deleted file mode 100644 index 210c424..0000000 --- a/e2sm/lib/PlmnID-List.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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/e2sm/lib/PrintableString.c b/e2sm/lib/PrintableString.c index 8fc3939..f046f12 100644 --- a/e2sm/lib/PrintableString.c +++ b/e2sm/lib/PrintableString.c @@ -30,68 +30,103 @@ static const int _PrintableString_code2value[74] = { * 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 */ + (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), /* [UNIVERSAL 19] IMPLICIT ...*/ + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ }; +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) static int asn_DEF_PrintableString_v2c(unsigned int value) { - return _PrintableString_alphabet[value > 255 ? 0 : value] - 1; + 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; + 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 + { APC_CONSTRAINED, 4, 4, 0x20, 0x39 }, /* Value */ + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ + asn_DEF_PrintableString_v2c, + asn_DEF_PrintableString_c2v }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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, + OCTET_STRING_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + OCTET_STRING_print_utf8, /* ASCII subset */ #else - OCTET_STRING_decode_oer, - OCTET_STRING_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + OCTET_STRING_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ + OCTET_STRING_encode_der, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + OCTET_STRING_decode_xer_utf8, + OCTET_STRING_encode_xer_utf8, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + OCTET_STRING_encode_jer_utf8, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + OCTET_STRING_decode_oer, + OCTET_STRING_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + OCTET_STRING_decode_uper, + OCTET_STRING_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + OCTET_STRING_decode_aper, + OCTET_STRING_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + OCTET_STRING_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 */ + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_DEF_PrintableString_per_constraints, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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, diff --git a/e2sm/lib/QCI.c b/e2sm/lib/QCI.c index 75e4c56..ae12699 100644 --- a/e2sm/lib/QCI.c +++ b/e2sm/lib/QCI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "QCI.h" @@ -21,7 +21,7 @@ QCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 255)) { + if((value >= 0L && value <= 255L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ QCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_QCI_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_QCI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_QCI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_QCI_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_QCI_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + QCI_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/QoSID.c b/e2sm/lib/QoSID.c index bae6079..b14a5e5 100644 --- a/e2sm/lib/QoSID.c +++ b/e2sm/lib/QoSID.c @@ -1,24 +1,39 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "QoSID.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_QoSID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "fiveGC" }, @@ -27,7 +42,15 @@ static asn_TYPE_member_t asn_MBR_QoSID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_QCI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ePC" }, @@ -54,7 +77,15 @@ asn_TYPE_descriptor_t asn_DEF_QoSID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_QoSID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_QoSID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_QoSID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_QoSID_1, 2, /* Elements count */ &asn_SPC_QoSID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/QosFlowIdentifier.c b/e2sm/lib/QosFlowIdentifier.c index a24d12a..ce5d086 100644 --- a/e2sm/lib/QosFlowIdentifier.c +++ b/e2sm/lib/QosFlowIdentifier.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "QosFlowIdentifier.h" @@ -21,7 +21,7 @@ QosFlowIdentifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, value = *(const long *)sptr; - if((value >= 0 && value <= 63)) { + if((value >= 0L && value <= 63L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ QosFlowIdentifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_QosFlowIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_QosFlowIdentifier_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_QosFlowIdentifier = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_QosFlowIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_QosFlowIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + QosFlowIdentifier_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/RAN-Container.c b/e2sm/lib/RAN-Container.c deleted file mode 100644 index d0ee73f..0000000 --- a/e2sm/lib/RAN-Container.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/RANUEID.c b/e2sm/lib/RANUEID.c index 11bbdfe..88ad3de 100644 --- a/e2sm/lib/RANUEID.c +++ b/e2sm/lib/RANUEID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANUEID.h" @@ -22,7 +22,7 @@ RANUEID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 8)) { + if((size == 8UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ RANUEID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_RANUEID_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_RANUEID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_RANUEID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RANUEID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RANUEID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + RANUEID_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/RANfunction-Name.c b/e2sm/lib/RANfunction-Name.c index cc349e4..f81ba38 100644 --- a/e2sm/lib/RANfunction-Name.c +++ b/e2sm/lib/RANfunction-Name.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RANfunction-Name.h" @@ -118,7 +118,7 @@ memb_ranFunction_ShortName_constraint_1(const asn_TYPE_descriptor_t *td, const v size = st->size; - if((size >= 1 && size <= 150) + if((size >= 1UL && size <= 150UL) && !check_permitted_alphabet_2(st)) { /* Constraint check succeeded */ return 0; @@ -155,7 +155,7 @@ memb_ranFunction_E2SM_OID_constraint_1(const asn_TYPE_descriptor_t *td, const vo size = st->size; - if((size >= 1 && size <= 1000) + if((size >= 1UL && size <= 1000UL) && !check_permitted_alphabet_3(st)) { /* Constraint check succeeded */ return 0; @@ -192,7 +192,7 @@ memb_ranFunction_Description_constraint_1(const asn_TYPE_descriptor_t *td, const size = st->size; - if((size >= 1 && size <= 150) + if((size >= 1UL && size <= 150UL) && !check_permitted_alphabet_4(st)) { /* Constraint check succeeded */ return 0; @@ -214,31 +214,60 @@ static int asn_PER_MAP_ranFunction_Description_4_c2v(unsigned int code) { return -1; return permitted_alphabet_code2value_4[code]; } +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_ranFunction_ShortName_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_ranFunction_E2SM_OID_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_ranFunction_Description_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ranFunction_ShortName_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ranFunction_ShortName_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ranFunction_ShortName_constraint_1 + }, 0, 0, /* No default value */ "ranFunction-ShortName" }, @@ -247,7 +276,15 @@ asn_TYPE_member_t asn_MBR_RANfunction_Name_1[] = { -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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ranFunction_E2SM_OID_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ranFunction_E2SM_OID_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ranFunction_E2SM_OID_constraint_1 + }, 0, 0, /* No default value */ "ranFunction-E2SM-OID" }, @@ -256,7 +293,15 @@ asn_TYPE_member_t asn_MBR_RANfunction_Name_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PrintableString, 0, - { 0, &asn_PER_memb_ranFunction_Description_constr_4, memb_ranFunction_Description_constraint_1 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_ranFunction_Description_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_ranFunction_Description_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + memb_ranFunction_Description_constraint_1 + }, 0, 0, /* No default value */ "ranFunction-Description" }, @@ -265,7 +310,15 @@ asn_TYPE_member_t asn_MBR_RANfunction_Name_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ranFunction-Instance" }, @@ -299,7 +352,15 @@ asn_TYPE_descriptor_t asn_DEF_RANfunction_Name = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RANfunction_Name_1, 4, /* Elements count */ &asn_SPC_RANfunction_Name_specs_1 /* Additional specs */ diff --git a/e2sm/lib/REAL.c b/e2sm/lib/REAL.c index e3daf37..a551fe5 100644 --- a/e2sm/lib/REAL.c +++ b/e2sm/lib/REAL.c @@ -2,33 +2,21 @@ * 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 +struct specialRealValue_s specialRealValue[] = { +#define SRV_SET(foo, val) { (char *)foo, sizeof(foo) - 1, val } + SRV_SET("", 0), + SRV_SET("", -1), + SRV_SET("", 1), +#undef SRV_SET +}; #if defined(__clang__) /* @@ -64,66 +52,82 @@ static int asn_isfinite(double d) { * REAL basic type description. */ static const ber_tlv_tag_t asn_DEF_REAL_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) + (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, + ASN__PRIMITIVE_TYPE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + REAL_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + REAL_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + ber_decode_primitive, + der_encode_primitive, #else - REAL_decode_oer, - REAL_encode_oer, -#endif /* ASN_DISABLE_OER_SUPPORT */ -#ifdef ASN_DISABLE_PER_SUPPORT - 0, - 0, - 0, - 0, + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + REAL_decode_xer, + REAL_encode_xer, #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 */ + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + REAL_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + REAL_decode_oer, + REAL_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + REAL_decode_uper, + REAL_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + REAL_decode_aper, + REAL_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + REAL_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 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 + "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]), + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + asn_generic_no_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ }; ssize_t @@ -131,7 +135,6 @@ 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; /* @@ -166,7 +169,10 @@ REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key) * Use the libc's double printing, hopefully they got it right. */ do { - ret = snprintf(buf, buflen, fmt, d); + ret = snprintf(buf, + buflen, + canonical ? "%.17E" /* Precise */ : "%.15f" /* Pleasant*/, + d); if(ret < 0) { /* There are some old broken APIs. */ buflen <<= 1; @@ -234,10 +240,11 @@ REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key) assert(*s == 0x45); { + int sign; char *E = s; char *expptr = ++E; - char *s = expptr; - int sign; + + s = expptr; if(*expptr == 0x2b /* '+' */) { /* Skip the "+" */ @@ -309,26 +316,6 @@ REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key) 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) { @@ -372,104 +359,6 @@ REAL_compare(const asn_TYPE_descriptor_t *td, const void *aptr, } } -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; @@ -843,186 +732,3 @@ asn_double2float(double d, float *outcome) { 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/e2sm/lib/REAL_aper.c b/e2sm/lib/REAL_aper.c new file mode 100644 index 0000000..9881275 --- /dev/null +++ b/e2sm/lib/REAL_aper.c @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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); +} diff --git a/e2sm/lib/REAL_jer.c b/e2sm/lib/REAL_jer.c new file mode 100644 index 0000000..c524e4b --- /dev/null +++ b/e2sm/lib/REAL_jer.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +REAL_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_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, cb, app_key); + if(er.encoded < 0) ASN__ENCODE_FAILED; + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/REAL_oer.c b/e2sm/lib/REAL_oer.c new file mode 100644 index 0000000..679abd9 --- /dev/null +++ b/e2sm/lib/REAL_oer.c @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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; +} diff --git a/e2sm/lib/REAL_print.c b/e2sm/lib/REAL_print.c new file mode 100644 index 0000000..01daa97 --- /dev/null +++ b/e2sm/lib/REAL_print.c @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/REAL_rfill.c b/e2sm/lib/REAL_rfill.c new file mode 100644 index 0000000..733aafd --- /dev/null +++ b/e2sm/lib/REAL_rfill.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +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/e2sm/lib/REAL_uper.c b/e2sm/lib/REAL_uper.c new file mode 100644 index 0000000..d55da9f --- /dev/null +++ b/e2sm/lib/REAL_uper.c @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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); +} diff --git a/e2sm/lib/REAL_xer.c b/e2sm/lib/REAL_xer.c new file mode 100644 index 0000000..8342ec2 --- /dev/null +++ b/e2sm/lib/REAL_xer.c @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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); +} diff --git a/e2sm/lib/RELATIVE-OID.c b/e2sm/lib/RELATIVE-OID.c deleted file mode 100644 index 300dc1a..0000000 --- a/e2sm/lib/RELATIVE-OID.c +++ /dev/null @@ -1,336 +0,0 @@ -/*- - * 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/e2sm/lib/RIC-EventTriggerStyle-Item.c b/e2sm/lib/RIC-EventTriggerStyle-Item.c index a6b258d..adeed3d 100644 --- a/e2sm/lib/RIC-EventTriggerStyle-Item.c +++ b/e2sm/lib/RIC-EventTriggerStyle-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RIC-EventTriggerStyle-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RIC_EventTriggerStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Style_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-EventTriggerStyle-Type" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RIC_EventTriggerStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Style_Name, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-EventTriggerStyle-Name" }, @@ -31,7 +47,15 @@ asn_TYPE_member_t asn_MBR_RIC_EventTriggerStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Format_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-EventTriggerFormat-Type" }, @@ -62,7 +86,15 @@ asn_TYPE_descriptor_t asn_DEF_RIC_EventTriggerStyle_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RIC_EventTriggerStyle_Item_1, 3, /* Elements count */ &asn_SPC_RIC_EventTriggerStyle_Item_specs_1 /* Additional specs */ diff --git a/e2sm/lib/RIC-EventTriggerStyle-List.c b/e2sm/lib/RIC-EventTriggerStyle-List.c deleted file mode 100644 index ec73afc..0000000 --- a/e2sm/lib/RIC-EventTriggerStyle-List.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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/e2sm/lib/RIC-Format-Type.c b/e2sm/lib/RIC-Format-Type.c index f34ef41..bfeb4bc 100644 --- a/e2sm/lib/RIC-Format-Type.c +++ b/e2sm/lib/RIC-Format-Type.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RIC-Format-Type.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RIC_Format_Type = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeInteger_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/RIC-ReportStyle-Item.c b/e2sm/lib/RIC-ReportStyle-Item.c index c8c63ba..d03c28e 100644 --- a/e2sm/lib/RIC-ReportStyle-Item.c +++ b/e2sm/lib/RIC-ReportStyle-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RIC-ReportStyle-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Style_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-ReportStyle-Type" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Style_Name, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-ReportStyle-Name" }, @@ -31,7 +47,15 @@ asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Format_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-ActionFormat-Type" }, @@ -40,7 +64,15 @@ asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MeasurementInfo_Action_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "measInfo-Action-List" }, @@ -49,7 +81,15 @@ asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Format_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-IndicationHeaderFormat-Type" }, @@ -58,7 +98,15 @@ asn_TYPE_member_t asn_MBR_RIC_ReportStyle_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RIC_Format_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ric-IndicationMessageFormat-Type" }, @@ -92,7 +140,15 @@ asn_TYPE_descriptor_t asn_DEF_RIC_ReportStyle_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RIC_ReportStyle_Item_1, 6, /* Elements count */ &asn_SPC_RIC_ReportStyle_Item_specs_1 /* Additional specs */ diff --git a/e2sm/lib/RIC-ReportStyle-List.c b/e2sm/lib/RIC-ReportStyle-List.c deleted file mode 100644 index 70b7732..0000000 --- a/e2sm/lib/RIC-ReportStyle-List.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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/e2sm/lib/RIC-Style-Name.c b/e2sm/lib/RIC-Style-Name.c index 662ada6..7928a5b 100644 --- a/e2sm/lib/RIC-Style-Name.c +++ b/e2sm/lib/RIC-Style-Name.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RIC-Style-Name.h" @@ -54,7 +54,7 @@ RIC_Style_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size >= 1 && size <= 150) + if((size >= 1UL && size <= 150UL) && !check_permitted_alphabet_1(st)) { /* Constraint check succeeded */ return 0; @@ -80,12 +80,19 @@ static int asn_PER_MAP_RIC_Style_Name_1_c2v(unsigned int code) { * This type is implemented using PrintableString, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_RIC_Style_Name_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_RIC_Style_Name_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) }; @@ -99,7 +106,15 @@ asn_TYPE_descriptor_t asn_DEF_RIC_Style_Name = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RIC_Style_Name_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RIC_Style_Name_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + RIC_Style_Name_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/RIC-Style-Type.c b/e2sm/lib/RIC-Style-Type.c index d08e69a..8cc166e 100644 --- a/e2sm/lib/RIC-Style-Type.c +++ b/e2sm/lib/RIC-Style-Type.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RIC-Style-Type.h" @@ -24,7 +24,15 @@ asn_TYPE_descriptor_t asn_DEF_RIC_Style_Type = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeInteger_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/RRC-MessageID.c b/e2sm/lib/RRC-MessageID.c index 8103669..0dc8171 100644 --- a/e2sm/lib/RRC-MessageID.c +++ b/e2sm/lib/RRC-MessageID.c @@ -1,24 +1,39 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RRC-MessageID.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_rrcType_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "lTE" }, @@ -27,7 +42,15 @@ static asn_TYPE_member_t asn_MBR_rrcType_2[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RRCclass_NR, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "nR" }, @@ -55,7 +78,15 @@ asn_TYPE_descriptor_t asn_DEF_rrcType_2 = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_rrcType_constr_2, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_rrcType_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_rrcType_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_rrcType_2, 2, /* Elements count */ &asn_SPC_rrcType_specs_2 /* Additional specs */ @@ -67,7 +98,15 @@ static asn_TYPE_member_t asn_MBR_RRC_MessageID_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_rrcType_2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "rrcType" }, @@ -76,7 +115,15 @@ static asn_TYPE_member_t asn_MBR_RRC_MessageID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "messageID" }, @@ -106,7 +153,15 @@ asn_TYPE_descriptor_t asn_DEF_RRC_MessageID = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_RRC_MessageID_1, 2, /* Elements count */ &asn_SPC_RRC_MessageID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/RRCclass-LTE.c b/e2sm/lib/RRCclass-LTE.c index 6310742..7bdde95 100644 --- a/e2sm/lib/RRCclass-LTE.c +++ b/e2sm/lib/RRCclass-LTE.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RRCclass-LTE.h" @@ -11,11 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_RRCclass_LTE_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_RRCclass_LTE_value2enum_1[] = { { 0, 8, "bCCH-BCH" }, { 1, 13, "bCCH-BCH-MBMS" }, @@ -68,7 +75,15 @@ asn_TYPE_descriptor_t asn_DEF_RRCclass_LTE = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RRCclass_LTE_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RRCclass_LTE_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_RRCclass_LTE_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/RRCclass-NR.c b/e2sm/lib/RRCclass-NR.c index e85da53..afd4781 100644 --- a/e2sm/lib/RRCclass-NR.c +++ b/e2sm/lib/RRCclass-NR.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "RRCclass-NR.h" @@ -11,11 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_RRCclass_NR_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_RRCclass_NR_value2enum_1[] = { { 0, 8, "bCCH-BCH" }, { 1, 11, "bCCH-DL-SCH" }, @@ -60,7 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_RRCclass_NR = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_RRCclass_NR_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_RRCclass_NR_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_RRCclass_NR_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/RT-Period-IE.c b/e2sm/lib/RT-Period-IE.c deleted file mode 100644 index 82fd5b0..0000000 --- a/e2sm/lib/RT-Period-IE.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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/e2sm/lib/S-NSSAI.c b/e2sm/lib/S-NSSAI.c index f5eadec..d2742b5 100644 --- a/e2sm/lib/S-NSSAI.c +++ b/e2sm/lib/S-NSSAI.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "S-NSSAI.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_S_NSSAI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_SST, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "sST" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_S_NSSAI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_SD, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "sD" }, @@ -54,7 +70,15 @@ asn_TYPE_descriptor_t asn_DEF_S_NSSAI = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_S_NSSAI_1, 2, /* Elements count */ &asn_SPC_S_NSSAI_specs_1 /* Additional specs */ diff --git a/e2sm/lib/SD.c b/e2sm/lib/SD.c index fcbcce8..42a520c 100644 --- a/e2sm/lib/SD.c +++ b/e2sm/lib/SD.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "SD.h" @@ -22,7 +22,7 @@ SD_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 3)) { + if((size == 3UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ SD_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_SD_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_SD_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_SD = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_SD_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_SD_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SD_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/SNSSAI.c b/e2sm/lib/SNSSAI.c deleted file mode 100644 index 4f63ad9..0000000 --- a/e2sm/lib/SNSSAI.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/e2sm/lib/SST.c b/e2sm/lib/SST.c index cb7f498..0c895e5 100644 --- a/e2sm/lib/SST.c +++ b/e2sm/lib/SST.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "SST.h" @@ -22,7 +22,7 @@ SST_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 1)) { + if((size == 1UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ SST_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_SST_constr_1 CC_NOTUSED = { + { 0, 0 }, + 1 /* (SIZE(1..1)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_SST_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_SST = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_SST_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_SST_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SST_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/ServedPlmnPerCellListItem.c b/e2sm/lib/ServedPlmnPerCellListItem.c deleted file mode 100644 index 7ebe3e6..0000000 --- a/e2sm/lib/ServedPlmnPerCellListItem.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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/e2sm/lib/ServingCell-ARFCN.c b/e2sm/lib/ServingCell-ARFCN.c index a4df51f..b5744ce 100644 --- a/e2sm/lib/ServingCell-ARFCN.c +++ b/e2sm/lib/ServingCell-ARFCN.c @@ -1,25 +1,40 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ServingCell-ARFCN.h" #include "NR-ARFCN.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ServingCell_ARFCN_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "nR" }, @@ -28,7 +43,15 @@ static asn_TYPE_member_t asn_MBR_ServingCell_ARFCN_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_E_UTRA_ARFCN, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eUTRA" }, @@ -55,7 +78,15 @@ asn_TYPE_descriptor_t asn_DEF_ServingCell_ARFCN = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_ServingCell_ARFCN_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ServingCell_ARFCN_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ServingCell_ARFCN_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_ServingCell_ARFCN_1, 2, /* Elements count */ &asn_SPC_ServingCell_ARFCN_specs_1 /* Additional specs */ diff --git a/e2sm/lib/ServingCell-PCI.c b/e2sm/lib/ServingCell-PCI.c index 349468e..226a2b9 100644 --- a/e2sm/lib/ServingCell-PCI.c +++ b/e2sm/lib/ServingCell-PCI.c @@ -1,24 +1,39 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "ServingCell-PCI.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_ServingCell_PCI_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "nR" }, @@ -27,7 +42,15 @@ static asn_TYPE_member_t asn_MBR_ServingCell_PCI_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_E_UTRA_PCI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eUTRA" }, @@ -54,7 +77,15 @@ asn_TYPE_descriptor_t asn_DEF_ServingCell_PCI = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_ServingCell_PCI_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_ServingCell_PCI_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_ServingCell_PCI_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_ServingCell_PCI_1, 2, /* Elements count */ &asn_SPC_ServingCell_PCI_specs_1 /* Additional specs */ diff --git a/e2sm/lib/SlicePerPlmnPerCellListItem.c b/e2sm/lib/SlicePerPlmnPerCellListItem.c deleted file mode 100644 index f4e75f8..0000000 --- a/e2sm/lib/SlicePerPlmnPerCellListItem.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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/e2sm/lib/SliceToReportListItem.c b/e2sm/lib/SliceToReportListItem.c deleted file mode 100644 index b02b3da..0000000 --- a/e2sm/lib/SliceToReportListItem.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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/e2sm/lib/SubscriberProfileIDforRFP.c b/e2sm/lib/SubscriberProfileIDforRFP.c index de6ac12..d554c9a 100644 --- a/e2sm/lib/SubscriberProfileIDforRFP.c +++ b/e2sm/lib/SubscriberProfileIDforRFP.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "SubscriberProfileIDforRFP.h" @@ -21,7 +21,7 @@ SubscriberProfileIDforRFP_constraint(const asn_TYPE_descriptor_t *td, const void value = *(const long *)sptr; - if((value >= 1 && value <= 256)) { + if((value >= 1L && value <= 256L)) { /* Constraint check succeeded */ return 0; } else { @@ -36,11 +36,18 @@ SubscriberProfileIDforRFP_constraint(const asn_TYPE_descriptor_t *td, const void * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_SubscriberProfileIDforRFP_constr_1 CC_NOTUSED = { + { 2, 1 } /* (1..256) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_SubscriberProfileIDforRFP_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_SubscriberProfileIDforRFP = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_SubscriberProfileIDforRFP_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_SubscriberProfileIDforRFP_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SubscriberProfileIDforRFP_constraint + }, 0, 0, /* No members */ 0 /* No specifics */ }; diff --git a/e2sm/lib/SupportedSULBandList.c b/e2sm/lib/SupportedSULBandList.c deleted file mode 100644 index 94d81c5..0000000 --- a/e2sm/lib/SupportedSULBandList.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/lib/SupportedSULFreqBandItem.c b/e2sm/lib/SupportedSULFreqBandItem.c deleted file mode 100644 index 4e64674..0000000 --- a/e2sm/lib/SupportedSULFreqBandItem.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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/e2sm/lib/T61String.c b/e2sm/lib/T61String.c deleted file mode 100644 index d3de88b..0000000 --- a/e2sm/lib/T61String.c +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * 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/e2sm/lib/TeletexString.c b/e2sm/lib/TeletexString.c deleted file mode 100644 index 9756c72..0000000 --- a/e2sm/lib/TeletexString.c +++ /dev/null @@ -1,194 +0,0 @@ -/*- - * 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/e2sm/lib/TestCond-Expression.c b/e2sm/lib/TestCond-Expression.c index 808341d..04e45c7 100644 --- a/e2sm/lib/TestCond-Expression.c +++ b/e2sm/lib/TestCond-Expression.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TestCond-Expression.h" @@ -11,11 +11,18 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_TestCond_Expression_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_TestCond_Expression_value2enum_1[] = { { 0, 5, "equal" }, { 1, 11, "greaterthan" }, @@ -54,7 +61,15 @@ asn_TYPE_descriptor_t asn_DEF_TestCond_Expression = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TestCond_Expression_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TestCond_Expression_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_TestCond_Expression_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/TestCond-Type.c b/e2sm/lib/TestCond-Type.c index 103efdf..90062be 100644 --- a/e2sm/lib/TestCond-Type.c +++ b/e2sm/lib/TestCond-Type.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TestCond-Type.h" @@ -31,41 +31,90 @@ * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_gBR_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_aMBR_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_isStat_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_isCatM_constr_11 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_rSRP_constr_14 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_rSRQ_constr_17 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_TestCond_Type_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const asn_INTEGER_enum_map_t asn_MAP_gBR_value2enum_2[] = { { 0, 4, "true" } /* This list is extensible */ @@ -98,7 +147,15 @@ asn_TYPE_descriptor_t asn_DEF_gBR_2 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_gBR_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_gBR_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_gBR_specs_2 /* Additional specs */ }; @@ -135,7 +192,15 @@ asn_TYPE_descriptor_t asn_DEF_aMBR_5 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_aMBR_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_aMBR_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_aMBR_specs_5 /* Additional specs */ }; @@ -172,7 +237,15 @@ asn_TYPE_descriptor_t asn_DEF_isStat_8 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_isStat_constr_8, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_isStat_constr_8, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_isStat_specs_8 /* Additional specs */ }; @@ -209,7 +282,15 @@ asn_TYPE_descriptor_t asn_DEF_isCatM_11 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_isCatM_constr_11, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_isCatM_constr_11, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_isCatM_specs_11 /* Additional specs */ }; @@ -246,7 +327,15 @@ asn_TYPE_descriptor_t asn_DEF_rSRP_14 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_rSRP_constr_14, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_rSRP_constr_14, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_rSRP_specs_14 /* Additional specs */ }; @@ -283,7 +372,15 @@ asn_TYPE_descriptor_t asn_DEF_rSRQ_17 = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_rSRQ_constr_17, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_rSRQ_constr_17, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + NativeEnumerated_constraint + }, 0, 0, /* Defined elsewhere */ &asn_SPC_rSRQ_specs_17 /* Additional specs */ }; @@ -294,7 +391,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Type_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_gBR_2, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gBR" }, @@ -303,7 +408,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Type_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_aMBR_5, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "aMBR" }, @@ -312,7 +425,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Type_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_isStat_8, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "isStat" }, @@ -321,7 +442,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Type_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_isCatM_11, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "isCatM" }, @@ -330,7 +459,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Type_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_rSRP_14, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "rSRP" }, @@ -339,7 +476,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Type_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_rSRQ_17, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "rSRQ" }, @@ -370,7 +515,15 @@ asn_TYPE_descriptor_t asn_DEF_TestCond_Type = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_TestCond_Type_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TestCond_Type_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TestCond_Type_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_TestCond_Type_1, 6, /* Elements count */ &asn_SPC_TestCond_Type_specs_1 /* Additional specs */ diff --git a/e2sm/lib/TestCond-Value.c b/e2sm/lib/TestCond-Value.c index 0b6a55d..5f73afe 100644 --- a/e2sm/lib/TestCond-Value.c +++ b/e2sm/lib/TestCond-Value.c @@ -1,24 +1,39 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TestCond-Value.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_TestCond_Value_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "valueInt" }, @@ -27,7 +42,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Value_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "valueEnum" }, @@ -36,7 +59,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Value_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_BOOLEAN, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "valueBool" }, @@ -45,7 +76,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Value_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "valueBitS" }, @@ -54,7 +93,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Value_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_OCTET_STRING, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "valueOctS" }, @@ -63,7 +110,15 @@ asn_TYPE_member_t asn_MBR_TestCond_Value_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_PrintableString, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "valuePrtS" }, @@ -94,7 +149,15 @@ asn_TYPE_descriptor_t asn_DEF_TestCond_Value = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_TestCond_Value_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TestCond_Value_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TestCond_Value_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_TestCond_Value_1, 6, /* Elements count */ &asn_SPC_TestCond_Value_specs_1 /* Additional specs */ diff --git a/e2sm/lib/TestCondInfo.c b/e2sm/lib/TestCondInfo.c index 6b5be85..5f28d6c 100644 --- a/e2sm/lib/TestCondInfo.c +++ b/e2sm/lib/TestCondInfo.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TestCondInfo.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_TestCondInfo_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_TestCond_Type, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "testType" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_TestCondInfo_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_TestCond_Expression, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "testExpr" }, @@ -31,7 +47,15 @@ asn_TYPE_member_t asn_MBR_TestCondInfo_1[] = { +1, /* EXPLICIT tag at current level */ &asn_DEF_TestCond_Value, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "testValue" }, @@ -62,7 +86,15 @@ asn_TYPE_descriptor_t asn_DEF_TestCondInfo = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_TestCondInfo_1, 3, /* Elements count */ &asn_SPC_TestCondInfo_specs_1 /* Additional specs */ diff --git a/e2sm/lib/TimeStamp.c b/e2sm/lib/TimeStamp.c index 36a5f47..3c7f7c0 100644 --- a/e2sm/lib/TimeStamp.c +++ b/e2sm/lib/TimeStamp.c @@ -1,8 +1,8 @@ /* * 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` + * found in "kpm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "TimeStamp.h" @@ -22,7 +22,7 @@ TimeStamp_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, size = st->size; - if((size == 4)) { + if((size == 4UL)) { /* Constraint check succeeded */ return 0; } else { @@ -37,11 +37,18 @@ TimeStamp_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_TimeStamp_constr_1 CC_NOTUSED = { + { 0, 0 }, + 4 /* (SIZE(4..4)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ static const ber_tlv_tag_t asn_DEF_TimeStamp_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; @@ -55,7 +62,15 @@ asn_TYPE_descriptor_t asn_DEF_TimeStamp = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_TimeStamp_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_TimeStamp_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + TimeStamp_constraint + }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/e2sm/lib/Timestamp.c b/e2sm/lib/Timestamp.c deleted file mode 100644 index 41a862f..0000000 --- a/e2sm/lib/Timestamp.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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/e2sm/lib/Trigger-ConditionIE-Item.c b/e2sm/lib/Trigger-ConditionIE-Item.c deleted file mode 100644 index c434c1b..0000000 --- a/e2sm/lib/Trigger-ConditionIE-Item.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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/e2sm/lib/UE-Report-Type.c b/e2sm/lib/UE-Report-Type.c deleted file mode 100644 index 34f7512..0000000 --- a/e2sm/lib/UE-Report-Type.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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/e2sm/lib/UEID-EN-GNB.c b/e2sm/lib/UEID-EN-GNB.c index 16c48e6..d24f428 100644 --- a/e2sm/lib/UEID-EN-GNB.c +++ b/e2sm/lib/UEID-EN-GNB.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-EN-GNB.h" @@ -14,7 +14,15 @@ asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_ENB_UE_X2AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "m-eNB-UE-X2AP-ID" }, @@ -23,7 +31,15 @@ asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_ENB_UE_X2AP_ID_Extension, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "m-eNB-UE-X2AP-ID-Extension" }, @@ -32,7 +48,15 @@ asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalENB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "globalENB-ID" }, @@ -41,7 +65,15 @@ asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GNB_CU_UE_F1AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-UE-F1AP-ID" }, @@ -50,7 +82,15 @@ asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-CP-UE-E1AP-ID-List" }, @@ -59,7 +99,15 @@ asn_TYPE_member_t asn_MBR_UEID_EN_GNB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANUEID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ran-UEID" }, @@ -95,7 +143,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_EN_GNB = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_UEID_EN_GNB_1, 6, /* Elements count */ &asn_SPC_UEID_EN_GNB_specs_1 /* Additional specs */ diff --git a/e2sm/lib/UEID-ENB.c b/e2sm/lib/UEID-ENB.c index 4897f16..edd9f0d 100644 --- a/e2sm/lib/UEID-ENB.c +++ b/e2sm/lib/UEID-ENB.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-ENB.h" @@ -14,7 +14,15 @@ asn_TYPE_member_t asn_MBR_UEID_ENB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_MME_UE_S1AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "mME-UE-S1AP-ID" }, @@ -23,7 +31,15 @@ asn_TYPE_member_t asn_MBR_UEID_ENB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GUMMEI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gUMMEI" }, @@ -32,7 +48,15 @@ asn_TYPE_member_t asn_MBR_UEID_ENB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_ENB_UE_X2AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "m-eNB-UE-X2AP-ID" }, @@ -41,7 +65,15 @@ asn_TYPE_member_t asn_MBR_UEID_ENB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_ENB_UE_X2AP_ID_Extension, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "m-eNB-UE-X2AP-ID-Extension" }, @@ -50,7 +82,15 @@ asn_TYPE_member_t asn_MBR_UEID_ENB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GlobalENB_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "globalENB-ID" }, @@ -85,7 +125,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_ENB = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_UEID_ENB_1, 5, /* Elements count */ &asn_SPC_UEID_ENB_specs_1 /* Additional specs */ diff --git a/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c b/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c index 05cfbc3..135cfcc 100644 --- a/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c +++ b/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-GNB-CU-CP-E1AP-ID-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_E1AP_ID_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GNB_CU_CP_UE_E1AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-CP-UE-E1AP-ID" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c b/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c index 427847d..2142d6f 100644 --- a/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c +++ b/e2sm/lib/UEID-GNB-CU-CP-E1AP-ID-List.c @@ -1,25 +1,40 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-GNB-CU-CP-E1AP-ID-List.h" #include "UEID-GNB-CU-CP-E1AP-ID-Item.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +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)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_E1AP_ID_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_UEID_GNB_CU_CP_E1AP_ID_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c b/e2sm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c index 4c1cedd..d8c9810 100644 --- a/e2sm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c +++ b/e2sm/lib/UEID-GNB-CU-CP-F1AP-ID-Item.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-GNB-CU-CP-F1AP-ID-Item.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_UEID_GNB_CU_CP_F1AP_ID_Item_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GNB_CU_UE_F1AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-UE-F1AP-ID" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_CP_F1AP_ID_Item = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/UEID-GNB-CU-F1AP-ID-List.c b/e2sm/lib/UEID-GNB-CU-F1AP-ID-List.c index 578eedc..12e5c4c 100644 --- a/e2sm/lib/UEID-GNB-CU-F1AP-ID-List.c +++ b/e2sm/lib/UEID-GNB-CU-F1AP-ID-List.c @@ -1,25 +1,40 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-GNB-CU-F1AP-ID-List.h" #include "UEID-GNB-CU-CP-F1AP-ID-Item.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_UEID_GNB_CU_F1AP_ID_List_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..4)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "" }, @@ -42,7 +57,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_F1AP_ID_List = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_UEID_GNB_CU_F1AP_ID_List_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_UEID_GNB_CU_F1AP_ID_List_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/UEID-GNB-CU-UP.c b/e2sm/lib/UEID-GNB-CU-UP.c index d8f4b1c..0865b6e 100644 --- a/e2sm/lib/UEID-GNB-CU-UP.c +++ b/e2sm/lib/UEID-GNB-CU-UP.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-GNB-CU-UP.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_UEID_GNB_CU_UP_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GNB_CU_CP_UE_E1AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-CP-UE-E1AP-ID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_UEID_GNB_CU_UP_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANUEID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ran-UEID" }, @@ -54,7 +70,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_GNB_CU_UP = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/UEID-GNB-DU.c b/e2sm/lib/UEID-GNB-DU.c index 3b2eae6..7b4eed0 100644 --- a/e2sm/lib/UEID-GNB-DU.c +++ b/e2sm/lib/UEID-GNB-DU.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-GNB-DU.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_UEID_GNB_DU_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GNB_CU_UE_F1AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-UE-F1AP-ID" }, @@ -22,7 +30,15 @@ asn_TYPE_member_t asn_MBR_UEID_GNB_DU_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_RANUEID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ran-UEID" }, @@ -54,7 +70,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_GNB_DU = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_UEID_GNB_DU_1, 2, /* Elements count */ &asn_SPC_UEID_GNB_DU_specs_1 /* Additional specs */ diff --git a/e2sm/lib/UEID-GNB.c b/e2sm/lib/UEID-GNB.c index 812dbf0..3f7a17f 100644 --- a/e2sm/lib/UEID-GNB.c +++ b/e2sm/lib/UEID-GNB.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-GNB.h" @@ -10,14 +10,21 @@ #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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "amf-UE-NGAP-ID" }, @@ -26,66 +33,105 @@ asn_TYPE_member_t asn_MBR_UEID_GNB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GUAMI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "guami" }, - { ATF_POINTER, 6, offsetof(struct UEID_GNB, gNB_CU_UE_F1AP_ID_List), + { ATF_POINTER, 5, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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), + { ATF_POINTER, 4, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-CP-UE-E1AP-ID-List" }, - { ATF_POINTER, 4, offsetof(struct UEID_GNB, ran_UEID), + { ATF_POINTER, 3, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ran-UEID" }, - { ATF_POINTER, 3, offsetof(struct UEID_GNB, m_NG_RAN_UE_XnAP_ID), + { ATF_POINTER, 2, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "m-NG-RAN-UE-XnAP-ID" }, - { ATF_POINTER, 2, offsetof(struct UEID_GNB, globalGNB_ID), + { ATF_POINTER, 1, 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" + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 }, - { 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" + "globalGNB-ID" }, }; -static const int asn_MAP_UEID_GNB_oms_1[] = { 2, 3, 4, 5, 6, 7 }; +static const int asn_MAP_UEID_GNB_oms_1[] = { 2, 3, 4, 5, 6 }; static const ber_tlv_tag_t asn_DEF_UEID_GNB_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; @@ -96,16 +142,15 @@ static const asn_TYPE_tag2member_t asn_MAP_UEID_GNB_tag2el_1[] = { { (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_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* globalGNB-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 */ + 7, /* Count of tags in the map */ asn_MAP_UEID_GNB_oms_1, /* Optional members */ - 5, 1, /* Root/Additions */ + 5, 0, /* Root/Additions */ 7, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_UEID_GNB = { @@ -118,9 +163,17 @@ asn_TYPE_descriptor_t asn_DEF_UEID_GNB = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_UEID_GNB_1, - 8, /* Elements count */ + 7, /* Elements count */ &asn_SPC_UEID_GNB_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/UEID-NG-ENB-DU.c b/e2sm/lib/UEID-NG-ENB-DU.c index 36a652d..ca03684 100644 --- a/e2sm/lib/UEID-NG-ENB-DU.c +++ b/e2sm/lib/UEID-NG-ENB-DU.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID-NG-ENB-DU.h" @@ -13,7 +13,15 @@ asn_TYPE_member_t asn_MBR_UEID_NG_ENB_DU_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_NGENB_CU_UE_W1AP_ID, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ng-eNB-CU-UE-W1AP-ID" }, @@ -42,7 +50,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB_DU = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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/e2sm/lib/UEID-NG-ENB.c b/e2sm/lib/UEID-NG-ENB.c index cf9fd1e..4986931 100644 --- a/e2sm/lib/UEID-NG-ENB.c +++ b/e2sm/lib/UEID-NG-ENB.c @@ -1,21 +1,28 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "amf-UE-NGAP-ID" }, @@ -24,48 +31,71 @@ asn_TYPE_member_t asn_MBR_UEID_NG_ENB_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_GUAMI, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "guami" }, - { ATF_POINTER, 4, offsetof(struct UEID_NG_ENB, ng_eNB_CU_UE_W1AP_ID), + { ATF_POINTER, 3, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 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), + { ATF_POINTER, 2, 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "m-NG-RAN-UE-XnAP-ID" }, - { ATF_POINTER, 2, offsetof(struct UEID_NG_ENB, globalNgENB_ID), + { ATF_POINTER, 1, 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" + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 }, - { 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" + "globalNgENB-ID" }, }; -static const int asn_MAP_UEID_NG_ENB_oms_1[] = { 2, 3, 4, 5 }; +static const int asn_MAP_UEID_NG_ENB_oms_1[] = { 2, 3, 4 }; static const ber_tlv_tag_t asn_DEF_UEID_NG_ENB_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; @@ -74,16 +104,15 @@ static const asn_TYPE_tag2member_t asn_MAP_UEID_NG_ENB_tag2el_1[] = { { (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_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* globalNgENB-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 */ + 5, /* Count of tags in the map */ asn_MAP_UEID_NG_ENB_oms_1, /* Optional members */ - 3, 1, /* Root/Additions */ + 3, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB = { @@ -96,9 +125,17 @@ asn_TYPE_descriptor_t asn_DEF_UEID_NG_ENB = { 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + SEQUENCE_constraint + }, asn_MBR_UEID_NG_ENB_1, - 6, /* Elements count */ + 5, /* Elements count */ &asn_SPC_UEID_NG_ENB_specs_1 /* Additional specs */ }; diff --git a/e2sm/lib/UEID.c b/e2sm/lib/UEID.c index fcce55c..ba6dac6 100644 --- a/e2sm/lib/UEID.c +++ b/e2sm/lib/UEID.c @@ -1,8 +1,8 @@ /* * 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` + * found in "e2sm2_0.asn" + * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -gen-APER` */ #include "UEID.h" @@ -14,18 +14,33 @@ #include "UEID-NG-ENB-DU.h" #include "UEID-EN-GNB.h" #include "UEID-ENB.h" +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_UEID_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 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 */ }; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 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 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-UEID" }, @@ -34,7 +49,15 @@ asn_TYPE_member_t asn_MBR_UEID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UEID_GNB_DU, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-DU-UEID" }, @@ -43,7 +66,15 @@ asn_TYPE_member_t asn_MBR_UEID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UEID_GNB_CU_UP, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "gNB-CU-UP-UEID" }, @@ -52,7 +83,15 @@ asn_TYPE_member_t asn_MBR_UEID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UEID_NG_ENB, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ng-eNB-UEID" }, @@ -61,7 +100,15 @@ asn_TYPE_member_t asn_MBR_UEID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UEID_NG_ENB_DU, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "ng-eNB-DU-UEID" }, @@ -70,7 +117,15 @@ asn_TYPE_member_t asn_MBR_UEID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UEID_EN_GNB, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "en-gNB-UEID" }, @@ -79,7 +134,15 @@ asn_TYPE_member_t asn_MBR_UEID_1[] = { -1, /* IMPLICIT tag at current level */ &asn_DEF_UEID_ENB, 0, - { 0, 0, 0 }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + 0 + }, 0, 0, /* No default value */ "eNB-UEID" }, @@ -111,7 +174,15 @@ asn_TYPE_descriptor_t asn_DEF_UEID = { 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, &asn_PER_type_UEID_constr_1, CHOICE_constraint }, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_UEID_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_UEID_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + CHOICE_constraint + }, asn_MBR_UEID_1, 7, /* Elements count */ &asn_SPC_UEID_specs_1 /* Additional specs */ diff --git a/e2sm/lib/UTCTime.c b/e2sm/lib/UTCTime.c deleted file mode 100644 index 07891ac..0000000 --- a/e2sm/lib/UTCTime.c +++ /dev/null @@ -1,277 +0,0 @@ -/*- - * 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/e2sm/lib/UTF8String.c b/e2sm/lib/UTF8String.c deleted file mode 100644 index c023ca1..0000000 --- a/e2sm/lib/UTF8String.c +++ /dev/null @@ -1,294 +0,0 @@ -/*- - * 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/e2sm/lib/UniversalString.c b/e2sm/lib/UniversalString.c deleted file mode 100644 index 0f6d796..0000000 --- a/e2sm/lib/UniversalString.c +++ /dev/null @@ -1,243 +0,0 @@ -/*- - * 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/e2sm/lib/VideotexString.c b/e2sm/lib/VideotexString.c deleted file mode 100644 index 69417bd..0000000 --- a/e2sm/lib/VideotexString.c +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * 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/e2sm/lib/VisibleString.c b/e2sm/lib/VisibleString.c deleted file mode 100644 index 03fef8b..0000000 --- a/e2sm/lib/VisibleString.c +++ /dev/null @@ -1,99 +0,0 @@ -/*- - * 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/e2sm/lib/aper_decoder.c b/e2sm/lib/aper_decoder.c new file mode 100644 index 0000000..0637b6a --- /dev/null +++ b/e2sm/lib/aper_decoder.c @@ -0,0 +1,91 @@ +#include +#include +#include + +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/e2sm/lib/aper_encoder.c b/e2sm/lib/aper_encoder.c new file mode 100644 index 0000000..d9b1c1d --- /dev/null +++ b/e2sm/lib/aper_encoder.c @@ -0,0 +1,129 @@ +#include +#include +#include + +/* + * Argument type and callback necessary for aper_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 +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); + } +} + +/* + * Internally useful functions. + */ + +/* Flush partially filled buffer */ +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 ? cb : ignore_output; + 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/e2sm/lib/aper_opentype.c b/e2sm/lib/aper_opentype.c new file mode 100644 index 0000000..cdd5999 --- /dev/null +++ b/e2sm/lib/aper_opentype.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2007 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +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, -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;) { + int need_eom = 0; + ssize_t maySave = aper_put_length(po, -1, -1, toGo, &need_eom); + if(maySave < 0) break; + if(per_put_many_bits(po, bptr, maySave * 8)) break; + bptr = (char *)bptr + maySave; + toGo -= maySave; + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) { + FREEMEM(buf); + return -1; + } + } + + FREEMEM(buf); + if(toGo) return -1; + + ASN_DEBUG("Open type put %s of length %zd + 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/e2sm/lib/aper_support.c b/e2sm/lib/aper_support.c new file mode 100644 index 0000000..1f34c60 --- /dev/null +++ b/e2sm/lib/aper_support.c @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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, ssize_t lb, ssize_t ub, + int ebits, int *repeat) { + int constrained = (lb >= 0) && (ub >= 0); + ssize_t value; + + *repeat = 0; + + if (constrained && ub < 65536) { + int range = ub - lb + 1; + 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) /* #11.9.3.6 */ + return (value & 0x7F); + if((value & 64) == 0) { /* #11.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, #11.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=%zd", length); + return length; + } else { + int repeat; + length = aper_get_length(pd, -1, -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; + int length; + + /* handle indefinite range */ + length = per_get_few_bits(pd, 1); + if (length == 0) + return per_get_few_bits(pd, 6); + + if (aper_get_align(pd) < 0) + return -1; + + length = per_get_few_bits(pd, 8); + /* the length is not likely to be that big */ + if (length > 4) + return -1; + value = 0; + if (per_get_many_bits(pd, (uint8_t *)&value, 0, length * 8) < 0) + return -1; + return value; + } + 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, ssize_t lb, ssize_t ub, size_t n, int *need_eom) { + int constrained = (lb >= 0) && (ub >= 0); + int dummy = 0; + if(!need_eom) need_eom = &dummy; + + *need_eom = 0; + + + ASN_DEBUG("APER put length %zu with range (%zd..%zd)", n, lb, ub); + + /* 11.9 X.691 Note 2 */ + if (constrained && ub < 65536) { + int range = ub - lb + 1; + return aper_put_nsnnwn(po, range, n) ? -1 : (ssize_t)n; + } + + if (aper_put_align(po) < 0) + return -1; + + if(n <= 127) { /* #11.9.3.6 */ + return per_put_few_bits(po, n, 8) + ? -1 : (ssize_t)n; + } + else if(n < 16384) /* #11.9.3.7 */ + return per_put_few_bits(po, n|0x8000, 16) + ? -1 : (ssize_t)n; + + *need_eom = 0 == (n & 16383); + n >>= 14; + if(n > 4) { + *need_eom = 0; + n = 4; + } + + return per_put_few_bits(po, 0xC0 | n, 8) + ? -1 : (ssize_t)(n << 14); +} + + +int +aper_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 { + if(aper_put_length(po, -1, -1, length, NULL) != (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) { + if (number >= range) + return -1; + bytes = 1; + } else if(range <= 65536) { + if (number >= range) + return -1; + 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/e2sm/lib/asn_application.c b/e2sm/lib/asn_application.c index 2bff460..7992185 100644 --- a/e2sm/lib/asn_application.c +++ b/e2sm/lib/asn_application.c @@ -226,7 +226,9 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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}; +#if !defined(ASN_DISABLE_XER_SUPPORT) enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ (void)opt_codec_ctx; /* Parameters are not checked on encode yet. */ @@ -265,6 +267,7 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, errno = ENOENT; /* Randomization doesn't make sense on output. */ ASN__ENCODE_FAILED; +#if !defined(ASN_DISABLE_BER_SUPPORT) case ATS_BER: /* BER is a superset of DER. */ /* Fall through. */ @@ -273,27 +276,29 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* DER is not defined for this type. */ + errno = ENOENT; /* DER is not defined for this type. */ } } } else { - errno = ENOENT; /* Transfer syntax is not defined for this type. */ + 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. */ + 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. */ +#else + case ATS_BER: + case ATS_DER: + case ATS_CER: + errno = ENOENT; /* BER is not defined. */ ASN__ENCODE_FAILED; - break; -#else /* ASN_DISABLE_OER_SUPPORT */ + +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ + +#if !defined(ASN_DISABLE_OER_SUPPORT) case ATS_BASIC_OER: /* CANONICAL-OER is a superset of BASIC-OER. */ /* Fall through. */ @@ -302,27 +307,25 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* OER is not defined for this type. */ + errno = ENOENT; /* OER is not defined for this type. */ } } } else { - errno = ENOENT; /* Transfer syntax is not defined for this type. */ + 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. */ +#else + case ATS_BASIC_OER: + case ATS_CANONICAL_OER: + errno = ENOENT; /* OER is not defined. */ ASN__ENCODE_FAILED; break; -#else /* ASN_DISABLE_PER_SUPPORT */ +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ + +#if !defined(ASN_DISABLE_UPER_SUPPORT) case ATS_UNALIGNED_BASIC_PER: /* CANONICAL-UPER is a superset of BASIC-UPER. */ /* Fall through. */ @@ -331,9 +334,9 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* UPER is not defined for this type. */ + errno = ENOENT; /* UPER is not defined for this type. */ } } else { ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); @@ -343,16 +346,24 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, errno = EBADF; ASN__ENCODE_FAILED; } - er.encoded = 8; /* Exactly 8 zero bits is added. */ + 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. */ + errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; +#else + case ATS_UNALIGNED_BASIC_PER: + case ATS_UNALIGNED_CANONICAL_PER: + errno = ENOENT; /* UPER is not defined. */ + ASN__ENCODE_FAILED; + break; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) case ATS_ALIGNED_BASIC_PER: /* CANONICAL-APER is a superset of BASIC-APER. */ /* Fall through. */ @@ -361,9 +372,9 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* APER is not defined for this type. */ + errno = ENOENT; /* APER is not defined for this type. */ } } else { ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); @@ -373,18 +384,25 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, errno = EBADF; ASN__ENCODE_FAILED; } - er.encoded = 8; /* Exactly 8 zero bits is added. */ + 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. */ + errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; -#endif /* ASN_DISABLE_PER_SUPPORT */ +#else + case ATS_ALIGNED_BASIC_PER: + case ATS_ALIGNED_CANONICAL_PER: + errno = ENOENT; /* APER is not defined. */ + ASN__ENCODE_FAILED; + break; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) case ATS_BASIC_XER: /* CANONICAL-XER is a superset of BASIC-XER. */ xer_flags &= ~XER_F_CANONICAL; @@ -395,17 +413,41 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, 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. */ + errno = EBADF; /* Structure has incorrect form. */ } else { - errno = ENOENT; /* XER is not defined for this type. */ + errno = ENOENT; /* XER is not defined for this type. */ } } } else { - errno = ENOENT; /* Transfer syntax is not defined for this type. */ + errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; +#else + case ATS_BASIC_XER: + case ATS_CANONICAL_XER: + errno = ENOENT; /* XER is not defined. */ + ASN__ENCODE_FAILED; + break; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + case ATS_JER: + if(td->op->jer_encoder) { + er = jer_encode(td, sptr, callback, callback_key); + if(er.encoded == -1) { + if(er.failed_type && er.failed_type->op->jer_encoder) { + errno = EBADF; /* Structure has incorrect form. */ + } else { + errno = ENOENT; /* JER is not defined for this type. */ + } + } + } else { + errno = ENOENT; /* Transfer syntax is not defined for this type. */ + ASN__ENCODE_FAILED; + } + break; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ default: errno = ENOENT; ASN__ENCODE_FAILED; @@ -430,6 +472,7 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx, ASN__DECODE_FAILED; case ATS_RANDOM: +#if !defined(ASN_DISABLE_RFILL_SUPPORT) if(!td->op->random_fill) { ASN__DECODE_FAILED; } else { @@ -441,41 +484,55 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx, } } break; +#else + errno = ENOENT; + ASN__DECODE_FAILED; +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ case ATS_DER: case ATS_BER: +#if !defined(ASN_DISABLE_BER_SUPPORT) return ber_decode(opt_codec_ctx, td, sptr, buffer, size); +#else + errno = ENOENT; + ASN__DECODE_FAILED; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ case ATS_BASIC_OER: case ATS_CANONICAL_OER: -#ifdef ASN_DISABLE_OER_SUPPORT +#if !defined(ASN_DISABLE_OER_SUPPORT) + return oer_decode(opt_codec_ctx, td, sptr, buffer, size); +#else errno = ENOENT; ASN__DECODE_FAILED; -#else - return oer_decode(opt_codec_ctx, td, sptr, buffer, size); -#endif +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ case ATS_UNALIGNED_BASIC_PER: case ATS_UNALIGNED_CANONICAL_PER: -#ifdef ASN_DISABLE_PER_SUPPORT +#if !defined(ASN_DISABLE_UPER_SUPPORT) + return uper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#else errno = ENOENT; ASN__DECODE_FAILED; -#else - return uper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); -#endif +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ case ATS_ALIGNED_BASIC_PER: case ATS_ALIGNED_CANONICAL_PER: -#ifdef ASN_DISABLE_PER_SUPPORT +#if !defined(ASN_DISABLE_APER_SUPPORT) + return aper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); +#else errno = ENOENT; ASN__DECODE_FAILED; -#else - return aper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); -#endif +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ case ATS_BASIC_XER: case ATS_CANONICAL_XER: +#if !defined(ASN_DISABLE_XER_SUPPORT) return xer_decode(opt_codec_ctx, td, sptr, buffer, size); +#else + errno = ENOENT; + ASN__DECODE_FAILED; +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ } } diff --git a/e2sm/lib/asn_codecs_prim.c b/e2sm/lib/asn_codecs_prim.c index fc24247..f3fdbfd 100644 --- a/e2sm/lib/asn_codecs_prim.c +++ b/e2sm/lib/asn_codecs_prim.c @@ -4,115 +4,6 @@ */ #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, @@ -138,180 +29,3 @@ ASN__PRIMITIVE_TYPE_free(const asn_TYPE_descriptor_t *td, void *sptr, 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/e2sm/lib/asn_codecs_prim_ber.c b/e2sm/lib/asn_codecs_prim_ber.c new file mode 100644 index 0000000..c5c2cef --- /dev/null +++ b/e2sm/lib/asn_codecs_prim_ber.c @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#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); +} diff --git a/e2sm/lib/asn_codecs_prim_xer.c b/e2sm/lib/asn_codecs_prim_xer.c new file mode 100644 index 0000000..70c91bc --- /dev/null +++ b/e2sm/lib/asn_codecs_prim_xer.c @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * 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 = (chunk_buf == NULL)? NULL : ((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/e2sm/lib/asn_internal.c b/e2sm/lib/asn_internal.c index 004660b..c2a8108 100644 --- a/e2sm/lib/asn_internal.c +++ b/e2sm/lib/asn_internal.c @@ -14,10 +14,10 @@ asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key, va_start(args, fmt); wrote = vsnprintf(buf, buf_size, fmt, args); + va_end(args); if(wrote < (ssize_t)buf_size) { if(wrote < 0) { if(buf != scratch) FREEMEM(buf); - va_end(args); return -1; } break; @@ -26,12 +26,11 @@ asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key, buf_size <<= 1; if(buf == scratch) { buf = MALLOC(buf_size); - if(!buf) { va_end(args); return -1; } + if(!buf) return -1; } else { void *p = REALLOC(buf, buf_size); if(!p) { FREEMEM(buf); - va_end(args); return -1; } buf = p; diff --git a/e2sm/lib/asn_random_fill.c b/e2sm/lib/asn_random_fill.c index 819cf70..15771b6 100644 --- a/e2sm/lib/asn_random_fill.c +++ b/e2sm/lib/asn_random_fill.c @@ -42,13 +42,23 @@ asn_random_between(intmax_t lb, intmax_t rb) { uintmax_t range = asn__intmax_range(lb, rb); uintmax_t value = 0; uintmax_t got_entropy = 0; + (void)intmax_max; + int max = 0xffffff; - assert(RAND_MAX > 0xffffff); /* Seen 7ffffffd! */ +#ifdef __WIN32__ + max = RAND_MAX-1; +#endif + + assert(RAND_MAX > max); /* Seen 7ffffffd! */ assert(range < intmax_max); for(; got_entropy < range;) { - got_entropy = (got_entropy << 24) | 0xffffff; - value = (value << 24) | (random() % 0xffffff); + got_entropy = (got_entropy << 24) | max; +#ifdef HAVE_RANDOM + value = (value << 24) | (random() % max); +#else + value = (value << 24) | (rand() % max); +#endif } return lb + (intmax_t)(value % (range + 1)); diff --git a/e2sm/lib/ber_tlv_tag.c b/e2sm/lib/ber_tlv_tag.c index 4a7d732..64ec14f 100644 --- a/e2sm/lib/ber_tlv_tag.c +++ b/e2sm/lib/ber_tlv_tag.c @@ -42,7 +42,7 @@ ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { */ if(val >> ((8 * sizeof(val)) - 9)) { /* - * We would not be able to accomodate + * We would not be able to accommodate * any more tag bits. */ return -1; diff --git a/e2sm/lib/constr_CHOICE.c b/e2sm/lib/constr_CHOICE.c index 86dcbb0..5f52e3d 100644 --- a/e2sm/lib/constr_CHOICE.c +++ b/e2sm/lib/constr_CHOICE.c @@ -4,485 +4,102 @@ */ #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) +asn_TYPE_operation_t asn_OP_CHOICE = { + CHOICE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + CHOICE_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + CHOICE_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + CHOICE_decode_ber, + CHOICE_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + CHOICE_decode_xer, + CHOICE_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + CHOICE_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + CHOICE_decode_oer, + CHOICE_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + CHOICE_decode_uper, + CHOICE_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + CHOICE_decode_aper, + CHOICE_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + CHOICE_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + CHOICE_outmost_tag +}; -/* - * 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) +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; -/* - * 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) + assert(tag_mode == 0); (void)tag_mode; + assert(tag == 0); (void)tag; -/* - * Switch to the next phase of parsing. - */ -#undef NEXT_PHASE -#define NEXT_PHASE(ctx) do { \ - ctx->phase++; \ - ctx->step = 0; \ - } while(0) + /* + * Figure out which CHOICE element is encoded. + */ + present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); -/* - * Return a standardized complex structure. - */ -#undef RETURN -#define RETURN(_code) do { \ - rval.code = _code; \ - rval.consumed = consumed_myself;\ - return rval; \ - } while(0) + 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; + } +} /* * 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) { @@ -534,713 +151,6 @@ CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, } } -#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) { @@ -1297,7 +207,7 @@ CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr, * is guaranteed to be aligned properly. ASN.1 compiler itself does not * produce packed code. */ -static unsigned +unsigned _fetch_present_idx(const void *struct_ptr, unsigned pres_offset, unsigned pres_size) { const void *present_ptr; @@ -1318,7 +228,7 @@ _fetch_present_idx(const void *struct_ptr, unsigned pres_offset, return present; } -static void +void _set_present_idx(void *struct_ptr, unsigned pres_offset, unsigned pres_size, unsigned present) { void *present_ptr; @@ -1446,88 +356,3 @@ CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, 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/e2sm/lib/constr_CHOICE_aper.c b/e2sm/lib/constr_CHOICE_aper.c new file mode 100644 index 0000000..41040aa --- /dev/null +++ b/e2sm/lib/constr_CHOICE_aper.c @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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 = NULL; + asn_TYPE_member_t *elm = NULL; /* CHOICE's element */ + void *memb_ptr = NULL; + void **memb_ptr2 = NULL; + void *st = *sptr; + int value = 0; + + 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; + + if(specs && specs->tag2el_count > specs->ext_start) { + value = aper_get_nsnnwn(pd, specs->tag2el_count - specs->ext_start); /* extension elements range */ + 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; + 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; + int n = present - specs->ext_start; + if(n <= 63) { + if(n < 0) ASN__ENCODE_FAILED; + if(per_put_few_bits(po, n, 7)) ASN__ENCODE_FAILED; + } else + 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); + } +} diff --git a/e2sm/lib/constr_CHOICE_ber.c b/e2sm/lib/constr_CHOICE_ber.c new file mode 100644 index 0000000..7ad42c7 --- /dev/null +++ b/e2sm/lib/constr_CHOICE_ber.c @@ -0,0 +1,447 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#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) + +/* + * 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) { + /* ?Subtracted 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; +} diff --git a/e2sm/lib/constr_CHOICE_jer.c b/e2sm/lib/constr_CHOICE_jer.c new file mode 100644 index 0000000..22d5090 --- /dev/null +++ b/e2sm/lib/constr_CHOICE_jer.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#undef JER_ADVANCE +#define JER_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) + +asn_enc_rval_t +CHOICE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_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; + + ASN__CALLBACK3("{\n\"", 3, mname, mlen, "\": ", 2); + + tmper = elm->type->op->jer_encoder(elm->type, memb_ptr, + ilevel + 1, flags, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK("}", 1); + // ASN__CALLBACK3("", 1); + } + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} diff --git a/e2sm/lib/constr_CHOICE_oer.c b/e2sm/lib/constr_CHOICE_oer.c index a4c591c..bc71a01 100644 --- a/e2sm/lib/constr_CHOICE_oer.c +++ b/e2sm/lib/constr_CHOICE_oer.c @@ -3,11 +3,8 @@ * 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. @@ -109,7 +106,7 @@ oer_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { */ if(val >> ((8 * sizeof(val)) - 9)) { /* - * We would not be able to accomodate + * We would not be able to accommodate * any more tag bits. */ return -1; @@ -376,5 +373,3 @@ CHOICE_encode_oer(const asn_TYPE_descriptor_t *td, return er; } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/constr_CHOICE_print.c b/e2sm/lib/constr_CHOICE_print.c new file mode 100644 index 0000000..a97202f --- /dev/null +++ b/e2sm/lib/constr_CHOICE_print.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; + } +} diff --git a/e2sm/lib/constr_CHOICE_rfill.c b/e2sm/lib/constr_CHOICE_rfill.c new file mode 100644 index 0000000..fd0a101 --- /dev/null +++ b/e2sm/lib/constr_CHOICE_rfill.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/constr_CHOICE_uper.c b/e2sm/lib/constr_CHOICE_uper.c new file mode 100644 index 0000000..77aab6d --- /dev/null +++ b/e2sm/lib/constr_CHOICE_uper.c @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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); + } +} diff --git a/e2sm/lib/constr_CHOICE_xer.c b/e2sm/lib/constr_CHOICE_xer.c new file mode 100644 index 0000000..45b4290 --- /dev/null +++ b/e2sm/lib/constr_CHOICE_xer.c @@ -0,0 +1,316 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#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; +} diff --git a/e2sm/lib/constr_SEQUENCE.c b/e2sm/lib/constr_SEQUENCE.c index 43dcac7..8397d0c 100644 --- a/e2sm/lib/constr_SEQUENCE.c +++ b/e2sm/lib/constr_SEQUENCE.c @@ -5,980 +5,62 @@ */ #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; -} +asn_TYPE_operation_t asn_OP_SEQUENCE = { + SEQUENCE_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + SEQUENCE_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + SEQUENCE_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + SEQUENCE_decode_ber, + SEQUENCE_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + SEQUENCE_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + SEQUENCE_decode_oer, + SEQUENCE_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + SEQUENCE_decode_uper, + SEQUENCE_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + SEQUENCE_decode_aper, + SEQUENCE_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + SEQUENCE_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ +}; void SEQUENCE_free(const asn_TYPE_descriptor_t *td, void *sptr, @@ -1042,6 +124,8 @@ SEQUENCE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; + asn_constr_check_f *constr; + int ret; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); @@ -1057,864 +141,17 @@ SEQUENCE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, 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; + constr = elm->encoding_constraints.general_constraints; + if(!constr) + constr = elm->type->encoding_constraints.general_constraints; - 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; + ret = constr(elm->type, memb_ptr, ctfailcb, app_key); + if(ret) return ret; } - /* 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); + return 0; } -#endif /* ASN_DISABLE_PER_SUPPORT */ - int SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { @@ -1958,102 +195,3 @@ SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2sm/lib/constr_SEQUENCE_OF.c b/e2sm/lib/constr_SEQUENCE_OF.c index 10f18cf..9c5d6cd 100644 --- a/e2sm/lib/constr_SEQUENCE_OF.c +++ b/e2sm/lib/constr_SEQUENCE_OF.c @@ -7,295 +7,61 @@ #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 */ +asn_TYPE_operation_t asn_OP_SEQUENCE_OF = { + SEQUENCE_OF_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + SEQUENCE_OF_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + SEQUENCE_OF_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + SEQUENCE_OF_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + SEQUENCE_OF_decode_oer, /* Same as SET OF decoder. */ + SEQUENCE_OF_encode_oer, /* Same as SET OF encoder */ +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + SEQUENCE_OF_decode_uper, /* Same as SET OF decoder */ + SEQUENCE_OF_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + SEQUENCE_OF_decode_aper, + SEQUENCE_OF_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + SEQUENCE_OF_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ +}; int SEQUENCE_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, @@ -324,35 +90,3 @@ SEQUENCE_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2sm/lib/constr_SEQUENCE_OF_aper.c b/e2sm/lib/constr_SEQUENCE_OF_aper.c new file mode 100644 index 0000000..ff3ae8b --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_OF_aper.c @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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 %lld ub %lld %s", + (long long int)ct->lower_bound, + (long long int)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 (ct->lower_bound == ct->upper_bound && ct->upper_bound < 65536) { + /* No length determinant */ + } else if (aper_put_length(po, ct->lower_bound, ct->upper_bound, list->count - ct->lower_bound, 0) < 0) + ASN__ENCODE_FAILED; + } + + for(seq = -1; seq < list->count;) { + ssize_t mayEncode; + int need_eom = 0; + if(seq < 0) seq = 0; + if(ct && ct->effective_bits >= 0) { + mayEncode = list->count; + } else { + mayEncode = aper_put_length(po, -1, -1, list->count - seq, &need_eom); + 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; + } + + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } + + ASN__ENCODED_OK(er); +} diff --git a/e2sm/lib/constr_SEQUENCE_OF_ber.c b/e2sm/lib/constr_SEQUENCE_OF_ber.c new file mode 100644 index 0000000..178f865 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_OF_ber.c @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2017 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; +} diff --git a/e2sm/lib/constr_SEQUENCE_OF_jer.c b/e2sm/lib/constr_SEQUENCE_OF_jer.c new file mode 100644 index 0000000..4c366a6 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_OF_jer.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_enc_rval_t +SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_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 = 0; + int i; + + if(!sptr) ASN__ENCODE_FAILED; + + er.encoded = 0; + ASN__CALLBACK("[", 1); + + 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("{\"", 2, mname, mlen, "\":", 2); + } + + tmper = elm->type->op->jer_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, "\"", 1); + } + + if(mname) { + ASN__CALLBACK("}", 1); + } + if (i != list->count - 1) { + ASN__CALLBACK(",", 1); + } + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); + ASN__CALLBACK("]", 1); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} diff --git a/e2sm/lib/constr_SEQUENCE_OF_uper.c b/e2sm/lib/constr_SEQUENCE_OF_uper.c new file mode 100644 index 0000000..eb20a07 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_OF_uper.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 + +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); +} diff --git a/e2sm/lib/constr_SEQUENCE_OF_xer.c b/e2sm/lib/constr_SEQUENCE_OF_xer.c new file mode 100644 index 0000000..7bd3236 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_OF_xer.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +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; +} diff --git a/e2sm/lib/constr_SEQUENCE_aper.c b/e2sm/lib/constr_SEQUENCE_aper.c new file mode 100644 index 0000000..895b6da --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_aper.c @@ -0,0 +1,457 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * 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)) + +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) { + if (OPEN_TYPE_aper_is_unknown_type(td, st, elm)) { + rv = OPEN_TYPE_aper_unknown_type_discard_bytes(pd); + FREEMEM(opres); + return rv; + } + 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 %zd bits (%x..)", + td->name, bmlength, *epres); + + /* Deal with padding */ + if (aper_get_align(pd) < 0) + ASN__DECODE_STARVED; + + /* 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("%zu 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 (@%zu) 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 (@%zu) 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) == 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 */ + + 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 %zu 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", 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); +} diff --git a/e2sm/lib/constr_SEQUENCE_ber.c b/e2sm/lib/constr_SEQUENCE_ber.c new file mode 100644 index 0000000..e982172 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_ber.c @@ -0,0 +1,612 @@ +/* + * Copyright (c) 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) +#undef PHASE_OUT +#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; /* ?Subtracted 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); +} diff --git a/e2sm/lib/constr_SEQUENCE_jer.c b/e2sm/lib/constr_SEQUENCE_jer.c new file mode 100644 index 0000000..6451f0c --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_jer.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, + int ilevel, enum jer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + asn_enc_rval_t er = {0,0,0}; + int xcan = 0; + 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; + + int bAddComma = 0; + ASN__CALLBACK("{\n", 2); + 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 (bAddComma == 1) { + ASN__CALLBACK(",", 1); + bAddComma = 0; + } + + if(!xcan) ASN__TEXT_INDENT(1, ilevel); + ASN__CALLBACK3("\"", 1, mname, mlen, "\": ", 3); + + /* Print the member itself */ + tmper = elm->type->op->jer_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; + if (edx != td->elements_count - 1) { + bAddComma = 1; + } + } + ASN__CALLBACK("}", 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; +} diff --git a/e2sm/lib/constr_SEQUENCE_oer.c b/e2sm/lib/constr_SEQUENCE_oer.c index ecb589c..a3bdb7b 100644 --- a/e2sm/lib/constr_SEQUENCE_oer.c +++ b/e2sm/lib/constr_SEQUENCE_oer.c @@ -3,12 +3,10 @@ * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ -#ifndef ASN_DISABLE_OER_SUPPORT - #include #include +#include #include -#include /* * This macro "eats" the part of the buffer which is definitely "consumed", @@ -486,7 +484,7 @@ SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, } /* - * Before encode extensions, encode extensions additions presense bitmap + * Before encode extensions, encode extensions additions presence bitmap # X.696 (08/2015) #16.4. */ if(has_extensions) { @@ -557,5 +555,3 @@ SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(er); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/constr_SEQUENCE_print.c b/e2sm/lib/constr_SEQUENCE_print.c new file mode 100644 index 0000000..7f9e231 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_print.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/constr_SEQUENCE_rfill.c b/e2sm/lib/constr_SEQUENCE_rfill.c new file mode 100644 index 0000000..b464f57 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_rfill.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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/e2sm/lib/constr_SEQUENCE_uper.c b/e2sm/lib/constr_SEQUENCE_uper.c new file mode 100644 index 0000000..b235f4d --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_uper.c @@ -0,0 +1,429 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include +#include + +/* + * 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)) + +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); +} diff --git a/e2sm/lib/constr_SEQUENCE_xer.c b/e2sm/lib/constr_SEQUENCE_xer.c new file mode 100644 index 0000000..c6475f7 --- /dev/null +++ b/e2sm/lib/constr_SEQUENCE_xer.c @@ -0,0 +1,348 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * 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)) + +#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; +} diff --git a/e2sm/lib/constr_SET.c b/e2sm/lib/constr_SET.c deleted file mode 100644 index 554a7dd..0000000 --- a/e2sm/lib/constr_SET.c +++ /dev/null @@ -1,1149 +0,0 @@ -/* - * 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/e2sm/lib/constr_SET_OF.c b/e2sm/lib/constr_SET_OF.c index bf1dc27..97a7cac 100644 --- a/e2sm/lib/constr_SET_OF.c +++ b/e2sm/lib/constr_SET_OF.c @@ -5,275 +5,63 @@ */ #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; +asn_TYPE_operation_t asn_OP_SET_OF = { + SET_OF_free, +#if !defined(ASN_DISABLE_PRINT_SUPPORT) + SET_OF_print, +#else + 0, +#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */ + SET_OF_compare, +#if !defined(ASN_DISABLE_BER_SUPPORT) + SET_OF_decode_ber, + SET_OF_encode_der, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_XER_SUPPORT) + SET_OF_decode_xer, + SET_OF_encode_xer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + SET_OF_encode_jer, +#else + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) + SET_OF_decode_oer, + SET_OF_encode_oer, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) + SET_OF_decode_uper, + SET_OF_encode_uper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + SET_OF_decode_aper, + SET_OF_encode_aper, +#else + 0, + 0, +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_RFILL_SUPPORT) + SET_OF_random_fill, +#else + 0, +#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */ + 0 /* Use generic outmost tag fetcher */ }; + /* 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; @@ -336,7 +124,7 @@ static int _el_buf_cmp(const void *ap, const void *bp) { return ret; } -static void +void SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count) { size_t i; @@ -347,12 +135,7 @@ SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count) { FREEMEM(el_buf); } -enum SET_OF__encode_method { - SOES_DER, /* Distinguished Encoding Rules */ - SOES_CUPER /* Canonical Unaligned Packed Encoding Rules */ -}; - -static struct _el_buffer * +struct _el_buffer * SET_OF__encode_sorted(const asn_TYPE_member_t *elm, const asn_anonymous_set_ *list, enum SET_OF__encode_method method) { @@ -379,10 +162,13 @@ SET_OF__encode_sorted(const asn_TYPE_member_t *elm, * Encode the member into the prepared space. */ switch(method) { +#if !defined(ASN_DISABLE_BER_SUPPORT) case SOES_DER: erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, _el_addbytes, encoding_el); break; +#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) case SOES_CUPER: erval = uper_encode(elm->type, elm->encoding_constraints.per_constraints, @@ -393,6 +179,20 @@ SET_OF__encode_sorted(const asn_TYPE_member_t *elm, encoding_el->bits_unused = (8 - extra_bits) & 0x7; } break; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */ +#if !defined(ASN_DISABLE_APER_SUPPORT) + case SOES_CAPER: + erval = aper_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; +#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */ + default: assert(!"Unreachable"); break; @@ -413,417 +213,6 @@ SET_OF__encode_sorted(const asn_TYPE_member_t *elm, } } - -/* - * 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) { @@ -902,293 +291,6 @@ SET_OF_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, 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; @@ -1267,175 +369,3 @@ SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, 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/e2sm/lib/constr_SET_OF_aper.c b/e2sm/lib/constr_SET_OF_aper.c new file mode 100644 index 0000000..87c341e --- /dev/null +++ b/e2sm/lib/constr_SET_OF_aper.c @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +asn_enc_rval_t +SET_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_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}; + int seq; + + if(!sptr) ASN__ENCODE_FAILED; + + list = _A_CSET_FROM_VOID(sptr); + + er.encoded = 0; + + ASN_DEBUG("Encoding %s as SET 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 %lld ub %lld %s", + (long long int)ct->lower_bound, + (long long int)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->lower_bound, ct->upper_bound, list->count - ct->lower_bound, 0) < 0) { + ASN__ENCODE_FAILED; + } + } + + /* + * Canonical PER #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_CAPER); + + for(seq = 0; seq < list->count;) { + ssize_t may_encode; + int need_eom = 0; + if(ct && ct->effective_bits >= 0) { + may_encode = list->count; + } else { + may_encode = + aper_put_length(po, -1, -1, list->count - seq, &need_eom); + if(may_encode < 0) ASN__ENCODE_FAILED; + } + + while(may_encode--) { + const struct _el_buffer *el = &encoded_els[seq++]; + if(asn_put_many_bits(po, el->buf, + (8 * el->length) - el->bits_unused) < 0) { + break; + } + } + if(need_eom && (aper_put_length(po, -1, -1, 0, NULL) < 0)) + ASN__ENCODE_FAILED; /* End of Message length */ + } + + SET_OF__encode_sorted_free(encoded_els, list->count); + + ASN__ENCODED_OK(er); +} + +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+%lld elements from %s", + (long)nelems, (long long int)ct->lower_bound, td->name); + if(nelems < 0) ASN__DECODE_STARVED; + nelems += ct->lower_bound; + } else { + nelems = -1; + } + + do { + int i; + if(nelems < 0) { + if (ct) + nelems = aper_get_length(pd, ct->lower_bound, ct->upper_bound, + ct->effective_bits, &repeat); + else + nelems = aper_get_length(pd, -1, -1, -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; +} diff --git a/e2sm/lib/constr_SET_OF_ber.c b/e2sm/lib/constr_SET_OF_ber.c new file mode 100644 index 0000000..4187e29 --- /dev/null +++ b/e2sm/lib/constr_SET_OF_ber.c @@ -0,0 +1,355 @@ +/* + * Copyright (c) 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) +#undef PHASE_OUT +#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; /* ?Subtracted 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); +} + +/* + * 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; + } +} diff --git a/e2sm/lib/constr_SET_OF_jer.c b/e2sm/lib/constr_SET_OF_jer.c new file mode 100644 index 0000000..a0c2adc --- /dev/null +++ b/e2sm/lib/constr_SET_OF_jer.c @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +typedef struct jer_tmp_enc_s { + void *buffer; + size_t offset; + size_t size; +} jer_tmp_enc_t; + +static int +SET_OF_encode_jer_callback(const void *buffer, size_t size, void *key) { + jer_tmp_enc_t *t = (jer_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_jer_order(const void *aptr, const void *bptr) { + const jer_tmp_enc_t *a = (const jer_tmp_enc_t *)aptr; + const jer_tmp_enc_t *b = (const jer_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_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, + enum jer_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 = 0; + jer_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 = (jer_tmp_enc_t *)MALLOC(list->count * sizeof(encs[0])); + if(!encs) ASN__ENCODE_FAILED; + cb = SET_OF_encode_jer_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, "\": ", 3); + } + + if(!xcan && specs->as_XMLValueList == 1) + ASN__TEXT_INDENT(1, ilevel + 1); + tmper = elm->type->op->jer_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) { + jer_tmp_enc_t *enc = encs; + jer_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_jer_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); +} diff --git a/e2sm/lib/constr_SET_OF_oer.c b/e2sm/lib/constr_SET_OF_oer.c index 5200518..a0f0140 100644 --- a/e2sm/lib/constr_SET_OF_oer.c +++ b/e2sm/lib/constr_SET_OF_oer.c @@ -3,8 +3,6 @@ * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ -#ifndef ASN_DISABLE_OER_SUPPORT - #include #include #include @@ -43,12 +41,12 @@ * 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; \ +#define RETURN(_code) \ + do { \ + asn_dec_rval_t _rval; \ + _rval.code = _code; \ + _rval.consumed = consumed_myself; \ + return _rval; \ } while(0) /* @@ -281,5 +279,3 @@ SET_OF_encode_oer(const asn_TYPE_descriptor_t *td, ASN__ENCODED_OK(erval); } } - -#endif /* ASN_DISABLE_OER_SUPPORT */ diff --git a/e2sm/lib/constr_SET_OF_print.c b/e2sm/lib/constr_SET_OF_print.c new file mode 100644 index 0000000..748dba7 --- /dev/null +++ b/e2sm/lib/constr_SET_OF_print.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; +} diff --git a/e2sm/lib/constr_SET_OF_rfill.c b/e2sm/lib/constr_SET_OF_rfill.c new file mode 100644 index 0000000..9b2ac5e --- /dev/null +++ b/e2sm/lib/constr_SET_OF_rfill.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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 !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 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; + } + } +#else + if(!constraints) constraints = &td->encoding_constraints; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + + /* Bias towards edges of allowed space */ + switch(asn_random_between(-1, 4)) { + default: + case -1: +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + /* 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; + } +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ + /* 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/e2sm/lib/constr_SET_OF_uper.c b/e2sm/lib/constr_SET_OF_uper.c new file mode 100644 index 0000000..b99a244 --- /dev/null +++ b/e2sm/lib/constr_SET_OF_uper.c @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +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; + } +} diff --git a/e2sm/lib/constr_SET_OF_xer.c b/e2sm/lib/constr_SET_OF_xer.c new file mode 100644 index 0000000..1d97e5b --- /dev/null +++ b/e2sm/lib/constr_SET_OF_xer.c @@ -0,0 +1,314 @@ +/* + * Copyright (c) 2017 Lev Walkin . + * All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include + +/* + * Return a standardized complex structure. + */ +#undef RETURN +#define RETURN(_code) \ + do { \ + rval.code = _code; \ + rval.consumed = consumed_myself; \ + return rval; \ + } while(0) + +#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); +} diff --git a/e2sm/lib/constr_TYPE.c b/e2sm/lib/constr_TYPE.c index aefaefd..e634e75 100644 --- a/e2sm/lib/constr_TYPE.c +++ b/e2sm/lib/constr_TYPE.c @@ -70,7 +70,7 @@ _print2fp(const void *buffer, size_t size, void *app_key) { * 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 CC_PRINTFLIKE(1, 2) ASN_DEBUG_f(const char *fmt, ...); void ASN_DEBUG_f(const char *fmt, ...) { va_list ap; va_start(ap, fmt); diff --git a/e2sm/lib/constraints.c b/e2sm/lib/constraints.c index df3c6c1..72137cc 100644 --- a/e2sm/lib/constraints.c +++ b/e2sm/lib/constraints.c @@ -35,6 +35,7 @@ struct errbufDesc { }; static void +CC_PRINTFLIKE(4, 5) _asn_i_ctfailcb(void *key, const asn_TYPE_descriptor_t *td, const void *sptr, const char *fmt, ...) { struct errbufDesc *arg = key; diff --git a/e2sm/lib/cscope.out b/e2sm/lib/cscope.out deleted file mode 100644 index 9b3ad35..0000000 --- a/e2sm/lib/cscope.out +++ /dev/null @@ -1,116022 +0,0 @@ -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/e2sm/lib/jer_encoder.c b/e2sm/lib/jer_encoder.c new file mode 100644 index 0000000..4fe5ce3 --- /dev/null +++ b/e2sm/lib/jer_encoder.c @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. + * Redistribution and modifications are permitted subject to BSD license. + */ +#include +#include +#include + +/* + * The JER encoder of any type. May be invoked by the application. + */ +asn_enc_rval_t +jer_encode(const asn_TYPE_descriptor_t *td, const void *sptr, + 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; + + if(!td || !sptr) goto cb_failed; + + mname = td->xml_tag; + mlen = strlen(mname); + + ASN__CALLBACK3("{\n\"", 3, mname, mlen, "\":", 2); + + int xFlag = 0; + tmper = td->op->jer_encoder(td, sptr, 1, xFlag, cb, app_key); + if(tmper.encoded == -1) return tmper; + er.encoded += tmper.encoded; + + ASN__CALLBACK("}", 1); + // ASN__CALLBACK3("\n", xcan); + + ASN__ENCODED_OK(er); +cb_failed: + ASN__ENCODE_FAILED; +} + +/* + * This is a helper function for jer_fprint, which directs all incoming data + * into the provided file descriptor. + */ +static int +jer__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 +jer_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 = jer_encode(td, sptr, jer__print2fp, stream); + if(er.encoded == -1) + return -1; + + return fflush(stream); +} + diff --git a/e2sm/lib/per_decoder.c b/e2sm/lib/per_decoder.c index 8a3e39d..42b92ca 100644 --- a/e2sm/lib/per_decoder.c +++ b/e2sm/lib/per_decoder.c @@ -2,184 +2,4 @@ #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; -} - +// Absolutely nothing diff --git a/e2sm/lib/per_encoder.c b/e2sm/lib/per_encoder.c index a35e1f0..01ab70b 100644 --- a/e2sm/lib/per_encoder.c +++ b/e2sm/lib/per_encoder.c @@ -1,10 +1,7 @@ -#include #include #include -static int _uper_encode_flush_outp(asn_per_outp_t *po); - -static int +int ignore_output(const void *data, size_t size, void *app_key) { (void)data; (void)size; @@ -12,81 +9,7 @@ ignore_output(const void *data, size_t 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 +int encode_dyn_cb(const void *buffer, size_t size, void *key) { enc_dyn_arg *arg = key; if(arg->length + size >= arg->allocated) { @@ -110,156 +33,3 @@ encode_dyn_cb(const void *buffer, size_t size, void *key) { 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/e2sm/lib/per_opentype.c b/e2sm/lib/per_opentype.c index 28f3cb6..5620c5b 100644 --- a/e2sm/lib/per_opentype.c +++ b/e2sm/lib/per_opentype.c @@ -2,288 +2,13 @@ * 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 +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) { @@ -301,233 +26,3 @@ uper_sot_suck(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, 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/e2sm/lib/per_support.c b/e2sm/lib/per_support.c index 2c87a76..62d343c 100644 --- a/e2sm/lib/per_support.c +++ b/e2sm/lib/per_support.c @@ -6,487 +6,4 @@ #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); -} +// Absolutely nothing diff --git a/e2sm/lib/uper_decoder.c b/e2sm/lib/uper_decoder.c new file mode 100644 index 0000000..a88e95c --- /dev/null +++ b/e2sm/lib/uper_decoder.c @@ -0,0 +1,96 @@ +#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; +} diff --git a/e2sm/lib/uper_encoder.c b/e2sm/lib/uper_encoder.c new file mode 100644 index 0000000..4c1d24a --- /dev/null +++ b/e2sm/lib/uper_encoder.c @@ -0,0 +1,127 @@ +#include +#include +#include + +static int _uper_encode_flush_outp(asn_per_outp_t *po); + +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); +} + +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); +} diff --git a/e2sm/lib/uper_opentype.c b/e2sm/lib/uper_opentype.c new file mode 100644 index 0000000..17ee064 --- /dev/null +++ b/e2sm/lib/uper_opentype.c @@ -0,0 +1,372 @@ +/* + * 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); + +/* + * 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 == NULL)? NULL : 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; /* No one 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 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; +} diff --git a/e2sm/lib/uper_support.c b/e2sm/lib/uper_support.c new file mode 100644 index 0000000..ce8adc5 --- /dev/null +++ b/e2sm/lib/uper_support.c @@ -0,0 +1,311 @@ +/* + * 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, uintmax_t *out_value, int nbits) { + uintmax_t lhalf; /* Lower half of the number*/ + intmax_t 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 = ((uintmax_t)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, uintmax_t 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__imax_range(intmax_t lb, intmax_t ub, uintmax_t *range_r) { + uintmax_t bounds_range; + if((ub < 0) == (lb < 0)) { + bounds_range = ub - lb; + } else if(lb < 0) { + assert(ub >= 0); + bounds_range = 1 + ((uintmax_t)ub + (uintmax_t)-(lb + 1)); + } else { + assert(!"Unreachable"); + return -1; + } + *range_r = bounds_range; + return 0; +} + +int +per_imax_range_rebase(intmax_t v, intmax_t lb, intmax_t ub, uintmax_t *output) { + uintmax_t range; + + assert(lb <= ub); + + if(v < lb || v > ub || per__imax_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) { + uintmax_t rebased = 1 + (uintmax_t)-(v+1) + (uintmax_t)lb; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else if(lb < 0) { + uintmax_t rebased = 1 + (uintmax_t)-(lb+1) + (uintmax_t)v; + assert(rebased <= range); /* By construction */ + *output = rebased; + return 0; + } else { + assert(!"Unreachable"); + return -1; + } +} + +int +per_long_range_rebase(long v, intmax_t lb, intmax_t ub, unsigned long *output) { + uintmax_t tmp = *output; + int rc = per_imax_range_rebase((intmax_t)v, lb, ub, &tmp); + *output = tmp; + return rc; +} + +int +per_imax_range_unrebase(uintmax_t inp, intmax_t lb, intmax_t ub, intmax_t *outp) { + uintmax_t range; + + if(per__imax_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 <= INTMAX_MAX) { + *outp = (intmax_t)inp + lb; + } else { + *outp = (lb + INTMAX_MAX + 1) + (intmax_t)((inp - INTMAX_MAX) - 1); + } + + return 0; +} + +int +per_long_range_unrebase(unsigned long inp, intmax_t lb, intmax_t ub, long *outp) { + intmax_t tmp = *outp; + int rc = per_imax_range_unrebase((uintmax_t)inp, lb, ub, &tmp); + *outp = tmp; + return rc; +} diff --git a/e2sm/lib/xer_decoder.c b/e2sm/lib/xer_decoder.c index 5b87703..2a14557 100644 --- a/e2sm/lib/xer_decoder.c +++ b/e2sm/lib/xer_decoder.c @@ -323,7 +323,7 @@ xer_decode_general(const asn_codec_ctx_t *opt_codec_ctx, 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; + const char *pend = (p == NULL)? NULL : p + chunk_size; for(; p < pend; p++) { switch(*p) { diff --git a/e2sm/wrapper.c b/e2sm/wrapper.c index 2cb785d..dbd35aa 100644 --- a/e2sm/wrapper.c +++ b/e2sm/wrapper.c @@ -52,7 +52,7 @@ ranCellUeKpi_t buildRanCellUeKpi(const char *hex_values){ { printf( "[INFO] E2SM KPM RAN Function Description decode successfull rval.code = %d \n",rval.code); - asn_fprint(stdout, &asn_DEF_E2SM_KPM_RANfunction_Description, e2smKpmRanFunctDescrip); + //asn_fprint(stdout, &asn_DEF_E2SM_KPM_RANfunction_Description, e2smKpmRanFunctDescrip); for(int i=0; i< e2smKpmRanFunctDescrip->ric_ReportStyle_List->list.count; i++){ @@ -168,7 +168,7 @@ struct encode_act_Def_result encode_action_Definition(const char *hex_values, in { printf( "[INFO] E2SM KPM RAN Function Description decode successfull rval.code = %d \n",rval.code); - asn_fprint(stdout, &asn_DEF_E2SM_KPM_RANfunction_Description, e2smKpmRanFunctDescrip); + //asn_fprint(stdout, &asn_DEF_E2SM_KPM_RANfunction_Description, e2smKpmRanFunctDescrip); for(int i=0; i< e2smKpmRanFunctDescrip->ric_ReportStyle_List->list.count; i++){ @@ -300,6 +300,7 @@ struct encode_act_Def_result encode_action_Definition(const char *hex_values, in // Don't forget to free the allocated memory when done + /* free(hex_buffer); free(id_format1); @@ -313,6 +314,7 @@ struct encode_act_Def_result encode_action_Definition(const char *hex_values, in for(int i=0; ieventDefinition_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; - } -} size_t e2sm_encode_ric_action_definition_format3_by_name(unsigned char *buf, size_t *buf_size, char **id_tmp , size_t measIdcount, long ric_style_type, unsigned long granulPeriod) { E2SM_KPM_ActionDefinition_t *actionDef = (E2SM_KPM_ActionDefinition_t *)calloc(1, sizeof(E2SM_KPM_ActionDefinition_t)); if (!actionDef) { @@ -750,7 +713,7 @@ size_t e2sm_encode_ric_action_definition_format3_by_name(unsigned char *buf, siz else { fprintf(stderr, "successfully\n"); - xer_fprint(stdout, &asn_DEF_E2SM_KPM_ActionDefinition, actionDef); + //xer_fprint(stdout, &asn_DEF_E2SM_KPM_ActionDefinition, actionDef); /* FILE *fp = fopen("sandeep.bin", "wb"); @@ -858,7 +821,7 @@ size_t e2sm_encode_ric_action_definition_format3_by_id(unsigned char *buf, size_ } else { fprintf(stderr, "successfully\n"); - xer_fprint(stdout, &asn_DEF_E2SM_KPM_ActionDefinition, actionDef); + //xer_fprint(stdout, &asn_DEF_E2SM_KPM_ActionDefinition, actionDef); /* FILE *fp = fopen("sandeep.bin", "wb"); @@ -881,6 +844,45 @@ size_t e2sm_encode_ric_action_definition_format3_by_id(unsigned char *buf, size_ return encode_result.encoded; } } +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; + } +} /* diff --git a/e2sm/wrapper.h b/e2sm/wrapper.h index 56bd638..94a2057 100644 --- a/e2sm/wrapper.h +++ b/e2sm/wrapper.h @@ -17,7 +17,8 @@ #include #include #include -#include +//#include +#include #include #include #include @@ -64,7 +65,7 @@ #include #include #include -#include +//#include #include #include #include @@ -117,6 +118,8 @@ ssize_t e2sm_encode_ric_event_trigger_definition(void *buffer, size_t buf_size, ranCellUeKpi_t buildRanCellUeKpi(const char *hex_values); +void freeMemorydRanCellUeKpi(ranCellUeKpi_t res); + struct encode_act_Def_result encode_action_Definition(const char *hex_values, int determine); size_t e2sm_encode_ric_action_definition_format1_by_name(unsigned char *buf, size_t *buf_size, const char **id_tmp , size_t measIdcount, long ric_style_type, unsigned long granulPeriod, unsigned char *p, unsigned char *nR); diff --git a/entripoint.sh b/entripoint.sh new file mode 100755 index 0000000..494ec64 --- /dev/null +++ b/entripoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash +./f1apServer & # Start the API server in the background +./kpimon # Run the client application diff --git a/f1ap.tar.gz b/f1ap.tar.gz new file mode 100644 index 0000000..c3a3676 Binary files /dev/null and b/f1ap.tar.gz differ diff --git a/f1apHelper/f1apServer.go b/f1apHelper/f1apServer.go new file mode 100644 index 0000000..ffe9084 --- /dev/null +++ b/f1apHelper/f1apServer.go @@ -0,0 +1,125 @@ +package main + +/* +#include +#cgo LDFLAGS: -lf1apwrapper -lm +#cgo CFLAGS: -I/usr/local/include/f1ap +*/ +import "C" +import ( + "encoding/json" + "net/http" + "encoding/base64" + "log" + "unsafe" + "fmt" +) +type RanFunctions struct { + RanFunctionId int + RanFunctionDefinition string + RanFunctionRevision int + RanFunctionOid string +} + +type GlobalNbId struct { + PlmnId string + NbId string +} +type E2nodeComponentInterfaceTypeE1 struct { +} +type E2nodeComponentInterfaceTypeXn struct { +} +type E2nodeComponentInterfaceTypeF1 struct { +} + +type NodeConfigs struct { + E2nodeComponentInterfaceTypeE1 E2nodeComponentInterfaceTypeE1 `json:e2nodeComponentInterfaceTypeE1",omitempty"` + E2nodeComponentInterfaceTypeXn E2nodeComponentInterfaceTypeXn `json:e2nodeComponentInterfaceTypeXn",omitempty"` + E2nodeComponentInterfaceTypeF1 E2nodeComponentInterfaceTypeF1 `json:e2nodeComponentInterfaceTypeF1",omitempty"` + E2nodeComponentInterfaceType string + E2nodeComponentRequestPart string + E2nodeComponentResponsePart string `json:e2nodeComponentResponsePart",omitempty"` +} +type Gnb struct { + RanFunctions []RanFunctions + GnbType string + NodeConfigs []NodeConfigs +} + +/* + type E2nodeComponentInterfaceType struct { + E2nodeComponentInterfaceType string + } + + type E2nodeComponentRequestPart struct { + E2nodeComponentRequestPart string + } +*/ + +type E2mgrResponse struct { + RanName string + ConnectionStatus string + GlobalNbId GlobalNbId + NodeType string + Gnb Gnb + AssociatedE2tInstanceAddress string `json:associatedE2tInstanceAddress",omitempty"` + SetupFromNetwork bool + StatusUpdateTimeStamp string +} + +func main() { + http.HandleFunc("/getdata", func(w http.ResponseWriter, r *http.Request) { + + gnbid := r.URL.Query().Get("gnbid") + link:="http://service-ricplt-e2mgr-http.ricplt.svc.cluster.local:3800/v1/nodeb/" + link=link+gnbid + tmpr,err := http.Get(link) + if err != nil { + log.Fatalln(err) + panic("Unable to get cellid") + } + defer tmpr.Body.Close() + var resp E2mgrResponse + + err=json.NewDecoder(tmpr.Body).Decode(&resp) + if err != nil { + log.Fatalln(err) + panic("Unable to get cellid") + + } + counter := 0 + for i := 0; i < len(resp.Gnb.NodeConfigs); i++ { + if resp.Gnb.NodeConfigs[i].E2nodeComponentInterfaceType == "f1" { + counter = i + break + } + } + + tm := resp.Gnb.NodeConfigs[counter].E2nodeComponentRequestPart + base64Text := make([]byte, base64.StdEncoding.DecodedLen(len(tm))) + nl, _ := base64.StdEncoding.Decode(base64Text, []byte(tm)) + message := string(base64Text[:nl]) + + cString2 := C.CString(message) + fmt.Println("Ponga server = ",message) + defer C.free(unsafe.Pointer(cString2)) // Free the allocated C string when done + result2:=C.decodeF1apGetCellIds(cString2) + cellList:=make([]string, result2.size) + for _, v := range unsafe.Slice(result2.cellids, result2.size) { + cellList = append(cellList, C.GoString(v)) + } + plmnList:=make([]string, result2.size) + for _, v := range unsafe.Slice(result2.plmn, result2.size) { + plmnList = append(plmnList, C.GoString(v)) + } + + // Simulate data + data := map[string]interface{}{ + "CellIds": cellList, + "PlmnIds": plmnList, + } + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + http.ListenAndServe(":8090", nil) +} diff --git a/f1apPackage/f1apPackage.go b/f1apPackage/f1apPackage.go new file mode 100644 index 0000000..cc30df4 --- /dev/null +++ b/f1apPackage/f1apPackage.go @@ -0,0 +1,27 @@ +package f1apPackage + +/* +#include +#cgo LDFLAGS: -lf1apwrapper -lm +#cgo CFLAGS: -I/usr/local/include/f1ap +*/ +import "C" +import( + "fmt" + "unsafe" +) +func GetCellIdsPlmnIds(message string)(cellList [] string,plmnList [] string){ + cString2 := C.CString(message) + fmt.Println("Ponga3 = ",message) + defer C.free(unsafe.Pointer(cString2)) // Free the allocated C string when done + result2:=C.decodeF1apGetCellIds(cString2) + cellList=make([]string, result2.size) + for _, v := range unsafe.Slice(result2.cellids, result2.size) { + cellList = append(cellList, C.GoString(v)) + } + plmnList=make([]string, result2.size) + for _, v := range unsafe.Slice(result2.plmn, result2.size) { + plmnList = append(plmnList, C.GoString(v)) + } + return +} diff --git a/isolation/isolation.go b/isolation/isolation.go new file mode 100644 index 0000000..4731b07 --- /dev/null +++ b/isolation/isolation.go @@ -0,0 +1,10 @@ +package isolation +import( + "fmt" + "example.com/kpimon/f1apPackage" +) +func IntermediateCaller(message string)(cellList [] string,plmnList [] string){ + fmt.Println("Ponga3 = ",message) + cellList,plmnList=f1apPackage.GetCellIdsPlmnIds(message) + return +}