From 93690184b0f44d1436189d1504409a26dbbe8157 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 17 Dec 2015 23:17:21 +0100 Subject: RANAP: Split FormatInformationParameter / SDUParameterItem The definition of the above data types as per 3GPP specs results in a SEQUENCE_OF() an anonymous structure, which is slightly inconvenient to use. So let's split the SEQUENCE OF part and the actual definition of the item in separate types. --- asn1/ranap/RANAP-IEs.asn | 6 +- src/ranap/Makefile.am | 5 +- .../RANAP_SDU-FormatInformationParameterItem.c | 83 +++++++++++++++++ .../RANAP_SDU-FormatInformationParameterItem.h | 45 +++++++++ src/ranap/RANAP_SDU-FormatInformationParameters.c | 80 +--------------- src/ranap/RANAP_SDU-FormatInformationParameters.h | 18 +--- src/ranap/RANAP_SDU-ParameterItem.c | 103 +++++++++++++++++++++ src/ranap/RANAP_SDU-ParameterItem.h | 49 ++++++++++ src/ranap/RANAP_SDU-Parameters.c | 100 +------------------- src/ranap/RANAP_SDU-Parameters.h | 22 +---- src/ranap_common.h | 2 + 11 files changed, 298 insertions(+), 215 deletions(-) create mode 100644 src/ranap/RANAP_SDU-FormatInformationParameterItem.c create mode 100644 src/ranap/RANAP_SDU-FormatInformationParameterItem.h create mode 100644 src/ranap/RANAP_SDU-ParameterItem.c create mode 100644 src/ranap/RANAP_SDU-ParameterItem.h diff --git a/asn1/ranap/RANAP-IEs.asn b/asn1/ranap/RANAP-IEs.asn index 8d09bee..9593ee8 100644 --- a/asn1/ranap/RANAP-IEs.asn +++ b/asn1/ranap/RANAP-IEs.asn @@ -1745,7 +1745,8 @@ SDU-ErrorRatio ::= SEQUENCE { } -- SDU-ErrorRatio = mantissa * 10^-exponent -SDU-FormatInformationParameters ::= SEQUENCE (SIZE (1..maxRAB-SubflowCombination)) OF +SDU-FormatInformationParameters ::= SEQUENCE (SIZE (1..maxRAB-SubflowCombination)) OF SDU-FormatInformationParameterItem +SDU-FormatInformationParameterItem ::= SEQUENCE { subflowSDU-Size SubflowSDU-Size OPTIONAL, rAB-SubflowCombinationBitRate RAB-SubflowCombinationBitRate OPTIONAL, @@ -1753,7 +1754,8 @@ SDU-FormatInformationParameters ::= SEQUENCE (SIZE (1..maxRAB-SubflowCombination ... } -SDU-Parameters ::= SEQUENCE (SIZE (1..maxRAB-Subflows)) OF +SDU-Parameters ::= SEQUENCE (SIZE (1..maxRAB-Subflows)) OF SDU-ParameterItem +SDU-ParameterItem ::= SEQUENCE { sDU-ErrorRatio SDU-ErrorRatio OPTIONAL -- This IE shall be present if the Delivery Of Erroneous SDU IE is set to "Yes" or "No" --, diff --git a/src/ranap/Makefile.am b/src/ranap/Makefile.am index 4dcc067..d3071e8 100644 --- a/src/ranap/Makefile.am +++ b/src/ranap/Makefile.am @@ -317,7 +317,9 @@ ASN_MODULE_SRC= \ RANAP_SignallingIndication.c \ RANAP_SDU-ErrorRatio.c \ RANAP_SDU-FormatInformationParameters.c \ + RANAP_SDU-FormatInformationParameterItem.c \ RANAP_SDU-Parameters.c \ + RANAP_SDU-ParameterItem.c \ RANAP_SNA-Access-Information.c \ RANAP_SNAC.c \ RANAP_Service-Handover.c \ @@ -896,7 +898,9 @@ ASN_MODULE_INC= \ RANAP_SignallingIndication.h \ RANAP_SDU-ErrorRatio.h \ RANAP_SDU-FormatInformationParameters.h \ + RANAP_SDU-FormatInformationParameterItem.h \ RANAP_SDU-Parameters.h \ + RANAP_SDU-ParameterItem.h \ RANAP_SNA-Access-Information.h \ RANAP_SNAC.h \ RANAP_Service-Handover.h \ @@ -1178,7 +1182,6 @@ regenerate-from-asn1-source: sed -i 's/Member/MemberF/' RANAP_JoinedMBMSBearerService-IEs.[ch] sed -i 's/Member/MemberG/' RANAP_CriticalityDiagnostics-IE-List.[ch] sed -i 's/Member/MemberH/' RANAP_DataVolumeList.[ch] - sed -i 's/Member/MemberI/' RANAP_SDU-Parameters.[ch] sed -i 's/Member/MemberJ/' RANAP_EUTRANFrequencies.[ch] sed -i 's/Member/MemberK/' RANAP_LeftMBMSBearerService-IEs.[ch] sed -i 's/Member/MemberL/' RANAP_MessageStructure.[ch] diff --git a/src/ranap/RANAP_SDU-FormatInformationParameterItem.c b/src/ranap/RANAP_SDU-FormatInformationParameterItem.c new file mode 100644 index 0000000..49a0e6b --- /dev/null +++ b/src/ranap/RANAP_SDU-FormatInformationParameterItem.c @@ -0,0 +1,83 @@ +/* + * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) + * From ASN.1 module "RANAP-IEs" + * found in "../../asn1/ranap/RANAP-IEs.asn" + */ + +#include "RANAP_SDU-FormatInformationParameterItem.h" + +static asn_TYPE_member_t asn_MBR_RANAP_SDU_FormatInformationParameterItem_1[] = { + { ATF_POINTER, 3, offsetof(struct RANAP_SDU_FormatInformationParameterItem, subflowSDU_Size), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_SubflowSDU_Size, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "subflowSDU-Size" + }, + { ATF_POINTER, 2, offsetof(struct RANAP_SDU_FormatInformationParameterItem, rAB_SubflowCombinationBitRate), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_RAB_SubflowCombinationBitRate, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "rAB-SubflowCombinationBitRate" + }, + { ATF_POINTER, 1, offsetof(struct RANAP_SDU_FormatInformationParameterItem, iE_Extensions), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_IE_Extensions, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "iE-Extensions" + }, +}; +static const int asn_MAP_RANAP_SDU_FormatInformationParameterItem_oms_1[] = { 0, 1, 2 }; +static const ber_tlv_tag_t asn_DEF_RANAP_SDU_FormatInformationParameterItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANAP_SDU_FormatInformationParameterItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* subflowSDU-Size */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rAB-SubflowCombinationBitRate */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RANAP_SDU_FormatInformationParameterItem_specs_1 = { + sizeof(struct RANAP_SDU_FormatInformationParameterItem), + offsetof(struct RANAP_SDU_FormatInformationParameterItem, _asn_ctx), + asn_MAP_RANAP_SDU_FormatInformationParameterItem_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_RANAP_SDU_FormatInformationParameterItem_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + 2, /* Start extensions */ + 4 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_RANAP_SDU_FormatInformationParameterItem = { + "RANAP_SDU-FormatInformationParameterItem", + "RANAP_SDU-FormatInformationParameterItem", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + SEQUENCE_decode_uper, + SEQUENCE_encode_uper, + SEQUENCE_decode_aper, + SEQUENCE_encode_aper, + 0, /* Use generic outmost tag fetcher */ + asn_DEF_RANAP_SDU_FormatInformationParameterItem_tags_1, + sizeof(asn_DEF_RANAP_SDU_FormatInformationParameterItem_tags_1) + /sizeof(asn_DEF_RANAP_SDU_FormatInformationParameterItem_tags_1[0]), /* 1 */ + asn_DEF_RANAP_SDU_FormatInformationParameterItem_tags_1, /* Same as above */ + sizeof(asn_DEF_RANAP_SDU_FormatInformationParameterItem_tags_1) + /sizeof(asn_DEF_RANAP_SDU_FormatInformationParameterItem_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_RANAP_SDU_FormatInformationParameterItem_1, + 3, /* Elements count */ + &asn_SPC_RANAP_SDU_FormatInformationParameterItem_specs_1 /* Additional specs */ +}; + diff --git a/src/ranap/RANAP_SDU-FormatInformationParameterItem.h b/src/ranap/RANAP_SDU-FormatInformationParameterItem.h new file mode 100644 index 0000000..a7e3dc7 --- /dev/null +++ b/src/ranap/RANAP_SDU-FormatInformationParameterItem.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) + * From ASN.1 module "RANAP-IEs" + * found in "../../asn1/ranap/RANAP-IEs.asn" + */ + +#ifndef _RANAP_SDU_FormatInformationParameterItem_H_ +#define _RANAP_SDU_FormatInformationParameterItem_H_ + + +#include + +/* Including external dependencies */ +#include "RANAP_SubflowSDU-Size.h" +#include "RANAP_RAB-SubflowCombinationBitRate.h" +#include "RANAP_IE-Extensions.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANAP_SDU-FormatInformationParameterItem */ +typedef struct RANAP_SDU_FormatInformationParameterItem { + RANAP_SubflowSDU_Size_t *subflowSDU_Size /* OPTIONAL */; + RANAP_RAB_SubflowCombinationBitRate_t *rAB_SubflowCombinationBitRate /* OPTIONAL */; + RANAP_IE_Extensions_t *iE_Extensions /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANAP_SDU_FormatInformationParameterItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANAP_SDU_FormatInformationParameterItem; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANAP_SDU_FormatInformationParameterItem_H_ */ +#include diff --git a/src/ranap/RANAP_SDU-FormatInformationParameters.c b/src/ranap/RANAP_SDU-FormatInformationParameters.c index 61713f0..ae9f605 100644 --- a/src/ranap/RANAP_SDU-FormatInformationParameters.c +++ b/src/ranap/RANAP_SDU-FormatInformationParameters.c @@ -11,87 +11,11 @@ static asn_per_constraints_t asn_PER_type_RANAP_SDU_FormatInformationParameters_ { APC_CONSTRAINED, 6, 6, 1l, 64l } /* (SIZE(1..64)) */, 0, 0 /* No PER value map */ }; -static asn_TYPE_member_t asn_MBR_MemberE_2[] = { - { ATF_POINTER, 3, offsetof(struct MemberE, subflowSDU_Size), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_SubflowSDU_Size, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "subflowSDU-Size" - }, - { ATF_POINTER, 2, offsetof(struct MemberE, rAB_SubflowCombinationBitRate), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_RAB_SubflowCombinationBitRate, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "rAB-SubflowCombinationBitRate" - }, - { ATF_POINTER, 1, offsetof(struct MemberE, iE_Extensions), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_IE_Extensions, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "iE-Extensions" - }, -}; -static const int asn_MAP_MemberE_oms_2[] = { 0, 1, 2 }; -static const ber_tlv_tag_t asn_DEF_MemberE_tags_2[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_MemberE_tag2el_2[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* subflowSDU-Size */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rAB-SubflowCombinationBitRate */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_MemberE_specs_2 = { - sizeof(struct MemberE), - offsetof(struct MemberE, _asn_ctx), - asn_MAP_MemberE_tag2el_2, - 3, /* Count of tags in the map */ - asn_MAP_MemberE_oms_2, /* Optional members */ - 3, 0, /* Root/Additions */ - 2, /* Start extensions */ - 4 /* Stop extensions */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_MemberE_2 = { - "SEQUENCE", - "SEQUENCE", - SEQUENCE_free, - SEQUENCE_print, - SEQUENCE_constraint, - SEQUENCE_decode_ber, - SEQUENCE_encode_der, - SEQUENCE_decode_xer, - SEQUENCE_encode_xer, - SEQUENCE_decode_uper, - SEQUENCE_encode_uper, - SEQUENCE_decode_aper, - SEQUENCE_encode_aper, - 0, /* Use generic outmost tag fetcher */ - asn_DEF_MemberE_tags_2, - sizeof(asn_DEF_MemberE_tags_2) - /sizeof(asn_DEF_MemberE_tags_2[0]), /* 1 */ - asn_DEF_MemberE_tags_2, /* Same as above */ - sizeof(asn_DEF_MemberE_tags_2) - /sizeof(asn_DEF_MemberE_tags_2[0]), /* 1 */ - 0, /* No PER visible constraints */ - asn_MBR_MemberE_2, - 3, /* Elements count */ - &asn_SPC_MemberE_specs_2 /* Additional specs */ -}; - static asn_TYPE_member_t asn_MBR_RANAP_SDU_FormatInformationParameters_1[] = { { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + -1 /* Ambiguous tag (CHOICE?) */, 0, - &asn_DEF_MemberE_2, + &asn_DEF_RANAP_SDU_FormatInformationParameterItem, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, diff --git a/src/ranap/RANAP_SDU-FormatInformationParameters.h b/src/ranap/RANAP_SDU-FormatInformationParameters.h index e3bdd31..b1b0a27 100644 --- a/src/ranap/RANAP_SDU-FormatInformationParameters.h +++ b/src/ranap/RANAP_SDU-FormatInformationParameters.h @@ -11,11 +11,8 @@ #include /* Including external dependencies */ +#include "RANAP_SDU-FormatInformationParameterItem.h" #include -#include "RANAP_SubflowSDU-Size.h" -#include "RANAP_RAB-SubflowCombinationBitRate.h" -#include "RANAP_IE-Extensions.h" -#include #include #ifdef __cplusplus @@ -24,18 +21,7 @@ extern "C" { /* RANAP_SDU-FormatInformationParameters */ typedef struct RANAP_SDU_FormatInformationParameters { - A_SEQUENCE_OF(struct MemberE { - RANAP_SubflowSDU_Size_t *subflowSDU_Size /* OPTIONAL */; - RANAP_RAB_SubflowCombinationBitRate_t *rAB_SubflowCombinationBitRate /* OPTIONAL */; - RANAP_IE_Extensions_t *iE_Extensions /* OPTIONAL */; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } ) list; + A_SEQUENCE_OF(RANAP_SDU_FormatInformationParameterItem_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; diff --git a/src/ranap/RANAP_SDU-ParameterItem.c b/src/ranap/RANAP_SDU-ParameterItem.c new file mode 100644 index 0000000..8dda924 --- /dev/null +++ b/src/ranap/RANAP_SDU-ParameterItem.c @@ -0,0 +1,103 @@ +/* + * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) + * From ASN.1 module "RANAP-IEs" + * found in "../../asn1/ranap/RANAP-IEs.asn" + */ + +#include "RANAP_SDU-ParameterItem.h" + +static asn_TYPE_member_t asn_MBR_RANAP_SDU_ParameterItem_1[] = { + { ATF_POINTER, 1, offsetof(struct RANAP_SDU_ParameterItem, sDU_ErrorRatio), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_SDU_ErrorRatio, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "sDU-ErrorRatio" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANAP_SDU_ParameterItem, residualBitErrorRatio), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_ResidualBitErrorRatio, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "residualBitErrorRatio" + }, + { ATF_NOFLAGS, 0, offsetof(struct RANAP_SDU_ParameterItem, deliveryOfErroneousSDU), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_DeliveryOfErroneousSDU, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "deliveryOfErroneousSDU" + }, + { ATF_POINTER, 2, offsetof(struct RANAP_SDU_ParameterItem, sDU_FormatInformationParameters), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_SDU_FormatInformationParameters, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "sDU-FormatInformationParameters" + }, + { ATF_POINTER, 1, offsetof(struct RANAP_SDU_ParameterItem, iE_Extensions), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_RANAP_IE_Extensions, + 0, /* Defer constraints checking to the member type */ + 0, /* No PER visible constraints */ + 0, + "iE-Extensions" + }, +}; +static const int asn_MAP_RANAP_SDU_ParameterItem_oms_1[] = { 0, 3, 4 }; +static const ber_tlv_tag_t asn_DEF_RANAP_SDU_ParameterItem_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_RANAP_SDU_ParameterItem_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sDU-ErrorRatio */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* residualBitErrorRatio */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* deliveryOfErroneousSDU */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sDU-FormatInformationParameters */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RANAP_SDU_ParameterItem_specs_1 = { + sizeof(struct RANAP_SDU_ParameterItem), + offsetof(struct RANAP_SDU_ParameterItem, _asn_ctx), + asn_MAP_RANAP_SDU_ParameterItem_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_RANAP_SDU_ParameterItem_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + 4, /* Start extensions */ + 6 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_RANAP_SDU_ParameterItem = { + "RANAP_SDU-ParameterItem", + "RANAP_SDU-ParameterItem", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + SEQUENCE_decode_uper, + SEQUENCE_encode_uper, + SEQUENCE_decode_aper, + SEQUENCE_encode_aper, + 0, /* Use generic outmost tag fetcher */ + asn_DEF_RANAP_SDU_ParameterItem_tags_1, + sizeof(asn_DEF_RANAP_SDU_ParameterItem_tags_1) + /sizeof(asn_DEF_RANAP_SDU_ParameterItem_tags_1[0]), /* 1 */ + asn_DEF_RANAP_SDU_ParameterItem_tags_1, /* Same as above */ + sizeof(asn_DEF_RANAP_SDU_ParameterItem_tags_1) + /sizeof(asn_DEF_RANAP_SDU_ParameterItem_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_RANAP_SDU_ParameterItem_1, + 5, /* Elements count */ + &asn_SPC_RANAP_SDU_ParameterItem_specs_1 /* Additional specs */ +}; + diff --git a/src/ranap/RANAP_SDU-ParameterItem.h b/src/ranap/RANAP_SDU-ParameterItem.h new file mode 100644 index 0000000..e3f69ee --- /dev/null +++ b/src/ranap/RANAP_SDU-ParameterItem.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) + * From ASN.1 module "RANAP-IEs" + * found in "../../asn1/ranap/RANAP-IEs.asn" + */ + +#ifndef _RANAP_SDU_ParameterItem_H_ +#define _RANAP_SDU_ParameterItem_H_ + + +#include + +/* Including external dependencies */ +#include "RANAP_SDU-ErrorRatio.h" +#include "RANAP_ResidualBitErrorRatio.h" +#include "RANAP_DeliveryOfErroneousSDU.h" +#include "RANAP_SDU-FormatInformationParameters.h" +#include "RANAP_IE-Extensions.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RANAP_SDU-ParameterItem */ +typedef struct RANAP_SDU_ParameterItem { + RANAP_SDU_ErrorRatio_t *sDU_ErrorRatio /* OPTIONAL */; + RANAP_ResidualBitErrorRatio_t residualBitErrorRatio; + RANAP_DeliveryOfErroneousSDU_t deliveryOfErroneousSDU; + RANAP_SDU_FormatInformationParameters_t *sDU_FormatInformationParameters /* OPTIONAL */; + RANAP_IE_Extensions_t *iE_Extensions /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RANAP_SDU_ParameterItem_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RANAP_SDU_ParameterItem; + +#ifdef __cplusplus +} +#endif + +#endif /* _RANAP_SDU_ParameterItem_H_ */ +#include diff --git a/src/ranap/RANAP_SDU-Parameters.c b/src/ranap/RANAP_SDU-Parameters.c index 1808c88..aad53f8 100644 --- a/src/ranap/RANAP_SDU-Parameters.c +++ b/src/ranap/RANAP_SDU-Parameters.c @@ -11,107 +11,11 @@ static asn_per_constraints_t asn_PER_type_RANAP_SDU_Parameters_constr_1 GCC_NOTU { APC_CONSTRAINED, 3, 3, 1l, 7l } /* (SIZE(1..7)) */, 0, 0 /* No PER value map */ }; -static asn_TYPE_member_t asn_MBR_MemberI_2[] = { - { ATF_POINTER, 1, offsetof(struct MemberI, sDU_ErrorRatio), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_SDU_ErrorRatio, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "sDU-ErrorRatio" - }, - { ATF_NOFLAGS, 0, offsetof(struct MemberI, residualBitErrorRatio), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_ResidualBitErrorRatio, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "residualBitErrorRatio" - }, - { ATF_NOFLAGS, 0, offsetof(struct MemberI, deliveryOfErroneousSDU), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_DeliveryOfErroneousSDU, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "deliveryOfErroneousSDU" - }, - { ATF_POINTER, 2, offsetof(struct MemberI, sDU_FormatInformationParameters), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_SDU_FormatInformationParameters, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "sDU-FormatInformationParameters" - }, - { ATF_POINTER, 1, offsetof(struct MemberI, iE_Extensions), - (ASN_TAG_CLASS_CONTEXT | (4 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RANAP_IE_Extensions, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "iE-Extensions" - }, -}; -static const int asn_MAP_MemberI_oms_2[] = { 0, 3, 4 }; -static const ber_tlv_tag_t asn_DEF_MemberI_tags_2[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_MemberI_tag2el_2[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sDU-ErrorRatio */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* residualBitErrorRatio */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* deliveryOfErroneousSDU */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sDU-FormatInformationParameters */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_MemberI_specs_2 = { - sizeof(struct MemberI), - offsetof(struct MemberI, _asn_ctx), - asn_MAP_MemberI_tag2el_2, - 5, /* Count of tags in the map */ - asn_MAP_MemberI_oms_2, /* Optional members */ - 3, 0, /* Root/Additions */ - 4, /* Start extensions */ - 6 /* Stop extensions */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_MemberI_2 = { - "SEQUENCE", - "SEQUENCE", - SEQUENCE_free, - SEQUENCE_print, - SEQUENCE_constraint, - SEQUENCE_decode_ber, - SEQUENCE_encode_der, - SEQUENCE_decode_xer, - SEQUENCE_encode_xer, - SEQUENCE_decode_uper, - SEQUENCE_encode_uper, - SEQUENCE_decode_aper, - SEQUENCE_encode_aper, - 0, /* Use generic outmost tag fetcher */ - asn_DEF_MemberI_tags_2, - sizeof(asn_DEF_MemberI_tags_2) - /sizeof(asn_DEF_MemberI_tags_2[0]), /* 1 */ - asn_DEF_MemberI_tags_2, /* Same as above */ - sizeof(asn_DEF_MemberI_tags_2) - /sizeof(asn_DEF_MemberI_tags_2[0]), /* 1 */ - 0, /* No PER visible constraints */ - asn_MBR_MemberI_2, - 5, /* Elements count */ - &asn_SPC_MemberI_specs_2 /* Additional specs */ -}; - static asn_TYPE_member_t asn_MBR_RANAP_SDU_Parameters_1[] = { { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + -1 /* Ambiguous tag (CHOICE?) */, 0, - &asn_DEF_MemberI_2, + &asn_DEF_RANAP_SDU_ParameterItem, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, diff --git a/src/ranap/RANAP_SDU-Parameters.h b/src/ranap/RANAP_SDU-Parameters.h index 818cb2e..5b3f765 100644 --- a/src/ranap/RANAP_SDU-Parameters.h +++ b/src/ranap/RANAP_SDU-Parameters.h @@ -11,13 +11,8 @@ #include /* Including external dependencies */ +#include "RANAP_SDU-ParameterItem.h" #include -#include "RANAP_SDU-ErrorRatio.h" -#include "RANAP_ResidualBitErrorRatio.h" -#include "RANAP_DeliveryOfErroneousSDU.h" -#include "RANAP_SDU-FormatInformationParameters.h" -#include "RANAP_IE-Extensions.h" -#include #include #ifdef __cplusplus @@ -26,20 +21,7 @@ extern "C" { /* RANAP_SDU-Parameters */ typedef struct RANAP_SDU_Parameters { - A_SEQUENCE_OF(struct MemberI { - RANAP_SDU_ErrorRatio_t *sDU_ErrorRatio /* OPTIONAL */; - RANAP_ResidualBitErrorRatio_t residualBitErrorRatio; - RANAP_DeliveryOfErroneousSDU_t deliveryOfErroneousSDU; - RANAP_SDU_FormatInformationParameters_t *sDU_FormatInformationParameters /* OPTIONAL */; - RANAP_IE_Extensions_t *iE_Extensions /* OPTIONAL */; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } ) list; + A_SEQUENCE_OF(RANAP_SDU_ParameterItem_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; diff --git a/src/ranap_common.h b/src/ranap_common.h index 599d912..9c1945f 100644 --- a/src/ranap_common.h +++ b/src/ranap_common.h @@ -475,7 +475,9 @@ #include "ranap/RANAP_SAPI.h" #include "ranap/RANAP_SDU-ErrorRatio.h" #include "ranap/RANAP_SDU-FormatInformationParameters.h" +#include "ranap/RANAP_SDU-FormatInformationParameterItem.h" #include "ranap/RANAP_SDU-Parameters.h" +#include "ranap/RANAP_SDU-ParameterItem.h" #include "ranap/RANAP_SNA-Access-Information.h" #include "ranap/RANAP_SNAC.h" #include "ranap/RANAP_SRB-ID.h" -- cgit v1.2.3