Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libosmo-asn1-tcap for 
openSUSE:Factory checked in at 2026-08-27 18:51:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libosmo-asn1-tcap (Old)
 and      /work/SRC/openSUSE:Factory/.libosmo-asn1-tcap.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libosmo-asn1-tcap"

Thu Aug 27 18:51:56 2026 rev:3 rq:1373886 version:0.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libosmo-asn1-tcap/libosmo-asn1-tcap.changes      
2026-03-15 14:33:12.577469362 +0100
+++ 
/work/SRC/openSUSE:Factory/.libosmo-asn1-tcap.new.1265/libosmo-asn1-tcap.changes
    2026-08-27 18:55:20.999903989 +0200
@@ -1,0 +2,6 @@
+Wed Aug 26 19:19:36 UTC 2026 - Jan Engelhardt <[email protected]>
+
+- Update to release 0.3.0
+  * Introduce API osmo_asn1_tcap_TCMessage_decode()
+
+-------------------------------------------------------------------

Old:
----
  libosmo-asn1-tcap-0.2.1.tar.bz2

New:
----
  libosmo-asn1-tcap-0.3.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libosmo-asn1-tcap.spec ++++++
--- /var/tmp/diff_new_pack.xxWehy/_old  2026-08-27 18:55:21.960937541 +0200
+++ /var/tmp/diff_new_pack.xxWehy/_new  2026-08-27 18:55:21.963937646 +0200
@@ -19,7 +19,7 @@
 %define _lto_cflags %nil
 Name:           libosmo-asn1-tcap
 %define lname   libosmo-asn1-tcap1
-Version:        0.2.1
+Version:        0.3.0
 Release:        0
 Summary:        ASN.1 library for parsing the TCAP protocol (SS7)
 License:        GPL-2.0-or-later
@@ -33,6 +33,7 @@
 BuildRequires:  automake
 BuildRequires:  libtool >= 2
 BuildRequires:  pkg-config >= 0.20
+BuildRequires:  pkgconfig(talloc) >= 2.1.0
 
 %description
 A TCAP message decoding library.

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.xxWehy/_old  2026-08-27 18:55:22.037940229 +0200
+++ /var/tmp/diff_new_pack.xxWehy/_new  2026-08-27 18:55:22.044940474 +0200
@@ -1,5 +1,5 @@
-mtime: 1773509942
-commit: b6dbf81352514bae37493e6a4d8e09cb50db5e59ea91c9e2c9b6c96ee89a069c
+mtime: 1787772094
+commit: 64ddd4452b9e2f8f227cbdb85d830a648c86fc49c05c39702b27b09cc5b43c56
 url: https://src.opensuse.org/jengelh/libosmo-asn1-tcap
 revision: master
 

++++++ build.patch ++++++
--- /var/tmp/diff_new_pack.xxWehy/_old  2026-08-27 18:55:22.078941661 +0200
+++ /var/tmp/diff_new_pack.xxWehy/_new  2026-08-27 18:55:22.085941905 +0200
@@ -8,16 +8,16 @@
  tests/parse/Makefile.am |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: libosmo-asn1-tcap-0.2.1/tests/parse/Makefile.am
+Index: libosmo-asn1-tcap-0.3.0/tests/parse/Makefile.am
 ===================================================================
