aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-12-18 12:28:21 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-18 13:17:11 +0100
commitbb23dc17f8f56be836dc50c925c04a5aeaec979c (patch)
tree739d5158e21a8619c1e964b692306bdd9b196dd8 /openbsc/include/openbsc
parent1610626fe9e65693c6d8743129b10ed4958ec6ea (diff)
gprs: Add GSUP client
This commit adds the client code to get subscriber information from a remote server. It provides an IPA over TCP connection to transmit and receive GSUP messages. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/Makefile.am3
-rw-r--r--openbsc/include/openbsc/gprs_gsup_client.h44
2 files changed, 46 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am
index 92978e7ce..e792ff61e 100644
--- a/openbsc/include/openbsc/Makefile.am
+++ b/openbsc/include/openbsc/Makefile.am
@@ -15,7 +15,8 @@ noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \
bss.h gsm_data_shared.h ipaccess.h mncc_int.h \
arfcn_range_encode.h nat_rewrite_trie.h bsc_nat_callstats.h \
osmux.h mgcp_transcode.h rtp.h gprs_utils.h \
- gprs_gb_parse.h smpp.h meas_feed.h gprs_gsup_messages.h
+ gprs_gb_parse.h smpp.h meas_feed.h gprs_gsup_messages.h \
+ gprs_gsup_client.h
openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h
openbscdir = $(includedir)/openbsc
diff --git a/openbsc/include/openbsc/gprs_gsup_client.h b/openbsc/include/openbsc/gprs_gsup_client.h
new file mode 100644
index 000000000..89034e00a
--- /dev/null
+++ b/openbsc/include/openbsc/gprs_gsup_client.h
@@ -0,0 +1,44 @@
+/* GPRS Subscriber Update Protocol client */
+
+/* (C) 2014 by Sysmocom s.f.m.c. GmbH
+ * All Rights Reserved
+ *
+ * Author: Jacob Erlbeck
+ *
+ * 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/>.
+ *
+ */
+#pragma once
+
+struct msgb;
+struct ipa_client_conn;
+struct gprs_gsup_client;
+
+/* Expects message in msg->l2h */
+typedef int (*gprs_gsup_read_cb_t)(struct gprs_gsup_client *gsupc, struct msgb *msg);
+
+struct gprs_gsup_client {
+ struct ipa_client_conn *link;
+ gprs_gsup_read_cb_t read_cb;
+ void *data;
+};
+
+struct gprs_gsup_client *gprs_gsup_client_create(const char *ip_addr,
+ unsigned int tcp_port,
+ gprs_gsup_read_cb_t read_cb);
+
+void gprs_gsup_client_destroy(struct gprs_gsup_client *gsupc);
+int gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg);
+struct msgb *gprs_gsup_msgb_alloc(void);
+