[MERGED] osmo-bsc[master]: Remove some more dead code

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:53:14 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: Remove some more dead code
......................................................................


Remove some more dead code

Change-Id: I919bffe88babd90227c89abd4434322965c32ebb
---
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
M src/libcommon-cs/common_cs.c
M src/libcommon/gsm_data.c
4 files changed, 0 insertions(+), 163 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 7a1b62d..1cedef0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -24,9 +24,7 @@
 
 #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3]
 
-struct gsm_subscriber_group;
 struct bsc_subscr;
-struct vlr_instance;
 struct gprs_ra_id;
 
 #define OBSC_LINKID_CB(__msgb)	(__msgb)->cb[3]
@@ -40,26 +38,11 @@
 #define EARFCN_QRXLV_INVALID 32
 #define EARFCN_THRESH_LOW_INVALID 32
 
-enum gsm_security_event {
-	GSM_SECURITY_NOAVAIL,
-	GSM_SECURITY_AUTH_FAILED,
-	GSM_SECURITY_SUCCEEDED,
-	GSM_SECURITY_ALREADY,
-};
-
 struct msgb;
 typedef int gsm_cbfn(unsigned int hooknum,
 		     unsigned int event,
 		     struct msgb *msg,
 		     void *data, void *param);
-
-/*
- * A dummy to keep a connection up for at least
- * a couple of seconds to work around MSC issues.
- */
-struct gsm_anchor_operation {
-	struct osmo_timer_list timeout;
-};
 
 /* Maximum number of neighbor cells whose average we track */
 #define MAX_NEIGH_MEAS		10
@@ -75,16 +58,6 @@
 	uint8_t last_seen_nr;
 };
 
-enum ran_type {
-       RAN_UNKNOWN,
-       RAN_GERAN_A,	/* 2G / A-interface */
-       RAN_UTRAN_IU,	/* 3G / Iu-interface (IuCS or IuPS) */
-};
-
-extern const struct value_string ran_type_names[];
-static inline const char *ran_type_name(enum ran_type val)
-{	return get_value_string(ran_type_names, val);	}
-
 struct gsm_classmark {
 	bool classmark1_set;
 	struct gsm48_classmark1 classmark1;
@@ -92,12 +65,6 @@
 	uint8_t classmark2[3];
 	uint8_t classmark3_len;
 	uint8_t classmark3[14]; /* if cm3 gets extended by spec, it will be truncated */
-};
-
-enum integrity_protection_state {
-	INTEGRITY_PROTECTION_NONE	= 0,
-	INTEGRITY_PROTECTION_IK		= 1,
-	INTEGRITY_PROTECTION_IK_CK	= 2,
 };
 
 /* active radio connection of a mobile subscriber */
@@ -125,29 +92,6 @@
 	struct gsm_classmark classmark;
 
 	uint16_t lac;
-	struct gsm_encr encr;
-
-	struct {
-		unsigned int mgcp_rtp_endpoint;
-		uint16_t port_subscr;
-		uint16_t port_cn;
-	} rtp;
-
-	struct {
-		/* A pointer to the SCCP user that handles
-		 * the SCCP connections for this subscriber
-		 * connection */
-		struct osmo_sccp_user *scu;
-
-		/* The address of the BSC that is associated
-		 * with this subscriber connection */
-		struct osmo_sccp_addr bsc_addr;
-
-		/* The connection identifier that is used
-		 * to reference the SCCP connection that is
-		 * associated with this subscriber connection */
-		int conn_id;
-	} a;
 };
 
 
@@ -241,13 +185,6 @@
 	bsc_ctr_description,
 };
 
-enum gsm_auth_policy {
-	GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */
-	GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */
-	GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */
-	GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
-};
-
 #define GSM_T3101_DEFAULT 3	/* s */
 #define GSM_T3103_DEFAULT 5	/* s */
 #define GSM_T3105_DEFAULT 100	/* ms */
@@ -280,7 +217,6 @@
 	uint16_t network_code;
 	int a5_encryption;
 	int neci;
-	int send_mm_info;
 	struct {
 		int active;
 		/* Window RXLEV averaging */
@@ -299,7 +235,6 @@
 	} handover;
 
 	struct rate_ctr_group *bsc_ctrs;
-	struct osmo_counter *active_calls;
 
 	/*
 	 * TODO: Move the trans_list into the subscriber connection and
@@ -361,12 +296,6 @@
 	 * pointer is NULL to indicate absence of a bsc_subscribers list. */
 	struct llist_head *bsc_subscribers;
 
