move headers to include/osmocom/hlr

Apply the same headers structure that we keep in most Osmocom source trees:
Keep noinst_HEADERS in include/osmocom/hlr and include them using
  #include <osmocom/hlr/*.h>

The only header kept in src/ is db_bootstrap.h, because it is generated during
build time. If it was built in include/osmocom/hlr, we would need db.o to
depend on db_bootstrap.h in a different subdir, which automake can't do well.

Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad
changes/97/16197/1
Neels Hofmeyr 2019-11-20 00:37:07 +01:00
parent 7f4dd11682
commit 2f75803e5d
42 changed files with 99 additions and 90 deletions

View File

@ -175,6 +175,8 @@ AC_OUTPUT(
src/Makefile
src/gsupclient/Makefile
include/Makefile
include/osmocom/Makefile
include/osmocom/hlr/Makefile
libosmo-gsup-client.pc
sql/Makefile
doc/manuals/Makefile

View File

@ -1,2 +1,3 @@
nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h
SUBDIRS = osmocom
nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h

View File

@ -0,0 +1,3 @@
SUBDIRS = \
hlr \
$(NULL)

View File

@ -0,0 +1,14 @@
noinst_HEADERS = \
auc.h \
ctrl.h \
db.h \
gsup_router.h \
gsup_server.h \
hlr.h \
hlr_ussd.h \
hlr_vty.h \
hlr_vty_subscr.h \
logging.h \
luop.h \
rand.h \
$(NULL)

View File

@ -1,7 +1,7 @@
#pragma once
#include <stdint.h>
#include "gsup_server.h"
#include <osmocom/hlr/gsup_server.h>
struct gsup_route {
struct llist_head list;

View File

@ -5,7 +5,7 @@
#include <osmocom/core/linuxlist.h>
#include <osmocom/gsm/gsup.h>
#include "gsup_server.h"
#include <osmocom/hlr/gsup_server.h>
#define NCSS_GUARD_TIMEOUT_DEFAULT 30

View File

@ -25,7 +25,7 @@
#include <osmocom/core/logging.h>
#include <osmocom/vty/vty.h>
#include <osmocom/vty/command.h>
#include "hlr.h"
#include <osmocom/hlr/hlr.h>
enum hlr_vty_node {
HLR_NODE = _LAST_OSMOVTY_NODE + 1,

View File

@ -27,8 +27,8 @@
#include <osmocom/core/timer.h>
#include <osmocom/gsm/gsup.h>
#include "db.h"
#include "gsup_server.h"
#include <osmocom/hlr/db.h>
#include <osmocom/hlr/gsup_server.h>
#define CANCEL_TIMEOUT_SECS 30
#define ISD_TIMEOUT_SECS 30

View File

@ -11,6 +11,7 @@ AM_CFLAGS = \
$(NULL)
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/include \
$(NULL)
EXTRA_DIST = \
@ -24,18 +25,6 @@ BUILT_SOURCES = \
CLEANFILES = $(BUILT_SOURCES)
noinst_HEADERS = \
auc.h \
db.h \
hlr.h \
luop.h \
gsup_router.h \
gsup_server.h \
logging.h \
rand.h \
ctrl.h \
hlr_vty.h \
hlr_vty_subscr.h \
hlr_ussd.h \
db_bootstrap.h \
$(NULL)

View File

@ -23,8 +23,8 @@
#include <osmocom/core/utils.h>
#include <osmocom/crypt/auth.h>
#include "logging.h"
#include "rand.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/rand.h>
#define hexb(buf) osmo_hexdump_nospc((void*)buf, sizeof(buf))
#define hex(buf,sz) osmo_hexdump_nospc((void*)buf, sz)

View File

@ -28,9 +28,9 @@
#include <osmocom/gsm/gsm23003.h>
#include <osmocom/ctrl/ports.h>
#include "hlr.h"
#include "ctrl.h"
#include "db.h"
#include <osmocom/hlr/hlr.h>
#include <osmocom/hlr/ctrl.h>
#include <osmocom/hlr/db.h>
#define SEL_BY "by-"
#define SEL_BY_IMSI SEL_BY "imsi-"

View File

@ -23,8 +23,8 @@
#include <sqlite3.h>
#include <string.h>
#include "logging.h"
#include "db.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/db.h>
#include "db_bootstrap.h"
/* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */

View File

@ -26,10 +26,10 @@
#include <sqlite3.h>
#include "logging.h"
#include "db.h"
#include "auc.h"
#include "rand.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/db.h>
#include <osmocom/hlr/auc.h>
#include <osmocom/hlr/rand.h>
#define LOGAUC(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args)

View File

@ -33,11 +33,11 @@
#include <sqlite3.h>
#include "logging.h"
#include "hlr.h"
#include "db.h"
#include "gsup_server.h"
#include "luop.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/hlr.h>
#include <osmocom/hlr/db.h>
#include <osmocom/hlr/gsup_server.h>
#include <osmocom/hlr/luop.h>
#define LOGHLR(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args)

View File

@ -23,9 +23,9 @@
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/talloc.h>
#include "logging.h"
#include "gsup_server.h"
#include "gsup_router.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/gsup_server.h>
#include <osmocom/hlr/gsup_router.h>
/*! Find a route for the given address.
* \param[in] gs gsup server

View File

@ -21,8 +21,8 @@
#include <errno.h>
#include "gsup_server.h"
#include "gsup_router.h"
#include <osmocom/hlr/gsup_server.h>
#include <osmocom/hlr/gsup_router.h>
#include <osmocom/core/logging.h>

View File

@ -27,8 +27,8 @@
#include <osmocom/gsm/gsm48_ie.h>
#include <osmocom/gsm/apn.h>
#include "gsup_server.h"
#include "gsup_router.h"
#include <osmocom/hlr/gsup_server.h>
#include <osmocom/hlr/gsup_router.h>
static void osmo_gsup_server_send(struct osmo_gsup_conn *conn,
int proto_ext, struct msgb *msg_tx)

View File

@ -37,16 +37,16 @@
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/protocol/gsm_23_003.h>
#include "db.h"
#include "hlr.h"
#include "ctrl.h"
#include "logging.h"
#include "gsup_server.h"
#include "gsup_router.h"
#include "rand.h"
#include "luop.h"
#include "hlr_vty.h"
#include "hlr_ussd.h"
#include <osmocom/hlr/db.h>
#include <osmocom/hlr/hlr.h>
#include <osmocom/hlr/ctrl.h>
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/gsup_server.h>
#include <osmocom/hlr/gsup_router.h>
#include <osmocom/hlr/rand.h>
#include <osmocom/hlr/luop.h>
#include <osmocom/hlr/hlr_vty.h>
#include <osmocom/hlr/hlr_ussd.h>
struct hlr *g_hlr;
static void *hlr_ctx = NULL;

View File

@ -29,9 +29,9 @@
#include <osmocom/core/logging.h>
#include <osmocom/core/application.h>
#include "logging.h"
#include "db.h"
#include "rand.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/db.h>
#include <osmocom/hlr/rand.h>
struct hlr_db_tool_ctx {
/* DB context */

View File

@ -29,12 +29,12 @@
#include <string.h>
#include <errno.h>
#include "hlr.h"
#include "hlr_ussd.h"
#include "gsup_server.h"
#include "gsup_router.h"
#include "logging.h"
#include "db.h"
#include <osmocom/hlr/hlr.h>
#include <osmocom/hlr/hlr_ussd.h>
#include <osmocom/hlr/gsup_server.h>
#include <osmocom/hlr/gsup_router.h>
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/db.h>
/***********************************************************************
* core data structures expressing config from VTY
@ -317,7 +317,7 @@ static int ss_tx_ussd_7bit(struct ss_session *ss, bool final, uint8_t invoke_id,
* Internal USSD Handlers
***********************************************************************/
#include "db.h"
#include <osmocom/hlr/db.h>
static int handle_ussd_own_msisdn(struct osmo_gsup_conn *conn, struct ss_session *ss,
const struct osmo_gsup_message *gsup, const struct ss_request *req)

View File

@ -33,12 +33,12 @@
#include <osmocom/vty/misc.h>
#include <osmocom/abis/ipa.h>
#include "db.h"
#include "hlr.h"
#include "hlr_vty.h"
#include "hlr_vty_subscr.h"
#include "hlr_ussd.h"
#include "gsup_server.h"
#include <osmocom/hlr/db.h>
#include <osmocom/hlr/hlr.h>
#include <osmocom/hlr/hlr_vty.h>
#include <osmocom/hlr/hlr_vty_subscr.h>
#include <osmocom/hlr/hlr_ussd.h>
#include <osmocom/hlr/gsup_server.h>
struct cmd_node hlr_node = {
HLR_NODE,
@ -150,7 +150,7 @@ DEFUN(cfg_hlr_gsup_bind_ip,
* USSD Entity
***********************************************************************/
#include "hlr_ussd.h"
#include <osmocom/hlr/hlr_ussd.h>
#define USSD_STR "USSD Configuration\n"
#define UROUTE_STR "Routing Configuration\n"

View File

@ -28,8 +28,8 @@
#include <osmocom/vty/command.h>
#include <osmocom/core/utils.h>
#include "hlr.h"
#include "db.h"
#include <osmocom/hlr/hlr.h>
#include <osmocom/hlr/db.h>
struct vty;

View File

@ -1,5 +1,5 @@
#include <osmocom/core/utils.h>
#include "logging.h"
#include <osmocom/hlr/logging.h>
const struct log_info_cat hlr_log_info_cat[] = {
[DMAIN] = {

View File

@ -28,10 +28,10 @@
#include <osmocom/gsm/gsup.h>
#include <osmocom/gsm/apn.h>
#include "gsup_server.h"
#include "gsup_router.h"
#include "logging.h"
#include "luop.h"
#include <osmocom/hlr/gsup_server.h>
#include <osmocom/hlr/gsup_router.h>
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/luop.h>
const struct value_string lu_state_names[] = {
{ LU_S_NULL, "NULL" },

View File

@ -44,7 +44,7 @@
#include <osmocom/gsupclient/gsup_client.h>
#include "logging.h"
#include <osmocom/hlr/logging.h>
static struct osmo_gsup_client *g_gc;

View File

@ -2,12 +2,12 @@ SUBDIRS = gen_ts_55_205_test_sets
AM_CPPFLAGS = \
$(all_includes) \
-I$(top_srcdir)/src \
$(NULL)
AM_CFLAGS = \
-Wall \
-ggdb3 \
-I$(top_srcdir)/include \
$(LIBOSMOCORE_CFLAGS) \
$(LIBOSMOGSM_CFLAGS) \
$(NULL)

View File

@ -29,8 +29,8 @@
#include <osmocom/crypt/auth.h>
#include "logging.h"
#include "auc.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/auc.h>
#define comment_start() fprintf(stderr, "\n===== %s\n", __func__);
#define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__);

View File

@ -33,8 +33,8 @@
#include <osmocom/crypt/auth.h>
#include "logging.h"
#include "auc.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/auc.h>
#define comment_start() fprintf(stderr, "\n===== %s\n", __func__);
#define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__);

View File

@ -1,7 +1,7 @@
AM_CFLAGS = \
$(all_includes) \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-Wall \
-ggdb3 \
$(LIBOSMOCORE_CFLAGS) \

View File

@ -27,8 +27,8 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/logging.h>
#include "db.h"
#include "logging.h"
#include <osmocom/hlr/db.h>
#include <osmocom/hlr/logging.h>
#define comment_start() fprintf(stderr, "\n===== %s\n", __func__);
#define comment(fmt, args...) fprintf(stderr, "\n--- " fmt "\n\n", ## args);

View File

@ -1,11 +1,11 @@
AM_CPPFLAGS = \
$(all_includes) \
-I$(top_srcdir)/src \
$(NULL)
AM_CFLAGS = \
-Wall \
-ggdb3 \
-I$(top_srcdir)/include \
$(LIBOSMOCORE_CFLAGS) \
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \

View File

@ -24,8 +24,8 @@
#include <osmocom/core/application.h>
#include <osmocom/gsm/gsup.h>
#include "logging.h"
#include "luop.h"
#include <osmocom/hlr/logging.h>
#include <osmocom/hlr/luop.h>
struct osmo_gsup_server;

View File

@ -1,11 +1,11 @@
AM_CPPFLAGS = \
$(all_includes) \
-I$(top_srcdir)/src \
$(NULL)
AM_CFLAGS = \
-Wall \
-ggdb3 \
-I$(top_srcdir)/include \
$(LIBOSMOCORE_CFLAGS) \
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \

View File

@ -20,7 +20,7 @@
#include <stdio.h>
#include <osmocom/core/utils.h>
#include "gsup_server.h"
#include <osmocom/hlr/gsup_server.h>
#define comment_start() printf("\n===== %s\n", __func__)
#define comment_end() printf("===== %s: SUCCESS\n\n", __func__)