First commit

This commit is contained in:
Leonardo Bonati
2021-12-08 20:17:46 +00:00
commit 60dffad583
2923 changed files with 463894 additions and 0 deletions

56
setup/e2/.gitignore vendored Normal file
View File

@@ -0,0 +1,56 @@
e2/cmake-build-debug/CMakeFiles
e2/.idea/*
e2/.idea
.idea/
e2/asnFiles
asnFiles
CMakeCache.txt
CMakeFiles/
RIC-E2-TERMINATION/CMakeCache.txt
RIC-E2-TERMINATION/CMakeFiles/
RIC-E2-TERMINATION/cmake_install.cmake
RIC-E2-TERMINATION/x2ap_asn_files/
cmake-build-debug/
cmake-build-release/
cmake_install.cmake
e2.cbp
e2
setUpTest
subscriptionTest
RIC-E2-TERMINATION/asnFiles/e2sm-gNB-X2-release-1-v040.asn
e2smtest
libe2sm.a
e2/RIC-E2-TERMINATION/TEST/asn1c/*.o
RIC-E2-TERMINATION/TEST/asn1c/*.o
RIC-E2-TERMINATION/TEST/asn1c/libasncodec.a
/RIC-E2-TERMINATION/TEST/asn1c/libasncodec.a
/libasncodec.a
/libasn1codec.a
RIC-E2-TERMINATION/asnFiles/
RIC-E2-TERMINATION/tracelibcpp/
RIC-E2-TERMINATION/tracelibcpp/CMakeLists.txt
/RIC-E2-TERMINATION/tracelibcpp/CMakeLists.txt
RIC-E2-TERMINATION/nlohmann/
RIC-E2-TERMINATION/concurrentqueue/
/RIC-E2-TERMINATION/base64/
/RIC-E2-TERMINATION/3rdparty/cxxopts/
/RIC-E2-TERMINATION/3rdparty/cgreen_1.2.0_amd64.deb
/testConfigFile
/config/config.conf
/logTest
/b64Test
/T1
/e2Cov
/RIC-E2-TERMINATION/3rdparty/pistache/
/CMakeLists.txt.old
/cmake-modules/
/e2_coverage.base
/teste2
/RIC-E2-TERMINATION/3rdparty/log/
/RIC-E2-TERMINATION/3rdparty/rapidjson/
RIC-E2-TERMINATION/3rdparty/log/
RIC-E2-TERMINATION/3rdparty/rapidjson/
/RIC-E2-TERMINATION/3rdparty/int/
/RIC-E2-TERMINATION/3rdparty/int/autogen/licenses/codevbak.txt
!/RIC-E2-TERMINATION/3rdparty/log/3rdparty/googletest/
/libasn1ce2smcodec.a

5
setup/e2/.gitreview Normal file
View File

@@ -0,0 +1,5 @@
[gerrit]
host=gerrit.o-ran-sc.org
port=29418
project=ric-plt/e2
defaultbranch=master

View File

@@ -0,0 +1,20 @@
---
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
formats:
- htmlzip
build:
image: latest
python:
version: 3.7
install:
- requirements: docs/requirements-docs.txt
sphinx:
configuration: docs/conf.py

63
setup/e2/INFO.yaml Normal file
View File

@@ -0,0 +1,63 @@
---
project: 'ric_plt_e2'
project_creation_date: '2019-11-08'
project_category: ''
lifecycle_state: 'Incubation'
project_lead: &oran_ric_plt_e2_ptl
name: 'Thoralf Czichy'
email: 'thoralf.czichy@nokia.com'
id: 'czichy'
company: 'Nokia'
timezone: 'America/New_York'
primary_contact: *oran_ric_plt_e2_ptl
issue_tracking:
type: 'jira'
url: 'https://jira.o-ran-sc.org/projects/'
key: 'ric_plt_e2'
mailing_list:
type: 'groups.io'
url: 'technical-discuss@lists.o-ran-sc.org'
tag: '[]'
realtime_discussion:
type: 'irc'
server: 'freenode.net'
channel: '#oran'
meetings:
- type: 'gotomeeting+irc'
agenda: 'https://wiki.o-ran-sc.org/display/'
url: ''
server: 'freenode.net'
channel: '#oran'
repeats: ''
time: ''
repositories:
- ric-plt/e2
committers:
- <<: *oran_ric_plt_e2_ptl
- name: 'Adi Enzel'
email: 'aa7133@att.com'
company: 'att'
id: 'adienzel'
timezone: 'Unknown/Unknown'
- name: 'Shuky Har-Noy'
email: 'shuky.har-noy@intl.att.com'
company: 'intl.att'
id: 'ss412g'
timezone: 'Unknown/Unknown'
- name: 'Yaki Ratz'
email: 'yaki.ratz@gmail.com'
company: 'gmail'
id: 'yakiratz'
timezone: 'Unknown/Unknown'
- name: 'Hila Anina'
email: 'hanina@intl.att.com'
company: 'intl.att'
id: 'hanina'
timezone: 'Unknown/Unknown'
tsc:
# yamllint disable rule:line-length
approval: 'missing'
changes:
- type: ''
name: ''
link: ''

31
setup/e2/LICENSES.txt Normal file
View File

@@ -0,0 +1,31 @@
Unless otherwise specified, all software contained herein is licensed
under the Apache License, Version 2.0 (the "Software License");
you may not use this software except in compliance with the Software
License. You may obtain a copy of the Software License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the Software License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Software License for the specific language governing permissions
and limitations under the Software License.
Unless otherwise specified, all documentation contained herein is licensed
under the Creative Commons License, Attribution 4.0 Intl. (the
"Documentation License"); you may not use this documentation except in
compliance with the Documentation License. You may obtain a copy of the
Documentation License at
https://creativecommons.org/licenses/by/4.0/
Unless required by applicable law or agreed to in writing, documentation
distributed under the Documentation License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the Documentation License for the specific language governing
permissions and limitations under the Documentation License.
This source code is part of the near-RT RIC (RAN Intelligent Controller)
platform project (RICP).

View File

@@ -0,0 +1,65 @@
../oranE2/ANY.h
../oranE2/ANY.c
../oranE2/OCTET_STRING.h
../oranE2/OPEN_TYPE.h
../oranE2/OPEN_TYPE.c
../oranE2/constr_CHOICE.h
../oranE2/INTEGER.h
../oranE2/INTEGER.c
../oranE2/NativeEnumerated.h
../oranE2/NativeEnumerated.c
../oranE2/NativeInteger.h
../oranE2/NativeInteger.c
../oranE2/asn_SEQUENCE_OF.h
../oranE2/asn_SEQUENCE_OF.c
../oranE2/asn_SET_OF.h
../oranE2/asn_SET_OF.c
../oranE2/constr_CHOICE.c
../oranE2/constr_SEQUENCE.h
../oranE2/constr_SEQUENCE.c
../oranE2/constr_SEQUENCE_OF.h
../oranE2/constr_SEQUENCE_OF.c
../oranE2/constr_SET_OF.h
../oranE2/constr_SET_OF.c
../oranE2/asn_application.h
../oranE2/asn_application.c
../oranE2/asn_ioc.h
../oranE2/asn_system.h
../oranE2/asn_codecs.h
../oranE2/asn_internal.h
../oranE2/asn_internal.c
../oranE2/asn_random_fill.h
../oranE2/asn_random_fill.c
../oranE2/asn_bit_data.h
../oranE2/asn_bit_data.c
../oranE2/OCTET_STRING.c
../oranE2/BIT_STRING.h
../oranE2/BIT_STRING.c
../oranE2/asn_codecs_prim.c
../oranE2/asn_codecs_prim.h
../oranE2/ber_tlv_length.h
../oranE2/ber_tlv_length.c
../oranE2/ber_tlv_tag.h
../oranE2/ber_tlv_tag.c
../oranE2/ber_decoder.h
../oranE2/ber_decoder.c
../oranE2/der_encoder.h
../oranE2/der_encoder.c
../oranE2/constr_TYPE.h
../oranE2/constr_TYPE.c
../oranE2/constraints.h
../oranE2/constraints.c
../oranE2/xer_support.h
../oranE2/xer_support.c
../oranE2/xer_decoder.h
../oranE2/xer_decoder.c
../oranE2/xer_encoder.h
../oranE2/xer_encoder.c
../oranE2/per_support.h
../oranE2/per_support.c
../oranE2/per_decoder.h
../oranE2/per_decoder.c
../oranE2/per_encoder.h
../oranE2/per_encoder.c
../oranE2/per_opentype.h
../oranE2/per_opentype.c

View File

@@ -0,0 +1,63 @@
../oranE2SM/OCTET_STRING.h
../oranE2SM/OPEN_TYPE.h
../oranE2SM/OPEN_TYPE.c
../oranE2SM/constr_CHOICE.h
../oranE2SM/INTEGER.h
../oranE2SM/INTEGER.c
../oranE2SM/NativeEnumerated.h
../oranE2SM/NativeEnumerated.c
../oranE2SM/NativeInteger.h
../oranE2SM/NativeInteger.c
../oranE2SM/asn_SEQUENCE_OF.h
../oranE2SM/asn_SEQUENCE_OF.c
../oranE2SM/asn_SET_OF.h
../oranE2SM/asn_SET_OF.c
../oranE2SM/constr_CHOICE.c
../oranE2SM/constr_SEQUENCE.h
../oranE2SM/constr_SEQUENCE.c
../oranE2SM/constr_SEQUENCE_OF.h
../oranE2SM/constr_SEQUENCE_OF.c
../oranE2SM/constr_SET_OF.h
../oranE2SM/constr_SET_OF.c
../oranE2SM/asn_application.h
../oranE2SM/asn_application.c
../oranE2SM/asn_ioc.h
../oranE2SM/asn_system.h
../oranE2SM/asn_codecs.h
../oranE2SM/asn_internal.h
../oranE2SM/asn_internal.c
../oranE2SM/asn_random_fill.h
../oranE2SM/asn_random_fill.c
../oranE2SM/asn_bit_data.h
../oranE2SM/asn_bit_data.c
../oranE2SM/OCTET_STRING.c
../oranE2SM/BIT_STRING.h
../oranE2SM/BIT_STRING.c
../oranE2SM/asn_codecs_prim.c
../oranE2SM/asn_codecs_prim.h
../oranE2SM/ber_tlv_length.h
../oranE2SM/ber_tlv_length.c
../oranE2SM/ber_tlv_tag.h
../oranE2SM/ber_tlv_tag.c
../oranE2SM/ber_decoder.h
../oranE2SM/ber_decoder.c
../oranE2SM/der_encoder.h
../oranE2SM/der_encoder.c
../oranE2SM/constr_TYPE.h
../oranE2SM/constr_TYPE.c
../oranE2SM/constraints.h
../oranE2SM/constraints.c
../oranE2SM/xer_support.h
../oranE2SM/xer_support.c
../oranE2SM/xer_decoder.h
../oranE2SM/xer_decoder.c
../oranE2SM/xer_encoder.h
../oranE2SM/xer_encoder.c
../oranE2SM/per_support.h
../oranE2SM/per_support.c
../oranE2SM/per_decoder.h
../oranE2SM/per_decoder.c
../oranE2SM/per_encoder.h
../oranE2SM/per_encoder.c
../oranE2SM/per_opentype.h
../oranE2SM/per_opentype.c

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,359 @@
-- ASN1START
-- **************************************************************
-- E2SM-gNB-NRT
-- Information Element Definitions
--
-- **************************************************************
E2SM-gNB-NRT-IEs {
iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 28458 exp(99) mobileDomain (0) ric (21) modules (3) e2sm (3) version1 (1) e2sm-gNB-NRT-IEs (3) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- copied from X2AP IEs v15.4.0
-- note: ie-Extensions removed
-- **************************************************************
ECGI ::= SEQUENCE {
pLMN-Identity PLMN-Identity,
eUTRANcellIdentifier EUTRANCellIdentifier,
...
}
EUTRANCellIdentifier ::= BIT STRING (SIZE (28))
NRCellIdentifier ::= BIT STRING (SIZE (36))
NRCGI ::= SEQUENCE {
pLMN-Identity PLMN-Identity,
nRcellIdentifier NRCellIdentifier,
...
}
PLMN-Identity ::= OCTET STRING (SIZE(3))
-- **************************************************************
--
-- Lists
--
-- **************************************************************
maxofCellinRAN INTEGER ::= 16384
maxNoOfNeighbours INTEGER ::= 1024
maxofRANParameters INTEGER ::= 255
maxofRICstyles INTEGER ::= 63
-- E2 Service model IEs
-- ---------------------------------------------------
-- Event Trigger Definition OCTET STRING contents
-- ---------------------------------------------------
-- E2SM-gNB-NRT-EventTriggerDefinition IE
E2SM-gNB-NRT-EventTriggerDefinition ::= CHOICE{
eventDefinition-Format1 E2SM-gNB-NRT-EventTriggerDefinition-Format1,
...
}
-- E2SM-gNB-NRT-eventTriggerDefinition IE Format 1
E2SM-gNB-NRT-EventTriggerDefinition-Format1 ::= SEQUENCE{
triggerNature NRT-TriggerNature,
...
}
-- ---------------------------------------------------
-- Action Definition OCTET STRING contents
-- ---------------------------------------------------
E2SM-gNB-NRT-ActionDefinition ::= CHOICE{
actionDefinition-Format1 E2SM-gNB-NRT-ActionDefinition-Format1,
...
}
-- E2SM-gNB-NRT-actionDefinition IE used for Action Format 1
E2SM-gNB-NRT-ActionDefinition-Format1 ::= SEQUENCE{
ranParameter-List SEQUENCE (SIZE(1..maxofRANParameters)) OF RANparameter-Item OPTIONAL,
...
}
-- ---------------------------------------------------
-- Indication Header OCTET STRING contents
-- ---------------------------------------------------
E2SM-gNB-NRT-IndicationHeader ::= CHOICE{
indicationHeader-Format1 E2SM-gNB-NRT-IndicationHeader-Format1,
...
}
-- E2SM-gNB-NRT-indicationHeader Format 1
E2SM-gNB-NRT-IndicationHeader-Format1 ::= SEQUENCE{
timestamp NRT-TimeStamp OPTIONAL,
...
}
-- ---------------------------------------------------
-- Indication Message OCTET STRING contents
-- ---------------------------------------------------
-- E2SM-gNB-NRT-indicationMessage IE
E2SM-gNB-NRT-IndicationMessage ::= CHOICE{
indicationMessage-Format1 E2SM-gNB-NRT-IndicationMessage-Format1,
...
}
-- E2SM-gNB-NRT-IndicationMessage Format 1
NRT-Record-row-item ::= SEQUENCE{
neighbourCellID NRT-Cell-ID,
nrt-Record NRT-TableRecord
}
NRT-Record-List-item ::= SEQUENCE{
servedCellID NRT-Cell-ID,
nrt-Record-row SEQUENCE (SIZE(1..maxNoOfNeighbours)) OF NRT-Record-row-item
}
E2SM-gNB-NRT-IndicationMessage-Format1 ::= SEQUENCE{
nrt-Record-List SEQUENCE (SIZE(1..maxofCellinRAN)) OF NRT-Record-List-item,
...
}
-- ---------------------------------------------------
-- Call Process ID
-- ---------------------------------------------------
-- Not defined in this E2SM
-- ---------------------------------------------------
-- Control Header OCTET STRING contents
-- ---------------------------------------------------
-- E2SM-gNB-NRT-ControlHeader
E2SM-gNB-NRT-ControlHeader ::= CHOICE{
controlHeader-Format1 E2SM-gNB-NRT-ControlHeader-Format1,
...
}
-- E2SM-gNB-NRT-ControlHeader Format 1
E2SM-gNB-NRT-ControlHeader-Format1 ::= SEQUENCE{
command NRT-ControlCommand,
servedCellID NRT-Cell-ID,
neighbourCellID NRT-Cell-ID,
...
}
-- ---------------------------------------------------
-- Control Message OCTET STRING contents
-- ---------------------------------------------------
-- E2SM-gNB-NRT-ControlMessage
E2SM-gNB-NRT-ControlMessage ::= CHOICE{
controlMessage-Format1 E2SM-gNB-NRT-ControlMessage-Format1,
...
}
-- E2SM-gNB-NRT-controlMessage Format 1
E2SM-gNB-NRT-ControlMessage-Format1 ::= SEQUENCE{
tablerecord NRT-TableRecord,
...
}
-- NEW for Release 4 *****
-- ---------------------------------------------------
-- RAN Function Definition OCTET STRING contents
-- ---------------------------------------------------
-- E2SM-gNB-NRT-RANfunction-Definition
E2SM-gNB-NRT-RANfunction-Definition ::= SEQUENCE{
ranFunction-Name RANfunction-Name,
ric-EventTriggerStyle-List SEQUENCE (SIZE(1..maxofRICstyles)) OF RIC-EventTriggerStyle-List OPTIONAL,
ric-ReportStyle-List SEQUENCE (SIZE(1..maxofRICstyles)) OF RIC-ReportStyle-List OPTIONAL,
ric-InsertStyle-List SEQUENCE (SIZE(1..maxofRICstyles)) OF RIC-InsertStyle-List OPTIONAL,
ric-ControlStyle-List SEQUENCE (SIZE(1..maxofRICstyles)) OF RIC-ControlStyle-List OPTIONAL,
ric-PolicyStyle-List SEQUENCE (SIZE(1..maxofRICstyles)) OF RIC-PolicyStyle-List OPTIONAL,
...
}
-- ---------------------------------------------------
-- commmon IEs
-- ---------------------------------------------------
-- A
-- B
-- C
-- D
-- E
-- F
-- G
-- H
-- I
-- J
-- K
-- L
-- M
-- N
NRT-Cell-ID ::= CHOICE{
ecgi ECGI,
nrcgi NRCGI,
...
}
NRT-ControlCommand ::= ENUMERATED{
addition,
deletion,
...
}
NRT-TableRecord ::= OCTET STRING
NRT-TimeStamp ::= OCTET STRING (SIZE(8))
NRT-TriggerNature ::= ENUMERATED{
now,
onchange,
...
}
-- O
-- P
-- Q
-- R
-- NEW for Release 4 *****
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,
...
}
RANparameter-Item ::= SEQUENCE {
ranParameter-ID RANparameter-ID,
ranParameter-Value RANparameter-Value,
...
}
-- NEW for Release 4 *****
RANparameterDef-Item ::= SEQUENCE {
ranParameter-ID RANparameter-ID,
ranParameter-Name RANparameter-Name,
ranParameter-Type RANparameter-Type,
...
}
RANparameter-ID ::= INTEGER (0..maxofRANParameters)
-- NEW for Release 4 *****
RANparameter-Name ::= PrintableString(SIZE(1..150,...))
RANparameter-Test ::= ENUMERATED{
equal,
greaterthan,
lessthan,
contains,
present,
...
}
-- NEW for Release 4 *****
RANparameter-Type ::= ENUMERATED{
integer,
enumerated,
boolean,
bit-string,
octet-string,
printable-string,
...
}
RANparameter-Value ::= CHOICE{
valueInt INTEGER,
valueEnum INTEGER,
valueBool BOOLEAN,
valueBitS BIT STRING,
valueOctS OCTET STRING,
valuePrtS PrintableString,
...
}
-- NEW for Release 4 *****
RIC-ControlStyle-List ::= SEQUENCE{
ric-ControlStyle-Type RIC-Style-Type,
ric-ControlStyle-Name RIC-Style-Name,
ric-ControlHeaderFormat-Type RIC-Format-Type,
ric-ControlMessageFormat-Type RIC-Format-Type,
ric-CallProcessIDFormat-Type RIC-Format-Type,
...
}
-- NEW for Release 4 *****
RIC-EventTriggerStyle-List ::= SEQUENCE{
ric-EventTriggerStyle-Type RIC-Style-Type,
ric-EventTriggerStyle-Name RIC-Style-Name,
ric-EventTriggerFormat-Type RIC-Format-Type,
...
}
-- NEW for Release 4 *****
RIC-InsertStyle-List ::= SEQUENCE{
ric-InsertStyle-Type RIC-Style-Type,
ric-InsertStyle-Name RIC-Style-Name,
ric-InsertActionFormat-Type RIC-Format-Type,
ric-InsertRanParameterDef-List SEQUENCE (SIZE(1..maxofRANParameters)) OF RANparameterDef-Item,
ric-IndicationHeaderFormat-Type RIC-Format-Type,
ric-IndicationMessageFormat-Type RIC-Format-Type,
ric-CallProcessIDFormat-Type RIC-Format-Type,
...
}
-- NEW for Release 4 *****
RIC-PolicyStyle-List ::= SEQUENCE{
ric-PolicyStyle-Type RIC-Style-Type,
ric-PolicyStyle-Name RIC-Style-Name,
ric-PolicyActionFormat-Type RIC-Format-Type,
ric-PolicyRanParameterDef-List SEQUENCE (SIZE(1..maxofRANParameters)) OF RANparameterDef-Item,
...
}
-- NEW for Release 4 *****
RIC-ReportStyle-List ::= SEQUENCE{
ric-ReportStyle-Type RIC-Style-Type,
ric-ReportStyle-Name RIC-Style-Name,
ric-ReportActionFormat-Type RIC-Format-Type,
ric-ReportRanParameterDef-List SEQUENCE (SIZE(1..maxofRANParameters)) OF RANparameterDef-Item,
ric-IndicationHeaderFormat-Type RIC-Format-Type,
ric-IndicationMessageFormat-Type RIC-Format-Type,
...
}
-- NEW for Release 4 *****
RIC-Format-Type ::= INTEGER
-- NEW for Release 4 *****
RIC-Style-Type ::= INTEGER
-- NEW for Release 4 *****
RIC-Style-Name ::= PrintableString(SIZE(1..150,...))
-- S
-- T
-- U
-- V
-- W
-- X
-- Y
-- Z
END
-- ASN1STOP

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
mkdir -p E2APtmpFiles
mkdir -p E2SMtmpFiles
cat E2APextFileList.txt | xargs mv -t E2APtmpFiles/.
cat E2SMextFileList.txt | xargs mv -t E2SMtmpFiles/.
cd ../oranE2
rm
find . -type f -name \*.c -exec ../int/autogen/autogen -i --no-top-level-comment -l codev {} \;
find . -type f -name \*.h -exec ../int/autogen/autogen -i --no-top-level-comment -l codev {} \;
mv ../asnTextFiles/E2APtmpFiles/* .
rmdir ../asnTextFiles/E2APtmpFiles
rm converter-example.c
cd ../oranE2SM
find . -type f -name \*.c -exec ../int/autogen/autogen -i --no-top-level-comment -l codev {} \;
find . -type f -name \*.h -exec ../int/autogen/autogen -i --no-top-level-comment -l codev {} \;
mv ../asnTextFiles/E2SMtmpFiles/* .
rmdir ../asnTextFiles/E2SMtmpFiles
rm converter-example.c

View File

@@ -0,0 +1,450 @@
/*
* Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
#include <ANY.h>
#include <errno.h>
asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
sizeof(ANY_t),
offsetof(ANY_t, _asn_ctx),
ASN_OSUBV_ANY
};
asn_TYPE_operation_t asn_OP_ANY = {
OCTET_STRING_free,
OCTET_STRING_print,
OCTET_STRING_compare,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
ANY_encode_xer,
#ifdef ASN_DISABLE_OER_SUPPORT
0,
0,
#else
0,
0,
#endif /* ASN_DISABLE_OER_SUPPORT */
#ifdef ASN_DISABLE_PER_SUPPORT
0, 0, 0, 0,
#else
ANY_decode_uper,
ANY_encode_uper,
ANY_decode_aper,
ANY_encode_aper,
#endif /* ASN_DISABLE_PER_SUPPORT */
0, /* Random fill is not defined for ANY type */
0 /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_ANY = {
"ANY",
"ANY",
&asn_OP_ANY,
0, 0, 0, 0,
{ 0, 0, asn_generic_no_constraint }, /* No constraints */
0, 0, /* No members */
&asn_SPC_ANY_specs,
};
#undef RETURN
#define RETURN(_code) \
do { \
asn_dec_rval_t tmprval; \
tmprval.code = _code; \
tmprval.consumed = consumed_myself; \
return tmprval; \
} while(0)
asn_enc_rval_t
ANY_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
void *app_key) {
if(flags & XER_F_CANONICAL) {
/*
* Canonical XER-encoding of ANY type is not supported.
*/
ASN__ENCODE_FAILED;
}
/* Dump as binary */
return OCTET_STRING_encode_xer(td, sptr, ilevel, flags, cb, app_key);
}
struct _callback_arg {
uint8_t *buffer;
size_t offset;
size_t size;
};
static int ANY__consume_bytes(const void *buffer, size_t size, void *key);
int
ANY_fromType(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
struct _callback_arg arg;
asn_enc_rval_t erval = {0,0,0};
if(!st || !td) {
errno = EINVAL;
return -1;
}
if(!sptr) {
if(st->buf) FREEMEM(st->buf);
st->size = 0;
return 0;
}
arg.offset = arg.size = 0;
arg.buffer = 0;
erval = der_encode(td, sptr, ANY__consume_bytes, &arg);
if(erval.encoded == -1) {
if(arg.buffer) FREEMEM(arg.buffer);
return -1;
}
assert((size_t)erval.encoded == arg.offset);
if(st->buf) FREEMEM(st->buf);
st->buf = arg.buffer;
st->size = arg.offset;
return 0;
}
int
ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
uint8_t *buffer = NULL;
ssize_t erval;
if(!st || !td) {
errno = EINVAL;
return -1;
}
if(!sptr) {
if(st->buf) FREEMEM(st->buf);
st->size = 0;
return 0;
}
erval = aper_encode_to_new_buffer(td, td->encoding_constraints.per_constraints, sptr, (void**)&buffer);
if(erval == -1) {
if(buffer) FREEMEM(buffer);
return -1;
}
assert((size_t)erval > 0);
if(st->buf) FREEMEM(st->buf);
st->buf = buffer;
st->size = erval;
return 0;
}
ANY_t *
ANY_new_fromType(asn_TYPE_descriptor_t *td, void *sptr) {
ANY_t tmp;
ANY_t *st;
if(!td || !sptr) {
errno = EINVAL;
return 0;
}
memset(&tmp, 0, sizeof(tmp));
if(ANY_fromType(&tmp, td, sptr)) return 0;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
*st = tmp;
return st;
} else {
FREEMEM(tmp.buf);
return 0;
}
}
ANY_t *
ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr) {
ANY_t tmp;
ANY_t *st;
if(!td || !sptr) {
errno = EINVAL;
return 0;
}
memset(&tmp, 0, sizeof(tmp));
if(ANY_fromType_aper(&tmp, td, sptr)) return 0;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
*st = tmp;
return st;
} else {
FREEMEM(tmp.buf);
return 0;
}
}
int
ANY_to_type(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
void *newst = 0;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
if(st->buf == 0) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
}
rval = ber_decode(0, td, (void **)&newst, st->buf, st->size);
if(rval.code == RC_OK) {
*struct_ptr = newst;
return 0;
} else {
/* Remove possibly partially decoded data. */
ASN_STRUCT_FREE(*td, newst);
return -1;
}
}
int
ANY_to_type_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
void *newst = 0;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
if(st->buf == 0) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
}
rval = aper_decode(0, td, (void **)&newst, st->buf, st->size, 0, 0);
if(rval.code == RC_OK) {
*struct_ptr = newst;
return 0;
} else {
/* Remove possibly partially decoded data. */
ASN_STRUCT_FREE(*td, newst);
return -1;
}
}
static int ANY__consume_bytes(const void *buffer, size_t size, void *key) {
struct _callback_arg *arg = (struct _callback_arg *)key;
if((arg->offset + size) >= arg->size) {
size_t nsize = (arg->size ? arg->size << 2 : 16) + size;
void *p = REALLOC(arg->buffer, nsize);
if(!p) return -1;
arg->buffer = (uint8_t *)p;
arg->size = nsize;
}
memcpy(arg->buffer + arg->offset, buffer, size);
arg->offset += size;
assert(arg->offset < arg->size);
return 0;
}
#ifndef ASN_DISABLE_PER_SUPPORT
asn_dec_rval_t
ANY_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr,
asn_per_data_t *pd) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_ANY_specs;
size_t consumed_myself = 0;
int repeat;
ANY_t *st = (ANY_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
/*
* Allocate the structure.
*/
if(!st) {
st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("UPER Decoding ANY type");
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = uper_get_length(pd, -1, 0, &repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len,
repeat ? "repeat" : "once", td->name);
len_bytes = raw_len;
len_bits = len_bytes * 8;
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += len_bits;
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
RETURN(RC_OK);
}
asn_enc_rval_t
ANY_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
const ANY_t *st = (const ANY_t *)sptr;
asn_enc_rval_t er = {0, 0, 0};
const uint8_t *buf;
size_t size;
int ret;
(void)constraints;
if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED;
buf = st->buf;
size = st->size;
do {
int need_eom = 0;
ssize_t may_save = uper_put_length(po, size, &need_eom);
if(may_save < 0) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, buf, may_save * 8);
if(ret) ASN__ENCODE_FAILED;
buf += may_save;
size -= may_save;
assert(!(may_save & 0x07) || !size);
if(need_eom && uper_put_length(po, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size);
ASN__ENCODED_OK(er);
}
asn_dec_rval_t
ANY_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr,
asn_per_data_t *pd) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_ANY_specs;
size_t consumed_myself = 0;
int repeat;
ANY_t *st = (ANY_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
/*
* Allocate the structure.
*/
if(!st) {
st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("APER Decoding ANY type");
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = aper_get_length(pd, -1, 0, &repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len,
repeat ? "repeat" : "once", td->name);
len_bytes = raw_len;
len_bits = len_bytes * 8;
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += len_bits;
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
RETURN(RC_OK);
}
asn_enc_rval_t
ANY_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
const ANY_t *st = (const ANY_t *)sptr;
asn_enc_rval_t er = {0, 0, 0};
const uint8_t *buf;
size_t size;
int ret;
(void)constraints;
if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED;
buf = st->buf;
size = st->size;
do {
int need_eom = 0;
ssize_t may_save = uper_put_length(po, size, &need_eom);
if(may_save < 0) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, buf, may_save * 8);
if(ret) ASN__ENCODE_FAILED;
buf += may_save;
size -= may_save;
assert(!(may_save & 0x07) || !size);
if(need_eom && uper_put_length(po, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size);
ASN__ENCODED_OK(er);
}
#endif /* ASN_DISABLE_PER_SUPPORT */

View File

@@ -0,0 +1,65 @@
/*-
* Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef ASN_TYPE_ANY_H
#define ASN_TYPE_ANY_H
#include <OCTET_STRING.h> /* Implemented via OCTET STRING type */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ANY {
uint8_t *buf; /* BER-encoded ANY contents */
int size; /* Size of the above buffer */
asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */
} ANY_t;
extern asn_TYPE_descriptor_t asn_DEF_ANY;
extern asn_TYPE_operation_t asn_OP_ANY;
extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs;
asn_struct_free_f ANY_free;
asn_struct_print_f ANY_print;
ber_type_decoder_f ANY_decode_ber;
der_type_encoder_f ANY_encode_der;
xer_type_encoder_f ANY_encode_xer;
per_type_decoder_f ANY_decode_uper;
per_type_encoder_f ANY_encode_uper;
per_type_decoder_f ANY_decode_aper;
per_type_encoder_f ANY_encode_aper;
#define ANY_free OCTET_STRING_free
#define ANY_print OCTET_STRING_print
#define ANY_compare OCTET_STRING_compare
#define ANY_constraint asn_generic_no_constraint
#define ANY_decode_ber OCTET_STRING_decode_ber
#define ANY_encode_der OCTET_STRING_encode_der
#define ANY_decode_xer OCTET_STRING_decode_xer_hex
/******************************
* Handy conversion routines. *
******************************/
/* Convert another ASN.1 type into the ANY. This implies DER encoding. */
int ANY_fromType(ANY_t *, asn_TYPE_descriptor_t *td, void *struct_ptr);
int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr);
ANY_t *ANY_new_fromType(asn_TYPE_descriptor_t *td, void *struct_ptr);
ANY_t *ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr);
/* Convert the contents of the ANY type into the specified type. */
int ANY_to_type(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr);
int ANY_to_type_aper(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr);
#define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size))
#define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf( \
&asn_DEF_ANY, (buf), (size))
#ifdef __cplusplus
}
#endif
#endif /* ASN_TYPE_ANY_H */

