Lets add a counterpart for ranap_common_cn that works the same, but
decodes CN/MSC originated messages.
Change-Id: Iad4c2743d4d1ddf8ad49002d1fe6866f22eb9e98
Related: OS#5152
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
This unit test generats a lot of ranap messages for test, but the code
for that is in the main() function. Lets seperate this test code into
its own function like we do it in all other unit tests.
Change-Id: I7021e48b051afb6f13fdd54843d4cd92a499de2a
in ranap_transp_layer_addr_decode() we access the buffer buf before
checking the length field. This can lead to a segfault when the buffer
has a length of 0.
Change-Id: I983f6e5e4cee47b3f5719829e1310b8e2e33ffaf
The functions new_transp_info_rtp and new_transp_info_gtp are needed to
generate the transport layer information struct. The functions are currently
not public since they are only used in ranap_msg_factory.c but to
reqwrite the RANAP RAB AssignmentReqtest / AssignmentResponse messages we
can reuse this code, so lets make them public.
Change-Id: I1e369718de8c4c7db1f1af1e6864562164ada6cf
Related: OS#5152
The RAB SetupOrModifyItemFirst is contained in the RAB Assignment
Request. We currently have no decoder for it, so lets add one.
Change-Id: Id7293c1035cf6de34b7a416fa9265a5a32ed3216
Related: OS#5152
This one was unspotted during last patches dropping hnbgw since this
file is actually not compiled currently.
Change-Id: I94ed20c42bcc9619d80757c6ff4a661c360bfb4f
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
The header is probably indirectly added by osmocom/iuh/hnbgw.h, but once
that's dropped, really weird stuff happens, like talloc crashing in
talloc_total_blocks() because the compiled code incorrectly fills
msgb_ctx variable in return of msgb_talloc_ctx_init.
Change-Id: I7dab8d18d316632989406a9f22917e00a7fd68bf
This is an option enabled by default and not existent as cmdline param
since asn1c 0.9.26.
For some reason, when dropping it, asn1c generates different description
comment section on related files. In any case, this makes hnbap look
like other libraries which already got this param removed and hence also
generateds code looks the same.
Change-Id: Iccf81539a5045416185e619d24c3d542204437e6
Other libraries already use ASN1C_PREFIX except the HNBAP one. Let's use
it here to avoid collisions.
All new include/osmocom/hnbap/HNBAP_*.h and src/hnbap/HNBAP_*.c are
generated using the updated src/hnbap/Makefile.am.
Files such as src/*.c, test/* and include/osmocom/hnbap/hnbap_common.h
are modified manually to update structs/enums to new prefix.
Related: SYS#5516
Change-Id: I6c062f631527ae42811bfec134933671c05ecba6
This allows the SGSN always having feedback on the resolution of the
release, hence being able to stay in PMM CONNECTED state until the
resolution is received, then moving to PMM IDLE.
Related: SYS#5389
Change-Id: Iac822c74e56750dc40e94573eae0e20853ff68c0
For some unknown reason, using size=0 instead of 1 makes LeakSanitizer
report a leak when calling osmo-hnbgw --vty-ref-xml:
"""
==19857==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x7f083b4d0d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
#1 0x7f083a8e5661 in talloc_named_const (/usr/lib/x86_64-linux-gnu/libtalloc.so.2+0x6661)
"""
It seems iu_client.c is already using size=1.
Change-Id: I383653c981e68a053babd33dee1f0df8731752b0
This global variable is already defined in iu_client.c provided by
libosmo-ranap (and used by libasn1c).
Fixes ASan warning at starutp.
Change-Id: I7dbae83ce0dc4ac25dc10879e223280414f7b561
Let's disable category here since we don't care about its formatting here.
In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.
Change-Id: Ia633cae0a26f294e276b431a82256abb1b57ebba
Related: OS#5034
The related compiler warnings were overlooked as due to the
asn1c-generated code there always are tons of warnings printed compiling
this project :(
Change-Id: I40b1265ba696501cc72e674f3ef4146c47aacf1b
So far we don't really have any way of matching a given log message
to a specific hNB. Let's use the newly-introduced LOGHNB() macro.
Change-Id: Ia16eed4ca5e9ef231259e94c65105f7586f366bc