Commit Graph

12 Commits

Author SHA1 Message Date
Philipp Maier ca6054ef8c ranap_common_cn: add functions for direct access to decoder
The message encoder functions that decode a message to a struct
ranap_message are only accessible via a callback function that is passed
to ranap_cn_rx_cx The decoded ranap_message only lives inside the callback
since it is freed by ranap_cn_rx_cx when the callback is done. In some
situations this might make using the decoder incredibly difficult since
it is not possible to keep the decoding results for an extended amount
of time. Lets put the decoding into a separate function and use this
function in ranap_cn_rx_cx. Then lets make the decoder and the free
function public so that the decoder can be used in a more open way.

Change-Id: I14d2ed8e597a5d12024a6a6c72ff011dbeb2549d
Related: OS#5152
2022-01-28 13:21:40 +01:00
Pau Espin 1562225332 Introduce dynamic log category for libosmo-rua/hnbap
Same as already done for libosmo-ranap.
This allows applications setting the cateogy dynamically, and will allow
untangling library tests using hnbgw log categories in this repo.

Change-Id: I5d09b67b115ad8938e5162a23accfcbafab139d4
2022-01-04 18:57:22 +01:00
Harald Welte da86fe5ae3 Fix various compiler warnings in hnb-gw code
Since we finally started to use -Wall, the related warnings became
visible.

Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682
2017-11-21 11:08:56 +00:00
Neels Hofmeyr a6a68e62d9 fix error rc in various ASN.1 decoding functions
Fixes: CID#57945, CID#57946, CID#57947, CID#57948, CID#57950, CID#57951
Change-Id: I2d9ee1aa79959c5973041393f4769faa13720898
2016-11-27 18:27:33 +00:00
Neels Hofmeyr df63de2e37 build: move headers to include/osmocom/*
This came up while fixing 'make distcheck'; this is certainly not the easiest
way but it makes sense to have the headers in include/, like we do in openbsc.

The easy alternative might be to add -I$(top_srcdir)/src to src/Makefile.am.

Remove -I$(top_srcdir)/src from src/tests/Makefile.am, no longer needed.

Change-Id: I5a82e029dcdc4df0a60a31271a4883393fe59234
2016-09-09 06:43:32 +00:00
Neels Hofmeyr 39fc8811f9 ranap_common_cn.c: for now add more decoding that doesn't belong here
Allow Iu Release Command decoding and freeing.
Add Paging decoding and freeing.

These are all needed by hnb-test, which still uses the CN parsing functions,
still to be fixed, as commented in the code.
2016-04-19 18:19:30 +02:00
Neels Hofmeyr 68b7a47868 RANAP Initiating msg: rx and free Security Mode Command
Add the Security Mode Command procedure code to cn_ranap_rx_initiating_msg_co()
and cn_ranap_free_initiating_msg_co(), for hnb-test (see comments in the code).
2016-04-19 01:32:25 +02:00
Daniel Willmann c858fe9f90 ranap_common_cn: Free structs allocated through ranap_cn_rx_co()
After the callback handled the ranap_message the decoded IEs need to be
freed again.
2016-01-07 14:33:00 +01:00
Daniel Willmann c35b298ce9 ranap_common_cn: Free structs allocated through ranap_cn_rx_cl()
After the callback handled the ranap_message the decoded IEs need to be
freed again.
2016-01-07 14:32:56 +01:00
Daniel Willmann 366dcf24c5 ranap_common_cn: Fix copy/paste bug when decoding outcome message 2016-01-07 14:12:07 +01:00
Daniel Willmann 618f0f5bdb ranap_common_cn: Add missing break in switch statement 2016-01-07 14:11:01 +01:00
Harald Welte 5c6bd5104e make ranap_common.cn.[ch] part of libosmo-ranap 2016-01-06 19:53:44 +01:00