Commit Graph

343 Commits

Author SHA1 Message Date
Neels Hofmeyr 5f9be1ed5e hnb-test: make hnb-gw address configurable 2016-02-29 13:33:44 +01:00
Neels Hofmeyr ae93712977 hnb-test: add messages leading to Location Update Accept
But note, authentication is not there yet; the CSCN should initiate that.
2016-02-29 10:02:10 +01:00
Neels Hofmeyr 5c1cc8cce4 hnb-test: replace some hex vals with GSM48_* constants 2016-02-29 10:02:10 +01:00
Neels Hofmeyr c164a97bc6 hnb-test-ranap.c: fix missing return 2016-02-29 10:02:10 +01:00
Neels Hofmeyr e1f709fa51 hnb-test fix id resp 2016-02-29 10:02:10 +01:00
Neels Hofmeyr 860a12977c hnb-test: attempt to reply to an MM Identity Request 2016-02-29 10:02:10 +01:00
Neels Hofmeyr b984f36f58 hnb-test: decode NAS pdu when receiving RUA from CN 2016-02-29 10:02:10 +01:00
Neels Hofmeyr 32828708b2 hnb-test: tweak comment 2016-02-29 10:02:10 +01:00
Neels Hofmeyr 7b81128d44 hnb-test: comment on gen_initue_lu() IMSI 2016-02-29 10:02:10 +01:00
Neels Hofmeyr 0968a58836 hnb-test: some rua rx printfs 2016-02-24 20:51:04 +01:00
Neels Hofmeyr a0d21479a7 osmo-hnbgw, hnb-test: allow configuring VTY address 2016-02-24 20:51:04 +01:00
Neels Hofmeyr 8f67f8e83c test-ranap.ok: fix expectations after commit 49f99cd26
49f99cd26: 'ranap_msg_factory: Use network byte order for 16 bit mode_versions field'
2016-02-20 15:23:12 +01: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
Daniel Willmann 49f99cd265 ranap_msg_factory: Use network byte order for 16 bit mode_versions field
Instead of 0x0001 the field was 0x0100
2016-02-18 13:21:35 +01:00
Neels Hofmeyr de111bc1f8 hnbgw: fix errmsg typo 2016-02-18 01:31:30 +01:00
Neels Hofmeyr 110bb5c9af hnbgw vty: add logging commands 2016-02-18 01:30:42 +01:00
Neels Hofmeyr 6a62e549cd hnb-test: fix wrong domain indicator in ranap.
ranap_new_msg_initial_ue() called with wrong argument order.
2016-02-18 01:30:42 +01:00
Neels Hofmeyr b9f46a7434 dummy_cn_sua: missing include 2016-02-18 01:30:42 +01:00
Neels Hofmeyr 44beab9c3b hnbgw: hnb_context_alloc(): fix missing free, missing return, wrong error return type
Also move INIT_LLIST_HEAD further up for good measure (cosmetic).
2016-02-18 01:30:42 +01:00
Daniel Willmann 5f8c718786 hnbgw: Print out the hnbgw context map per HNB 2016-01-14 15:42:07 +01:00
Daniel Willmann 8592716116 hnb-test: Increment UE conn_id for each new loc_upd_req 2016-01-14 15:36:49 +01:00
Daniel Willmann b39bad1281 dummy_cn: Respond to initial UE message with empty ranap message 2016-01-14 15:36:12 +01:00
Daniel Willmann 4deab942cc hnbgw: Mark ps_cnlink as ps 2016-01-14 15:35:11 +01:00
Daniel Willmann defd29912c context_map: Have one mapping per UE/cnlink combination 2016-01-14 15:10:05 +01:00
Daniel Willmann 0118839829 Revert "hnbgw_hnbap: Zero IEs_t before decode is called"
This reverts commit a8b6b1e3a1.
Zeroing is now done inside of the decode function
2016-01-12 10:14:11 +01:00
Daniel Willmann a8b6b1e3a1 hnbgw_hnbap: Zero IEs_t before decode is called
This ensures that presenceMask is zero and optional fields will be freed
correctly.
This needs to happen for ranap and rua as well.
2016-01-07 18:01:06 +01: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
Daniel Willmann 11e912aa6e Free ies struct after use in tests and hnbgw_cn/rua 2016-01-07 13:19:30 +01:00
Daniel Willmann b02d77c2c1 tests/dummy_cn_sua.c: Fix ranap_common_cn include 2016-01-07 12:59:21 +01:00
Daniel Willmann d10002cf8d asn1tostruct: Add memory free functions and use them in HNBAP 2016-01-07 12:27:41 +01:00
Daniel Willmann b433b97474 hnbgw_hnbap: Handle hnb deregister message as well 2016-01-07 11:01:15 +01:00
Daniel Willmann 1ee089f37a hnbgw: When a HNB is released release associated UEs as well 2016-01-07 11:01:15 +01:00
Daniel Willmann 6480cadd8e hnbgw: Use libosmo-netif for SCCP connection handling 2016-01-07 11:01:12 +01:00
Daniel Willmann 8fda362dd8 Correct postprocessing of generated files
Rewrite ranap_common.h include path in ranap_ies_defs.h as well
Don't move ranap_ies_defs.h to the install directory, but move it inside
the source tree
2016-01-07 10:52:52 +01:00
Harald Welte f3d2c74250 also 'sed' the include path of the ranap_common.h file 2016-01-06 19:53:48 +01:00
Harald Welte 5c6bd5104e make ranap_common.cn.[ch] part of libosmo-ranap 2016-01-06 19:53:44 +01:00
Harald Welte 8fa5d558fb ranap_common_cn.c: Use call-backs rather than function calls
When we use call-back function pointers with ranap_cn_rx_c{o,l}()
functions, we can (soon) migrate it into libosmo-ranap without an
application having to provide 'magic symbols' that the library expects
to be able to call.
2016-01-06 19:44:36 +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 bea34f26c2 hnbap_common.c: Fix include path 2016-01-05 14:24:08 +01:00
Neels Hofmeyr 0de6b94d71 rebuild en/decoders when asn1tostruct.py changed
Add asn1tostruct.py as dependency for the targets that use it, so that any
modification to the asn1tostruct.py regenerates everything related
automatically.
2016-01-05 12:59:58 +01:00
Neels Hofmeyr f193c221cf Fix -I in tests/ (broken by include dir changes) 2016-01-05 12:54:25 +01:00
Neels Hofmeyr f1f2d7ca19 Remove osmo-iuh subdir level from include/ (2/2)
Make all changes to #include statements and build files.
2016-01-05 12:00:06 +01:00
Neels Hofmeyr c04a96c476 move asn1 headers to include/ dir (5/5)
Do all remaining changes necessary for a working build.

