From 61692adb2b0cd090c8fb8c81376a28bca099d079 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 20 May 2016 21:59:55 +0200 Subject: Implement IuCS (large refactoring and addition) osmo-nitb becomes osmo-msc add DIUCS debug log constant add iucs.[hc] add msc vty, remove nitb vty add libiudummy, to avoid linking Iu deps in tests Use new msc_tx_dtap() instead of gsm0808_submit_dtap() libmgcp: add mgcpgw client API bridge calls via mgcpgw mgcp: hack RAB success from nano3G: patch first RTP payload The ip.access nano3G needs the first RTP payload's first two bytes to read hex 'e400', or it will reject the RAB assignment. Add flag patched_first_rtp_payload to mgcp_rtp_state to detect the first RTP payload on a stream, and overwrite its first bytes with e400. This should probably be configurable, but seems to not harm other femto cells (as long as we patch only the first RTP payload in each stream). Only do this when sending to the BTS side. Change-Id: Ie13ff348117e892d41b8355ab6c24915301eaeaf --- openbsc/tests/libiudummy/iudummy.c | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 openbsc/tests/libiudummy/iudummy.c (limited to 'openbsc/tests/libiudummy/iudummy.c') diff --git a/openbsc/tests/libiudummy/iudummy.c b/openbsc/tests/libiudummy/iudummy.c new file mode 100644 index 000000000..9dae94116 --- /dev/null +++ b/openbsc/tests/libiudummy/iudummy.c @@ -0,0 +1,63 @@ +#include +#include + +#include +#include +#include + +struct msgb; +struct ue_conn_ctx; +struct gsm_auth_tuple; +struct RANAP_Cause; + +int 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) +{ + 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) +{ + 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) +{ + LOGP(DLGLOBAL, LOGL_INFO, "iu_page_ps() dummy called, NOT paging\n"); + return 0; +} + +struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap) +{ + LOGP(DLGLOBAL, LOGL_INFO, "ranap_new_msg_rab_assign_voice() dummy called, NOT composing RAB Assignment\n"); + return NULL; +} + +int iu_rab_act(struct 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) +{ + 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) +{ + LOGP(DLGLOBAL, LOGL_INFO, "iu_tx_release() dummy called, NOT sending Release\n"); + return 0; +} -- cgit v1.2.3