aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/Makefile.am2
-rw-r--r--openbsc/include/openbsc/a_iface.h25
-rw-r--r--openbsc/include/openbsc/a_iface_bssap.h47
-rw-r--r--openbsc/include/openbsc/gsm_data.h5
-rw-r--r--openbsc/include/openbsc/iu.h2
-rw-r--r--openbsc/include/openbsc/msc_ifaces.h19
-rw-r--r--openbsc/include/openbsc/osmo_msc.h3
7 files changed, 93 insertions, 10 deletions
diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am
index 14396b74a..84f3250a3 100644
--- a/openbsc/include/openbsc/Makefile.am
+++ b/openbsc/include/openbsc/Makefile.am
@@ -2,6 +2,8 @@ noinst_HEADERS = \
abis_nm.h \
abis_om2000.h \
abis_rsl.h \
+ a_iface.h \
+ a_iface_bssap.h \
arfcn_range_encode.h \
auth.h \
bsc_msc.h \
diff --git a/openbsc/include/openbsc/a_iface.h b/openbsc/include/openbsc/a_iface.h
new file mode 100644
index 000000000..d5c5f9efb
--- /dev/null
+++ b/openbsc/include/openbsc/a_iface.h
@@ -0,0 +1,25 @@
+/* (C) 2017 by Sysmocom s.f.m.c. GmbH
+ * All Rights Reserved
+ *
+ * Author: Philipp Maier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* Initalize A interface connection between to MSC and BSC */
+int a_init(void *ctx, const char *name, uint32_t local_pc, const char *listen_addr,
+ const char *remote_addr, uint16_t local_port, struct gsm_network *network);
+
+#pragma once
diff --git a/openbsc/include/openbsc/a_iface_bssap.h b/openbsc/include/openbsc/a_iface_bssap.h
new file mode 100644
index 000000000..2b489730f
--- /dev/null
+++ b/openbsc/include/openbsc/a_iface_bssap.h
@@ -0,0 +1,47 @@
+/* (C) 2017 by Sysmocom s.f.m.c. GmbH
+ * All Rights Reserved
+ *
+ * Author: Philipp Maier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+/* A structure to hold tha most basic information about a sigtran connection
+ * we use this struct internally here to pass connection data around */
+struct conn_info {
+ struct osmo_sccp_addr *called_addr;
+ struct osmo_sccp_addr *calling_addr;
+ int conn_id;
+ struct gsm_network *network;
+};
+
+/* A structure to pack BSC clling addresses into a list */
+struct bsc_addr {
+ struct llist_head list;
+ struct osmo_sccp_addr called_addr;
+ struct osmo_sccp_addr calling_addr;
+ struct osmo_sccp_user *scu;
+};
+
+/* Handle incoming connection less data messages */
+void msc_handle_udt(struct osmo_sccp_user *scu, struct conn_info *conn_info, struct msgb *msg);
+
+/* Handle incoming connection oriented messages */
+int msc_handle_dt1(struct osmo_sccp_user *scu, struct conn_info *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 971745980..a0aade64b 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -195,6 +195,11 @@ struct gsm_subscriber_connection {
uint16_t mgcp_rtp_port_cn;
uint8_t rab_id;
} iu;
+
+ struct {
+ struct osmo_sccp_user *scu;
+ int conn_id;
+ } a;
};
diff --git a/openbsc/include/openbsc/iu.h b/openbsc/include/openbsc/iu.h
index 0cc16d011..a0c481aae 100644
--- a/openbsc/include/openbsc/iu.h
+++ b/openbsc/include/openbsc/iu.h
@@ -80,3 +80,5 @@ int iu_tx_release(struct ue_conn_ctx *ctx, const struct RANAP_Cause *cause);
void iu_vty_init(int iu_parent_node, enum nsap_addr_enc *rab_assign_addr_enc);
int iu_vty_config_write(struct vty *vty, const char *indent);
+
+struct ue_conn_ctx *ue_conn_ctx_alloc(struct osmo_sccp_addr *addr, uint32_t conn_id);
diff --git a/openbsc/include/openbsc/msc_ifaces.h b/openbsc/include/openbsc/msc_ifaces.h
index 2965c72c5..942e1cebd 100644
--- a/openbsc/include/openbsc/msc_ifaces.h
+++ b/openbsc/include/openbsc/msc_ifaces.h
@@ -28,20 +28,18 @@
/* Each main linkage must implement this function (see comment above). */
extern int iu_tx(struct msgb *msg, uint8_t sapi);
-/* 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).
- * " */
+/* FIXME: Maybe the function prototypes that are implemented in a_iface.c
+ * should be moved to a_iface.h too? */
+
+/* Send DTAP message via A-interface (see also: a_iface.c) */
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).
- * " */
+/* Page a subscriber via A-interface (see also: a_iface.c) */
extern int a_page(const char *imsi, uint32_t tmsi, uint16_t lac);
+/* Send assignment request via A-interface */
+extern int a_assign(struct gsm_trans *trans);
+
int msc_tx_dtap(struct gsm_subscriber_connection *conn,
struct msgb *msg);
@@ -50,6 +48,7 @@ int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn,
enum gsm48_reject_value value);
/* TODO: specific to A interface, move this away */
+/* Send Cipher mode command via A-interface (see also: a_iface.c) */
int msc_gsm0808_tx_cipher_mode(struct gsm_subscriber_connection *conn, int cipher,
const uint8_t *key, int len, int include_imeisv);
diff --git a/openbsc/include/openbsc/osmo_msc.h b/openbsc/include/openbsc/osmo_msc.h
index fa7ea293d..6a3b36761 100644
--- a/openbsc/include/openbsc/osmo_msc.h
+++ b/openbsc/include/openbsc/osmo_msc.h
@@ -69,6 +69,9 @@ void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id,
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_subscr_conn_init(void);
bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn);