diff options
author | Harald Welte <laforge@netfilter.org> | 2010-02-20 16:24:02 +0100 |
---|---|---|
committer | Harald Welte <laforge@netfilter.org> | 2010-02-20 16:27:23 +0100 |
commit | dfe6c7d910edbba238751d0cfddbb627bb08ef54 (patch) | |
tree | c4836091b0d65187ee50c52060d51117b21ac873 | |
parent | 9442c1b9bad3426ece07edc7fa2dca7464fc302a (diff) |
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
96 files changed, 289 insertions, 201 deletions
diff --git a/libosmocore/Makefile.am b/libosmocore/Makefile.am new file mode 100644 index 000000000..6bda10a1c --- /dev/null +++ b/libosmocore/Makefile.am @@ -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 diff --git a/libosmocore/configure.in b/libosmocore/configure.in new file mode 100644 index 000000000..8c0fe6727 --- /dev/null +++ b/libosmocore/configure.in @@ -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) diff --git a/libosmocore/include/Makefile.am b/libosmocore/include/Makefile.am new file mode 100644 index 000000000..f0015d5f4 --- /dev/null +++ b/libosmocore/include/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = osmocore diff --git a/libosmocore/include/osmocore/Makefile.am b/libosmocore/include/osmocore/Makefile.am new file mode 100644 index 000000000..aec27d19c --- /dev/null +++ b/libosmocore/include/osmocore/Makefile.am @@ -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 diff --git a/openbsc/include/openbsc/bitvec.h b/libosmocore/include/osmocore/bitvec.h index b35aebf16..b35aebf16 100644 --- a/openbsc/include/openbsc/bitvec.h +++ b/libosmocore/include/osmocore/bitvec.h diff --git a/openbsc/include/openbsc/comp128.h b/libosmocore/include/osmocore/comp128.h index 691ade54b..691ade54b 100644 --- a/openbsc/include/openbsc/comp128.h +++ b/libosmocore/include/osmocore/comp128.h diff --git a/openbsc/include/openbsc/gsm_utils.h b/libosmocore/include/osmocore/gsm_utils.h index 56a4120a5..c770cc900 100644 --- a/openbsc/include/openbsc/gsm_utils.h +++ b/libosmocore/include/osmocore/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); diff --git a/openbsc/include/openbsc/linuxlist.h b/libosmocore/include/osmocore/linuxlist.h index fb99c5ec8..fb99c5ec8 100644 --- a/openbsc/include/openbsc/linuxlist.h +++ b/libosmocore/include/osmocore/linuxlist.h diff --git a/openbsc/include/openbsc/msgb.h b/libosmocore/include/osmocore/msgb.h index d0efc90b5..d0efc90b5 100644 --- a/openbsc/include/openbsc/msgb.h +++ b/libosmocore/include/osmocore/msgb.h diff --git a/openbsc/include/openbsc/select.h b/libosmocore/include/osmocore/select.h index 2d8b3ec07..2d8b3ec07 100644 --- a/openbsc/include/openbsc/select.h +++ b/libosmocore/include/osmocore/select.h diff --git a/libosmocore/include/osmocore/signal.h b/libosmocore/include/osmocore/signal.h new file mode 100644 index 000000000..02d83d2e9 --- /dev/null +++ b/libosmocore/include/osmocore/signal.h @@ -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 */ diff --git a/openbsc/include/openbsc/statistics.h b/libosmocore/include/osmocore/statistics.h index 1d56054ab..1d56054ab 100644 --- a/openbsc/include/openbsc/statistics.h +++ b/libosmocore/include/osmocore/statistics.h diff --git a/openbsc/include/openbsc/talloc.h b/libosmocore/include/osmocore/talloc.h index f7f7643b8..f7f7643b8 100644 --- a/openbsc/include/openbsc/talloc.h +++ b/libosmocore/include/osmocore/talloc.h diff --git a/openbsc/include/openbsc/timer.h b/libosmocore/include/osmocore/timer.h index fee888bfd..fee888bfd 100644 --- a/openbsc/include/openbsc/timer.h +++ b/libosmocore/include/osmocore/timer.h diff --git a/openbsc/include/openbsc/tlv.h b/libosmocore/include/osmocore/tlv.h index 6141b1f07..4ae9f6c49 100644 --- a/openbsc/include/openbsc/tlv.h +++ b/libosmocore/include/osmocore/tlv.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) diff --git a/libosmocore/include/osmocore/utils.h b/libosmocore/include/osmocore/utils.h new file mode 100644 index 000000000..198f45a97 --- /dev/null +++ b/libosmocore/include/osmocore/utils.h @@ -0,0 +1,6 @@ +#ifndef OSMOCORE_UTIL_H +#define OSMOCORE_UTIL_H + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +#endif diff --git a/openbsc/liblaf0rge1.pc.in b/libosmocore/libosmocore.pc.in index 953910156..0d09cb823 100644 --- a/openbsc/liblaf0rge1.pc.in +++ b/libosmocore/libosmocore.pc.in @@ -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}/ diff --git a/libosmocore/src/Makefile.am b/libosmocore/src/Makefile.am new file mode 100644 index 000000000..b82b6fb10 --- /dev/null +++ b/libosmocore/src/Makefile.am @@ -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 diff --git a/openbsc/src/bitvec.c b/libosmocore/src/bitvec.c index d6f5679cf..322f499ec 100644 --- a/openbsc/src/bitvec.c +++ b/libosmocore/src/bitvec.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) diff --git a/openbsc/src/comp128.c b/libosmocore/src/comp128.c index 9df545256..9df545256 100644 --- a/openbsc/src/comp128.c +++ b/libosmocore/src/comp128.c diff --git a/openbsc/src/gsm_utils.c b/libosmocore/src/gsm_utils.c index 9439993db..aabd7b734 100644 --- a/openbsc/src/gsm_utils.c +++ b/libosmocore/src/gsm_utils.c @@ -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; diff --git a/openbsc/src/msgb.c b/libosmocore/src/msgb.c index 9f2fcfa96..ab9b4131c 100644 --- a/openbsc/src/msgb.c +++ b/libosmocore/src/msgb.c @@ -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; } diff --git a/openbsc/src/select.c b/libosmocore/src/select.c index bed96498c..46a0b9617 100644 --- a/openbsc/src/select.c +++ b/libosmocore/src/select.c @@ -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); diff --git a/openbsc/src/signal.c b/libosmocore/src/signal.c index e04cadf73..c7ca86c48 100644 --- a/openbsc/src/signal.c +++ b/libosmocore/src/signal.c @@ -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); diff --git a/openbsc/src/statistics.c b/libosmocore/src/statistics.c index 9452b16e1..34e6a408e 100644 --- a/openbsc/src/statistics.c +++ b/libosmocore/src/statistics.c @@ -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); diff --git a/openbsc/src/talloc.c b/libosmocore/src/talloc.c index d8213238e..98c2ee097 100644 --- a/openbsc/src/talloc.c +++ b/libosmocore/src/talloc.c @@ -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 */ diff --git a/openbsc/src/timer.c b/libosmocore/src/timer.c index ffeb4aba3..37d7d166b 100644 --- a/openbsc/src/timer.c +++ b/libosmocore/src/timer.c @@ -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; diff --git a/openbsc/src/tlv_parser.c b/libosmocore/src/tlv_parser.c index 13ca7b14b..e9b15120a 100644 --- a/openbsc/src/tlv_parser.c +++ b/libosmocore/src/tlv_parser.c @@ -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; diff --git a/openbsc/Makefile.am b/openbsc/Makefile.am index 7dcd956df..7acae7512 100644 --- a/openbsc/Makefile.am +++ b/openbsc/Makefile.am @@ -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` diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h index 81b4eda61..764e53b61 100644 --- a/openbsc/include/openbsc/abis_nm.h +++ b/openbsc/include/openbsc/abis_nm.h @@ -25,7 +25,7 @@ #include <sys/types.h> -#include <openbsc/tlv.h> +#include <osmocore/tlv.h> /* PRIVATE */ diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h index 797b2f349..3a10bf990 100644 --- a/openbsc/include/openbsc/abis_rsl.h +++ b/openbsc/include/openbsc/abis_rsl.h @@ -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); diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h index c40eec3fb..4b67c61b8 100644 --- a/openbsc/include/openbsc/debug.h +++ b/openbsc/include/openbsc/debug.h @@ -2,7 +2,7 @@ #define _DEBUG_H #include <stdio.h> -#include "linuxlist.h" +#include <osmocore/linuxlist.h> #define DEBUG diff --git a/openbsc/include/openbsc/e1_input.h b/openbsc/include/openbsc/e1_input.h index 64e0b4f7d..1a3d9d6ad 100644 --- a/openbsc/include/openbsc/e1_input.h +++ b/openbsc/include/openbsc/e1_input.h @@ -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 diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h index c240bbe94..266b5f778 100644 --- a/openbsc/include/openbsc/gsm_04_80.h +++ b/openbsc/include/openbsc/gsm_04_80.h @@ -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 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 5567d89bd..eebe6abb9 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -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 diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index c639f4046..06539960e 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -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 diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h index e101428e4..904a9627b 100644 --- a/openbsc/include/openbsc/ipaccess.h +++ b/openbsc/include/openbsc/ipaccess.h @@ -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 diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 5b4aa3eec..2416fadec 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -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; diff --git a/openbsc/include/openbsc/mncc.h b/openbsc/include/openbsc/mncc.h index fbf3cab1f..06d594236 100644 --- a/openbsc/include/openbsc/mncc.h +++ b/openbsc/include/openbsc/mncc.h @@ -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 { diff --git a/openbsc/include/openbsc/paging.h b/openbsc/include/openbsc/paging.h index ab6a27494..6cbdca902 100644 --- a/openbsc/include/openbsc/paging.h +++ b/openbsc/include/openbsc/paging.h @@ -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); diff --git a/openbsc/include/openbsc/rtp_proxy.h b/openbsc/include/openbsc/rtp_proxy.h index d128e4f23..f82711a8e 100644 --- a/openbsc/include/openbsc/rtp_proxy.h +++ b/openbsc/include/openbsc/rtp_proxy.h @@ -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, diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h index 07b4e393d..0c22869f6 100644 --- a/openbsc/include/openbsc/signal.h +++ b/openbsc/include/openbsc/signal.h @@ -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 diff --git a/openbsc/include/openbsc/subchan_demux.h b/openbsc/include/openbsc/subchan_demux.h index 9661b0481..02fa02338 100644 --- a/openbsc/include/openbsc/subchan_demux.h +++ b/openbsc/include/openbsc/subchan_demux.h @@ -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 diff --git a/openbsc/include/openbsc/telnet_interface.h b/openbsc/include/openbsc/telnet_interface.h index 8e0e9108a..20e794b49 100644 --- a/openbsc/include/openbsc/telnet_interface.h +++ b/openbsc/include/openbsc/telnet_interface.h @@ -23,7 +23,7 @@ #include "gsm_data.h" #include "debug.h" -#include "select.h" +#include <osmocore/select.h> #include <vty/vty.h> diff --git a/openbsc/include/openbsc/transaction.h b/openbsc/include/openbsc/transaction.h index cf9410082..50c3cc5da 100644 --- a/openbsc/include/openbsc/transaction.h +++ b/openbsc/include/openbsc/transaction.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 */ diff --git a/openbsc/include/openbsc/ussd.h b/openbsc/include/openbsc/ussd.h index e7bd6d69d..63ea31c5e 100644 --- a/openbsc/include/openbsc/ussd.h +++ b/openbsc/include/openbsc/ussd.h @@ -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); diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am index ba3d2802c..2edaf00e5 100644 --- a/openbsc/src/Makefile.am +++ b/openbsc/src/Makefile.am @@ -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 diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c index 82d7b0254..99d8dd621 100644 --- a/openbsc/src/abis_nm.c +++ b/openbsc/src/abis_nm.c @@ -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 diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c index 10ebd6d44..aebd02c55 100644 --- a/openbsc/src/abis_rsl.c +++ b/openbsc/src/abis_rsl.c @@ -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> diff --git a/openbsc/src/bs11_config.c b/openbsc/src/bs11_config.c index 703591eed..80f9ba956 100644 --- a/openbsc/src/bs11_config.c +++ b/openbsc/src/bs11_config.c @@ -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 */ diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c index 7755726c9..49c9d36ef 100644 --- a/openbsc/src/bsc_hack.c +++ b/openbsc/src/bsc_hack.c @@ -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 */ diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c index 617d4ae44..57fc4b3e1 100644 --- a/openbsc/src/bsc_init.c +++ b/openbsc/src/bsc_init.c @@ -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; diff --git a/openbsc/src/bsc_rll.c b/openbsc/src/bsc_rll.c index 780a84e39..e9d6f252a 100644 --- a/openbsc/src/bsc_rll.c +++ b/openbsc/src/bsc_rll.c @@ -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> diff --git a/openbsc/src/bts_ipaccess_nanobts.c b/openbsc/src/bts_ipaccess_nanobts.c index 6765517b3..cb48ea98a 100644 --- a/openbsc/src/bts_ipaccess_nanobts.c +++ b/openbsc/src/bts_ipaccess_nanobts.c @@ -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 = { diff --git a/openbsc/src/bts_siemens_bs11.c b/openbsc/src/bts_siemens_bs11.c index 1c8f889e1..c966825ee 100644 --- a/openbsc/src/bts_siemens_bs11.c +++ b/openbsc/src/bts_siemens_bs11.c @@ -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 = { diff --git a/openbsc/src/bts_unknown.c b/openbsc/src/bts_unknown.c index 1e604a9e4..aac5d99c8 100644 --- a/openbsc/src/bts_unknown.c +++ b/openbsc/src/bts_unknown.c @@ -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 = { diff --git a/openbsc/src/db.c b/openbsc/src/db.c index 5be47ff64..10c1d6d4c 100644 --- a/openbsc/src/db.c +++ b/openbsc/src/db.c @@ -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> diff --git a/openbsc/src/debug.c b/openbsc/src/debug.c index 90a9fc7e3..7488cd63a 100644 --- a/openbsc/src/debug.c +++ b/openbsc/src/debug.c @@ -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> diff --git a/openbsc/src/e1_config.c b/openbsc/src/e1_config.c index 6a2abd85b..50fbceccd 100644 --- a/openbsc/src/e1_config.c +++ b/openbsc/src/e1_config.c @@ -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 diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c index c894fe40f..c20359c09 100644 --- a/openbsc/src/e1_input.c +++ b/openbsc/src/e1_input.c @@ -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> diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index 61eba2c5a..3aebd7f5e 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -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> diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c index 821bde266..53c57cae2 100644 --- a/openbsc/src/gsm_04_08_utils.c +++ b/openbsc/src/gsm_04_08_utils.c @@ -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> diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c index 7f570b8e5..f03c66608 100644 --- a/openbsc/src/gsm_04_11.c +++ b/openbsc/src/gsm_04_11.c @@ -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> diff --git a/openbsc/src/gsm_04_80.c b/openbsc/src/gsm_04_80.c index d3b472f30..8271274f1 100644 --- a/openbsc/src/gsm_04_80.c +++ b/openbsc/src/gsm_04_80.c @@ -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> diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c index 1f2e1a1fc..a6b060c2d 100644 --- a/openbsc/src/gsm_data.c +++ b/openbsc/src/gsm_data.c @@ -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: diff --git a/openbsc/src/gsm_subscriber_base.c b/openbsc/src/gsm_subscriber_base.c index 0570061a2..dee89c0bc 100644 --- a/openbsc/src/gsm_subscriber_base.c +++ b/openbsc/src/gsm_subscriber_base.c @@ -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; diff --git a/openbsc/src/handover_decision.c b/openbsc/src/handover_decision.c index b37cecddb..efafca6e2 100644 --- a/openbsc/src/handover_decision.c +++ b/openbsc/src/handover_decision.c @@ -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, diff --git a/openbsc/src/handover_logic.c b/openbsc/src/handover_logic.c index 1bf048fed..bd4c563f0 100644 --- a/openbsc/src/handover_logic.c +++ b/openbsc/src/handover_logic.c @@ -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> diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c index 73d798f87..943a5e88d 100644 --- a/openbsc/src/input/ipaccess.c +++ b/openbsc/src/input/ipaccess.c @@ -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 { diff --git a/openbsc/src/input/misdn.c b/openbsc/src/input/misdn.c index 135cfad48..56930d498 100644 --- a/openbsc/src/input/misdn.c +++ b/openbsc/src/input/misdn.c @@ -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 diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 7d559b03a..037ed6000 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -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; diff --git a/openbsc/src/ipaccess/ipaccess-find.c b/openbsc/src/ipaccess/ipaccess-find.c index f469b6788..01f8a2d8d 100644 --- a/openbsc/src/ipaccess/ipaccess-find.c +++ b/openbsc/src/ipaccess/ipaccess-find.c @@ -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> diff --git a/openbsc/src/ipaccess/ipaccess-firmware.c b/openbsc/src/ipaccess/ipaccess-firmware.c index ed4bc9a0c..8aba50978 100644 --- a/openbsc/src/ipaccess/ipaccess-firmware.c +++ b/openbsc/src/ipaccess/ipaccess-firmware.c @@ -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> diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c index d018b6ebd..217e0bdf1 100644 --- a/openbsc/src/ipaccess/ipaccess-proxy.c +++ b/openbsc/src/ipaccess/ipaccess-proxy.c @@ -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; diff --git a/openbsc/src/mgcp/mgcp_main.c b/openbsc/src/mgcp/mgcp_main.c index 7d318b191..b8d892b08 100644 --- a/openbsc/src/mgcp/mgcp_main.c +++ b/openbsc/src/mgcp/mgcp_main.c @@ -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> diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c index 53573f3b2..154920271 100644 --- a/openbsc/src/mgcp/mgcp_protocol.c +++ b/openbsc/src/mgcp/mgcp_protocol.c @@ -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> diff --git a/openbsc/src/mncc.c b/openbsc/src/mncc.c index 15e2978e6..01d59aad1 100644 --- a/openbsc/src/mncc.c +++ b/openbsc/src/mncc.c @@ -28,7 +28,7 @@ #include <openbsc/gsm_04_08.h> #include <openbsc/debug.h> #include <openbsc/mncc.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/gsm_data.h> #include <openbsc/transaction.h> #include <openbsc/rtp_proxy.h> diff --git a/openbsc/src/paging.c b/openbsc/src/paging.c index 91de70241..7c3750d66 100644 --- a/openbsc/src/paging.c +++ b/openbsc/src/paging.c @@ -40,7 +40,7 @@ #include <assert.h> #include <openbsc/paging.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/debug.h> #include <openbsc/signal.h> #include <openbsc/abis_rsl.h> diff --git a/openbsc/src/rest_octets.c b/openbsc/src/rest_octets.c index 74874bd9a..a57e7dffe 100644 --- a/openbsc/src/rest_octets.c +++ b/openbsc/src/rest_octets.c @@ -27,7 +27,7 @@ #include <errno.h> #include <openbsc/gsm_data.h> -#include <openbsc/bitvec.h> +#include <osmocore/bitvec.h> #include <openbsc/rest_octets.h> /* generate SI1 rest octets */ diff --git a/openbsc/src/rs232.c b/openbsc/src/rs232.c index a58472364..36af59cbf 100644 --- a/openbsc/src/rs232.c +++ b/openbsc/src/rs232.c @@ -28,8 +28,8 @@ #include <termios.h> #include <fcntl.h> -#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/rs232.h> diff --git a/openbsc/src/rtp_proxy.c b/openbsc/src/rtp_proxy.c index 83b774f97..9b1f4d91b 100644 --- a/openbsc/src/rtp_proxy.c +++ b/openbsc/src/rtp_proxy.c @@ -29,10 +29,10 @@ #include <time.h> /* clock() */ #include <sys/utsname.h> /* uname() */ -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/gsm_data.h> -#include <openbsc/msgb.h> -#include <openbsc/select.h> +#include <osmocore/msgb.h> +#include <osmocore/select.h> #include <openbsc/debug.h> #include <openbsc/rtp_proxy.h> diff --git a/openbsc/src/sccp/sccp.c b/openbsc/src/sccp/sccp.c index b0de239ab..9cd7c9c68 100644 --- a/openbsc/src/sccp/sccp.c +++ b/openbsc/src/sccp/sccp.c @@ -24,9 +24,9 @@ #include <string.h> -#include <openbsc/msgb.h> +#include <osmocore/msgb.h> #include <openbsc/debug.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <sccp/sccp.h> diff --git a/openbsc/src/silent_call.c b/openbsc/src/silent_call.c index a0c166e0a..cada24e66 100644 --- a/openbsc/src/silent_call.c +++ b/openbsc/src/silent_call.c @@ -25,7 +25,7 @@ #include <unistd.h> #include <errno.h> -#include <openbsc/msgb.h> +#include <osmocore/msgb.h> #include <openbsc/signal.h> #include <openbsc/debug.h> #include <openbsc/paging.h> diff --git a/openbsc/src/subchan_demux.c b/openbsc/src/subchan_demux.c index 63be533df..0d6c1febe 100644 --- a/openbsc/src/subchan_demux.c +++ b/openbsc/src/subchan_demux.c @@ -28,7 +28,7 @@ #include <openbsc/subchan_demux.h> #include <openbsc/trau_frame.h> #include <openbsc/debug.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/gsm_data.h> void *tall_tqe_ctx; diff --git a/openbsc/src/system_information.c b/openbsc/src/system_information.c index 9bdf2c139..36dc6b901 100644 --- a/openbsc/src/system_information.c +++ b/openbsc/src/system_information.c @@ -31,7 +31,7 @@ #include <openbsc/gsm_data.h> #include <openbsc/abis_rsl.h> #include <openbsc/rest_octets.h> -#include <openbsc/bitvec.h> +#include <osmocore/bitvec.h> #include <openbsc/debug.h> #define GSM48_CELL_CHAN_DESC_SIZE 16 diff --git a/openbsc/src/talloc_ctx.c b/openbsc/src/talloc_ctx.c index 5f0ee4de8..6379e13db 100644 --- a/openbsc/src/talloc_ctx.c +++ b/openbsc/src/talloc_ctx.c @@ -1,4 +1,4 @@ -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/gsm_data.h> extern void *tall_msgb_ctx; diff --git a/openbsc/src/telnet_interface.c b/openbsc/src/telnet_interface.c index 6f452a55b..805dd127d 100644 --- a/openbsc/src/telnet_interface.c +++ b/openbsc/src/telnet_interface.c @@ -30,11 +30,11 @@ #include <openbsc/chan_alloc.h> #include <openbsc/gsm_04_08.h> #include <openbsc/gsm_04_11.h> -#include <openbsc/msgb.h> +#include <osmocore/msgb.h> #include <openbsc/abis_rsl.h> #include <openbsc/paging.h> #include <openbsc/signal.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/debug.h> #include <vty/buffer.h> diff --git a/openbsc/src/token_auth.c b/openbsc/src/token_auth.c index fd81f035a..7fefea5a4 100644 --- a/openbsc/src/token_auth.c +++ b/openbsc/src/token_auth.c @@ -21,7 +21,7 @@ */ #include <stdio.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/signal.h> #include <openbsc/gsm_data.h> #include <openbsc/gsm_04_11.h> diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c index c972037be..75a279ddc 100644 --- a/openbsc/src/transaction.c +++ b/openbsc/src/transaction.c @@ -23,7 +23,7 @@ #include <openbsc/gsm_data.h> #include <openbsc/mncc.h> #include <openbsc/debug.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/gsm_subscriber.h> #include <openbsc/gsm_04_08.h> #include <openbsc/mncc.h> diff --git a/openbsc/src/trau_mux.c b/openbsc/src/trau_mux.c index 9930751a5..f2fa5c023 100644 --- a/openbsc/src/trau_mux.c +++ b/openbsc/src/trau_mux.c @@ -30,7 +30,7 @@ #include <openbsc/subchan_demux.h> #include <openbsc/e1_input.h> #include <openbsc/debug.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> u_int8_t gsm_fr_map[] = { 6, 6, 5, 5, 4, 4, 3, 3, diff --git a/openbsc/src/vty/buffer.c b/openbsc/src/vty/buffer.c index 8ab73114b..195d06209 100644 --- a/openbsc/src/vty/buffer.c +++ b/openbsc/src/vty/buffer.c @@ -28,7 +28,7 @@ #include <stddef.h> #include <sys/uio.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <vty/buffer.h> #include <vty/vty.h> diff --git a/openbsc/src/vty/command.c b/openbsc/src/vty/command.c index 5b1dcb977..2faed35e4 100644 --- a/openbsc/src/vty/command.c +++ b/openbsc/src/vty/command.c @@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */ #include <openbsc/gsm_data.h> #include <openbsc/gsm_subscriber.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> void *tall_vty_cmd_ctx; diff --git a/openbsc/src/vty/vector.c b/openbsc/src/vty/vector.c index 06e1aaa8e..db47ae59a 100644 --- a/openbsc/src/vty/vector.c +++ b/openbsc/src/vty/vector.c @@ -24,7 +24,7 @@ #include <vty/vector.h> #include <vty/vty.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <memory.h> void *tall_vty_vec_ctx; diff --git a/openbsc/src/vty/vty.c b/openbsc/src/vty/vty.c index 2339bbd4b..1260f38c5 100644 --- a/openbsc/src/vty/vty.c +++ b/openbsc/src/vty/vty.c @@ -17,7 +17,7 @@ #include <vty/vty.h> #include <vty/command.h> #include <vty/buffer.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> /* our callback, located in telnet_interface.c */ void vty_event(enum event event, int sock, struct vty *vty); diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 76598d377..dc70e980b 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -28,15 +28,15 @@ #include <arpa/inet.h> -#include <openbsc/linuxlist.h> +#include <osmocore/linuxlist.h> #include <openbsc/gsm_data.h> #include <openbsc/e1_input.h> #include <openbsc/abis_nm.h> -#include <openbsc/gsm_utils.h> +#include <osmocore/gsm_utils.h> #include <openbsc/chan_alloc.h> #include <openbsc/meas_rep.h> #include <openbsc/db.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/telnet_interface.h> static struct gsm_network *gsmnet; diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c index f2b572895..b824c3db6 100644 --- a/openbsc/src/vty_interface_layer3.c +++ b/openbsc/src/vty_interface_layer3.c @@ -29,16 +29,16 @@ #include <arpa/inet.h> -#include <openbsc/linuxlist.h> +#include <osmocore/linuxlist.h> #include <openbsc/gsm_data.h> #include <openbsc/gsm_subscriber.h> #include <openbsc/silent_call.h> #include <openbsc/gsm_04_11.h> #include <openbsc/e1_input.h> #include <openbsc/abis_nm.h> -#include <openbsc/gsm_utils.h> +#include <osmocore/gsm_utils.h> #include <openbsc/db.h> -#include <openbsc/talloc.h> +#include <osmocore/talloc.h> #include <openbsc/signal.h> #include <openbsc/debug.h> |