aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/hnb-test-rua.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-04-19 18:09:05 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-04-19 18:19:31 +0200
commit5ad72b91bb601f9b9765beeb861191f810f79f65 (patch)
treee2cb4081590c9fe7609eea324593cf0923817d67 /src/tests/hnb-test-rua.c
parentd045ceb5f01a81fcfbd2b99b2dbc17c53103d6ce (diff)
hnb-test: receive Paging, add CL rx
Add ability to receive ConnectionLess transfers in order to read the Paging and (so far only) print the IMSI paged for.
Diffstat (limited to 'src/tests/hnb-test-rua.c')
-rw-r--r--src/tests/hnb-test-rua.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/hnb-test-rua.c b/src/tests/hnb-test-rua.c
index e3f44c5..69c41eb 100644
--- a/src/tests/hnb-test-rua.c
+++ b/src/tests/hnb-test-rua.c
@@ -21,3 +21,20 @@ void hnb_test_rua_dt_handle(struct hnb_test *hnb, ANY_t *in)
rua_free_directtransferies(&ies);
}
+void hnb_test_rua_cl_handle(struct hnb_test *hnb, ANY_t *in)
+{
+ RUA_ConnectionlessTransferIEs_t ies;
+ int rc;
+
+ rc = rua_decode_connectionlesstransferies(&ies, in);
+ if (rc < 0) {
+ printf("failed to decode RUA CL IEs\n");
+ return;
+ }
+
+ rc = ranap_cn_rx_cl(hnb_test_rua_cl_handle_ranap, hnb, ies.ranaP_Message.buf, ies.ranaP_Message.size);
+
+ /* FIXME: what to do with the asn1c-allocated memory */
+ rua_free_connectionlesstransferies(&ies);
+}
+