aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-04 18:42:46 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-03 21:42:27 +0200
commit4247cead2b77b2ad8ae2a6c1b48a450309185bb3 (patch)
treec1eabe06e86ee7bf958a5f6aeeaec490ef543cd1
parent38159428d2b1e95a2c6fa91775f7b3678aef2f1f (diff)
filter: Move the gsm 04.08 filter to a common place
For customer requirements we want to be able to do filtering on the BSC as well. The same messages need to be scanned and the same access-lists will be looked at. In the future we might even split traffic based on the IMSI. Begin with moving the code to a new top level directory and then renaming and removing the nat dependency.
-rw-r--r--openbsc/configure.ac1
-rw-r--r--openbsc/src/Makefile.am2
-rw-r--r--openbsc/src/libfilter/Makefile.am9
-rw-r--r--openbsc/src/libfilter/bsc_msg_filter.c (renamed from openbsc/src/osmo-bsc_nat/bsc_nat_filter.c)0
-rw-r--r--openbsc/src/osmo-bsc_nat/Makefile.am3
-rw-r--r--openbsc/tests/bsc-nat/Makefile.am5
6 files changed, 16 insertions, 4 deletions
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 00d1b70c9..394972f46 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -179,6 +179,7 @@ AC_OUTPUT(
src/libmsc/Makefile
src/libmgcp/Makefile
src/libcommon/Makefile
+ src/libfilter/Makefile
src/osmo-nitb/Makefile
src/osmo-bsc/Makefile
src/osmo-bsc_nat/Makefile
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am
index db7603b89..6f6174eb1 100644
--- a/openbsc/src/Makefile.am
+++ b/openbsc/src/Makefile.am
@@ -2,7 +2,7 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS)
AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS)
-SUBDIRS = libcommon libmgcp libbsc libmsc libtrau osmo-nitb osmo-bsc_mgcp utils ipaccess gprs
+SUBDIRS = libcommon libmgcp libbsc libmsc libtrau libfilter osmo-nitb osmo-bsc_mgcp utils ipaccess gprs
# Conditional modules
if BUILD_NAT
diff --git a/openbsc/src/libfilter/Makefile.am b/openbsc/src/libfilter/Makefile.am
new file mode 100644
index 000000000..e24ec5f73
--- /dev/null
+++ b/openbsc/src/libfilter/Makefile.am
@@ -0,0 +1,9 @@
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
+AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) \
+ $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS)
+
+noinst_LIBRARIES = libfilter.a
+
+libfilter_a_SOURCES = \
+ bsc_msg_filter.c
+
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c b/openbsc/src/libfilter/bsc_msg_filter.c
index 64f6d7347..64f6d7347 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c
+++ b/openbsc/src/libfilter/bsc_msg_filter.c
diff --git a/openbsc/src/osmo-bsc_nat/Makefile.am b/openbsc/src/osmo-bsc_nat/Makefile.am
index ca103a4ff..7a38430f9 100644
--- a/openbsc/src/osmo-bsc_nat/Makefile.am
+++ b/openbsc/src/osmo-bsc_nat/Makefile.am
@@ -7,12 +7,13 @@ bin_PROGRAMS = osmo-bsc_nat
osmo_bsc_nat_SOURCES = bsc_filter.c bsc_mgcp_utils.c bsc_nat.c bsc_nat_utils.c \
bsc_nat_vty.c bsc_sccp.c bsc_ussd.c bsc_nat_ctrl.c \
- bsc_nat_rewrite.c bsc_nat_filter.c bsc_nat_rewrite_trie.c
+ bsc_nat_rewrite.c bsc_nat_rewrite_trie.c
osmo_bsc_nat_LDADD = \
$(top_builddir)/src/libmgcp/libmgcp.a \
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libtrau/libtrau.a \
$(top_builddir)/src/libcommon/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
-lrt $(LIBOSMOSCCP_LIBS) $(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOCTRL_LIBS) \
$(LIBOSMOABIS_LIBS) $(LIBOSMONETIF_LIBS)
diff --git a/openbsc/tests/bsc-nat/Makefile.am b/openbsc/tests/bsc-nat/Makefile.am
index b620d9649..64cd9ac85 100644
--- a/openbsc/tests/bsc-nat/Makefile.am
+++ b/openbsc/tests/bsc-nat/Makefile.am
@@ -10,11 +10,12 @@ bsc_nat_test_SOURCES = bsc_nat_test.c \
$(top_srcdir)/src/osmo-bsc_nat/bsc_filter.c \
$(top_srcdir)/src/osmo-bsc_nat/bsc_sccp.c \
$(top_srcdir)/src/osmo-bsc_nat/bsc_nat_utils.c \
- $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_filter.c \
$(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite.c \
$(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c \
$(top_srcdir)/src/osmo-bsc_nat/bsc_mgcp_utils.c
-bsc_nat_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \
+bsc_nat_test_LDADD = \
+ $(top_builddir)/src/libfilter/libfilter.a \
+ $(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libmgcp/libmgcp.a \
$(top_builddir)/src/libtrau/libtrau.a \
$(top_builddir)/src/libcommon/libcommon.a \