aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/a_iface.h38
-rw-r--r--openbsc/include/openbsc/a_iface_bssap.h13
-rw-r--r--openbsc/include/openbsc/gsm_data.h16
3 files changed, 55 insertions, 12 deletions
diff --git a/openbsc/include/openbsc/a_iface.h b/openbsc/include/openbsc/a_iface.h
index b27c3db83..4a9eaf620 100644
--- a/openbsc/include/openbsc/a_iface.h
+++ b/openbsc/include/openbsc/a_iface.h
@@ -18,6 +18,36 @@
*
*/
+#pragma once
+
+#include <openbsc/a_reset.h>
+
+/* A struct to keep a context information about the BSCs we are associated with */
+struct bsc_context {
+ struct llist_head list;
+
+ /* Holds a copy of the sccp address of the BSC,
+ * this address will become known as soon as
+ * a remote BSC tries to make a connection or
+ * sends a RESET request via UNIDATA */
+ struct osmo_sccp_addr bsc_addr;
+
+ /* Holds a copy of the our local MSC address,
+ * this will be the sccp-address that is associated
+ * with the A interface */
+ struct osmo_sccp_addr msc_addr;
+
+ /* A pointer to the reset handler FSM, the
+ * state machine is allocated when the BSC
+ * is registerd. */
+ struct a_reset_ctx *reset;
+
+ /* A pointer to the sccp_user that is associated
+ * with the A interface. We need this information
+ * to send the resets and to send paging requests */
+ struct osmo_sccp_user *sccp_user;
+};
+
/* Initalize A interface connection between to MSC and BSC */
int a_init(void *ctx, struct osmo_sccp_instance *sccp, struct gsm_network *network);
@@ -34,4 +64,10 @@ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac);
/* Send assignment request via A-interface */
int a_iface_tx_assignment(struct gsm_trans *trans);
-#pragma once
+/* Clear all subscriber connections on a specified BSC
+ * (Helper function for a_iface_bssap.c) */
+void a_clear_all(struct osmo_sccp_user *scu, struct osmo_sccp_addr *bsc_addr);
+
+/* Delete info of a closed connection from the active connection list
+ * (Helper function for a_iface_bssap.c) */
+void a_delete_bsc_con(uint32_t conn_id);
diff --git a/openbsc/include/openbsc/a_iface_bssap.h b/openbsc/include/openbsc/a_iface_bssap.h
index 211bcf2d9..f0a2187ef 100644
--- a/openbsc/include/openbsc/a_iface_bssap.h
+++ b/openbsc/include/openbsc/a_iface_bssap.h
@@ -28,16 +28,9 @@
struct a_conn_info {
struct osmo_sccp_addr *called_addr;
struct osmo_sccp_addr *calling_addr;
- int conn_id;
+ uint32_t conn_id;
struct gsm_network *network;
-};
-
-/* A structure to pack BSC calling addresses into a list */
-struct a_bsc_addr {
- struct llist_head list;
- struct osmo_sccp_addr called_addr;
- struct osmo_sccp_addr calling_addr;
- struct osmo_sccp_user *scu;
+ struct a_reset_ctx *reset;
};
/* Receive incoming connection less data messages via sccp */
@@ -46,5 +39,3 @@ void sccp_rx_udt(struct osmo_sccp_user *scu, struct a_conn_info *a_conn_info, st
/* Receive incoming connection oriented data messages via sccp */
int sccp_rx_dt(struct osmo_sccp_user *scu, struct a_conn_info *a_conn_info, struct msgb *msg);
-/* Get a list with all known BSCs */
-struct llist_head *get_bsc_addr_list(void);
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 13178ae6c..283b5498c 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -209,8 +209,18 @@ struct gsm_subscriber_connection {
} iu;
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 subscirber 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;
};
@@ -482,6 +492,12 @@ struct gsm_network {
enum nsap_addr_enc rab_assign_addr_enc;
} iu;
+ struct {
+ /* A list with the context information about
+ * all BSCs we have connections with */
+ struct llist_head bscs;
+ } a;
+
struct osmo_sccp_instance *sccp;
};