aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am2
-rw-r--r--include/mgcp_callagent.h35
-rw-r--r--include/msc_connection.h5
3 files changed, 39 insertions, 3 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index c923515..c46e698 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -2,6 +2,6 @@ noinst_HEADERS = mtp_level3.h mtp_data.h ipaccess.h thread.h mtp_pcap.h \
mgcp_ss7.h bss_patch.h bssap_sccp.h bsc_data.h udp_input.h \
snmp_mtp.h cellmgr_debug.h bsc_sccp.h bsc_ussd.h sctp_m2ua.h \
isup_types.h counter.h msc_connection.h ss7_application.h \
- mgcp_patch.h ss7_vty.h dtmf_scheduler.h
+ mgcp_patch.h ss7_vty.h dtmf_scheduler.h mgcp_callagent.h
SUBDIRS = mgcp
diff --git a/include/mgcp_callagent.h b/include/mgcp_callagent.h
new file mode 100644
index 0000000..8260daa
--- /dev/null
+++ b/include/mgcp_callagent.h
@@ -0,0 +1,35 @@
+/*
+ * (C) 2012 by Holger Hans Peter Freyther
+ * (C) 2012 by On-Waves
+ * All Rights Reserved
+ *
+ * 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/>.
+ *
+ */
+
+#ifndef mgcp_callagent_h
+#define mgcp_callagent_h
+
+#include <osmocom/core/write_queue.h>
+
+struct mgcp_callagent {
+ struct osmo_wqueue queue;
+ void (*read_cb)(struct mgcp_callagent *, struct msgb *msg);
+};
+
+int mgcp_create_port(struct mgcp_callagent *agent);
+void mgcp_forward(struct mgcp_callagent *agent, const uint8_t *data,
+ unsigned int length);
+
+#endif
diff --git a/include/msc_connection.h b/include/msc_connection.h
index 94754d7..74319b3 100644
--- a/include/msc_connection.h
+++ b/include/msc_connection.h
@@ -20,8 +20,9 @@
#ifndef MSC_CONNECTION_H
#define MSC_CONNECTION_H
+#include "mgcp_callagent.h"
+
#include <osmocom/core/linuxlist.h>
-#include <osmocom/core/write_queue.h>
#include <osmocom/core/timer.h>
#include <osmocom/sccp/sccp.h>
@@ -57,7 +58,7 @@ struct msc_connection {
struct osmo_timer_list pong_timeout;
/* mgcp messgaes */
- struct osmo_wqueue mgcp_agent;
+ struct mgcp_callagent mgcp_agent;
/* application pointer */
struct ss7_application *app;