From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
This patch also renames hexdump in osmocon.c and osmoload.c
to avoid clashing with hexdump defined in libosmocore. This
is a workaround, it's planned to fix the namespace pollution
of the library soon.
This patch has been compiled tested.
Signed-off-by: Pablo Neira Ayuso <pablo(a)gnumonks.org>
---
include/osmocore/rsl.h | 4 ++--
src/Makefile | 4 +++-
src/host/layer23/include/osmocom/bb/common/l1ctl.h | 2 +-
src/host/layer23/include/osmocom/bb/common/lapdm.h | 4 ++--
.../layer23/include/osmocom/bb/common/logging.h | 2 +-
.../include/osmocom/bb/common/osmocom_data.h | 6 +++---
.../layer23/include/osmocom/bb/common/sysinfo.h | 2 +-
src/host/layer23/include/osmocom/bb/misc/layer3.h | 2 +-
.../layer23/include/osmocom/bb/mobile/gsm48_rr.h | 2 +-
src/host/layer23/include/osmocom/bb/mobile/mncc.h | 4 ++--
.../include/osmocom/bb/mobile/transaction.h | 2 +-
src/host/layer23/src/common/Makefile.am | 2 +-
src/host/layer23/src/common/gps.c | 2 +-
src/host/layer23/src/common/l1ctl.c | 20 ++++++++++----------
src/host/layer23/src/common/l1l2_interface.c | 2 +-
src/host/layer23/src/common/lapdm.c | 16 ++++++++--------
src/host/layer23/src/common/logging.c | 4 ++--
src/host/layer23/src/common/main.c | 12 ++++++------
src/host/layer23/src/common/sap_interface.c | 2 +-
src/host/layer23/src/common/sim.c | 4 ++--
src/host/layer23/src/common/sysinfo.c | 2 +-
src/host/layer23/src/misc/Makefile.am | 4 ++--
src/host/layer23/src/misc/app_bcch_scan.c | 8 ++++----
src/host/layer23/src/misc/app_cbch_sniff.c | 10 +++++-----
src/host/layer23/src/misc/app_ccch_scan.c | 14 +++++++-------
src/host/layer23/src/misc/app_cell_log.c | 4 ++--
src/host/layer23/src/misc/app_echo_test.c | 6 +++---
src/host/layer23/src/misc/bcch_scan.c | 20 ++++++++++----------
src/host/layer23/src/misc/cell_log.c | 14 +++++++-------
src/host/layer23/src/misc/rslms.c | 8 ++++----
src/host/layer23/src/mobile/app_mobile.c | 8 ++++----
src/host/layer23/src/mobile/gsm322.c | 10 +++++-----
src/host/layer23/src/mobile/gsm48_cc.c | 8 ++++----
src/host/layer23/src/mobile/gsm48_mm.c | 8 ++++----
src/host/layer23/src/mobile/gsm48_rr.c | 10 +++++-----
src/host/layer23/src/mobile/main.c | 8 ++++----
src/host/layer23/src/mobile/mnccms.c | 2 +-
src/host/layer23/src/mobile/settings.c | 2 +-
src/host/layer23/src/mobile/subscriber.c | 4 ++--
src/host/layer23/src/mobile/transaction.c | 6 +++---
src/host/layer23/src/mobile/vty_interface.c | 8 ++++----
src/host/osmocon/osmocon.c | 16 ++++++++--------
src/host/osmocon/osmoload.c | 18 +++++++++---------
src/host/osmocon/tpu_debug.c | 2 +-
44 files changed, 150 insertions(+), 148 deletions(-)
diff --git a/include/osmocore/rsl.h b/include/osmocore/rsl.h
index 3a2b04d..c9375a7 100644
--- a/include/osmocore/rsl.h
+++ b/include/osmocore/rsl.h
@@ -2,8 +2,8 @@
#define _OSMOCORE_RSL_H
#include <stdint.h>
-#include <osmocore/utils.h>
-#include <osmocore/protocol/gsm_08_58.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/protocol/gsm_08_58.h>
void rsl_init_rll_hdr(struct abis_rsl_rll_hdr *dh, uint8_t msg_type);
diff --git a/src/Makefile b/src/Makefile
index b3594c1..1b67e83 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,8 +9,10 @@ CROSS_TOOL_PREFIX=arm-elf-
TOPDIR=$(shell pwd)
OSMOCORE_CONFIGURE_ENV=
LIBOSMOCORE_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/.libs/libosmocore.a \
LIBOSMOVTY_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/vty/.libs/libosmovty.a \
+ LIBOSMOGSM_LIBS=$(TOPDIR)/shared/libosmogsm/build-host/src/gsm/.libs/libosmogsm.a \
LIBOSMOCORE_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include \
- LIBOSMOVTY_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include
+ LIBOSMOVTY_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include \
+ LIBOSMOGSM_CFLAGS=-I$(TOPDIR)/shared/libosmogsm/include
all: libosmocore-target nofirmware firmware
nofirmware: libosmocore-host layer23 osmocon gsmmap
diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h
b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
index 64abf9c..7eb0c8c 100644
--- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h
+++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
@@ -1,7 +1,7 @@
#ifndef osmocom_l1ctl_h
#define osmocom_l1ctl_h
-#include <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
#include <osmocom/bb/common/osmocom_data.h>
struct osmocom_ms;
diff --git a/src/host/layer23/include/osmocom/bb/common/lapdm.h
b/src/host/layer23/include/osmocom/bb/common/lapdm.h
index de954fb..2d0e2fd 100644
--- a/src/host/layer23/include/osmocom/bb/common/lapdm.h
+++ b/src/host/layer23/include/osmocom/bb/common/lapdm.h
@@ -3,8 +3,8 @@
#include <stdint.h>
-#include <osmocore/timer.h>
-#include <osmocore/msgb.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/msgb.h>
#include <l1ctl_proto.h>
diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h
b/src/host/layer23/include/osmocom/bb/common/logging.h
index eb9f482..9205fec 100644
--- a/src/host/layer23/include/osmocom/bb/common/logging.h
+++ b/src/host/layer23/include/osmocom/bb/common/logging.h
@@ -2,7 +2,7 @@
#define _LOGGING_H
#define DEBUG
-#include <osmocore/logging.h>
+#include <osmocom/core/logging.h>
enum {
DRSL,
diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h
b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h
index 749c144..9d8a030 100644
--- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h
+++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h
@@ -1,9 +1,9 @@
#ifndef osmocom_data_h
#define osmocom_data_h
-#include <osmocore/select.h>
-#include <osmocore/gsm_utils.h>
-#include <osmocore/write_queue.h>
+#include <osmocom/core/select.h>
+#include <osmocom/gsm/gsm_utils.h>
+#include <osmocom/core/write_queue.h>
struct osmocom_ms;
diff --git a/src/host/layer23/include/osmocom/bb/common/sysinfo.h
b/src/host/layer23/include/osmocom/bb/common/sysinfo.h
index 07daafa..e5db54f 100644
--- a/src/host/layer23/include/osmocom/bb/common/sysinfo.h
+++ b/src/host/layer23/include/osmocom/bb/common/sysinfo.h
@@ -1,7 +1,7 @@
#ifndef _SYSINFO_H
#define _SYSINFO_H
-#include <osmocore/gsm48_ie.h>
+#include <osmocom/gsm/gsm48_ie.h>
/* collection of system information of the current cell */
diff --git a/src/host/layer23/include/osmocom/bb/misc/layer3.h
b/src/host/layer23/include/osmocom/bb/misc/layer3.h
index 7d364e7..bbf242d 100644
--- a/src/host/layer23/include/osmocom/bb/misc/layer3.h
+++ b/src/host/layer23/include/osmocom/bb/misc/layer3.h
@@ -1,7 +1,7 @@
#ifndef _OSMOCOM_L3_H
#define _OSMOCOM_L3_H
-#include <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
#include <osmocom/bb/common/osmocom_data.h>
int gsm48_rx_ccch(struct msgb *msg, struct osmocom_ms *ms);
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
index 830c8cf..b140c18 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
@@ -1,7 +1,7 @@
#ifndef _GSM48_RR_H
#define _GSM48_RR_H
-#include "osmocore/protocol/gsm_04_08.h"
+#include <osmocom/gsm/protocol/gsm_04_08.h>
#define GSM_TA_CM 55385
diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc.h
b/src/host/layer23/include/osmocom/bb/mobile/mncc.h
index 151f0b4..e378ecc 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/mncc.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/mncc.h
@@ -26,8 +26,8 @@
#ifndef _MNCC_H
#define _MNCC_H
-#include <osmocore/linuxlist.h>
-#include <osmocore/mncc.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/gsm/mncc.h>
struct gsm_call {
struct llist_head entry;
diff --git a/src/host/layer23/include/osmocom/bb/mobile/transaction.h
b/src/host/layer23/include/osmocom/bb/mobile/transaction.h
index 4be82c1..6cbc25b 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/transaction.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/transaction.h
@@ -1,7 +1,7 @@
#ifndef _TRANSACT_H
#define _TRANSACT_H
-#include <osmocore/linuxlist.h>
+#include <osmocom/core/linuxlist.h>
/* One transaction */
struct gsm_trans {
diff --git a/src/host/layer23/src/common/Makefile.am
b/src/host/layer23/src/common/Makefile.am
index 4e2686c..f6e3f83 100644
--- a/src/host/layer23/src/common/Makefile.am
+++ b/src/host/layer23/src/common/Makefile.am
@@ -1,5 +1,5 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
noinst_LIBRARIES = liblayer23.a
liblayer23_a_SOURCES = l1ctl.c l1l2_interface.c sap_interface.c lapdm.c \
diff --git a/src/host/layer23/src/common/gps.c b/src/host/layer23/src/common/gps.c
index 55dd239..9e76793 100644
--- a/src/host/layer23/src/common/gps.c
+++ b/src/host/layer23/src/common/gps.c
@@ -31,7 +31,7 @@
#include <gps.h>
#endif
-#include <osmocore/utils.h>
+#include <osmocom/core/utils.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/logging.h>
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index d47275a..f2714e6 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -30,16 +30,16 @@
#include <l1ctl_proto.h>
-#include <osmocore/signal.h>
-#include <osmocore/logging.h>
-#include <osmocore/timer.h>
-#include <osmocore/msgb.h>
-#include <osmocore/tlv.h>
-#include <osmocore/gsm_utils.h>
-#include <osmocore/gsmtap_util.h>
-#include <osmocore/protocol/gsm_04_08.h>
-#include <osmocore/protocol/gsm_08_58.h>
-#include <osmocore/rsl.h>
+#include <osmocom/core/signal.h>
+#include <osmocom/core/logging.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/gsm/tlv.h>
+#include <osmocom/gsm/gsm_utils.h>
+#include <osmocom/core/gsmtap_util.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
+#include <osmocom/gsm/protocol/gsm_08_58.h>
+#include <osmocom/gsm/rsl.h>
#include <osmocom/bb/common/l1ctl.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/common/l1l2_interface.c
b/src/host/layer23/src/common/l1l2_interface.c
index 74c8875..23e1ef2 100644
--- a/src/host/layer23/src/common/l1l2_interface.c
+++ b/src/host/layer23/src/common/l1l2_interface.c
@@ -26,7 +26,7 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/l1l2_interface.h>
-#include <osmocore/utils.h>
+#include <osmocom/core/utils.h>
#include <sys/socket.h>
#include <sys/un.h>
diff --git a/src/host/layer23/src/common/lapdm.c b/src/host/layer23/src/common/lapdm.c
index dc9c916..61e2287 100644
--- a/src/host/layer23/src/common/lapdm.c
+++ b/src/host/layer23/src/common/lapdm.c
@@ -56,14 +56,14 @@
#include <errno.h>
#include <arpa/inet.h>
-#include <osmocore/logging.h>
-#include <osmocore/timer.h>
-#include <osmocore/msgb.h>
-#include <osmocore/tlv.h>
-#include <osmocore/utils.h>
-#include <osmocore/rsl.h>
-#include <osmocore/protocol/gsm_04_08.h>
-#include <osmocore/protocol/gsm_08_58.h>
+#include <osmocom/core/logging.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/gsm/tlv.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/rsl.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
+#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/l1ctl.h>
diff --git a/src/host/layer23/src/common/logging.c
b/src/host/layer23/src/common/logging.c
index c2e4a5e..5283935 100644
--- a/src/host/layer23/src/common/logging.c
+++ b/src/host/layer23/src/common/logging.c
@@ -21,8 +21,8 @@
*/
-#include <osmocore/utils.h>
-#include <osmocore/logging.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/core/logging.h>
#include <osmocom/bb/common/logging.h>
static const struct log_info_cat default_categories[] = {
diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c
index cb9564a..61513ea 100644
--- a/src/host/layer23/src/common/main.c
+++ b/src/host/layer23/src/common/main.c
@@ -30,12 +30,12 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/l23_app.h>
-#include <osmocore/msgb.h>
-#include <osmocore/talloc.h>
-#include <osmocore/select.h>
-#include <osmocore/linuxlist.h>
-#include <osmocore/gsmtap_util.h>
-#include <osmocore/utils.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/select.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/gsmtap_util.h>
+#include <osmocom/core/utils.h>
#include <arpa/inet.h>
diff --git a/src/host/layer23/src/common/sap_interface.c
b/src/host/layer23/src/common/sap_interface.c
index d384c9e..54aa635 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -26,7 +26,7 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/sap_interface.h>
-#include <osmocore/utils.h>
+#include <osmocom/core/utils.h>
#include <sys/socket.h>
#include <sys/un.h>
diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c
index 3ef3cf8..b76de5c 100644
--- a/src/host/layer23/src/common/sim.c
+++ b/src/host/layer23/src/common/sim.c
@@ -22,8 +22,8 @@
#include <stdint.h>
#include <errno.h>
#include <arpa/inet.h>
-#include <osmocore/talloc.h>
-#include <osmocore/utils.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/utils.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/common/sysinfo.c
b/src/host/layer23/src/common/sysinfo.c
index 8f6b1b5..5827d75 100644
--- a/src/host/layer23/src/common/sysinfo.c
+++ b/src/host/layer23/src/common/sysinfo.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <arpa/inet.h>
-#include <osmocore/bitvec.h>
+#include <osmocom/core/bitvec.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/networks.h>
diff --git a/src/host/layer23/src/misc/Makefile.am
b/src/host/layer23/src/misc/Makefile.am
index 8428511..15d46a8 100644
--- a/src/host/layer23/src/misc/Makefile.am
+++ b/src/host/layer23/src/misc/Makefile.am
@@ -1,6 +1,6 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS)
-LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
+LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
bin_PROGRAMS = bcch_scan ccch_scan echo_test cell_log cbch_sniff
diff --git a/src/host/layer23/src/misc/app_bcch_scan.c
b/src/host/layer23/src/misc/app_bcch_scan.c
index cce22b3..9a01694 100644
--- a/src/host/layer23/src/misc/app_bcch_scan.c
+++ b/src/host/layer23/src/misc/app_bcch_scan.c
@@ -28,10 +28,10 @@
#include <osmocom/bb/common/l23_app.h>
#include <osmocom/bb/misc/layer3.h>
-#include <osmocore/msgb.h>
-#include <osmocore/talloc.h>
-#include <osmocore/select.h>
-#include <osmocore/signal.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/select.h>
+#include <osmocom/core/signal.h>
static int signal_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c
b/src/host/layer23/src/misc/app_cbch_sniff.c
index 9e2d1a9..77427fa 100644
--- a/src/host/layer23/src/misc/app_cbch_sniff.c
+++ b/src/host/layer23/src/misc/app_cbch_sniff.c
@@ -29,11 +29,11 @@
#include <osmocom/bb/common/l23_app.h>
#include <osmocom/bb/misc/layer3.h>
-#include <osmocore/msgb.h>
-#include <osmocore/talloc.h>
-#include <osmocore/select.h>
-#include <osmocore/signal.h>
-#include <osmocore/rsl.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/select.h>
+#include <osmocom/core/signal.h>
+#include <osmocom/gsm/rsl.h>
struct osmocom_ms *g_ms;
struct gsm48_sysinfo g_sysinfo = {};
diff --git a/src/host/layer23/src/misc/app_ccch_scan.c
b/src/host/layer23/src/misc/app_ccch_scan.c
index 4e45a42..913ceca 100644
--- a/src/host/layer23/src/misc/app_ccch_scan.c
+++ b/src/host/layer23/src/misc/app_ccch_scan.c
@@ -24,13 +24,13 @@
#include <errno.h>
#include <stdio.h>
-#include <osmocore/msgb.h>
-#include <osmocore/rsl.h>
-#include <osmocore/tlv.h>
-#include <osmocore/gsm48_ie.h>
-#include <osmocore/gsm48.h>
-#include <osmocore/signal.h>
-#include <osmocore/protocol/gsm_04_08.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/gsm/rsl.h>
+#include <osmocom/gsm/tlv.h>
+#include <osmocom/gsm/gsm48_ie.h>
+#include <osmocom/gsm/gsm48.h>
+#include <osmocom/core/signal.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/lapdm.h>
diff --git a/src/host/layer23/src/misc/app_cell_log.c
b/src/host/layer23/src/misc/app_cell_log.c
index 7a2c67a..dfc3c4b 100644
--- a/src/host/layer23/src/misc/app_cell_log.c
+++ b/src/host/layer23/src/misc/app_cell_log.c
@@ -32,8 +32,8 @@
#include <osmocom/bb/common/gps.h>
#include <osmocom/bb/misc/cell_log.h>
-#include <osmocore/talloc.h>
-#include <osmocore/utils.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/utils.h>
extern struct log_target *stderr_target;
extern void *l23_ctx;
diff --git a/src/host/layer23/src/misc/app_echo_test.c
b/src/host/layer23/src/misc/app_echo_test.c
index c9b1895..0adab7f 100644
--- a/src/host/layer23/src/misc/app_echo_test.c
+++ b/src/host/layer23/src/misc/app_echo_test.c
@@ -28,9 +28,9 @@
#include <osmocom/bb/common/l23_app.h>
#include <osmocom/bb/misc/layer3.h>
-#include <osmocore/msgb.h>
-#include <osmocore/talloc.h>
-#include <osmocore/select.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/select.h>
static struct {
diff --git a/src/host/layer23/src/misc/bcch_scan.c
b/src/host/layer23/src/misc/bcch_scan.c
index dff4dc9..351da52 100644
--- a/src/host/layer23/src/misc/bcch_scan.c
+++ b/src/host/layer23/src/misc/bcch_scan.c
@@ -27,16 +27,16 @@
#include <l1ctl_proto.h>
-#include <osmocore/logging.h>
-#include <osmocore/talloc.h>
-#include <osmocore/signal.h>
-#include <osmocore/timer.h>
-#include <osmocore/msgb.h>
-#include <osmocore/tlv.h>
-#include <osmocore/gsm_utils.h>
-#include <osmocore/protocol/gsm_04_08.h>
-#include <osmocore/protocol/gsm_08_58.h>
-#include <osmocore/rsl.h>
+#include <osmocom/core/logging.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/signal.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/gsm/tlv.h>
+#include <osmocom/gsm/gsm_utils.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
+#include <osmocom/gsm/protocol/gsm_08_58.h>
+#include <osmocom/gsm/rsl.h>
#include <osmocom/bb/common/l1ctl.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c
index a0f9769..86ab88d 100644
--- a/src/host/layer23/src/misc/cell_log.c
+++ b/src/host/layer23/src/misc/cell_log.c
@@ -29,13 +29,13 @@
#include <l1ctl_proto.h>
-#include <osmocore/logging.h>
-#include <osmocore/timer.h>
-#include <osmocore/signal.h>
-#include <osmocore/msgb.h>
-#include <osmocore/gsm_utils.h>
-#include <osmocore/protocol/gsm_04_08.h>
-#include <osmocore/rsl.h>
+#include <osmocom/core/logging.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/signal.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/gsm/gsm_utils.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
+#include <osmocom/gsm/rsl.h>
#include <osmocom/bb/common/l1ctl.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/misc/rslms.c b/src/host/layer23/src/misc/rslms.c
index b2e0047..93d22fd 100644
--- a/src/host/layer23/src/misc/rslms.c
+++ b/src/host/layer23/src/misc/rslms.c
@@ -24,10 +24,10 @@
#include <errno.h>
#include <stdio.h>
-#include <osmocore/msgb.h>
-#include <osmocore/rsl.h>
-#include <osmocore/tlv.h>
-#include <osmocore/protocol/gsm_04_08.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/gsm/rsl.h>
+#include <osmocom/gsm/tlv.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/lapdm.h>
diff --git a/src/host/layer23/src/mobile/app_mobile.c
b/src/host/layer23/src/mobile/app_mobile.c
index a1b4731..33fdde6 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -37,10 +37,10 @@
#include <osmocom/bb/mobile/mncc.h>
#include <osmocom/vty/telnet_interface.h>
-#include <osmocore/msgb.h>
-#include <osmocore/talloc.h>
-#include <osmocore/select.h>
-#include <osmocore/signal.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/select.h>
+#include <osmocom/core/signal.h>
extern void *l23_ctx;
extern struct llist_head ms_list;
diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c
index 1996f93..c05469d 100644
--- a/src/host/layer23/src/mobile/gsm322.c
+++ b/src/host/layer23/src/mobile/gsm322.c
@@ -26,11 +26,11 @@
#include <stdlib.h>
#include <limits.h>
-#include <osmocore/msgb.h>
-#include <osmocore/talloc.h>
-#include <osmocore/utils.h>
-#include <osmocore/gsm48.h>
-#include <osmocore/signal.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/gsm48.h>
+#include <osmocom/core/signal.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/l1ctl.h>
diff --git a/src/host/layer23/src/mobile/gsm48_cc.c
b/src/host/layer23/src/mobile/gsm48_cc.c
index d8976eb..b881205 100644
--- a/src/host/layer23/src/mobile/gsm48_cc.c
+++ b/src/host/layer23/src/mobile/gsm48_cc.c
@@ -25,10 +25,10 @@
#include <string.h>
#include <stdlib.h>
-#include <osmocore/msgb.h>
-#include <osmocore/utils.h>
-#include <osmocore/gsm48.h>
-#include <osmocore/talloc.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/gsm48.h>
+#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/mobile/gsm48_mm.c
b/src/host/layer23/src/mobile/gsm48_mm.c
index 15bbd27..bf5bbc2 100644
--- a/src/host/layer23/src/mobile/gsm48_mm.c
+++ b/src/host/layer23/src/mobile/gsm48_mm.c
@@ -26,10 +26,10 @@
#include <stdlib.h>
#include <arpa/inet.h>
-#include <osmocore/msgb.h>
-#include <osmocore/utils.h>
-#include <osmocore/gsm48.h>
-#include <osmocore/talloc.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/gsm48.h>
+#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c
b/src/host/layer23/src/mobile/gsm48_rr.c
index dc2226a..b2ab2e1 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -66,11 +66,11 @@
#include <stdlib.h>
#include <arpa/inet.h>
-#include <osmocore/msgb.h>
-#include <osmocore/utils.h>
-#include <osmocore/rsl.h>
-#include <osmocore/gsm48.h>
-#include <osmocore/bitvec.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/rsl.h>
+#include <osmocom/gsm/gsm48.h>
+#include <osmocom/core/bitvec.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/l1l2_interface.h>
diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c
index cd72d13..4765995 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -25,10 +25,10 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/mobile/app_mobile.h>
-#include <osmocore/talloc.h>
-#include <osmocore/linuxlist.h>
-#include <osmocore/gsmtap_util.h>
-#include <osmocore/signal.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/gsmtap_util.h>
+#include <osmocom/core/signal.h>
#include <arpa/inet.h>
diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c
index 6997993..4d47be4 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <stdlib.h>
-#include <osmocore/talloc.h>
+#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/mobile/settings.c
b/src/host/layer23/src/mobile/settings.c
index a5a91ce..db22fd9 100644
--- a/src/host/layer23/src/mobile/settings.c
+++ b/src/host/layer23/src/mobile/settings.c
@@ -22,7 +22,7 @@
#include <stdint.h>
#include <errno.h>
#include <string.h>
-#include <osmocore/talloc.h>
+#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/mobile/subscriber.c
b/src/host/layer23/src/mobile/subscriber.c
index 3ba78f3..549345c 100644
--- a/src/host/layer23/src/mobile/subscriber.c
+++ b/src/host/layer23/src/mobile/subscriber.c
@@ -23,8 +23,8 @@
#include <errno.h>
#include <string.h>
#include <arpa/inet.h>
-#include <osmocore/talloc.h>
-#include <osmocore/comp128.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/gsm/comp128.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>
diff --git a/src/host/layer23/src/mobile/transaction.c
b/src/host/layer23/src/mobile/transaction.c
index abd3c2d..4b66050 100644
--- a/src/host/layer23/src/mobile/transaction.c
+++ b/src/host/layer23/src/mobile/transaction.c
@@ -21,9 +21,9 @@
#include <stdint.h>
-#include <osmocore/talloc.h>
-#include <osmocore/timer.h>
-#include <osmocore/msgb.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/msgb.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/logging.h>
diff --git a/src/host/layer23/src/mobile/vty_interface.c
b/src/host/layer23/src/mobile/vty_interface.c
index 7888f01..4f9acf4 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -25,10 +25,10 @@
#include <unistd.h>
#include <sys/types.h>
-#include <osmocore/utils.h>
-#include <osmocore/gsm48.h>
-#include <osmocore/talloc.h>
-#include <osmocore/signal.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/gsm48.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/signal.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/networks.h>
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 6f6f566..2c42799 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -39,10 +39,10 @@
#include <sercomm.h>
-#include <osmocore/linuxlist.h>
-#include <osmocore/select.h>
-#include <osmocore/talloc.h>
-#include <osmocore/timer.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/select.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/timer.h>
#include <arpa/inet.h>
@@ -447,7 +447,7 @@ int read_file(const char *filename)
return 0;
}
-static void hexdump(const uint8_t *data, unsigned int len)
+static void osmocon_hexdump(const uint8_t *data, unsigned int len)
{
int n;
@@ -754,7 +754,7 @@ static void hdlc_send_to_phone(uint8_t dlci, uint8_t *data, int len)
if(dnload.dump_tx) {
printf("hdlc_send(dlci=%u): ", dlci);
- hexdump(data, len);
+ osmocon_hexdump(data, len);
}
if (len > 512) {
@@ -792,7 +792,7 @@ static void hdlc_tool_cb(uint8_t dlci, struct msgb *msg)
if(dnload.dump_rx) {
printf("hdlc_recv(dlci=%u): ", dlci);
- hexdump(msg->data, msg->len);
+ osmocon_hexdump(msg->data, msg->len);
}
if(srv) {
@@ -832,7 +832,7 @@ static int handle_buffer(int buf_used_len)
if (!dnload.expect_hdlc) {
printf("got %i bytes from modem, ", nbytes);
printf("data looks like: ");
- hexdump(bufptr, nbytes);
+ osmocon_hexdump(bufptr, nbytes);
} else {
for (i = 0; i < nbytes; ++i)
if (sercomm_drv_rx_char(bufptr[i]) == 0)
diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c
index b075463..6663a1e 100644
--- a/src/host/osmocon/osmoload.c
+++ b/src/host/osmocon/osmoload.c
@@ -35,10 +35,10 @@
#include <sys/socket.h>
#include <sys/un.h>
-#include <osmocore/msgb.h>
-#include <osmocore/select.h>
-#include <osmocore/timer.h>
-#include <osmocore/crc16.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/select.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/crc16.h>
#include <loader/protocol.h>
@@ -146,7 +146,7 @@ static int version(const char *name)
exit(2);
}
-static void hexdump(const uint8_t *data, unsigned int len)
+static void osmoload_hexdump(const uint8_t *data, unsigned int len)
{
const uint8_t *bufptr = data;
const uint8_t const *endptr = bufptr + len;
@@ -190,7 +190,7 @@ loader_send_request(struct msgb *msg) {
if(osmoload.print_requests) {
printf("Sending %d bytes:\n", msg->len);
- hexdump(msg->data, msg->len);
+ osmoload_hexdump(msg->data, msg->len);
}
rc = write(connection.fd, &len, sizeof(len));
@@ -277,7 +277,7 @@ static void
loader_handle_reply(struct msgb *msg) {
if(osmoload.print_replies) {
printf("Received %d bytes:\n", msg->len);
- hexdump(msg->data, msg->len);
+ osmoload_hexdump(msg->data, msg->len);
}
uint8_t cmd = msgb_get_u8(msg);
@@ -338,7 +338,7 @@ loader_handle_reply(struct msgb *msg) {
break;
default:
printf("Received unknown reply %d:\n", cmd);
- hexdump(msg->data, msg->len);
+ osmoload_hexdump(msg->data, msg->len);
osmoload.quit = 1;
return;
}
@@ -364,7 +364,7 @@ loader_handle_reply(struct msgb *msg) {
break;
case LOADER_MEM_READ:
printf("Received memory dump of %d bytes at 0x%x:\n", length, address);
- hexdump(data, length);
+ osmoload_hexdump(data, length);
break;
case LOADER_MEM_WRITE:
printf("Confirmed memory write of %d bytes at 0x%x.\n", length, address);
diff --git a/src/host/osmocon/tpu_debug.c b/src/host/osmocon/tpu_debug.c
index f54bd40..c9dac90 100644
--- a/src/host/osmocon/tpu_debug.c
+++ b/src/host/osmocon/tpu_debug.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
-#include <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
/* TPU disassembler begin */
--
1.7.2.3