split 'libosmocore' from openbsc codebase

This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
neels/jolly/new_handover
Harald Welte 13 years ago
parent 9442c1b9ba
commit dfe6c7d910
  1. 7
      libosmocore/Makefile.am
  2. 37
      libosmocore/configure.in
  3. 1
      libosmocore/include/Makefile.am
  4. 2
      libosmocore/include/osmocore/Makefile.am
  5. 0
      libosmocore/include/osmocore/bitvec.h
  6. 0
      libosmocore/include/osmocore/comp128.h
  7. 11
      libosmocore/include/osmocore/gsm_utils.h
  8. 0
      libosmocore/include/osmocore/linuxlist.h
  9. 0
      libosmocore/include/osmocore/msgb.h
  10. 0
      libosmocore/include/osmocore/select.h
  11. 15
      libosmocore/include/osmocore/signal.h
  12. 0
      libosmocore/include/osmocore/statistics.h
  13. 0
      libosmocore/include/osmocore/talloc.h
  14. 0
      libosmocore/include/osmocore/timer.h
  15. 2
      libosmocore/include/osmocore/tlv.h
  16. 6
      libosmocore/include/osmocore/utils.h
  17. 7
      libosmocore/libosmocore.pc.in
  18. 11
      libosmocore/src/Makefile.am
  19. 2
      libosmocore/src/bitvec.c
  20. 0
      libosmocore/src/comp128.c
  21. 18
      libosmocore/src/gsm_utils.c
  22. 10
      libosmocore/src/msgb.c
  23. 6
      libosmocore/src/select.c
  24. 7
      libosmocore/src/signal.c
  25. 10
      libosmocore/src/statistics.c
  26. 2
      libosmocore/src/talloc.c
  27. 2
      libosmocore/src/timer.c
  28. 4
      libosmocore/src/tlv_parser.c
  29. 2
      openbsc/Makefile.am
  30. 2
      openbsc/include/openbsc/abis_nm.h
  31. 2
      openbsc/include/openbsc/abis_rsl.h
  32. 2
      openbsc/include/openbsc/debug.h
  33. 6
      openbsc/include/openbsc/e1_input.h
  34. 2
      openbsc/include/openbsc/gsm_04_80.h
  35. 20
      openbsc/include/openbsc/gsm_data.h
  36. 2
      openbsc/include/openbsc/gsm_subscriber.h
  37. 2
      openbsc/include/openbsc/ipaccess.h
  38. 2
      openbsc/include/openbsc/mgcp.h
  39. 2
      openbsc/include/openbsc/mncc.h
  40. 4
      openbsc/include/openbsc/paging.h
  41. 4
      openbsc/include/openbsc/rtp_proxy.h
  42. 12
      openbsc/include/openbsc/signal.h
  43. 2
      openbsc/include/openbsc/subchan_demux.h
  44. 2
      openbsc/include/openbsc/telnet_interface.h
  45. 2
      openbsc/include/openbsc/transaction.h
  46. 2
      openbsc/include/openbsc/ussd.h
  47. 36
      openbsc/src/Makefile.am
  48. 6
      openbsc/src/abis_nm.c
  49. 4
      openbsc/src/abis_rsl.c
  50. 6
      openbsc/src/bs11_config.c
  51. 4
      openbsc/src/bsc_hack.c
  52. 4
      openbsc/src/bsc_init.c
  53. 6
      openbsc/src/bsc_rll.c
  54. 2
      openbsc/src/bts_ipaccess_nanobts.c
  55. 2
      openbsc/src/bts_siemens_bs11.c
  56. 2
      openbsc/src/bts_unknown.c
  57. 4
      openbsc/src/db.c
  58. 2
      openbsc/src/debug.c
  59. 2
      openbsc/src/e1_config.c
  60. 8
      openbsc/src/e1_input.c
  61. 10
      openbsc/src/gsm_04_08.c
  62. 2
      openbsc/src/gsm_04_08_utils.c
  63. 8
      openbsc/src/gsm_04_11.c
  64. 6
      openbsc/src/gsm_04_80.c
  65. 24
      openbsc/src/gsm_data.c
  66. 3
      openbsc/src/gsm_subscriber_base.c
  67. 6
      openbsc/src/handover_decision.c
  68. 6
      openbsc/src/handover_logic.c
  69. 8
      openbsc/src/input/ipaccess.c
  70. 6
      openbsc/src/input/misdn.c
  71. 7
      openbsc/src/ipaccess/ipaccess-config.c
  72. 4
      openbsc/src/ipaccess/ipaccess-find.c
  73. 2
      openbsc/src/ipaccess/ipaccess-firmware.c
  74. 8
      openbsc/src/ipaccess/ipaccess-proxy.c
  75. 6
      openbsc/src/mgcp/mgcp_main.c
  76. 6
      openbsc/src/mgcp/mgcp_protocol.c
  77. 2
      openbsc/src/mncc.c
  78. 2
      openbsc/src/paging.c
  79. 2
      openbsc/src/rest_octets.c
  80. 4
      openbsc/src/rs232.c
  81. 6
      openbsc/src/rtp_proxy.c
  82. 4
      openbsc/src/sccp/sccp.c
  83. 2
      openbsc/src/silent_call.c
  84. 2
      openbsc/src/subchan_demux.c
  85. 2
      openbsc/src/system_information.c
  86. 2
      openbsc/src/talloc_ctx.c
  87. 4
      openbsc/src/telnet_interface.c
  88. 2
      openbsc/src/token_auth.c
  89. 2
      openbsc/src/transaction.c
  90. 2
      openbsc/src/trau_mux.c
  91. 2
      openbsc/src/vty/buffer.c
  92. 2
      openbsc/src/vty/command.c
  93. 2
      openbsc/src/vty/vector.c
  94. 2
      openbsc/src/vty/vty.c
  95. 6
      openbsc/src/vty_interface.c
  96. 6
      openbsc/src/vty_interface_layer3.c

