From d5db170261a26b1b9e39eef5f02d4733af1733a3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 13 Feb 2018 23:59:59 +0100 Subject: remove bsc_api.h and all users - they're all dead code Related: OS#2528 Change-Id: I332aa8697c98a0d7b3db65f98711275da3d381d7 --- include/osmocom/msc/Makefile.am | 1 - include/osmocom/msc/bsc_api.h | 49 ----------------------------------- include/osmocom/msc/gsm_data.h | 1 - include/osmocom/msc/gsm_data_shared.h | 1 - include/osmocom/msc/osmo_msc.h | 4 --- src/libmsc/gsm_04_08.c | 1 - src/libmsc/gsm_04_14.c | 1 - src/libmsc/osmo_msc.c | 18 ------------- tests/msc_vlr/msc_vlr_tests.c | 2 +- 9 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 include/osmocom/msc/bsc_api.h diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index d31883ac4..f0e24c420 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -1,7 +1,6 @@ noinst_HEADERS = \ a_iface.h \ a_iface_bssap.h \ - bsc_api.h \ common.h \ common_cs.h \ db.h \ diff --git a/include/osmocom/msc/bsc_api.h b/include/osmocom/msc/bsc_api.h deleted file mode 100644 index 4936f5367..000000000 --- a/include/osmocom/msc/bsc_api.h +++ /dev/null @@ -1,49 +0,0 @@ -/* GSM 08.08 like API for OpenBSC */ - -#ifndef OPENBSC_BSC_API_H -#define OPENBSC_BSC_API_H - -#include "gsm_data.h" - -#define BSC_API_CONN_POL_ACCEPT 0 -#define BSC_API_CONN_POL_REJECT 1 - -struct bsc_api { - /*! \brief BTS->MSC: tell MSC a SAPI was not established */ - void (*sapi_n_reject)(struct gsm_subscriber_connection *conn, int dlci); - /*! \brief MS->MSC: Tell MSC that ciphering has been enabled */ - void (*cipher_mode_compl)(struct gsm_subscriber_connection *conn, - struct msgb *msg, uint8_t chosen_encr); - /*! \brief MS->MSC: New MM context with L3 payload */ - int (*compl_l3)(struct gsm_subscriber_connection *conn, - struct msgb *msg, uint16_t chosen_channel); - /*! \brief MS->BSC/MSC: Um L3 message */ - void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id, - struct msgb *msg); - /*! \brief BSC->MSC: Assignment of lchan successful */ - void (*assign_compl)(struct gsm_subscriber_connection *conn, - uint8_t rr_cause, uint8_t chosen_channel, - uint8_t encr_alg_id, uint8_t speech_mode); - /*! \brief BSC->MSC: Assignment of lchan failed */ - void (*assign_fail)(struct gsm_subscriber_connection *conn, - uint8_t cause, uint8_t *rr_cause); - /*! \brief BSC->MSC: RR conn has been cleared */ - int (*clear_request)(struct gsm_subscriber_connection *conn, - uint32_t cause); - /*! \brief BSC->MSC: Classmark Update */ - void (*classmark_chg)(struct gsm_subscriber_connection *conn, - const uint8_t *cm2, uint8_t cm2_len, - const uint8_t *cm3, uint8_t cm3_len); - - /** - * Configure the multirate setting on this channel. If it is - * not implemented AMR5.9 will be used. - */ - void (*mr_config)(struct gsm_subscriber_connection *conn, - struct gsm_lchan *lchan, int full_rate); - - /** Callback for additional actions during conn cleanup */ - void (*conn_cleanup)(struct gsm_subscriber_connection *conn); -}; - -#endif diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 3e4b5a886..561cf3d47 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,7 +344,6 @@ struct gsm_network { * we have a subscriber connection. */ struct llist_head trans_list; - struct bsc_api *bsc_api; unsigned int paging_response_timer; diff --git a/include/osmocom/msc/gsm_data_shared.h b/include/osmocom/msc/gsm_data_shared.h index 68b36ab4d..857946dc9 100644 --- a/include/osmocom/msc/gsm_data_shared.h +++ b/include/osmocom/msc/gsm_data_shared.h @@ -44,7 +44,6 @@ enum gsm_paging_event { struct gsm_mncc; struct osmo_rtp_socket; struct rtp_socket; -struct bsc_api; /* * help with parsing regexps diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h index 2fa8c46c5..2b019e1bc 100644 --- a/include/osmocom/msc/osmo_msc.h +++ b/include/osmocom/msc/osmo_msc.h @@ -8,8 +8,6 @@ #include -#include "bsc_api.h" - #define MSC_HLR_REMOTE_IP_DEFAULT "127.0.0.1" #define MSC_HLR_REMOTE_PORT_DEFAULT OSMO_GSUP_PORT @@ -56,8 +54,6 @@ enum msc_compl_l3_rc { MSC_CONN_REJECT = 1, }; -struct bsc_api *msc_bsc_api(); - int msc_create_conn_fsm(struct gsm_subscriber_connection *conn, const char *id); int msc_vlr_alloc(struct gsm_network *net); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index a5b967e3b..b92817157 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include diff --git a/src/libmsc/gsm_04_14.c b/src/libmsc/gsm_04_14.c index 6d75bba7f..2be534c94 100644 --- a/src/libmsc/gsm_04_14.c +++ b/src/libmsc/gsm_04_14.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index 755f8aa91..1478c191e 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -22,7 +22,6 @@ */ #include -#include #include #include #include @@ -263,23 +262,6 @@ int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) return 1; } -/* MSC-level operations to be called by libbsc in NITB */ -static struct bsc_api msc_handler = { - .sapi_n_reject = msc_sapi_n_reject, - .compl_l3 = msc_compl_l3, - .dtap = msc_dtap, - .clear_request = msc_clear_request, - .assign_compl = msc_assign_compl, - .assign_fail = msc_assign_fail, - .classmark_chg = msc_classmark_chg, - .cipher_mode_compl = msc_cipher_mode_compl, - .conn_cleanup = msc_subscr_con_cleanup, -}; - -struct bsc_api *msc_bsc_api() { - return &msc_handler; -} - static void msc_subscr_conn_release_all(struct gsm_subscriber_connection *conn, uint32_t cause) { if (conn->in_release) diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 556bf4919..1079c9f93 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -219,7 +219,7 @@ void rx_from_ms(struct msgb *msg) reset_l3_seq_nr(); patch_l3_seq_nr(msg); rc = msc_compl_l3(g_conn, msg, 23); - if (rc == BSC_API_CONN_POL_REJECT) { + if (rc != MSC_CONN_ACCEPT) { msc_subscr_con_free(g_conn); g_conn = NULL; } -- cgit v1.2.3