Commit Graph

231 Commits

Author SHA1 Message Date
Harald Welte 056984fab1 merge (+rename) iu_helpers.c into libosmo-ranap 2016-01-03 16:31:31 +01:00
Harald Welte a95d5a5f51 Makefile restructuring; install ranap header files 2016-01-03 16:22:16 +01:00
Harald Welte 0322feb68c Introduce libosmo-ranap.so as shared RANAP lib
This shared RANAP library will be used not only by hnbgw, but also by
OsmoCSCN, OsmoSGSN.
2016-01-03 15:39:11 +01:00
Harald Welte 09806e7da4 import message sequence charts (ladder diagrams) for RUA/RANAP/NAS 2016-01-01 16:47:13 +01:00
Harald Welte a575ebfd0f test-ranap: Call new RANAP encoder functions from ranap_msg_factory.c 2016-01-01 16:47:13 +01:00
Harald Welte 74157f6120 ranap_msg_factory: Fix memory leaks in OCTET_STRING
the 'ies' types do not have a free() function, and thus we have to avoid using
any functions that dynamically allocate memory, such as OCTET_STRING_fromBuf.
2016-01-01 16:47:13 +01:00
Harald Welte 962da50e08 asn1helpers: Add new OCTET_STRING_noalloc
This assings the buffer + size of an OCTET_STRING without allocating a new
buffer and copying the data.
2016-01-01 16:47:13 +01:00
Harald Welte 1cdb81dd98 ranap_msg_factory: Mark 'RANAP_Cause_t *' as const 2016-01-01 16:47:13 +01:00
Harald Welte 37223d8218 ranap_msg_factory: functions for RAB and IU Release Request 2016-01-01 16:47:13 +01:00
Harald Welte 01de8d716a fix copy+paste mistakes when encoding GTP TEI in RAB Parameters 2015-12-29 19:10:48 +01:00
Harald Welte 05ac677840 make bitrates configurable in new_rab_par_data() 2015-12-29 19:10:11 +01:00
Harald Welte 4928797807 more verbose logging in various places 2015-12-29 19:00:35 +01:00
Harald Welte 7bccc98cf8 ranap_common_cn: Handle non-terminal 'outcome' for RAB-ASS.resp 2015-12-28 14:44:49 +01:00
Harald Welte a31e63ab39 ranap_common_cn: Fix typo 2015-12-28 13:19:35 +01:00
Harald Welte bfe49a2293 ranap_msg_factory.c: Use X.213 NSAP encoding for TransportLayerAddr 2015-12-28 13:14:52 +01:00
Harald Welte 2cf0d8f1eb ranap_msg_factory: CipheringInformation is optional in SecurityModeCommand 2015-12-28 13:13:47 +01:00
Harald Welte c371a42938 RANAP-PDU-Contents: fix syntax error regarding InitialUE-Message
With that syntax error, the RAC was not treated as a possible IE
in the InitialUE-Message, causing decoder failure.
2015-12-27 11:03:44 +01:00
Harald Welte 4e2783fc0f Dummy CN: Handle RANAP payload of DISCONNET.ind
In case of RANAP Release Complete, the DISCONNECT contains RANAP payload that
we'd like to parse and handle.
2015-12-26 23:49:52 +01:00
Harald Welte 0744d6f63e dummy CN: Handle Iu Release Request (respond with Release Command) 2015-12-26 23:45:18 +01:00
Harald Welte 1be24f1b0a dummy_cn_sua.c: Fix syntax errors 2015-12-26 23:44:28 +01:00
Harald Welte 2bc20f85c1 Dummy CN: Create a per-UE connection context and resolve it. 2015-12-26 23:43:48 +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 96e36eb675 remove ranap_parse_lai() from hnbgw_ranap.c 2015-12-26 23:40:54 +01:00
Harald Welte 5bea800fa7 More verbose logging (CS/PS domain) 2015-12-26 23:40:31 +01:00
Harald Welte 552fdf144a Start to use SUA local referencs from 1000 upwards
... which allows us to detect sequence 0 as something that's wrong
(i.e. uninitalized)
2015-12-26 23:39:30 +01:00
Harald Welte 4009b36d74 context_map: Don't forget to store the SCU connection ID 2015-12-26 23:39:05 +01:00
Harald Welte 2ebe42fed7 properly resolve the cnlink from SUA signalling link 2015-12-26 23:38:38 +01:00
Harald Welte cee5a2878b don't double-free msgb's in rua_helper and ranap_common_cn 2015-12-26 08:43:31 +01:00
Harald Welte 3aad6af6a4 add 'dummy cn' as a stub core netwrok element to which hnbgw connects 2015-12-26 08:43:04 +01:00
Harald Welte 37704d907d ranap_common.c: Add ranap_parse_lai() 2015-12-26 08:42:31 +01:00
Harald Welte 8c572fee2a use libosmocore SCCP_SSN_RANAP definition 2015-12-26 08:42:07 +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 87ffeb91dc factor out some common shared test init code 2015-12-25 15:34:22 +01:00
Harald Welte 3cfa450fdc Add new common RANAP parsing code for CN elements 2015-12-25 15:33:41 +01:00
Harald Welte 706213ac4b Fix typo / spelling mistakes 2015-12-25 10:33:09 +01:00
Harald Welte 2963ee2505 hnbgw_hnbap: Print HNBAP Cause during UE De-Register 2015-12-25 10:32:37 +01:00
Harald Welte 831e1ee8f4 hnbgw_rua.c: Print RUA cause in error indication 2015-12-25 10:28:55 +01:00
Harald Welte 23058e1144 hnbgw_ranap: Print RANAP Cause in RESET and ERROR INDICATION 2015-12-25 10:25:01 +01:00
Harald Welte c3ca7eba18 don't return undefined strings from rua_cause_str() 2015-12-25 10:17:17 +01:00
Harald Welte 3d39f84233 ranap_common: Add ranap_cause_str() to stringify RANAP Cause 2015-12-25 09:40:07 +01:00
Alexander Huemer ef8934612c fix build if depenedencies are in distinct directories 2015-12-24 16:15:17 +01:00
Harald Welte 7ac7e048b4 add rua_helper.[ch] missing from previous commit 2015-12-24 15:53:30 +01:00
Harald Welte c3851220db hnb-test: Add VTY to manually issue Iuh messages
We can now send Iuh messages with commands like 'hnbap hnb register',
'hnbap ue regiter imsi 12345', 'ranap reset cs', 'ranap reset ps',
and even establish connection-oriented RUA using
'channel cs lu imsi 12345'
2015-12-24 15:41:21 +01:00
Harald Welte f9c9aa5f20 ranap_msg_factory.c: Fix compiler warnings 2015-12-24 15:39:00 +01:00
Harald Welte 57d873392c ranap_msg_factory: use OCTET_STRING_fromBuf() in ranap_new_msg_dt()
When using asn1c, we cannot use buffers allocated elsewhere and/or on
the stack as input into encoding.
2015-12-24 15:33:21 +01:00
Harald Welte ea98b6f6d6 ranap: New ranap_new_msg_initial_ue() funcition
for testing, it is useful if we can also generate an InitialUE
message - even though a HNB-GW only needs to receive it.
2015-12-24 15:09:06 +01:00
Harald Welte afcaac08ee asn1helpers.h: Add missing declarations of functions in asn1helpers.c 2015-12-24 15:03:11 +01:00
Harald Welte b0de90639b hnbgw_rua.c: Incoming context IDs are 24bit wide according to spec
so don't try to decode them to u32, which expects 32bit input values.
2015-12-24 14:10:17 +01:00
Harald Welte c89c2a6e6a RANAP: Replace the last remainng TBCD-STRING with OCTET STRING
in order to work around a bug in asn1c.  When we keep the original
TBCD-STRING, the APER-encoded PLMNidentity always has an extra leading
length byte that the decoder doesn't expect.
2015-12-24 14:07:05 +01:00
Harald Welte 37166a27ca improve logging, remove obsolete FIXMEs, return of non-void functions 2015-12-24 10:12:09 +01:00