From 9cc704424a468cf628551354d07250f6b5710ca1 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 23 Sep 2017 14:15:46 +0200 Subject: Further cleanup leftovers from BSC/MSC split * drop unused header * fix name of jenkins test * remove dead code Change-Id: I986904864741995910b6ba92173b9f7b1b03e2f1 --- contrib/jenkins.sh | 2 +- include/osmocom/bsc/Makefile.am | 1 - include/osmocom/bsc/gsm_data.h | 1 - include/osmocom/bsc/osmo_msc.h | 99 ----------------------------------------- src/libbsc/bsc_init.c | 1 - tests/gsm0408/gsm0408_test.c | 28 ------------ 6 files changed, 1 insertion(+), 131 deletions(-) delete mode 100644 include/osmocom/bsc/osmo_msc.h diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 2685d040b..eb302d1aa 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -33,7 +33,7 @@ set +x echo echo echo -echo " =============================== osmo-msc ===============================" +echo " =============================== osmo-bsc ===============================" echo set -x diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 3b8dbdf12..8ad2b5d2e 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -42,7 +42,6 @@ noinst_HEADERS = \ osmo_bsc.h \ osmo_bsc_grace.h \ osmo_bsc_rf.h \ - osmo_msc.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ osmux.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index d7f766778..4e56db56d 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -670,7 +670,6 @@ extern const struct value_string bts_type_descs[_NUM_GSM_BTS_TYPE+1]; /* control interface handling */ int bsc_base_ctrl_cmds_install(void); -int msc_ctrl_cmds_install(struct gsm_network *net); /* dependency handling */ void bts_depend_mark(struct gsm_bts *bts, int dep); diff --git a/include/osmocom/bsc/osmo_msc.h b/include/osmocom/bsc/osmo_msc.h deleted file mode 100644 index c08cb26b1..000000000 --- a/include/osmocom/bsc/osmo_msc.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Routines for the MSC handling */ - -#ifndef OSMO_MSC_H -#define OSMO_MSC_H - -#include -#include - -#include - -#include "bsc_api.h" - -#define MSC_HLR_REMOTE_IP_DEFAULT "127.0.0.1" -#define MSC_HLR_REMOTE_PORT_DEFAULT OSMO_GSUP_PORT - -enum subscr_conn_fsm_event { - /* Mark 0 as invalid to catch uninitialized vars */ - SUBSCR_CONN_E_INVALID = 0, - /* Timeout on connection establishment starts */ - SUBSCR_CONN_E_START, - /* LU or Process Access FSM has determined that this conn is good */ - SUBSCR_CONN_E_ACCEPTED, - /* received first reply from MS in "real" CC, SMS, USSD communication */ - SUBSCR_CONN_E_COMMUNICATING, - /* Some async action has completed, check again whether all is done */ - SUBSCR_CONN_E_BUMP, - /* MS/BTS/BSC originated close request */ - SUBSCR_CONN_E_MO_CLOSE, - /* MSC originated close request, e.g. failed authentication */ - SUBSCR_CONN_E_CN_CLOSE, -}; - -enum subscr_conn_fsm_state { - SUBSCR_CONN_S_INIT, - SUBSCR_CONN_S_NEW, - SUBSCR_CONN_S_ACCEPTED, - SUBSCR_CONN_S_COMMUNICATING, - SUBSCR_CONN_S_RELEASED, -}; - -enum subscr_conn_from { - SUBSCR_CONN_FROM_INVALID, - SUBSCR_CONN_FROM_LU, - SUBSCR_CONN_FROM_CM_SERVICE_REQ, - SUBSCR_CONN_FROM_PAGING_RESP, -}; - -extern const struct value_string subscr_conn_from_names[]; -static inline const char *subscr_conn_from_name(enum subscr_conn_from val) -{ - return get_value_string(subscr_conn_from_names, val); -} - -enum msc_compl_l3_rc { - MSC_CONN_ACCEPT = 0, - 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); -int msc_vlr_start(struct gsm_network *net); - -void msc_sapi_n_reject(struct gsm_subscriber_connection *conn, int dlci); -int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause); -int msc_compl_l3(struct gsm_subscriber_connection *conn, - struct msgb *msg, uint16_t chosen_channel); -void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, - struct msgb *msg); -void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn, - struct msgb *msg, uint8_t alg_id); -void msc_rx_sec_mode_compl(struct gsm_subscriber_connection *conn); -void msc_classmark_chg(struct gsm_subscriber_connection *conn, - const uint8_t *cm2, uint8_t cm2_len, - const uint8_t *cm3, uint8_t cm3_len); -void msc_assign_fail(struct gsm_subscriber_connection *conn, - uint8_t cause, uint8_t *rr_cause); - -void msc_subscr_conn_init(void); -bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn); -void msc_subscr_conn_communicating(struct gsm_subscriber_connection *conn); -void msc_subscr_conn_close(struct gsm_subscriber_connection *conn, - uint32_t cause); - -#define msc_subscr_conn_get(conn) \ - _msc_subscr_conn_get(conn, __BASE_FILE__, __LINE__) -#define msc_subscr_conn_put(conn) \ - _msc_subscr_conn_put(conn, __BASE_FILE__, __LINE__) -struct gsm_subscriber_connection * -_msc_subscr_conn_get(struct gsm_subscriber_connection *conn, - const char *file, int line); -void _msc_subscr_conn_put(struct gsm_subscriber_connection *conn, - const char *file, int line); - -void msc_stop_paging(struct vlr_subscr *vsub); - -#endif diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 5b6530d28..f3e13e2d7 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -37,7 +37,6 @@ #include #include #include -#include #include /* global pointer to the gsm network data structure */ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 974ebe537..d5a5363be 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -647,31 +647,6 @@ static void test_si_range_helpers() VERIFY(f0, ==, 1); } -#ifdef BEFORE_MSCSPLIT -static void test_gsm411_rp_ref_wrap(void) -{ - struct gsm_subscriber_connection conn; - int res; - - printf("testing RP-Reference wrap\n"); - - memset(&conn, 0, sizeof(conn)); - conn.next_rp_ref = 255; - - res = sms_next_rp_msg_ref(&conn.next_rp_ref); - printf("Allocated reference: %d\n", res); - OSMO_ASSERT(res == 255); - - res = sms_next_rp_msg_ref(&conn.next_rp_ref); - printf("Allocated reference: %d\n", res); - OSMO_ASSERT(res == 0); - - res = sms_next_rp_msg_ref(&conn.next_rp_ref); - printf("Allocated reference: %d\n", res); - OSMO_ASSERT(res == 1); -} -#endif - int main(int argc, char **argv) { osmo_init_logging(&log_info); @@ -684,9 +659,6 @@ int main(int argc, char **argv) test_arfcn_filter(); test_print_encoding(); test_range_encoding(); -#ifdef BEFORE_MSCSPLIT - test_gsm411_rp_ref_wrap(); -#endif test_si2q_segfault(); test_si2q_e(); -- cgit v1.2.3