View File

@@ -0,0 +1,656 @@
/*-
* Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
#include <BIT_STRING.h>
#include <asn_internal.h>
/*
* BIT STRING basic type description.
*/
static const ber_tlv_tag_t asn_DEF_BIT_STRING_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2))
};
asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs = {
sizeof(BIT_STRING_t),
offsetof(BIT_STRING_t, _asn_ctx),
ASN_OSUBV_BIT
};
asn_TYPE_operation_t asn_OP_BIT_STRING = {
OCTET_STRING_free, /* Implemented in terms of OCTET STRING */
BIT_STRING_print,
BIT_STRING_compare,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_decode_xer_binary,
BIT_STRING_encode_xer,
#ifdef ASN_DISABLE_OER_SUPPORT
0,
0,
#else
BIT_STRING_decode_oer,
BIT_STRING_encode_oer,
#endif /* ASN_DISABLE_OER_SUPPORT */
#ifdef ASN_DISABLE_PER_SUPPORT
0,
0,
0,
0,
#else
BIT_STRING_decode_uper, /* Unaligned PER decoder */
BIT_STRING_encode_uper, /* Unaligned PER encoder */
OCTET_STRING_decode_aper, /* Aligned PER decoder */
OCTET_STRING_encode_aper, /* Aligned PER encoder */
#endif /* ASN_DISABLE_PER_SUPPORT */
BIT_STRING_random_fill,
0 /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
"BIT STRING",
"BIT_STRING",
&asn_OP_BIT_STRING,
asn_DEF_BIT_STRING_tags,
sizeof(asn_DEF_BIT_STRING_tags)
/ sizeof(asn_DEF_BIT_STRING_tags[0]),
asn_DEF_BIT_STRING_tags, /* Same as above */
sizeof(asn_DEF_BIT_STRING_tags)
/ sizeof(asn_DEF_BIT_STRING_tags[0]),
{ 0, 0, BIT_STRING_constraint },
0, 0, /* No members */
&asn_SPC_BIT_STRING_specs
};
/*
* BIT STRING generic constraint.
*/
int
BIT_STRING_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
if(st && st->buf) {
if((st->size == 0 && st->bits_unused)
|| st->bits_unused < 0 || st->bits_unused > 7) {
ASN__CTFAIL(app_key, td, sptr,
"%s: invalid padding byte (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
return 0;
}
static const char *_bit_pattern[16] = {
"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
"1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"
};
asn_enc_rval_t
BIT_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t er = {0, 0, 0};
char scratch[128];
char *p = scratch;
char *scend = scratch + (sizeof(scratch) - 10);
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
int xcan = (flags & XER_F_CANONICAL);
uint8_t *buf;
uint8_t *end;
if(!st || !st->buf)
ASN__ENCODE_FAILED;
er.encoded = 0;
buf = st->buf;
end = buf + st->size - 1; /* Last byte is special */
/*
* Binary dump
*/
for(; buf < end; buf++) {
int v = *buf;
int nline = xcan?0:(((buf - st->buf) % 8) == 0);
if(p >= scend || nline) {
ASN__CALLBACK(scratch, p - scratch);
p = scratch;
if(nline) ASN__TEXT_INDENT(1, ilevel);
}
memcpy(p + 0, _bit_pattern[v >> 4], 4);
memcpy(p + 4, _bit_pattern[v & 0x0f], 4);
p += 8;
}
if(!xcan && ((buf - st->buf) % 8) == 0)
ASN__TEXT_INDENT(1, ilevel);
ASN__CALLBACK(scratch, p - scratch);
p = scratch;
if(buf == end) {
int v = *buf;
int ubits = st->bits_unused;
int i;
for(i = 7; i >= ubits; i--)
*p++ = (v & (1 << i)) ? 0x31 : 0x30;
ASN__CALLBACK(scratch, p - scratch);
}
if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1);
ASN__ENCODED_OK(er);
cb_failed:
ASN__ENCODE_FAILED;
}
/*
* BIT STRING specific contents printer.
*/
int
BIT_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn_app_consume_bytes_f *cb, void *app_key) {
const char * const h2c = "0123456789ABCDEF";
char scratch[64];
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
uint8_t *buf;
uint8_t *end;
char *p = scratch;
(void)td; /* Unused argument */
if(!st || !st->buf)
return (cb("<absent>", 8, app_key) < 0) ? -1 : 0;
ilevel++;
buf = st->buf;
end = buf + st->size;
/*
* Hexadecimal dump.
*/
for(; buf < end; buf++) {
if((buf - st->buf) % 16 == 0 && (st->size > 16)
&& buf != st->buf) {
_i_INDENT(1);
/* Dump the string */
if(cb(scratch, p - scratch, app_key) < 0) return -1;
p = scratch;
}
*p++ = h2c[*buf >> 4];
*p++ = h2c[*buf & 0x0F];
*p++ = 0x20;
}
if(p > scratch) {
p--; /* Eat the tailing space */
if((st->size > 16)) {
_i_INDENT(1);
}
/* Dump the incomplete 16-bytes row */
if(cb(scratch, p - scratch, app_key) < 0)
return -1;
}
if(st->bits_unused) {
int ret = snprintf(scratch, sizeof(scratch), " (%d bit%s unused)",
st->bits_unused, st->bits_unused == 1 ? "" : "s");
assert(ret > 0 && ret < (ssize_t)sizeof(scratch));
if(ret > 0 && ret < (ssize_t)sizeof(scratch)
&& cb(scratch, ret, app_key) < 0)
return -1;
}
return 0;
}
/*
* Non-destructively remove the trailing 0-bits from the given bit string.
*/
static const BIT_STRING_t *
BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp) {
const uint8_t *b;
union {
const uint8_t *c_buf;
uint8_t *nc_buf;
} unconst;
if(st->size == 0) {
assert(st->bits_unused == 0);
return st;
} else {
for(b = &st->buf[st->size - 1]; b > st->buf && *b == 0; b--) {
;
}
/* b points to the last byte which may contain data */
if(*b) {
int unused = 7;
uint8_t v = *b;
v &= -(int8_t)v;
if(v & 0x0F) unused -= 4;
if(v & 0x33) unused -= 2;
if(v & 0x55) unused -= 1;
tmp->size = b-st->buf + 1;
tmp->bits_unused = unused;
} else {
tmp->size = b-st->buf;
tmp->bits_unused = 0;
}
assert(b >= st->buf);
}
unconst.c_buf = st->buf;
tmp->buf = unconst.nc_buf;
return tmp;
}
/*
* Lexicographically compare the common prefix of both strings,
* and if it is the same return -1 for the smallest string.
*/
int
BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
const void *bptr) {
/*
* Remove information about trailing bits, since
* X.680 (08/2015) #22.7 "ensure that different semantics are not"
* "associated with [values that differ only in] the trailing 0 bits."
*/
BIT_STRING_t compact_a, compact_b;
const BIT_STRING_t *a = BIT_STRING__compactify(aptr, &compact_a);
const BIT_STRING_t *b = BIT_STRING__compactify(bptr, &compact_b);
const asn_OCTET_STRING_specifics_t *specs = td->specifics;
assert(specs && specs->subvariant == ASN_OSUBV_BIT);
if(a && b) {
size_t common_prefix_size = a->size <= b->size ? a->size : b->size;
int ret = memcmp(a->buf, b->buf, common_prefix_size);
if(ret == 0) {
/* Figure out which string with equal prefixes is longer. */
if(a->size < b->size) {
return -1;
} else if(a->size > b->size) {
return 1;
} else {
/* Figure out how many unused bits */
if(a->bits_unused > b->bits_unused) {
return -1;
} else if(a->bits_unused < b->bits_unused) {
return 1;
} else {
return 0;
}
}
} else {
return ret;
}
} else if(!a && !b) {
return 0;
} else if(!a) {
return -1;
} else {
return 1;
}
}
#ifndef ASN_DISABLE_PER_SUPPORT
#undef RETURN
#define RETURN(_code) \
do { \
asn_dec_rval_t tmprval; \
tmprval.code = _code; \
tmprval.consumed = consumed_myself; \
return tmprval; \
} while(0)
static asn_per_constraint_t asn_DEF_BIT_STRING_constraint_size = {
APC_SEMI_CONSTRAINED, -1, -1, 0, 0};
asn_dec_rval_t
BIT_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr,
asn_per_data_t *pd) {
const asn_OCTET_STRING_specifics_t *specs = td->specifics
? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_BIT_STRING_specs;
const asn_per_constraints_t *pc =
constraints ? constraints : td->encoding_constraints.per_constraints;
const asn_per_constraint_t *csiz;
asn_dec_rval_t rval = { RC_OK, 0 };
BIT_STRING_t *st = (BIT_STRING_t *)*sptr;
ssize_t consumed_myself = 0;
int repeat;
(void)opt_codec_ctx;
if(pc) {
csiz = &pc->size;
} else {
csiz = &asn_DEF_BIT_STRING_constraint_size;
}
if(specs->subvariant != ASN_OSUBV_BIT) {
ASN_DEBUG("Subvariant %d is not BIT OSUBV_BIT", specs->subvariant);
RETURN(RC_FAIL);
}
/*
* Allocate the string.
*/
if(!st) {
st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d",
csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible",
csiz->lower_bound, csiz->upper_bound, csiz->effective_bits);
if(csiz->flags & APC_EXTENSIBLE) {
int inext = per_get_few_bits(pd, 1);
if(inext < 0) RETURN(RC_WMORE);
if(inext) {
csiz = &asn_DEF_BIT_STRING_constraint_size;
}
}
if(csiz->effective_bits >= 0) {
FREEMEM(st->buf);
st->size = (csiz->upper_bound + 7) >> 3;
st->buf = (uint8_t *)MALLOC(st->size + 1);
if(!st->buf) { st->size = 0; RETURN(RC_FAIL); }
}
/* X.691, #16.5: zero-length encoding */
/* X.691, #16.6: short fixed length encoding (up to 2 octets) */
/* X.691, #16.7: long fixed length encoding (up to 64K octets) */
if(csiz->effective_bits == 0) {
int ret;
ASN_DEBUG("Encoding BIT STRING size %ld", csiz->upper_bound);
ret = per_get_many_bits(pd, st->buf, 0, csiz->upper_bound);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += csiz->upper_bound;
st->buf[st->size] = 0;
st->bits_unused = (8 - (csiz->upper_bound & 0x7)) & 0x7;
RETURN(RC_OK);
}
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound,
&repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)",
(long)csiz->effective_bits, (long)raw_len,
repeat ? "repeat" : "once", td->name);
len_bits = raw_len;
len_bytes = (len_bits + 7) >> 3;
if(len_bits & 0x7) st->bits_unused = 8 - (len_bits & 0x7);
/* len_bits be multiple of 16K if repeat is set */
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
return rval;
}
asn_enc_rval_t
BIT_STRING_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_BIT_STRING_specs;
const asn_per_constraints_t *pc =
constraints ? constraints : td->encoding_constraints.per_constraints;
const asn_per_constraint_t *csiz;
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
BIT_STRING_t compact_bstr; /* Do not modify this directly! */
asn_enc_rval_t er = { 0, 0, 0 };
int inext = 0; /* Lies not within extension root */
size_t size_in_bits;
const uint8_t *buf;
int ret;
int ct_extensible;
if(!st || (!st->buf && st->size))
ASN__ENCODE_FAILED;
if(specs->subvariant == ASN_OSUBV_BIT) {
if((st->size == 0 && st->bits_unused) || (st->bits_unused & ~7))
ASN__ENCODE_FAILED;
} else {
ASN__ENCODE_FAILED;
}
if(pc) {
csiz = &pc->size;
} else {
csiz = &asn_DEF_BIT_STRING_constraint_size;
}
ct_extensible = csiz->flags & APC_EXTENSIBLE;
/* Figure out the size without the trailing bits */
st = BIT_STRING__compactify(st, &compact_bstr);
size_in_bits = 8 * st->size - st->bits_unused;
ASN_DEBUG(
"Encoding %s into %" ASN_PRI_SIZE " bits"
" (%ld..%ld, effective %d)%s",
td->name, size_in_bits, csiz->lower_bound, csiz->upper_bound,
csiz->effective_bits, ct_extensible ? " EXT" : "");
/* Figure out whether size lies within PER visible constraint */
if(csiz->effective_bits >= 0) {
if((ssize_t)size_in_bits > csiz->upper_bound) {
if(ct_extensible) {
csiz = &asn_DEF_BIT_STRING_constraint_size;
inext = 1;
} else {
ASN__ENCODE_FAILED;
}
}
} else {
inext = 0;
}
if(ct_extensible) {
/* Declare whether length is [not] within extension root */
if(per_put_few_bits(po, inext, 1))
ASN__ENCODE_FAILED;
}
if(csiz->effective_bits >= 0 && !inext) {
int add_trailer = (ssize_t)size_in_bits < csiz->lower_bound;
ASN_DEBUG(
"Encoding %" ASN_PRI_SIZE " bytes (%ld), length (in %d bits) trailer %d; actual "
"value %" ASN_PRI_SSIZE "",
st->size, size_in_bits - csiz->lower_bound, csiz->effective_bits,
add_trailer,
add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound);
ret = per_put_few_bits(
po, add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound,
csiz->effective_bits);
if(ret) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, st->buf, size_in_bits);
if(ret) ASN__ENCODE_FAILED;
if(add_trailer) {
static const uint8_t zeros[16];
size_t trailing_zero_bits = csiz->lower_bound - size_in_bits;
while(trailing_zero_bits > 0) {
if(trailing_zero_bits > 8 * sizeof(zeros)) {
ret = per_put_many_bits(po, zeros, 8 * sizeof(zeros));
trailing_zero_bits -= 8 * sizeof(zeros);
} else {
ret = per_put_many_bits(po, zeros, trailing_zero_bits);
trailing_zero_bits = 0;
}
if(ret) ASN__ENCODE_FAILED;
}
}
ASN__ENCODED_OK(er);
}
ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size);
buf = st->buf;
do {
int need_eom = 0;
ssize_t maySave = uper_put_length(po, size_in_bits, &need_eom);
if(maySave < 0) ASN__ENCODE_FAILED;
ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "", maySave, size_in_bits);
ret = per_put_many_bits(po, buf, maySave);
if(ret) ASN__ENCODE_FAILED;
buf += maySave >> 3;
size_in_bits -= maySave;
assert(!(maySave & 0x07) || !size_in_bits);
if(need_eom && uper_put_length(po, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size_in_bits);
ASN__ENCODED_OK(er);
}
#endif /* ASN_DISABLE_PER_SUPPORT */
asn_random_fill_result_t
BIT_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
const asn_encoding_constraints_t *constraints,
size_t max_length) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_BIT_STRING_specs;
asn_random_fill_result_t result_ok = {ARFILL_OK, 1};
asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0};
asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0};
static unsigned lengths[] = {0, 1, 2, 3, 4, 8,
126, 127, 128, 16383, 16384, 16385,
65534, 65535, 65536, 65537};
uint8_t *buf;
uint8_t *bend;
uint8_t *b;
size_t rnd_bits, rnd_len;
BIT_STRING_t *st;
if(max_length == 0) return result_skipped;
switch(specs->subvariant) {
case ASN_OSUBV_ANY:
return result_failed;
case ASN_OSUBV_BIT:
break;
default:
break;
}
/* Figure out how far we should go */
rnd_bits = lengths[asn_random_between(
0, sizeof(lengths) / sizeof(lengths[0]) - 1)];
if(!constraints || !constraints->per_constraints)
constraints = &td->encoding_constraints;
if(constraints->per_constraints) {
const asn_per_constraint_t *pc = &constraints->per_constraints->size;
if(pc->flags & APC_CONSTRAINED) {
long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length
? pc->upper_bound
: (ssize_t)max_length;
if(max_length < (size_t)pc->lower_bound) {
return result_skipped;
}
if(pc->flags & APC_EXTENSIBLE) {
switch(asn_random_between(0, 5)) {
case 0:
if(pc->lower_bound > 0) {
rnd_bits = pc->lower_bound - 1;
break;
}
/* Fall through */
case 1:
rnd_bits = pc->upper_bound + 1;
break;
case 2:
/* Keep rnd_bits from the table */
if(rnd_bits < max_length) {
break;
}
/* Fall through */
default:
rnd_bits = asn_random_between(pc->lower_bound,
suggested_upper_bound);
}
} else {
rnd_bits =
asn_random_between(pc->lower_bound, suggested_upper_bound);
}
} else {
rnd_bits = asn_random_between(0, max_length - 1);
}
} else if(rnd_bits >= max_length) {
rnd_bits = asn_random_between(0, max_length - 1);
}
rnd_len = (rnd_bits + 7) / 8;
buf = CALLOC(1, rnd_len + 1);
if(!buf) return result_failed;
bend = &buf[rnd_len];
for(b = buf; b < bend; b++) {
*(uint8_t *)b = asn_random_between(0, 255);
}
*b = 0; /* Zero-terminate just in case. */
if(*sptr) {
st = *sptr;
FREEMEM(st->buf);
} else {
st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) {
FREEMEM(buf);
return result_failed;
}
}
st->buf = buf;
st->size = rnd_len;
st->bits_unused = (8 - (rnd_bits & 0x7)) & 0x7;
if(st->bits_unused) {
assert(st->size > 0);
st->buf[st->size-1] &= 0xff << st->bits_unused;
}
result_ok.length = st->size;
return result_ok;
}

View File

