Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 1 | /* 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 Hofmeyr | 9084396 | 2017-09-04 15:04:35 +0200 | [diff] [blame] | 29 | #include <osmocom/msc/iu_dummy.h> |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 30 | |
| 31 | #include <osmocom/core/logging.h> |
| 32 | #include <osmocom/vty/logging.h> |
| 33 | #include <osmocom/core/msgb.h> |
| 34 | |
| 35 | struct msgb; |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 36 | struct ranap_ue_conn_ctx; |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 37 | struct RANAP_Cause; |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 38 | struct osmo_auth_vector; |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 39 | |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 40 | int ranap_iu_tx(struct msgb *msg, uint8_t sapi) |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 41 | { |
| 42 | LOGP(DLGLOBAL, LOGL_INFO, "iu_tx() dummy called, NOT transmitting %d bytes: %s\n", |
| 43 | msg->len, osmo_hexdump(msg->data, msg->len)); |
| 44 | return 0; |
| 45 | } |
| 46 | |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 47 | int ranap_iu_tx_sec_mode_cmd(struct ranap_ue_conn_ctx *uectx, struct osmo_auth_vector *vec, |
| 48 | int send_ck) |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 49 | { |
| 50 | LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_sec_mode_cmd() dummy called, NOT transmitting Security Mode Command\n"); |
| 51 | return 0; |
| 52 | } |
| 53 | |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 54 | int ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac) |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 55 | { |
| 56 | LOGP(DLGLOBAL, LOGL_INFO, "iu_page_cs() dummy called, NOT paging\n"); |
| 57 | return 23; |
| 58 | } |
| 59 | |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 60 | int ranap_iu_page_ps(const char *imsi, const uint32_t *ptmsi, uint16_t lac, uint8_t rac) |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 61 | { |
| 62 | LOGP(DLGLOBAL, LOGL_INFO, "iu_page_ps() dummy called, NOT paging\n"); |
| 63 | return 0; |
| 64 | } |
| 65 | |
| 66 | struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, |
| 67 | uint16_t rtp_port, |
| 68 | bool use_x213_nsap) |
| 69 | { |
| 70 | LOGP(DLGLOBAL, LOGL_INFO, "ranap_new_msg_rab_assign_voice() dummy called, NOT composing RAB Assignment\n"); |
| 71 | return NULL; |
| 72 | } |
| 73 | |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 74 | int ranap_iu_rab_act(struct ranap_ue_conn_ctx *ue_ctx, struct msgb *msg) |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 75 | { |
| 76 | LOGP(DLGLOBAL, LOGL_INFO, "iu_rab_act() dummy called, NOT activating RAB\n"); |
| 77 | return 0; |
| 78 | } |
| 79 | |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 80 | int ranap_iu_tx_common_id(struct ranap_ue_conn_ctx *uectx, const char *imsi) |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 81 | { |
| 82 | LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_common_id() dummy called, NOT sending CommonID\n"); |
| 83 | return 0; |
| 84 | } |
| 85 | |
Neels Hofmeyr | 00e82d6 | 2017-07-05 15:19:52 +0200 | [diff] [blame] | 86 | int ranap_iu_tx_release(struct ranap_ue_conn_ctx *ctx, const struct RANAP_Cause *cause) |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 87 | { |
| 88 | LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_release() dummy called, NOT sending Release\n"); |
| 89 | return 0; |
| 90 | } |
| 91 | |
Daniel Willmann | 6fbd3bf | 2018-02-15 10:33:21 +0100 | [diff] [blame] | 92 | uint32_t iu_get_conn_id(const struct ranap_ue_conn_ctx *ue) |
| 93 | { |
| 94 | LOGP(DLGLOBAL, LOGL_INFO, "iu_get_conn_id() dummy called, returning BOGUS value\n"); |
| 95 | return 23; |
| 96 | } |
| 97 | |
Neels Hofmeyr | 84da6b1 | 2016-05-20 21:59:55 +0200 | [diff] [blame] | 98 | #endif |