Neels Hofmeyr
f6e56058f4
ranap_parse_lai(): properly initialize out-arg, adjust test experr
...
The test stderr output changes merely because the source code line numbers
of the error logging changed.
Fixes: CID#93770
2016-04-25 13:26:07 +02:00
Neels Hofmeyr
d8013d1f8c
ranap_parse_lai(): Fix wrong BCD decoding for MNC. Add test.
...
Fix the ranap_parse_lai() part that decodes the MNC: place the *10 at the
proper MNC digit.
Add a comprehensive test for ranap_parse_lai() in test-helpers.c. Because
ranap_parse_lai() logs things, add test_common.c to test-helpers compilation
and an expected stderr output to test-helpers' testsuite.at def.
2016-04-06 18:55:14 +02:00
Neels Hofmeyr
8f4cd86904
ranap_parse_lai(): add LAC size check, and log all parse errors
2016-04-06 18:55:14 +02:00
Daniel Willmann
635fac0c3e
ranap: Add custom ranap_decode_rab_setupormodifieditemies() function
2016-02-18 16:02:37 +01:00
Daniel Willmann
4870b995ec
ranap_common: Add helper function to get IP from transport layer addr
2016-02-18 13:21:35 +01:00
Neels Hofmeyr
96979af054
move ranap_*.h,iu_helpers.h to include/osmocom/ranap/
...
A bit hacky: the ranap_ies_defs.h is generated together with the
ranap_encoder.c and ranap_decoder.c. See comments in src/Makefile.am and
include/osmocom/ranap/Makefile.am.
2016-01-05 15:37:23 +01:00
Harald Welte
bdf3fd1dc4
don't include hnbgw.h from ranap header files
...
To use libosmo-ranap from outside of this repository, we need to
eliminated all dependencies to local header files
2016-01-03 17:25:51 +01:00
Harald Welte
e311ae078a
ranap: Allocate msgb's with headroom for SCCP User primitive pushing
2015-12-26 23:41:14 +01:00
Harald Welte
37704d907d
ranap_common.c: Add ranap_parse_lai()
2015-12-26 08:42:31 +01:00
Harald Welte
efef6fb4de
ranap_common: Add value_string for procedure code and presence
2015-12-25 15:35:01 +01:00
Harald Welte
3d39f84233
ranap_common: Add ranap_cause_str() to stringify RANAP Cause
2015-12-25 09:40:07 +01:00
Harald Welte
f42317ba9c
Introduce DRANAP/DRUA log categories to separate logging
2015-12-23 15:37:17 +01:00
Harald Welte
16232780d8
ranap_common: Fix error cleanup path while generating IE Pair
2015-12-18 17:22:04 +01:00
Harald Welte
04329dcbdc
{hnbap,rua,ranap}_common: check for encoding errors in new_ie()
2015-12-18 15:18:13 +01:00
Harald Welte
629391321f
{hnbap,ranap,rua}_common: use FREEMEM(), not free() directly
...
If we allocate with CALLOC/MALLOC macros, we need to release memory via the
same API.
2015-12-18 14:58:34 +01:00
Harald Welte
9c397d4969
ranap: Use CALLOC() macro of libasn1c
...
we don't use malloc() directly, as that doesn't mix well with
our libasn1c using talloc.
2015-12-18 13:35:58 +01:00
Harald Welte
2676554c92
ranap: Ensure we free any intermediate dynamically allocated memory
2015-12-18 13:35:58 +01:00
Harald Welte
ace1d24d34
ranap_common: Add function to wrap IEs into a RANAP_ProtocolIE_FieldPair_t
...
The FieldPair is a strange construct of RANAP Radio Access Bearer
assignment, where certain IEs appear in pairs.
2015-12-16 23:07:19 +01:00
Harald Welte
c16117a22c
Add ranap_generate_outcome() function
...
Ranap has not only successsful and unsuccessful outcome, but also
an unqualified general 'outcome'.
2015-12-16 20:30:11 +01:00
Harald Welte
8dacb07baf
{hnbap,rua,ranap}_common.c: Reduce code duplicatioon
...
There used to be a lot of code duplication between the code to generate
initiating, successfulOutcome and unsuccessfulOutcome messages. Try to
reduce that by callign a generic function.
2015-12-16 20:27:14 +01:00
Harald Welte
cbaaeefe00
{rua,hnbap,ranap}_common: Add missing encoding functions
...
We used to only have those generator functions that we needed for
the existing hnbgw code; Implement the missing encoders
2015-12-16 20:17:26 +01:00
Harald Welte
77847ad020
add copyright statement and AGPLv3 headers to source code files
2015-10-06 22:07:04 +02:00
Harald Welte
e2e5d4dd53
Back RUA/RANAP integration until RANAP Reset works for cs+ps
...
The hNodeB is now actively transmitting and we are getting up to the
HNBAP UE-REGISTER.req with the IMSI of the MS.
2015-09-10 23:49:45 +02:00
Harald Welte
350814a5cb
first dispatch of RUA into RANAP
...
This is becoming more and more of a hack, as asn1c + asn1tostruct.py
don't really deal well with the RANAP syntax :(
2015-09-10 22:32:15 +02:00
Harald Welte
ac9c024432
ranap: Add more manual definitions to RANAP-PDUs
...
It seems that individual IEs contain nested containers, and
asn1c is not generating code for that unless we help it by some
hand-crafted additional definitions. *sigh*
2015-09-10 21:18:16 +02:00