@@ -0,0 +1,48 @@
/*-
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _BIT_STRING_H_
#define _BIT_STRING_H_
#include <OCTET_STRING.h> /* Some help from OCTET STRING */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct BIT_STRING_s {
uint8_t *buf; /* BIT STRING body */
size_t size; /* Size of the above buffer */
int bits_unused;/* Unused trailing bits in the last octet (0..7) */
asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */
} BIT_STRING_t;
extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING;
extern asn_TYPE_operation_t asn_OP_BIT_STRING;
extern asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs;
asn_struct_print_f BIT_STRING_print; /* Human-readable output */
asn_struct_compare_f BIT_STRING_compare;
asn_constr_check_f BIT_STRING_constraint;
xer_type_encoder_f BIT_STRING_encode_xer;
oer_type_decoder_f BIT_STRING_decode_oer;
oer_type_encoder_f BIT_STRING_encode_oer;
per_type_decoder_f BIT_STRING_decode_uper;
per_type_encoder_f BIT_STRING_encode_uper;
asn_random_fill_f BIT_STRING_random_fill;
#define BIT_STRING_free OCTET_STRING_free
#define BIT_STRING_decode_ber OCTET_STRING_decode_ber
#define BIT_STRING_encode_der OCTET_STRING_encode_der
#define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary
#define BIT_STRING_decode_aper OCTET_STRING_decode_aper
#define BIT_STRING_encode_aper OCTET_STRING_encode_aper
#ifdef __cplusplus
}
#endif
#endif /* _BIT_STRING_H_ */

View File

@@ -0,0 +1,110 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "Cause.h"
asn_per_constraints_t asn_PER_type_Cause_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_Cause_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct Cause, choice.ricRequest),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CauseRIC,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ricRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct Cause, choice.ricService),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CauseRICservice,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ricService"
},
{ ATF_NOFLAGS, 0, offsetof(struct Cause, choice.transport),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CauseTransport,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"transport"
},
{ ATF_NOFLAGS, 0, offsetof(struct Cause, choice.protocol),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CauseProtocol,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"protocol"
},
{ ATF_NOFLAGS, 0, offsetof(struct Cause, choice.misc),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CauseMisc,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"misc"
},
};
static const asn_TYPE_tag2member_t asn_MAP_Cause_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ricService */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* misc */
};
asn_CHOICE_specifics_t asn_SPC_Cause_specs_1 = {
sizeof(struct Cause),
offsetof(struct Cause, _asn_ctx),
offsetof(struct Cause, present),
sizeof(((struct Cause *)0)->present),
asn_MAP_Cause_tag2el_1,
5, /* Count of tags in the map */
0, 0,
5 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Cause = {
"Cause",
"Cause",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_Cause_constr_1, CHOICE_constraint },
asn_MBR_Cause_1,
5, /* Elements count */
&asn_SPC_Cause_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,86 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _Cause_H_
#define _Cause_H_
#include "asn_application.h"
/* Including external dependencies */
#include "CauseRIC.h"
#include "CauseRICservice.h"
#include "CauseTransport.h"
#include "CauseProtocol.h"
#include "CauseMisc.h"
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum Cause_PR {
Cause_PR_NOTHING, /* No components present */
Cause_PR_ricRequest,
Cause_PR_ricService,
Cause_PR_transport,
Cause_PR_protocol,
Cause_PR_misc
/* Extensions may appear below */
} Cause_PR;
/* Cause */
typedef struct Cause {
Cause_PR present;
union Cause_u {
CauseRIC_t ricRequest;
CauseRICservice_t ricService;
CauseTransport_t transport;
CauseProtocol_t protocol;
CauseMisc_t misc;
/*
* This type is extensible,
* possible extensions are below.
*/
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} Cause_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_Cause;
extern asn_CHOICE_specifics_t asn_SPC_Cause_specs_1;
extern asn_TYPE_member_t asn_MBR_Cause_1[5];
extern asn_per_constraints_t asn_PER_type_Cause_constr_1;
#ifdef __cplusplus
}
#endif
#endif /* _Cause_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,77 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CauseMisc.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_CauseMisc_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_CauseMisc_value2enum_1[] = {
{ 0, 27, "control-processing-overload" },
{ 1, 16, "hardware-failure" },
{ 2, 15, "om-intervention" },
{ 3, 11, "unspecified" }
/* This list is extensible */
};
static const unsigned int asn_MAP_CauseMisc_enum2value_1[] = {
0, /* control-processing-overload(0) */
1, /* hardware-failure(1) */
2, /* om-intervention(2) */
3 /* unspecified(3) */
/* This list is extensible */
};
const asn_INTEGER_specifics_t asn_SPC_CauseMisc_specs_1 = {
asn_MAP_CauseMisc_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_CauseMisc_enum2value_1, /* N => "tag"; sorted by N */
4, /* Number of elements in the maps */
5, /* Extensions before this member */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_CauseMisc_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CauseMisc = {
"CauseMisc",
"CauseMisc",
&asn_OP_NativeEnumerated,
asn_DEF_CauseMisc_tags_1,
sizeof(asn_DEF_CauseMisc_tags_1)
/sizeof(asn_DEF_CauseMisc_tags_1[0]), /* 1 */
asn_DEF_CauseMisc_tags_1, /* Same as above */
sizeof(asn_DEF_CauseMisc_tags_1)
/sizeof(asn_DEF_CauseMisc_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_CauseMisc_constr_1, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_CauseMisc_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,74 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CauseMisc_H_
#define _CauseMisc_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeEnumerated.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum CauseMisc {
CauseMisc_control_processing_overload = 0,
CauseMisc_hardware_failure = 1,
CauseMisc_om_intervention = 2,
CauseMisc_unspecified = 3
/*
* Enumeration is extensible
*/
} e_CauseMisc;
/* CauseMisc */
typedef long CauseMisc_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_CauseMisc_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_CauseMisc;
extern const asn_INTEGER_specifics_t asn_SPC_CauseMisc_specs_1;
asn_struct_free_f CauseMisc_free;
asn_struct_print_f CauseMisc_print;
asn_constr_check_f CauseMisc_constraint;
ber_type_decoder_f CauseMisc_decode_ber;
der_type_encoder_f CauseMisc_encode_der;
xer_type_decoder_f CauseMisc_decode_xer;
xer_type_encoder_f CauseMisc_encode_xer;
per_type_decoder_f CauseMisc_decode_uper;
per_type_encoder_f CauseMisc_encode_uper;
per_type_decoder_f CauseMisc_decode_aper;
per_type_encoder_f CauseMisc_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _CauseMisc_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,83 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CauseProtocol.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_CauseProtocol_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_CauseProtocol_value2enum_1[] = {
{ 0, 21, "transfer-syntax-error" },
{ 1, 28, "abstract-syntax-error-reject" },
{ 2, 39, "abstract-syntax-error-ignore-and-notify" },
{ 3, 42, "message-not-compatible-with-receiver-state" },
{ 4, 14, "semantic-error" },
{ 5, 49, "abstract-syntax-error-falsely-constructed-message" },
{ 6, 11, "unspecified" }
/* This list is extensible */
};
static const unsigned int asn_MAP_CauseProtocol_enum2value_1[] = {
5, /* abstract-syntax-error-falsely-constructed-message(5) */
2, /* abstract-syntax-error-ignore-and-notify(2) */
1, /* abstract-syntax-error-reject(1) */
3, /* message-not-compatible-with-receiver-state(3) */
4, /* semantic-error(4) */
0, /* transfer-syntax-error(0) */
6 /* unspecified(6) */
/* This list is extensible */
};
const asn_INTEGER_specifics_t asn_SPC_CauseProtocol_specs_1 = {
asn_MAP_CauseProtocol_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_CauseProtocol_enum2value_1, /* N => "tag"; sorted by N */
7, /* Number of elements in the maps */
8, /* Extensions before this member */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_CauseProtocol_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CauseProtocol = {
"CauseProtocol",
"CauseProtocol",
&asn_OP_NativeEnumerated,
asn_DEF_CauseProtocol_tags_1,
sizeof(asn_DEF_CauseProtocol_tags_1)
/sizeof(asn_DEF_CauseProtocol_tags_1[0]), /* 1 */
asn_DEF_CauseProtocol_tags_1, /* Same as above */
sizeof(asn_DEF_CauseProtocol_tags_1)
/sizeof(asn_DEF_CauseProtocol_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_CauseProtocol_constr_1, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_CauseProtocol_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,77 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CauseProtocol_H_
#define _CauseProtocol_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeEnumerated.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum CauseProtocol {
CauseProtocol_transfer_syntax_error = 0,
CauseProtocol_abstract_syntax_error_reject = 1,
CauseProtocol_abstract_syntax_error_ignore_and_notify = 2,
CauseProtocol_message_not_compatible_with_receiver_state = 3,
CauseProtocol_semantic_error = 4,
CauseProtocol_abstract_syntax_error_falsely_constructed_message = 5,
CauseProtocol_unspecified = 6
/*
* Enumeration is extensible
*/
} e_CauseProtocol;
/* CauseProtocol */
typedef long CauseProtocol_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_CauseProtocol_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_CauseProtocol;
extern const asn_INTEGER_specifics_t asn_SPC_CauseProtocol_specs_1;
asn_struct_free_f CauseProtocol_free;
asn_struct_print_f CauseProtocol_print;
asn_constr_check_f CauseProtocol_constraint;
ber_type_decoder_f CauseProtocol_decode_ber;
der_type_encoder_f CauseProtocol_encode_der;
xer_type_decoder_f CauseProtocol_decode_xer;
xer_type_encoder_f CauseProtocol_encode_xer;
per_type_decoder_f CauseProtocol_decode_uper;
per_type_encoder_f CauseProtocol_encode_uper;
per_type_decoder_f CauseProtocol_decode_aper;
per_type_encoder_f CauseProtocol_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _CauseProtocol_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,91 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CauseRIC.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_CauseRIC_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 10 } /* (0..10,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_CauseRIC_value2enum_1[] = {
{ 0, 23, "ran-function-id-Invalid" },
{ 1, 20, "action-not-supported" },
{ 2, 17, "excessive-actions" },
{ 3, 16, "duplicate-action" },
{ 4, 15, "duplicate-event" },
{ 5, 23, "function-resource-limit" },
{ 6, 18, "request-id-unknown" },
{ 7, 46, "inconsistent-action-subsequent-action-sequence" },
{ 8, 23, "control-message-invalid" },
{ 9, 23, "call-process-id-invalid" },
{ 10, 11, "unspecified" }
/* This list is extensible */
};
static const unsigned int asn_MAP_CauseRIC_enum2value_1[] = {
1, /* action-not-supported(1) */
9, /* call-process-id-invalid(9) */
8, /* control-message-invalid(8) */
3, /* duplicate-action(3) */
4, /* duplicate-event(4) */
2, /* excessive-actions(2) */
5, /* function-resource-limit(5) */
7, /* inconsistent-action-subsequent-action-sequence(7) */
0, /* ran-function-id-Invalid(0) */
6, /* request-id-unknown(6) */
10 /* unspecified(10) */
/* This list is extensible */
};
const asn_INTEGER_specifics_t asn_SPC_CauseRIC_specs_1 = {
asn_MAP_CauseRIC_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_CauseRIC_enum2value_1, /* N => "tag"; sorted by N */
11, /* Number of elements in the maps */
12, /* Extensions before this member */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_CauseRIC_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CauseRIC = {
"CauseRIC",
"CauseRIC",
&asn_OP_NativeEnumerated,
asn_DEF_CauseRIC_tags_1,
sizeof(asn_DEF_CauseRIC_tags_1)
/sizeof(asn_DEF_CauseRIC_tags_1[0]), /* 1 */
asn_DEF_CauseRIC_tags_1, /* Same as above */
sizeof(asn_DEF_CauseRIC_tags_1)
/sizeof(asn_DEF_CauseRIC_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_CauseRIC_constr_1, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_CauseRIC_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,81 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CauseRIC_H_
#define _CauseRIC_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeEnumerated.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum CauseRIC {
CauseRIC_ran_function_id_Invalid = 0,
CauseRIC_action_not_supported = 1,
CauseRIC_excessive_actions = 2,
CauseRIC_duplicate_action = 3,
CauseRIC_duplicate_event = 4,
CauseRIC_function_resource_limit = 5,
CauseRIC_request_id_unknown = 6,
CauseRIC_inconsistent_action_subsequent_action_sequence = 7,
CauseRIC_control_message_invalid = 8,
CauseRIC_call_process_id_invalid = 9,
CauseRIC_unspecified = 10
/*
* Enumeration is extensible
*/
} e_CauseRIC;
/* CauseRIC */
typedef long CauseRIC_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_CauseRIC_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_CauseRIC;
extern const asn_INTEGER_specifics_t asn_SPC_CauseRIC_specs_1;
asn_struct_free_f CauseRIC_free;
asn_struct_print_f CauseRIC_print;
asn_constr_check_f CauseRIC_constraint;
ber_type_decoder_f CauseRIC_decode_ber;
der_type_encoder_f CauseRIC_encode_der;
xer_type_decoder_f CauseRIC_decode_xer;
xer_type_encoder_f CauseRIC_encode_xer;
per_type_decoder_f CauseRIC_decode_uper;
per_type_encoder_f CauseRIC_encode_uper;
per_type_decoder_f CauseRIC_decode_aper;
per_type_encoder_f CauseRIC_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _CauseRIC_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,75 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CauseRICservice.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_CauseRICservice_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_CauseRICservice_value2enum_1[] = {
{ 0, 21, "function-not-required" },
{ 1, 19, "excessive-functions" },
{ 2, 18, "ric-resource-limit" }
/* This list is extensible */
};
static const unsigned int asn_MAP_CauseRICservice_enum2value_1[] = {
1, /* excessive-functions(1) */
0, /* function-not-required(0) */
2 /* ric-resource-limit(2) */
/* This list is extensible */
};
const asn_INTEGER_specifics_t asn_SPC_CauseRICservice_specs_1 = {
asn_MAP_CauseRICservice_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_CauseRICservice_enum2value_1, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
4, /* Extensions before this member */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_CauseRICservice_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CauseRICservice = {
"CauseRICservice",
"CauseRICservice",
&asn_OP_NativeEnumerated,
asn_DEF_CauseRICservice_tags_1,
sizeof(asn_DEF_CauseRICservice_tags_1)
/sizeof(asn_DEF_CauseRICservice_tags_1[0]), /* 1 */
asn_DEF_CauseRICservice_tags_1, /* Same as above */
sizeof(asn_DEF_CauseRICservice_tags_1)
/sizeof(asn_DEF_CauseRICservice_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_CauseRICservice_constr_1, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_CauseRICservice_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,73 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CauseRICservice_H_
#define _CauseRICservice_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeEnumerated.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum CauseRICservice {
CauseRICservice_function_not_required = 0,
CauseRICservice_excessive_functions = 1,
CauseRICservice_ric_resource_limit = 2
/*
* Enumeration is extensible
*/
} e_CauseRICservice;
/* CauseRICservice */
typedef long CauseRICservice_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_CauseRICservice_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_CauseRICservice;
extern const asn_INTEGER_specifics_t asn_SPC_CauseRICservice_specs_1;
asn_struct_free_f CauseRICservice_free;
asn_struct_print_f CauseRICservice_print;
asn_constr_check_f CauseRICservice_constraint;
ber_type_decoder_f CauseRICservice_decode_ber;
der_type_encoder_f CauseRICservice_encode_der;
xer_type_decoder_f CauseRICservice_decode_xer;
xer_type_encoder_f CauseRICservice_encode_xer;
per_type_decoder_f CauseRICservice_decode_uper;
per_type_encoder_f CauseRICservice_encode_uper;
per_type_decoder_f CauseRICservice_decode_aper;
per_type_encoder_f CauseRICservice_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _CauseRICservice_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,73 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CauseTransport.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_CauseTransport_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_CauseTransport_value2enum_1[] = {
{ 0, 11, "unspecified" },
{ 1, 30, "transport-resource-unavailable" }
/* This list is extensible */
};
static const unsigned int asn_MAP_CauseTransport_enum2value_1[] = {
1, /* transport-resource-unavailable(1) */
0 /* unspecified(0) */
/* This list is extensible */
};
const asn_INTEGER_specifics_t asn_SPC_CauseTransport_specs_1 = {
asn_MAP_CauseTransport_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_CauseTransport_enum2value_1, /* N => "tag"; sorted by N */
2, /* Number of elements in the maps */
3, /* Extensions before this member */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_CauseTransport_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CauseTransport = {
"CauseTransport",
"CauseTransport",
&asn_OP_NativeEnumerated,
asn_DEF_CauseTransport_tags_1,
sizeof(asn_DEF_CauseTransport_tags_1)
/sizeof(asn_DEF_CauseTransport_tags_1[0]), /* 1 */
asn_DEF_CauseTransport_tags_1, /* Same as above */
sizeof(asn_DEF_CauseTransport_tags_1)
/sizeof(asn_DEF_CauseTransport_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_CauseTransport_constr_1, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_CauseTransport_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,72 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CauseTransport_H_
#define _CauseTransport_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeEnumerated.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum CauseTransport {
CauseTransport_unspecified = 0,
CauseTransport_transport_resource_unavailable = 1
/*
* Enumeration is extensible
*/
} e_CauseTransport;
/* CauseTransport */
typedef long CauseTransport_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_CauseTransport_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_CauseTransport;
extern const asn_INTEGER_specifics_t asn_SPC_CauseTransport_specs_1;
asn_struct_free_f CauseTransport_free;
asn_struct_print_f CauseTransport_print;
asn_constr_check_f CauseTransport_constraint;
ber_type_decoder_f CauseTransport_decode_ber;
der_type_encoder_f CauseTransport_encode_der;
xer_type_decoder_f CauseTransport_decode_xer;
xer_type_encoder_f CauseTransport_encode_xer;
per_type_decoder_f CauseTransport_decode_uper;
per_type_encoder_f CauseTransport_encode_uper;
per_type_decoder_f CauseTransport_decode_aper;
per_type_encoder_f CauseTransport_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _CauseTransport_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,73 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-CommonDataTypes"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "Criticality.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_Criticality_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_Criticality_value2enum_1[] = {
{ 0, 6, "reject" },
{ 1, 6, "ignore" },
{ 2, 6, "notify" }
};
static const unsigned int asn_MAP_Criticality_enum2value_1[] = {
1, /* ignore(1) */
2, /* notify(2) */
0 /* reject(0) */
};
const asn_INTEGER_specifics_t asn_SPC_Criticality_specs_1 = {
asn_MAP_Criticality_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_Criticality_enum2value_1, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_Criticality_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Criticality = {
"Criticality",
"Criticality",
&asn_OP_NativeEnumerated,
asn_DEF_Criticality_tags_1,
sizeof(asn_DEF_Criticality_tags_1)
/sizeof(asn_DEF_Criticality_tags_1[0]), /* 1 */
asn_DEF_Criticality_tags_1, /* Same as above */
sizeof(asn_DEF_Criticality_tags_1)
/sizeof(asn_DEF_Criticality_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_Criticality_constr_1, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_Criticality_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,70 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-CommonDataTypes"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _Criticality_H_
#define _Criticality_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeEnumerated.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum Criticality {
Criticality_reject = 0,
Criticality_ignore = 1,
Criticality_notify = 2
} e_Criticality;
/* Criticality */
typedef long Criticality_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_Criticality_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_Criticality;
extern const asn_INTEGER_specifics_t asn_SPC_Criticality_specs_1;
asn_struct_free_f Criticality_free;
asn_struct_print_f Criticality_print;
asn_constr_check_f Criticality_constraint;
ber_type_decoder_f Criticality_decode_ber;
der_type_encoder_f Criticality_encode_der;
xer_type_decoder_f Criticality_decode_xer;
xer_type_encoder_f Criticality_encode_xer;
per_type_decoder_f Criticality_decode_uper;
per_type_encoder_f Criticality_encode_uper;
per_type_decoder_f Criticality_decode_aper;
per_type_encoder_f Criticality_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _Criticality_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,88 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CriticalityDiagnostics-IE-Item.h"
asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, iECriticality),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Criticality,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"iECriticality"
},
{ ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, iE_ID),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolIE_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"iE-ID"
},
{ ATF_NOFLAGS, 0, offsetof(struct CriticalityDiagnostics_IE_Item, typeOfError),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_TypeOfError,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"typeOfError"
},
};
static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_CriticalityDiagnostics_IE_Item_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iECriticality */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* iE-ID */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* typeOfError */
};
asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_IE_Item_specs_1 = {
sizeof(struct CriticalityDiagnostics_IE_Item),
offsetof(struct CriticalityDiagnostics_IE_Item, _asn_ctx),
asn_MAP_CriticalityDiagnostics_IE_Item_tag2el_1,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
3, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_Item = {
"CriticalityDiagnostics-IE-Item",
"CriticalityDiagnostics-IE-Item",
&asn_OP_SEQUENCE,
asn_DEF_CriticalityDiagnostics_IE_Item_tags_1,
sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1)
/sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */
asn_DEF_CriticalityDiagnostics_IE_Item_tags_1, /* Same as above */
sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1)
/sizeof(asn_DEF_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_CriticalityDiagnostics_IE_Item_1,
3, /* Elements count */
&asn_SPC_CriticalityDiagnostics_IE_Item_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,66 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CriticalityDiagnostics_IE_Item_H_
#define _CriticalityDiagnostics_IE_Item_H_
#include "asn_application.h"
/* Including external dependencies */
#include "Criticality.h"
#include "ProtocolIE-ID.h"
#include "TypeOfError.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* CriticalityDiagnostics-IE-Item */
typedef struct CriticalityDiagnostics_IE_Item {
Criticality_t iECriticality;
ProtocolIE_ID_t iE_ID;
TypeOfError_t typeOfError;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} CriticalityDiagnostics_IE_Item_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_Item;
extern asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_IE_Item_specs_1;
extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_Item_1[3];
#ifdef __cplusplus
}
#endif
#endif /* _CriticalityDiagnostics_IE_Item_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CriticalityDiagnostics-IE-List.h"
#include "CriticalityDiagnostics-IE-Item.h"
asn_per_constraints_t asn_PER_type_CriticalityDiagnostics_IE_List_constr_1 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_List_1[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_CriticalityDiagnostics_IE_Item,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_IE_List_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_CriticalityDiagnostics_IE_List_specs_1 = {
sizeof(struct CriticalityDiagnostics_IE_List),
offsetof(struct CriticalityDiagnostics_IE_List, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_List = {
"CriticalityDiagnostics-IE-List",
"CriticalityDiagnostics-IE-List",
&asn_OP_SEQUENCE_OF,
asn_DEF_CriticalityDiagnostics_IE_List_tags_1,
sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1)
/sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */
asn_DEF_CriticalityDiagnostics_IE_List_tags_1, /* Same as above */
sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1)
/sizeof(asn_DEF_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_CriticalityDiagnostics_IE_List_constr_1, SEQUENCE_OF_constraint },
asn_MBR_CriticalityDiagnostics_IE_List_1,
1, /* Single element */
&asn_SPC_CriticalityDiagnostics_IE_List_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CriticalityDiagnostics_IE_List_H_
#define _CriticalityDiagnostics_IE_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 CriticalityDiagnostics_IE_Item;
/* CriticalityDiagnostics-IE-List */
typedef struct CriticalityDiagnostics_IE_List {
A_SEQUENCE_OF(struct CriticalityDiagnostics_IE_Item) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} CriticalityDiagnostics_IE_List_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics_IE_List;
extern asn_SET_OF_specifics_t asn_SPC_CriticalityDiagnostics_IE_List_specs_1;
extern asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_IE_List_1[1];
extern asn_per_constraints_t asn_PER_type_CriticalityDiagnostics_IE_List_constr_1;
#ifdef __cplusplus
}
#endif
#endif /* _CriticalityDiagnostics_IE_List_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,112 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "CriticalityDiagnostics.h"
#include "RICrequestID.h"
#include "CriticalityDiagnostics-IE-List.h"
static asn_TYPE_member_t asn_MBR_CriticalityDiagnostics_1[] = {
{ ATF_POINTER, 5, offsetof(struct CriticalityDiagnostics, procedureCode),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProcedureCode,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"procedureCode"
},
{ ATF_POINTER, 4, offsetof(struct CriticalityDiagnostics, triggeringMessage),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_TriggeringMessage,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"triggeringMessage"
},
{ ATF_POINTER, 3, offsetof(struct CriticalityDiagnostics, procedureCriticality),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Criticality,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"procedureCriticality"
},
{ ATF_POINTER, 2, offsetof(struct CriticalityDiagnostics, ricRequestorID),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_RICrequestID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ricRequestorID"
},
{ ATF_POINTER, 1, offsetof(struct CriticalityDiagnostics, iEsCriticalityDiagnostics),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CriticalityDiagnostics_IE_List,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"iEsCriticalityDiagnostics"
},
};
static const int asn_MAP_CriticalityDiagnostics_oms_1[] = { 0, 1, 2, 3, 4 };
static const ber_tlv_tag_t asn_DEF_CriticalityDiagnostics_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_CriticalityDiagnostics_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* triggeringMessage */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* procedureCriticality */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ricRequestorID */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iEsCriticalityDiagnostics */
};
static asn_SEQUENCE_specifics_t asn_SPC_CriticalityDiagnostics_specs_1 = {
sizeof(struct CriticalityDiagnostics),
offsetof(struct CriticalityDiagnostics, _asn_ctx),
asn_MAP_CriticalityDiagnostics_tag2el_1,
5, /* Count of tags in the map */
asn_MAP_CriticalityDiagnostics_oms_1, /* Optional members */
5, 0, /* Root/Additions */
5, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics = {
"CriticalityDiagnostics",
"CriticalityDiagnostics",
&asn_OP_SEQUENCE,
asn_DEF_CriticalityDiagnostics_tags_1,
sizeof(asn_DEF_CriticalityDiagnostics_tags_1)
/sizeof(asn_DEF_CriticalityDiagnostics_tags_1[0]), /* 1 */
asn_DEF_CriticalityDiagnostics_tags_1, /* Same as above */
sizeof(asn_DEF_CriticalityDiagnostics_tags_1)
/sizeof(asn_DEF_CriticalityDiagnostics_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_CriticalityDiagnostics_1,
5, /* Elements count */
&asn_SPC_CriticalityDiagnostics_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,70 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _CriticalityDiagnostics_H_
#define _CriticalityDiagnostics_H_
#include "asn_application.h"
/* Including external dependencies */
#include "ProcedureCode.h"
#include "TriggeringMessage.h"
#include "Criticality.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
struct RICrequestID;
struct CriticalityDiagnostics_IE_List;
/* CriticalityDiagnostics */
typedef struct CriticalityDiagnostics {
ProcedureCode_t *procedureCode; /* OPTIONAL */
TriggeringMessage_t *triggeringMessage; /* OPTIONAL */
Criticality_t *procedureCriticality; /* OPTIONAL */
struct RICrequestID *ricRequestorID; /* OPTIONAL */
struct CriticalityDiagnostics_IE_List *iEsCriticalityDiagnostics; /* OPTIONAL */
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} CriticalityDiagnostics_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_CriticalityDiagnostics;
#ifdef __cplusplus
}
#endif
#endif /* _CriticalityDiagnostics_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,93 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Descriptions"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "E2AP-PDU.h"
#include "InitiatingMessage.h"
#include "SuccessfulOutcome.h"
#include "UnsuccessfulOutcome.h"
static asn_per_constraints_t asn_PER_type_E2AP_PDU_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_TYPE_member_t asn_MBR_E2AP_PDU_1[] = {
{ ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.initiatingMessage),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_InitiatingMessage,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"initiatingMessage"
},
{ ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.successfulOutcome),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_SuccessfulOutcome,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"successfulOutcome"
},
{ ATF_POINTER, 0, offsetof(struct E2AP_PDU, choice.unsuccessfulOutcome),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_UnsuccessfulOutcome,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"unsuccessfulOutcome"
},
};
static const asn_TYPE_tag2member_t asn_MAP_E2AP_PDU_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* initiatingMessage */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* successfulOutcome */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* unsuccessfulOutcome */
};
static asn_CHOICE_specifics_t asn_SPC_E2AP_PDU_specs_1 = {
sizeof(struct E2AP_PDU),
offsetof(struct E2AP_PDU, _asn_ctx),
offsetof(struct E2AP_PDU, present),
sizeof(((struct E2AP_PDU *)0)->present),
asn_MAP_E2AP_PDU_tag2el_1,
3, /* Count of tags in the map */
0, 0,
3 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_E2AP_PDU = {
"E2AP-PDU",
"E2AP-PDU",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_E2AP_PDU_constr_1, CHOICE_constraint },
asn_MBR_E2AP_PDU_1,
3, /* Elements count */
&asn_SPC_E2AP_PDU_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,79 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Descriptions"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _E2AP_PDU_H_
#define _E2AP_PDU_H_
#include "asn_application.h"
/* Including external dependencies */
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum E2AP_PDU_PR {
E2AP_PDU_PR_NOTHING, /* No components present */
E2AP_PDU_PR_initiatingMessage,
E2AP_PDU_PR_successfulOutcome,
E2AP_PDU_PR_unsuccessfulOutcome
/* Extensions may appear below */
} E2AP_PDU_PR;
/* Forward declarations */
struct InitiatingMessage;
struct SuccessfulOutcome;
struct UnsuccessfulOutcome;
/* E2AP-PDU */
typedef struct E2AP_PDU {
E2AP_PDU_PR present;
union E2AP_PDU_u {
struct InitiatingMessage *initiatingMessage;
struct SuccessfulOutcome *successfulOutcome;
struct UnsuccessfulOutcome *unsuccessfulOutcome;
/*
* This type is extensible,
* possible extensions are below.
*/
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} E2AP_PDU_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_E2AP_PDU;
#ifdef __cplusplus
}
#endif
#endif /* _E2AP_PDU_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "E2setupFailure.h"
asn_TYPE_member_t asn_MBR_E2setupFailure_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct E2setupFailure, protocolIEs),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolIE_Container_1544P13,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"protocolIEs"
},
};
static const ber_tlv_tag_t asn_DEF_E2setupFailure_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_E2setupFailure_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_E2setupFailure_specs_1 = {
sizeof(struct E2setupFailure),
offsetof(struct E2setupFailure, _asn_ctx),
asn_MAP_E2setupFailure_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_E2setupFailure = {
"E2setupFailure",
"E2setupFailure",
&asn_OP_SEQUENCE,
asn_DEF_E2setupFailure_tags_1,
sizeof(asn_DEF_E2setupFailure_tags_1)
/sizeof(asn_DEF_E2setupFailure_tags_1[0]), /* 1 */
asn_DEF_E2setupFailure_tags_1, /* Same as above */
sizeof(asn_DEF_E2setupFailure_tags_1)
/sizeof(asn_DEF_E2setupFailure_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_E2setupFailure_1,
1, /* Elements count */
&asn_SPC_E2setupFailure_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _E2setupFailure_H_
#define _E2setupFailure_H_
#include "asn_application.h"
/* Including external dependencies */
#include "ProtocolIE-Container.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* E2setupFailure */
typedef struct E2setupFailure {
ProtocolIE_Container_1544P13_t protocolIEs;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} E2setupFailure_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_E2setupFailure;
extern asn_SEQUENCE_specifics_t asn_SPC_E2setupFailure_specs_1;
extern asn_TYPE_member_t asn_MBR_E2setupFailure_1[1];
#ifdef __cplusplus
}
#endif
#endif /* _E2setupFailure_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "E2setupRequest.h"
asn_TYPE_member_t asn_MBR_E2setupRequest_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct E2setupRequest, protocolIEs),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolIE_Container_1544P11,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"protocolIEs"
},
};
static const ber_tlv_tag_t asn_DEF_E2setupRequest_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_E2setupRequest_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_E2setupRequest_specs_1 = {
sizeof(struct E2setupRequest),
offsetof(struct E2setupRequest, _asn_ctx),
asn_MAP_E2setupRequest_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_E2setupRequest = {
"E2setupRequest",
"E2setupRequest",
&asn_OP_SEQUENCE,
asn_DEF_E2setupRequest_tags_1,
sizeof(asn_DEF_E2setupRequest_tags_1)
/sizeof(asn_DEF_E2setupRequest_tags_1[0]), /* 1 */
asn_DEF_E2setupRequest_tags_1, /* Same as above */
sizeof(asn_DEF_E2setupRequest_tags_1)
/sizeof(asn_DEF_E2setupRequest_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_E2setupRequest_1,
1, /* Elements count */
&asn_SPC_E2setupRequest_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _E2setupRequest_H_
#define _E2setupRequest_H_
#include "asn_application.h"
/* Including external dependencies */
#include "ProtocolIE-Container.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* E2setupRequest */
typedef struct E2setupRequest {
ProtocolIE_Container_1544P11_t protocolIEs;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} E2setupRequest_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_E2setupRequest;
extern asn_SEQUENCE_specifics_t asn_SPC_E2setupRequest_specs_1;
extern asn_TYPE_member_t asn_MBR_E2setupRequest_1[1];
#ifdef __cplusplus
}
#endif
#endif /* _E2setupRequest_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "E2setupResponse.h"
asn_TYPE_member_t asn_MBR_E2setupResponse_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct E2setupResponse, protocolIEs),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolIE_Container_1544P12,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"protocolIEs"
},
};
static const ber_tlv_tag_t asn_DEF_E2setupResponse_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_E2setupResponse_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_E2setupResponse_specs_1 = {
sizeof(struct E2setupResponse),
offsetof(struct E2setupResponse, _asn_ctx),
asn_MAP_E2setupResponse_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_E2setupResponse = {
"E2setupResponse",
"E2setupResponse",
&asn_OP_SEQUENCE,
asn_DEF_E2setupResponse_tags_1,
sizeof(asn_DEF_E2setupResponse_tags_1)
/sizeof(asn_DEF_E2setupResponse_tags_1[0]), /* 1 */
asn_DEF_E2setupResponse_tags_1, /* Same as above */
sizeof(asn_DEF_E2setupResponse_tags_1)
/sizeof(asn_DEF_E2setupResponse_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_E2setupResponse_1,
1, /* Elements count */
&asn_SPC_E2setupResponse_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _E2setupResponse_H_
#define _E2setupResponse_H_
#include "asn_application.h"
/* Including external dependencies */
#include "ProtocolIE-Container.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* E2setupResponse */
typedef struct E2setupResponse {
ProtocolIE_Container_1544P12_t protocolIEs;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} E2setupResponse_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_E2setupResponse;
extern asn_SEQUENCE_specifics_t asn_SPC_E2setupResponse_specs_1;
extern asn_TYPE_member_t asn_MBR_E2setupResponse_1[1];
#ifdef __cplusplus
}
#endif
#endif /* _E2setupResponse_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,198 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ENB-ID-Choice.h"
static int
memb_enb_ID_macro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 20)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_enb_ID_shortmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 18)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_enb_ID_longmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 21)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_memb_enb_ID_macro_constr_2 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */,
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */,
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_macro),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_enb_ID_macro_constr_2, memb_enb_ID_macro_constraint_1 },
0, 0, /* No default value */
"enb-ID-macro"
},
{ ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_shortmacro),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_enb_ID_shortmacro_constr_3, memb_enb_ID_shortmacro_constraint_1 },
0, 0, /* No default value */
"enb-ID-shortmacro"
},
{ ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_longmacro),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_enb_ID_longmacro_constr_4, memb_enb_ID_longmacro_constraint_1 },
0, 0, /* No default value */
"enb-ID-longmacro"
},
};
static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_Choice_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enb-ID-macro */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enb-ID-shortmacro */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* enb-ID-longmacro */
};
asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1 = {
sizeof(struct ENB_ID_Choice),
offsetof(struct ENB_ID_Choice, _asn_ctx),
offsetof(struct ENB_ID_Choice, present),
sizeof(((struct ENB_ID_Choice *)0)->present),
asn_MAP_ENB_ID_Choice_tag2el_1,
3, /* Count of tags in the map */
0, 0,
3 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice = {
"ENB-ID-Choice",
"ENB-ID-Choice",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_ENB_ID_Choice_constr_1, CHOICE_constraint },
asn_MBR_ENB_ID_Choice_1,
3, /* Elements count */
&asn_SPC_ENB_ID_Choice_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,78 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ENB_ID_Choice_H_
#define _ENB_ID_Choice_H_
#include "asn_application.h"
/* Including external dependencies */
#include "BIT_STRING.h"
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum ENB_ID_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 "asn_internal.h"

View File

@@ -0,0 +1,244 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ENB-ID.h"
static int
memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 20)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 28)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 18)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 21)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */,
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_home_eNB_ID_constr_3 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */,
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */,
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ENB_ID_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_ENB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.macro_eNB_ID),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_macro_eNB_ID_constr_2, memb_macro_eNB_ID_constraint_1 },
0, 0, /* No default value */
"macro-eNB-ID"
},
{ ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.home_eNB_ID),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_home_eNB_ID_constr_3, memb_home_eNB_ID_constraint_1 },
0, 0, /* No default value */
"home-eNB-ID"
},
{ ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.short_Macro_eNB_ID),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_short_Macro_eNB_ID_constr_5, memb_short_Macro_eNB_ID_constraint_1 },
0, 0, /* No default value */
"short-Macro-eNB-ID"
},
{ ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.long_Macro_eNB_ID),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_long_Macro_eNB_ID_constr_6, memb_long_Macro_eNB_ID_constraint_1 },
0, 0, /* No default value */
"long-Macro-eNB-ID"
},
};
static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macro-eNB-ID */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* home-eNB-ID */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-Macro-eNB-ID */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-Macro-eNB-ID */
};
asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1 = {
sizeof(struct ENB_ID),
offsetof(struct ENB_ID, _asn_ctx),
offsetof(struct ENB_ID, present),
sizeof(((struct ENB_ID *)0)->present),
asn_MAP_ENB_ID_tag2el_1,
4, /* Count of tags in the map */
0, 0,
2 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_ENB_ID = {
"ENB-ID",
"ENB-ID",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_ENB_ID_constr_1, CHOICE_constraint },
asn_MBR_ENB_ID_1,
4, /* Elements count */
&asn_SPC_ENB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,79 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ENB_ID_H_
#define _ENB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "BIT_STRING.h"
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum ENB_ID_PR {
ENB_ID_PR_NOTHING, /* No components present */
ENB_ID_PR_macro_eNB_ID,
ENB_ID_PR_home_eNB_ID,
/* Extensions may appear below */
ENB_ID_PR_short_Macro_eNB_ID,
ENB_ID_PR_long_Macro_eNB_ID
} ENB_ID_PR;
/* ENB-ID */
typedef struct ENB_ID {
ENB_ID_PR present;
union ENB_ID_u {
BIT_STRING_t macro_eNB_ID;
BIT_STRING_t home_eNB_ID;
/*
* This type is extensible,
* possible extensions are below.
*/
BIT_STRING_t short_Macro_eNB_ID;
BIT_STRING_t long_Macro_eNB_ID;
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ENB_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ENB_ID;
extern asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1;
extern asn_TYPE_member_t asn_MBR_ENB_ID_1[4];
extern asn_per_constraints_t asn_PER_type_ENB_ID_constr_1;
#ifdef __cplusplus
}
#endif
#endif /* _ENB_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,106 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ENGNB-ID.h"
static int
memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size >= 22 && size <= 32)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_memb_gNB_ID_constr_2 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ENGNB_ID_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_ENGNB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ENGNB_ID, choice.gNB_ID),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_gNB_ID_constr_2, memb_gNB_ID_constraint_1 },
0, 0, /* No default value */
"gNB-ID"
},
};
static const asn_TYPE_tag2member_t asn_MAP_ENGNB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-ID */
};
asn_CHOICE_specifics_t asn_SPC_ENGNB_ID_specs_1 = {
sizeof(struct ENGNB_ID),
offsetof(struct ENGNB_ID, _asn_ctx),
offsetof(struct ENGNB_ID, present),
sizeof(((struct ENGNB_ID *)0)->present),
asn_MAP_ENGNB_ID_tag2el_1,
1, /* Count of tags in the map */
0, 0,
1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_ENGNB_ID = {
"ENGNB-ID",
"ENGNB-ID",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_ENGNB_ID_constr_1, CHOICE_constraint },
asn_MBR_ENGNB_ID_1,
1, /* Elements count */
&asn_SPC_ENGNB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,74 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ENGNB_ID_H_
#define _ENGNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "BIT_STRING.h"
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum 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 "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ErrorIndication.h"
asn_TYPE_member_t asn_MBR_ErrorIndication_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ErrorIndication, protocolIEs),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolIE_Container_1544P10,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"protocolIEs"
},
};
static const ber_tlv_tag_t asn_DEF_ErrorIndication_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_specs_1 = {
sizeof(struct ErrorIndication),
offsetof(struct ErrorIndication, _asn_ctx),
asn_MAP_ErrorIndication_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ErrorIndication = {
"ErrorIndication",
"ErrorIndication",
&asn_OP_SEQUENCE,
asn_DEF_ErrorIndication_tags_1,
sizeof(asn_DEF_ErrorIndication_tags_1)
/sizeof(asn_DEF_ErrorIndication_tags_1[0]), /* 1 */
asn_DEF_ErrorIndication_tags_1, /* Same as above */
sizeof(asn_DEF_ErrorIndication_tags_1)
/sizeof(asn_DEF_ErrorIndication_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_ErrorIndication_1,
1, /* Elements count */
&asn_SPC_ErrorIndication_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Contents"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ErrorIndication_H_
#define _ErrorIndication_H_
#include "asn_application.h"
/* Including external dependencies */
#include "ProtocolIE-Container.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ErrorIndication */
typedef struct ErrorIndication {
ProtocolIE_Container_1544P10_t protocolIEs;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ErrorIndication_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ErrorIndication;
extern asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_specs_1;
extern asn_TYPE_member_t asn_MBR_ErrorIndication_1[1];
#ifdef __cplusplus
}
#endif
#endif /* _ErrorIndication_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,85 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GNB-CU-UP-ID.h"
int
GNB_CU_UP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const INTEGER_t *st = (const INTEGER_t *)sptr;
long value;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(asn_INTEGER2long(st, &value)) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value too large (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if((value >= 0 && value <= 68719476735)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
/*
* This type is implemented using INTEGER,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const ber_tlv_tag_t asn_DEF_GNB_CU_UP_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID = {
"GNB-CU-UP-ID",
"GNB-CU-UP-ID",
&asn_OP_INTEGER,
asn_DEF_GNB_CU_UP_ID_tags_1,
sizeof(asn_DEF_GNB_CU_UP_ID_tags_1)
/sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */
asn_DEF_GNB_CU_UP_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GNB_CU_UP_ID_tags_1)
/sizeof(asn_DEF_GNB_CU_UP_ID_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_GNB_CU_UP_ID_constr_1, GNB_CU_UP_ID_constraint },
0, 0, /* No members */
0 /* No specifics */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GNB_CU_UP_ID_H_
#define _GNB_CU_UP_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "INTEGER.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GNB-CU-UP-ID */
typedef INTEGER_t GNB_CU_UP_ID_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_GNB_CU_UP_ID_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_GNB_CU_UP_ID;
asn_struct_free_f GNB_CU_UP_ID_free;
asn_struct_print_f GNB_CU_UP_ID_print;
asn_constr_check_f GNB_CU_UP_ID_constraint;
ber_type_decoder_f GNB_CU_UP_ID_decode_ber;
der_type_encoder_f GNB_CU_UP_ID_encode_der;
xer_type_decoder_f GNB_CU_UP_ID_decode_xer;
xer_type_encoder_f GNB_CU_UP_ID_encode_xer;
per_type_decoder_f GNB_CU_UP_ID_decode_uper;
per_type_encoder_f GNB_CU_UP_ID_encode_uper;
per_type_decoder_f GNB_CU_UP_ID_decode_aper;
per_type_encoder_f GNB_CU_UP_ID_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _GNB_CU_UP_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,85 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GNB-DU-ID.h"
int
GNB_DU_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const INTEGER_t *st = (const INTEGER_t *)sptr;
long value;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(asn_INTEGER2long(st, &value)) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value too large (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if((value >= 0 && value <= 68719476735)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
/*
* This type is implemented using INTEGER,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED, 36, -1, 0, 68719476735 } /* (0..68719476735) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const ber_tlv_tag_t asn_DEF_GNB_DU_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID = {
"GNB-DU-ID",
"GNB-DU-ID",
&asn_OP_INTEGER,
asn_DEF_GNB_DU_ID_tags_1,
sizeof(asn_DEF_GNB_DU_ID_tags_1)
/sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */
asn_DEF_GNB_DU_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GNB_DU_ID_tags_1)
/sizeof(asn_DEF_GNB_DU_ID_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_GNB_DU_ID_constr_1, GNB_DU_ID_constraint },
0, 0, /* No members */
0 /* No specifics */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GNB_DU_ID_H_
#define _GNB_DU_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "INTEGER.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GNB-DU-ID */
typedef INTEGER_t GNB_DU_ID_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_GNB_DU_ID_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_GNB_DU_ID;
asn_struct_free_f GNB_DU_ID_free;
asn_struct_print_f GNB_DU_ID_print;
asn_constr_check_f GNB_DU_ID_constraint;
ber_type_decoder_f GNB_DU_ID_decode_ber;
der_type_encoder_f GNB_DU_ID_encode_der;
xer_type_decoder_f GNB_DU_ID_decode_xer;
xer_type_encoder_f GNB_DU_ID_encode_xer;
per_type_decoder_f GNB_DU_ID_decode_uper;
per_type_encoder_f GNB_DU_ID_encode_uper;
per_type_decoder_f GNB_DU_ID_decode_aper;
per_type_encoder_f GNB_DU_ID_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _GNB_DU_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,106 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GNB-ID-Choice.h"
static int
memb_gnb_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size >= 22 && size <= 32)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_memb_gnb_ID_constr_2 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_GNB_ID_Choice_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_GNB_ID_Choice_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GNB_ID_Choice, choice.gnb_ID),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_gnb_ID_constr_2, memb_gnb_ID_constraint_1 },
0, 0, /* No default value */
"gnb-ID"
},
};
static const asn_TYPE_tag2member_t asn_MAP_GNB_ID_Choice_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gnb-ID */
};
asn_CHOICE_specifics_t asn_SPC_GNB_ID_Choice_specs_1 = {
sizeof(struct GNB_ID_Choice),
offsetof(struct GNB_ID_Choice, _asn_ctx),
offsetof(struct GNB_ID_Choice, present),
sizeof(((struct GNB_ID_Choice *)0)->present),
asn_MAP_GNB_ID_Choice_tag2el_1,
1, /* Count of tags in the map */
0, 0,
1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_GNB_ID_Choice = {
"GNB-ID-Choice",
"GNB-ID-Choice",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_GNB_ID_Choice_constr_1, CHOICE_constraint },
asn_MBR_GNB_ID_Choice_1,
1, /* Elements count */
&asn_SPC_GNB_ID_Choice_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,74 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GNB_ID_Choice_H_
#define _GNB_ID_Choice_H_
#include "asn_application.h"
/* Including external dependencies */
#include "BIT_STRING.h"
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum GNB_ID_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 "asn_internal.h"

View File

@@ -0,0 +1,104 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalE2node-ID.h"
#include "GlobalE2node-gNB-ID.h"
#include "GlobalE2node-en-gNB-ID.h"
#include "GlobalE2node-ng-eNB-ID.h"
#include "GlobalE2node-eNB-ID.h"
static asn_per_constraints_t asn_PER_type_GlobalE2node_ID_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_TYPE_member_t asn_MBR_GlobalE2node_ID_1[] = {
{ ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.gNB),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalE2node_gNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"gNB"
},
{ ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.en_gNB),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalE2node_en_gNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"en-gNB"
},
{ ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.ng_eNB),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalE2node_ng_eNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ng-eNB"
},
{ ATF_POINTER, 0, offsetof(struct GlobalE2node_ID, choice.eNB),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalE2node_eNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"eNB"
},
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* en-gNB */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ng-eNB */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eNB */
};
static asn_CHOICE_specifics_t asn_SPC_GlobalE2node_ID_specs_1 = {
sizeof(struct GlobalE2node_ID),
offsetof(struct GlobalE2node_ID, _asn_ctx),
offsetof(struct GlobalE2node_ID, present),
sizeof(((struct GlobalE2node_ID *)0)->present),
asn_MAP_GlobalE2node_ID_tag2el_1,
4, /* Count of tags in the map */
0, 0,
4 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ID = {
"GlobalE2node-ID",
"GlobalE2node-ID",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_GlobalE2node_ID_constr_1, CHOICE_constraint },
asn_MBR_GlobalE2node_ID_1,
4, /* Elements count */
&asn_SPC_GlobalE2node_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,82 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalE2node_ID_H_
#define _GlobalE2node_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum GlobalE2node_ID_PR {
GlobalE2node_ID_PR_NOTHING, /* No components present */
GlobalE2node_ID_PR_gNB,
GlobalE2node_ID_PR_en_gNB,
GlobalE2node_ID_PR_ng_eNB,
GlobalE2node_ID_PR_eNB
/* Extensions may appear below */
} GlobalE2node_ID_PR;
/* Forward declarations */
struct GlobalE2node_gNB_ID;
struct GlobalE2node_en_gNB_ID;
struct GlobalE2node_ng_eNB_ID;
struct GlobalE2node_eNB_ID;
/* GlobalE2node-ID */
typedef struct GlobalE2node_ID {
GlobalE2node_ID_PR present;
union GlobalE2node_ID_u {
struct GlobalE2node_gNB_ID *gNB;
struct GlobalE2node_en_gNB_ID *en_gNB;
struct GlobalE2node_ng_eNB_ID *ng_eNB;
struct GlobalE2node_eNB_ID *eNB;
/*
* This type is extensible,
* possible extensions are below.
*/
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalE2node_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ID;
#ifdef __cplusplus
}
#endif
#endif /* _GlobalE2node_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalE2node-eNB-ID.h"
asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_eNB_ID, global_eNB_ID),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalENB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"global-eNB-ID"
},
};
static const ber_tlv_tag_t asn_DEF_GlobalE2node_eNB_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_eNB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-eNB-ID */
};
asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_eNB_ID_specs_1 = {
sizeof(struct GlobalE2node_eNB_ID),
offsetof(struct GlobalE2node_eNB_ID, _asn_ctx),
asn_MAP_GlobalE2node_eNB_ID_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GlobalE2node_eNB_ID = {
"GlobalE2node-eNB-ID",
"GlobalE2node-eNB-ID",
&asn_OP_SEQUENCE,
asn_DEF_GlobalE2node_eNB_ID_tags_1,
sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1[0]), /* 1 */
asn_DEF_GlobalE2node_eNB_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_eNB_ID_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GlobalE2node_eNB_ID_1,
1, /* Elements count */
&asn_SPC_GlobalE2node_eNB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalE2node_eNB_ID_H_
#define _GlobalE2node_eNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "GlobalENB-ID.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GlobalE2node-eNB-ID */
typedef struct GlobalE2node_eNB_ID {
GlobalENB_ID_t global_eNB_ID;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalE2node_eNB_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_eNB_ID;
extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_eNB_ID_specs_1;
extern asn_TYPE_member_t asn_MBR_GlobalE2node_eNB_ID_1[1];
#ifdef __cplusplus
}
#endif
#endif /* _GlobalE2node_eNB_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalE2node-en-gNB-ID.h"
asn_TYPE_member_t asn_MBR_GlobalE2node_en_gNB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_en_gNB_ID, global_gNB_ID),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalenGNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"global-gNB-ID"
},
};
static const ber_tlv_tag_t asn_DEF_GlobalE2node_en_gNB_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_en_gNB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-gNB-ID */
};
asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_en_gNB_ID_specs_1 = {
sizeof(struct GlobalE2node_en_gNB_ID),
offsetof(struct GlobalE2node_en_gNB_ID, _asn_ctx),
asn_MAP_GlobalE2node_en_gNB_ID_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID = {
"GlobalE2node-en-gNB-ID",
"GlobalE2node-en-gNB-ID",
&asn_OP_SEQUENCE,
asn_DEF_GlobalE2node_en_gNB_ID_tags_1,
sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1[0]), /* 1 */
asn_DEF_GlobalE2node_en_gNB_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_en_gNB_ID_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GlobalE2node_en_gNB_ID_1,
1, /* Elements count */
&asn_SPC_GlobalE2node_en_gNB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalE2node_en_gNB_ID_H_
#define _GlobalE2node_en_gNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "GlobalenGNB-ID.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GlobalE2node-en-gNB-ID */
typedef struct GlobalE2node_en_gNB_ID {
GlobalenGNB_ID_t global_gNB_ID;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalE2node_en_gNB_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_en_gNB_ID;
extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_en_gNB_ID_specs_1;
extern asn_TYPE_member_t asn_MBR_GlobalE2node_en_gNB_ID_1[1];
#ifdef __cplusplus
}
#endif
#endif /* _GlobalE2node_en_gNB_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,90 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalE2node-gNB-ID.h"
asn_TYPE_member_t asn_MBR_GlobalE2node_gNB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_gNB_ID, global_gNB_ID),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalgNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"global-gNB-ID"
},
{ ATF_POINTER, 2, offsetof(struct GlobalE2node_gNB_ID, gNB_CU_UP_ID),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GNB_CU_UP_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"gNB-CU-UP-ID"
},
{ ATF_POINTER, 1, offsetof(struct GlobalE2node_gNB_ID, gNB_DU_ID),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GNB_DU_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"gNB-DU-ID"
},
};
static const int asn_MAP_GlobalE2node_gNB_ID_oms_1[] = { 1, 2 };
static const ber_tlv_tag_t asn_DEF_GlobalE2node_gNB_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_gNB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-gNB-ID */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gNB-CU-UP-ID */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gNB-DU-ID */
};
asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_gNB_ID_specs_1 = {
sizeof(struct GlobalE2node_gNB_ID),
offsetof(struct GlobalE2node_gNB_ID, _asn_ctx),
asn_MAP_GlobalE2node_gNB_ID_tag2el_1,
3, /* Count of tags in the map */
asn_MAP_GlobalE2node_gNB_ID_oms_1, /* Optional members */
2, 0, /* Root/Additions */
3, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID = {
"GlobalE2node-gNB-ID",
"GlobalE2node-gNB-ID",
&asn_OP_SEQUENCE,
asn_DEF_GlobalE2node_gNB_ID_tags_1,
sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1[0]), /* 1 */
asn_DEF_GlobalE2node_gNB_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_gNB_ID_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GlobalE2node_gNB_ID_1,
3, /* Elements count */
&asn_SPC_GlobalE2node_gNB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,66 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalE2node_gNB_ID_H_
#define _GlobalE2node_gNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "GlobalgNB-ID.h"
#include "GNB-CU-UP-ID.h"
#include "GNB-DU-ID.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GlobalE2node-gNB-ID */
typedef struct GlobalE2node_gNB_ID {
GlobalgNB_ID_t global_gNB_ID;
GNB_CU_UP_ID_t *gNB_CU_UP_ID; /* OPTIONAL */
GNB_DU_ID_t *gNB_DU_ID; /* OPTIONAL */
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalE2node_gNB_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_gNB_ID;
extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_gNB_ID_specs_1;
extern asn_TYPE_member_t asn_MBR_GlobalE2node_gNB_ID_1[3];
#ifdef __cplusplus
}
#endif
#endif /* _GlobalE2node_gNB_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,68 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalE2node-ng-eNB-ID.h"
asn_TYPE_member_t asn_MBR_GlobalE2node_ng_eNB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GlobalE2node_ng_eNB_ID, global_ng_eNB_ID),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_GlobalngeNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"global-ng-eNB-ID"
},
};
static const ber_tlv_tag_t asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalE2node_ng_eNB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-ng-eNB-ID */
};
asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_ng_eNB_ID_specs_1 = {
sizeof(struct GlobalE2node_ng_eNB_ID),
offsetof(struct GlobalE2node_ng_eNB_ID, _asn_ctx),
asn_MAP_GlobalE2node_ng_eNB_ID_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID = {
"GlobalE2node-ng-eNB-ID",
"GlobalE2node-ng-eNB-ID",
&asn_OP_SEQUENCE,
asn_DEF_GlobalE2node_ng_eNB_ID_tags_1,
sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[0]), /* 1 */
asn_DEF_GlobalE2node_ng_eNB_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1)
/sizeof(asn_DEF_GlobalE2node_ng_eNB_ID_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GlobalE2node_ng_eNB_ID_1,
1, /* Elements count */
&asn_SPC_GlobalE2node_ng_eNB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalE2node_ng_eNB_ID_H_
#define _GlobalE2node_ng_eNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "GlobalngeNB-ID.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GlobalE2node-ng-eNB-ID */
typedef struct GlobalE2node_ng_eNB_ID {
GlobalngeNB_ID_t global_ng_eNB_ID;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalE2node_ng_eNB_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalE2node_ng_eNB_ID;
extern asn_SEQUENCE_specifics_t asn_SPC_GlobalE2node_ng_eNB_ID_specs_1;
extern asn_TYPE_member_t asn_MBR_GlobalE2node_ng_eNB_ID_1[1];
#ifdef __cplusplus
}
#endif
#endif /* _GlobalE2node_ng_eNB_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,78 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalENB-ID.h"
asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, pLMN_Identity),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_PLMN_Identity,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"pLMN-Identity"
},
{ ATF_NOFLAGS, 0, offsetof(struct GlobalENB_ID, eNB_ID),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_ENB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"eNB-ID"
},
};
static const ber_tlv_tag_t asn_DEF_GlobalENB_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalENB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* eNB-ID */
};
asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1 = {
sizeof(struct GlobalENB_ID),
offsetof(struct GlobalENB_ID, _asn_ctx),
asn_MAP_GlobalENB_ID_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID = {
"GlobalENB-ID",
"GlobalENB-ID",
&asn_OP_SEQUENCE,
asn_DEF_GlobalENB_ID_tags_1,
sizeof(asn_DEF_GlobalENB_ID_tags_1)
/sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */
asn_DEF_GlobalENB_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GlobalENB_ID_tags_1)
/sizeof(asn_DEF_GlobalENB_ID_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GlobalENB_ID_1,
2, /* Elements count */
&asn_SPC_GlobalENB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,64 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalENB_ID_H_
#define _GlobalENB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "PLMN-Identity.h"
#include "ENB-ID.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GlobalENB-ID */
typedef struct GlobalENB_ID {
PLMN_Identity_t pLMN_Identity;
ENB_ID_t eNB_ID;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalENB_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalENB_ID;
extern asn_SEQUENCE_specifics_t asn_SPC_GlobalENB_ID_specs_1;
extern asn_TYPE_member_t asn_MBR_GlobalENB_ID_1[2];
#ifdef __cplusplus
}
#endif
#endif /* _GlobalENB_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,114 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalRIC-ID.h"
static int
memb_ric_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 20)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_memb_ric_ID_constr_3 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */,
0, 0 /* No PER value map */
};
static asn_TYPE_member_t asn_MBR_GlobalRIC_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GlobalRIC_ID, pLMN_Identity),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_PLMN_Identity,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"pLMN-Identity"
},
{ ATF_NOFLAGS, 0, offsetof(struct GlobalRIC_ID, ric_ID),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_ric_ID_constr_3, memb_ric_ID_constraint_1 },
0, 0, /* No default value */
"ric-ID"
},
};
static const ber_tlv_tag_t asn_DEF_GlobalRIC_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalRIC_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ric-ID */
};
static asn_SEQUENCE_specifics_t asn_SPC_GlobalRIC_ID_specs_1 = {
sizeof(struct GlobalRIC_ID),
offsetof(struct GlobalRIC_ID, _asn_ctx),
asn_MAP_GlobalRIC_ID_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GlobalRIC_ID = {
"GlobalRIC-ID",
"GlobalRIC-ID",
&asn_OP_SEQUENCE,
asn_DEF_GlobalRIC_ID_tags_1,
sizeof(asn_DEF_GlobalRIC_ID_tags_1)
/sizeof(asn_DEF_GlobalRIC_ID_tags_1[0]), /* 1 */
asn_DEF_GlobalRIC_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GlobalRIC_ID_tags_1)
/sizeof(asn_DEF_GlobalRIC_ID_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GlobalRIC_ID_1,
2, /* Elements count */
&asn_SPC_GlobalRIC_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalRIC_ID_H_
#define _GlobalRIC_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "PLMN-Identity.h"
#include "BIT_STRING.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GlobalRIC-ID */
typedef struct GlobalRIC_ID {
PLMN_Identity_t pLMN_Identity;
BIT_STRING_t ric_ID;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalRIC_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalRIC_ID;
#ifdef __cplusplus
}
#endif
#endif /* _GlobalRIC_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,78 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "GlobalenGNB-ID.h"
asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, pLMN_Identity),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_PLMN_Identity,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"pLMN-Identity"
},
{ ATF_NOFLAGS, 0, offsetof(struct GlobalenGNB_ID, gNB_ID),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_ENGNB_ID,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"gNB-ID"
},
};
static const ber_tlv_tag_t asn_DEF_GlobalenGNB_ID_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalenGNB_ID_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gNB-ID */
};
asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1 = {
sizeof(struct GlobalenGNB_ID),
offsetof(struct GlobalenGNB_ID, _asn_ctx),
asn_MAP_GlobalenGNB_ID_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID = {
"GlobalenGNB-ID",
"GlobalenGNB-ID",
&asn_OP_SEQUENCE,
asn_DEF_GlobalenGNB_ID_tags_1,
sizeof(asn_DEF_GlobalenGNB_ID_tags_1)
/sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */
asn_DEF_GlobalenGNB_ID_tags_1, /* Same as above */
sizeof(asn_DEF_GlobalenGNB_ID_tags_1)
/sizeof(asn_DEF_GlobalenGNB_ID_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GlobalenGNB_ID_1,
2, /* Elements count */
&asn_SPC_GlobalenGNB_ID_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,64 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalenGNB_ID_H_
#define _GlobalenGNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "PLMN-Identity.h"
#include "ENGNB-ID.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* GlobalenGNB-ID */
typedef struct GlobalenGNB_ID {
PLMN_Identity_t pLMN_Identity;
ENGNB_ID_t gNB_ID;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} GlobalenGNB_ID_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GlobalenGNB_ID;
extern asn_SEQUENCE_specifics_t asn_SPC_GlobalenGNB_ID_specs_1;
extern asn_TYPE_member_t asn_MBR_GlobalenGNB_ID_1[2];
#ifdef __cplusplus
}
#endif
#endif /* _GlobalenGNB_ID_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,78 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#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 */
};

View File

@@ -0,0 +1,64 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalgNB_ID_H_
#define _GlobalgNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "PLMN-Identity.h"
#include "GNB-ID-Choice.h"
#include "constr_SEQUENCE.h"
#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 "asn_internal.h"

View File

@@ -0,0 +1,78 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#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 */
};

View File

@@ -0,0 +1,64 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _GlobalngeNB_ID_H_
#define _GlobalngeNB_ID_H_
#include "asn_application.h"
/* Including external dependencies */
#include "PLMN-Identity.h"
#include "ENB-ID-Choice.h"
#include "constr_SEQUENCE.h"
#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 "asn_internal.h"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,108 @@
/*-
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _INTEGER_H_
#define _INTEGER_H_
#include <asn_application.h>
#include <asn_codecs_prim.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef ASN__PRIMITIVE_TYPE_t INTEGER_t;
extern asn_TYPE_descriptor_t asn_DEF_INTEGER;
extern asn_TYPE_operation_t asn_OP_INTEGER;
/* Map with <tag> to integer value association */
typedef struct asn_INTEGER_enum_map_s {
long nat_value; /* associated native integer value */
size_t enum_len; /* strlen("tag") */
const char *enum_name; /* "tag" */
} asn_INTEGER_enum_map_t;
/* This type describes an enumeration for INTEGER and ENUMERATED types */
typedef struct asn_INTEGER_specifics_s {
const asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */
const unsigned int *enum2value; /* "tag" => N; sorted by tag */
int map_count; /* Elements in either map */
int extension; /* This map is extensible */
int strict_enumeration; /* Enumeration set is fixed */
int field_width; /* Size of native integer */
int field_unsigned; /* Signed=0, unsigned=1 */
} asn_INTEGER_specifics_t;
#define INTEGER_free ASN__PRIMITIVE_TYPE_free
#define INTEGER_decode_ber ber_decode_primitive
#define INTEGER_constraint asn_generic_no_constraint
asn_struct_print_f INTEGER_print;
asn_struct_compare_f INTEGER_compare;
der_type_encoder_f INTEGER_encode_der;
xer_type_decoder_f INTEGER_decode_xer;
xer_type_encoder_f INTEGER_encode_xer;
oer_type_decoder_f INTEGER_decode_oer;
oer_type_encoder_f INTEGER_encode_oer;
per_type_decoder_f INTEGER_decode_uper;
per_type_encoder_f INTEGER_encode_uper;
per_type_decoder_f INTEGER_decode_aper;
per_type_encoder_f INTEGER_encode_aper;
asn_random_fill_f INTEGER_random_fill;
/***********************************
* Some handy conversion routines. *
***********************************/
/*
* Natiwe size-independent conversion of native integers to/from INTEGER.
* (l_size) is in bytes.
* Returns 0 if it was possible to convert, -1 otherwise.
* -1/EINVAL: Mandatory argument missing
* -1/ERANGE: Value encoded is out of range for long representation
* -1/ENOMEM: Memory allocation failed (in asn_*2INTEGER()).
*/
int asn_INTEGER2imax(const INTEGER_t *i, intmax_t *l);
int asn_INTEGER2umax(const INTEGER_t *i, uintmax_t *l);
int asn_imax2INTEGER(INTEGER_t *i, intmax_t l);
int asn_umax2INTEGER(INTEGER_t *i, uintmax_t l);
/*
* Size-specific conversion helpers.
*/
int asn_INTEGER2long(const INTEGER_t *i, long *l);
int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l);
int asn_long2INTEGER(INTEGER_t *i, long l);
int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l);
int asn_int642INTEGER(INTEGER_t *i, int64_t l);
int asn_uint642INTEGER(INTEGER_t *i, uint64_t l);
/* A version of strtol/strtoimax(3) with nicer error reporting. */
enum asn_strtox_result_e {
ASN_STRTOX_ERROR_RANGE = -3, /* Input outside of supported numeric range */
ASN_STRTOX_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */
ASN_STRTOX_EXPECT_MORE = -1, /* More data expected (e.g. "+") */
ASN_STRTOX_OK = 0, /* Conversion succeded, number ends at (*end) */
ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeded, but the string has extra stuff */
};
enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end,
long *l);
enum asn_strtox_result_e asn_strtoul_lim(const char *str, const char **end,
unsigned long *l);
enum asn_strtox_result_e asn_strtoimax_lim(const char *str, const char **end,
intmax_t *l);
enum asn_strtox_result_e asn_strtoumax_lim(const char *str, const char **end,
uintmax_t *l);
/*
* Convert the integer value into the corresponding enumeration map entry.
*/
const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(
const asn_INTEGER_specifics_t *specs, long value);
#ifdef __cplusplus
}
#endif
#endif /* _INTEGER_H_ */

View File

