From e236596bf42aec7520f2d7a879bb8d2aef7afad0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 4 May 2010 07:41:59 +0200 Subject: [PATCH] [gprs] Move all GPRS related code to src/gprs subdirectory --- openbsc/configure.in | 1 + openbsc/src/Makefile.am | 18 +++++------------- openbsc/src/gprs/Makefile.am | 17 +++++++++++++++++ openbsc/src/{ => gprs}/crc24.c | 0 openbsc/src/{ => gprs}/gb_proxy.c | 0 openbsc/src/{ => gprs}/gb_proxy_main.c | 2 +- openbsc/src/{ => gprs}/gb_proxy_vty.c | 0 openbsc/src/{ => gprs}/gprs_bssgp.c | 0 openbsc/src/{ => gprs}/gprs_llc.c | 0 openbsc/src/{ => gprs}/gprs_ns.c | 0 openbsc/src/{ => gprs}/gprs_sgsn.c | 0 openbsc/src/{ => gprs}/gprs_sndcp.c | 0 openbsc/src/{ => gprs}/gsm_04_08_gprs.c | 0 openbsc/src/{ => gprs}/osmo_gbproxy.cfg | 0 openbsc/src/{ => gprs}/osmo_sgsn.cfg | 0 openbsc/src/{ => gprs}/sgsn_main.c | 2 +- openbsc/src/{ => gprs}/sgsn_vty.c | 0 17 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 openbsc/src/gprs/Makefile.am rename openbsc/src/{ => gprs}/crc24.c (100%) rename openbsc/src/{ => gprs}/gb_proxy.c (100%) rename openbsc/src/{ => gprs}/gb_proxy_main.c (99%) rename openbsc/src/{ => gprs}/gb_proxy_vty.c (100%) rename openbsc/src/{ => gprs}/gprs_bssgp.c (100%) rename openbsc/src/{ => gprs}/gprs_llc.c (100%) rename openbsc/src/{ => gprs}/gprs_ns.c (100%) rename openbsc/src/{ => gprs}/gprs_sgsn.c (100%) rename openbsc/src/{ => gprs}/gprs_sndcp.c (100%) rename openbsc/src/{ => gprs}/gsm_04_08_gprs.c (100%) rename openbsc/src/{ => gprs}/osmo_gbproxy.cfg (100%) rename openbsc/src/{ => gprs}/osmo_sgsn.cfg (100%) rename openbsc/src/{ => gprs}/sgsn_main.c (99%) rename openbsc/src/{ => gprs}/sgsn_vty.c (100%) diff --git a/openbsc/configure.in b/openbsc/configure.in index 615e59d91..98a93fc6b 100644 --- a/openbsc/configure.in +++ b/openbsc/configure.in @@ -48,6 +48,7 @@ AC_OUTPUT( include/sccp/Makefile include/Makefile src/Makefile + src/gprs/Makefile tests/Makefile tests/debug/Makefile tests/gsm0408/Makefile diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am index 18245ed5e..9dcdea02f 100644 --- a/openbsc/src/Makefile.am +++ b/openbsc/src/Makefile.am @@ -2,9 +2,12 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) AM_LDFLAGS = $(LIBOSMOCORE_LIBS) +# build current directory before building gprs +SUBDIRS = . gprs + sbin_PROGRAMS = bsc_hack bs11_config ipaccess-find ipaccess-config \ - isdnsync bsc_mgcp ipaccess-proxy osmo-gbproxy osmo-sgsn -noinst_LIBRARIES = libbsc.a libmsc.a libvty.a libsccp.a libsgsn.a + isdnsync bsc_mgcp ipaccess-proxy +noinst_LIBRARIES = libbsc.a libmsc.a libvty.a libsccp.a noinst_HEADERS = vty/cardshell.h bscdir = $(libdir) @@ -19,9 +22,6 @@ libbsc_a_SOURCES = abis_rsl.c abis_nm.c gsm_data.c gsm_04_08_utils.c \ rtp_proxy.c bts_siemens_bs11.c bts_ipaccess_nanobts.c \ bts_unknown.c bsc_version.c bsc_api.c -libsgsn_a_SOURCES = gprs_ns.c gprs_bssgp.c gprs_llc.c gsm_04_08_gprs.c \ - crc24.c gprs_sgsn.c - libmsc_a_SOURCES = gsm_subscriber.c db.c \ mncc.c gsm_04_08.c gsm_04_11.c transaction.c \ token_auth.c rrlp.c gsm_04_80.c ussd.c silent_call.c \ @@ -50,11 +50,3 @@ bsc_mgcp_SOURCES = mgcp/mgcp_main.c mgcp/mgcp_protocol.c mgcp/mgcp_network.c mgc bsc_mgcp_LDADD = libvty.a ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c debug.c - -osmo_gbproxy_SOURCES = gb_proxy.c gb_proxy_main.c gb_proxy_vty.c \ - gprs_ns.c socket.c debug.c -osmo_gbproxy_LDADD = libvty.a - -osmo_sgsn_SOURCES = sgsn_main.c sgsn_vty.c \ - socket.c debug.c -osmo_sgsn_LDADD = libvty.a libsgsn.a diff --git a/openbsc/src/gprs/Makefile.am b/openbsc/src/gprs/Makefile.am new file mode 100644 index 000000000..ac177f7fd --- /dev/null +++ b/openbsc/src/gprs/Makefile.am @@ -0,0 +1,17 @@ +INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) +AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) +AM_LDFLAGS = $(LIBOSMOCORE_LIBS) + +sbin_PROGRAMS = osmo-gbproxy osmo-sgsn +noinst_LIBRARIES = libsgsn.a + +libsgsn_a_SOURCES = gprs_ns.c gprs_bssgp.c gprs_llc.c gsm_04_08_gprs.c \ + crc24.c gprs_sgsn.c + +osmo_gbproxy_SOURCES = gb_proxy.c gb_proxy_main.c gb_proxy_vty.c \ + gprs_ns.c ../socket.c ../debug.c +osmo_gbproxy_LDADD = ../libvty.a + +osmo_sgsn_SOURCES = sgsn_main.c sgsn_vty.c \ + ../socket.c ../debug.c +osmo_sgsn_LDADD = ../libvty.a libsgsn.a diff --git a/openbsc/src/crc24.c b/openbsc/src/gprs/crc24.c similarity index 100% rename from openbsc/src/crc24.c rename to openbsc/src/gprs/crc24.c diff --git a/openbsc/src/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c similarity index 100% rename from openbsc/src/gb_proxy.c rename to openbsc/src/gprs/gb_proxy.c diff --git a/openbsc/src/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c similarity index 99% rename from openbsc/src/gb_proxy_main.c rename to openbsc/src/gprs/gb_proxy_main.c index 549b6cece..0054b7844 100644 --- a/openbsc/src/gb_proxy_main.c +++ b/openbsc/src/gprs/gb_proxy_main.c @@ -43,7 +43,7 @@ #include #include -#include "../bscconfig.h" +#include "../../bscconfig.h" /* this is here for the vty... it will never be called */ void subscr_put() { abort(); } diff --git a/openbsc/src/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c similarity index 100% rename from openbsc/src/gb_proxy_vty.c rename to openbsc/src/gprs/gb_proxy_vty.c diff --git a/openbsc/src/gprs_bssgp.c b/openbsc/src/gprs/gprs_bssgp.c similarity index 100% rename from openbsc/src/gprs_bssgp.c rename to openbsc/src/gprs/gprs_bssgp.c diff --git a/openbsc/src/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c similarity index 100% rename from openbsc/src/gprs_llc.c rename to openbsc/src/gprs/gprs_llc.c diff --git a/openbsc/src/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c similarity index 100% rename from openbsc/src/gprs_ns.c rename to openbsc/src/gprs/gprs_ns.c diff --git a/openbsc/src/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c similarity index 100% rename from openbsc/src/gprs_sgsn.c rename to openbsc/src/gprs/gprs_sgsn.c diff --git a/openbsc/src/gprs_sndcp.c b/openbsc/src/gprs/gprs_sndcp.c similarity index 100% rename from openbsc/src/gprs_sndcp.c rename to openbsc/src/gprs/gprs_sndcp.c diff --git a/openbsc/src/gsm_04_08_gprs.c b/openbsc/src/gprs/gsm_04_08_gprs.c similarity index 100% rename from openbsc/src/gsm_04_08_gprs.c rename to openbsc/src/gprs/gsm_04_08_gprs.c diff --git a/openbsc/src/osmo_gbproxy.cfg b/openbsc/src/gprs/osmo_gbproxy.cfg similarity index 100% rename from openbsc/src/osmo_gbproxy.cfg rename to openbsc/src/gprs/osmo_gbproxy.cfg diff --git a/openbsc/src/osmo_sgsn.cfg b/openbsc/src/gprs/osmo_sgsn.cfg similarity index 100% rename from openbsc/src/osmo_sgsn.cfg rename to openbsc/src/gprs/osmo_sgsn.cfg diff --git a/openbsc/src/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c similarity index 99% rename from openbsc/src/sgsn_main.c rename to openbsc/src/gprs/sgsn_main.c index d9ea6a8cf..15f760d5c 100644 --- a/openbsc/src/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -44,7 +44,7 @@ #include #include -#include "../bscconfig.h" +#include "../../bscconfig.h" /* this is here for the vty... it will never be called */ void subscr_put() { abort(); } diff --git a/openbsc/src/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c similarity index 100% rename from openbsc/src/sgsn_vty.c rename to openbsc/src/gprs/sgsn_vty.c