diff --git a/include/osmocom/iuh/Makefile.am b/include/osmocom/iuh/Makefile.am index e2f71263..b2a667d2 100644 --- a/include/osmocom/iuh/Makefile.am +++ b/include/osmocom/iuh/Makefile.am @@ -1,2 +1,4 @@ noinst_HEADERS = \ - vty.h + vty.h \ + context_map.h hnbgw.h hnbgw_cn.h \ + hnbgw_hnbap.h hnbgw_rua.h hnbgw_ranap.h diff --git a/src/context_map.h b/include/osmocom/iuh/context_map.h similarity index 100% rename from src/context_map.h rename to include/osmocom/iuh/context_map.h diff --git a/src/hnbgw.h b/include/osmocom/iuh/hnbgw.h similarity index 100% rename from src/hnbgw.h rename to include/osmocom/iuh/hnbgw.h diff --git a/src/hnbgw_cn.h b/include/osmocom/iuh/hnbgw_cn.h similarity index 79% rename from src/hnbgw_cn.h rename to include/osmocom/iuh/hnbgw_cn.h index 469b3d44..d5bec041 100644 --- a/src/hnbgw_cn.h +++ b/include/osmocom/iuh/hnbgw_cn.h @@ -1,5 +1,5 @@ #pragma once -#include "hnbgw.h" +#include struct hnbgw_cnlink *hnbgw_cnlink_init(struct hnb_gw *gw, const char *host, uint16_t port, int is_ps); diff --git a/src/hnbgw_hnbap.h b/include/osmocom/iuh/hnbgw_hnbap.h similarity index 77% rename from src/hnbgw_hnbap.h rename to include/osmocom/iuh/hnbgw_hnbap.h index 955e0aab..cca35506 100644 --- a/src/hnbgw_hnbap.h +++ b/include/osmocom/iuh/hnbgw_hnbap.h @@ -1,6 +1,6 @@ #pragma once -#include "hnbgw.h" +#include int hnbgw_hnbap_rx(struct hnb_context *hnb, struct msgb *msg); int hnbgw_hnbap_init(void); diff --git a/src/hnbgw_ranap.h b/include/osmocom/iuh/hnbgw_ranap.h similarity index 77% rename from src/hnbgw_ranap.h rename to include/osmocom/iuh/hnbgw_ranap.h index 85a2f983..2c559647 100644 --- a/src/hnbgw_ranap.h +++ b/include/osmocom/iuh/hnbgw_ranap.h @@ -1,6 +1,6 @@ #pragma once -#include "hnbgw.h" +#include int hnbgw_ranap_rx(struct msgb *msg, uint8_t *data, size_t len); int hnbgw_ranap_init(void); diff --git a/src/hnbgw_rua.h b/include/osmocom/iuh/hnbgw_rua.h similarity index 93% rename from src/hnbgw_rua.h rename to include/osmocom/iuh/hnbgw_rua.h index d1701901..6a890b79 100644 --- a/src/hnbgw_rua.h +++ b/include/osmocom/iuh/hnbgw_rua.h @@ -1,6 +1,6 @@ #pragma once -#include "hnbgw.h" +#include #include int hnbgw_rua_rx(struct hnb_context *hnb, struct msgb *msg); diff --git a/src/iu_common.h b/include/osmocom/iuh/iu_common.h similarity index 100% rename from src/iu_common.h rename to include/osmocom/iuh/iu_common.h diff --git a/include/osmocom/rua/Makefile.am b/include/osmocom/rua/Makefile.am index 49e21505..307f1234 100644 --- a/include/osmocom/rua/Makefile.am +++ b/include/osmocom/rua/Makefile.am @@ -1,5 +1,5 @@ noinst_HEADERS = \ - rua_common.h rua_ies_defs.h \ + rua_common.h rua_ies_defs.h rua_msg_factory.h \ RUA_Ansi-41-IDNNS.h \ RUA_Cause.h \ RUA_CauseMisc.h \ diff --git a/src/rua_msg_factory.h b/include/osmocom/rua/rua_msg_factory.h similarity index 100% rename from src/rua_msg_factory.h rename to include/osmocom/rua/rua_msg_factory.h diff --git a/src/Makefile.am b/src/Makefile.am index 2779315d..bb1ebbd0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -60,9 +60,6 @@ libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_ # bin_PROGRAMS = osmo-hnbgw -noinst_HEADERS = context_map.h hnbgw.h hnbgw_cn.h \ - hnbgw_hnbap.h hnbgw_rua.h hnbgw_ranap.h - osmo_hnbgw_SOURCES = hnbap_encoder.c hnbap_decoder.c hnbap_common.c \ rua_encoder.c rua_decoder.c rua_common.c \ rua_msg_factory.c \ diff --git a/src/context_map.c b/src/context_map.c index 22eb605d..052133c8 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -24,8 +24,8 @@ #include -#include "hnbgw.h" -#include "context_map.h" +#include +#include /* is a given SCCP USER SAP Connection ID in use for a given CN link? */ static int cn_id_in_use(struct hnbgw_cnlink *cn, uint32_t id) diff --git a/src/hnbap_common.c b/src/hnbap_common.c index 2cd65191..f8cfb13e 100644 --- a/src/hnbap_common.c +++ b/src/hnbap_common.c @@ -25,7 +25,7 @@ #include #include -#include "hnbgw.h" +#include static const struct value_string hnbap_cause_radio_vals[] = { { CauseRadioNetwork_overload, "overload" }, diff --git a/src/hnbgw.c b/src/hnbgw.c index 4f23e8d5..d50e622d 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -51,11 +51,11 @@ #include #include -#include "hnbgw.h" -#include "hnbgw_hnbap.h" -#include "hnbgw_rua.h" -#include "hnbgw_cn.h" -#include "context_map.h" +#include +#include +#include +#include +#include static const char * const osmo_hnbgw_copyright = "OsmoHNBGW - Osmocom Home Node B Gateway implementation\r\n" diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c index 09b27266..e41788da 100644 --- a/src/hnbgw_cn.c +++ b/src/hnbgw_cn.c @@ -29,11 +29,11 @@ #include #include -#include "hnbgw.h" -#include "hnbgw_rua.h" +#include +#include #include #include -#include "context_map.h" +#include /*********************************************************************** * Outbound RANAP RESET to CN diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index c329fe43..7bf54c86 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -31,7 +31,7 @@ #include #include -#include "hnbgw.h" +#include #include #define IU_MSG_NUM_IES 32 diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c index dde11836..7a505a5a 100644 --- a/src/hnbgw_ranap.c +++ b/src/hnbgw_ranap.c @@ -29,8 +29,8 @@ #include "asn1helpers.h" -#include "hnbgw.h" -#include "hnbgw_rua.h" +#include +#include #include #include #include diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index fc22bfc9..3f245b59 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -32,11 +32,11 @@ #include "asn1helpers.h" -#include "hnbgw.h" -#include "hnbgw_ranap.h" +#include +#include #include #include -#include "context_map.h" +#include static int hnbgw_rua_tx(struct hnb_context *ctx, struct msgb *msg) { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 1673c0cd..2e3d1e9c 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -22,8 +22,8 @@ #include -#include "hnbgw.h" -#include "context_map.h" +#include +#include static void *tall_hnb_ctx = NULL; static struct hnb_gw *g_hnb_gw = NULL; diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c index 2c80dd08..3736dcef 100644 --- a/src/ranap_common_cn.c +++ b/src/ranap_common_cn.c @@ -29,7 +29,7 @@ #include #include -#include "hnbgw.h" +#include static int cn_ranap_rx_initiating_msg_co(void *ctx, RANAP_InitiatingMessage_t *imsg, ranap_message *message) diff --git a/src/rua_common.c b/src/rua_common.c index a5ab044b..3c9d7734 100644 --- a/src/rua_common.c +++ b/src/rua_common.c @@ -24,7 +24,7 @@ #include #include -#include "hnbgw.h" +#include extern int asn1_xer_print; diff --git a/src/rua_msg_factory.c b/src/rua_msg_factory.c index 0bce3263..268f6acd 100644 --- a/src/rua_msg_factory.c +++ b/src/rua_msg_factory.c @@ -3,9 +3,9 @@ #include #include -#include "rua_msg_factory.h" +#include #include "asn1helpers.h" -#include "hnbgw.h" +#include struct msgb *rua_new_udt(struct msgb *inmsg) diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 2ba3e894..3a99681a 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -1,9 +1,14 @@ -AM_CFLAGS = -g -I$(top_srcdir)/src -I$(top_srcdir)/include $(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) +AM_CFLAGS = -g -I$(top_srcdir)/src/tests \ + -I$(top_srcdir)/include -I$(top_builddir)/include \ + $(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) \ + $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) COMMON_LIBS = $(OSMOVTY_LIBS) $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) -lsctp check_PROGRAMS = test-ranap test-helpers test-hnbap hnb-test dummy-cn +noinst_HEADERS = test_common.h hnb-test.h hnb-test-layers.h + HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c $(top_srcdir)/src/hnbap_encoder.c RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_srcdir)/src/rua_decoder.c $(top_srcdir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c diff --git a/src/tests/dummy_cn_sua.c b/src/tests/dummy_cn_sua.c index c2fc7120..f9b4244e 100644 --- a/src/tests/dummy_cn_sua.c +++ b/src/tests/dummy_cn_sua.c @@ -24,7 +24,7 @@ #include #include #include -#include "hnbgw.h" +#include int asn1_xer_print = 1; const char *cmdline_bind_addr = "127.0.0.1"; diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c index 2c41199f..d3380773 100644 --- a/src/tests/hnb-test.c +++ b/src/tests/hnb-test.c @@ -54,7 +54,7 @@ #include "hnb-test-layers.h" #include #include -#include "rua_msg_factory.h" +#include #include "asn1helpers.h" #include #include "test_common.h" diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index ce01b968..c70009bc 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -32,7 +32,7 @@ #include "test_common.h" -#include "hnbgw.h" +#include int asn1_xer_print = 1; diff --git a/src/tests/test_common.c b/src/tests/test_common.c index a79d5f50..5a37e7ec 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -37,7 +37,7 @@ #include #include -#include "hnbgw.h" +#include void *talloc_asn1_ctx;