aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-05 11:21:18 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-11-15 20:06:48 +0100
commit5bb874d2f5c7bc87121d74437cc6d1fe0e6cda1c (patch)
tree68f7c73870ca2fee5993ae2d4d3d29eb03fd2377 /openbsc/src/bsc
parentcc48fb80836defe5beeba4b4c9bcc7f895af5ec5 (diff)
bsc: Add a hook where we can scan for LU and other messages.
Diffstat (limited to 'openbsc/src/bsc')
-rw-r--r--openbsc/src/bsc/Makefile.am1
-rw-r--r--openbsc/src/bsc/osmo_bsc_api.c6
-rw-r--r--openbsc/src/bsc/osmo_bsc_filter.c31
3 files changed, 37 insertions, 1 deletions
diff --git a/openbsc/src/bsc/Makefile.am b/openbsc/src/bsc/Makefile.am
index d304628f5..168c7215f 100644
--- a/openbsc/src/bsc/Makefile.am
+++ b/openbsc/src/bsc/Makefile.am
@@ -7,6 +7,7 @@ bin_PROGRAMS = osmo-bsc
osmo_bsc_SOURCES = osmo_bsc_main.c osmo_bsc_rf.c osmo_bsc_vty.c osmo_bsc_api.c \
osmo_bsc_grace.c osmo_bsc_msc.c osmo_bsc_sccp.c \
+ osmo_bsc_filter.c \
$(top_srcdir)/src/debug.c $(top_srcdir)/src/bsc_msc.c \
$(top_srcdir)/src/bsc_init.c
osmo_bsc_LDADD = $(top_builddir)/src/libvty.a \
diff --git a/openbsc/src/bsc/osmo_bsc_api.c b/openbsc/src/bsc/osmo_bsc_api.c
index dc31cd421..84c2d6ec0 100644
--- a/openbsc/src/bsc/osmo_bsc_api.c
+++ b/openbsc/src/bsc/osmo_bsc_api.c
@@ -66,8 +66,11 @@ static void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
static int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg,
uint16_t chosen_channel)
{
- if (bsc_create_new_connection(conn, msg, chosen_channel) == 0)
+ if (bsc_create_new_connection(conn, msg, chosen_channel) == 0) {
+ bsc_scan_bts_msg(conn, msg);
return BSC_API_CONN_POL_ACCEPT;
+ }
+
return BSC_API_CONN_POL_REJECT;
}
@@ -76,6 +79,7 @@ static void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, st
struct msgb *resp;
return_when_not_connected(conn);
+ bsc_scan_bts_msg(conn, msg);
resp = gsm0808_create_dtap(msg, link_id);
queue_msg_or_return(resp);
}
diff --git a/openbsc/src/bsc/osmo_bsc_filter.c b/openbsc/src/bsc/osmo_bsc_filter.c
new file mode 100644
index 000000000..1aeaa951e
--- /dev/null
+++ b/openbsc/src/bsc/osmo_bsc_filter.c
@@ -0,0 +1,31 @@
+/* (C) 2009-2010 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2009-2010 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 General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <openbsc/osmo_bsc.h>
+
+/**
+ * This is used to scan a message for extra functionality of the BSC. This
+ * includes scanning for location updating requests/acceptd and then send
+ * a welcome USSD message to the subscriber.
+ */
+int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
+{
+ return 0;
+}