diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-04-12 15:26:04 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-06-18 17:50:08 +0200 |
commit | 0923fc6707ea35776ad8c37a6d490ac3408dd274 (patch) | |
tree | 0da3805e1f1d8d5f56167d24dc3a058f81aec768 /openbsc/include/openbsc | |
parent | 22593b2cef43bceafe7727f893be4657f949489f (diff) |
WIP: Integrate AoIP into OsmoBSC
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r-- | openbsc/include/openbsc/Makefile.am | 1 | ||||
-rw-r--r-- | openbsc/include/openbsc/bsc_msc.h | 11 | ||||
-rw-r--r-- | openbsc/include/openbsc/bsc_msc_data.h | 7 | ||||
-rw-r--r-- | openbsc/include/openbsc/debug.h | 1 | ||||
-rw-r--r-- | openbsc/include/openbsc/osmo_bsc.h | 3 | ||||
-rw-r--r-- | openbsc/include/openbsc/osmo_bsc_sigtran.h | 39 |
6 files changed, 62 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 81c51aeba..1c31f743e 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -67,6 +67,7 @@ noinst_HEADERS = \ osmo_bsc_grace.h \ osmo_bsc_rf.h \ osmo_msc.h \ + osmo_bsc_sigtran.h \ bsc_msc_data.h \ osmux.h \ paging.h \ diff --git a/openbsc/include/openbsc/bsc_msc.h b/openbsc/include/openbsc/bsc_msc.h index 39258d364..8b9553bfa 100644 --- a/openbsc/include/openbsc/bsc_msc.h +++ b/openbsc/include/openbsc/bsc_msc.h @@ -24,6 +24,7 @@ #include <osmocom/core/write_queue.h> #include <osmocom/core/timer.h> +#include <osmocom/sigtran/sccp_sap.h> #include <netinet/in.h> @@ -37,6 +38,7 @@ struct bsc_msc_dest { struct bsc_msc_connection { + /* FIXME: Remove stuff that is no longer needed! */ struct osmo_wqueue write_queue; int is_connected; int is_authenticated; @@ -52,6 +54,15 @@ struct bsc_msc_connection { struct osmo_timer_list timeout_timer; struct msgb *pending_msg; + + /* Sigtran connection data */ + struct osmo_sccp_instance *sccp; + struct osmo_sccp_user *sccp_user; + struct osmo_sccp_addr g_calling_addr; + struct osmo_sccp_addr g_called_addr; + struct osmo_timer_list msc_reset_timer; + bool reset_ack; + int conn_id_counter; }; struct bsc_msc_connection *bsc_msc_create(void *ctx, struct llist_head *dest); diff --git a/openbsc/include/openbsc/bsc_msc_data.h b/openbsc/include/openbsc/bsc_msc_data.h index 38e87cfb9..a819abab3 100644 --- a/openbsc/include/openbsc/bsc_msc_data.h +++ b/openbsc/include/openbsc/bsc_msc_data.h @@ -32,6 +32,13 @@ #include <osmocom/core/timer.h> #include <osmocom/gsm/protocol/gsm_04_08.h> + +#include <osmocom/sigtran/osmo_ss7.h> +#include <osmocom/sigtran/sccp_sap.h> +#include <osmocom/sigtran/sccp_helpers.h> +#include <osmocom/sigtran/protocol/sua.h> +#include <osmocom/sigtran/protocol/m3ua.h> + #include <regex.h> struct osmo_bsc_rf; diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h index de00b2930..65e197d52 100644 --- a/openbsc/include/openbsc/debug.h +++ b/openbsc/include/openbsc/debug.h @@ -40,6 +40,7 @@ enum { DPCU, DVLR, DIUCS, + DSIGTRAN, Debug_LastEntry, }; diff --git a/openbsc/include/openbsc/osmo_bsc.h b/openbsc/include/openbsc/osmo_bsc.h index 9e688fd59..5d3ff6a7f 100644 --- a/openbsc/include/openbsc/osmo_bsc.h +++ b/openbsc/include/openbsc/osmo_bsc.h @@ -44,6 +44,9 @@ struct osmo_bsc_sccp_con { uint8_t new_subscriber; struct bsc_filter_state filter_state; + + /* Sigtran connection ID */ + int conn_id; }; struct bsc_api *osmo_bsc_api(); diff --git a/openbsc/include/openbsc/osmo_bsc_sigtran.h b/openbsc/include/openbsc/osmo_bsc_sigtran.h new file mode 100644 index 000000000..37085b653 --- /dev/null +++ b/openbsc/include/openbsc/osmo_bsc_sigtran.h @@ -0,0 +1,39 @@ +/* (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 + +/* Allocate resources to make a new connection oriented sigtran connection + * (not the connection ittself!) */ +enum bsc_con osmo_bsc_sigtran_new_conn(struct gsm_subscriber_connection *conn, struct bsc_msc_data *msc); + +/* Open a new connection oriented sigtran connection */ +int osmo_bsc_sigtran_open_conn(struct osmo_bsc_sccp_con *conn, struct msgb *msg); + +/* Send data to MSC */ +int osmo_bsc_sigtran_send(struct osmo_bsc_sccp_con *conn, struct msgb *msg); + +/* Delete a connection from the list with open connections + * (called by osmo_bsc_api.c on failing open connections and + * locally, when a connection is closed by the MSC */ +int osmo_bsc_sigtran_del_conn(struct osmo_bsc_sccp_con *sccp); + +/* Initalize osmo sigtran backhaul */ +int osmo_bsc_sigtran_init(struct llist_head *mscs); |