@@ -0,0 +1,407 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Descriptions"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "InitiatingMessage.h"
static const long asn_VAL_1_id_RICsubscription = 8;
static const long asn_VAL_1_reject = 0;
static const long asn_VAL_2_id_RICsubscriptionDelete = 9;
static const long asn_VAL_2_reject = 0;
static const long asn_VAL_3_id_RICserviceUpdate = 7;
static const long asn_VAL_3_reject = 0;
static const long asn_VAL_4_id_RICcontrol = 4;
static const long asn_VAL_4_reject = 0;
static const long asn_VAL_5_id_E2setup = 1;
static const long asn_VAL_5_reject = 0;
static const long asn_VAL_6_id_Reset = 3;
static const long asn_VAL_6_reject = 0;
static const long asn_VAL_7_id_RICindication = 5;
static const long asn_VAL_7_ignore = 1;
static const long asn_VAL_8_id_RICserviceQuery = 6;
static const long asn_VAL_8_ignore = 1;
static const long asn_VAL_9_id_ErrorIndication = 2;
static const long asn_VAL_9_ignore = 1;
static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = {
{ "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest },
{ "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse },
{ "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject },
{ "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest },
{ "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse },
{ "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject },
{ "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate },
{ "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge },
{ "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject },
{ "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest },
{ "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge },
{ "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject },
{ "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest },
{ "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse },
{ "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject },
{ "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest },
{ "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse },
{ "&UnsuccessfulOutcome", },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject },
{ "&InitiatingMessage", aioc__type, &asn_DEF_RICindication },
{ "&SuccessfulOutcome", },
{ "&UnsuccessfulOutcome", },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore },
{ "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery },
{ "&SuccessfulOutcome", },
{ "&UnsuccessfulOutcome", },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore },
{ "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication },
{ "&SuccessfulOutcome", },
{ "&UnsuccessfulOutcome", },
{ "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication },
{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore }
};
static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = {
{ 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows }
};
static int
memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= 0 && value <= 255)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_type_selector_result_t
select_InitiatingMessage_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
asn_type_selector_result_t result = {0, 0};
const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1;
size_t constraining_column = 3; /* &procedureCode */
size_t for_column = 4; /* &criticality */
size_t row, presence_index = 0;
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode));
for(row=0; row < itable->rows_count; row++) {
const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
if(type_cell->cell_kind == aioc__undefined)
continue;
presence_index++;
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
result.type_descriptor = type_cell->type_descriptor;
result.presence_index = presence_index;
break;
}
}
return result;
}
static int
memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(1 /* No applicable constraints whatsoever */) {
/* Nothing is here. See below */
}
return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}
static asn_type_selector_result_t
select_InitiatingMessage_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
asn_type_selector_result_t result = {0, 0};
const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1;
size_t constraining_column = 3; /* &procedureCode */
size_t for_column = 0; /* &InitiatingMessage */
size_t row, presence_index = 0;
const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode));
for(row=0; row < itable->rows_count; row++) {
const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
if(type_cell->cell_kind == aioc__undefined)
continue;
presence_index++;
if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
result.type_descriptor = type_cell->type_descriptor;
result.presence_index = presence_index;
break;
}
}
return result;
}
static int
memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(1 /* No applicable constraints whatsoever */) {
/* Nothing is here. See below */
}
return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}
static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = {
{ APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = {
{ APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_TYPE_member_t asn_MBR_value_4[] = {
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionRequest),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionRequest,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"RICsubscriptionRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionDeleteRequest),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionDeleteRequest,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"RICsubscriptionDeleteRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceUpdate),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICserviceUpdate,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"RICserviceUpdate"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICcontrolRequest),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICcontrolRequest,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"RICcontrolRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2setupRequest),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_E2setupRequest,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"E2setupRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ResetRequest),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ResetRequest,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ResetRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICindication),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICindication,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"RICindication"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceQuery),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICserviceQuery,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"RICserviceQuery"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ErrorIndication),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ErrorIndication,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ErrorIndication"
},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 8 }, /* RICsubscriptionRequest */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 7 }, /* RICsubscriptionDeleteRequest */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 6 }, /* RICserviceUpdate */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 5 }, /* RICcontrolRequest */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 4 }, /* E2setupRequest */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 3 }, /* ResetRequest */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 2 }, /* RICindication */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 1 }, /* RICserviceQuery */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 0 } /* ErrorIndication */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
sizeof(struct InitiatingMessage__value),
offsetof(struct InitiatingMessage__value, _asn_ctx),
offsetof(struct InitiatingMessage__value, present),
sizeof(((struct InitiatingMessage__value *)0)->present),
asn_MAP_value_tag2el_4,
9, /* Count of tags in the map */
0, 0,
-1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_4 = {
"value",
"value",
&asn_OP_OPEN_TYPE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, 0, OPEN_TYPE_constraint },
asn_MBR_value_4,
9, /* Elements count */
&asn_SPC_value_specs_4 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, procedureCode),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProcedureCode,
0,
{ 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 },
0, 0, /* No default value */
"procedureCode"
},
{ ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, criticality),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Criticality,
select_InitiatingMessage_criticality_type,
{ 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 },
0, 0, /* No default value */
"criticality"
},
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, value),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_value_4,
select_InitiatingMessage_value_type,
{ 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 },
0, 0, /* No default value */
"value"
},
};
static const ber_tlv_tag_t asn_DEF_InitiatingMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_InitiatingMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1 = {
sizeof(struct InitiatingMessage),
offsetof(struct InitiatingMessage, _asn_ctx),
asn_MAP_InitiatingMessage_tag2el_1,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_InitiatingMessage = {
"InitiatingMessage",
"InitiatingMessage",
&asn_OP_SEQUENCE,
asn_DEF_InitiatingMessage_tags_1,
sizeof(asn_DEF_InitiatingMessage_tags_1)
/sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */
asn_DEF_InitiatingMessage_tags_1, /* Same as above */
sizeof(asn_DEF_InitiatingMessage_tags_1)
/sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_InitiatingMessage_1,
3, /* Elements count */
&asn_SPC_InitiatingMessage_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,115 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-PDU-Descriptions"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _InitiatingMessage_H_
#define _InitiatingMessage_H_
#include "asn_application.h"
/* Including external dependencies */
#include "ProcedureCode.h"
#include "Criticality.h"
#include "ANY.h"
#include "asn_ioc.h"
#include "RICsubscriptionRequest.h"
#include "RICsubscriptionResponse.h"
#include "RICsubscriptionFailure.h"
#include "RICsubscriptionDeleteRequest.h"
#include "RICsubscriptionDeleteResponse.h"
#include "RICsubscriptionDeleteFailure.h"
#include "RICserviceUpdate.h"
#include "RICserviceUpdateAcknowledge.h"
#include "RICserviceUpdateFailure.h"
#include "RICcontrolRequest.h"
#include "RICcontrolAcknowledge.h"
#include "RICcontrolFailure.h"
#include "E2setupRequest.h"
#include "E2setupResponse.h"
#include "E2setupFailure.h"
#include "ResetRequest.h"
#include "ResetResponse.h"
#include "RICindication.h"
#include "RICserviceQuery.h"
#include "ErrorIndication.h"
#include "OPEN_TYPE.h"
#include "constr_CHOICE.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum InitiatingMessage__value_PR {
InitiatingMessage__value_PR_NOTHING, /* No components present */
InitiatingMessage__value_PR_RICsubscriptionRequest,
InitiatingMessage__value_PR_RICsubscriptionDeleteRequest,
InitiatingMessage__value_PR_RICserviceUpdate,
InitiatingMessage__value_PR_RICcontrolRequest,
InitiatingMessage__value_PR_E2setupRequest,
InitiatingMessage__value_PR_ResetRequest,
InitiatingMessage__value_PR_RICindication,
InitiatingMessage__value_PR_RICserviceQuery,
InitiatingMessage__value_PR_ErrorIndication
} InitiatingMessage__value_PR;
/* InitiatingMessage */
typedef struct InitiatingMessage {
ProcedureCode_t procedureCode;
Criticality_t criticality;
struct InitiatingMessage__value {
InitiatingMessage__value_PR present;
union InitiatingMessage__value_u {
RICsubscriptionRequest_t RICsubscriptionRequest;
RICsubscriptionDeleteRequest_t RICsubscriptionDeleteRequest;
RICserviceUpdate_t RICserviceUpdate;
RICcontrolRequest_t RICcontrolRequest;
E2setupRequest_t E2setupRequest;
ResetRequest_t ResetRequest;
RICindication_t RICindication;
RICserviceQuery_t RICserviceQuery;
ErrorIndication_t ErrorIndication;
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} value;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} InitiatingMessage_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_InitiatingMessage;
extern asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1;
extern asn_TYPE_member_t asn_MBR_InitiatingMessage_1[3];
#ifdef __cplusplus
}
#endif
#endif /* _InitiatingMessage_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,14 @@
include ./Makefile.am.libasncodec
bin_PROGRAMS += asn1convert
asn1convert_CFLAGS = $(ASN_MODULE_CFLAGS) -DASN_PDU_COLLECTION
asn1convert_CPPFLAGS = -I$(top_srcdir)/./
asn1convert_LDADD = libasncodec.la
asn1convert_SOURCES = \
./converter-example.c\
./pdu_collection.c
regen: regenerate-from-asn1-source
regenerate-from-asn1-source:
asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D. ../asnTextFiles/e2ap-v01.00.00.asn

View File

@@ -0,0 +1,273 @@
ASN_MODULE_SRCS= \
./E2AP-PDU.c \
./InitiatingMessage.c \
./SuccessfulOutcome.c \
./UnsuccessfulOutcome.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 \
./RICindication.c \
./RICcontrolRequest.c \
./RICcontrolAcknowledge.c \
./RICcontrolFailure.c \
./ErrorIndication.c \
./E2setupRequest.c \
./E2setupResponse.c \
./E2setupFailure.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 \
./Cause.c \
./CauseMisc.c \
./CauseProtocol.c \
./CauseRIC.c \
./CauseRICservice.c \
./CauseTransport.c \
./CriticalityDiagnostics.c \
./CriticalityDiagnostics-IE-List.c \
./CriticalityDiagnostics-IE-Item.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 \
./GlobalRIC-ID.c \
./GNB-CU-UP-ID.c \
./GNB-DU-ID.c \
./GNB-ID-Choice.c \
./PLMN-Identity.c \
./RANfunctionDefinition.c \
./RANfunctionID.c \
./RANfunctionRevision.c \
./RICactionDefinition.c \
./RICactionID.c \
./RICactionType.c \
./RICcallProcessID.c \
./RICcontrolAckRequest.c \
./RICcontrolHeader.c \
./RICcontrolMessage.c \
./RICcontrolOutcome.c \
./RICcontrolStatus.c \
./RICeventTriggerDefinition.c \
./RICindicationHeader.c \
./RICindicationMessage.c \
./RICindicationSN.c \
./RICindicationType.c \
./RICrequestID.c \
./RICsubsequentAction.c \
./RICsubsequentActionType.c \
./RICtimeToWait.c \
./TimeToWait.c \
./TypeOfError.c \
./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
ASN_MODULE_HDRS= \
./E2AP-PDU.h \
./InitiatingMessage.h \
./SuccessfulOutcome.h \
./UnsuccessfulOutcome.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 \
./RICindication.h \
./RICcontrolRequest.h \
./RICcontrolAcknowledge.h \
./RICcontrolFailure.h \
./ErrorIndication.h \
./E2setupRequest.h \
./E2setupResponse.h \
./E2setupFailure.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 \
./Cause.h \
./CauseMisc.h \
./CauseProtocol.h \
./CauseRIC.h \
./CauseRICservice.h \
./CauseTransport.h \
./CriticalityDiagnostics.h \
./CriticalityDiagnostics-IE-List.h \
./CriticalityDiagnostics-IE-Item.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 \
./GlobalRIC-ID.h \
./GNB-CU-UP-ID.h \
./GNB-DU-ID.h \
./GNB-ID-Choice.h \
./PLMN-Identity.h \
./RANfunctionDefinition.h \
./RANfunctionID.h \
./RANfunctionRevision.h \
./RICactionDefinition.h \
./RICactionID.h \
./RICactionType.h \
./RICcallProcessID.h \
./RICcontrolAckRequest.h \
./RICcontrolHeader.h \
./RICcontrolMessage.h \
./RICcontrolOutcome.h \
./RICcontrolStatus.h \
./RICeventTriggerDefinition.h \
./RICindicationHeader.h \
./RICindicationMessage.h \
./RICindicationSN.h \
./RICindicationType.h \
./RICrequestID.h \
./RICsubsequentAction.h \
./RICsubsequentActionType.h \
./RICtimeToWait.h \
./TimeToWait.h \
./TypeOfError.h \
./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
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+=./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+=./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_random_fill.h
ASN_MODULE_SRCS+=./asn_random_fill.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+=./asn_codecs_prim.h
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+=./ber_decoder.h
ASN_MODULE_SRCS+=./ber_decoder.c
ASN_MODULE_HDRS+=./der_encoder.h
ASN_MODULE_SRCS+=./der_encoder.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+=./xer_support.h
ASN_MODULE_SRCS+=./xer_support.c
ASN_MODULE_HDRS+=./xer_decoder.h
ASN_MODULE_SRCS+=./xer_decoder.c
ASN_MODULE_HDRS+=./xer_encoder.h
ASN_MODULE_SRCS+=./xer_encoder.c
ASN_MODULE_HDRS+=./per_support.h
ASN_MODULE_SRCS+=./per_support.c
ASN_MODULE_HDRS+=./per_decoder.h
ASN_MODULE_SRCS+=./per_decoder.c
ASN_MODULE_HDRS+=./per_encoder.h
ASN_MODULE_SRCS+=./per_encoder.c
ASN_MODULE_HDRS+=./per_opentype.h
ASN_MODULE_SRCS+=./per_opentype.c
ASN_MODULE_CFLAGS=-DASN_DISABLE_OER_SUPPORT
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

View File

@@ -0,0 +1,367 @@
/*-
* Copyright (c) 2004, 2007 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
* Read the NativeInteger.h for the explanation wrt. differences between
* INTEGER and NativeInteger.
* Basically, both are decoders and encoders of ASN.1 INTEGER type, but this
* implementation deals with the standard (machine-specific) representation
* of them instead of using the platform-independent buffer.
*/
#include <asn_internal.h>
#include <NativeEnumerated.h>
/*
* NativeEnumerated basic type description.
*/
static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_operation_t asn_OP_NativeEnumerated = {
NativeInteger_free,
NativeInteger_print,
NativeInteger_compare,
NativeInteger_decode_ber,
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeEnumerated_encode_xer,
#ifdef ASN_DISABLE_OER_SUPPORT
0,
0,
#else
NativeEnumerated_decode_oer,
NativeEnumerated_encode_oer,
#endif /* ASN_DISABLE_OER_SUPPORT */
#ifdef ASN_DISABLE_PER_SUPPORT
0,
0,
0,
0,
#else
NativeEnumerated_decode_uper,
NativeEnumerated_encode_uper,
NativeEnumerated_decode_aper,
NativeEnumerated_encode_aper,
#endif /* ASN_DISABLE_PER_SUPPORT */
NativeEnumerated_random_fill,
0 /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
"ENUMERATED", /* The ASN.1 type is still ENUMERATED */
"ENUMERATED",
&asn_OP_NativeEnumerated,
asn_DEF_NativeEnumerated_tags,
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
asn_DEF_NativeEnumerated_tags, /* Same as above */
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
{ 0, 0, asn_generic_no_constraint },
0, 0, /* No members */
0 /* No specifics */
};
asn_enc_rval_t
NativeEnumerated_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er = {0,0,0};
const long *native = (const long *)sptr;
const asn_INTEGER_enum_map_t *el;
(void)ilevel;
(void)flags;
if(!native) ASN__ENCODE_FAILED;
el = INTEGER_map_value2enum(specs, *native);
if(el) {
er.encoded =
asn__format_to_callback(cb, app_key, "<%s/>", el->enum_name);
if(er.encoded < 0) ASN__ENCODE_FAILED;
ASN__ENCODED_OK(er);
} else {
ASN_DEBUG(
"ASN.1 forbids dealing with "
"unknown value of ENUMERATED type");
ASN__ENCODE_FAILED;
}
}
asn_dec_rval_t
NativeEnumerated_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
void **sptr, asn_per_data_t *pd) {
const asn_INTEGER_specifics_t *specs = td->specifics;
asn_dec_rval_t rval = { RC_OK, 0 };
long *native = (long *)*sptr;
const asn_per_constraint_t *ct;
long value;
(void)opt_codec_ctx;
if(constraints) ct = &constraints->value;
else if(td->encoding_constraints.per_constraints)
ct = &td->encoding_constraints.per_constraints->value;
else ASN__DECODE_FAILED; /* Mandatory! */
if(!specs) ASN__DECODE_FAILED;
if(!native) {
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) ASN__DECODE_FAILED;
}
ASN_DEBUG("Decoding %s as NativeEnumerated", td->name);
if(ct->flags & APC_EXTENSIBLE) {
int inext = per_get_few_bits(pd, 1);
if(inext < 0) ASN__DECODE_STARVED;
if(inext) ct = 0;
}
if(ct && ct->range_bits >= 0) {
value = per_get_few_bits(pd, ct->range_bits);
if(value < 0) ASN__DECODE_STARVED;
if(value >= (specs->extension
? specs->extension - 1 : specs->map_count))
ASN__DECODE_FAILED;
} else {
if(!specs->extension)
ASN__DECODE_FAILED;
/*
* X.691, #10.6: normally small non-negative whole number;
*/
value = uper_get_nsnnwn(pd);
if(value < 0) ASN__DECODE_STARVED;
value += specs->extension - 1;
if(value >= specs->map_count)
ASN__DECODE_FAILED;
}
*native = specs->value2enum[value].nat_value;
ASN_DEBUG("Decoded %s = %ld", td->name, *native);
return rval;
}
static int
NativeEnumerated__compar_value2enum(const void *ap, const void *bp) {
const asn_INTEGER_enum_map_t *a = ap;
const asn_INTEGER_enum_map_t *b = bp;
if(a->nat_value == b->nat_value)
return 0;
if(a->nat_value < b->nat_value)
return -1;
return 1;
}
asn_enc_rval_t
NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er = {0,0,0};
long native, value;
const asn_per_constraint_t *ct;
int inext = 0;
asn_INTEGER_enum_map_t key;
const asn_INTEGER_enum_map_t *kf;
if(!sptr) ASN__ENCODE_FAILED;
if(!specs) ASN__ENCODE_FAILED;
if(constraints) ct = &constraints->value;
else if(td->encoding_constraints.per_constraints)
ct = &td->encoding_constraints.per_constraints->value;
else ASN__ENCODE_FAILED; /* Mandatory! */
ASN_DEBUG("Encoding %s as NativeEnumerated", td->name);
er.encoded = 0;
native = *(const long *)sptr;
key.nat_value = native;
kf = bsearch(&key, specs->value2enum, specs->map_count,
sizeof(key), NativeEnumerated__compar_value2enum);
if(!kf) {
ASN_DEBUG("No element corresponds to %ld", native);
ASN__ENCODE_FAILED;
}
value = kf - specs->value2enum;
if(ct->range_bits >= 0) {
int cmpWith = specs->extension
? specs->extension - 1 : specs->map_count;
if(value >= cmpWith)
inext = 1;
}
if(ct->flags & APC_EXTENSIBLE) {
if(per_put_few_bits(po, inext, 1))
ASN__ENCODE_FAILED;
if(inext) ct = 0;
} else if(inext) {
ASN__ENCODE_FAILED;
}
if(ct && ct->range_bits >= 0) {
if(per_put_few_bits(po, value, ct->range_bits))
ASN__ENCODE_FAILED;
ASN__ENCODED_OK(er);
}
if(!specs->extension)
ASN__ENCODE_FAILED;
/*
* X.691, #10.6: normally small non-negative whole number;
*/
ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld",
value, specs->extension, inext,
value - (inext ? (specs->extension - 1) : 0));
if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0)))
ASN__ENCODE_FAILED;
ASN__ENCODED_OK(er);
}
asn_dec_rval_t
NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
void **sptr, asn_per_data_t *pd) {
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
asn_dec_rval_t rval = { RC_OK, 0 };
long *native = (long *)*sptr;
const asn_per_constraint_t *ct;
long value;
(void)opt_codec_ctx;
if(constraints) ct = &constraints->value;
else if(td->encoding_constraints.per_constraints)
ct = &td->encoding_constraints.per_constraints->value;
else ASN__DECODE_FAILED; /* Mandatory! */
if(!specs) ASN__DECODE_FAILED;
if(!native) {
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) ASN__DECODE_FAILED;
}
ASN_DEBUG("Decoding %s as NativeEnumerated", td->name);
if(ct->flags & APC_EXTENSIBLE) {
int inext = per_get_few_bits(pd, 1);
if(inext < 0) ASN__DECODE_STARVED;
if(inext) ct = 0;
}
/* Deal with APER padding */
if(ct && ct->upper_bound >= 255) {
int padding = 0;
padding = (8 - (pd->moved % 8)) % 8;
ASN_DEBUG("For NativeEnumerated %s,offset= %lu Padding bits = %d", td->name, pd->moved, padding);
ASN_DEBUG("For NativeEnumerated %s, upper bound = %lu", td->name, ct->upper_bound);
if(padding > 0)
per_get_few_bits(pd, padding);
}
if(ct && ct->range_bits >= 0) {
value = per_get_few_bits(pd, ct->range_bits);
if(value < 0) ASN__DECODE_STARVED;
if(value >= (specs->extension
? specs->extension - 1 : specs->map_count))
ASN__DECODE_FAILED;
} else {
if(!specs->extension)
ASN__DECODE_FAILED;
/*
* X.691, #10.6: normally small non-negative whole number;
*/
value = uper_get_nsnnwn(pd);
if(value < 0) ASN__DECODE_STARVED;
value += specs->extension - 1;
if(value >= specs->map_count)
ASN__DECODE_FAILED;
}
*native = specs->value2enum[value].nat_value;
ASN_DEBUG("Decoded %s = %ld", td->name, *native);
return rval;
}
asn_enc_rval_t
NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er = {0,0,0};
long native, value;
const asn_per_constraint_t *ct;
int inext = 0;
asn_INTEGER_enum_map_t key;
asn_INTEGER_enum_map_t *kf;
if(!sptr) ASN__ENCODE_FAILED;
if(!specs) ASN__ENCODE_FAILED;
if(constraints) ct = &constraints->value;
else if(td->encoding_constraints.per_constraints)
ct = &td->encoding_constraints.per_constraints->value;
else ASN__ENCODE_FAILED; /* Mandatory! */
ASN_DEBUG("Encoding %s as NativeEnumerated", td->name);
er.encoded = 0;
native = *(const long *)sptr;
if(native < 0) ASN__ENCODE_FAILED;
key.nat_value = native;
kf = bsearch(&key, specs->value2enum, specs->map_count,
sizeof(key), NativeEnumerated__compar_value2enum);
if(!kf) {
ASN_DEBUG("No element corresponds to %ld", native);
ASN__ENCODE_FAILED;
}
value = kf - specs->value2enum;
if(ct->range_bits >= 0) {
int cmpWith = specs->extension
? specs->extension - 1 : specs->map_count;
if(value >= cmpWith)
inext = 1;
}
if(ct->flags & APC_EXTENSIBLE) {
if(per_put_few_bits(po, inext, 1))
ASN__ENCODE_FAILED;
if(inext) ct = 0;
} else if(inext) {
ASN__ENCODE_FAILED;
}
if(ct && ct->range_bits >= 0) {
if(per_put_few_bits(po, value, ct->range_bits))
ASN__ENCODE_FAILED;
ASN__ENCODED_OK(er);
}
if(!specs->extension)
ASN__ENCODE_FAILED;
/*
* X.691, #10.6: normally small non-negative whole number;
*/
ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld",
value, specs->extension, inext,
value - (inext ? (specs->extension - 1) : 0));
if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0)))
ASN__ENCODE_FAILED;
ASN__ENCODED_OK(er);
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
* This type differs from the standard ENUMERATED in that it is modelled using
* the fixed machine type (long, int, short), so it can hold only values of
* limited length. There is no type (i.e., NativeEnumerated_t, any integer type
* will do).
* This type may be used when integer range is limited by subtype constraints.
*/
#ifndef _NativeEnumerated_H_
#define _NativeEnumerated_H_
#include <NativeInteger.h>
#ifdef __cplusplus
extern "C" {
#endif
extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated;
extern asn_TYPE_operation_t asn_OP_NativeEnumerated;
xer_type_encoder_f NativeEnumerated_encode_xer;
oer_type_decoder_f NativeEnumerated_decode_oer;
oer_type_encoder_f NativeEnumerated_encode_oer;
per_type_decoder_f NativeEnumerated_decode_uper;
per_type_encoder_f NativeEnumerated_encode_uper;
per_type_decoder_f NativeEnumerated_decode_aper;
per_type_encoder_f NativeEnumerated_encode_aper;
#define NativeEnumerated_free NativeInteger_free
#define NativeEnumerated_print NativeInteger_print
#define NativeEnumerated_compare NativeInteger_compare
#define NativeEnumerated_random_fill NativeInteger_random_fill
#define NativeEnumerated_constraint asn_generic_no_constraint
#define NativeEnumerated_decode_ber NativeInteger_decode_ber
#define NativeEnumerated_encode_der NativeInteger_encode_der
#define NativeEnumerated_decode_xer NativeInteger_decode_xer
#ifdef __cplusplus
}
#endif
#endif /* _NativeEnumerated_H_ */

View File

@@ -0,0 +1,550 @@
/*-
* Copyright (c) 2004, 2005, 2006 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
* Read the NativeInteger.h for the explanation wrt. differences between
* INTEGER and NativeInteger.
* Basically, both are decoders and encoders of ASN.1 INTEGER type, but this
* implementation deals with the standard (machine-specific) representation
* of them instead of using the platform-independent buffer.
*/
#include <asn_internal.h>
#include <NativeInteger.h>
/*
* NativeInteger basic type description.
*/
static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_operation_t asn_OP_NativeInteger = {
NativeInteger_free,
NativeInteger_print,
NativeInteger_compare,
NativeInteger_decode_ber,
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeInteger_encode_xer,
#ifdef ASN_DISABLE_OER_SUPPORT
0,
0,
#else
NativeInteger_decode_oer, /* OER decoder */
NativeInteger_encode_oer, /* Canonical OER encoder */
#endif /* ASN_DISABLE_OER_SUPPORT */
#ifdef ASN_DISABLE_PER_SUPPORT
0,
0,
0,
0,
#else
NativeInteger_decode_uper, /* Unaligned PER decoder */
NativeInteger_encode_uper, /* Unaligned PER encoder */
NativeInteger_decode_aper, /* Aligned PER decoder */
NativeInteger_encode_aper, /* Aligned PER encoder */
#endif /* ASN_DISABLE_PER_SUPPORT */
NativeInteger_random_fill,
0 /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_NativeInteger = {
"INTEGER", /* The ASN.1 type is still INTEGER */
"INTEGER",
&asn_OP_NativeInteger,
asn_DEF_NativeInteger_tags,
sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]),
asn_DEF_NativeInteger_tags, /* Same as above */
sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]),
{ 0, 0, asn_generic_no_constraint },
0, 0, /* No members */
0 /* No specifics */
};
/*
* Decode INTEGER type.
*/
asn_dec_rval_t
NativeInteger_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td, void **nint_ptr,
const void *buf_ptr, size_t size, int tag_mode) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
long *native = (long *)*nint_ptr;
asn_dec_rval_t rval;
ber_tlv_len_t length;
/*
* If the structure is not there, allocate it.
*/
if(native == NULL) {
native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native)));
if(native == NULL) {
rval.code = RC_FAIL;
rval.consumed = 0;
return rval;
}
}
ASN_DEBUG("Decoding %s as INTEGER (tm=%d)",
td->name, tag_mode);
/*
* Check tags.
*/
rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size,
tag_mode, 0, &length, 0);
if(rval.code != RC_OK)
return rval;
ASN_DEBUG("%s length is %d bytes", td->name, (int)length);
/*
* Make sure we have this length.
*/
buf_ptr = ((const char *)buf_ptr) + rval.consumed;
size -= rval.consumed;
if(length > (ber_tlv_len_t)size) {
rval.code = RC_WMORE;
rval.consumed = 0;
return rval;
}
/*
* ASN.1 encoded INTEGER: buf_ptr, length
* Fill the native, at the same time checking for overflow.
* If overflow occured, return with RC_FAIL.
*/
{
INTEGER_t tmp;
union {
const void *constbuf;
void *nonconstbuf;
} unconst_buf;
long l;
unconst_buf.constbuf = buf_ptr;
tmp.buf = (uint8_t *)unconst_buf.nonconstbuf;
tmp.size = length;
if((specs&&specs->field_unsigned)
? asn_INTEGER2ulong(&tmp, (unsigned long *)&l) /* sic */
: asn_INTEGER2long(&tmp, &l)) {
rval.code = RC_FAIL;
rval.consumed = 0;
return rval;
}
*native = l;
}
rval.code = RC_OK;
rval.consumed += length;
ASN_DEBUG("Took %ld/%ld bytes to encode %s (%ld)",
(long)rval.consumed, (long)length, td->name, (long)*native);
return rval;
}
/*
* Encode the NativeInteger using the standard INTEGER type DER encoder.
*/
asn_enc_rval_t
NativeInteger_encode_der(const asn_TYPE_descriptor_t *sd, const void *ptr,
int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
unsigned long native = *(const unsigned long *)ptr; /* Disable sign ext. */
asn_enc_rval_t erval = {0,0,0};
INTEGER_t tmp;
#ifdef WORDS_BIGENDIAN /* Opportunistic optimization */
tmp.buf = (uint8_t *)&native;
tmp.size = sizeof(native);
#else /* Works even if WORDS_BIGENDIAN is not set where should've been */
uint8_t buf[sizeof(native)];
uint8_t *p;
/* Prepare a fake INTEGER */
for(p = buf + sizeof(buf) - 1; p >= buf; p--, native >>= 8)
*p = (uint8_t)native;
tmp.buf = buf;
tmp.size = sizeof(buf);
#endif /* WORDS_BIGENDIAN */
/* Encode fake INTEGER */
erval = INTEGER_encode_der(sd, &tmp, tag_mode, tag, cb, app_key);
if(erval.structure_ptr == &tmp) {
erval.structure_ptr = ptr;
}
return erval;
}
/*
* Decode the chunk of XML text encoding INTEGER.
*/
asn_dec_rval_t
NativeInteger_decode_xer(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td, void **sptr,
const char *opt_mname, const void *buf_ptr,
size_t size) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_dec_rval_t rval;
INTEGER_t st;
void *st_ptr = (void *)&st;
long *native = (long *)*sptr;
if(!native) {
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) ASN__DECODE_FAILED;
}
memset(&st, 0, sizeof(st));
rval = INTEGER_decode_xer(opt_codec_ctx, td, &st_ptr,
opt_mname, buf_ptr, size);
if(rval.code == RC_OK) {
long l;
if((specs&&specs->field_unsigned)
? asn_INTEGER2ulong(&st, (unsigned long *)&l) /* sic */
: asn_INTEGER2long(&st, &l)) {
rval.code = RC_FAIL;
rval.consumed = 0;
} else {
*native = l;
}
} else {
/*
* Cannot restart from the middle;
* there is no place to save state in the native type.
* Request a continuation from the very beginning.
*/
rval.consumed = 0;
}
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &st);
return rval;
}
asn_enc_rval_t
NativeInteger_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
char scratch[32]; /* Enough for 64-bit int */
asn_enc_rval_t er = {0,0,0};
const long *native = (const long *)sptr;
(void)ilevel;
(void)flags;
if(!native) ASN__ENCODE_FAILED;
er.encoded = snprintf(scratch, sizeof(scratch),
(specs && specs->field_unsigned)
? "%lu" : "%ld", *native);
if(er.encoded <= 0 || (size_t)er.encoded >= sizeof(scratch)
|| cb(scratch, er.encoded, app_key) < 0)
ASN__ENCODE_FAILED;
ASN__ENCODED_OK(er);
}
#ifndef ASN_DISABLE_PER_SUPPORT
asn_dec_rval_t
NativeInteger_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr,
asn_per_data_t *pd) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_dec_rval_t rval;
long *native = (long *)*sptr;
INTEGER_t tmpint;
void *tmpintptr = &tmpint;
(void)opt_codec_ctx;
ASN_DEBUG("Decoding NativeInteger %s (UPER)", td->name);
if(!native) {
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) ASN__DECODE_FAILED;
}
memset(&tmpint, 0, sizeof tmpint);
rval = INTEGER_decode_uper(opt_codec_ctx, td, constraints,
&tmpintptr, pd);
if(rval.code == RC_OK) {
if((specs&&specs->field_unsigned)
? asn_INTEGER2ulong(&tmpint, (unsigned long *)native)
: asn_INTEGER2long(&tmpint, native))
rval.code = RC_FAIL;
else
ASN_DEBUG("NativeInteger %s got value %ld",
td->name, *native);
}
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint);
return rval;
}
asn_enc_rval_t
NativeInteger_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er = {0,0,0};
long native;
INTEGER_t tmpint;
if(!sptr) ASN__ENCODE_FAILED;
native = *(const long *)sptr;
ASN_DEBUG("Encoding NativeInteger %s %ld (UPER)", td->name, native);
memset(&tmpint, 0, sizeof(tmpint));
if((specs&&specs->field_unsigned)
? asn_ulong2INTEGER(&tmpint, native)
: asn_long2INTEGER(&tmpint, native))
ASN__ENCODE_FAILED;
er = INTEGER_encode_uper(td, constraints, &tmpint, po);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint);
return er;
}
asn_dec_rval_t
NativeInteger_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
asn_dec_rval_t rval;
long *native = (long *)*sptr;
INTEGER_t tmpint;
void *tmpintptr = &tmpint;
(void)opt_codec_ctx;
ASN_DEBUG("Decoding NativeInteger %s (APER)", td->name);
if(!native) {
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) ASN__DECODE_FAILED;
}
memset(&tmpint, 0, sizeof tmpint);
rval = INTEGER_decode_aper(opt_codec_ctx, td, constraints,
&tmpintptr, pd);
if(rval.code == RC_OK) {
if((specs&&specs->field_unsigned)
? asn_INTEGER2ulong(&tmpint, (unsigned long *)native)
: asn_INTEGER2long(&tmpint, native))
rval.code = RC_FAIL;
else
ASN_DEBUG("NativeInteger %s got value %ld",
td->name, *native);
}
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint);
return rval;
}
asn_enc_rval_t
NativeInteger_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er = {0,0,0};
long native;
INTEGER_t tmpint;
if(!sptr) ASN__ENCODE_FAILED;
native = *(const long *)sptr;
ASN_DEBUG("Encoding NativeInteger %s %ld (APER)", td->name, native);
memset(&tmpint, 0, sizeof(tmpint));
if((specs&&specs->field_unsigned)
? asn_ulong2INTEGER(&tmpint, (unsigned long)native)
: asn_long2INTEGER(&tmpint, native))
ASN__ENCODE_FAILED;
er = INTEGER_encode_aper(td, constraints, &tmpint, po);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint);
return er;
}
#endif /* ASN_DISABLE_PER_SUPPORT */
/*
* INTEGER specific human-readable output.
*/
int
NativeInteger_print(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
const long *native = (const long *)sptr;
char scratch[32]; /* Enough for 64-bit int */
int ret;
(void)td; /* Unused argument */
(void)ilevel; /* Unused argument */
if(native) {
long value = *native;
ret = snprintf(scratch, sizeof(scratch),
(specs && specs->field_unsigned) ? "%lu" : "%ld", value);
assert(ret > 0 && (size_t)ret < sizeof(scratch));
if(cb(scratch, ret, app_key) < 0) return -1;
if(specs && (value >= 0 || !specs->field_unsigned)) {
const asn_INTEGER_enum_map_t *el =
INTEGER_map_value2enum(specs, value);
if(el) {
if(cb(" (", 2, app_key) < 0) return -1;
if(cb(el->enum_name, el->enum_len, app_key) < 0) return -1;
if(cb(")", 1, app_key) < 0) return -1;
}
}
return 0;
} else {
return (cb("<absent>", 8, app_key) < 0) ? -1 : 0;
}
}
void
NativeInteger_free(const asn_TYPE_descriptor_t *td, void *ptr,
enum asn_struct_free_method method) {
if(!td || !ptr)
return;
ASN_DEBUG("Freeing %s as INTEGER (%d, %p, Native)",
td->name, method, ptr);
switch(method) {
case ASFM_FREE_EVERYTHING:
FREEMEM(ptr);
break;
case ASFM_FREE_UNDERLYING:
break;
case ASFM_FREE_UNDERLYING_AND_RESET:
memset(ptr, 0, sizeof(long));
break;
}
}
int
NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) {
(void)td;
if(aptr && bptr) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
if(specs && specs->field_unsigned) {
const unsigned long *a = aptr;
const unsigned long *b = bptr;
if(*a < *b) {
return -1;
} else if(*a > *b) {
return 1;
} else {
return 0;
}
} else {
const long *a = aptr;
const long *b = bptr;
if(*a < *b) {
return -1;
} else if(*a > *b) {
return 1;
} else {
return 0;
}
}
} else if(!aptr) {
return -1;
} else {
return 1;
}
}
asn_random_fill_result_t
NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
const asn_encoding_constraints_t *constraints,
size_t max_length) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_random_fill_result_t result_ok = {ARFILL_OK, 1};
asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0};
asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0};
long *st = *sptr;
const asn_INTEGER_enum_map_t *emap;
size_t emap_len;
intmax_t value;
int find_inside_map;
if(max_length == 0) return result_skipped;
if(st == NULL) {
st = (long *)CALLOC(1, sizeof(*st));
if(st == NULL) {
return result_failed;
}
}
if(specs) {
emap = specs->value2enum;
emap_len = specs->map_count;
if(specs->strict_enumeration) {
find_inside_map = emap_len > 0;
} else {
find_inside_map = emap_len ? asn_random_between(0, 1) : 0;
}
} else {
emap = 0;
emap_len = 0;
find_inside_map = 0;
}
if(find_inside_map) {
assert(emap_len > 0);
value = emap[asn_random_between(0, emap_len - 1)].nat_value;
} else {
const asn_per_constraints_t *ct;
static const long variants[] = {
-65536, -65535, -65534, -32769, -32768, -32767, -16385, -16384,
-16383, -257, -256, -255, -254, -129, -128, -127,
-126, -1, 0, 1, 126, 127, 128, 129,
254, 255, 256, 257, 16383, 16384, 16385, 32767,
32768, 32769, 65534, 65535, 65536, 65537};
if(specs && specs->field_unsigned) {
assert(variants[18] == 0);
value = variants[asn_random_between(
18, sizeof(variants) / sizeof(variants[0]) - 1)];
} else {
value = variants[asn_random_between(
0, sizeof(variants) / sizeof(variants[0]) - 1)];
}
if(!constraints) constraints = &td->encoding_constraints;
ct = constraints ? constraints->per_constraints : 0;
if(ct && (ct->value.flags & APC_CONSTRAINED)) {
if(value < ct->value.lower_bound || value > ct->value.upper_bound) {
value = asn_random_between(ct->value.lower_bound,
ct->value.upper_bound);
}
}
}
*sptr = st;
*st = value;
return result_ok;
}

