aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-12-03 11:00:04 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2019-02-04 13:36:26 +0100
commit0df904dea9106587f40ec379e9cc05ea251beb7e (patch)
tree02ccf5ec37b6633677153892dee6b73a1724465f /tests
parentc7de62cc53fa6ad985015403dd9af8f1627136a0 (diff)
Add SGs Interface
Add an SGs interface (3GPP TS 29.118) to osmo-msc in order to support SMS tunneling and Circuit Switched Fallback (CSFB) Change-Id: I73359925fc1ca72b33a1466e6ac41307f2f0b11d Related: OS#3615
Diffstat (limited to 'tests')
-rw-r--r--tests/msc_vlr/Makefile.am1
-rw-r--r--tests/msc_vlr/msc_vlr_test_authen_reuse.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_call.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_authen.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_ciph.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_hlr_reject.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_hlr_timeout.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_ms_timeout.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_no_authen.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_reject_concurrency.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_rest.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_ss.c1
-rw-r--r--tests/msc_vlr/msc_vlr_test_umts_authen.c1
-rw-r--r--tests/msc_vlr/stubs.h40
-rw-r--r--tests/sms_queue/sms_queue_test.c21
-rw-r--r--tests/test_nodes.vty16
16 files changed, 90 insertions, 0 deletions
diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am
index 8a5e719f6..dea63e588 100644
--- a/tests/msc_vlr/Makefile.am
+++ b/tests/msc_vlr/Makefile.am
@@ -57,6 +57,7 @@ LDADD = \
noinst_HEADERS = \
msc_vlr_tests.h \
+ stubs.h \
$(NULL)
EXTRA_DIST = \
diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
index bdbdae3a0..09725843b 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
@@ -24,6 +24,7 @@
/* NOTE that further auth re-use tests exist in msc_vlr_test_hlr_reject.c */
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void _test_auth_reuse(enum osmo_rat_type via_ran,
int set_max_reuse_count,
diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c
index b5f6b6ce9..29639b57d 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
#include <osmocom/msc/gsm_04_08.h>
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index f6f1ab69e..8dca655e6 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void test_gsm_authen()
{
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
index 31b5f5d32..19092e224 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void test_ciph()
{
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.c b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
index 13bed4299..c613ff9df 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_reject.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void test_hlr_rej_auth_info_unknown_imsi()
{
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.c b/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
index b23a7a728..bb7ef1995 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
#include <osmocom/core/logging.h>
diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c
index 3702a0cfb..9eae8506e 100644
--- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c
+++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void test_ms_timeout_lu_auth_resp()
{
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c
index d52d3d6ff..df23011d6 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void test_no_authen()
{
diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
index 66d2e392c..ec7117b67 100644
--- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
+++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void test_reject_2nd_conn()
{
diff --git a/tests/msc_vlr/msc_vlr_test_rest.c b/tests/msc_vlr/msc_vlr_test_rest.c
index 458738390..7c17a83c4 100644
--- a/tests/msc_vlr/msc_vlr_test_rest.c
+++ b/tests/msc_vlr/msc_vlr_test_rest.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void test_early_stage()
{
diff --git a/tests/msc_vlr/msc_vlr_test_ss.c b/tests/msc_vlr/msc_vlr_test_ss.c
index 0390196ee..b264d0761 100644
--- a/tests/msc_vlr/msc_vlr_test_ss.c
+++ b/tests/msc_vlr/msc_vlr_test_ss.c
@@ -21,6 +21,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
#define IMSI "901700000004620"
diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.c b/tests/msc_vlr/msc_vlr_test_umts_authen.c
index beeea22af..8528b98b9 100644
--- a/tests/msc_vlr/msc_vlr_test_umts_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_umts_authen.c
@@ -22,6 +22,7 @@
*/
#include "msc_vlr_tests.h"
+#include "stubs.h"
static void _test_umts_authen(enum osmo_rat_type via_ran)
{
diff --git a/tests/msc_vlr/stubs.h b/tests/msc_vlr/stubs.h
new file mode 100644
index 000000000..bf55baafb
--- /dev/null
+++ b/tests/msc_vlr/stubs.h
@@ -0,0 +1,40 @@
+/* (C) 2018-2019 by sysmocom s.f.m.c. GmbH
+ * All Rights Reserved
+ *
+ * Author: Harald Welte, Philipp Maier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void *data) {}
+struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv) { return NULL; }
+void osmo_stream_srv_destroy(struct osmo_stream_srv *conn) {}
+struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link,
+ int fd, int (*cb)(struct osmo_stream_srv *conn),
+ int (*closed_cb)(struct osmo_stream_srv *conn),
+ void *data) { return NULL; }
+void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg) {}
+void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, uint16_t proto) {}
+struct osmo_fd *osmo_stream_srv_link_get_ofd(struct osmo_stream_srv_link *link) { return NULL; }
+struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx) { return NULL; }
+void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn) { return NULL; }
+void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool nodelay) {}
+void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int (*accept_cb)
+ (struct osmo_stream_srv_link *link, int fd)) {}
+int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link) { return 0; }
+void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link) { return NULL; }
+void osmo_stream_srv_link_set_port(struct osmo_stream_srv_link *link, uint16_t port) {}
+void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr) {}
+int sctp_recvmsg(int sd, void *msg, size_t len, void *from, void *fromlen, void *info, int *msg_flags) { return 0; }
diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c
index 68819b960..e4263778a 100644
--- a/tests/sms_queue/sms_queue_test.c
+++ b/tests/sms_queue/sms_queue_test.c
@@ -237,3 +237,24 @@ int main(int argc, char **argv)
return 0;
}
+
+void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void *data) {}
+struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv) { return NULL; }
+void osmo_stream_srv_destroy(struct osmo_stream_srv *conn) {}
+struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link,
+ int fd, int (*cb)(struct osmo_stream_srv *conn),
+ int (*closed_cb)(struct osmo_stream_srv *conn),
+ void *data) { return NULL; }
+void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg) {}
+void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, uint16_t proto) {}
+struct osmo_fd *osmo_stream_srv_link_get_ofd(struct osmo_stream_srv_link *link) { return NULL; }
+struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx) { return NULL; }
+void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn) { return NULL; }
+void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool nodelay) {}
+void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int (*accept_cb)
+ (struct osmo_stream_srv_link *link, int fd)) {}
+int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link) { return 0; }
+void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link) { return NULL; }
+void osmo_stream_srv_link_set_port(struct osmo_stream_srv_link *link, uint16_t port) {}
+void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr) {}
+int sctp_recvmsg(int sd, void *msg, size_t len, void *from, void *fromlen, void *info, int *msg_flags) { return 0; }
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index c62c692b3..f2312d144 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -4,6 +4,7 @@ OsmoMSC(config)# list
...
network
msc
+ sgs
mncc-int
hlr
...
@@ -92,6 +93,18 @@ OsmoMSC(config)# exit
OsmoMSC# configure terminal
OsmoMSC(config)# network
OsmoMSC(config-net)# end
+
+OsmoMSC# configure terminal
+OsmoMSC(config)# sgs
+OsmoMSC(config-sgs)# list
+...
+ local-ip A.B.C.D
+ local-port <0-65535>
+ timer (ts5|ts6-2|ts7|ts11|ts14|ts15) <1-120>
+ counter (ns7|ns11) <0-255>
+ vlr-name FQDN
+OsmoMSC(config-sgs)# end
+
OsmoMSC# disable
OsmoMSC> enable
@@ -125,4 +138,7 @@ mncc-int
hlr
remote-ip 127.0.0.1
remote-port 4222
+sgs
+ local-ip 0.0.0.0
+ vlr-name vlr.example.net
end