aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2022-07-30 17:04:54 +0700
committerMax <msuraev@sysmocom.de>2022-07-30 17:30:48 +0700
commitb278a2d7d1f5f6b443d1e47f992f4af79b5a735c (patch)
tree2fb7f9fb474bfa258418622525976bd3a2621f20
parentd1c3e7abbd365bd30f344fcfc85716ebcbbf6d84 (diff)
SMPP: move init funcs to smpp_smsc.h
This allows to get rid of monstrous gsm_data.h include which in turn makes sharing code via smpp.h much easier. Related: OS#5568 Change-Id: I2140ed57e64f17fb79130014eaf88f58b62d7a00
-rw-r--r--include/osmocom/msc/smpp.h4
-rw-r--r--src/libmsc/smpp_smsc.h3
-rw-r--r--src/osmo-msc/msc_main.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/include/osmocom/msc/smpp.h b/include/osmocom/msc/smpp.h
index 8021509bd..3e919d232 100644
--- a/include/osmocom/msc/smpp.h
+++ b/include/osmocom/msc/smpp.h
@@ -1,7 +1,5 @@
#pragma once
-#include <osmocom/msc/gsm_data.h>
-
/* Length limits according to SMPP 3.4 spec including NUL-byte: */
#define SMPP_SYS_ID_LEN 15
#define SMPP_PASSWD_LEN 8
@@ -47,5 +45,3 @@ struct esme {
(resp)->sequence_number = (req)->sequence_number; }
uint32_t smpp_msgb_cmdid(struct msgb *msg);
-int smpp_openbsc_alloc_init(void *ctx);
-int smpp_openbsc_start(struct gsm_network *net);
diff --git a/src/libmsc/smpp_smsc.h b/src/libmsc/smpp_smsc.h
index ba0d24207..b850c0dcd 100644
--- a/src/libmsc/smpp_smsc.h
+++ b/src/libmsc/smpp_smsc.h
@@ -9,6 +9,7 @@
#include <osmocom/core/write_queue.h>
#include <osmocom/core/timer.h>
#include <osmocom/msc/smpp.h>
+#include <osmocom/msc/gsm_data.h>
#include <smpp34.h>
#include <smpp34_structs.h>
@@ -141,6 +142,8 @@ int smpp_determine_scheme(uint8_t dcs, uint8_t *data_coding, int *mode);
time_t smpp_parse_time_format(const char *vp, time_t *t_now);
+int smpp_openbsc_alloc_init(void *ctx);
+int smpp_openbsc_start(struct gsm_network *net);
struct gsm_sms;
struct ran_conn;
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index bdffb4104..0717786e2 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -75,6 +75,10 @@
#include <osmocom/msc/e_link.h>
#include <osmocom/msc/mncc_call.h>
+#ifdef BUILD_SMPP
+#include "../libmsc/smpp_smsc.h"
+#endif
+
#ifdef BUILD_IU
#include <osmocom/ranap/iu_client.h>
#include <asn1c/asn_internal.h>