2020-07-09 20:43:56 +00:00
|
|
|
Use mounse07410(vlm_master) git's fork for asn1c
|
2021-01-25 04:43:42 +00:00
|
|
|
|
2023-02-21 12:48:06 +00:00
|
|
|
commit ebed802c88b3049cfe67326e4df780cefc6da49e (HEAD -> vlm_master, origin/vlm_master, origin/HEAD)
|
|
|
|
Author: Leith Bade <leith@swiftnav.com>
|
|
|
|
Date: Mon Nov 14 20:28:25 2022 +1100
|
2022-02-26 07:09:38 +00:00
|
|
|
|
2023-02-21 12:48:06 +00:00
|
|
|
Check SEQUENCE field constraint check result instead of returning
|
2021-01-25 04:43:42 +00:00
|
|
|
|
2018-03-04 07:30:03 +00:00
|
|
|
===========================================
|
2020-05-23 02:24:48 +00:00
|
|
|
user@host ~/Documents/git/my$ \
|
2020-07-09 20:43:56 +00:00
|
|
|
git clone https://github.com/mouse07410/asn1c.git
|
2020-05-23 02:24:48 +00:00
|
|
|
user@host ~/Documents/git/my$ \
|
2023-02-21 12:48:06 +00:00
|
|
|
git checkout ebed802c88b3049cfe67326e4df780cefc6da49e
|
2020-07-09 20:43:56 +00:00
|
|
|
|
|
|
|
OR
|
|
|
|
|
|
|
|
user@host ~/Documents/git/my$ \
|
|
|
|
git clone https://github.com/open5gs/asn1c.git
|
|
|
|
|
2020-05-23 02:24:48 +00:00
|
|
|
user@host Documents/git/my/asn1c$ \
|
|
|
|
autoreconf -fi;./configure;make -j4
|
2018-03-04 07:30:03 +00:00
|
|
|
|
2023-02-21 12:48:06 +00:00
|
|
|
Modify 36413-h30.txt to 36413-h30.asn
|
|
|
|
===========================================
|
|
|
|
user@host ~/documents/git/open5gs/lib/asn1c/support/s1ap-r17.3.0$ \
|
|
|
|
diff 36413-h30.txt 36413-h30.asn
|
|
|
|
|
|
|
|
Modify 38413-h30.txt to 38413-h30.asn
|
2020-07-01 04:22:55 +00:00
|
|
|
===========================================
|
2023-02-21 12:48:06 +00:00
|
|
|
user@host ~/documents/git/open5gs/lib/asn1c/support/ngap-r17.3.0$ \
|
|
|
|
diff 38413-h30.txt 38413-h30.asn
|
2020-07-01 04:22:55 +00:00
|
|
|
|
2018-03-04 07:30:03 +00:00
|
|
|
ASN.1 encoder/decoder
|
|
|
|
===========================================
|
2020-07-01 04:22:55 +00:00
|
|
|
user@host ~/documents/git/open5gs/lib/asn1c/s1ap$ \
|
2020-05-23 02:24:48 +00:00
|
|
|
ASN1C_PREFIX=S1AP_ ../../../../my/asn1c/asn1c/asn1c -pdu=all \
|
2018-03-04 07:30:03 +00:00
|
|
|
-fcompound-names -findirect-choice -fno-include-deps \
|
2021-01-25 04:43:42 +00:00
|
|
|
-no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER \
|
2023-02-21 12:48:06 +00:00
|
|
|
../support/s1ap-r17.3.0/36413-h30.asn
|
2018-03-04 07:30:03 +00:00
|
|
|
|
2020-07-01 04:22:55 +00:00
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/ngap$ \
|
2020-05-23 02:24:48 +00:00
|
|
|
ASN1C_PREFIX=NGAP_ ../../../../my/asn1c/asn1c/asn1c -pdu=all \
|
|
|
|
-fcompound-names -findirect-choice -fno-include-deps \
|
2021-01-25 04:43:42 +00:00
|
|
|
-no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER \
|
2023-02-21 12:48:06 +00:00
|
|
|
../support/ngap-r17.3.0/38413-h30.asn
|
2020-07-01 04:22:55 +00:00
|
|
|
|
2022-07-16 05:30:00 +00:00
|
|
|
Fix NGAP_RANNodeNameUTF8String.c (Issues #994 - APC_EXTENSIBLE)
|
|
|
|
===============================================================
|
2021-05-14 07:46:08 +00:00
|
|
|
diff --git a/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c b/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c
|
|
|
|
index 9e469f7f..79ebd028 100644
|
|
|
|
--- a/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c
|
|
|
|
+++ b/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c
|
|
|
|
@@ -46,7 +46,11 @@ NGAP_RANNodeNameUTF8String_constraint(const asn_TYPE_descriptor_t *td, const voi
|
|
|
|
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
|
|
|
asn_per_constraints_t asn_PER_type_NGAP_RANNodeNameUTF8String_constr_1 CC_NOTUSED = {
|
|
|
|
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
|
|
|
|
+#if 0 /* modified by acetcom */
|
|
|
|
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
|
|
|
|
+#else
|
|
|
|
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */,
|
|
|
|
+#endif
|
|
|
|
0, 0 /* No PER value map */
|
|
|
|
};
|
|
|
|
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
|
2022-07-16 05:30:00 +00:00
|
|
|
|
|
|
|
Fix NGAP_AMFNameUTF8String.c (Issues #994 - APC_EXTENSIBLE)
|
|
|
|
===============================================================
|
2021-05-14 07:46:08 +00:00
|
|
|
diff --git a/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c b/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c
|
|
|
|
index 1df33a4d..a74f97ea 100644
|
|
|
|
--- a/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c
|
|
|
|
+++ b/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c
|
|
|
|
@@ -46,7 +46,11 @@ NGAP_AMFNameUTF8String_constraint(const asn_TYPE_descriptor_t *td, const void *s
|
|
|
|
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
|
|
|
asn_per_constraints_t asn_PER_type_NGAP_AMFNameUTF8String_constr_1 CC_NOTUSED = {
|
|
|
|
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
|
|
|
|
+#if 0 /* modified by acetcom */
|
|
|
|
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
|
|
|
|
+#else
|
|
|
|
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */,
|
|
|
|
+#endif
|
|
|
|
0, 0 /* No PER value map */
|
|
|
|
};
|
|
|
|
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
|
2021-02-02 18:33:09 +00:00
|
|
|
|
2023-03-01 08:50:25 +00:00
|
|
|
Check ExtIEs in ProtocolExtensionContainer
|
|
|
|
==========================================
|
|
|
|
diff --git a/src/smf/ngap-build.c b/src/smf/ngap-build.c
|
|
|
|
index 9554be276..051cb6e8a 100644
|
|
|
|
--- a/src/smf/ngap-build.c
|
|
|
|
+++ b/src/smf/ngap-build.c
|
|
|
|
@@ -180,13 +180,13 @@ ogs_pkbuf_t *ngap_build_pdu_session_resource_setup_request_transfer(
|
|
|
|
|
|
|
|
if (smf_self()->security_indication.
|
|
|
|
maximum_integrity_protected_data_rate_downlink) {
|
|
|
|
- NGAP_ProtocolExtensionContainer_9625P229_t *extContainer = NULL;
|
|
|
|
+ NGAP_ProtocolExtensionContainer_11905P297_t *extContainer = NULL;
|
|
|
|
NGAP_SecurityIndication_ExtIEs_t *extIe = NULL;
|
|
|
|
NGAP_MaximumIntegrityProtectedDataRate_t
|
|
|
|
*MaximumIntegrityProtectedDataRate = NULL;
|
|
|
|
|
|
|
|
extContainer = CALLOC(1,
|
|
|
|
- sizeof(NGAP_ProtocolExtensionContainer_9625P229_t));
|
|
|
|
+ sizeof(NGAP_ProtocolExtensionContainer_11905P297_t));
|
|
|
|
ogs_assert(extContainer);
|
|
|
|
SecurityIndication->iE_Extensions =
|
|
|
|
(struct NGAP_ProtocolExtensionContainer *)extContainer;
|
|
|
|
|
2020-05-23 02:24:48 +00:00
|
|
|
Check common file
|
2018-03-04 07:30:03 +00:00
|
|
|
===========================================
|
2020-05-23 02:24:48 +00:00
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/common$ \
|
2018-03-04 07:30:03 +00:00
|
|
|
git diff asn_internal.h
|
2021-02-02 18:33:09 +00:00
|
|
|
diff --git a/lib/asn1c/common/asn_internal.h b/lib/asn1c/common/asn_internal.h
|
2022-02-26 07:09:38 +00:00
|
|
|
diff -u asn_internal.h ~/asn_internal.h
|
|
|
|
--- asn_internal.h 2022-02-26 15:48:33.431509100 +0900
|
|
|
|
+++ /home/acetcom/asn_internal.h 2022-02-26 15:43:00.890972555 +0900
|
|
|
|
@@ -34,10 +34,53 @@
|
|
|
|
#define ASN1C_ENVIRONMENT_VERSION 923 /* Compile-time version */
|
|
|
|
int get_asn1c_environment_version(void); /* Run-time version */
|
2021-02-02 18:33:09 +00:00
|
|
|
|
|
|
|
+#if 0 /* modified by acetcom */
|
2022-02-26 07:09:38 +00:00
|
|
|
#define CALLOC(nmemb, size) calloc(nmemb, size)
|
|
|
|
#define MALLOC(size) malloc(size)
|
|
|
|
#define REALLOC(oldptr, size) realloc(oldptr, size)
|
|
|
|
#define FREEMEM(ptr) free(ptr)
|
2021-02-02 18:33:09 +00:00
|
|
|
+#else
|
2022-02-26 07:09:38 +00:00
|
|
|
+#include "ogs-core.h"
|
|
|
|
+
|
|
|
|
+static ogs_inline void *ogs_asn_malloc(size_t size, const char *file_line)
|
|
|
|
+{
|
|
|
|
+ void *ptr = ogs_malloc(size);
|
|
|
|
+ if (!ptr) {
|
|
|
|
+ ogs_fatal("asn_malloc() failed in `%s`", file_line);
|
|
|
|
+ ogs_assert_if_reached();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ptr;
|
|
|
|
+}
|
|
|
|
+static ogs_inline void *ogs_asn_calloc(
|
|
|
|
+ size_t nmemb, size_t size, const char *file_line)
|
|
|
|
+{
|
|
|
|
+ void *ptr = ogs_calloc(nmemb, size);
|
|
|
|
+ if (!ptr) {
|
|
|
|
+ ogs_fatal("asn_calloc() failed in `%s`", file_line);
|
|
|
|
+ ogs_assert_if_reached();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ptr;
|
|
|
|
+}
|
|
|
|
+static ogs_inline void *ogs_asn_realloc(
|
|
|
|
+ void *oldptr, size_t size, const char *file_line)
|
|
|
|
+{
|
|
|
|
+ void *ptr = ogs_realloc(oldptr, size);
|
|
|
|
+ if (!ptr) {
|
|
|
|
+ ogs_fatal("asn_realloc() failed in `%s`", file_line);
|
|
|
|
+ ogs_assert_if_reached();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return ptr;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#define CALLOC(nmemb, size) ogs_asn_calloc(nmemb, size, OGS_FILE_LINE)
|
|
|
|
+#define MALLOC(size) ogs_asn_malloc(size, OGS_FILE_LINE)
|
|
|
|
+#define REALLOC(oldptr, size) ogs_asn_realloc(oldptr, size, OGS_FILE_LINE)
|
|
|
|
+#define FREEMEM(ptr) ogs_free(ptr)
|
|
|
|
+
|
2021-02-02 18:33:09 +00:00
|
|
|
+#endif
|
|
|
|
|
|
|
|
#define asn_debug_indent 0
|
|
|
|
#define ASN_DEBUG_INDENT_ADD(i) do{}while(0)
|
2018-03-04 07:30:03 +00:00
|
|
|
|
2020-05-23 02:24:48 +00:00
|
|
|
Check meson.build
|
|
|
|
===========================================
|
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/s1ap$ \
|
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/ngap$ \
|
|
|
|
cat Makefile.am.libasncodec
|
|
|
|
|
2018-03-04 07:30:03 +00:00
|
|
|
Remove unnecessary files
|
|
|
|
===========================================
|
2020-05-23 02:24:48 +00:00
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/s1ap$ \
|
2018-03-04 07:30:03 +00:00
|
|
|
rm -f S1AP_E-RAB-IE-ContainerPairList.c \
|
|
|
|
S1AP_ProtocolError-IE-ContainerList.c \
|
|
|
|
S1AP_ProtocolIE-ContainerPair.c S1AP_ProtocolIE-FieldPair.c \
|
|
|
|
S1AP_ProtocolIE-ContainerPairList.c
|
|
|
|
|
2020-05-23 02:24:48 +00:00
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/ngap$ \
|
|
|
|
rm -f NGAP_ProtocolIE-ContainerPair.c NGAP_ProtocolIE-FieldPair.c \
|
2020-07-09 20:43:56 +00:00
|
|
|
NGAP_ProtocolIE-ContainerPairList.c \
|
|
|
|
NGAP_ProtocolIE-ContainerPair.h NGAP_ProtocolIE-ContainerPairList.h \
|
|
|
|
NGAP_ProtocolIE-FieldPair.h
|
2020-05-23 02:24:48 +00:00
|
|
|
|
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/s1ap$ \
|
2018-03-04 07:30:03 +00:00
|
|
|
rm -f Makefile.am.asn1convert Makefile.am.libasncodec
|
|
|
|
|
2020-05-23 02:24:48 +00:00
|
|
|
user@host ~/Documents/git/open5gs/lib/asn1c/s1ap$ \
|
2018-03-04 07:30:03 +00:00
|
|
|
rm -f converter-example.mk converter-example.c pdu_collection.c
|