Holger Hans Peter Freyther | 6f38c06 | 2010-02-20 21:21:02 +0100 | [diff] [blame] | 1 | /* MGCP Private Data */ |
| 2 | |
| 3 | /* |
| 4 | * (C) 2009-2010 by Holger Hans Peter Freyther <zecke@selfish.org> |
| 5 | * (C) 2009-2010 by On-Waves |
| 6 | * All Rights Reserved |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License along |
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef OPENBSC_MGCP_DATA_H |
| 25 | #define OPENBSC_MGCP_DATA_H |
| 26 | |
Holger Hans Peter Freyther | f41fb1f | 2010-02-26 20:16:37 +0100 | [diff] [blame] | 27 | #include <osmocore/select.h> |
Holger Hans Peter Freyther | 6f38c06 | 2010-02-20 21:21:02 +0100 | [diff] [blame] | 28 | |
| 29 | #define CI_UNUSED 0 |
| 30 | |
| 31 | struct mgcp_endpoint { |
| 32 | int ci; |
| 33 | char *callid; |
| 34 | char *local_options; |
| 35 | int conn_mode; |
| 36 | |
Holger Hans Peter Freyther | 001dc61 | 2010-02-26 13:41:22 +0100 | [diff] [blame] | 37 | int bts_payload_type; |
| 38 | int net_payload_type; |
| 39 | |
Holger Hans Peter Freyther | 6f38c06 | 2010-02-20 21:21:02 +0100 | [diff] [blame] | 40 | /* the local rtp port we are binding to */ |
| 41 | int rtp_port; |
| 42 | |
| 43 | /* |
| 44 | * RTP mangling: |
| 45 | * - we get RTP and RTCP to us and need to forward to the BTS |
| 46 | * - we get RTP and RTCP from the BTS and forward to the network |
| 47 | */ |
| 48 | struct bsc_fd local_rtp; |
| 49 | struct bsc_fd local_rtcp; |
| 50 | |
| 51 | struct in_addr remote; |
| 52 | struct in_addr bts; |
| 53 | |
| 54 | /* in network byte order */ |
| 55 | int net_rtp, net_rtcp; |
| 56 | int bts_rtp, bts_rtcp; |
| 57 | |
| 58 | /* backpointer */ |
| 59 | struct mgcp_config *cfg; |
| 60 | }; |
| 61 | |
| 62 | #define ENDPOINT_NUMBER(endp) abs(endp - endp->cfg->endpoints) |
| 63 | |
| 64 | #endif |