blob: 1f5dffb55d4701b706ba786ad655ba0c9a8d90a6 [file] [log] [blame]
Neels Hofmeyra1756f32016-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
29#include <stdint.h>
30#include <stdbool.h>
31
32#include <osmocom/core/logging.h>
33#include <osmocom/vty/logging.h>
34#include <osmocom/core/msgb.h>
35
36struct msgb;
37struct ue_conn_ctx;
38struct gsm_auth_tuple;
39struct RANAP_Cause;
40
41int iu_tx(struct msgb *msg, uint8_t sapi)
42{
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
48int iu_tx_sec_mode_cmd(struct ue_conn_ctx *uectx, struct gsm_auth_tuple *tp,
49 int send_ck)
50{
51 LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_sec_mode_cmd() dummy called, NOT transmitting Security Mode Command\n");
52 return 0;
53}
54
55int iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac)
56{
57 LOGP(DLGLOBAL, LOGL_INFO, "iu_page_cs() dummy called, NOT paging\n");
58 return 23;
59}
60
61int iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t rac)
62{
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
75int iu_rab_act(struct ue_conn_ctx *ue_ctx, struct msgb *msg)
76{
77 LOGP(DLGLOBAL, LOGL_INFO, "iu_rab_act() dummy called, NOT activating RAB\n");
78 return 0;
79}
80
81int iu_tx_common_id(struct ue_conn_ctx *uectx, const char *imsi)
82{
83 LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_common_id() dummy called, NOT sending CommonID\n");
84 return 0;
85}
86
87int iu_tx_release(struct ue_conn_ctx *ctx, const struct RANAP_Cause *cause)
88{
89 LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_release() dummy called, NOT sending Release\n");
90 return 0;
91}
92
93#endif