[PATCH] osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Dec 19 17:13:42 UTC 2017


remove libosmo-sccp dependency for osmo-bsc

libosmo-sccp is the old sccp-lite-focused SCCP implementation that we
used before libosmo-sigtran was created.  The new osmo-bsc in this
repository is using libosmo-sigtran and shouldn't be using parts of
libosmo-sccp anymore.

We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat,
which is not even built in this repository anymore (or 'again yet'?)

Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
---
M include/osmocom/bsc/osmo_bsc.h
M src/libfilter/Makefile.am
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/osmo_bsc_vty.c
M tests/bsc/Makefile.am
9 files changed, 6 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/02/5502/2

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 8a5cd30..0fd29b7 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -15,7 +15,6 @@
 	BSC_CON_NO_MEM,
 };
 
-struct sccp_connection;
 struct bsc_msc_data;
 struct bsc_msc_connection;
 
@@ -47,10 +46,7 @@
 	int send_ping;
 
 	/* SCCP connection realted */
-	struct sccp_connection *sccp;
 	struct bsc_msc_data *msc;
-	struct osmo_timer_list sccp_it_timeout;
-	struct osmo_timer_list sccp_cc_timeout;
 
 	struct llist_head sccp_queue;
 	unsigned int sccp_queue_size;
diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am
index 6d3db0b..41a75bd 100644
--- a/src/libfilter/Makefile.am
+++ b/src/libfilter/Makefile.am
@@ -10,7 +10,6 @@
 	$(LIBOSMOGSM_CFLAGS) \
 	$(LIBOSMOVTY_CFLAGS) \
 	$(LIBOSMOABIS_CFLAGS) \
-	$(LIBOSMOSCCP_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	$(NULL)
 
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 4acbe56..7978852 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -11,7 +11,6 @@
 	$(LIBOSMOVTY_CFLAGS) \
 	$(LIBOSMOCTRL_CFLAGS) \
 	$(LIBOSMONETIF_CFLAGS) \
-	$(LIBOSMOSCCP_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	$(LIBOSMOABIS_CFLAGS) \
 	$(LIBOSMOSIGTRAN_CFLAGS) \
@@ -45,7 +44,6 @@
 	$(top_builddir)/src/libbsc/libbsc.a \
 	$(top_builddir)/src/libcommon-cs/libcommon-cs.a \
 	$(top_builddir)/src/libcommon/libcommon.a \
-	$(LIBOSMOSCCP_LIBS) \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index c388f5b..152b818 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -29,7 +29,6 @@
 #include <osmocom/gsm/mncc.h>
 #include <osmocom/gsm/gsm48.h>
 
-#include <osmocom/sccp/sccp.h>
 #include <osmocom/bsc/osmo_bsc_sigtran.h>
 
 #define return_when_not_connected(conn) \
@@ -296,13 +295,11 @@
 	resp = gsm0808_create_layer3(msg, network_code, country_code, lac, ci);
 	if (!resp) {
 		LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n");
-		sccp_connection_free(conn->sccp_con->sccp);
 		osmo_bsc_sigtran_del_conn(conn->sccp_con);
 		return BSC_API_CONN_POL_REJECT;
 	}
 
 	if (osmo_bsc_sigtran_open_conn(conn->sccp_con, resp) != 0) {
-		sccp_connection_free(conn->sccp_con->sccp);
 		osmo_bsc_sigtran_del_conn(conn->sccp_con);
 		msgb_free(resp);
 		return BSC_API_CONN_POL_REJECT;
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 829f207..e4c8fc5 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -43,7 +43,6 @@
 
 #include <osmocom/abis/abis.h>
 
-#include <osmocom/sccp/sccp.h>
 #include <osmocom/mgcp_client/mgcp_client.h>
 
 #define _GNU_SOURCE
@@ -233,9 +232,6 @@
 
 	/* seed the PRNG */
 	srand(time(NULL));
-
-	/* initialize SCCP */
-	sccp_set_log_area(DSCCP);
 
 	/* Read the config */
 	rc = bsc_network_configure(config_file);
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 0e5777e..46be2e6 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -34,8 +34,6 @@
 
 #include <osmocom/gsm/gsm0808.h>
 
-#include <osmocom/sccp/sccp.h>
-
 #include <osmocom/abis/ipa.h>
 
 #include <sys/socket.h>
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index a18d4f3..7669b67 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -22,7 +22,6 @@
 #include <osmocom/core/logging.h>
 #include <osmocom/sigtran/osmo_ss7.h>
 #include <osmocom/sigtran/sccp_sap.h>
-#include <osmocom/sccp/sccp_types.h>
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/gsm/gsm0808.h>
 #include <osmocom/core/msgb.h>
@@ -511,7 +510,8 @@
 
 		/* If unset, use default local SCCP address */
 		if (!msc->a.bsc_addr.presence)
-			osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, SCCP_SSN_BSSAP);
+			osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp,
+							 OSMO_SCCP_SSN_BSSAP);
 
 		if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) {
 			LOGP(DMSC, LOGL_ERROR,
@@ -524,7 +524,7 @@
 		if (!msc->a.msc_addr.presence)
 			osmo_sccp_make_addr_pc_ssn(&msc->a.msc_addr,
 						   osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC),
-						   SCCP_SSN_BSSAP);
+						   OSMO_SCCP_SSN_BSSAP);
 
 		if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) {
 			LOGP(DMSC, LOGL_ERROR,
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index a87b20f..f01e6f7 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -28,7 +28,6 @@
 
 #include <osmocom/core/talloc.h>
 #include <osmocom/vty/logging.h>
-#include <osmocom/sccp/sccp_types.h>
 #include <osmocom/mgcp_client/mgcp_client.h>
 
 
@@ -663,14 +662,14 @@
 static void enforce_standard_ssn(struct vty *vty, struct osmo_sccp_addr *addr)
 {
 	if (addr->presence & OSMO_SCCP_ADDR_T_SSN) {
-		if (addr->ssn != SCCP_SSN_BSSAP)
+		if (addr->ssn != OSMO_SCCP_SSN_BSSAP)
 			vty_out(vty,
 				"setting an SSN (%u) different from the standard (%u) is not allowd, will use standard SSN for address: %s%s",
-				addr->ssn, SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE);
+				addr->ssn, OSMO_SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE);
 	}
 
 	addr->presence |= OSMO_SCCP_ADDR_T_SSN;
-	addr->ssn = SCCP_SSN_BSSAP;
+	addr->ssn = OSMO_SCCP_SSN_BSSAP;
 }
 
 DEFUN(cfg_msc_cs7_bsc_addr,
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index 96f87f5..ebeb1ed 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -8,7 +8,6 @@
 	-ggdb3 \
 	$(LIBOSMOCORE_CFLAGS) \
 	$(LIBOSMOGSM_CFLAGS) \
-	$(LIBOSMOSCCP_CFLAGS) \
 	$(LIBOSMOABIS_CFLAGS) \
 	$(LIBOSMOLEGACYMGCP_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
@@ -37,7 +36,6 @@
 	$(top_builddir)/src/libcommon/libcommon.a \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
-	$(LIBOSMOSCCP_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
 	$(LIBOSMOLEGACYMGCP_LIBS) \

-- 
To view, visit https://gerrit.osmocom.org/5502
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list