@ -0,0 +1,7 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
INCLUDES = $(all_includes) -I$(top_srcdir)/include
SUBDIRS = include src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libosmocore.pc

@ -0,0 +1,37 @@
AC_INIT
AM_INIT_AUTOMAKE(libosmocore, 0.0alpha1)
dnl kernel style compile messages
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl checks for programs
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_LIBTOOL
dnl checks for header files
AC_HEADER_STDC
# The following test is taken from WebKit's webkit.m4
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden "
AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
AC_COMPILE_IFELSE([char foo;],
[ AC_MSG_RESULT([yes])
SYMBOL_VISIBILITY="-fvisibility=hidden"],
AC_MSG_RESULT([no]))
CFLAGS="$saved_CFLAGS"
AC_SUBST(SYMBOL_VISIBILITY)
dnl Generate the output
AM_CONFIG_HEADER(config.h)
AC_OUTPUT(
libosmocore.pc
include/osmocore/Makefile
include/Makefile
src/Makefile
Makefile)

@ -0,0 +1 @@
SUBDIRS = osmocore

@ -0,0 +1,2 @@
pkginclude_HEADERS = signal.h linuxlist.h timer.h talloc.h msgb.h select.h \
tlv.h bitvec.h comp128.h statistics.h gsm_utils.h

@ -27,6 +27,17 @@
#include <sys/types.h>
enum gsm_band {
GSM_BAND_850 = 1,
GSM_BAND_900 = 2,
GSM_BAND_1800 = 4,
GSM_BAND_1900 = 8,
GSM_BAND_450 = 0x10,
GSM_BAND_480 = 0x20,
GSM_BAND_750 = 0x40,
GSM_BAND_810 = 0x80,
};
int gsm_7bit_decode(char *decoded, const u_int8_t *user_data, u_int8_t length);
int gsm_7bit_encode(u_int8_t *result, const char *data);

@ -0,0 +1,15 @@
#ifndef OSMOCORE_SIGNAL_H
#define OSMOCORE_SIGNAL_H
typedef int signal_cbfn(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data);
/* Management */
int register_signal_handler(unsigned int subsys, signal_cbfn *cbfn, void *data);
void unregister_signal_handler(unsigned int subsys, signal_cbfn *cbfn, void *data);
/* Dispatch */
void dispatch_signal(unsigned int subsys, unsigned int signal, void *signal_data);
#endif /* OSMOCORE_SIGNAL_H */