---- libosmo-asn1-tcap-0.2.1.orig/tests/parse/Makefile.am
-+++ libosmo-asn1-tcap-0.2.1/tests/parse/Makefile.am
+--- libosmo-asn1-tcap-0.3.0.orig/tests/parse/Makefile.am
++++ libosmo-asn1-tcap-0.3.0/tests/parse/Makefile.am
 @@ -2,7 +2,7 @@ AM_CPPFLAGS = $(all_includes) -I$(top_sr
- AM_CFLAGS = -Wall
+ AM_CFLAGS = -Wall $(TALLOC_CFLAGS)
  AM_LDFLAGS = -no-install
  
--LDADD = $(top_builddir)/src/.libs/libosmo-asn1-tcap.a
-+LDADD = $(top_builddir)/src/libosmo-asn1-tcap.la
+-LDADD = $(top_builddir)/src/.libs/libosmo-asn1-tcap.a $(TALLOC_LIBS)
++LDADD = $(top_builddir)/src/libosmo-asn1-tcap.la $(TALLOC_LIBS)
  
  check_PROGRAMS = \
        tcap_parse_test \

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-08-26 21:21:34.000000000 +0200
@@ -0,0 +1 @@
+.osc

++++++ libosmo-asn1-tcap-0.2.1.tar.bz2 -> libosmo-asn1-tcap-0.3.0.tar.bz2 ++++++
++++ 2164 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/.tarball-version 
new/libosmo-asn1-tcap-0.3.0/.tarball-version
--- old/libosmo-asn1-tcap-0.2.1/.tarball-version        2025-12-06 
06:19:28.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/.tarball-version        2026-08-21 
07:19:37.000000000 +0200
@@ -1 +1 @@
-0.2.1
+0.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/.version new/libosmo-asn1-tcap-0.3.0/.version
--- old/libosmo-asn1-tcap-0.2.1/.version        2025-12-06 06:19:27.000000000 
+0100
+++ new/libosmo-asn1-tcap-0.3.0/.version        2026-08-21 07:19:36.000000000 
+0200
@@ -1 +1 @@
-0.2.1
+0.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/README.md new/libosmo-asn1-tcap-0.3.0/README.md
--- old/libosmo-asn1-tcap-0.2.1/README.md       1970-01-01 01:00:00.000000000 
+0100
+++ new/libosmo-asn1-tcap-0.3.0/README.md       2026-08-21 07:19:24.000000000 
+0200
@@ -0,0 +1,68 @@
+libosmo-asn1-tcap
+=================
+
+This repository contains C-language routing to encode and decode TCAP (ITU 
Q.771-Q.775).
+
+Homepage
+--------
+
+The official homepage of the project is
+https://gitea.osmocom.org/ss7-in-c/libosmo-asn1-tcap/
+
+GIT Repository
+--------------
+
+You can clone from the official libosmo-asn1-tcap.git repository using
+
+       git clone https://gitea.osmocom.org/ss7-in-c/libosmo-asn1-tcap/
+
+There is a web interface at 
<https://gitea.osmocom.org/ss7-in-c/libosmo-asn1-tcap/>
+
+Mailing List
+------------
+
+Discussions related to libosmo-asn1-tcap are happening on the
[email protected] mailing list, please see
+https://lists.osmocom.org/mailman/listinfo/openbsc for subscription
+options and the list archive.
+
+Please observe the [Osmocom Mailing List
+Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
+when posting.
+
+Contributing
+------------
+
+Our coding standards are described at
+https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
+
+We use a Gerrit based patch submission/review process for managing
+contributions.  Please see
+https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for
+more details
+
+The current patch queue for libosmo-asn1-tcap can be seen at
+https://gerrit.osmocom.org/#/q/project:libosmo-asn1-tcap+status:open
+
+
+Generating asn1c code
+---------------------
+
+The upstream fork maintained by a big contributor
+[mouse07410](https://github.com/mouse07410/asn1c) of asn1c is used to generate
+TCAP code from from ASN.1 files present in the asn/ directory.
+
+In order to regenerate the code, one shall adjust the ASN1C_SKELETON_PATH and
+ASN1C_BIN_PATH in configure.ac to point to the built & installed asn1c from
+mouse07410 (usually `vlm_master` branch). Last generated code was built using
+commit hash 2c065550a5a0d08636cad64f4b067c1dcba2f339.
+
+Then, do the usual `autoreconf -fi && ./configure`, using a buildir != srcdir
+(important, in order to avoid ending up with temporary files in srcdir and
+making it difficult to stash the relevant changes).
+
+Finally, run `make -C src/ regen`, which will regenerate the files and copy 
over
+the skeletons, with git possibly showing changes in the following paths:
+- include/osmocom/tcap/
+- src/gen/
+- src/skel/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/configure.ac 
new/libosmo-asn1-tcap-0.3.0/configure.ac
--- old/libosmo-asn1-tcap-0.2.1/configure.ac    2025-12-06 06:19:05.000000000 
+0100
+++ new/libosmo-asn1-tcap-0.3.0/configure.ac    2026-08-21 07:19:24.000000000 
+0200
@@ -31,6 +31,8 @@
 AC_SUBST([ASN_MODULE_CFLAGS])
 
 
+PKG_CHECK_MODULES(TALLOC, [talloc >= 2.1.0])
+
 # The following test is taken from WebKit's webkit.m4
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fvisibility=hidden "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/debian/changelog 
new/libosmo-asn1-tcap-0.3.0/debian/changelog
--- old/libosmo-asn1-tcap-0.2.1/debian/changelog        2025-12-06 
06:19:17.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/debian/changelog        2026-08-21 
07:19:24.000000000 +0200
@@ -1,3 +1,22 @@
+libosmo-asn1-tcap (0.3.0) unstable; urgency=medium
+
+  [ Pau Espin Pedrol ]
+  * Add README.md
+  * Makefile.am: Avoid removing tcap.h during make -C src/ regen
+  * tests: Use mem alloc macro instead of direct calloc() call
+  * Use talloc to allocate asn1c decoded structs
+  * Introduce API osmo_asn1_tcap_TCMessage_decode()
+
+  [ Alexander Couzens ]
+  * asn1: Decode ErrorCode as Integer
+  * tests: improve test infrastructure to support multiple test vectors
+  * tests: split tests into own functions
+  * tests: add decode tests for TCAP End tests
+  * asn1: remove wireshark sepcific parts
+  * tests: decoding: print the half decoded structure
+
+ -- Pau Espin Pedrol <[email protected]>  Thu, 20 Aug 2026 10:19:49 +0200
+
 libosmo-asn1-tcap (0.2.1) unstable; urgency=medium
 
   * Remove unneeded asn1c-fixup.patch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/debian/control 
new/libosmo-asn1-tcap-0.3.0/debian/control
--- old/libosmo-asn1-tcap-0.2.1/debian/control  2025-12-06 06:19:17.000000000 
+0100
+++ new/libosmo-asn1-tcap-0.3.0/debian/control  2026-08-21 07:19:24.000000000 
+0200
@@ -10,6 +10,7 @@
                git,
                libtool,
                pkg-config,
+               libtalloc-dev (>= 2.1.0)
 Standards-Version: 3.9.6
 Vcs-Browser: https://gitea.osmocom.org/ss7-in-c/libosmo-asn1-tcap
 Vcs-Git: https://gitea.osmocom.org/ss7-in-c/libosmo-asn1-tcap
@@ -25,7 +26,9 @@
 Package: libosmo-asn1-tcap-dev
 Section: libdevel
 Architecture: any
-Depends: libosmo-asn1-tcap1 (= ${binary:Version}), ${misc:Depends}
+Depends: libosmo-asn1-tcap1 (= ${binary:Version}),
+         libtalloc-dev (>= 2.1.0),
+         ${misc:Depends}
 Multi-Arch: same
 Description: Development headers for utility library for ASN.1 of TCAP (SS7)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/Makefile.am 
new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/Makefile.am
--- old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/Makefile.am        
2025-12-06 06:19:17.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/Makefile.am        
2026-08-21 07:19:24.000000000 +0200
@@ -46,14 +46,12 @@
        TCAP_ComponentPortion.h \
        TCAP_Continue.h \
        TCAP_DestTransactionID.h \
-       TCAP_Dialog1.h \
        TCAP_DialoguePDU.h \
        TCAP_DialoguePortion.h \
        TCAP_ERROR.h \
        TCAP_EXTERNAL.h \
        TCAP_End.h \
        TCAP_ErrorCode.h \
-       TCAP_ExternalPDU.h \
        TCAP_GeneralProblem.h \
        TCAP_Invoke.h \
        TCAP_InvokeIdType.h \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/TCAP_Dialog1.h 
new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/TCAP_Dialog1.h
--- old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/TCAP_Dialog1.h     
2025-12-06 06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/TCAP_Dialog1.h     
1970-01-01 01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-/*
- * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "TCAPMessages"
- */
-
-#ifndef        _TCAP_Dialog1_H_
-#define        _TCAP_Dialog1_H_
-
-
-#include <osmocom/tcap/asn_application.h>
-
-/* Including external dependencies */
-#include <osmocom/tcap/OCTET_STRING.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* TCAP_Dialog1 */
-typedef OCTET_STRING_t  TCAP_Dialog1_t;
-
-/* Implementation */
-extern asn_TYPE_descriptor_t asn_DEF_TCAP_Dialog1;
-asn_struct_free_f TCAP_Dialog1_free;
-asn_struct_print_f TCAP_Dialog1_print;
-asn_constr_check_f TCAP_Dialog1_constraint;
-ber_type_decoder_f TCAP_Dialog1_decode_ber;
-der_type_encoder_f TCAP_Dialog1_encode_der;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TCAP_Dialog1_H_ */
-#include <osmocom/tcap/asn_internal.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/TCAP_ErrorCode.h 
new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/TCAP_ErrorCode.h
--- old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/TCAP_ErrorCode.h   
2025-12-06 06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/TCAP_ErrorCode.h   
2026-08-21 07:19:24.000000000 +0200
@@ -11,35 +11,21 @@
 
 /* Including external dependencies */
 #include <osmocom/tcap/NativeInteger.h>
-#include <osmocom/tcap/constr_CHOICE.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/* Dependencies */
-typedef enum TCAP_ErrorCode_PR {
-       TCAP_ErrorCode_PR_NOTHING,      /* No components present */
-       TCAP_ErrorCode_PR_nationaler,
-       TCAP_ErrorCode_PR_privateer
-} TCAP_ErrorCode_PR;
-
 /* TCAP_ErrorCode */
-typedef struct TCAP_ErrorCode {
-       TCAP_ErrorCode_PR present;
-       union TCAP_ErrorCode_u {
-               long     nationaler;
-               long     privateer;
-       } choice;
-       
-       /* Context for parsing across buffer boundaries */
-       asn_struct_ctx_t _asn_ctx;
-} TCAP_ErrorCode_t;
+typedef long    TCAP_ErrorCode_t;
 
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_TCAP_ErrorCode;
-extern asn_CHOICE_specifics_t asn_SPC_TCAP_ErrorCode_specs_1;
-extern asn_TYPE_member_t asn_MBR_TCAP_ErrorCode_1[2];
+asn_struct_free_f TCAP_ErrorCode_free;
+asn_struct_print_f TCAP_ErrorCode_print;
+asn_constr_check_f TCAP_ErrorCode_constraint;
+ber_type_decoder_f TCAP_ErrorCode_decode_ber;
+der_type_encoder_f TCAP_ErrorCode_encode_der;
 
 #ifdef __cplusplus
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/TCAP_ExternalPDU.h 
new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/TCAP_ExternalPDU.h
--- old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/TCAP_ExternalPDU.h 
2025-12-06 06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/TCAP_ExternalPDU.h 
1970-01-01 01:00:00.000000000 +0100
@@ -1,38 +0,0 @@
-/*
- * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "TCAPMessages"
- */
-
-#ifndef        _TCAP_ExternalPDU_H_
-#define        _TCAP_ExternalPDU_H_
-
-
-#include <osmocom/tcap/asn_application.h>
-
-/* Including external dependencies */
-#include <osmocom/tcap/OBJECT_IDENTIFIER.h>
-#include <osmocom/tcap/TCAP_Dialog1.h>
-#include <osmocom/tcap/constr_SEQUENCE.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* TCAP_ExternalPDU */
-typedef struct TCAP_ExternalPDU {
-       OBJECT_IDENTIFIER_t      oid;
-       TCAP_Dialog1_t   dialog;
-       
-       /* Context for parsing across buffer boundaries */
-       asn_struct_ctx_t _asn_ctx;
-} TCAP_ExternalPDU_t;
-
-/* Implementation */
-extern asn_TYPE_descriptor_t asn_DEF_TCAP_ExternalPDU;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TCAP_ExternalPDU_H_ */
-#include <osmocom/tcap/asn_internal.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/asn_internal.h 
new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/asn_internal.h
--- old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/asn_internal.h     
2025-12-06 06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/asn_internal.h     
2026-08-21 07:19:24.000000000 +0200
@@ -7,6 +7,7 @@
  */
 #ifndef        ASN_INTERNAL_H
 #define        ASN_INTERNAL_H
+#include <talloc.h>
 #ifndef __EXTENSIONS__
 #define __EXTENSIONS__          /* for Sun */
 #endif
@@ -34,10 +35,11 @@
 #define        ASN1C_ENVIRONMENT_VERSION       923     /* Compile-time version 
*/
 int get_asn1c_environment_version(void);       /* Run-time version */
 
-#define        CALLOC(nmemb, size)     calloc(nmemb, size)
-#define        MALLOC(size)            malloc(size)
-#define        REALLOC(oldptr, size)   realloc(oldptr, size)
-#define        FREEMEM(ptr)            free(ptr)
+extern __thread void *tcap_talloc_asn1_ctx;
+#define        CALLOC(nmemb, size)     talloc_zero_size(tcap_talloc_asn1_ctx, 
(nmemb) * (size))
+#define        MALLOC(size)            talloc_size(tcap_talloc_asn1_ctx, size)
+#define        REALLOC(oldptr, size)   
talloc_realloc_size(tcap_talloc_asn1_ctx, oldptr, size)
+#define        FREEMEM(ptr)            talloc_free(ptr)
 
 #define        asn_debug_indent        0
 #define ASN_DEBUG_INDENT_ADD(i) do{}while(0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/tcap.h 
new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/tcap.h
--- old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/tcap.h     2025-12-06 
06:19:17.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/tcap.h     2026-08-21 
07:19:24.000000000 +0200
@@ -6,6 +6,8 @@
 
 #include <osmocom/tcap/TCAP_TCMessage.h>
 
-int osmo_asn1_tcap_decode(struct TCAP_TCMessage *tcapmsg, const uint8_t *data, 
size_t data_len);
+int osmo_asn1_tcap_decode(struct TCAP_TCMessage *tcapmsg, const uint8_t *data, 
size_t data_len) OSMO_DEPRECATED("Use osmo_asn1_tcap_TCMessage_decode() 
instead");
+
+int osmo_asn1_tcap_TCMessage_decode(struct TCAP_TCMessage *tcapmsg, const 
uint8_t *data, size_t data_len, void *talloc_ctx);
 
 void osmo_asn1_tcap_TCMessage_free_contents(struct TCAP_TCMessage *tcapmsg);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/version.h 
new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/version.h
--- old/libosmo-asn1-tcap-0.2.1/include/osmocom/tcap/version.h  2025-12-06 
06:19:28.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/include/osmocom/tcap/version.h  2026-08-21 
07:19:36.000000000 +0200
@@ -1,11 +1,11 @@
 #pragma once
 
-#define LIBOSMO_ASN1_TCAP_VERSION 0.2.1
-#define LIBOSMO_ASN1_TCAP_VERSION_STR "0.2.1"
+#define LIBOSMO_ASN1_TCAP_VERSION 0.3.0
+#define LIBOSMO_ASN1_TCAP_VERSION_STR "0.3.0"
 
 #define LIBOSMO_ASN1_TCAP_VERSION_MAJOR 0
-#define LIBOSMO_ASN1_TCAP_VERSION_MINOR 2
-#define LIBOSMO_ASN1_TCAP_VERSION_PATCH 1
+#define LIBOSMO_ASN1_TCAP_VERSION_MINOR 3
+#define LIBOSMO_ASN1_TCAP_VERSION_PATCH 0
 
 #define LIBOSMO_ASN1_TCAP_VERSION_GREATER_EQUAL(major, minor, patch) \
        (LIBOSMO_ASN1_TCAP_VERSION_MAJOR > (major) || \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/libosmo-asn1-tcap.pc.in 
new/libosmo-asn1-tcap-0.3.0/libosmo-asn1-tcap.pc.in
--- old/libosmo-asn1-tcap-0.2.1/libosmo-asn1-tcap.pc.in 2025-12-06 
06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/libosmo-asn1-tcap.pc.in 2026-08-21 
07:19:24.000000000 +0200
@@ -6,5 +6,6 @@
 Name: ASN.1 library for TCAP protocol (SS7)
 Description: C Utility Library
 Version: @VERSION@
+Requires.private: talloc
 Libs: -L${libdir} -losmo-asn1-tcap
 Cflags: -I${includedir}/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/src/Makefile.am 
new/libosmo-asn1-tcap-0.3.0/src/Makefile.am
--- old/libosmo-asn1-tcap-0.2.1/src/Makefile.am 2025-12-06 06:19:17.000000000 
+0100
+++ new/libosmo-asn1-tcap-0.3.0/src/Makefile.am 2026-08-21 07:19:24.000000000 
+0200
@@ -1,4 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/skel 
$(ASN_MODULE_CFLAGS)
+AM_CFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/skel 
$(ASN_MODULE_CFLAGS) $(TALLOC_CFLAGS)
 
 SKEL_SRC = \
        skel/ANY.c \
@@ -73,14 +73,12 @@
        gen/TCAP_ComponentPortion.c \
        gen/TCAP_Continue.c \
        gen/TCAP_DestTransactionID.c \
-       gen/TCAP_Dialog1.c \
        gen/TCAP_DialoguePDU.c \
        gen/TCAP_DialoguePortion.c \
        gen/TCAP_ERROR.c \
        gen/TCAP_EXTERNAL.c \
        gen/TCAP_End.c \
        gen/TCAP_ErrorCode.c \
-       gen/TCAP_ExternalPDU.c \
        gen/TCAP_GeneralProblem.c \
        gen/TCAP_Invoke.c \
        gen/TCAP_InvokeIdType.c \
@@ -156,7 +154,6 @@
        TCAP_Begin.h \
        TCAP_DialoguePDU.h \
        TCAP_Release-response-reason.h \
-       TCAP_ExternalPDU.h \
        TCAP_AARQ-apdu.h \
        TCAP_Continue.h \
        TCAP_asn_constant.h \
@@ -166,7 +163,6 @@
        TCAP_End.h \
        TCAP_ReturnResult.h \
        TCAP_Abort.h \
-       TCAP_Dialog1.h \
        TCAP_OPERATION.h \
        TCAP_Reject.h \
        TCAP_Invoke.h \
@@ -197,10 +193,12 @@
 # This is _NOT_ the library release version, it's an API version.
 # Please read Chapter 6 "Library interface versions" of the libtool
 # documentation before making any modification
-LIBVERSION=1:0:0
+LIBVERSION=2:0:1
 
 libosmo_asn1_tcap_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined 
-export-symbols-regex '^osmo_'
 
+libosmo_asn1_tcap_la_LIBADD = $(TALLOC_LIBS)
+
 libosmo_asn1_tcap_la_SOURCES = \
        tcap.c \
        $(ASN_MODULE_SRC)
@@ -210,7 +208,9 @@
 regen: regenerate-from-asn1-source
 
 regenerate-from-asn1-source:
-       rm -f $(top_srcdir)/src/gen/*.c $(top_srcdir)/include/osmocom/tcap/*.h
+       rm -f $(top_srcdir)/src/gen/*.c
+# Remove all .h files except our tcap.h:
+       find $(top_srcdir)/include/osmocom/tcap/ -type f -name '*.h' -type f 
-not -name 'tcap.h' -delete
        ASN1C_PREFIX="TCAP_" ${ASN1C_BIN_PATH} \
                -S $(ASN1C_SKELETON_PATH) \
                -D $(top_srcdir)/src/gen \
@@ -237,6 +237,13 @@
 # #include <...> in *.c and *.h files
        cd $(top_srcdir)/src/gen && \
                ../../move-asn1-header-files.sh osmocom/tcap $(ASN_MODULE_INC)
+#Patch mem alloc defines to use talloc:
+       sed -i "s/#define\tASN_INTERNAL_H/#define\tASN_INTERNAL_H\n#include 
<talloc.h>/g" $(top_srcdir)/include/osmocom/tcap/asn_internal.h
+       sed -i "s/#define\tCALLOC/extern __thread void 
*tcap_talloc_asn1_ctx;\n#define\tCALLOC/g" 
$(top_srcdir)/include/osmocom/tcap/asn_internal.h
+       sed -i "s/calloc(nmemb, size)/talloc_zero_size(tcap_talloc_asn1_ctx, 
(nmemb) * (size))/g" $(top_srcdir)/include/osmocom/tcap/asn_internal.h
+       sed -i "s/malloc(size)/talloc_size(tcap_talloc_asn1_ctx, size)/g" 
$(top_srcdir)/include/osmocom/tcap/asn_internal.h
+       sed -i "s/realloc(oldptr, 
size)/talloc_realloc_size(tcap_talloc_asn1_ctx, oldptr, size)/g" 
$(top_srcdir)/include/osmocom/tcap/asn_internal.h
+       sed -i "s/free(ptr)/talloc_free(ptr)/g" 
$(top_srcdir)/include/osmocom/tcap/asn_internal.h
 # Move skeleton *.c files to src/skel
        rm -rf $(top_srcdir)/src/skel
        mkdir $(top_srcdir)/src/skel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_Dialog1.c 
new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_Dialog1.c
--- old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_Dialog1.c  2025-12-06 
06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_Dialog1.c  1970-01-01 
01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-/*
- * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "TCAPMessages"
- */
-
-#include <osmocom/tcap/TCAP_Dialog1.h>
-
-/*
- * This type is implemented using OCTET_STRING,
- * so here we adjust the DEF accordingly.
- */
-static const ber_tlv_tag_t asn_DEF_TCAP_Dialog1_tags_1[] = {
-       (ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
-};
-asn_TYPE_descriptor_t asn_DEF_TCAP_Dialog1 = {
-       "Dialog1",
-       "Dialog1",
-       &asn_OP_OCTET_STRING,
-       asn_DEF_TCAP_Dialog1_tags_1,
-       sizeof(asn_DEF_TCAP_Dialog1_tags_1)
-               /sizeof(asn_DEF_TCAP_Dialog1_tags_1[0]), /* 1 */
-       asn_DEF_TCAP_Dialog1_tags_1,    /* Same as above */
-       sizeof(asn_DEF_TCAP_Dialog1_tags_1)
-               /sizeof(asn_DEF_TCAP_Dialog1_tags_1[0]), /* 1 */
-       {
-#if !defined(ASN_DISABLE_OER_SUPPORT)
-               0,
-#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
-#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
-               0,
-#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || 
!defined(ASN_DISABLE_APER_SUPPORT) */
-#if !defined(ASN_DISABLE_JER_SUPPORT)
-               0,
-#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
-               OCTET_STRING_constraint
-       },
-       0, 0,   /* No members */
-       &asn_SPC_OCTET_STRING_specs     /* Additional specs */
-};
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_ErrorCode.c 
new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_ErrorCode.c
--- old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_ErrorCode.c        2025-12-06 
06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_ErrorCode.c        2026-08-21 
07:19:24.000000000 +0200
@@ -5,95 +5,23 @@
 
 #include <osmocom/tcap/TCAP_ErrorCode.h>
 
-static int
-memb_TCAP_nationaler_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 >= -32768L && value <= 32767L)) {
-               /* Constraint check succeeded */
-               return 0;
-       } else {
-               ASN__CTFAIL(app_key, td, sptr,
-                       "%s: constraint failed (%s:%d)",
-                       td->name, __FILE__, __LINE__);
-               return -1;
-       }
-}
-
-asn_TYPE_member_t asn_MBR_TCAP_ErrorCode_1[] = {
-       { ATF_NOFLAGS, 0, offsetof(struct TCAP_ErrorCode, choice.nationaler),
-               (ASN_TAG_CLASS_PRIVATE | (19 << 2)),
-               -1,     /* IMPLICIT tag at current level */
-               &asn_DEF_NativeInteger,
-               0,
-               {
-#if !defined(ASN_DISABLE_OER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
-#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || 
!defined(ASN_DISABLE_APER_SUPPORT) */
-#if !defined(ASN_DISABLE_JER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
-                       memb_TCAP_nationaler_constraint_1
-               },
-               0, 0, /* No default value */
-               "nationaler"
-               },
-       { ATF_NOFLAGS, 0, offsetof(struct TCAP_ErrorCode, choice.privateer),
-               (ASN_TAG_CLASS_PRIVATE | (20 << 2)),
-               -1,     /* IMPLICIT tag at current level */
-               &asn_DEF_NativeInteger,
-               0,
-               {
-#if !defined(ASN_DISABLE_OER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
-#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || 
!defined(ASN_DISABLE_APER_SUPPORT) */
-#if !defined(ASN_DISABLE_JER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
-                       0
-               },
-               0, 0, /* No default value */
-               "privateer"
-               },
-};
-static const asn_TYPE_tag2member_t asn_MAP_TCAP_ErrorCode_tag2el_1[] = {
-    { (ASN_TAG_CLASS_PRIVATE | (19 << 2)), 0, 0, 0 }, /* nationaler */
-    { (ASN_TAG_CLASS_PRIVATE | (20 << 2)), 1, 0, 0 } /* privateer */
-};
-asn_CHOICE_specifics_t asn_SPC_TCAP_ErrorCode_specs_1 = {
-       sizeof(struct TCAP_ErrorCode),
-       offsetof(struct TCAP_ErrorCode, _asn_ctx),
-       offsetof(struct TCAP_ErrorCode, present),
-       sizeof(((struct TCAP_ErrorCode *)0)->present),
-       asn_MAP_TCAP_ErrorCode_tag2el_1,
-       2,      /* Count of tags in the map */
-       0, 0,
-       -1      /* Extensions start */
+/*
+ * This type is implemented using NativeInteger,
+ * so here we adjust the DEF accordingly.
+ */
+static const ber_tlv_tag_t asn_DEF_TCAP_ErrorCode_tags_1[] = {
+       (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
 };
 asn_TYPE_descriptor_t asn_DEF_TCAP_ErrorCode = {
        "ErrorCode",
        "ErrorCode",
-       &asn_OP_CHOICE,
-       0,      /* No effective tags (pointer) */
-       0,      /* No effective tags (count) */
-       0,      /* No tags (pointer) */
-       0,      /* No tags (count) */
+       &asn_OP_NativeInteger,
+       asn_DEF_TCAP_ErrorCode_tags_1,
+       sizeof(asn_DEF_TCAP_ErrorCode_tags_1)
+               /sizeof(asn_DEF_TCAP_ErrorCode_tags_1[0]), /* 1 */
+       asn_DEF_TCAP_ErrorCode_tags_1,  /* Same as above */
+       sizeof(asn_DEF_TCAP_ErrorCode_tags_1)
+               /sizeof(asn_DEF_TCAP_ErrorCode_tags_1[0]), /* 1 */
        {
 #if !defined(ASN_DISABLE_OER_SUPPORT)
                0,
@@ -104,10 +32,9 @@
 #if !defined(ASN_DISABLE_JER_SUPPORT)
                0,
 #endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
-               CHOICE_constraint
+               NativeInteger_constraint
        },
-       asn_MBR_TCAP_ErrorCode_1,
-       2,      /* Elements count */
-       &asn_SPC_TCAP_ErrorCode_specs_1 /* Additional specs */
+       0, 0,   /* No members */
+       0       /* No specifics */
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_ExternalPDU.c 
new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_ExternalPDU.c
--- old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_ExternalPDU.c      2025-12-06 
06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_ExternalPDU.c      1970-01-01 
01:00:00.000000000 +0100
@@ -1,92 +0,0 @@
-/*
- * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
- * From ASN.1 module "TCAPMessages"
- */
-
-#include <osmocom/tcap/TCAP_ExternalPDU.h>
-
-static asn_TYPE_member_t asn_MBR_TCAP_ExternalPDU_1[] = {
-       { ATF_NOFLAGS, 0, offsetof(struct TCAP_ExternalPDU, oid),
-               (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
-               0,
-               &asn_DEF_OBJECT_IDENTIFIER,
-               0,
-               {
-#if !defined(ASN_DISABLE_OER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
-#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || 
!defined(ASN_DISABLE_APER_SUPPORT) */
-#if !defined(ASN_DISABLE_JER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
-                       0
-               },
-               0, 0, /* No default value */
-               "oid"
-               },
-       { ATF_NOFLAGS, 0, offsetof(struct TCAP_ExternalPDU, dialog),
-               (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-               -1,     /* IMPLICIT tag at current level */
-               &asn_DEF_TCAP_Dialog1,
-               0,
-               {
-#if !defined(ASN_DISABLE_OER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
-#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || 
!defined(ASN_DISABLE_APER_SUPPORT) */
-#if !defined(ASN_DISABLE_JER_SUPPORT)
-                       0,
-#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
-                       0
-               },
-               0, 0, /* No default value */
-               "dialog"
-               },
-};
-static const ber_tlv_tag_t asn_DEF_TCAP_ExternalPDU_tags_1[] = {
-       (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)),
-       (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
-};
-static const asn_TYPE_tag2member_t asn_MAP_TCAP_ExternalPDU_tag2el_1[] = {
-    { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, 0, 0 }, /* oid */
-    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* dialog */
-};
-static asn_SEQUENCE_specifics_t asn_SPC_TCAP_ExternalPDU_specs_1 = {
-       sizeof(struct TCAP_ExternalPDU),
-       offsetof(struct TCAP_ExternalPDU, _asn_ctx),
-       asn_MAP_TCAP_ExternalPDU_tag2el_1,
-       2,      /* Count of tags in the map */
-       0, 0, 0,        /* Optional elements (not needed) */
-       -1,     /* First extension addition */
-};
-asn_TYPE_descriptor_t asn_DEF_TCAP_ExternalPDU = {
-       "ExternalPDU",
-       "ExternalPDU",
-       &asn_OP_SEQUENCE,
-       asn_DEF_TCAP_ExternalPDU_tags_1,
-       sizeof(asn_DEF_TCAP_ExternalPDU_tags_1)
-               /sizeof(asn_DEF_TCAP_ExternalPDU_tags_1[0]) - 1, /* 1 */
-       asn_DEF_TCAP_ExternalPDU_tags_1,        /* Same as above */
-       sizeof(asn_DEF_TCAP_ExternalPDU_tags_1)
-               /sizeof(asn_DEF_TCAP_ExternalPDU_tags_1[0]), /* 2 */
-       {
-#if !defined(ASN_DISABLE_OER_SUPPORT)
-               0,
-#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
-#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
-               0,
-#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || 
!defined(ASN_DISABLE_APER_SUPPORT) */
-#if !defined(ASN_DISABLE_JER_SUPPORT)
-               0,
-#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
-               SEQUENCE_constraint
-       },
-       asn_MBR_TCAP_ExternalPDU_1,
-       2,      /* Elements count */
-       &asn_SPC_TCAP_ExternalPDU_specs_1       /* Additional specs */
-};
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_ReturnError.c 
new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_ReturnError.c
--- old/libosmo-asn1-tcap-0.2.1/src/gen/TCAP_ReturnError.c      2025-12-06 
06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/src/gen/TCAP_ReturnError.c      2026-08-21 
07:19:24.000000000 +0200
@@ -27,7 +27,7 @@
                "invokeID"
                },
        { ATF_NOFLAGS, 0, offsetof(struct TCAP_ReturnError, errorCode),
-               -1 /* Ambiguous tag (CHOICE?) */,
+               (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
                0,
                &asn_DEF_TCAP_ErrorCode,
                0,
@@ -71,15 +71,14 @@
        (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
 };
 static const asn_TYPE_tag2member_t asn_MAP_TCAP_ReturnError_tag2el_1[] = {
-    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* invokeID */
-    { (ASN_TAG_CLASS_PRIVATE | (19 << 2)), 1, 0, 0 }, /* nationaler */
-    { (ASN_TAG_CLASS_PRIVATE | (20 << 2)), 1, 0, 0 } /* privateer */
+    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* invokeID */
+    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* errorCode */
 };
 asn_SEQUENCE_specifics_t asn_SPC_TCAP_ReturnError_specs_1 = {
        sizeof(struct TCAP_ReturnError),
        offsetof(struct TCAP_ReturnError, _asn_ctx),
        asn_MAP_TCAP_ReturnError_tag2el_1,
-       3,      /* Count of tags in the map */
+       2,      /* Count of tags in the map */
        0, 0, 0,        /* Optional elements (not needed) */
        -1,     /* First extension addition */
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/src/tcap.c new/libosmo-asn1-tcap-0.3.0/src/tcap.c
--- old/libosmo-asn1-tcap-0.2.1/src/tcap.c      2025-12-06 06:19:17.000000000 
+0100
+++ new/libosmo-asn1-tcap-0.3.0/src/tcap.c      2026-08-21 07:19:24.000000000 
+0200
@@ -26,6 +26,8 @@
 #include <osmocom/tcap/asn_codecs.h>
 #include <osmocom/tcap/TCAP_TCMessage.h>
 
+__thread void *tcap_talloc_asn1_ctx;
+
 int osmo_asn1_tcap_decode(struct TCAP_TCMessage *tcapmsg, const uint8_t *data, 
size_t data_len)
 {
 
@@ -39,6 +41,15 @@
        return 0;
 }
 
+int osmo_asn1_tcap_TCMessage_decode(struct TCAP_TCMessage *tcapmsg, const 
uint8_t *data, size_t data_len, void *talloc_ctx)
+{
+       int rc;
+       tcap_talloc_asn1_ctx = talloc_ctx;
+       rc = osmo_asn1_tcap_decode(tcapmsg, data, data_len);
+       tcap_talloc_asn1_ctx = NULL;
+       return rc;
+}
+
 void osmo_asn1_tcap_TCMessage_free_contents(struct TCAP_TCMessage *tcapmsg)
 {
        ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_TCAP_TCMessage, tcapmsg);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/tests/package.m4 
new/libosmo-asn1-tcap-0.3.0/tests/package.m4
--- old/libosmo-asn1-tcap-0.2.1/tests/package.m4        2025-12-06 
06:19:27.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/tests/package.m4        2026-08-21 
07:19:36.000000000 +0200
@@ -4,9 +4,9 @@
 m4_define([AT_PACKAGE_TARNAME],
   [libosmo-asn1-tcap])
 m4_define([AT_PACKAGE_VERSION],
-  [0.2.1])
+  [0.3.0])
 m4_define([AT_PACKAGE_STRING],
-  [libosmo-asn1-tcap 0.2.1])
+  [libosmo-asn1-tcap 0.3.0])
 m4_define([AT_PACKAGE_BUGREPORT],
   [[email protected]])
 m4_define([AT_PACKAGE_URL],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/tests/parse/Makefile.am 
new/libosmo-asn1-tcap-0.3.0/tests/parse/Makefile.am
--- old/libosmo-asn1-tcap-0.2.1/tests/parse/Makefile.am 2025-12-06 
06:19:17.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/tests/parse/Makefile.am 2026-08-21 
07:19:24.000000000 +0200
@@ -1,8 +1,8 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_srcdir)/src
-AM_CFLAGS = -Wall
+AM_CFLAGS = -Wall $(TALLOC_CFLAGS)
 AM_LDFLAGS = -no-install
 
-LDADD = $(top_builddir)/src/.libs/libosmo-asn1-tcap.a
+LDADD = $(top_builddir)/src/.libs/libosmo-asn1-tcap.a $(TALLOC_LIBS)
 
 check_PROGRAMS = \
        tcap_parse_test \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/tests/parse/tcap_parse_test.c 
new/libosmo-asn1-tcap-0.3.0/tests/parse/tcap_parse_test.c
--- old/libosmo-asn1-tcap-0.2.1/tests/parse/tcap_parse_test.c   2025-12-06 
06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/tests/parse/tcap_parse_test.c   2026-08-21 
07:19:24.000000000 +0200
@@ -14,8 +14,9 @@
 #include <osmocom/tcap/TCAP_OrigTransactionID.h>
 #include <stdlib.h>
 
-
-static const unsigned char pkt1[] = {0x62, 0x06, 0x48, 0x04, 0x00, 0x01, 0x02, 
0x03};
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif /* ARRAY_SIZE */
 
 static int write_stream(const void *buffer, size_t size, void *key)
 {
@@ -26,24 +27,112 @@
        return 0;
 }
 
-int main(int argc, char **argv)
-{
-       asn_dec_rval_t rc;
-       struct TCAP_TCMessage *tcapmsg;
-       tcapmsg = calloc(1, sizeof(*tcapmsg));
-
-       printf("Basic TCAP decode testing.\n");
-
-       rc = ber_decode(0, &asn_DEF_TCAP_TCMessage, (void **)&tcapmsg, pkt1, 
sizeof(pkt1));
-       if (rc.code != RC_OK)
-               printf("Broken encoding %u at byte %lu\n", rc.code, 
rc.consumed);
-
-       asn_fprint(stdout, &asn_DEF_TCAP_TCMessage, tcapmsg);
-       ASN_STRUCT_FREE(asn_DEF_TCAP_TCMessage, tcapmsg);
-
+/* Transaction Capabilities Application Part
+ *     begin
+ *         Destination Transaction ID
+ *             dtid: 00010203
+ */
+static const unsigned char pkt_begin[] = { 0x62, 0x06, 0x48, 0x04, 0x00, 0x01, 
0x02, 0x03 };
+
+/* Transaction Capabilities Application Part
+ *     end
+ *         Destination Transaction ID
+ *             dtid: 7fc2923a
+ */
+static const unsigned char pkt_end[] = { 0x64, 0x06, 0x49, 0x04, 0x7f, 0xc2, 
0x92, 0x3a };
+
+/* TCAP End, dtid 0xc9143d64
+ * Transaction Capabilities Application Part
+ *     end
+ *         Destination Transaction ID
+ *             dtid: c9143d64
+ *         oid: 0.0.17.773.1.1.1 (id-as-dialogue)
+ *         dialogueResponse
+ *             Padding: 7
+ *             protocol-version: 80
+ *                 1... .... = version1: True
+ *             application-context-name: 0.4.0.0.1.0.1.3 
(networkLocUpContext-v3)
+ *             result: accepted (0)
+ *             result-source-diagnostic: dialogue-service-user (1)
+ *                 dialogue-service-user: null (0)
+ */
+static const unsigned char pkt_end_dialog[] = {
+       0x64, 0x32, 0x49, 0x04, 0xc9, 0x14, 0x3d, 0x64, 0x6b, 0x2a, 0x28, 0x28,
+       0x06, 0x07, 0x00, 0x11, 0x86, 0x05, 0x01, 0x01, 0x01, 0xa0, 0x1d, 0x61,
+       0x1b, 0x80, 0x02, 0x07, 0x80, 0xa1, 0x09, 0x06, 0x07, 0x04, 0x00, 0x00,
+       0x01, 0x00, 0x01, 0x03, 0xa2, 0x03, 0x02, 0x01, 0x00, 0xa3, 0x05, 0xa1,
+       0x03, 0x02, 0x01, 0x00 };
+
+/* TCAP End, dtid 0xc9143d64
+ * Transaction Capabilities Application Part
+ *     end
+ *         Destination Transaction ID
+ *             dtid: c9143d64
+ *         oid: 0.0.17.773.1.1.1 (id-as-dialogue)
+ *         components: 1 item
+ * GSM Mobile Application
+ *     Component: returnError (3)
+ *         returnError
+ *             invokeID: 1
+ *             errorCode: localValue (0)
+ *                 localValue: roamingNotAllowed (8)
+ *             roamingNotAllowedCause: plmnRoamingNotAllowed (0)
+ */
+static const unsigned char pkt_end_component[] = {
+       0x64, 0x15, 0x49, 0x04, 0xc9, 0x14, 0x3d, 0x64, 0x6c, 0x0d, 0xa3, 0x0b,
+       0x02, 0x01, 0x01, 0x02, 0x01, 0x08, 0x30, 0x03, 0x0a, 0x01, 0x00 };
+
+/* TCAP End, dtid 0xc9143d64
+ * Transaction Capabilities Application Part
+ *     end
+ *         Destination Transaction ID
+ *             dtid: c9143d64
+ *         oid: 0.0.17.773.1.1.1 (id-as-dialogue)
+ *         dialogueResponse
+ *             Padding: 7
+ *             protocol-version: 80
+ *                 1... .... = version1: True
+ *             application-context-name: 0.4.0.0.1.0.1.3 
(networkLocUpContext-v3)
+ *             result: accepted (0)
+ *             result-source-diagnostic: dialogue-service-user (1)
+ *                 dialogue-service-user: null (0)
+ *         components: 1 item
+ * GSM Mobile Application
+ *     Component: returnError (3)
+ *         returnError
+ *             invokeID: 1
+ *             errorCode: localValue (0)
+ *                 localValue: roamingNotAllowed (8)
+ *             roamingNotAllowedCause: plmnRoamingNotAllowed (0)
+ */
+
+static const unsigned char pkt_end_dialog_component[] = {
+       0x64, 0x41, 0x49, 0x04, 0xc9, 0x14, 0x3d, 0x64, 0x6b, 0x2a, 0x28, 0x28,
+       0x06, 0x07, 0x00, 0x11, 0x86, 0x05, 0x01, 0x01, 0x01, 0xa0, 0x1d, 0x61,
+       0x1b, 0x80, 0x02, 0x07, 0x80, 0xa1, 0x09, 0x06, 0x07, 0x04, 0x00, 0x00,
+       0x01, 0x00, 0x01, 0x03, 0xa2, 0x03, 0x02, 0x01, 0x00, 0xa3, 0x05, 0xa1,
+       0x03, 0x02, 0x01, 0x00, 0x6c, 0x0d, 0xa3, 0x0b, 0x02, 0x01, 0x01, 0x02,
+       0x01, 0x08, 0x30, 0x03, 0x0a, 0x01, 0x00 };
+
+struct testvector {
+       const char *name;
+       const unsigned char *vector;
+       size_t vector_len;
+};
+static struct testvector testvectors[] = {
+       { .name = "Begin", .vector = pkt_begin, .vector_len = sizeof(pkt_begin) 
},
+       { .name = "End", .vector = pkt_end, .vector_len = sizeof(pkt_end) },
+       { .name = "End with Dialog", .vector = pkt_end_dialog, .vector_len = 
sizeof(pkt_end_dialog) },
+       { .name = "End with Component", .vector = pkt_end_component, 
.vector_len = sizeof(pkt_end_component) },
+       { .name = "End with Dialog & Component", .vector = 
pkt_end_dialog_component, .vector_len = sizeof(pkt_end_dialog_component) },
+};
 
+static int encode_tests(void)
+{
        uint8_t buf[] = {0x00, 0x01, 0x02, 0x03};
 
+       printf("Basic TCAP encode testing.\n");
+
        struct TCAP_TCMessage msg = {
                .present = TCAP_TCMessage_PR_begin,
                .choice.begin = {
@@ -55,6 +144,43 @@
        };
 
        der_encode(&asn_DEF_TCAP_TCMessage, &msg, write_stream, NULL);
+       return 0;
+}
+
+static int decode_tests(void)
+{
+       int ret = 0;
+       asn_dec_rval_t rc;
+
+       printf("Basic TCAP decode testing.\n");
+       struct TCAP_TCMessage _tcapmsg = {};
+
+       for (int i = 0; i < ARRAY_SIZE(testvectors); i++) {
+               printf("Decoding testvector no %d - %s\n", i, 
testvectors[i].name);
+               struct TCAP_TCMessage *tcapmsg = &_tcapmsg;
+
+               memset(tcapmsg, 0, sizeof(*tcapmsg));
+               rc = ber_decode(0, &asn_DEF_TCAP_TCMessage, (void **)&tcapmsg, 
testvectors[i].vector, testvectors[i].vector_len);
+               if (rc.code != RC_OK) {
+                       ret = 1;
+                       printf("Broken decoding %u at byte %lu\n", rc.code, 
rc.consumed);
+                       asn_fprint(stdout, &asn_DEF_TCAP_TCMessage, tcapmsg);
+               } else
+                       asn_fprint(stdout, &asn_DEF_TCAP_TCMessage, tcapmsg);
+
+               ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_TCAP_TCMessage, tcapmsg);
+       }
+
+       return ret;
+}
+
+int main(int argc, char **argv)
+{
+       if (decode_tests())
+               return 1;
+
+       if (encode_tests())
+               return 1;
 
        printf("All tests passed.\n");
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/tests/parse/tcap_parse_test.ok 
new/libosmo-asn1-tcap-0.3.0/tests/parse/tcap_parse_test.ok
--- old/libosmo-asn1-tcap-0.2.1/tests/parse/tcap_parse_test.ok  2025-12-06 
06:19:05.000000000 +0100
+++ new/libosmo-asn1-tcap-0.3.0/tests/parse/tcap_parse_test.ok  2026-08-21 
07:19:24.000000000 +0200
@@ -1,7 +1,51 @@
 Basic TCAP decode testing.
+Decoding testvector no 0 - Begin
 Begin ::= {
     otid: 00 01 02 03
 }
+Decoding testvector no 1 - End
+End ::= {
+    dtid: 7F C2 92 3A
+}
+Decoding testvector no 2 - End with Dialog
+End ::= {
+    dtid: C9 14 3D 64
+    dialoguePortion: DialoguePortion ::= {
+        direct-reference: { 0.0.17.773.1.1.1 }
+        encoding: 
+            61 1B 80 02 07 80 A1 09 06 07 04 00 00 01 00 01 
+            03 A2 03 02 01 00 A3 05 A1 03 02 01 00
+    }
+}
+Decoding testvector no 3 - End with Component
+End ::= {
+    dtid: C9 14 3D 64
+    components: ComponentPortion ::= {
+        ReturnError ::= {
+            invokeID: 1
+            errorCode: 8
+            parameter: 30 03 0A 01 00
+        }
+    }
+}
+Decoding testvector no 4 - End with Dialog & Component
+End ::= {
+    dtid: C9 14 3D 64
+    dialoguePortion: DialoguePortion ::= {
+        direct-reference: { 0.0.17.773.1.1.1 }
+        encoding: 
+            61 1B 80 02 07 80 A1 09 06 07 04 00 00 01 00 01 
+            03 A2 03 02 01 00 A3 05 A1 03 02 01 00
+    }
+    components: ComponentPortion ::= {
+        ReturnError ::= {
+            invokeID: 1
+            errorCode: 8
+            parameter: 30 03 0A 01 00
+        }
+    }
+}
+Basic TCAP encode testing.
 62 06 
 48 04 
 00 01 02 03 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libosmo-asn1-tcap-0.2.1/tests/testsuite 
new/libosmo-asn1-tcap-0.3.0/tests/testsuite
--- old/libosmo-asn1-tcap-0.2.1/tests/testsuite 2025-12-06 06:19:27.000000000 
+0100
+++ new/libosmo-asn1-tcap-0.3.0/tests/testsuite 2026-08-21 07:19:36.000000000 
+0200
@@ -921,7 +921,7 @@
 # List of tests.
 if $at_list_p; then
   cat <<_ATEOF || at_write_fail=1
-libosmo-asn1-tcap 0.2.1 test suite test groups:
+libosmo-asn1-tcap 0.3.0 test suite test groups:
 
  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
       KEYWORDS
@@ -962,7 +962,7 @@
   exit $at_write_fail
 fi
 if $at_version_p; then
-  printf "%s\n" "$as_me (libosmo-asn1-tcap 0.2.1)" &&
+  printf "%s\n" "$as_me (libosmo-asn1-tcap 0.3.0)" &&
   cat <<\_ATEOF || at_write_fail=1
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1150,11 +1150,11 @@
 
 # Banners and logs.
 printf "%s\n" "## ----------------------------------- ##
-## libosmo-asn1-tcap 0.2.1 test suite. ##
+## libosmo-asn1-tcap 0.3.0 test suite. ##
 ## ----------------------------------- ##"
 {
   printf "%s\n" "## ----------------------------------- ##
-## libosmo-asn1-tcap 0.2.1 test suite. ##
+## libosmo-asn1-tcap 0.3.0 test suite. ##
 ## ----------------------------------- ##"
   echo
 
@@ -1971,7 +1971,7 @@
   printf "%s\n" "Please send $at_msg and all information you think might help:
 
    To: <[email protected]>
-   Subject: [libosmo-asn1-tcap 0.2.1] $as_me: $at_msg1$at_msg2
+   Subject: [libosmo-asn1-tcap 0.3.0] $as_me: $at_msg1$at_msg2
 
 You may investigate any problem if you feel able to do so, in which
 case the test suite provides a good starting point.  Its output may

Reply via email to