aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-02 02:37:39 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 15:32:33 +0100
commite48c9d13ae37545fecbd9ddde5f326c12ebb9f93 (patch)
tree9154286a8a3f558386a6792dc11790ed94022507 /openbsc/include
parent443a180a81ec7c592a5f754a7aec78db497f940f (diff)
Make the code work so that the msc_vlr tests pass
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gsm_04_08.h1
-rw-r--r--openbsc/include/openbsc/gsm_data.h26
-rw-r--r--openbsc/include/openbsc/gsm_subscriber.h1
-rw-r--r--openbsc/include/openbsc/msc_ifaces.h9
-rw-r--r--openbsc/include/openbsc/osmo_msc.h6
-rw-r--r--openbsc/include/openbsc/vlr.h2
6 files changed, 23 insertions, 22 deletions
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index c70227e83..0cd8ea171 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -46,7 +46,6 @@ void gsm0408_clear_all_trans(struct gsm_network *net, int protocol);
int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg);
int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id);
-int gsm0408_new_conn(struct gsm_subscriber_connection *conn);
enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *bts, uint8_t ra);
/* don't use "enum gsm_chreq_reason_t" to avoid circular dependency */
int get_reason_by_chreq(uint8_t ra, int neci);
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 623d940b9..fa0dea54b 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -104,6 +104,10 @@ enum ran_type {
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;
@@ -128,23 +132,6 @@ struct gsm_subscriber_connection {
* towards A/Iu */
uint32_t use_count;
- /* temporary hack: while the same gsm_subscriber_connection is in use
- * between libbsc and libmsc, we need to prevent a second free from
- * within libbsc after bsc_api->compl_l3() returns. In
- * gsm0408_rcvmsg(), compl_l3() is called, and if it returns
- * BSC_API_CONN_POL_REJECT, the conn is discarded right away. This is
- * the only instance where libbsc discards a gsm_subscriber_connection.
- * If compl_l3() returns BSC_API_CONN_POL_ACCEPT and in all other API
- * calls, ownership of the conn is in libmsc (in the osmo-nitb case) or
- * in the osmo-bsc code (in the OsmoBSC standalone case). Our VLR
- * however assumes full ownership of the conn and will discard it when
- * nothing is pending. So in case we're still in compl_l3() and going
- * to reject the conn, we must tell libmsc to not free it yet, since
- * bsc_api.c will do so again/anyway. When the
- * gsm_subscriber_connection structs are properly separated, this will
- * go away magically. */
- bool owned_by_msc;
-
/* The MS has opened the conn with a CM Service Request, and we shall
* keep it open for an actual request (or until timeout). */
bool received_cm_service_request;
@@ -387,6 +374,11 @@ struct gsm_network {
struct mncc_sock_state *mncc_state;
mncc_recv_cb_t mncc_recv;
struct llist_head upqueue;
+ /*
+ * TODO: Move the trans_list into the subscriber connection and
+ * create a pending list for MT transactions. These exist before
+ * we have a subscriber connection.
+ */
struct llist_head trans_list;
struct bsc_api *bsc_api;
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index 0bc7d5160..e53d0eea4 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -52,7 +52,6 @@ int subscr_update(struct vlr_subscr *vsub, int reason);
* Paging handling with authentication
*/
struct subscr_request *subscr_request_conn(struct vlr_subscr *vsub,
- int channel_type,
gsm_cbfn *cbfn, void *param);
void subscr_remove_request(struct subscr_request *req);
diff --git a/openbsc/include/openbsc/msc_ifaces.h b/openbsc/include/openbsc/msc_ifaces.h
index 3f6754e03..2965c72c5 100644
--- a/openbsc/include/openbsc/msc_ifaces.h
+++ b/openbsc/include/openbsc/msc_ifaces.h
@@ -22,7 +22,7 @@
* the compiler complains about an undefined reference to iu_tx(). If you,
* however, link against libiu as well as the osmo-iuh libs (etc.), iu_tx() is
* available. A unit test may instead simply implement a dummy iu_tx() function
- * and not link against osmo-iuh.
+ * and not link against osmo-iuh, see tests/libiudummy/.
*/
/* Each main linkage must implement this function (see comment above). */
@@ -35,6 +35,13 @@ extern int iu_tx(struct msgb *msg, uint8_t sapi);
* " */
extern int a_tx(struct msgb *msg);
+/* So far this is a dummy implemented in libmsc/a_iface.c. When A-interface
+ * gets implemented, it should be in a separate lib (like libiu), this function
+ * should move there, and the following comment should remain here: "
+ * Each main linkage must implement this function (see comment above).
+ * " */
+extern int a_page(const char *imsi, uint32_t tmsi, uint16_t lac);
+
int msc_tx_dtap(struct gsm_subscriber_connection *conn,
struct msgb *msg);
diff --git a/openbsc/include/openbsc/osmo_msc.h b/openbsc/include/openbsc/osmo_msc.h
index 16979e7d3..1dd83220a 100644
--- a/openbsc/include/openbsc/osmo_msc.h
+++ b/openbsc/include/openbsc/osmo_msc.h
@@ -72,8 +72,8 @@ 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);
-enum msc_compl_l3_rc msc_compl_l3(struct gsm_subscriber_connection *conn,
- struct msgb *msg, uint16_t chosen_channel);
+int msc_compl_l3(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, uint16_t chosen_channel);
void msc_close_connection(struct gsm_subscriber_connection *conn);
bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn);
@@ -81,4 +81,6 @@ void msc_subscr_conn_communicating(struct gsm_subscriber_connection *conn);
void msc_release_anchor(struct gsm_subscriber_connection *conn);
+void msc_stop_paging(struct vlr_subscr *vsub);
+
#endif
diff --git a/openbsc/include/openbsc/vlr.h b/openbsc/include/openbsc/vlr.h
index c137e5007..b7f5ff9c2 100644
--- a/openbsc/include/openbsc/vlr.h
+++ b/openbsc/include/openbsc/vlr.h
@@ -156,6 +156,8 @@ struct vlr_subscr {
/* pending requests */
bool is_paging;
struct llist_head requests;
+ uint8_t lac;
+ enum ran_type attached_via_ran;
} cs;
};