@ -4,7 +4,7 @@
#include <sys/types.h>
#include <string.h>
#include <openbsc/msgb.h>
#include <osmocore/msgb.h>
/* Terminology / wording
tag length value (in bits)

@ -0,0 +1,6 @@
#ifndef OSMOCORE_UTIL_H
#define OSMOCORE_UTIL_H
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif

@ -1,11 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: LaF0rge Lib
Name: Osmocom Core Library
Description: C Utility Library
Version: @VERSION@
Libs: -L${libdir} -llaf0rge1
Libs: -L${libdir} -losmocore
Cflags: -I${includedir}/

@ -0,0 +1,11 @@
# This is _NOT_ the library release version, it's an API version.
# Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification
LIBVERSION=0:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include
AM_CFLAGS = -fPIC -Wall
lib_LTLIBRARIES = libosmocore.la
libosmocore_la_SOURCES = msgb.c timer.c talloc.c select.c signal.c \
tlv_parser.c bitvec.c comp128.c gsm_utils.c statistics.c

@ -24,7 +24,7 @@
#include <errno.h>
#include <sys/types.h>
#include <openbsc/bitvec.h>
#include <osmocore/bitvec.h>
#define BITNUM_FROM_COMP(byte, bit) ((byte*8)+bit)

@ -21,9 +21,10 @@
*
*/
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_utils.h>
#include <execinfo.h>
//#include <openbsc/gsm_data.h>
#include <osmocore/utils.h>
#include <osmocore/gsm_utils.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@ -83,8 +84,11 @@ int gsm_7bit_encode(u_int8_t *result, const char *data)
int ms_pwr_ctl_lvl(enum gsm_band band, unsigned int dbm)
{
switch (band) {
case GSM_BAND_400:
case GSM_BAND_450:
case GSM_BAND_480:
case GSM_BAND_750:
case GSM_BAND_900:
case GSM_BAND_810:
case GSM_BAND_850:
if (dbm >= 39)
return 0;
@ -130,8 +134,11 @@ int ms_pwr_dbm(enum gsm_band band, u_int8_t lvl)
lvl &= 0x1f;
switch (band) {
case GSM_BAND_400:
case GSM_BAND_450:
case GSM_BAND_480:
case GSM_BAND_750:
case GSM_BAND_900:
case GSM_BAND_810:
case GSM_BAND_850:
if (lvl < 2)
return 39;
@ -182,6 +189,7 @@ u_int8_t dbm2rxlev(int dbm)
return rxlev;
}
#include <execinfo.h>
void generate_backtrace()
{
int i, nptrs;

@ -23,10 +23,10 @@
#include <stdlib.h>
#include <sys/types.h>
#include <openbsc/msgb.h>
#include <openbsc/gsm_data.h>
#include <openbsc/talloc.h>
#include <openbsc/debug.h>
#include <osmocore/msgb.h>
//#include <openbsc/gsm_data.h>
#include <osmocore/talloc.h>
//#include <openbsc/debug.h>
void *tall_msgb_ctx;
@ -37,7 +37,7 @@ struct msgb *msgb_alloc(u_int16_t size, const char *name)
msg = _talloc_zero(tall_msgb_ctx, sizeof(*msg) + size, name);
if (!msg) {
LOGP(DRSL, LOGL_FATAL, "unable to allocate msgb\n");
//LOGP(DRSL, LOGL_FATAL, "unable to allocate msgb\n");
return NULL;
}

@ -19,9 +19,9 @@
*/
#include <fcntl.h>
#include <openbsc/select.h>
#include <openbsc/linuxlist.h>
#include <openbsc/timer.h>
#include <osmocore/select.h>
#include <osmocore/linuxlist.h>
#include <osmocore/timer.h>
static int maxfd = 0;
static LLIST_HEAD(bsc_fds);

@ -18,11 +18,12 @@
*
*/
#include <openbsc/signal.h>
#include <openbsc/talloc.h>
#include <osmocore/signal.h>
#include <osmocore/talloc.h>
#include <osmocore/linuxlist.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
void *tall_sigh_ctx;
static LLIST_HEAD(signal_handler_list);

@ -23,13 +23,9 @@
#include <sys/types.h>
#include <openbsc/gsm_data.h>
#include <openbsc/signal.h>
#include <openbsc/linuxlist.h>
#include <openbsc/talloc.h>
#include <openbsc/statistics.h>
#include <openbsc/db.h>
#include <openbsc/timer.h>
#include <osmocore/linuxlist.h>
#include <osmocore/talloc.h>
#include <osmocore/statistics.h>
static LLIST_HEAD(counters);

@ -55,7 +55,7 @@
#define __USE_GNU
#include <string.h>
#undef __USE_GNU
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#define MIN(x,y) ((x) < (y) ? (x) : (y))
#endif /* not _TALLOC_SAMBA3 */

@ -20,7 +20,7 @@
#include <assert.h>
#include <string.h>
#include <openbsc/timer.h>
#include <osmocore/timer.h>
static LLIST_HEAD(timer_list);
static struct timeval s_nearest_time;

@ -1,6 +1,6 @@
#include <stdio.h>
#include <openbsc/tlv.h>
#include <openbsc/gsm_data.h>
#include <osmocore/utils.h>
#include <osmocore/tlv.h>
struct tlv_definition tvlv_att_def;

@ -4,7 +4,7 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include
SUBDIRS = include src tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = openbsc.pc liblaf0rge1.pc libsccp.pc
pkgconfig_DATA = openbsc.pc libsccp.pc
#dist-hook:
# rm -rf `find $(distdir) -name .svn`

@ -25,7 +25,7 @@
#include <sys/types.h>
#include <openbsc/tlv.h>
#include <osmocore/tlv.h>
/* PRIVATE */

@ -484,7 +484,7 @@ enum rsl_ipac_rtp_csd_format_ir {
RSL_IPAC_RTP_CSD_IR_64k = 3,
};
#include "msgb.h"
#include <osmocore/msgb.h>
int rsl_bcch_info(struct gsm_bts_trx *trx, u_int8_t type,
const u_int8_t *data, int len);

@ -2,7 +2,7 @@
#define _DEBUG_H
#include <stdio.h>
#include "linuxlist.h"
#include <osmocore/linuxlist.h>
#define DEBUG

@ -4,10 +4,10 @@
#include <stdlib.h>
#include <netinet/in.h>
#include <openbsc/linuxlist.h>
#include <osmocore/linuxlist.h>
#include <openbsc/gsm_data.h>
#include <openbsc/msgb.h>
#include <openbsc/select.h>
#include <osmocore/msgb.h>
#include <osmocore/select.h>
#include <openbsc/subchan_demux.h>
#define NUM_E1_TS 32

@ -123,7 +123,7 @@
#define ASN1_IA5_STRING_TAG 0x16
#define ASN1_UNICODE_STRING_TAG 0x1E
#include <openbsc/msgb.h>
#include <osmocore/msgb.h>
#define MAX_LEN_USSD_STRING 31

@ -11,14 +11,6 @@ struct value_string {
const char *get_value_string(const struct value_string *vs, u_int32_t val);
int get_string_value(const struct value_string *vs, const char *str);
enum gsm_band {
GSM_BAND_400,
GSM_BAND_850,
GSM_BAND_900,
GSM_BAND_1800,
GSM_BAND_1900,
};
enum gsm_phys_chan_config {
GSM_PCHAN_NONE,
GSM_PCHAN_CCCH,
@ -56,15 +48,15 @@ enum gsm_chreq_reason_t {
GSM_CHREQ_REASON_OTHER,
};
#include <openbsc/timer.h>
#include <osmocore/timer.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/mncc.h>
#include <openbsc/tlv.h>
#include <openbsc/bitvec.h>
#include <openbsc/statistics.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#include <osmocore/tlv.h>
#include <osmocore/bitvec.h>
#include <osmocore/statistics.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/utils.h>
#define TRX_NR_TS 8
#define TS_MAX_LCHAN 8

@ -3,7 +3,7 @@
#include <sys/types.h>
#include "gsm_data.h"
#include "linuxlist.h"
#include <osmocore/linuxlist.h>
#define GSM_IMEI_LENGTH 17
#define GSM_IMSI_LENGTH 17

@ -2,7 +2,7 @@
#define _IPACCESS_H
#include "e1_input.h"
#include "linuxlist.h"
#include <osmocore/linuxlist.h>
#define IPA_TCP_PORT_OML 3002
#define IPA_TCP_PORT_RSL 3003

@ -24,7 +24,7 @@
#ifndef OPENBSC_MGCP_H
#define OPENBSC_MGCP_H
#include "msgb.h"
#include <osmocore/msgb.h>
#define RTP_PORT_DEFAULT 4000
extern unsigned int rtp_base_port;

@ -25,7 +25,7 @@
#ifndef _MNCC_H
#define _MNCC_H
#include <openbsc/linuxlist.h>
#include <osmocore/linuxlist.h>
/* One end of a call */
struct gsm_call {

@ -24,10 +24,10 @@
#include <stdlib.h>
#include <string.h>
#include "linuxlist.h"
#include <osmocore/linuxlist.h>
#include "gsm_data.h"
#include "gsm_subscriber.h"
#include "timer.h"
#include <osmocore/timer.h>
/* call once for every gsm_bts... */
void paging_init(struct gsm_bts *bts);

@ -25,8 +25,8 @@
#include <netinet/in.h>
#include <openbsc/linuxlist.h>
#include <openbsc/select.h>
#include <osmocore/linuxlist.h>
#include <osmocore/select.h>
enum rtp_rx_action {
RTP_NONE,

@ -28,6 +28,7 @@
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_subscriber.h>
#include <osmocore/signal.h>
/*
* Signalling subsystems
@ -110,9 +111,6 @@ enum signal_global {
S_GLOBAL_SHUTDOWN,
};
typedef int signal_cbfn(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data);
struct paging_signal_data {
struct gsm_subscriber *subscr;
struct gsm_bts *bts;
@ -132,12 +130,4 @@ struct ipacc_ack_signal_data {
u_int8_t msg_type;
};
/* Management */
int register_signal_handler(unsigned int subsys, signal_cbfn *cbfn, void *data);
void unregister_signal_handler(unsigned int subsys, signal_cbfn *cbfn, void *data);
/* Dispatch */
void dispatch_signal(unsigned int subsys, unsigned int signal, void *signal_data);
#endif

@ -22,7 +22,7 @@
*/
#include <sys/types.h>
#include <openbsc/linuxlist.h>
#include <osmocore/linuxlist.h>
#define NR_SUBCH 4
#define TRAU_FRAME_SIZE 40

@ -23,7 +23,7 @@
#include "gsm_data.h"
#include "debug.h"
#include "select.h"
#include <osmocore/select.h>
#include <vty/vty.h>

@ -3,7 +3,7 @@
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/linuxlist.h>
#include <osmocore/linuxlist.h>
#include <openbsc/gsm_04_11.h>
/* One transaction */

@ -3,7 +3,7 @@
/* Handler function for mobile-originated USSD messages */
#include <openbsc/msgb.h>
#include <osmocore/msgb.h>
int handle_rcv_ussd(struct msgb *msg);

@ -7,43 +7,43 @@ noinst_LIBRARIES = libbsc.a libmsc.a libvty.a
noinst_HEADERS = vty/cardshell.h
bscdir = $(libdir)
bsc_LIBRARIES = liblaf0rge1.a libsccp.a
liblaf0rge1_a_SOURCES = msgb.c timer.c talloc.c select.c signal.c debug.c
bsc_LIBRARIES = libsccp.a
libbsc_a_SOURCES = abis_rsl.c abis_nm.c gsm_data.c gsm_04_08_utils.c \
chan_alloc.c \
chan_alloc.c debug.c \
gsm_subscriber_base.c subchan_demux.c bsc_rll.c transaction.c \
trau_frame.c trau_mux.c paging.c e1_config.c e1_input.c tlv_parser.c \
input/misdn.c input/ipaccess.c signal.c gsm_utils.c \
talloc_ctx.c system_information.c bitvec.c rest_octets.c \
rtp_proxy.c statistics.c bts_siemens_bs11.c bts_ipaccess_nanobts.c \
trau_frame.c trau_mux.c paging.c e1_config.c e1_input.c \
input/misdn.c input/ipaccess.c \
talloc_ctx.c system_information.c rest_octets.c \
rtp_proxy.c bts_siemens_bs11.c bts_ipaccess_nanobts.c \
bts_unknown.c
libmsc_a_SOURCES = gsm_subscriber.c db.c telnet_interface.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 \
handover_logic.c handover_decision.c meas_rep.c comp128.c
handover_logic.c handover_decision.c meas_rep.c
libvty_a_SOURCES = vty/buffer.c vty/command.c vty/vector.c vty/vty.c
libsccp_a_SOURCES = sccp/sccp.c
bsc_hack_SOURCES = bsc_hack.c bsc_init.c vty_interface.c vty_interface_layer3.c
bsc_hack_LDADD = libmsc.a libbsc.a libmsc.a libvty.a liblaf0rge1.a -ldl -ldbi $(LIBCRYPT)
bsc_hack_LDADD = libmsc.a libbsc.a libmsc.a libvty.a -losmocore -ldl -ldbi $(LIBCRYPT)
bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c msgb.c debug.c \
select.c timer.c rs232.c tlv_parser.c signal.c talloc.c \
bts_siemens_bs11.c
bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c debug.c \
rs232.c bts_siemens_bs11.c
bs11_config_LDADD = -losmocore
ipaccess_find_SOURCES = ipaccess/ipaccess-find.c select.c timer.c
ipaccess_find_SOURCES = ipaccess/ipaccess-find.c
ipaccess_find_LDADD = -losmocore
ipaccess_config_SOURCES = ipaccess/ipaccess-config.c ipaccess/ipaccess-firmware.c
ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a liblaf0rge1.a -ldl -ldbi $(LIBCRYPT)
ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a -losmocore -ldl -ldbi $(LIBCRYPT)
isdnsync_SOURCES = isdnsync.c
bsc_mgcp_SOURCES = mgcp/mgcp_main.c mgcp/mgcp_protocol.c msgb.c talloc.c debug.c select.c timer.c telnet_interface.c
bsc_mgcp_LDADD = libvty.a liblaf0rge1.a
bsc_mgcp_SOURCES = mgcp/mgcp_main.c mgcp/mgcp_protocol.c debug.c telnet_interface.c
bsc_mgcp_LDADD = libvty.a -losmocore
ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c msgb.c select.c talloc.c debug.c timer.c
ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c debug.c
ipaccess_proxy_LDADD = -losmocore

@ -38,12 +38,12 @@
#include <openbsc/gsm_data.h>
#include <openbsc/debug.h>
#include <openbsc/msgb.h>
#include <openbsc/tlv.h>
#include <osmocore/msgb.h>
#include <osmocore/tlv.h>
#include <osmocore/talloc.h>
#include <openbsc/abis_nm.h>
#include <openbsc/misdn.h>
#include <openbsc/signal.h>
#include <openbsc/talloc.h>
#define OM_ALLOC_SIZE 1024
#define OM_HEADROOM_SIZE 128

@ -30,12 +30,12 @@
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/gsm_utils.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/chan_alloc.h>
#include <openbsc/bsc_rll.h>
#include <openbsc/debug.h>
#include <openbsc/tlv.h>
#include <osmocore/tlv.h>
#include <openbsc/paging.h>
#include <openbsc/signal.h>
#include <openbsc/meas_rep.h>

@ -36,10 +36,10 @@
#include <openbsc/gsm_data.h>
#include <openbsc/abis_nm.h>
#include <openbsc/msgb.h>
#include <openbsc/tlv.h>
#include <osmocore/msgb.h>
#include <osmocore/tlv.h>
#include <openbsc/debug.h>
#include <openbsc/select.h>
#include <osmocore/select.h>
#include <openbsc/rs232.h>
/* state of our bs11_config application */

@ -31,10 +31,10 @@
#include <getopt.h>
#include <openbsc/db.h>
#include <openbsc/select.h>
#include <osmocore/select.h>
#include <openbsc/debug.h>
#include <openbsc/e1_input.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/signal.h>
/* MCC and MNC for the Location Area Identifier */

@ -21,7 +21,7 @@
*/
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_utils.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/abis_nm.h>
@ -31,7 +31,7 @@
#include <openbsc/system_information.h>
#include <openbsc/paging.h>
#include <openbsc/signal.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
/* global pointer to the gsm network data structure */
extern struct gsm_network *bsc_gsmnet;

@ -24,9 +24,9 @@
#include <errno.h>
#include <openbsc/debug.h>
#include <openbsc/talloc.h>
#include <openbsc/timer.h>
#include <openbsc/linuxlist.h>
#include <osmocore/talloc.h>
#include <osmocore/timer.h>
#include <osmocore/linuxlist.h>
#include <openbsc/bsc_rll.h>
#include <openbsc/gsm_data.h>
#include <openbsc/chan_alloc.h>

@ -23,7 +23,7 @@
#include <sys/types.h>
#include <openbsc/gsm_data.h>
#include <openbsc/tlv.h>
#include <osmocore/tlv.h>
#include <openbsc/abis_nm.h>
static struct gsm_bts_model model_nanobts = {

@ -23,7 +23,7 @@
#include <sys/types.h>
#include <openbsc/gsm_data.h>
#include <openbsc/tlv.h>
#include <osmocore/tlv.h>
#include <openbsc/abis_nm.h>
static struct gsm_bts_model model_bs11 = {

@ -23,7 +23,7 @@
#include <sys/types.h>
#include <openbsc/gsm_data.h>
#include <openbsc/tlv.h>
#include <osmocore/tlv.h>
#include <openbsc/abis_nm.h>
static struct gsm_bts_model model_unknown = {

@ -23,9 +23,9 @@
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_04_11.h>
#include <openbsc/db.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/debug.h>
#include <openbsc/statistics.h>
#include <osmocore/statistics.h>
#include <libgen.h>
#include <stdio.h>

@ -28,7 +28,7 @@
#include <errno.h>
#include <openbsc/debug.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_subscriber.h>

@ -9,7 +9,7 @@
#include <openbsc/trau_mux.h>
#include <openbsc/misdn.h>
#include <openbsc/ipaccess.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/debug.h>
#define SAPI_L2ML 0

@ -40,18 +40,18 @@
#define PF_ISDN AF_ISDN
#endif
#include <openbsc/select.h>
#include <openbsc/msgb.h>
#include <osmocore/select.h>
#include <osmocore/msgb.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/e1_input.h>
#include <openbsc/abis_nm.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/linuxlist.h>
#include <osmocore/linuxlist.h>
#include <openbsc/subchan_demux.h>
#include <openbsc/trau_frame.h>
#include <openbsc/trau_mux.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/signal.h>
#include <openbsc/misdn.h>

@ -31,12 +31,12 @@
#include <netinet/in.h>
#include <openbsc/db.h>
#include <openbsc/msgb.h>
#include <openbsc/bitvec.h>
#include <openbsc/tlv.h>
#include <osmocore/msgb.h>
#include <osmocore/bitvec.h>
#include <osmocore/tlv.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_utils.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/gsm_04_11.h>
#include <openbsc/gsm_04_08.h>
@ -47,7 +47,7 @@
#include <openbsc/trau_frame.h>
#include <openbsc/trau_mux.h>
#include <openbsc/rtp_proxy.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/transaction.h>
#include <openbsc/ussd.h>
#include <openbsc/silent_call.h>

@ -28,7 +28,7 @@
#include <errno.h>
#include <netinet/in.h>
#include <openbsc/msgb.h>
#include <osmocore/msgb.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/transaction.h>

@ -31,18 +31,18 @@
#include <time.h>
#include <netinet/in.h>
#include <openbsc/msgb.h>
#include <openbsc/tlv.h>
#include <osmocore/msgb.h>
#include <osmocore/tlv.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/gsm_04_11.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/gsm_utils.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/signal.h>
#include <openbsc/db.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/transaction.h>
#include <openbsc/paging.h>
#include <openbsc/bsc_rll.h>

@ -29,11 +29,11 @@
#include <string.h>
#include <errno.h>
#include <openbsc/msgb.h>
#include <openbsc/tlv.h>
#include <osmocore/msgb.h>
#include <osmocore/tlv.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_utils.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/gsm_04_80.h>

@ -26,9 +26,9 @@
#include <ctype.h>
#include <openbsc/gsm_data.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/abis_nm.h>
#include <openbsc/statistics.h>
#include <osmocore/statistics.h>
void *tall_bsc_ctx;
@ -438,8 +438,14 @@ struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
char *gsm_band_name(enum gsm_band band)
{
switch (band) {
case GSM_BAND_400:
return "GSM400";
case GSM_BAND_450:
return "GSM450";
case GSM_BAND_480:
return "GSM450";
case GSM_BAND_750:
return "GSM750";
case GSM_BAND_810:
return "GSM810";
case GSM_BAND_850:
return "GSM850";
case GSM_BAND_900:
@ -461,8 +467,14 @@ enum gsm_band gsm_band_parse(const char* mhz)
return -EINVAL;
switch (atoi(mhz)) {
case 400:
return GSM_BAND_400;
case 450:
return GSM_BAND_450;
case 480:
return GSM_BAND_480;
case 750:
return GSM_BAND_750;
case 810:
return GSM_BAND_810;
case 850:
return GSM_BAND_850;
case 900:

@ -27,11 +27,10 @@
#include <string.h>
#include <assert.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/paging.h>
#include <openbsc/debug.h>
#include <openbsc/paging.h>
LLIST_HEAD(active_subscribers);
void *tall_subscr_ctx;

@ -25,14 +25,14 @@
#include <stdlib.h>
#include <errno.h>
#include <openbsc/msgb.h>
#include <osmocore/msgb.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/meas_rep.h>
#include <openbsc/signal.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/handover.h>
#include <openbsc/gsm_utils.h>
#include <osmocore/gsm_utils.h>
/* issue handover to a cell identified by ARFCN and BSIC */
static int handover_to_arfcn_bsic(struct gsm_lchan *lchan,

@ -29,16 +29,16 @@
#include <time.h>
#include <netinet/in.h>
#include <openbsc/msgb.h>
#include <osmocore/msgb.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_utils.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/gsm_04_08.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/chan_alloc.h>
#include <openbsc/signal.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <openbsc/transaction.h>
#include <openbsc/rtp_proxy.h>

@ -32,9 +32,9 @@
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <openbsc/select.h>
#include <openbsc/tlv.h>
#include <openbsc/msgb.h>
#include <osmocore/select.h>
#include <osmocore/tlv.h>
#include <osmocore/msgb.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/abis_nm.h>
@ -42,7 +42,7 @@
#include <openbsc/subchan_demux.h>
#include <openbsc/e1_input.h>
#include <openbsc/ipaccess.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
/* data structure for one E1 interface with A-bis */
struct ia_e1_handle {

@ -41,15 +41,15 @@
#define PF_ISDN AF_ISDN
#endif
#include <openbsc/select.h>
#include <openbsc/msgb.h>
#include <osmocore/select.h>
#include <osmocore/msgb.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/abis_nm.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/subchan_demux.h>
#include <openbsc/e1_input.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#define TS1_ALLOC_SIZE 300

@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <errno.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
@ -35,15 +36,15 @@
#include <arpa/inet.h>
#include <openbsc/select.h>
#include <openbsc/timer.h>
#include <osmocore/select.h>
#include <osmocore/timer.h>
#include <openbsc/ipaccess.h>
#include <openbsc/gsm_data.h>
#include <openbsc/e1_input.h>
#include <openbsc/abis_nm.h>
#include <openbsc/signal.h>
#include <openbsc/debug.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
static struct gsm_network *gsmnet;

@ -8,8 +8,8 @@
#include <arpa/inet.h>
#include <openbsc/select.h>
#include <openbsc/timer.h>
#include <osmocore/select.h>
#include <osmocore/timer.h>
#include <openbsc/ipaccess.h>
#include <openbsc/gsm_data.h>

@ -21,7 +21,7 @@
#include <openbsc/debug.h>
#include <openbsc/ipaccess.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
#include <stdio.h>
#include <stdlib.h>

@ -35,12 +35,12 @@
#include <netinet/in.h>
#include <openbsc/gsm_data.h>
#include <openbsc/select.h>
#include <openbsc/tlv.h>
#include <openbsc/msgb.h>
#include <osmocore/select.h>
#include <osmocore/tlv.h>
#include <osmocore/msgb.h>
#include <openbsc/debug.h>
#include <openbsc/ipaccess.h>
#include <openbsc/talloc.h>
#include <osmocore/talloc.h>
static struct debug_target *stderr_target;

@ -34,10 +34,10 @@
#include <arpa/inet.h>
#include <openbsc/debug.h>
#include <openbsc/msgb.h>
#include <openbsc/talloc.h>
#include <osmocore/msgb.h>
#include <osmocore/talloc.h>
#include <openbsc/gsm_data.h>
#include <openbsc/select.h>
#include <osmocore/select.h>
#include <openbsc/mgcp.h>
#include <openbsc/telnet_interface.h>

@ -34,10 +34,10 @@
#include <arpa/inet.h>