Add Makefile.am files in include/... subdirs.

Remove noinst_HEADERS directives from src/*/Makefile.am, but keep the headers
list to feed to move-asn1-header-files.sh.

Adjust all #includes in src/*_common.h and elsewhere. In hnbap_common.h,
separate the ASN.1 "primitive" headers from the others, and include them
without a subdir path, as before.
2016-01-04 18:11:19 +01:00
Neels Hofmeyr 16c97669bd move asn1 headers to include/ dir (4/5)
Move headers.
2016-01-04 18:11:19 +01:00
Neels Hofmeyr b0429374e2 move asn1 headers to include/ dir (2/5)
Show effects of the new sed step on asn1-generated files, without moving the
files.
2016-01-04 18:11:18 +01:00
Neels Hofmeyr 5aabad1380 move asn1 headers to include/ dir (1/5)
Add move-asn1-header-files.sh to do header file moving and sed'ding the include
statements. The file moving part is disabled until a later commit, to make
reading the diffs easier.

Call shell script from src/{hnbap,ranap,rua}/Makefile.am regen targets.

Add convenience regen target to src/Makefile.am, calling regen in the three subdirs.

This change is split over several commits to ease diff reading. Subsequent
commits show, in steps:
- the "unmoved" effect of sed,
- header moves,
- adjust build system and include statements.
2016-01-04 18:09:37 +01:00
Harald Welte b66c5d0e62 move tests/rua_helper.[ch] to src directory
The RUA Helper is not test-specific.
2016-01-03 18:04:28 +01:00
Harald Welte 1f6bd7b51c add test-ranap to testsuite 2016-01-03 18:01:05 +01:00
Harald Welte 06bc548cee steps towards making 'make distcheck' work
'make distcheck' checks for out-of-source-tree builds and whether
the distribution tarball includes all source files.  This commit
fixes many problems, except some remaining with src/test still
to-be-fixd.
2016-01-03 17:54:24 +01:00
Harald Welte e8a4dc6b70 move asn1helpers.[ch] to libasn1c
Those helper functions are not specific to osmo-iuh, so I moved
them to libasn1c, which also resolves the problem that libosmo-ranap
is depending on those helpers (and subsequently external programs
linking libosmo-ranap will need to have access to the helpers)
2016-01-03 17:25:57 +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 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 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 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
Harald Welte bc4560cf18 Implement forwarding of RANAP PAGING from CN to all HNBs 2015-12-24 08:46:58 +01:00
Harald Welte c4338deee9 hnbgw: Bring all parts together
We now have the RUA and SUA parts interconnected by the
context ID mapper, and should be able to pass messages back and forward
between both sides.

Unfortunately this touches a bit of everything, but the structures are
all still very much in flux.  Hopefully they will start to stabilize at
some point soon...
2015-12-24 00:41:45 +01:00
Harald Welte cd5e981490 hnbgw_rua: Don't use msgb as imput, allow more parameters 2015-12-23 22:14:16 +01:00
Harald Welte 90256bad58 Add a context mapper to map RUA ContextIDs <-> SUA Connection IDs 2015-12-23 22:13:53 +01:00
Harald Welte f42317ba9c Introduce DRANAP/DRUA log categories to separate logging 2015-12-23 15:37:17 +01:00
Alexander Huemer f6d0138d76 fix copy/paste mistake in src/Makefile.am 2015-12-23 13:56:23 +01:00
Harald Welte ffa7c0ad39 use msgb_sctp_ppid() from libosmo-netif, remove local declaration 2015-12-23 00:04:05 +01:00
Harald Welte 75a4e65f52 hnbgw: Add SUA client socket towards localhost
This socket doesn't do much yet except to connect to localhost:14001

The host/port needs to be made configurable, and the RUA<->SUA
interfacing needs to be implemented.

Also, we'll need two SUA sockets, one for MSC and one for SGSN.
2015-12-23 00:04:05 +01:00
Daniel Willmann 269b8ac7ee hnbgw: Free msgb when connection is closed 2015-12-22 16:40:46 +01:00
Daniel Willmann 541e429a39 hnbgw_hnbap.c: Clean up after encoding a UE register accept
Need to free the ASN.1 structs after using them to encode the UE
register accept message.
2015-12-22 16:40:46 +01:00
Neels Hofmeyr c51f735b35 really fix src/Makefile.am
Add BUILT_SOURCES to src/Makefile.am.

(And remove a stray space.)
2015-12-22 12:27:02 +01:00
Alexander Huemer fec171d8b4 fix Makefile.am 2015-12-22 12:24:27 +01:00
Harald Welte 71f73a2919 move COPYING file to root directory 2015-12-21 21:01:00 +01:00
Harald Welte ef5055c275 Makefile.am: Try to model the asn1tostruct.py generation dependencies 2015-12-21 17:50:11 +01:00
Harald Welte b2daa0d803 ranap ASN.1: Define IMSI as OCTET STRING to work around asn1c bug
When IMSI is a TBCD-STRING type, and TBCD-STRING is defined as OCTET
STRING, we end up encoding the IMSI the wrong way.  I don't knwo why
that is, but changing it fixed the problem, as described below:

before this commit:
00 17                           PeranentNAS-UE-ID
40                              criticality ignore
0a                              (length)
00                              presence = IMSI
08                              BUG: why the additional length field?
46 23 91 34 70 77 80 f3         IMSI (643219430777083)

after this commit:
00 17                           PeranentNAS-UE-ID
40                              criticality ignore
09                              (length)
50                              presence = IMSI
46 23 91 34 70 77 80 f3         IMSI (643219430777083)
2015-12-19 13:05:19 +01:00
Harald Welte 0a3eafee45 ranap: Don' shift the RAB ID by 3 bits 2015-12-19 02:38:09 +01:00
Harald Welte 94a62d591d ranap: No need for htonl() of IP addresses and the like 2015-12-19 02:37:48 +01:00
Harald Welte b7f67c4b14 ranap: Don't forget ProtocolIE-CointainerPair around ProtocolIE-FieldPair 2015-12-19 02:37:35 +01:00
Harald Welte de9055f142 Makefile.am: Replace .PHONY asn1tostruct.py rules
asn1tostruct.py generates three files.  Try to teach the makefile that
all three of them depend on the .asn source file to ensure they're
re-built whenever the .asn source file changes.
2015-12-18 20:20:51 +01:00
Harald Welte f8db61b554 First compiling (and leak-free) RANAP message generation functions
encoding correctness still needs to be verified at this point.  At least
they generate some binary output without failing somewhere earlier in
the encoding process - and they don't leave any leaked memory behind,
see talloc_report() at the end of test-ranap.c:main().
2015-12-18 20:20:47 +01:00
Harald Welte fcabec3665 implement BIT_STRING_fromBuf() similar to OCTET_STRING_fromBuf() 2015-12-18 17:51:50 +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 8526d158f8 hnbap/rua: Don't usse malloc() directly but use CALLOC() macro 2015-12-18 13:41:39 +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 d062df5307 test-ranap.c: Further WIP, it now actually compiles 2015-12-18 13:35:58 +01:00
Harald Welte 93690184b0 RANAP: Split FormatInformationParameter / SDUParameterItem
The definition of the above data types as per 3GPP specs results in a
SEQUENCE_OF() an anonymous structure, which is slightly inconvenient to
use.  So let's split the SEQUENCE OF part and the actual definition of
the item in separate types.
2015-12-18 13:35:58 +01:00
Harald Welte 091039d47e test-ranap.c: More WIP code for convoluted RANAP message encoding 2015-12-18 13:35:58 +01:00
Daniel Willmann 141a0baac9 hnb-test: Add an option to transmit multiple UE register/deregister msgs 2015-12-17 18:03:52 +01:00
Daniel Willmann 28b9ec1473 Enable vty command to output talloc report
I don't think I can print this into a string and thus output it via VTY.
In that case it might be smarte to do in a signal handler
2015-12-17 18:02:37 +01:00
Daniel Willmann 5f810f4222 hnbgw_hnbap: Initialize return value and always return something 2015-12-17 17:57:51 +01:00
Daniel Willmann 59d17d8961 hnbap: Free ASN.1 components after they are no longer needed 2015-12-17 17:56:56 +01:00
Daniel Willmann 6637a289da hnb-test: Handle closed connections correctly 2015-12-17 14:47:51 +01:00
Daniel Willmann 19dedbb6b1 hnb-test: Send UE de-register after receiving the UE registration accept 2015-12-17 13:09:37 +01:00
Daniel Willmann 92856e6ef2 hnb-test.c: Remove pdus.h include as it is not used
The messages are constructed so no need to include the binary asn1 data.
2015-12-17 13:09:37 +01:00
Daniel Willmann 3279780557 hnb-test: Add HNBAP category and reduce MAIN loglevel to INFO 2015-12-17 13:09:18 +01:00
Daniel Willmann bded9841b5 hnbgw: Change logging priorities and add HNBAP category
Log hnbap messages to the HNBAP category. Change MAIN category to only
log INFO and above and change SCTP notification message to debug.
2015-12-17 13:09:18 +01:00
Daniel Willmann efceb187aa hnbgw_hnbap: Process UEDeRegister and try to free correct UE 2015-12-17 13:09:18 +01:00
Daniel Willmann 4267a29ee0 hnbgw: Handle closed connections correctly
We still need to clean up the HNB data structures after the connection
is closed
2015-12-17 13:09:18 +01:00
Daniel Willmann 7c27f7b792 hnbgw: Lower level of SCTP notif. msg to debug and set default log level to info 2015-12-17 13:08:32 +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 462db35426 hnbap_common: Fix copy+paste mistake (use hnbap msgb allocator) 2015-12-16 23:06:59 +01:00
Harald Welte d328c1a3ac WIP: add some early code for generating required RANAP messages 2015-12-16 23:04:21 +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