-	/* MSC: GSUP server address of the HLR */
-	const char *gsup_server_addr_str;
-	uint16_t gsup_server_port;
-
-	struct vlr_instance *vlr;
-
 	/* Periodic location update default value */
 	uint8_t t3212;
 
@@ -374,65 +303,6 @@
 		struct mgcp_client_conf *conf;
 		struct mgcp_client *client;
 	} mgw;
-
-	struct {
-		/* CS7 instance id number (set via VTY) */
-		uint32_t cs7_instance;
-		/* A list with the context information about
-		 * all BSCs we have connections with */
-		struct llist_head bscs;
-		struct osmo_sccp_instance *sccp;
-	} a;
-};
-
-struct osmo_esme;
-
-enum gsm_sms_source_id {
-	SMS_SOURCE_UNKNOWN = 0,
-	SMS_SOURCE_MS,		/* received from MS */
-	SMS_SOURCE_VTY,		/* received from VTY */
-	SMS_SOURCE_SMPP,	/* received via SMPP */
-};
-
-#define SMS_HDR_SIZE	128
-#define SMS_TEXT_SIZE	256
-
-struct gsm_sms_addr {
-	uint8_t ton;
-	uint8_t npi;
-	char addr[21+1];
-};
-
-struct gsm_sms {
-	unsigned long long id;
-	struct gsm_sms_addr src, dst;
-	enum gsm_sms_source_id source;
-
-	struct {
-		uint8_t transaction_id;
-		uint32_t msg_ref;
-	} gsm411;
-
-	struct {
-		struct osmo_esme *esme;
-		uint32_t sequence_nr;
-		int transaction_mode;
-		char msg_id[16];
-	} smpp;
-
-	unsigned long validity_minutes;
-	time_t created;
-	bool is_report;
-	uint8_t reply_path_req;
-	uint8_t status_rep_req;
-	uint8_t ud_hdr_ind;
-	uint8_t protocol_id;
-	uint8_t data_coding_scheme;
-	uint8_t msg_ref;
-	uint8_t user_data_len;
-	uint8_t user_data[SMS_TEXT_SIZE];
-
-	char text[SMS_TEXT_SIZE];
 };
 
 extern void talloc_ctx_init(void *ctx_root);
@@ -508,9 +378,6 @@
 
 	return 0;
 }
-
-enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
-const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
 
 enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid);
 const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h
index 5d9b570..db854fd 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -83,7 +83,6 @@
 };
 
 struct gsm_lchan;
-struct gsm_mncc;
 struct osmo_rtp_socket;
 struct rtp_socket;
 struct bsc_api;
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index b410b17..39df45e 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -58,11 +58,7 @@
 	net->bsc_subscribers = talloc_zero(net, struct llist_head);
 	INIT_LLIST_HEAD(net->bsc_subscribers);
 
-	net->active_calls = osmo_counter_alloc("msc.active_calls");
-
 	net->dyn_ts_allow_tch_f = true;
-
-	INIT_LLIST_HEAD(&net->a.bscs);
 
 	return net;
 }
diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c
index 514708b..87d954a 100644
--- a/src/libcommon/gsm_data.c
+++ b/src/libcommon/gsm_data.c
@@ -120,24 +120,6 @@
 	return NULL;
 }
 
-static const struct value_string auth_policy_names[] = {
-	{ GSM_AUTH_POLICY_CLOSED,	"closed" },
-	{ GSM_AUTH_POLICY_ACCEPT_ALL,	"accept-all" },
-	{ GSM_AUTH_POLICY_TOKEN,	"token" },
-	{ GSM_AUTH_POLICY_REGEXP,	"regexp" },
-	{ 0,				NULL }
-};
-
-enum gsm_auth_policy gsm_auth_policy_parse(const char *arg)
-{
-	return get_string_value(auth_policy_names, arg);
-}
-
-const char *gsm_auth_policy_name(enum gsm_auth_policy policy)
-{
-	return get_value_string(auth_policy_names, policy);
-}
-
 static const struct value_string bts_gprs_mode_names[] = {
 	{ BTS_GPRS_NONE,	"none" },
 	{ BTS_GPRS_GPRS,	"gprs" },
@@ -433,10 +415,3 @@
 		rev_lev = (cm->classmark2[0] >> 5) & 0x3;
 	return rev_lev >= 2;
 }
-
-const struct value_string ran_type_names[] = {
-	OSMO_VALUE_STRING(RAN_UNKNOWN),
-	OSMO_VALUE_STRING(RAN_GERAN_A),
-	OSMO_VALUE_STRING(RAN_UTRAN_IU),
-	{ 0, NULL }
-};

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

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



More information about the gerrit-log mailing list