src: use new library libosmogsm and new path to headers in libosmocore

libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h
index c93db58..ebe20d2 100644
--- a/openbsc/include/openbsc/abis_nm.h
+++ b/openbsc/include/openbsc/abis_nm.h
@@ -23,8 +23,8 @@
 #define _NM_H
 
 #include <sys/types.h>
-#include <osmocore/tlv.h>
-#include <osmocore/protocol/gsm_12_21.h>
+#include <osmocom/gsm/tlv.h>
+#include <osmocom/gsm/protocol/gsm_12_21.h>
 
 struct cell_global_id {
 	u_int16_t mcc;
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index 295b01f..e5f38c9 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -22,9 +22,9 @@
 #ifndef _RSL_H
 #define _RSL_H
 
-#include <osmocore/protocol/gsm_08_58.h>
+#include <osmocom/gsm/protocol/gsm_08_58.h>
 
-#include <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
 
 struct gsm_bts;
 struct gsm_lchan;
diff --git a/openbsc/include/openbsc/bsc_msc.h b/openbsc/include/openbsc/bsc_msc.h
index d06ae05..ddaad3b 100644
--- a/openbsc/include/openbsc/bsc_msc.h
+++ b/openbsc/include/openbsc/bsc_msc.h
@@ -22,8 +22,8 @@
 #ifndef BSC_MSC_H
 #define BSC_MSC_H
 
-#include <osmocore/write_queue.h>
-#include <osmocore/timer.h>
+#include <osmocom/core/write_queue.h>
+#include <osmocom/core/timer.h>
 
 struct bsc_msc_connection {
 	struct write_queue write_queue;
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index f74cae2..e628925 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -25,14 +25,14 @@
 
 #include <sys/types.h>
 
-#include <osmocore/select.h>
-#include <osmocore/msgb.h>
-#include <osmocore/msgfile.h>
-#include <osmocore/timer.h>
-#include <osmocore/write_queue.h>
-#include <osmocore/rate_ctr.h>
-#include <osmocore/statistics.h>
-#include <osmocore/protocol/gsm_04_08.h>
+#include <osmocom/core/select.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/msgfile.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/write_queue.h>
+#include <osmocom/core/rate_ctr.h>
+#include <osmocom/core/statistics.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
 
 #include <regex.h>
 
diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h
index eb290e4..ff4aec1 100644
--- a/openbsc/include/openbsc/debug.h
+++ b/openbsc/include/openbsc/debug.h
@@ -2,10 +2,10 @@
 #define _DEBUG_H
 
 #include <stdio.h>
-#include <osmocore/linuxlist.h>
+#include <osmocom/core/linuxlist.h>
 
 #define DEBUG
-#include <osmocore/logging.h>
+#include <osmocom/core/logging.h>
 
 /* Debug Areas of the code */
 enum {
diff --git a/openbsc/include/openbsc/e1_input.h b/openbsc/include/openbsc/e1_input.h
index 3c8af38..40ceedf 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 <osmocore/linuxlist.h>
+#include <osmocom/core/linuxlist.h>
 #include <openbsc/gsm_data.h>
-#include <osmocore/msgb.h>
-#include <osmocore/select.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/select.h>
 #include <openbsc/subchan_demux.h>
 
 #define NUM_E1_TS   32
diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h
index 18ded22..8a7911c 100644
--- a/openbsc/include/openbsc/gb_proxy.h
+++ b/openbsc/include/openbsc/gb_proxy.h
@@ -3,7 +3,7 @@
 
 #include <sys/types.h>
 
-#include <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
 
 #include <openbsc/gprs_ns.h>
 #include <osmocom/vty/command.h>
diff --git a/openbsc/include/openbsc/gprs_bssgp.h b/openbsc/include/openbsc/gprs_bssgp.h
index e432cf7..cef4c30 100644
--- a/openbsc/include/openbsc/gprs_bssgp.h
+++ b/openbsc/include/openbsc/gprs_bssgp.h
@@ -182,7 +182,7 @@
 /* Find a BTS context based on BVCI+NSEI tuple */
 struct bssgp_bvc_ctx *btsctx_by_bvci_nsei(uint16_t bvci, uint16_t nsei);
 
-#include <osmocore/tlv.h>
+#include <osmocom/gsm/tlv.h>
 
 /* BSSGP-UL-UNITDATA.ind */
 int gprs_bssgp_rcvmsg(struct msgb *msg);
diff --git a/openbsc/include/openbsc/gprs_gmm.h b/openbsc/include/openbsc/gprs_gmm.h
index bd129ae..f6b3e5e 100644
--- a/openbsc/include/openbsc/gprs_gmm.h
+++ b/openbsc/include/openbsc/gprs_gmm.h
@@ -1,7 +1,7 @@
 #ifndef _GPRS_GMM_H
 #define _GPRS_GMM_H
 
-#include <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
 #include <openbsc/gprs_sgsn.h>
 
 int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause);
diff --git a/openbsc/include/openbsc/gprs_ns.h b/openbsc/include/openbsc/gprs_ns.h
index 953c364..0b50149 100644
--- a/openbsc/include/openbsc/gprs_ns.h
+++ b/openbsc/include/openbsc/gprs_ns.h
@@ -77,10 +77,10 @@
 
 /* Our Implementation */
 #include <netinet/in.h>
-#include <osmocore/linuxlist.h>
-#include <osmocore/msgb.h>
-#include <osmocore/timer.h>
-#include <osmocore/select.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/select.h>
 
 #define NS_TIMERS_COUNT 7
 #define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries)"
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index b470c53..bd60d4e 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -4,7 +4,7 @@
 #include <stdint.h>
 #include <netinet/in.h>
 
-#include <osmocore/gsm48.h>
+#include <osmocom/gsm/gsm48.h>
 
 #include <osmocom/crypt/gprs_cipher.h>
 
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 1c879ed..5e0a45b 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -3,8 +3,8 @@
 
 #include <openbsc/meas_rep.h>
 
-#include <osmocore/protocol/gsm_04_08.h>
-#include <osmocore/gsm48.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
+#include <osmocom/gsm/gsm48.h>
 
 struct msgb;
 struct gsm_bts;
diff --git a/openbsc/include/openbsc/gsm_04_08_gprs.h b/openbsc/include/openbsc/gsm_04_08_gprs.h
index 8de6362..e5c3edd 100644
--- a/openbsc/include/openbsc/gsm_04_08_gprs.h
+++ b/openbsc/include/openbsc/gsm_04_08_gprs.h
@@ -2,7 +2,7 @@
 #define _GSM48_GPRS_H
 
 #include <stdint.h>
-#include <osmocore/protocol/gsm_04_08.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
 
 /* Table 10.4 / 10.4a, GPRS Mobility Management (GMM) */
 #define GSM48_MT_GMM_ATTACH_REQ		0x01
diff --git a/openbsc/include/openbsc/gsm_04_11.h b/openbsc/include/openbsc/gsm_04_11.h
index 5969788..5f400ff 100644
--- a/openbsc/include/openbsc/gsm_04_11.h
+++ b/openbsc/include/openbsc/gsm_04_11.h
@@ -1,7 +1,7 @@
 #ifndef _GSM_04_11_H
 #define _GSM_04_11_H
 
-#include <osmocore/protocol/gsm_04_11.h>
+#include <osmocom/gsm/protocol/gsm_04_11.h>
 
 #define UM_SAPI_SMS 3	/* See GSM 04.05/04.06 */
 
diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h
index 796a1c1..0a60652 100644
--- a/openbsc/include/openbsc/gsm_04_80.h
+++ b/openbsc/include/openbsc/gsm_04_80.h
@@ -1,9 +1,9 @@
 #ifndef _GSM_04_80_H
 #define _GSM_04_80_H
 
-#include <osmocore/msgb.h>
-#include <osmocore/protocol/gsm_04_80.h>
-#include <osmocore/gsm0480.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/gsm/protocol/gsm_04_80.h>
+#include <osmocom/gsm/gsm0480.h>
 
 struct gsm_subscriber_connection;
 
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 4d427be..4b3ec93 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -44,19 +44,19 @@
 	GSM_CHREQ_REASON_OTHER,
 };
 
-#include <osmocore/timer.h>
+#include <osmocom/core/timer.h>
 #include <openbsc/system_information.h>
 #include <openbsc/rest_octets.h>
 #include <openbsc/mncc.h>
 
-#include <osmocore/tlv.h>
-#include <osmocore/bitvec.h>
-#include <osmocore/statistics.h>
-#include <osmocore/gsm_utils.h>
-#include <osmocore/utils.h>
-#include <osmocore/rxlev_stat.h>
+#include <osmocom/gsm/tlv.h>
+#include <osmocom/core/bitvec.h>
+#include <osmocom/core/statistics.h>
+#include <osmocom/gsm/gsm_utils.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/rxlev_stat.h>
 
-#include <osmocore/protocol/gsm_08_58.h>
+#include <osmocom/gsm/protocol/gsm_08_58.h>
 
 
 #define TRX_NR_TS	8
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index c365bc7..79476d3 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 <osmocore/linuxlist.h>
+#include <osmocom/core/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 1d00d97..314ca90 100644
--- a/openbsc/include/openbsc/ipaccess.h
+++ b/openbsc/include/openbsc/ipaccess.h
@@ -3,7 +3,7 @@
 
 #include "e1_input.h"
 #include "gsm_subscriber.h"
-#include <osmocore/linuxlist.h>
+#include <osmocom/core/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 516b76e..3d8e711 100644
--- a/openbsc/include/openbsc/mgcp.h
+++ b/openbsc/include/openbsc/mgcp.h
@@ -23,8 +23,8 @@
 #ifndef OPENBSC_MGCP_H
 #define OPENBSC_MGCP_H
 
-#include <osmocore/msgb.h>
-#include <osmocore/write_queue.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/write_queue.h>
 
 #include "debug.h"
 
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index 7c6bb54..0214318 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -23,7 +23,7 @@
 #ifndef OPENBSC_MGCP_DATA_H
 #define OPENBSC_MGCP_DATA_H
 
-#include <osmocore/select.h>
+#include <osmocom/core/select.h>
 
 #define CI_UNUSED 0
 
diff --git a/openbsc/include/openbsc/mncc.h b/openbsc/include/openbsc/mncc.h
index e514c19..ed1bfd6 100644
--- a/openbsc/include/openbsc/mncc.h
+++ b/openbsc/include/openbsc/mncc.h
@@ -24,8 +24,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>
 
 #include <stdint.h>
 
diff --git a/openbsc/include/openbsc/osmo_bsc_rf.h b/openbsc/include/openbsc/osmo_bsc_rf.h
index e43ae2e..7de9866 100644
--- a/openbsc/include/openbsc/osmo_bsc_rf.h
+++ b/openbsc/include/openbsc/osmo_bsc_rf.h
@@ -1,8 +1,8 @@
 #ifndef OSMO_BSC_RF
 #define OSMO_BSC_RF
 
-#include <osmocore/write_queue.h>
-#include <osmocore/timer.h>
+#include <osmocom/core/write_queue.h>
+#include <osmocom/core/timer.h>
 
 struct gsm_network;
 
diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h
index 8f9ca68..55b0a0f 100644
--- a/openbsc/include/openbsc/osmo_msc_data.h
+++ b/openbsc/include/openbsc/osmo_msc_data.h
@@ -25,7 +25,7 @@
 
 #include "bsc_msc.h"
 
-#include <osmocore/timer.h>
+#include <osmocom/core/timer.h>
 
 struct osmo_bsc_rf;
 struct gsm_network;
diff --git a/openbsc/include/openbsc/paging.h b/openbsc/include/openbsc/paging.h
index f719199..13d611a 100644
--- a/openbsc/include/openbsc/paging.h
+++ b/openbsc/include/openbsc/paging.h
@@ -23,10 +23,10 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <osmocore/linuxlist.h>
+#include <osmocom/core/linuxlist.h>
 #include "gsm_data.h"
 #include "gsm_subscriber.h"
-#include <osmocore/timer.h>
+#include <osmocom/core/timer.h>
 
 /**
  * A pending paging request
diff --git a/openbsc/include/openbsc/rtp_proxy.h b/openbsc/include/openbsc/rtp_proxy.h
index 53b58b4..2e4f278 100644
--- a/openbsc/include/openbsc/rtp_proxy.h
+++ b/openbsc/include/openbsc/rtp_proxy.h
@@ -24,8 +24,8 @@
 
 #include <netinet/in.h>
 
-#include <osmocore/linuxlist.h>
-#include <osmocore/select.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/select.h>
 
 #define RTP_PT_GSM_FULL 3
 #define RTP_PT_GSM_HALF 96
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h
index 84db87e..e3b2467 100644
--- a/openbsc/include/openbsc/sgsn.h
+++ b/openbsc/include/openbsc/sgsn.h
@@ -3,7 +3,7 @@
 
 #include <sys/types.h>
 
-#include <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
 
 #include <openbsc/gprs_ns.h>
 #include <openbsc/gprs_sgsn.h>
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h
index 5e2b7ae..ea76a40 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -27,7 +27,7 @@
 
 #include <openbsc/gsm_data.h>
 
-#include <osmocore/signal.h>
+#include <osmocom/core/signal.h>
 
 /*
  * Signalling subsystems
diff --git a/openbsc/include/openbsc/socket.h b/openbsc/include/openbsc/socket.h
index 4d31611..faca764 100644
--- a/openbsc/include/openbsc/socket.h
+++ b/openbsc/include/openbsc/socket.h
@@ -2,7 +2,7 @@
 #define _BSC_SOCKET_H
 
 #include <sys/types.h>
-#include <osmocore/select.h>
+#include <osmocom/core/select.h>
 
 #ifndef IPPROTO_GRE
 #define IPPROTO_GRE 47
diff --git a/openbsc/include/openbsc/subchan_demux.h b/openbsc/include/openbsc/subchan_demux.h
index da2a7f3..f7f0fba 100644
--- a/openbsc/include/openbsc/subchan_demux.h
+++ b/openbsc/include/openbsc/subchan_demux.h
@@ -21,7 +21,7 @@
  */
 
 #include <sys/types.h>
-#include <osmocore/linuxlist.h>
+#include <osmocom/core/linuxlist.h>
 
 #define NR_SUBCH	4
 #define TRAU_FRAME_SIZE	40
diff --git a/openbsc/include/openbsc/system_information.h b/openbsc/include/openbsc/system_information.h
index da662e9..5f183e0 100644
--- a/openbsc/include/openbsc/system_information.h
+++ b/openbsc/include/openbsc/system_information.h
@@ -1,7 +1,7 @@
 #ifndef _SYSTEM_INFO_H
 #define _SYSTEM_INFO_H
 
-#include <osmocore/utils.h>
+#include <osmocom/core/utils.h>
 
 #define GSM_MACBLOCK_LEN 		23
 
diff --git a/openbsc/include/openbsc/transaction.h b/openbsc/include/openbsc/transaction.h
index e41d8ef..721630b 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 <osmocore/linuxlist.h>
+#include <osmocom/core/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 6f80d23..2665468 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 <osmocore/msgb.h>
+#include <osmocom/core/msgb.h>
 
 int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg);