aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/osmo_bsc.h2
-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
4 files changed, 39 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/osmo_bsc.h b/openbsc/include/openbsc/osmo_bsc.h
index 389fcc930..43182ad3e 100644
--- a/openbsc/include/openbsc/osmo_bsc.h
+++ b/openbsc/include/openbsc/osmo_bsc.h
@@ -11,4 +11,6 @@ int bsc_queue_for_msc(struct gsm_subscriber_connection *conn, struct msgb *msg);
int bsc_create_new_connection(struct gsm_subscriber_connection *conn,
struct msgb *msg, uint16_t chosen_channel);
+int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
+
#endif
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;
+}