diff --git a/configure.ac b/configure.ac index fd9ad289..9fe9fdd4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script AC_INIT([osmo-pcu], m4_esyscmd([./git-version-gen .tarball-version]), - [osmocom-pcu@lists.openbsc.org]) + [osmocom-pcu@lists.osmocom.org]) AM_INIT_AUTOMAKE([dist-bzip2]) @@ -24,6 +24,7 @@ dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3) +PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.5.2) AC_MSG_CHECKING([whether to enable sysmocom-bts hardware support]) AC_ARG_ENABLE(sysmocom-bts, diff --git a/src/Makefile.am b/src/Makefile.am index 4f8a548c..78c01e1d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,12 +18,8 @@ # along with this program. If not, see . # -# FIXME: This has to go!! -OPENBSC_DIR = $(top_srcdir)/../openbsc/openbsc -OPENGGSN_DIR = $(top_srcdir)/../openggsn - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) -I$(OPENBSC_DIR)/include -AM_CXXFLAGS = -Wall -ldl -pthread -lgtp +AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) +AM_CXXFLAGS = -Wall -ldl -pthread noinst_LTLIBRARIES = libgprs.la @@ -69,18 +65,7 @@ RLCMACTest_LDADD = \ pcu_SOURCES = pcu_main.cpp pcu_LDADD = \ libgprs.la \ - $(OPENBSC_DIR)/src/libgb/gprs_ns.o \ - $(OPENBSC_DIR)/src/libgb/gprs_bssgp.o \ - $(OPENBSC_DIR)/src/libgb/gprs_bssgp_bss.o \ - $(OPENBSC_DIR)/src/libgb/gprs_bssgp_util.o \ - $(OPENBSC_DIR)/src/libgb/gprs_ns_frgre.o \ - $(OPENBSC_DIR)/src/libcommon/socket.o \ - $(OPENBSC_DIR)/src/gprs/gprs_llc.o \ - $(OPENBSC_DIR)/src/gprs/gprs_gmm.o \ - $(OPENBSC_DIR)/src/gprs/gprs_sgsn.o \ - $(OPENBSC_DIR)/src/gprs/sgsn_libgtp.o \ - $(OPENBSC_DIR)/src/gprs/gprs_sndcp.o \ - $(OPENBSC_DIR)/src/gprs/crc24.o \ + $(LIBOSMOGB_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(COMMON_LA) diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 8d391f23..9084d841 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -279,3 +279,8 @@ int gprs_bssgp_pcu_rcvmsg(struct msgb *msg) } return rc; } + +int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + return 0; +} diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h index dd9022f7..584bbc2f 100644 --- a/src/gprs_bssgp_pcu.h +++ b/src/gprs_bssgp_pcu.h @@ -25,10 +25,11 @@ extern "C" { #include #include #include -#include -#include -#include +#include #include +#include +#include +#include int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause); diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp index 4bb9107a..5caa377f 100644 --- a/src/gprs_debug.cpp +++ b/src/gprs_debug.cpp @@ -28,8 +28,6 @@ #include #include #include -#include -#include #include /* default categories */ @@ -56,14 +54,9 @@ enum { static int filter_fn(const struct log_context *ctx, struct log_target *tar) { - struct gsm_subscriber *subscr = (struct gsm_subscriber*)ctx->ctx[BSC_CTX_SUBSCR]; const struct gprs_nsvc *nsvc = (const struct gprs_nsvc*)ctx->ctx[BSC_CTX_NSVC]; const struct gprs_nsvc *bvc = (const struct gprs_nsvc*)ctx->ctx[BSC_CTX_BVC]; - if ((tar->filter_map & (1 << FLT_IMSI)) != 0 - && subscr && strcmp(subscr->imsi, (const char*)tar->filter_data[FLT_IMSI]) == 0) - return 1; - /* Filter on the NS Virtual Connection */ if ((tar->filter_map & (1 << FLT_NSVC)) != 0 && nsvc && (nsvc == tar->filter_data[FLT_NSVC])) diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index c3712954..08c75cc5 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) osmo_init_logging(&gprs_log_info); pcu_l1if_open(); - sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb); + sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb, NULL); bssgp_nsi = sgsn_nsi; if (!bssgp_nsi) @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) dest.sin_port = htons(SGSN_PORT); inet_aton(SGSN_IP, &dest.sin_addr); - nsvc = nsip_connect(sgsn_nsi, &dest, NSEI, nsvci); + nsvc = gprs_ns_nsip_connect(sgsn_nsi, &dest, NSEI, nsvci); unsigned i = 0; while (1) {