View File

@@ -0,0 +1,46 @@
/*-
* Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
* This type differs from the standard INTEGER in that it is modelled using
* the fixed machine type (long, int, short), so it can hold only values of
* limited length. There is no type (i.e., NativeInteger_t, any integer type
* will do).
* This type may be used when integer range is limited by subtype constraints.
*/
#ifndef _NativeInteger_H_
#define _NativeInteger_H_
#include <asn_application.h>
#include <INTEGER.h>
#ifdef __cplusplus
extern "C" {
#endif
extern asn_TYPE_descriptor_t asn_DEF_NativeInteger;
extern asn_TYPE_operation_t asn_OP_NativeInteger;
asn_struct_free_f NativeInteger_free;
asn_struct_print_f NativeInteger_print;
asn_struct_compare_f NativeInteger_compare;
ber_type_decoder_f NativeInteger_decode_ber;
der_type_encoder_f NativeInteger_encode_der;
xer_type_decoder_f NativeInteger_decode_xer;
xer_type_encoder_f NativeInteger_encode_xer;
oer_type_decoder_f NativeInteger_decode_oer;
oer_type_encoder_f NativeInteger_encode_oer;
per_type_decoder_f NativeInteger_decode_uper;
per_type_encoder_f NativeInteger_encode_uper;
per_type_decoder_f NativeInteger_decode_aper;
per_type_encoder_f NativeInteger_encode_aper;
asn_random_fill_f NativeInteger_random_fill;
#define NativeInteger_constraint asn_generic_no_constraint
#ifdef __cplusplus
}
#endif
#endif /* _NativeInteger_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,102 @@
/*-
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _OCTET_STRING_H_
#define _OCTET_STRING_H_
#include <asn_application.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OCTET_STRING {
uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */
size_t size; /* Size of the buffer */
asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */
} OCTET_STRING_t;
extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING;
extern asn_TYPE_operation_t asn_OP_OCTET_STRING;
asn_struct_free_f OCTET_STRING_free;
asn_struct_print_f OCTET_STRING_print;
asn_struct_print_f OCTET_STRING_print_utf8;
asn_struct_compare_f OCTET_STRING_compare;
ber_type_decoder_f OCTET_STRING_decode_ber;
der_type_encoder_f OCTET_STRING_encode_der;
xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */
xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */
xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */
xer_type_encoder_f OCTET_STRING_encode_xer;
xer_type_encoder_f OCTET_STRING_encode_xer_utf8;
oer_type_decoder_f OCTET_STRING_decode_oer;
oer_type_encoder_f OCTET_STRING_encode_oer;
per_type_decoder_f OCTET_STRING_decode_uper;
per_type_encoder_f OCTET_STRING_encode_uper;
per_type_decoder_f OCTET_STRING_decode_aper;
per_type_encoder_f OCTET_STRING_encode_aper;
asn_random_fill_f OCTET_STRING_random_fill;
#define OCTET_STRING_constraint asn_generic_no_constraint
#define OCTET_STRING_decode_xer OCTET_STRING_decode_xer_hex
/******************************
* Handy conversion routines. *
******************************/
/*
* This function clears the previous value of the OCTET STRING (if any)
* and then allocates a new memory with the specified content (str/size).
* If size = -1, the size of the original string will be determined
* using strlen(str).
* If str equals to NULL, the function will silently clear the
* current contents of the OCTET STRING.
* Returns 0 if it was possible to perform operation, -1 otherwise.
*/
int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size);
/* Handy conversion from the C string into the OCTET STRING. */
#define OCTET_STRING_fromString(s, str) OCTET_STRING_fromBuf(s, str, -1)
/*
* Allocate and fill the new OCTET STRING and return a pointer to the newly
* allocated object. NULL is permitted in str: the function will just allocate
* empty OCTET STRING.
*/
OCTET_STRING_t *OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td,
const char *str, int size);
/****************************
* Internally useful stuff. *
****************************/
typedef struct asn_OCTET_STRING_specifics_s {
/*
* Target structure description.
*/
unsigned struct_size; /* Size of the structure */
unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */
enum asn_OS_Subvariant {
ASN_OSUBV_ANY, /* The open type (ANY) */
ASN_OSUBV_BIT, /* BIT STRING */
ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */
ASN_OSUBV_U16, /* 16-bit character (BMPString) */
ASN_OSUBV_U32 /* 32-bit character (UniversalString) */
} subvariant;
} asn_OCTET_STRING_specifics_t;
extern asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs;
size_t OCTET_STRING_random_length_constrained(
const asn_TYPE_descriptor_t *, const asn_encoding_constraints_t *,
size_t max_length);
#ifdef __cplusplus
}
#endif
#endif /* _OCTET_STRING_H_ */

View File

@@ -0,0 +1,509 @@
/*
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
#include <OPEN_TYPE.h>
#include <constr_CHOICE.h>
#include <per_opentype.h>
#include <errno.h>
asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
OPEN_TYPE_free,
OPEN_TYPE_print,
OPEN_TYPE_compare,
OPEN_TYPE_decode_ber,
OPEN_TYPE_encode_der,
OPEN_TYPE_decode_xer,
OPEN_TYPE_encode_xer,
#ifdef ASN_DISABLE_OER_SUPPORT
0, 0, /* No OER support, use "-gen-OER" to enable */
#else
OPEN_TYPE_decode_oer,
OPEN_TYPE_encode_oer,
#endif
#ifdef ASN_DISABLE_PER_SUPPORT
0, 0, 0, 0,
#else
OPEN_TYPE_decode_uper,
OPEN_TYPE_encode_uper,
OPEN_TYPE_decode_aper,
OPEN_TYPE_encode_aper,
#endif
0, /* Random fill is not supported for open type */
0 /* Use generic outmost tag fetcher */
};
#undef ADVANCE
#define ADVANCE(num_bytes) \
do { \
size_t num = num_bytes; \
ptr = ((const char *)ptr) + num; \
size -= num; \
consumed_myself += num; \
} while(0)
asn_dec_rval_t
OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td, void *sptr,
const asn_TYPE_member_t *elm, const void *ptr, size_t size) {
size_t consumed_myself = 0;
asn_type_selector_result_t selected;
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
void *inner_value;
asn_dec_rval_t rv;
if(!(elm->flags & ATF_OPEN_TYPE)) {
ASN__DECODE_FAILED;
}
if(!elm->type_selector) {
ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s",
td->name, elm->name, elm->type->name);
ASN__DECODE_FAILED;
}
selected = elm->type_selector(td, sptr);
if(!selected.presence_index) {
ASN__DECODE_FAILED;
}
/* Fetch the pointer to this member */
if(elm->flags & ATF_POINTER) {
memb_ptr2 = (void **)((char *)sptr + elm->memb_offset);
} else {
memb_ptr = (char *)sptr + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
if(*memb_ptr2 != NULL) {
/* Make sure we reset the structure first before encoding */
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) {
ASN__DECODE_FAILED;
}
}
inner_value =
(char *)*memb_ptr2
+ elm->type->elements[selected.presence_index - 1].memb_offset;
ASN_DEBUG("presence %d\n", selected.presence_index);
rv = selected.type_descriptor->op->ber_decoder(
opt_codec_ctx, selected.type_descriptor, &inner_value, ptr, size,
elm->tag_mode);
ADVANCE(rv.consumed);
rv.consumed = 0;
switch(rv.code) {
case RC_OK:
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2,
selected.presence_index)
== 0) {
rv.code = RC_OK;
rv.consumed = consumed_myself;
return rv;
} else {
/* Oh, now a full-blown failure failure */
}
/* Fall through */
case RC_FAIL:
rv.consumed = consumed_myself;
/* Fall through */
case RC_WMORE:
break;
}
if(*memb_ptr2) {
if(elm->flags & ATF_POINTER) {
ASN_STRUCT_FREE(*selected.type_descriptor, inner_value);
*memb_ptr2 = NULL;
} else {
ASN_STRUCT_RESET(*selected.type_descriptor,
inner_value);
}
}
return rv;
}
asn_dec_rval_t
OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td, void *sptr,
const asn_TYPE_member_t *elm, const void *ptr, size_t size) {
size_t consumed_myself = 0;
asn_type_selector_result_t selected;
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
void *inner_value;
asn_dec_rval_t rv;
int xer_context = 0;
ssize_t ch_size;
pxer_chunk_type_e ch_type;
if(!(elm->flags & ATF_OPEN_TYPE)) {
ASN__DECODE_FAILED;
}
if(!elm->type_selector) {
ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s",
td->name, elm->name, elm->type->name);
ASN__DECODE_FAILED;
}
selected = elm->type_selector(td, sptr);
if(!selected.presence_index) {
ASN__DECODE_FAILED;
}
/* Fetch the pointer to this member */
assert(elm->flags == ATF_OPEN_TYPE);
if(elm->flags & ATF_POINTER) {
memb_ptr2 = (void **)((char *)sptr + elm->memb_offset);
} else {
memb_ptr = (char *)sptr + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
if(*memb_ptr2 != NULL) {
/* Make sure we reset the structure first before encoding */
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0)
!= 0) {
ASN__DECODE_FAILED;
}
}
/*
* Confirm wrapper.
*/
for(;;) {
ch_size = xer_next_token(&xer_context, ptr, size, &ch_type);
if(ch_size < 0) {
ASN__DECODE_FAILED;
} else {
switch(ch_type) {
case PXER_WMORE:
ASN__DECODE_STARVED;
case PXER_COMMENT:
case PXER_TEXT:
ADVANCE(ch_size);
continue;
case PXER_TAG:
break;
}
break;
}
}
/*
* Wrapper value confirmed.
*/
switch(xer_check_tag(ptr, ch_size, elm->name)) {
case XCT_OPENING:
ADVANCE(ch_size);
break;
case XCT_BROKEN:
default:
ASN__DECODE_FAILED;
}
inner_value =
(char *)*memb_ptr2
+ elm->type->elements[selected.presence_index - 1].memb_offset;
rv = selected.type_descriptor->op->xer_decoder(
opt_codec_ctx, selected.type_descriptor, &inner_value, NULL, ptr, size);
ADVANCE(rv.consumed);
rv.consumed = 0;
switch(rv.code) {
case RC_OK:
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2,
selected.presence_index)
== 0) {
break;
} else {
rv.code = RC_FAIL;
}
/* Fall through */
case RC_FAIL:
/* Point to a best position where failure occurred */
rv.consumed = consumed_myself;
/* Fall through */
case RC_WMORE:
/* Wrt. rv.consumed==0:
* In case a genuine RC_WMORE, the whole Open Type decoding
* will have to be restarted.
*/
if(*memb_ptr2) {
if(elm->flags & ATF_POINTER) {
ASN_STRUCT_FREE(*selected.type_descriptor, inner_value);
*memb_ptr2 = NULL;
} else {
ASN_STRUCT_RESET(*selected.type_descriptor,
inner_value);
}
}
return rv;
}
/*
* Finalize wrapper.
*/
for(;;) {
ch_size = xer_next_token(&xer_context, ptr, size, &ch_type);
if(ch_size < 0) {
ASN__DECODE_FAILED;
} else {
switch(ch_type) {
case PXER_WMORE:
ASN__DECODE_STARVED;
case PXER_COMMENT:
case PXER_TEXT:
ADVANCE(ch_size);
continue;
case PXER_TAG:
break;
}
break;
}
}
/*
* Wrapper value confirmed.
*/
switch(xer_check_tag(ptr, ch_size, elm->name)) {
case XCT_CLOSING:
ADVANCE(ch_size);
break;
case XCT_BROKEN:
default:
ASN__DECODE_FAILED;
}
rv.consumed += consumed_myself;
return rv;
}
#ifndef ASN_DISABLE_PER_SUPPORT
asn_dec_rval_t
OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td, void *sptr,
const asn_TYPE_member_t *elm, asn_per_data_t *pd) {
asn_type_selector_result_t selected;
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
void *inner_value;
asn_dec_rval_t rv;
if(!(elm->flags & ATF_OPEN_TYPE)) {
ASN__DECODE_FAILED;
}
if(!elm->type_selector) {
ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s",
td->name, elm->name, elm->type->name);
ASN__DECODE_FAILED;
}
selected = elm->type_selector(td, sptr);
if(!selected.presence_index) {
ASN__DECODE_FAILED;
}
/* Fetch the pointer to this member */
assert(elm->flags == ATF_OPEN_TYPE);
if(elm->flags & ATF_POINTER) {
memb_ptr2 = (void **)((char *)sptr + elm->memb_offset);
} else {
memb_ptr = (char *)sptr + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
if(*memb_ptr2 != NULL) {
/* Make sure we reset the structure first before encoding */
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0)
!= 0) {
ASN__DECODE_FAILED;
}
}
inner_value =
(char *)*memb_ptr2
+ elm->type->elements[selected.presence_index - 1].memb_offset;
rv = uper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL,
&inner_value, pd);
switch(rv.code) {
case RC_OK:
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2,
selected.presence_index)
== 0) {
break;
} else {
rv.code = RC_FAIL;
}
/* Fall through */
case RC_WMORE:
case RC_FAIL:
if(*memb_ptr2) {
if(elm->flags & ATF_POINTER) {
ASN_STRUCT_FREE(*selected.type_descriptor, inner_value);
*memb_ptr2 = NULL;
} else {
ASN_STRUCT_RESET(*selected.type_descriptor,
inner_value);
}
}
}
return rv;
}
asn_enc_rval_t
OPEN_TYPE_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const void *memb_ptr; /* Pointer to the member */
asn_TYPE_member_t *elm; /* CHOICE's element */
asn_enc_rval_t er = {0,0,0};
unsigned present;
(void)constraints;
present = CHOICE_variant_get_presence(td, sptr);
if(present == 0 || present > td->elements_count) {
ASN__ENCODE_FAILED;
} else {
present--;
}
ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present);
elm = &td->elements[present];
if(elm->flags & ATF_POINTER) {
/* Member is a pointer to another structure */
memb_ptr =
*(const void *const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) ASN__ENCODE_FAILED;
} else {
memb_ptr = (const char *)sptr + elm->memb_offset;
}
if(uper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) {
ASN__ENCODE_FAILED;
}
er.encoded = 0;
ASN__ENCODED_OK(er);
}
asn_dec_rval_t
OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td, void *sptr,
const asn_TYPE_member_t *elm, asn_per_data_t *pd) {
asn_type_selector_result_t selected;
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
void *inner_value;
asn_dec_rval_t rv;
if(!(elm->flags & ATF_OPEN_TYPE)) {
ASN__DECODE_FAILED;
}
if(!elm->type_selector) {
ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s",
td->name, elm->name, elm->type->name);
ASN__DECODE_FAILED;
}
selected = elm->type_selector(td, sptr);
if(!selected.presence_index) {
ASN__DECODE_FAILED;
}
/* Fetch the pointer to this member */
assert(elm->flags == ATF_OPEN_TYPE);
if(elm->flags & ATF_POINTER) {
memb_ptr2 = (void **)((char *)sptr + elm->memb_offset);
} else {
memb_ptr = (char *)sptr + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
if(*memb_ptr2 != NULL) {
/* Make sure we reset the structure first before encoding */
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0)
!= 0) {
ASN__DECODE_FAILED;
}
}
inner_value =
(char *)*memb_ptr2
+ elm->type->elements[selected.presence_index - 1].memb_offset;
rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL,
&inner_value, pd);
switch(rv.code) {
case RC_OK:
if(CHOICE_variant_set_presence(elm->type, *memb_ptr2,
selected.presence_index)
== 0) {
break;
} else {
rv.code = RC_FAIL;
}
/* Fall through */
case RC_WMORE:
case RC_FAIL:
if(*memb_ptr2) {
if(elm->flags & ATF_POINTER) {
ASN_STRUCT_FREE(*selected.type_descriptor, inner_value);
*memb_ptr2 = NULL;
} else {
ASN_STRUCT_RESET(*selected.type_descriptor,
inner_value);
}
}
}
return rv;
}
asn_enc_rval_t
OPEN_TYPE_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const void *memb_ptr; /* Pointer to the member */
asn_TYPE_member_t *elm; /* CHOICE's element */
asn_enc_rval_t er = {0,0,0};
unsigned present;
(void)constraints;
present = CHOICE_variant_get_presence(td, sptr);
if(present == 0 || present > td->elements_count) {
ASN__ENCODE_FAILED;
} else {
present--;
}
ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present);
elm = &td->elements[present];
if(elm->flags & ATF_POINTER) {
/* Member is a pointer to another structure */
memb_ptr =
*(const void *const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) ASN__ENCODE_FAILED;
} else {
memb_ptr = (const char *)sptr + elm->memb_offset;
}
if(aper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) {
ASN__ENCODE_FAILED;
}
er.encoded = 0;
ASN__ENCODED_OK(er);
}
#endif /* ASN_DISABLE_PER_SUPPORT */

View File

@@ -0,0 +1,77 @@
/*-
* Copyright (c) 2017-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef ASN_OPEN_TYPE_H
#define ASN_OPEN_TYPE_H
#include <asn_application.h>
#ifdef __cplusplus
extern "C" {
#endif
#define OPEN_TYPE_free CHOICE_free
#define OPEN_TYPE_print CHOICE_print
#define OPEN_TYPE_compare CHOICE_compare
#define OPEN_TYPE_constraint CHOICE_constraint
#define OPEN_TYPE_decode_ber NULL
#define OPEN_TYPE_encode_der CHOICE_encode_der
#define OPEN_TYPE_decode_xer NULL
#define OPEN_TYPE_encode_xer CHOICE_encode_xer
#define OPEN_TYPE_decode_oer NULL
#define OPEN_TYPE_encode_oer CHOICE_encode_oer
#define OPEN_TYPE_decode_uper NULL
#define OPEN_TYPE_decode_aper NULL
extern asn_TYPE_operation_t asn_OP_OPEN_TYPE;
/*
* Decode an Open Type which is potentially constraiend
* by the other members of the parent structure.
*/
asn_dec_rval_t OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *parent_type,
void *parent_structure,
const asn_TYPE_member_t *element,
const void *ptr, size_t size);
asn_dec_rval_t OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *parent_type,
void *parent_structure,
const asn_TYPE_member_t *element,
const void *ptr, size_t size);
asn_dec_rval_t OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *parent_type,
void *parent_structure,
asn_TYPE_member_t *element, const void *ptr,
size_t size);
asn_dec_rval_t OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *parent_type,
void *parent_structure,
const asn_TYPE_member_t *element,
asn_per_data_t *pd);
asn_dec_rval_t OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *parent_type,
void *parent_structure,
const asn_TYPE_member_t *element,
asn_per_data_t *pd);
asn_enc_rval_t OPEN_TYPE_encode_uper(
const asn_TYPE_descriptor_t *type_descriptor,
const asn_per_constraints_t *constraints, const void *struct_ptr,
asn_per_outp_t *per_output);
asn_enc_rval_t OPEN_TYPE_encode_aper(
const asn_TYPE_descriptor_t *type_descriptor,
const asn_per_constraints_t *constraints, const void *struct_ptr,
asn_per_outp_t *per_output);
#ifdef __cplusplus
}
#endif
#endif /* ASN_OPEN_TYPE_H */

View File

