blob: bb5336770523502ef132c520f020cf85cf9fe265 [file] [log] [blame]
Neels Hofmeyr84da6b12016-05-20 21:59:55 +02001/* Trivial switch-off of external Iu dependencies,
2 * allowing to run full unit tests even when built without Iu support. */
3
4/*
5 * (C) 2016,2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
6 *
7 * Author: Neels Hofmeyr <nhofmeyr@sysmocom.de>
8 *
9 * All Rights Reserved
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Affero General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Affero General Public License for more details.
20 *
21 * You should have received a copy of the GNU Affero General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 *
24 */
25
26#include "../../bscconfig.h"
27#ifndef BUILD_IU
28
Neels Hofmeyr90843962017-09-04 15:04:35 +020029#include <osmocom/msc/iu_dummy.h>
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020030
31#include <osmocom/core/logging.h>
32#include <osmocom/vty/logging.h>
33#include <osmocom/core/msgb.h>
34
35struct msgb;
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020036struct ranap_ue_conn_ctx;
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020037struct gsm_auth_tuple;
38struct RANAP_Cause;
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020039struct osmo_auth_vector;
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020040
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020041int ranap_iu_tx(struct msgb *msg, uint8_t sapi)
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020042{
43 LOGP(DLGLOBAL, LOGL_INFO, "iu_tx() dummy called, NOT transmitting %d bytes: %s\n",
44 msg->len, osmo_hexdump(msg->data, msg->len));
45 return 0;
46}
47
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020048int ranap_iu_tx_sec_mode_cmd(struct ranap_ue_conn_ctx *uectx, struct osmo_auth_vector *vec,
49 int send_ck)
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020050{
51 LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_sec_mode_cmd() dummy called, NOT transmitting Security Mode Command\n");
52 return 0;
53}
54
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020055int ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac)
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020056{
57 LOGP(DLGLOBAL, LOGL_INFO, "iu_page_cs() dummy called, NOT paging\n");
58 return 23;
59}
60
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020061int ranap_iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t rac)
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020062{
63 LOGP(DLGLOBAL, LOGL_INFO, "iu_page_ps() dummy called, NOT paging\n");
64 return 0;
65}
66
67struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip,
68 uint16_t rtp_port,
69 bool use_x213_nsap)
70{
71 LOGP(DLGLOBAL, LOGL_INFO, "ranap_new_msg_rab_assign_voice() dummy called, NOT composing RAB Assignment\n");
72 return NULL;
73}
74
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020075int ranap_iu_rab_act(struct ranap_ue_conn_ctx *ue_ctx, struct msgb *msg)
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020076{
77 LOGP(DLGLOBAL, LOGL_INFO, "iu_rab_act() dummy called, NOT activating RAB\n");
78 return 0;
79}
80
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020081int ranap_iu_tx_common_id(struct ranap_ue_conn_ctx *uectx, const char *imsi)
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020082{
83 LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_common_id() dummy called, NOT sending CommonID\n");
84 return 0;
85}
86
Neels Hofmeyr00e82d62017-07-05 15:19:52 +020087int ranap_iu_tx_release(struct ranap_ue_conn_ctx *ctx, const struct RANAP_Cause *cause)
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020088{
89 LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_release() dummy called, NOT sending Release\n");
90 return 0;
91}
92
Daniel Willmann6fbd3bf2018-02-15 10:33:21 +010093uint32_t iu_get_conn_id(const struct ranap_ue_conn_ctx *ue)
94{
95 LOGP(DLGLOBAL, LOGL_INFO, "iu_get_conn_id() dummy called, returning BOGUS value\n");
96 return 23;
97}
98
Neels Hofmeyr84da6b12016-05-20 21:59:55 +020099#endif