Philipp Maier | 39c609b | 2017-09-27 15:51:34 +0200 | [diff] [blame] | 1 | /* (C) 2017 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> |
| 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 | |
| 23 | /* MGCP state handler context (fsm etc..) */ |
| 24 | struct mgcp_ctx { |
| 25 | /* FSM instance, which handles the connection switching procedure */ |
| 26 | struct osmo_fsm_inst *fsm; |
| 27 | |
| 28 | /* RTP endpoint number */ |
| 29 | uint16_t rtp_endpoint; |
| 30 | |
| 31 | /* Copy of the pointer and the data with context information |
| 32 | * needed to process the AoIP and MGCP requests (system data) */ |
| 33 | struct mgcp_client *mgcp; |
Philipp Maier | 39c609b | 2017-09-27 15:51:34 +0200 | [diff] [blame] | 34 | struct osmo_bsc_sccp_con *conn; |
| 35 | enum gsm48_chan_mode chan_mode; |
| 36 | bool full_rate; |
| 37 | struct gsm_lchan *lchan; |
| 38 | struct gsm_lchan *ho_lchan; |
| 39 | struct msgb *resp; |
| 40 | }; |
| 41 | |
| 42 | struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, |
| 43 | enum gsm48_chan_mode chan_mode, bool full_rate); |
| 44 | void mgcp_clear_complete(struct mgcp_ctx *mgcp_ctx, struct msgb *resp); |
| 45 | void mgcp_ass_complete(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *lchan); |
| 46 | void mgcp_handover(struct mgcp_ctx *mgcp_ctx, struct gsm_lchan *ho_lchan); |
| 47 | void mgcp_free_ctx(struct mgcp_ctx *mgcp_ctx); |