remove dependencies to openbsc/osmoggsn internals
...and link against libosmogb (part of libosmocore.git)
This commit is contained in:
parent
a9e6dc5084
commit
477e79e67e
|
@ -1,7 +1,7 @@
|
||||||
dnl Process this file with autoconf to produce a configure script
|
dnl Process this file with autoconf to produce a configure script
|
||||||
AC_INIT([osmo-pcu],
|
AC_INIT([osmo-pcu],
|
||||||
m4_esyscmd([./git-version-gen .tarball-version]),
|
m4_esyscmd([./git-version-gen .tarball-version]),
|
||||||
[osmocom-pcu@lists.openbsc.org])
|
[osmocom-pcu@lists.osmocom.org])
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ dnl checks for libraries
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9)
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9)
|
||||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty)
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty)
|
||||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3)
|
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_MSG_CHECKING([whether to enable sysmocom-bts hardware support])
|
||||||
AC_ARG_ENABLE(sysmocom-bts,
|
AC_ARG_ENABLE(sysmocom-bts,
|
||||||
|
|
|
@ -18,11 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
# FIXME: This has to go!!
|
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)
|
||||||
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
|
AM_CXXFLAGS = -Wall -ldl -pthread
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libgprs.la
|
noinst_LTLIBRARIES = libgprs.la
|
||||||
|
@ -60,11 +56,7 @@ RLCMACTest_LDADD = \
|
||||||
pcu_SOURCES = pcu_main.cpp
|
pcu_SOURCES = pcu_main.cpp
|
||||||
pcu_LDADD = \
|
pcu_LDADD = \
|
||||||
libgprs.la \
|
libgprs.la \
|
||||||
$(OPENBSC_DIR)/src/libgb/gprs_ns.o \
|
$(LIBOSMOGB_LIBS) \
|
||||||
$(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 \
|
|
||||||
$(LIBOSMOCORE_LIBS) \
|
$(LIBOSMOCORE_LIBS) \
|
||||||
$(LIBOSMOGSM_LIBS) \
|
$(LIBOSMOGSM_LIBS) \
|
||||||
$(COMMON_LA)
|
$(COMMON_LA)
|
||||||
|
|
|
@ -232,3 +232,8 @@ int gprs_bssgp_pcu_rcvmsg(struct msgb *msg)
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -25,10 +25,11 @@ extern "C" {
|
||||||
#include <osmocom/core/talloc.h>
|
#include <osmocom/core/talloc.h>
|
||||||
#include <osmocom/core/rate_ctr.h>
|
#include <osmocom/core/rate_ctr.h>
|
||||||
#include <osmocom/core/logging.h>
|
#include <osmocom/core/logging.h>
|
||||||
#include <openbsc/signal.h>
|
#include <osmocom/core/signal.h>
|
||||||
#include <openbsc/gprs_ns.h>
|
|
||||||
#include <openbsc/gprs_bssgp.h>
|
|
||||||
#include <osmocom/core/application.h>
|
#include <osmocom/core/application.h>
|
||||||
|
#include <osmocom/gprs/gprs_ns.h>
|
||||||
|
#include <osmocom/gprs/gprs_bssgp.h>
|
||||||
|
#include <osmocom/gprs/gprs_msgb.h>
|
||||||
|
|
||||||
int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause);
|
int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause);
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
#include <osmocom/core/talloc.h>
|
#include <osmocom/core/talloc.h>
|
||||||
#include <osmocom/core/utils.h>
|
#include <osmocom/core/utils.h>
|
||||||
#include <osmocom/core/logging.h>
|
#include <osmocom/core/logging.h>
|
||||||
#include <openbsc/gsm_data.h>
|
|
||||||
#include <openbsc/gsm_subscriber.h>
|
|
||||||
#include <gprs_debug.h>
|
#include <gprs_debug.h>
|
||||||
|
|
||||||
/* default categories */
|
/* default categories */
|
||||||
|
@ -53,14 +51,9 @@ enum {
|
||||||
static int filter_fn(const struct log_context *ctx,
|
static int filter_fn(const struct log_context *ctx,
|
||||||
struct log_target *tar)
|
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 *nsvc = (const struct gprs_nsvc*)ctx->ctx[BSC_CTX_NSVC];
|
||||||
const struct gprs_nsvc *bvc = (const struct gprs_nsvc*)ctx->ctx[BSC_CTX_BVC];
|
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 */
|
/* Filter on the NS Virtual Connection */
|
||||||
if ((tar->filter_map & (1 << FLT_NSVC)) != 0
|
if ((tar->filter_map & (1 << FLT_NSVC)) != 0
|
||||||
&& nsvc && (nsvc == tar->filter_data[FLT_NSVC]))
|
&& nsvc && (nsvc == tar->filter_data[FLT_NSVC]))
|
||||||
|
|
|
@ -148,7 +148,7 @@ int main(int argc, char *argv[])
|
||||||
osmo_init_logging(&gprs_log_info);
|
osmo_init_logging(&gprs_log_info);
|
||||||
pcu_l1if_open();
|
pcu_l1if_open();
|
||||||
|
|
||||||
sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb);
|
sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb, NULL);
|
||||||
bssgp_nsi = sgsn_nsi;
|
bssgp_nsi = sgsn_nsi;
|
||||||
|
|
||||||
if (!bssgp_nsi)
|
if (!bssgp_nsi)
|
||||||
|
@ -172,7 +172,7 @@ int main(int argc, char *argv[])
|
||||||
dest.sin_port = htons(SGSN_PORT);
|
dest.sin_port = htons(SGSN_PORT);
|
||||||
inet_aton(SGSN_IP, &dest.sin_addr);
|
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;
|
unsigned i = 0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue