Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 1 | /* (C) 2017 by Sysmocom s.f.m.c. GmbH |
| 2 | * All Rights Reserved |
| 3 | * |
| 4 | * Author: Philipp Maier |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU Affero General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU Affero General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Affero General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #pragma once |
| 22 | |
Neels Hofmeyr | c016479 | 2017-09-04 15:15:32 +0200 | [diff] [blame] | 23 | #include <osmocom/bsc/gsm_data.h> |
| 24 | #include <osmocom/bsc/bsc_msc_data.h> |
Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 25 | |
| 26 | /* Allocate resources to make a new connection oriented sigtran connection |
| 27 | * (not the connection ittself!) */ |
| 28 | enum bsc_con osmo_bsc_sigtran_new_conn(struct gsm_subscriber_connection *conn, struct bsc_msc_data *msc); |
Neels Hofmeyr | 1ae1826 | 2020-09-12 01:44:41 +0000 | [diff] [blame] | 29 | struct gsm_subscriber_connection *bsc_conn_by_bsub(struct bsc_subscr *bsub); |
Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 30 | |
| 31 | /* Open a new connection oriented sigtran connection */ |
Harald Welte | 519c7e1 | 2018-01-28 02:45:46 +0100 | [diff] [blame] | 32 | int osmo_bsc_sigtran_open_conn(struct gsm_subscriber_connection *conn, struct msgb *msg); |
Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 33 | |
| 34 | /* Send data to MSC */ |
Harald Welte | 519c7e1 | 2018-01-28 02:45:46 +0100 | [diff] [blame] | 35 | int osmo_bsc_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb *msg); |
Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 36 | |
Martin Hauke | a29affd | 2019-11-13 22:10:41 +0100 | [diff] [blame] | 37 | /* Initialize osmo sigtran backhaul */ |
Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 38 | int osmo_bsc_sigtran_init(struct llist_head *mscs); |
| 39 | |
| 40 | /* Close all open sigtran connections and channels */ |
Neels Hofmeyr | 6efafb1 | 2020-10-08 00:39:13 +0200 | [diff] [blame] | 41 | void osmo_bsc_sigtran_reset(struct bsc_msc_data *msc); |
Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 42 | |
Neels Hofmeyr | c27ae2d | 2020-10-04 21:32:52 +0200 | [diff] [blame] | 43 | void osmo_bsc_sigtran_tx_reset(const struct bsc_msc_data *msc); |
| 44 | |
Philipp Maier | 39f62bb | 2017-04-09 12:32:51 +0200 | [diff] [blame] | 45 | /* Send reset-ack to MSC */ |
| 46 | void osmo_bsc_sigtran_tx_reset_ack(const struct bsc_msc_data *msc); |
Harald Welte | 68e4be9 | 2018-05-26 22:42:29 +0200 | [diff] [blame] | 47 | |
| 48 | /* receive + process a CTRL command from the piggy-back on the IPA/SCCPlite link */ |
| 49 | int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg); |
Harald Welte | 1626f90 | 2018-05-26 22:56:59 +0200 | [diff] [blame] | 50 | |
| 51 | /* receive + process a MGCP message from the piggy-back on the IPA/SCCPlite link */ |
| 52 | int bsc_sccplite_rx_mgcp(struct osmo_ss7_asp *asp, struct msgb *msg); |
| 53 | |
| 54 | /* send a message via SCCPLite to given MSC */ |
| 55 | int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg); |
| 56 | |
| 57 | /* we received some data on the UDP proxy socket from the MGW. Pass it to MSC via IPA */ |
| 58 | int bsc_sccplite_mgcp_proxy_cb(struct osmo_fd *ofd, unsigned int what); |