aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-04-09 12:32:51 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-30 14:09:31 +0200
commit39f62bbcbf4309492a6d5bc07213cd74f650d41e (patch)
tree6d56d892a52151c67452c9ac08c898a152181c68 /src/libbsc
parent88d8bcb752a611c2c23fb442362665ecd7e31ba0 (diff)
Implement AoIP, port to M3UA SIGTRAN (large addition and refactoring)
This was originally a long series of commits converging to the final result seen in this patch. It does not make much sense to review the smaller steps' trial and error, we need to review this entire change as a whole. Implement AoIP in osmo-msc and osmo-bsc. Change over to the new libosmo-sigtran API with support for proper SCCP/M3UA/SCTP stacking, as mandated by 3GPP specifications for the IuCS and IuPS interfaces. From here on, a separate osmo-stp process is required for SCCP routing between OsmoBSC / OsmoHNBGW <-> OsmoMSC / OsmoSGSN jenkins.sh: build from libosmo-sccp and osmo-iuh master branches now for new M3UA SIGTRAN. Patch-by: pmaier, nhofmeyr, laforge Change-Id: I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77
Diffstat (limited to 'src/libbsc')
-rw-r--r--src/libbsc/abis_rsl.c3
-rw-r--r--src/libbsc/bsc_vty.c81
-rw-r--r--src/libbsc/handover_logic.c3
3 files changed, 85 insertions, 2 deletions
diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index 4f687a039..66cda8200 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -2327,6 +2327,8 @@ static void ipac_parse_rtp(struct gsm_lchan *lchan, struct tlv_parsed *tv)
DEBUGPC(DRSL, "REMOTE_PORT=%u ", port);
lchan->abis_ip.connect_port = port;
}
+
+ DEBUGPC(DRSL, "\n");
}
/*! \brief Issue IPA RSL CRCX to configure RTP on BTS side
@@ -2558,7 +2560,6 @@ static int abis_rsl_rx_ipacc(struct msgb *msg)
rllh->c.msg_type);
break;
}
- DEBUGPC(DRSL, "\n");
return rc;
}
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index bd363ae55..d55c6eb30 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -57,6 +57,7 @@
#include <openbsc/pcu_if.h>
#include <openbsc/common_cs.h>
#include <openbsc/vlr.h>
+#include <openbsc/handover.h>
#include <inttypes.h>
@@ -1341,6 +1342,83 @@ DEFUN(show_lchan_summary,
return lchan_summary(vty, argc, argv, lchan_dump_short_vty);
}
+DEFUN(show_subscr_conn,
+ show_subscr_conn_cmd,
+ "show conns",
+ SHOW_STR "Display currently active subscriber connections\n")
+{
+ struct gsm_subscriber_connection *conn;
+ struct gsm_network *net = gsmnet_from_vty(vty);
+ bool no_conns = true;
+ unsigned int count = 0;
+
+ vty_out(vty, "Active subscriber connections: %s", VTY_NEWLINE);
+
+ llist_for_each_entry(conn, &net->subscr_conns, entry) {
+ vty_out(vty, "conn nr #%u:%s", count, VTY_NEWLINE);
+ lchan_dump_full_vty(vty, conn->lchan);
+ no_conns = false;
+ count++;
+ }
+
+ if (no_conns)
+ vty_out(vty, "None%s", VTY_NEWLINE);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(handover_subscr_conn,
+ handover_subscr_conn_cmd,
+ "handover <0-255> <0-255> <0-7> LCHAN_NR <0-255>",
+ "Handover subscriber connection to other BTS\n"
+ "BTS Number (current)\n" "TRX Number\n" "Timeslot Number\n"
+ LCHAN_NR_STR "BTS Number (new)\n")
+{
+ struct gsm_network *net = gsmnet_from_vty(vty);
+ struct gsm_subscriber_connection *conn;
+ struct gsm_bts *bts;
+ struct gsm_bts *new_bts = NULL;
+ unsigned int bts_nr = atoi(argv[0]);
+ unsigned int trx_nr = atoi(argv[1]);
+ unsigned int ts_nr = atoi(argv[2]);
+ unsigned int ss_nr = atoi(argv[3]);
+ unsigned int bts_nr_new = atoi(argv[4]);
+
+ /* Lookup the BTS where we want to handover to */
+ llist_for_each_entry(bts, &net->bts_list, list) {
+ if (bts->nr == bts_nr_new) {
+ new_bts = bts;
+ break;
+ }
+ }
+
+ if (!new_bts) {
+ vty_out(vty, "Unable to trigger handover,"
+ "specified bts #%u does not exist %s", bts_nr_new,
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ /* Find the connection/lchan that we want to handover */
+ llist_for_each_entry(conn, &net->subscr_conns, entry) {
+ if (conn->bts->nr == bts_nr &&
+ conn->lchan->ts->trx->nr == trx_nr &&
+ conn->lchan->ts->nr == ts_nr && conn->lchan->nr == ss_nr) {
+ vty_out(vty, "starting handover for lchan %s...%s",
+ conn->lchan->name, VTY_NEWLINE);
+ lchan_dump_full_vty(vty, conn->lchan);
+ bsc_handover_start(conn->lchan, new_bts);
+ return CMD_SUCCESS;
+ }
+ }
+
+ vty_out(vty, "Unable to trigger handover,"
+ "specified connection (bts=%u,trx=%u,ts=%u,ss=%u) does not exist%s",
+ bts_nr, trx_nr, ts_nr, ss_nr, VTY_NEWLINE);
+
+ return CMD_WARNING;
+}
+
static void paging_dump_vty(struct vty *vty, struct gsm_paging_request *pag)
{
vty_out(vty, "Paging on BTS %u%s", pag->bts->nr, VTY_NEWLINE);
@@ -4153,6 +4231,9 @@ int bsc_vty_init(struct gsm_network *network)
install_element_ve(&show_lchan_cmd);
install_element_ve(&show_lchan_summary_cmd);
+ install_element_ve(&show_subscr_conn_cmd);
+ install_element_ve(&handover_subscr_conn_cmd);
+
install_element_ve(&show_paging_cmd);
install_element_ve(&show_paging_group_cmd);
diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index 57d1dcd31..14566cfa1 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -101,7 +101,8 @@ int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts)
if (bsc_ho_by_old_lchan(old_lchan))
return -EBUSY;
- DEBUGP(DHO, "(old_lchan on BTS %u, new BTS %u)\n",
+ DEBUGP(DHO, "Beginning with handover operation"
+ "(old_lchan on BTS %u, new BTS %u) ...\n",
old_lchan->ts->trx->bts->nr, bts->nr);
rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_HANDOVER_ATTEMPTED]);