@@ -0,0 +1,80 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "PLMN-Identity.h"
int
PLMN_Identity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 3)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
/*
* This type is implemented using OCTET_STRING,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */,
0, 0 /* No PER value map */
};
static const ber_tlv_tag_t asn_DEF_PLMN_Identity_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PLMN_Identity = {
"PLMN-Identity",
"PLMN-Identity",
&asn_OP_OCTET_STRING,
asn_DEF_PLMN_Identity_tags_1,
sizeof(asn_DEF_PLMN_Identity_tags_1)
/sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */
asn_DEF_PLMN_Identity_tags_1, /* Same as above */
sizeof(asn_DEF_PLMN_Identity_tags_1)
/sizeof(asn_DEF_PLMN_Identity_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_PLMN_Identity_constr_1, PLMN_Identity_constraint },
0, 0, /* No members */
&asn_SPC_OCTET_STRING_specs /* Additional specs */
};

View File

@@ -0,0 +1,62 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-IEs"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _PLMN_Identity_H_
#define _PLMN_Identity_H_
#include "asn_application.h"
/* Including external dependencies */
#include "OCTET_STRING.h"
#ifdef __cplusplus
extern "C" {
#endif
/* PLMN-Identity */
typedef OCTET_STRING_t PLMN_Identity_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_PLMN_Identity_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_PLMN_Identity;
asn_struct_free_f PLMN_Identity_free;
asn_struct_print_f PLMN_Identity_print;
asn_constr_check_f PLMN_Identity_constraint;
ber_type_decoder_f PLMN_Identity_decode_ber;
der_type_encoder_f PLMN_Identity_encode_der;
xer_type_decoder_f PLMN_Identity_decode_xer;
xer_type_encoder_f PLMN_Identity_encode_xer;
per_type_decoder_f PLMN_Identity_decode_uper;
per_type_encoder_f PLMN_Identity_encode_uper;
per_type_decoder_f PLMN_Identity_decode_aper;
per_type_encoder_f PLMN_Identity_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _PLMN_Identity_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,73 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-CommonDataTypes"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "Presence.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_Presence_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_Presence_value2enum_1[] = {
{ 0, 8, "optional" },
{ 1, 11, "conditional" },
{ 2, 9, "mandatory" }
};
static const unsigned int asn_MAP_Presence_enum2value_1[] = {
1, /* conditional(1) */
2, /* mandatory(2) */
0 /* optional(0) */
};
const asn_INTEGER_specifics_t asn_SPC_Presence_specs_1 = {
asn_MAP_Presence_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_Presence_enum2value_1, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_Presence_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Presence = {
"Presence",
"Presence",
&asn_OP_NativeEnumerated,
asn_DEF_Presence_tags_1,
sizeof(asn_DEF_Presence_tags_1)
/sizeof(asn_DEF_Presence_tags_1[0]), /* 1 */
asn_DEF_Presence_tags_1, /* Same as above */
sizeof(asn_DEF_Presence_tags_1)
/sizeof(asn_DEF_Presence_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_Presence_constr_1, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_Presence_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,70 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-CommonDataTypes"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _Presence_H_
#define _Presence_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeEnumerated.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum Presence {
Presence_optional = 0,
Presence_conditional = 1,
Presence_mandatory = 2
} e_Presence;
/* Presence */
typedef long Presence_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_Presence_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_Presence;
extern const asn_INTEGER_specifics_t asn_SPC_Presence_specs_1;
asn_struct_free_f Presence_free;
asn_struct_print_f Presence_print;
asn_constr_check_f Presence_constraint;
ber_type_decoder_f Presence_decode_ber;
der_type_encoder_f Presence_encode_der;
xer_type_decoder_f Presence_decode_xer;
xer_type_encoder_f Presence_encode_xer;
per_type_decoder_f Presence_decode_uper;
per_type_encoder_f Presence_encode_uper;
per_type_decoder_f Presence_decode_aper;
per_type_encoder_f Presence_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _Presence_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,79 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-CommonDataTypes"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ProcedureCode.h"
int
ProcedureCode_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= 0 && value <= 255)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
/*
* This type is implemented using NativeInteger,
* so here we adjust the DEF accordingly.
*/
asn_per_constraints_t asn_PER_type_ProcedureCode_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const ber_tlv_tag_t asn_DEF_ProcedureCode_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_ProcedureCode = {
"ProcedureCode",
"ProcedureCode",
&asn_OP_NativeInteger,
asn_DEF_ProcedureCode_tags_1,
sizeof(asn_DEF_ProcedureCode_tags_1)
/sizeof(asn_DEF_ProcedureCode_tags_1[0]), /* 1 */
asn_DEF_ProcedureCode_tags_1, /* Same as above */
sizeof(asn_DEF_ProcedureCode_tags_1)
/sizeof(asn_DEF_ProcedureCode_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_ProcedureCode_constr_1, ProcedureCode_constraint },
0, 0, /* No members */
0 /* No specifics */
};

View File

@@ -0,0 +1,71 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-CommonDataTypes"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ProcedureCode_H_
#define _ProcedureCode_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NativeInteger.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ProcedureCode */
typedef long ProcedureCode_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_ProcedureCode_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_ProcedureCode;
asn_struct_free_f ProcedureCode_free;
asn_struct_print_f ProcedureCode_print;
asn_constr_check_f ProcedureCode_constraint;
ber_type_decoder_f ProcedureCode_decode_ber;
der_type_encoder_f ProcedureCode_encode_der;
xer_type_decoder_f ProcedureCode_decode_xer;
xer_type_encoder_f ProcedureCode_encode_xer;
per_type_decoder_f ProcedureCode_decode_uper;
per_type_encoder_f ProcedureCode_encode_uper;
per_type_decoder_f ProcedureCode_decode_aper;
per_type_encoder_f ProcedureCode_encode_aper;
#define ProcedureCode_id_E2setup ((ProcedureCode_t)1)
#define ProcedureCode_id_ErrorIndication ((ProcedureCode_t)2)
#define ProcedureCode_id_Reset ((ProcedureCode_t)3)
#define ProcedureCode_id_RICcontrol ((ProcedureCode_t)4)
#define ProcedureCode_id_RICindication ((ProcedureCode_t)5)
#define ProcedureCode_id_RICserviceQuery ((ProcedureCode_t)6)
#define ProcedureCode_id_RICserviceUpdate ((ProcedureCode_t)7)
#define ProcedureCode_id_RICsubscription ((ProcedureCode_t)8)
#define ProcedureCode_id_RICsubscriptionDelete ((ProcedureCode_t)9)
#ifdef __cplusplus
}
#endif
#endif /* _ProcedureCode_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,828 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-Containers"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ProtocolIE-Container.h"
#include "ProtocolIE-Field.h"
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P0_constr_1 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P1_constr_3 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P2_constr_5 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P3_constr_7 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P4_constr_9 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P5_constr_11 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P6_constr_13 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P7_constr_15 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P8_constr_17 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P9_constr_19 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P10_constr_21 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P11_constr_23 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P12_constr_25 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P13_constr_27 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P14_constr_29 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P15_constr_31 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P16_constr_33 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P17_constr_35 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P18_constr_37 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */,
0, 0 /* No PER value map */
};
asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P19_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_1544P0_1[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionRequest_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P0_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P0_specs_1 = {
sizeof(struct ProtocolIE_Container_1544P0),
offsetof(struct ProtocolIE_Container_1544P0, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P0 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P0_tags_1,
sizeof(asn_DEF_ProtocolIE_Container_1544P0_tags_1)
/sizeof(asn_DEF_ProtocolIE_Container_1544P0_tags_1[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P0_tags_1, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P0_tags_1)
/sizeof(asn_DEF_ProtocolIE_Container_1544P0_tags_1[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P0_constr_1, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P0_1,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P0_specs_1 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P1_3[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionResponse_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P1_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P1_specs_3 = {
sizeof(struct ProtocolIE_Container_1544P1),
offsetof(struct ProtocolIE_Container_1544P1, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P1 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P1_tags_3,
sizeof(asn_DEF_ProtocolIE_Container_1544P1_tags_3)
/sizeof(asn_DEF_ProtocolIE_Container_1544P1_tags_3[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P1_tags_3, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P1_tags_3)
/sizeof(asn_DEF_ProtocolIE_Container_1544P1_tags_3[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P1_constr_3, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P1_3,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P1_specs_3 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P2_5[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionFailure_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P2_tags_5[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P2_specs_5 = {
sizeof(struct ProtocolIE_Container_1544P2),
offsetof(struct ProtocolIE_Container_1544P2, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P2 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P2_tags_5,
sizeof(asn_DEF_ProtocolIE_Container_1544P2_tags_5)
/sizeof(asn_DEF_ProtocolIE_Container_1544P2_tags_5[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P2_tags_5, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P2_tags_5)
/sizeof(asn_DEF_ProtocolIE_Container_1544P2_tags_5[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P2_constr_5, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P2_5,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P2_specs_5 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P3_7[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionDeleteRequest_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P3_tags_7[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P3_specs_7 = {
sizeof(struct ProtocolIE_Container_1544P3),
offsetof(struct ProtocolIE_Container_1544P3, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P3 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P3_tags_7,
sizeof(asn_DEF_ProtocolIE_Container_1544P3_tags_7)
/sizeof(asn_DEF_ProtocolIE_Container_1544P3_tags_7[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P3_tags_7, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P3_tags_7)
/sizeof(asn_DEF_ProtocolIE_Container_1544P3_tags_7[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P3_constr_7, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P3_7,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P3_specs_7 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P4_9[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionDeleteResponse_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P4_tags_9[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P4_specs_9 = {
sizeof(struct ProtocolIE_Container_1544P4),
offsetof(struct ProtocolIE_Container_1544P4, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P4 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P4_tags_9,
sizeof(asn_DEF_ProtocolIE_Container_1544P4_tags_9)
/sizeof(asn_DEF_ProtocolIE_Container_1544P4_tags_9[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P4_tags_9, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P4_tags_9)
/sizeof(asn_DEF_ProtocolIE_Container_1544P4_tags_9[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P4_constr_9, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P4_9,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P4_specs_9 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P5_11[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICsubscriptionDeleteFailure_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P5_tags_11[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P5_specs_11 = {
sizeof(struct ProtocolIE_Container_1544P5),
offsetof(struct ProtocolIE_Container_1544P5, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P5 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P5_tags_11,
sizeof(asn_DEF_ProtocolIE_Container_1544P5_tags_11)
/sizeof(asn_DEF_ProtocolIE_Container_1544P5_tags_11[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P5_tags_11, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P5_tags_11)
/sizeof(asn_DEF_ProtocolIE_Container_1544P5_tags_11[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P5_constr_11, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P5_11,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P5_specs_11 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P6_13[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICindication_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P6_tags_13[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P6_specs_13 = {
sizeof(struct ProtocolIE_Container_1544P6),
offsetof(struct ProtocolIE_Container_1544P6, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P6 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P6_tags_13,
sizeof(asn_DEF_ProtocolIE_Container_1544P6_tags_13)
/sizeof(asn_DEF_ProtocolIE_Container_1544P6_tags_13[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P6_tags_13, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P6_tags_13)
/sizeof(asn_DEF_ProtocolIE_Container_1544P6_tags_13[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P6_constr_13, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P6_13,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P6_specs_13 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P7_15[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICcontrolRequest_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P7_tags_15[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P7_specs_15 = {
sizeof(struct ProtocolIE_Container_1544P7),
offsetof(struct ProtocolIE_Container_1544P7, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P7 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P7_tags_15,
sizeof(asn_DEF_ProtocolIE_Container_1544P7_tags_15)
/sizeof(asn_DEF_ProtocolIE_Container_1544P7_tags_15[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P7_tags_15, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P7_tags_15)
/sizeof(asn_DEF_ProtocolIE_Container_1544P7_tags_15[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P7_constr_15, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P7_15,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P7_specs_15 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P8_17[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICcontrolAcknowledge_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P8_tags_17[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P8_specs_17 = {
sizeof(struct ProtocolIE_Container_1544P8),
offsetof(struct ProtocolIE_Container_1544P8, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P8 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P8_tags_17,
sizeof(asn_DEF_ProtocolIE_Container_1544P8_tags_17)
/sizeof(asn_DEF_ProtocolIE_Container_1544P8_tags_17[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P8_tags_17, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P8_tags_17)
/sizeof(asn_DEF_ProtocolIE_Container_1544P8_tags_17[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P8_constr_17, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P8_17,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P8_specs_17 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P9_19[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICcontrolFailure_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P9_tags_19[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P9_specs_19 = {
sizeof(struct ProtocolIE_Container_1544P9),
offsetof(struct ProtocolIE_Container_1544P9, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P9 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P9_tags_19,
sizeof(asn_DEF_ProtocolIE_Container_1544P9_tags_19)
/sizeof(asn_DEF_ProtocolIE_Container_1544P9_tags_19[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P9_tags_19, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P9_tags_19)
/sizeof(asn_DEF_ProtocolIE_Container_1544P9_tags_19[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P9_constr_19, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P9_19,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P9_specs_19 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P10_21[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ErrorIndication_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P10_tags_21[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P10_specs_21 = {
sizeof(struct ProtocolIE_Container_1544P10),
offsetof(struct ProtocolIE_Container_1544P10, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P10 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P10_tags_21,
sizeof(asn_DEF_ProtocolIE_Container_1544P10_tags_21)
/sizeof(asn_DEF_ProtocolIE_Container_1544P10_tags_21[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P10_tags_21, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P10_tags_21)
/sizeof(asn_DEF_ProtocolIE_Container_1544P10_tags_21[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P10_constr_21, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P10_21,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P10_specs_21 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P11_23[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_E2setupRequestIEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P11_tags_23[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P11_specs_23 = {
sizeof(struct ProtocolIE_Container_1544P11),
offsetof(struct ProtocolIE_Container_1544P11, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P11 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P11_tags_23,
sizeof(asn_DEF_ProtocolIE_Container_1544P11_tags_23)
/sizeof(asn_DEF_ProtocolIE_Container_1544P11_tags_23[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P11_tags_23, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P11_tags_23)
/sizeof(asn_DEF_ProtocolIE_Container_1544P11_tags_23[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P11_constr_23, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P11_23,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P11_specs_23 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P12_25[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_E2setupResponseIEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P12_tags_25[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P12_specs_25 = {
sizeof(struct ProtocolIE_Container_1544P12),
offsetof(struct ProtocolIE_Container_1544P12, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P12 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P12_tags_25,
sizeof(asn_DEF_ProtocolIE_Container_1544P12_tags_25)
/sizeof(asn_DEF_ProtocolIE_Container_1544P12_tags_25[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P12_tags_25, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P12_tags_25)
/sizeof(asn_DEF_ProtocolIE_Container_1544P12_tags_25[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P12_constr_25, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P12_25,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P12_specs_25 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P13_27[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_E2setupFailureIEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P13_tags_27[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P13_specs_27 = {
sizeof(struct ProtocolIE_Container_1544P13),
offsetof(struct ProtocolIE_Container_1544P13, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P13 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P13_tags_27,
sizeof(asn_DEF_ProtocolIE_Container_1544P13_tags_27)
/sizeof(asn_DEF_ProtocolIE_Container_1544P13_tags_27[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P13_tags_27, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P13_tags_27)
/sizeof(asn_DEF_ProtocolIE_Container_1544P13_tags_27[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P13_constr_27, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P13_27,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P13_specs_27 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P14_29[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ResetRequestIEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P14_tags_29[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P14_specs_29 = {
sizeof(struct ProtocolIE_Container_1544P14),
offsetof(struct ProtocolIE_Container_1544P14, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P14 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P14_tags_29,
sizeof(asn_DEF_ProtocolIE_Container_1544P14_tags_29)
/sizeof(asn_DEF_ProtocolIE_Container_1544P14_tags_29[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P14_tags_29, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P14_tags_29)
/sizeof(asn_DEF_ProtocolIE_Container_1544P14_tags_29[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P14_constr_29, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P14_29,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P14_specs_29 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P15_31[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ResetResponseIEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P15_tags_31[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P15_specs_31 = {
sizeof(struct ProtocolIE_Container_1544P15),
offsetof(struct ProtocolIE_Container_1544P15, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P15 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P15_tags_31,
sizeof(asn_DEF_ProtocolIE_Container_1544P15_tags_31)
/sizeof(asn_DEF_ProtocolIE_Container_1544P15_tags_31[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P15_tags_31, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P15_tags_31)
/sizeof(asn_DEF_ProtocolIE_Container_1544P15_tags_31[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P15_constr_31, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P15_31,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P15_specs_31 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P16_33[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICserviceUpdate_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P16_tags_33[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P16_specs_33 = {
sizeof(struct ProtocolIE_Container_1544P16),
offsetof(struct ProtocolIE_Container_1544P16, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P16 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P16_tags_33,
sizeof(asn_DEF_ProtocolIE_Container_1544P16_tags_33)
/sizeof(asn_DEF_ProtocolIE_Container_1544P16_tags_33[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P16_tags_33, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P16_tags_33)
/sizeof(asn_DEF_ProtocolIE_Container_1544P16_tags_33[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P16_constr_33, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P16_33,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P16_specs_33 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P17_35[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICserviceUpdateAcknowledge_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P17_tags_35[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P17_specs_35 = {
sizeof(struct ProtocolIE_Container_1544P17),
offsetof(struct ProtocolIE_Container_1544P17, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P17 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P17_tags_35,
sizeof(asn_DEF_ProtocolIE_Container_1544P17_tags_35)
/sizeof(asn_DEF_ProtocolIE_Container_1544P17_tags_35[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P17_tags_35, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P17_tags_35)
/sizeof(asn_DEF_ProtocolIE_Container_1544P17_tags_35[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P17_constr_35, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P17_35,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P17_specs_35 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P18_37[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICserviceUpdateFailure_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P18_tags_37[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P18_specs_37 = {
sizeof(struct ProtocolIE_Container_1544P18),
offsetof(struct ProtocolIE_Container_1544P18, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P18 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P18_tags_37,
sizeof(asn_DEF_ProtocolIE_Container_1544P18_tags_37)
/sizeof(asn_DEF_ProtocolIE_Container_1544P18_tags_37[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P18_tags_37, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P18_tags_37)
/sizeof(asn_DEF_ProtocolIE_Container_1544P18_tags_37[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P18_constr_37, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P18_37,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P18_specs_37 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P19_39[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RICserviceQuery_IEs,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
""
},
};
static const ber_tlv_tag_t asn_DEF_ProtocolIE_Container_1544P19_tags_39[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P19_specs_39 = {
sizeof(struct ProtocolIE_Container_1544P19),
offsetof(struct ProtocolIE_Container_1544P19, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P19 = {
"ProtocolIE-Container",
"ProtocolIE-Container",
&asn_OP_SEQUENCE_OF,
asn_DEF_ProtocolIE_Container_1544P19_tags_39,
sizeof(asn_DEF_ProtocolIE_Container_1544P19_tags_39)
/sizeof(asn_DEF_ProtocolIE_Container_1544P19_tags_39[0]), /* 1 */
asn_DEF_ProtocolIE_Container_1544P19_tags_39, /* Same as above */
sizeof(asn_DEF_ProtocolIE_Container_1544P19_tags_39)
/sizeof(asn_DEF_ProtocolIE_Container_1544P19_tags_39[0]), /* 1 */
{ 0, &asn_PER_type_ProtocolIE_Container_1544P19_constr_39, SEQUENCE_OF_constraint },
asn_MBR_ProtocolIE_Container_1544P19_39,
1, /* Single element */
&asn_SPC_ProtocolIE_Container_1544P19_specs_39 /* Additional specs */
};

View File

@@ -0,0 +1,271 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-Containers"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ProtocolIE_Container_H_
#define _ProtocolIE_Container_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 RICsubscriptionRequest_IEs;
struct RICsubscriptionResponse_IEs;
struct RICsubscriptionFailure_IEs;
struct RICsubscriptionDeleteRequest_IEs;
struct RICsubscriptionDeleteResponse_IEs;
struct RICsubscriptionDeleteFailure_IEs;
struct RICindication_IEs;
struct RICcontrolRequest_IEs;
struct RICcontrolAcknowledge_IEs;
struct RICcontrolFailure_IEs;
struct ErrorIndication_IEs;
struct E2setupRequestIEs;
struct E2setupResponseIEs;
struct E2setupFailureIEs;
struct ResetRequestIEs;
struct ResetResponseIEs;
struct RICserviceUpdate_IEs;
struct RICserviceUpdateAcknowledge_IEs;
struct RICserviceUpdateFailure_IEs;
struct RICserviceQuery_IEs;
/* ProtocolIE-Container */
typedef struct ProtocolIE_Container_1544P0 {
A_SEQUENCE_OF(struct RICsubscriptionRequest_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P0_t;
typedef struct ProtocolIE_Container_1544P1 {
A_SEQUENCE_OF(struct RICsubscriptionResponse_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P1_t;
typedef struct ProtocolIE_Container_1544P2 {
A_SEQUENCE_OF(struct RICsubscriptionFailure_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P2_t;
typedef struct ProtocolIE_Container_1544P3 {
A_SEQUENCE_OF(struct RICsubscriptionDeleteRequest_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P3_t;
typedef struct ProtocolIE_Container_1544P4 {
A_SEQUENCE_OF(struct RICsubscriptionDeleteResponse_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P4_t;
typedef struct ProtocolIE_Container_1544P5 {
A_SEQUENCE_OF(struct RICsubscriptionDeleteFailure_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P5_t;
typedef struct ProtocolIE_Container_1544P6 {
A_SEQUENCE_OF(struct RICindication_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P6_t;
typedef struct ProtocolIE_Container_1544P7 {
A_SEQUENCE_OF(struct RICcontrolRequest_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P7_t;
typedef struct ProtocolIE_Container_1544P8 {
A_SEQUENCE_OF(struct RICcontrolAcknowledge_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P8_t;
typedef struct ProtocolIE_Container_1544P9 {
A_SEQUENCE_OF(struct RICcontrolFailure_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P9_t;
typedef struct ProtocolIE_Container_1544P10 {
A_SEQUENCE_OF(struct ErrorIndication_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P10_t;
typedef struct ProtocolIE_Container_1544P11 {
A_SEQUENCE_OF(struct E2setupRequestIEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P11_t;
typedef struct ProtocolIE_Container_1544P12 {
A_SEQUENCE_OF(struct E2setupResponseIEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P12_t;
typedef struct ProtocolIE_Container_1544P13 {
A_SEQUENCE_OF(struct E2setupFailureIEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P13_t;
typedef struct ProtocolIE_Container_1544P14 {
A_SEQUENCE_OF(struct ResetRequestIEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P14_t;
typedef struct ProtocolIE_Container_1544P15 {
A_SEQUENCE_OF(struct ResetResponseIEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P15_t;
typedef struct ProtocolIE_Container_1544P16 {
A_SEQUENCE_OF(struct RICserviceUpdate_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P16_t;
typedef struct ProtocolIE_Container_1544P17 {
A_SEQUENCE_OF(struct RICserviceUpdateAcknowledge_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P17_t;
typedef struct ProtocolIE_Container_1544P18 {
A_SEQUENCE_OF(struct RICserviceUpdateFailure_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P18_t;
typedef struct ProtocolIE_Container_1544P19 {
A_SEQUENCE_OF(struct RICserviceQuery_IEs) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Container_1544P19_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P0;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P0_specs_1;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P0_1[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P0_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P1;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P1_specs_3;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P1_3[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P1_constr_3;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P2;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P2_specs_5;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P2_5[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P2_constr_5;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P3;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P3_specs_7;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P3_7[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P3_constr_7;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P4;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P4_specs_9;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P4_9[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P4_constr_9;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P5;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P5_specs_11;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P5_11[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P5_constr_11;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P6;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P6_specs_13;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P6_13[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P6_constr_13;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P7;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P7_specs_15;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P7_15[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P7_constr_15;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P8;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P8_specs_17;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P8_17[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P8_constr_17;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P9;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P9_specs_19;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P9_19[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P9_constr_19;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P10;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P10_specs_21;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P10_21[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P10_constr_21;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P11;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P11_specs_23;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P11_23[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P11_constr_23;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P12;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P12_specs_25;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P12_25[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P12_constr_25;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P13;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P13_specs_27;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P13_27[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P13_constr_27;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P14;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P14_specs_29;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P14_29[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P14_constr_29;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P15;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P15_specs_31;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P15_31[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P15_constr_31;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P16;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P16_specs_33;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P16_33[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P16_constr_33;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P17;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P17_specs_35;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P17_35[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P17_constr_35;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P18;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P18_specs_37;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P18_37[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P18_constr_37;
extern asn_TYPE_descriptor_t asn_DEF_ProtocolIE_Container_1544P19;
extern asn_SET_OF_specifics_t asn_SPC_ProtocolIE_Container_1544P19_specs_39;
extern asn_TYPE_member_t asn_MBR_ProtocolIE_Container_1544P19_39[1];
extern asn_per_constraints_t asn_PER_type_ProtocolIE_Container_1544P19_constr_39;
#ifdef __cplusplus
}
#endif
#endif /* _ProtocolIE_Container_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,27 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-Containers"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ProtocolIE-ContainerList.h"

View File

@@ -0,0 +1,41 @@
/*
*
* Copyright 2020 AT&T Intellectual Property
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "E2AP-Containers"
* found in "../asnTextFiles/e2ap-v01.00.00.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ProtocolIE_ContainerList_H_
#define _ProtocolIE_ContainerList_H_
#include "asn_application.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /* _ProtocolIE_ContainerList_H_ */
#include "asn_internal.h"

Some files were not shown because too many files have changed in this diff Show More