aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-07-05 15:19:52 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-12 23:42:47 +0200
commitb271e460490131f7d9c4873057b7ebe0826803b8 (patch)
tree47d48f4eb6ce2f47020e8ed0d36e446adc3be51d /tests
parente97d8754cae116469a7c6fc6c24eb5836dc5245d (diff)
move libiu to osmo-iuh/libosmo-ranapaoip
Remove libiu here, use the functions from libosmo-ranap instead, by applying the ranap_ / RANAP_ prefix. Corresponding change-id in osmo-iuh.git is I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0 Change-Id: Ib8c4fcdb4766c5e575618b95ce16dce51063206b
Diffstat (limited to 'tests')
-rw-r--r--tests/libiudummy/iudummy.c21
-rw-r--r--tests/msc_vlr/Makefile.am4
-rw-r--r--tests/msc_vlr/msc_vlr_tests.c20
-rw-r--r--tests/sgsn/Makefile.am1
4 files changed, 23 insertions, 23 deletions
diff --git a/tests/libiudummy/iudummy.c b/tests/libiudummy/iudummy.c
index f764253b..d4236874 100644
--- a/tests/libiudummy/iudummy.c
+++ b/tests/libiudummy/iudummy.c
@@ -6,32 +6,33 @@
#include <osmocom/core/msgb.h>
struct msgb;
-struct ue_conn_ctx;
+struct ranap_ue_conn_ctx;
struct gsm_auth_tuple;
struct RANAP_Cause;
struct osmo_sccp_addr;
+struct osmo_auth_vector;
-int iu_tx(struct msgb *msg, uint8_t sapi)
+int ranap_iu_tx(struct msgb *msg, uint8_t sapi)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_tx() dummy called, NOT transmitting %d bytes: %s\n",
msg->len, osmo_hexdump(msg->data, msg->len));
return 0;
}
-int iu_tx_sec_mode_cmd(struct ue_conn_ctx *uectx, struct gsm_auth_tuple *tp,
- int send_ck)
+int ranap_iu_tx_sec_mode_cmd(struct ranap_ue_conn_ctx *uectx, struct osmo_auth_vector *vec,
+ int send_ck)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_sec_mode_cmd() dummy called, NOT transmitting Security Mode Command\n");
return 0;
}
-int iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac)
+int ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_page_cs() dummy called, NOT paging\n");
return 23;
}
-int iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t rac)
+int ranap_iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t rac)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_page_ps() dummy called, NOT paging\n");
return 0;
@@ -45,25 +46,25 @@ struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip,
return NULL;
}
-int iu_rab_act(struct ue_conn_ctx *ue_ctx, struct msgb *msg)
+int ranap_iu_rab_act(struct ranap_ue_conn_ctx *ue_ctx, struct msgb *msg)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_rab_act() dummy called, NOT activating RAB\n");
return 0;
}
-int iu_tx_common_id(struct ue_conn_ctx *uectx, const char *imsi)
+int ranap_iu_tx_common_id(struct ranap_ue_conn_ctx *uectx, const char *imsi)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_common_id() dummy called, NOT sending CommonID\n");
return 0;
}
-int iu_tx_release(struct ue_conn_ctx *ctx, const struct RANAP_Cause *cause)
+int ranap_iu_tx_release(struct ranap_ue_conn_ctx *ctx, const struct RANAP_Cause *cause)
{
LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_release() dummy called, NOT sending Release\n");
return 0;
}
-struct ue_conn_ctx *ue_conn_ctx_alloc(struct osmo_sccp_addr *addr, uint32_t conn_id)
+struct ranap_ue_conn_ctx *ranap_ue_conn_ctx_alloc(struct osmo_sccp_addr *addr, uint32_t conn_id)
{
LOGP(DLGLOBAL, LOGL_INFO, "ue_conn_ctx_alloc() dummy called, NOT allocating UE context\n");
return NULL;
diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am
index ab0714eb..a2b0f088 100644
--- a/tests/msc_vlr/Makefile.am
+++ b/tests/msc_vlr/Makefile.am
@@ -65,8 +65,8 @@ LDFLAGS = \
-Wl,--wrap=gsup_client_send \
-Wl,--wrap=a_iface_tx_dtap \
-Wl,--wrap=a_iface_tx_paging \
- -Wl,--wrap=iu_tx \
- -Wl,--wrap=iu_page_cs \
+ -Wl,--wrap=ranap_iu_tx \
+ -Wl,--wrap=ranap_iu_page_cs \
-Wl,--wrap=msc_stop_paging \
-Wl,--wrap=gsm340_gen_scts \
-Wl,--wrap=RAND_bytes \
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 75786bac..0a485b4a 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -30,11 +30,11 @@
#include <osmocom/core/application.h>
#include <osmocom/gsm/protocol/gsm_04_11.h>
#include <osmocom/gsm/gsup.h>
+#include <osmocom/ranap/iu_client.h>
#include <openbsc/gsup_client.h>
#include <openbsc/gsm_04_11.h>
#include <openbsc/bsc_subscriber.h>
#include <openbsc/debug.h>
-#include <openbsc/iu.h>
#include <openbsc/iucs_ranap.h>
#include "msc_vlr_tests.h"
@@ -147,8 +147,8 @@ struct gsm_subscriber_connection *conn_new(void)
conn->bts = the_bts;
conn->via_ran = rx_from_ran;
if (conn->via_ran == RAN_UTRAN_IU) {
- struct ue_conn_ctx *ue_ctx = talloc_zero(conn, struct ue_conn_ctx);
- *ue_ctx = (struct ue_conn_ctx){
+ struct ranap_ue_conn_ctx *ue_ctx = talloc_zero(conn, struct ranap_ue_conn_ctx);
+ *ue_ctx = (struct ranap_ue_conn_ctx){
.conn_id = 42,
};
conn->iu.ue_ctx = ue_ctx;
@@ -290,9 +290,9 @@ int _paging_sent(enum ran_type via_ran, const char *imsi, uint32_t tmsi, uint32_
return 1;
}
-/* override, requires '-Wl,--wrap=iu_page_cs' */
-int __real_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac);
-int __wrap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac)
+/* override, requires '-Wl,--wrap=ranap_iu_page_cs' */
+int __real_ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac);
+int __wrap_ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac)
{
return _paging_sent(RAN_UTRAN_IU, imsi, tmsi ? *tmsi : GSM_RESERVED_TMSI, lac);
}
@@ -461,9 +461,9 @@ int _validate_dtap(struct msgb *msg, enum ran_type to_ran)
return 0;
}
-/* override, requires '-Wl,--wrap=iu_tx' */
-int __real_iu_tx(struct msgb *msg, uint8_t sapi);
-int __wrap_iu_tx(struct msgb *msg, uint8_t sapi)
+/* override, requires '-Wl,--wrap=ranap_iu_tx' */
+int __real_ranap_iu_tx(struct msgb *msg, uint8_t sapi);
+int __wrap_ranap_iu_tx(struct msgb *msg, uint8_t sapi)
{
return _validate_dtap(msg, RAN_UTRAN_IU);
}
@@ -604,7 +604,7 @@ void ms_sends_security_mode_complete()
OSMO_ASSERT(g_conn->iu.ue_ctx);
/* TODO mock IEs or call vlr callback directly */
iucs_rx_ranap_event(g_conn->network, g_conn->iu.ue_ctx,
- IU_EVENT_SECURITY_MODE_COMPLETE,
+ RANAP_IU_EVENT_SECURITY_MODE_COMPLETE,
NULL);
}
diff --git a/tests/sgsn/Makefile.am b/tests/sgsn/Makefile.am
index f1606cb9..ccb8f44f 100644
--- a/tests/sgsn/Makefile.am
+++ b/tests/sgsn/Makefile.am
@@ -74,7 +74,6 @@ sgsn_test_LDADD = \
if BUILD_IU
sgsn_test_LDADD += \
- $(top_builddir)/src/libiu/libiu.a \
$(LIBOSMORANAP_LIBS) \
$(LIBOSMOSIGTRAN_LIBS) \
$(LIBASN1C_LIBS) \