Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 1 | /* mgcp_ss7 helper coder */ |
| 2 | /* |
Holger Hans Peter Freyther | dcc3312 | 2011-03-01 01:24:10 +0100 | [diff] [blame] | 3 | * (C) 2010-2011 by Holger Hans Peter Freyther <zecke@selfish.org> |
| 4 | * (C) 2010-2011 by On-Waves |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 5 | * All Rights Reserved |
| 6 | * |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame] | 7 | * This program is free software: you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU Affero General Public License as published by |
| 9 | * the Free Software Foundation, either version 3 of the License, or |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame] | 15 | * GNU Affero General Public License for more details. |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 16 | * |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame] | 17 | * You should have received a copy of the GNU Affero General Public License |
| 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 19 | * |
| 20 | */ |
| 21 | |
| 22 | #ifndef mgcp_ss7_h |
| 23 | #define mgcp_ss7_h |
| 24 | |
Harald Welte | ff397ed | 2011-05-08 10:29:23 +0200 | [diff] [blame^] | 25 | #include <osmocom/core/timer.h> |
| 26 | #include <osmocom/core/write_queue.h> |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 27 | |
Holger Hans Peter Freyther | 5fb3057 | 2010-08-06 15:56:01 +0000 | [diff] [blame] | 28 | #include <osmocom/vty/command.h> |
| 29 | |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 30 | #include "thread.h" |
| 31 | |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 32 | struct mgcp_ss7 { |
| 33 | struct mgcp_config *cfg; |
Harald Welte | ff397ed | 2011-05-08 10:29:23 +0200 | [diff] [blame^] | 34 | struct osmo_wqueue mgcp_fd; |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 35 | struct msgb *mgcp_msg; |
| 36 | |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 37 | /* timer */ |
Harald Welte | ff397ed | 2011-05-08 10:29:23 +0200 | [diff] [blame^] | 38 | struct osmo_timer_list poll_timer; |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 39 | |
| 40 | /* thread handling */ |
| 41 | struct thread_notifier *cmd_queue; |
| 42 | pthread_t thread; |
| 43 | }; |
| 44 | |
| 45 | enum { |
| 46 | MGCP_SS7_MUTE_STATUS, |
| 47 | MGCP_SS7_ALLOCATE, |
| 48 | MGCP_SS7_DELETE, |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | struct mgcp_ss7_cmd { |
| 52 | struct llist_head entry; |
Holger Hans Peter Freyther | 5aa1701 | 2010-07-31 04:37:26 +0800 | [diff] [blame] | 53 | uint8_t type; |
Holger Hans Peter Freyther | dcc3312 | 2011-03-01 01:24:10 +0100 | [diff] [blame] | 54 | struct mgcp_endpoint *endp; |
Holger Hans Peter Freyther | 9ed3e1b | 2010-07-31 05:22:56 +0800 | [diff] [blame] | 55 | uint32_t param; |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 56 | }; |
| 57 | |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 58 | void mgcp_ss7_reset(struct mgcp_ss7 *mgcp); |
Holger Hans Peter Freyther | dcc3312 | 2011-03-01 01:24:10 +0100 | [diff] [blame] | 59 | |
| 60 | void mgcp_mgw_vty_init(); |
Holger Hans Peter Freyther | 97f66e2 | 2010-07-28 03:32:52 +0800 | [diff] [blame] | 61 | |
| 62 | #endif |